// Code generated by go-swagger; DO NOT EDIT. // All Code Copyright(c) 2018-2021 by Taxnexus, Inc. // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed package charge // 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" "code.tnxs.net/taxnexus/lib/api/ops/ops_models" ) // NewPutChargesParams creates a new PutChargesParams 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 NewPutChargesParams() *PutChargesParams { return &PutChargesParams{ timeout: cr.DefaultTimeout, } } // NewPutChargesParamsWithTimeout creates a new PutChargesParams object // with the ability to set a timeout on a request. func NewPutChargesParamsWithTimeout(timeout time.Duration) *PutChargesParams { return &PutChargesParams{ timeout: timeout, } } // NewPutChargesParamsWithContext creates a new PutChargesParams object // with the ability to set a context for a request. func NewPutChargesParamsWithContext(ctx context.Context) *PutChargesParams { return &PutChargesParams{ Context: ctx, } } // NewPutChargesParamsWithHTTPClient creates a new PutChargesParams object // with the ability to set a custom HTTPClient for a request. func NewPutChargesParamsWithHTTPClient(client *http.Client) *PutChargesParams { return &PutChargesParams{ HTTPClient: client, } } /* PutChargesParams contains all the parameters to send to the API endpoint for the put charges operation. Typically these are written to a http.Request. */ type PutChargesParams struct { /* ChargeRequest. A request with an array of Charge Objects */ ChargeRequest *ops_models.ChargeRequest timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the put charges params (not the query body). // // All values with no default are reset to their zero value. func (o *PutChargesParams) WithDefaults() *PutChargesParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the put charges params (not the query body). // // All values with no default are reset to their zero value. func (o *PutChargesParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the put charges params func (o *PutChargesParams) WithTimeout(timeout time.Duration) *PutChargesParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the put charges params func (o *PutChargesParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the put charges params func (o *PutChargesParams) WithContext(ctx context.Context) *PutChargesParams { o.SetContext(ctx) return o } // SetContext adds the context to the put charges params func (o *PutChargesParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the put charges params func (o *PutChargesParams) WithHTTPClient(client *http.Client) *PutChargesParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the put charges params func (o *PutChargesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithChargeRequest adds the chargeRequest to the put charges params func (o *PutChargesParams) WithChargeRequest(chargeRequest *ops_models.ChargeRequest) *PutChargesParams { o.SetChargeRequest(chargeRequest) return o } // SetChargeRequest adds the chargeRequest to the put charges params func (o *PutChargesParams) SetChargeRequest(chargeRequest *ops_models.ChargeRequest) { o.ChargeRequest = chargeRequest } // WriteToRequest writes these params to a swagger request func (o *PutChargesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ChargeRequest != nil { if err := r.SetBodyParam(o.ChargeRequest); err != nil { return err } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }