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

152 lines
3.9 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package organization
// 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"
)
// NewOrgDeleteParams creates a new OrgDeleteParams 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 NewOrgDeleteParams() *OrgDeleteParams {
return &OrgDeleteParams{
timeout: cr.DefaultTimeout,
}
}
// NewOrgDeleteParamsWithTimeout creates a new OrgDeleteParams object
// with the ability to set a timeout on a request.
func NewOrgDeleteParamsWithTimeout(timeout time.Duration) *OrgDeleteParams {
return &OrgDeleteParams{
timeout: timeout,
}
}
// NewOrgDeleteParamsWithContext creates a new OrgDeleteParams object
// with the ability to set a context for a request.
func NewOrgDeleteParamsWithContext(ctx context.Context) *OrgDeleteParams {
return &OrgDeleteParams{
Context: ctx,
}
}
// NewOrgDeleteParamsWithHTTPClient creates a new OrgDeleteParams object
// with the ability to set a custom HTTPClient for a request.
func NewOrgDeleteParamsWithHTTPClient(client *http.Client) *OrgDeleteParams {
return &OrgDeleteParams{
HTTPClient: client,
}
}
/*
OrgDeleteParams contains all the parameters to send to the API endpoint
for the org delete operation.
Typically these are written to a http.Request.
*/
type OrgDeleteParams struct {
/* Org.
organization that is to be deleted
*/
Org string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the org delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *OrgDeleteParams) WithDefaults() *OrgDeleteParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the org delete params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *OrgDeleteParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the org delete params
func (o *OrgDeleteParams) WithTimeout(timeout time.Duration) *OrgDeleteParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the org delete params
func (o *OrgDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the org delete params
func (o *OrgDeleteParams) WithContext(ctx context.Context) *OrgDeleteParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the org delete params
func (o *OrgDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the org delete params
func (o *OrgDeleteParams) WithHTTPClient(client *http.Client) *OrgDeleteParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the org delete params
func (o *OrgDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithOrg adds the org to the org delete params
func (o *OrgDeleteParams) WithOrg(org string) *OrgDeleteParams {
o.SetOrg(org)
return o
}
// SetOrg adds the org to the org delete params
func (o *OrgDeleteParams) SetOrg(org string) {
o.Org = org
}
// WriteToRequest writes these params to a swagger request
func (o *OrgDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param org
if err := r.SetPathParam("org", o.Org); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}