// 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 company_product_proposals

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"
)

// NewGetCompanyProductProposalParams creates a new GetCompanyProductProposalParams 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 NewGetCompanyProductProposalParams() *GetCompanyProductProposalParams {
	return NewGetCompanyProductProposalParamsWithTimeout(cr.DefaultTimeout)
}

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

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

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

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

	for the get company product proposal operation.

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

	// CompanyProductProposalID.
	//
	// CompanyProduct proposal record ID
	//
	// Format: uuid
	CompanyProductProposalID strfmt.UUID

	HTTPClient *http.Client

	inner innerParams
}

// WithDefaults hydrates default values in the get company product proposal params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetCompanyProductProposalParams) WithDefaults() *GetCompanyProductProposalParams {
	o.SetDefaults()
	return o
}

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

// WithTimeout adds the timeout to the get company product proposal params.
func (o *GetCompanyProductProposalParams) WithTimeout(timeout time.Duration) *GetCompanyProductProposalParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get company product proposal params.
func (o *GetCompanyProductProposalParams) SetTimeout(timeout time.Duration) {
	o.inner.timeout = timeout
}

// WithContext adds the context to the get company product proposal params.
//
// Deprecated: use the operation call with context to pass the context instead of [GetCompanyProductProposalParams].
func (o *GetCompanyProductProposalParams) WithContext(ctx context.Context) *GetCompanyProductProposalParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get company product proposal params.
//
// Deprecated: use the operation call with context to pass the context instead of [GetCompanyProductProposalParams].
func (o *GetCompanyProductProposalParams) SetContext(ctx context.Context) {
	o.inner.ctx = ctx
}

// WithHTTPClient adds the HTTPClient to the get company product proposal params.
func (o *GetCompanyProductProposalParams) WithHTTPClient(client *http.Client) *GetCompanyProductProposalParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get company product proposal params.
func (o *GetCompanyProductProposalParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithCompanyProductProposalID adds the companyProductProposalID to the get company product proposal params.
func (o *GetCompanyProductProposalParams) WithCompanyProductProposalID(companyProductProposalID strfmt.UUID) *GetCompanyProductProposalParams {
	o.SetCompanyProductProposalID(companyProductProposalID)
	return o
}

// SetCompanyProductProposalID adds the companyProductProposalId to the get company product proposal params.
func (o *GetCompanyProductProposalParams) SetCompanyProductProposalID(companyProductProposalID strfmt.UUID) {
	o.CompanyProductProposalID = companyProductProposalID
}

// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *GetCompanyProductProposalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
	if err := r.SetTimeout(o.inner.timeout); err != nil {
		return err
	}
	var res []error

	// path param companyProductProposalId
	if err := r.SetPathParam("companyProductProposalId", o.CompanyProductProposalID.String()); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
