// 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 certificates import ( "context" "net/http" "time" "code.tnxs.net/vernonkeenan/lib/api/members/members_models" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) // NewPostCertificatesParams creates a new PostCertificatesParams 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 NewPostCertificatesParams() *PostCertificatesParams { return NewPostCertificatesParamsWithTimeout(cr.DefaultTimeout) } // NewPostCertificatesParamsWithTimeout creates a new PostCertificatesParams object // with the ability to set a timeout on a request. func NewPostCertificatesParamsWithTimeout(timeout time.Duration) *PostCertificatesParams { return &PostCertificatesParams{ inner: innerParams{ timeout: timeout, }, } } // NewPostCertificatesParamsWithContext creates a new PostCertificatesParams object // with the ability to set a context for a request. // // Deprecated: use the operation call with context to pass the context instead of [PostCertificatesParams]. func NewPostCertificatesParamsWithContext(ctx context.Context) *PostCertificatesParams { return &PostCertificatesParams{ inner: innerParams{ ctx: ctx, }, } } // NewPostCertificatesParamsWithHTTPClient creates a new PostCertificatesParams object // with the ability to set a custom HTTPClient for a request. func NewPostCertificatesParamsWithHTTPClient(client *http.Client) *PostCertificatesParams { return &PostCertificatesParams{ HTTPClient: client, } } /* PostCertificatesParams contains all the parameters to send to the API endpoint for the post certificates operation. Typically these are written to a http.Request. */ type PostCertificatesParams struct { // CertificateRequest. // // An array of new Certificate records CertificateRequest *members_models.CertificateRequest HTTPClient *http.Client inner innerParams } // WithDefaults hydrates default values in the post certificates params (not the query body). // // All values with no default are reset to their zero value. func (o *PostCertificatesParams) WithDefaults() *PostCertificatesParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the post certificates params (not the query body). // // All values with no default are reset to their zero value. func (o *PostCertificatesParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the post certificates params. func (o *PostCertificatesParams) WithTimeout(timeout time.Duration) *PostCertificatesParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the post certificates params. func (o *PostCertificatesParams) SetTimeout(timeout time.Duration) { o.inner.timeout = timeout } // WithContext adds the context to the post certificates params. // // Deprecated: use the operation call with context to pass the context instead of [PostCertificatesParams]. func (o *PostCertificatesParams) WithContext(ctx context.Context) *PostCertificatesParams { o.SetContext(ctx) return o } // SetContext adds the context to the post certificates params. // // Deprecated: use the operation call with context to pass the context instead of [PostCertificatesParams]. func (o *PostCertificatesParams) SetContext(ctx context.Context) { o.inner.ctx = ctx } // WithHTTPClient adds the HTTPClient to the post certificates params. func (o *PostCertificatesParams) WithHTTPClient(client *http.Client) *PostCertificatesParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the post certificates params. func (o *PostCertificatesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithCertificateRequest adds the certificateRequest to the post certificates params. func (o *PostCertificatesParams) WithCertificateRequest(certificateRequest *members_models.CertificateRequest) *PostCertificatesParams { o.SetCertificateRequest(certificateRequest) return o } // SetCertificateRequest adds the certificateRequest to the post certificates params. func (o *PostCertificatesParams) SetCertificateRequest(certificateRequest *members_models.CertificateRequest) { o.CertificateRequest = certificateRequest } // WriteToRequest writes these params to a [runtime.ClientRequest]. func (o *PostCertificatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.inner.timeout); err != nil { return err } var res []error if o.CertificateRequest != nil { if err := r.SetBodyParam(o.CertificateRequest); err != nil { return err } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }