autogits/bots-common/gitea-generated/client/issue/issue_delete_comment_reaction_parameters.go
Adam Majer 598ecbbd5a .
2024-07-07 21:12:40 +02:00

220 lines
6.4 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package issue
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"src.opensuse.org/autogits/common/gitea-generated/models"
)
// NewIssueDeleteCommentReactionParams creates a new IssueDeleteCommentReactionParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewIssueDeleteCommentReactionParams() *IssueDeleteCommentReactionParams {
return &IssueDeleteCommentReactionParams{
timeout: cr.DefaultTimeout,
}
}
// NewIssueDeleteCommentReactionParamsWithTimeout creates a new IssueDeleteCommentReactionParams object
// with the ability to set a timeout on a request.
func NewIssueDeleteCommentReactionParamsWithTimeout(timeout time.Duration) *IssueDeleteCommentReactionParams {
return &IssueDeleteCommentReactionParams{
timeout: timeout,
}
}
// NewIssueDeleteCommentReactionParamsWithContext creates a new IssueDeleteCommentReactionParams object
// with the ability to set a context for a request.
func NewIssueDeleteCommentReactionParamsWithContext(ctx context.Context) *IssueDeleteCommentReactionParams {
return &IssueDeleteCommentReactionParams{
Context: ctx,
}
}
// NewIssueDeleteCommentReactionParamsWithHTTPClient creates a new IssueDeleteCommentReactionParams object
// with the ability to set a custom HTTPClient for a request.
func NewIssueDeleteCommentReactionParamsWithHTTPClient(client *http.Client) *IssueDeleteCommentReactionParams {
return &IssueDeleteCommentReactionParams{
HTTPClient: client,
}
}
/*
IssueDeleteCommentReactionParams contains all the parameters to send to the API endpoint
for the issue delete comment reaction operation.
Typically these are written to a http.Request.
*/
type IssueDeleteCommentReactionParams struct {
// Content.
Content *models.EditReactionOption
/* ID.
id of the comment to edit
Format: int64
*/
ID int64
/* Owner.
owner of the repo
*/
Owner string
/* Repo.
name of the repo
*/
Repo string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the issue delete comment reaction params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IssueDeleteCommentReactionParams) WithDefaults() *IssueDeleteCommentReactionParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the issue delete comment reaction params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *IssueDeleteCommentReactionParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) WithTimeout(timeout time.Duration) *IssueDeleteCommentReactionParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) WithContext(ctx context.Context) *IssueDeleteCommentReactionParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) WithHTTPClient(client *http.Client) *IssueDeleteCommentReactionParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithContent adds the content to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) WithContent(content *models.EditReactionOption) *IssueDeleteCommentReactionParams {
o.SetContent(content)
return o
}
// SetContent adds the content to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) SetContent(content *models.EditReactionOption) {
o.Content = content
}
// WithID adds the id to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) WithID(id int64) *IssueDeleteCommentReactionParams {
o.SetID(id)
return o
}
// SetID adds the id to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) SetID(id int64) {
o.ID = id
}
// WithOwner adds the owner to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) WithOwner(owner string) *IssueDeleteCommentReactionParams {
o.SetOwner(owner)
return o
}
// SetOwner adds the owner to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) SetOwner(owner string) {
o.Owner = owner
}
// WithRepo adds the repo to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) WithRepo(repo string) *IssueDeleteCommentReactionParams {
o.SetRepo(repo)
return o
}
// SetRepo adds the repo to the issue delete comment reaction params
func (o *IssueDeleteCommentReactionParams) SetRepo(repo string) {
o.Repo = repo
}
// WriteToRequest writes these params to a swagger request
func (o *IssueDeleteCommentReactionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Content != nil {
if err := r.SetBodyParam(o.Content); err != nil {
return err
}
}
// path param id
if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
return err
}
// path param owner
if err := r.SetPathParam("owner", o.Owner); err != nil {
return err
}
// path param repo
if err := r.SetPathParam("repo", o.Repo); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}