lib/api/sfgate/sfgate_client/accounts/put_accounts_parameters.go

158 lines
4.4 KiB
Go
Raw Permalink Normal View History

2023-03-28 17:47:34 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package accounts
// 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/vernonkeenan/lib/api/sfgate/sfgate_models"
)
// NewPutAccountsParams creates a new PutAccountsParams 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 NewPutAccountsParams() *PutAccountsParams {
return &PutAccountsParams{
timeout: cr.DefaultTimeout,
}
}
// NewPutAccountsParamsWithTimeout creates a new PutAccountsParams object
// with the ability to set a timeout on a request.
func NewPutAccountsParamsWithTimeout(timeout time.Duration) *PutAccountsParams {
return &PutAccountsParams{
timeout: timeout,
}
}
// NewPutAccountsParamsWithContext creates a new PutAccountsParams object
// with the ability to set a context for a request.
func NewPutAccountsParamsWithContext(ctx context.Context) *PutAccountsParams {
return &PutAccountsParams{
Context: ctx,
}
}
// NewPutAccountsParamsWithHTTPClient creates a new PutAccountsParams object
// with the ability to set a custom HTTPClient for a request.
func NewPutAccountsParamsWithHTTPClient(client *http.Client) *PutAccountsParams {
return &PutAccountsParams{
HTTPClient: client,
}
}
/*
PutAccountsParams contains all the parameters to send to the API endpoint
for the put accounts operation.
Typically these are written to a http.Request.
*/
type PutAccountsParams struct {
/* AccountRequest.
A request with an array of Account Objects
*/
AccountRequest *sfgate_models.AccountRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the put accounts params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutAccountsParams) WithDefaults() *PutAccountsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the put accounts params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutAccountsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the put accounts params
func (o *PutAccountsParams) WithTimeout(timeout time.Duration) *PutAccountsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the put accounts params
func (o *PutAccountsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the put accounts params
func (o *PutAccountsParams) WithContext(ctx context.Context) *PutAccountsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the put accounts params
func (o *PutAccountsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the put accounts params
func (o *PutAccountsParams) WithHTTPClient(client *http.Client) *PutAccountsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the put accounts params
func (o *PutAccountsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAccountRequest adds the accountRequest to the put accounts params
func (o *PutAccountsParams) WithAccountRequest(accountRequest *sfgate_models.AccountRequest) *PutAccountsParams {
o.SetAccountRequest(accountRequest)
return o
}
// SetAccountRequest adds the accountRequest to the put accounts params
func (o *PutAccountsParams) SetAccountRequest(accountRequest *sfgate_models.AccountRequest) {
o.AccountRequest = accountRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PutAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AccountRequest != nil {
if err := r.SetBodyParam(o.AccountRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}