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