// 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 stash_pdf 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" ) // NewGetPdfsParams creates a new GetPdfsParams 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 NewGetPdfsParams() *GetPdfsParams { return NewGetPdfsParamsWithTimeout(cr.DefaultTimeout) } // NewGetPdfsParamsWithTimeout creates a new GetPdfsParams object // with the ability to set a timeout on a request. func NewGetPdfsParamsWithTimeout(timeout time.Duration) *GetPdfsParams { return &GetPdfsParams{ inner: innerParams{ timeout: timeout, }, } } // NewGetPdfsParamsWithContext creates a new GetPdfsParams object // with the ability to set a context for a request. // // Deprecated: use the operation call with context to pass the context instead of [GetPdfsParams]. func NewGetPdfsParamsWithContext(ctx context.Context) *GetPdfsParams { return &GetPdfsParams{ inner: innerParams{ ctx: ctx, }, } } // NewGetPdfsParamsWithHTTPClient creates a new GetPdfsParams object // with the ability to set a custom HTTPClient for a request. func NewGetPdfsParamsWithHTTPClient(client *http.Client) *GetPdfsParams { return &GetPdfsParams{ HTTPClient: client, } } /* GetPdfsParams contains all the parameters to send to the API endpoint for the get pdfs operation. Typically these are written to a http.Request. */ type GetPdfsParams struct { // PdfID. // // PDF record ID PdfID string HTTPClient *http.Client inner innerParams } // WithDefaults hydrates default values in the get pdfs params (not the query body). // // All values with no default are reset to their zero value. func (o *GetPdfsParams) WithDefaults() *GetPdfsParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the get pdfs params (not the query body). // // All values with no default are reset to their zero value. func (o *GetPdfsParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the get pdfs params. func (o *GetPdfsParams) WithTimeout(timeout time.Duration) *GetPdfsParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the get pdfs params. func (o *GetPdfsParams) SetTimeout(timeout time.Duration) { o.inner.timeout = timeout } // WithContext adds the context to the get pdfs params. // // Deprecated: use the operation call with context to pass the context instead of [GetPdfsParams]. func (o *GetPdfsParams) WithContext(ctx context.Context) *GetPdfsParams { o.SetContext(ctx) return o } // SetContext adds the context to the get pdfs params. // // Deprecated: use the operation call with context to pass the context instead of [GetPdfsParams]. func (o *GetPdfsParams) SetContext(ctx context.Context) { o.inner.ctx = ctx } // WithHTTPClient adds the HTTPClient to the get pdfs params. func (o *GetPdfsParams) WithHTTPClient(client *http.Client) *GetPdfsParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the get pdfs params. func (o *GetPdfsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithPdfID adds the pdfID to the get pdfs params. func (o *GetPdfsParams) WithPdfID(pdfID string) *GetPdfsParams { o.SetPdfID(pdfID) return o } // SetPdfID adds the pdfId to the get pdfs params. func (o *GetPdfsParams) SetPdfID(pdfID string) { o.PdfID = pdfID } // WriteToRequest writes these params to a [runtime.ClientRequest]. func (o *GetPdfsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.inner.timeout); err != nil { return err } var res []error // path param pdfId if err := r.SetPathParam("pdfId", o.PdfID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }