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

	"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	cr "github.com/go-openapi/runtime/client"
	"github.com/go-openapi/strfmt"
)

// NewReviewCompanyProductProposalParams creates a new ReviewCompanyProductProposalParams 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 NewReviewCompanyProductProposalParams() *ReviewCompanyProductProposalParams {
	return NewReviewCompanyProductProposalParamsWithTimeout(cr.DefaultTimeout)
}

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

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

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

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

	for the review company product proposal operation.

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

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

	// CompanyProductProposalReviewRequest.
	//
	// Complete field-level review request
	CompanyProductProposalReviewRequest *research_models.CompanyProductProposalReviewRequest

	HTTPClient *http.Client

	inner innerParams
}

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

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

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

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

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

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

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

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

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

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

// WithCompanyProductProposalReviewRequest adds the companyProductProposalReviewRequest to the review company product proposal params.
func (o *ReviewCompanyProductProposalParams) WithCompanyProductProposalReviewRequest(companyProductProposalReviewRequest *research_models.CompanyProductProposalReviewRequest) *ReviewCompanyProductProposalParams {
	o.SetCompanyProductProposalReviewRequest(companyProductProposalReviewRequest)
	return o
}

// SetCompanyProductProposalReviewRequest adds the companyProductProposalReviewRequest to the review company product proposal params.
func (o *ReviewCompanyProductProposalParams) SetCompanyProductProposalReviewRequest(companyProductProposalReviewRequest *research_models.CompanyProductProposalReviewRequest) {
	o.CompanyProductProposalReviewRequest = companyProductProposalReviewRequest
}

// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *ReviewCompanyProductProposalParams) 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 o.CompanyProductProposalReviewRequest != nil {
		if err := r.SetBodyParam(o.CompanyProductProposalReviewRequest); err != nil {
			return err
		}
	}

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