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