156 lines
4.6 KiB
Go
156 lines
4.6 KiB
Go
// 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 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"
|
|
|
|
"code.tnxs.net/taxnexus/lib/api/sf-gate/sf_gate_models"
|
|
)
|
|
|
|
// NewPostStatementsParams creates a new PostStatementsParams 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 NewPostStatementsParams() *PostStatementsParams {
|
|
return &PostStatementsParams{
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewPostStatementsParamsWithTimeout creates a new PostStatementsParams object
|
|
// with the ability to set a timeout on a request.
|
|
func NewPostStatementsParamsWithTimeout(timeout time.Duration) *PostStatementsParams {
|
|
return &PostStatementsParams{
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewPostStatementsParamsWithContext creates a new PostStatementsParams object
|
|
// with the ability to set a context for a request.
|
|
func NewPostStatementsParamsWithContext(ctx context.Context) *PostStatementsParams {
|
|
return &PostStatementsParams{
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewPostStatementsParamsWithHTTPClient creates a new PostStatementsParams object
|
|
// with the ability to set a custom HTTPClient for a request.
|
|
func NewPostStatementsParamsWithHTTPClient(client *http.Client) *PostStatementsParams {
|
|
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
|
|
}
|
|
|
|
// WithDefaults hydrates default values in the post statements params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *PostStatementsParams) WithDefaults() *PostStatementsParams {
|
|
o.SetDefaults()
|
|
return o
|
|
}
|
|
|
|
// SetDefaults hydrates default values in the post statements params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *PostStatementsParams) SetDefaults() {
|
|
// no default values defined for this parameter
|
|
}
|
|
|
|
// 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
|
|
}
|