// 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" ) // NewUserDeleteAccessTokenParams creates a new UserDeleteAccessTokenParams 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 NewUserDeleteAccessTokenParams() *UserDeleteAccessTokenParams { return &UserDeleteAccessTokenParams{ timeout: cr.DefaultTimeout, } } // NewUserDeleteAccessTokenParamsWithTimeout creates a new UserDeleteAccessTokenParams object // with the ability to set a timeout on a request. func NewUserDeleteAccessTokenParamsWithTimeout(timeout time.Duration) *UserDeleteAccessTokenParams { return &UserDeleteAccessTokenParams{ timeout: timeout, } } // NewUserDeleteAccessTokenParamsWithContext creates a new UserDeleteAccessTokenParams object // with the ability to set a context for a request. func NewUserDeleteAccessTokenParamsWithContext(ctx context.Context) *UserDeleteAccessTokenParams { return &UserDeleteAccessTokenParams{ Context: ctx, } } // NewUserDeleteAccessTokenParamsWithHTTPClient creates a new UserDeleteAccessTokenParams object // with the ability to set a custom HTTPClient for a request. func NewUserDeleteAccessTokenParamsWithHTTPClient(client *http.Client) *UserDeleteAccessTokenParams { return &UserDeleteAccessTokenParams{ HTTPClient: client, } } /* UserDeleteAccessTokenParams contains all the parameters to send to the API endpoint for the user delete access token operation. Typically these are written to a http.Request. */ type UserDeleteAccessTokenParams struct { /* Token. token to be deleted, identified by ID and if not available by name */ Token string /* Username. username of user */ Username string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the user delete access token params (not the query body). // // All values with no default are reset to their zero value. func (o *UserDeleteAccessTokenParams) WithDefaults() *UserDeleteAccessTokenParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the user delete access token params (not the query body). // // All values with no default are reset to their zero value. func (o *UserDeleteAccessTokenParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the user delete access token params func (o *UserDeleteAccessTokenParams) WithTimeout(timeout time.Duration) *UserDeleteAccessTokenParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the user delete access token params func (o *UserDeleteAccessTokenParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the user delete access token params func (o *UserDeleteAccessTokenParams) WithContext(ctx context.Context) *UserDeleteAccessTokenParams { o.SetContext(ctx) return o } // SetContext adds the context to the user delete access token params func (o *UserDeleteAccessTokenParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the user delete access token params func (o *UserDeleteAccessTokenParams) WithHTTPClient(client *http.Client) *UserDeleteAccessTokenParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the user delete access token params func (o *UserDeleteAccessTokenParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithToken adds the token to the user delete access token params func (o *UserDeleteAccessTokenParams) WithToken(token string) *UserDeleteAccessTokenParams { o.SetToken(token) return o } // SetToken adds the token to the user delete access token params func (o *UserDeleteAccessTokenParams) SetToken(token string) { o.Token = token } // WithUsername adds the username to the user delete access token params func (o *UserDeleteAccessTokenParams) WithUsername(username string) *UserDeleteAccessTokenParams { o.SetUsername(username) return o } // SetUsername adds the username to the user delete access token params func (o *UserDeleteAccessTokenParams) SetUsername(username string) { o.Username = username } // WriteToRequest writes these params to a swagger request func (o *UserDeleteAccessTokenParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // path param token if err := r.SetPathParam("token", o.Token); 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 }