lib/api/sf-gate/sf_gate_client/statements/post_statements_parameters.go

143 lines
4.1 KiB
Go
Raw Permalink Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package statements
// 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"
2021-01-10 17:03:26 +00:00
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_models"
2021-01-08 17:40:28 +00:00
)
// NewPostStatementsParams creates a new PostStatementsParams object
// with the default values initialized.
func NewPostStatementsParams() *PostStatementsParams {
var ()
return &PostStatementsParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostStatementsParamsWithTimeout creates a new PostStatementsParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewPostStatementsParamsWithTimeout(timeout time.Duration) *PostStatementsParams {
var ()
return &PostStatementsParams{
timeout: timeout,
}
}
// NewPostStatementsParamsWithContext creates a new PostStatementsParams object
// with the default values initialized, and the ability to set a context for a request
func NewPostStatementsParamsWithContext(ctx context.Context) *PostStatementsParams {
var ()
return &PostStatementsParams{
Context: ctx,
}
}
// NewPostStatementsParamsWithHTTPClient creates a new PostStatementsParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPostStatementsParamsWithHTTPClient(client *http.Client) *PostStatementsParams {
var ()
return &PostStatementsParams{
HTTPClient: client,
}
}
/*PostStatementsParams contains all the parameters to send to the API endpoint
for the post statements operation typically these are written to a http.Request
*/
type PostStatementsParams struct {
/*StatementsRequest
An array of new Statement records
*/
StatementsRequest *sf_gate_models.StatementRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the post statements params
func (o *PostStatementsParams) WithTimeout(timeout time.Duration) *PostStatementsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post statements params
func (o *PostStatementsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post statements params
func (o *PostStatementsParams) WithContext(ctx context.Context) *PostStatementsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post statements params
func (o *PostStatementsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the post statements params
func (o *PostStatementsParams) WithHTTPClient(client *http.Client) *PostStatementsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post statements params
func (o *PostStatementsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithStatementsRequest adds the statementsRequest to the post statements params
func (o *PostStatementsParams) WithStatementsRequest(statementsRequest *sf_gate_models.StatementRequest) *PostStatementsParams {
o.SetStatementsRequest(statementsRequest)
return o
}
// SetStatementsRequest adds the statementsRequest to the post statements params
func (o *PostStatementsParams) SetStatementsRequest(statementsRequest *sf_gate_models.StatementRequest) {
o.StatementsRequest = statementsRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PostStatementsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.StatementsRequest != nil {
if err := r.SetBodyParam(o.StatementsRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}