lib/api/geo/v0.0.1/geo_client/domain/post_domains_parameters.go

140 lines
3.8 KiB
Go
Raw Permalink Normal View History

2021-01-08 17:00:13 +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 domain
// 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"
"github.com/taxnexus/lib/api/geo/geo_models"
)
// NewPostDomainsParams creates a new PostDomainsParams object
// with the default values initialized.
func NewPostDomainsParams() *PostDomainsParams {
var ()
return &PostDomainsParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostDomainsParamsWithTimeout creates a new PostDomainsParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewPostDomainsParamsWithTimeout(timeout time.Duration) *PostDomainsParams {
var ()
return &PostDomainsParams{
timeout: timeout,
}
}
// NewPostDomainsParamsWithContext creates a new PostDomainsParams object
// with the default values initialized, and the ability to set a context for a request
func NewPostDomainsParamsWithContext(ctx context.Context) *PostDomainsParams {
var ()
return &PostDomainsParams{
Context: ctx,
}
}
// NewPostDomainsParamsWithHTTPClient creates a new PostDomainsParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPostDomainsParamsWithHTTPClient(client *http.Client) *PostDomainsParams {
var ()
return &PostDomainsParams{
HTTPClient: client,
}
}
/*PostDomainsParams contains all the parameters to send to the API endpoint
for the post domains operation typically these are written to a http.Request
*/
type PostDomainsParams struct {
/*DomainRequest*/
DomainRequest *geo_models.DomainRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the post domains params
func (o *PostDomainsParams) WithTimeout(timeout time.Duration) *PostDomainsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post domains params
func (o *PostDomainsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post domains params
func (o *PostDomainsParams) WithContext(ctx context.Context) *PostDomainsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post domains params
func (o *PostDomainsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the post domains params
func (o *PostDomainsParams) WithHTTPClient(client *http.Client) *PostDomainsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post domains params
func (o *PostDomainsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDomainRequest adds the domainRequest to the post domains params
func (o *PostDomainsParams) WithDomainRequest(domainRequest *geo_models.DomainRequest) *PostDomainsParams {
o.SetDomainRequest(domainRequest)
return o
}
// SetDomainRequest adds the domainRequest to the post domains params
func (o *PostDomainsParams) SetDomainRequest(domainRequest *geo_models.DomainRequest) {
o.DomainRequest = domainRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PostDomainsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.DomainRequest != nil {
if err := r.SetBodyParam(o.DomainRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}