lib/api/members/members_client/prompts/put_prompts_parameters.go

160 lines
4.5 KiB
Go
Raw Permalink Normal View History

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