// 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/sfgate/sfgate_models"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	cr "github.com/go-openapi/runtime/client"
	"github.com/go-openapi/strfmt"
)

// NewPostPromptsParams creates a new PostPromptsParams 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 NewPostPromptsParams() *PostPromptsParams {
	return NewPostPromptsParamsWithTimeout(cr.DefaultTimeout)
}

// NewPostPromptsParamsWithTimeout creates a new PostPromptsParams object
// with the ability to set a timeout on a request.
func NewPostPromptsParamsWithTimeout(timeout time.Duration) *PostPromptsParams {
	return &PostPromptsParams{
		inner: innerParams{
			timeout: timeout,
		},
	}
}

// NewPostPromptsParamsWithContext creates a new PostPromptsParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [PostPromptsParams].
func NewPostPromptsParamsWithContext(ctx context.Context) *PostPromptsParams {
	return &PostPromptsParams{
		inner: innerParams{
			ctx: ctx,
		},
	}
}

// NewPostPromptsParamsWithHTTPClient creates a new PostPromptsParams object
// with the ability to set a custom HTTPClient for a request.
func NewPostPromptsParamsWithHTTPClient(client *http.Client) *PostPromptsParams {
	return &PostPromptsParams{
		HTTPClient: client,
	}
}

/*
PostPromptsParams contains all the parameters to send to the API endpoint

	for the post prompts operation.

	Typically these are written to a http.Request.
*/
type PostPromptsParams struct {

	// PromptRequest.
	//
	// An array of new Prompt records
	PromptRequest *sfgate_models.PromptRequest

	HTTPClient *http.Client

	inner innerParams
}

// WithDefaults hydrates default values in the post prompts params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostPromptsParams) WithDefaults() *PostPromptsParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the post prompts params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostPromptsParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the post prompts params.
func (o *PostPromptsParams) WithTimeout(timeout time.Duration) *PostPromptsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the post prompts params.
func (o *PostPromptsParams) SetTimeout(timeout time.Duration) {
	o.inner.timeout = timeout
}

// WithContext adds the context to the post prompts params.
//
// Deprecated: use the operation call with context to pass the context instead of [PostPromptsParams].
func (o *PostPromptsParams) WithContext(ctx context.Context) *PostPromptsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the post prompts params.
//
// Deprecated: use the operation call with context to pass the context instead of [PostPromptsParams].
func (o *PostPromptsParams) SetContext(ctx context.Context) {
	o.inner.ctx = ctx
}

// WithHTTPClient adds the HTTPClient to the post prompts params.
func (o *PostPromptsParams) WithHTTPClient(client *http.Client) *PostPromptsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the post prompts params.
func (o *PostPromptsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithPromptRequest adds the promptRequest to the post prompts params.
func (o *PostPromptsParams) WithPromptRequest(promptRequest *sfgate_models.PromptRequest) *PostPromptsParams {
	o.SetPromptRequest(promptRequest)
	return o
}

// SetPromptRequest adds the promptRequest to the post prompts params.
func (o *PostPromptsParams) SetPromptRequest(promptRequest *sfgate_models.PromptRequest) {
	o.PromptRequest = promptRequest
}

// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *PostPromptsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
	if err := r.SetTimeout(o.inner.timeout); err != nil {
		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
}
