lib/api/sfgate/sfgate_client/prompts/get_prompts_parameters.go

241 lines
5.4 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
2023-06-05 19:44:18 +00:00
package prompts
2023-06-04 23:54:48 +00:00
// 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/go-openapi/swag"
)
2023-06-05 19:44:18 +00:00
// NewGetPromptsParams creates a new GetPromptsParams object,
2023-06-04 23:54:48 +00:00
// 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.
2023-06-05 19:44:18 +00:00
func NewGetPromptsParams() *GetPromptsParams {
return &GetPromptsParams{
2023-06-04 23:54:48 +00:00
timeout: cr.DefaultTimeout,
}
}
2023-06-05 19:44:18 +00:00
// NewGetPromptsParamsWithTimeout creates a new GetPromptsParams object
2023-06-04 23:54:48 +00:00
// with the ability to set a timeout on a request.
2023-06-05 19:44:18 +00:00
func NewGetPromptsParamsWithTimeout(timeout time.Duration) *GetPromptsParams {
return &GetPromptsParams{
2023-06-04 23:54:48 +00:00
timeout: timeout,
}
}
2023-06-05 19:44:18 +00:00
// NewGetPromptsParamsWithContext creates a new GetPromptsParams object
2023-06-04 23:54:48 +00:00
// with the ability to set a context for a request.
2023-06-05 19:44:18 +00:00
func NewGetPromptsParamsWithContext(ctx context.Context) *GetPromptsParams {
return &GetPromptsParams{
2023-06-04 23:54:48 +00:00
Context: ctx,
}
}
2023-06-05 19:44:18 +00:00
// NewGetPromptsParamsWithHTTPClient creates a new GetPromptsParams object
2023-06-04 23:54:48 +00:00
// with the ability to set a custom HTTPClient for a request.
2023-06-05 19:44:18 +00:00
func NewGetPromptsParamsWithHTTPClient(client *http.Client) *GetPromptsParams {
return &GetPromptsParams{
2023-06-04 23:54:48 +00:00
HTTPClient: client,
}
}
/*
2023-06-05 19:44:18 +00:00
GetPromptsParams contains all the parameters to send to the API endpoint
2023-06-04 23:54:48 +00:00
2023-06-05 19:44:18 +00:00
for the get prompts operation.
2023-06-04 23:54:48 +00:00
Typically these are written to a http.Request.
*/
2023-06-05 19:44:18 +00:00
type GetPromptsParams struct {
2023-06-04 23:54:48 +00:00
/* ID.
Unique Record ID
*/
ID *string
/* Limit.
How many objects to return at one time
Format: int64
*/
Limit *int64
/* Offset.
How many objects to skip?
Format: int64
*/
Offset *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
2023-06-05 19:44:18 +00:00
// WithDefaults hydrates default values in the get prompts params (not the query body).
2023-06-04 23:54:48 +00:00
//
// All values with no default are reset to their zero value.
2023-06-05 19:44:18 +00:00
func (o *GetPromptsParams) WithDefaults() *GetPromptsParams {
2023-06-04 23:54:48 +00:00
o.SetDefaults()
return o
}
2023-06-05 19:44:18 +00:00
// SetDefaults hydrates default values in the get prompts params (not the query body).
2023-06-04 23:54:48 +00:00
//
// All values with no default are reset to their zero value.
2023-06-05 19:44:18 +00:00
func (o *GetPromptsParams) SetDefaults() {
2023-06-04 23:54:48 +00:00
// no default values defined for this parameter
}
2023-06-05 19:44:18 +00:00
// WithTimeout adds the timeout to the get prompts params
func (o *GetPromptsParams) WithTimeout(timeout time.Duration) *GetPromptsParams {
2023-06-04 23:54:48 +00:00
o.SetTimeout(timeout)
return o
}
2023-06-05 19:44:18 +00:00
// SetTimeout adds the timeout to the get prompts params
func (o *GetPromptsParams) SetTimeout(timeout time.Duration) {
2023-06-04 23:54:48 +00:00
o.timeout = timeout
}
2023-06-05 19:44:18 +00:00
// WithContext adds the context to the get prompts params
func (o *GetPromptsParams) WithContext(ctx context.Context) *GetPromptsParams {
2023-06-04 23:54:48 +00:00
o.SetContext(ctx)
return o
}
2023-06-05 19:44:18 +00:00
// SetContext adds the context to the get prompts params
func (o *GetPromptsParams) SetContext(ctx context.Context) {
2023-06-04 23:54:48 +00:00
o.Context = ctx
}
2023-06-05 19:44:18 +00:00
// WithHTTPClient adds the HTTPClient to the get prompts params
func (o *GetPromptsParams) WithHTTPClient(client *http.Client) *GetPromptsParams {
2023-06-04 23:54:48 +00:00
o.SetHTTPClient(client)
return o
}
2023-06-05 19:44:18 +00:00
// SetHTTPClient adds the HTTPClient to the get prompts params
func (o *GetPromptsParams) SetHTTPClient(client *http.Client) {
2023-06-04 23:54:48 +00:00
o.HTTPClient = client
}
2023-06-05 19:44:18 +00:00
// WithID adds the id to the get prompts params
func (o *GetPromptsParams) WithID(id *string) *GetPromptsParams {
2023-06-04 23:54:48 +00:00
o.SetID(id)
return o
}
2023-06-05 19:44:18 +00:00
// SetID adds the id to the get prompts params
func (o *GetPromptsParams) SetID(id *string) {
2023-06-04 23:54:48 +00:00
o.ID = id
}
2023-06-05 19:44:18 +00:00
// WithLimit adds the limit to the get prompts params
func (o *GetPromptsParams) WithLimit(limit *int64) *GetPromptsParams {
2023-06-04 23:54:48 +00:00
o.SetLimit(limit)
return o
}
2023-06-05 19:44:18 +00:00
// SetLimit adds the limit to the get prompts params
func (o *GetPromptsParams) SetLimit(limit *int64) {
2023-06-04 23:54:48 +00:00
o.Limit = limit
}
2023-06-05 19:44:18 +00:00
// WithOffset adds the offset to the get prompts params
func (o *GetPromptsParams) WithOffset(offset *int64) *GetPromptsParams {
2023-06-04 23:54:48 +00:00
o.SetOffset(offset)
return o
}
2023-06-05 19:44:18 +00:00
// SetOffset adds the offset to the get prompts params
func (o *GetPromptsParams) SetOffset(offset *int64) {
2023-06-04 23:54:48 +00:00
o.Offset = offset
}
// WriteToRequest writes these params to a swagger request
2023-06-05 19:44:18 +00:00
func (o *GetPromptsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
2023-06-04 23:54:48 +00:00
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.ID != nil {
// query param id
var qrID string
if o.ID != nil {
qrID = *o.ID
}
qID := qrID
if qID != "" {
if err := r.SetQueryParam("id", qID); err != nil {
return err
}
}
}
if o.Limit != nil {
// query param limit
var qrLimit int64
if o.Limit != nil {
qrLimit = *o.Limit
}
qLimit := swag.FormatInt64(qrLimit)
if qLimit != "" {
if err := r.SetQueryParam("limit", qLimit); err != nil {
return err
}
}
}
if o.Offset != nil {
// query param offset
var qrOffset int64
if o.Offset != nil {
qrOffset = *o.Offset
}
qOffset := swag.FormatInt64(qrOffset)
if qOffset != "" {
if err := r.SetQueryParam("offset", qOffset); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}