// Code generated by go-swagger; DO NOT EDIT.

package waypoint_service

// 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/hashicorp/hcp-sdk-go/clients/cloud-waypoint-service/preview/2023-08-18/models"
)

// NewWaypointServiceQueueAgentOperationParams creates a new WaypointServiceQueueAgentOperationParams 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 NewWaypointServiceQueueAgentOperationParams() *WaypointServiceQueueAgentOperationParams {
	return &WaypointServiceQueueAgentOperationParams{
		timeout: cr.DefaultTimeout,
	}
}

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

// NewWaypointServiceQueueAgentOperationParamsWithContext creates a new WaypointServiceQueueAgentOperationParams object
// with the ability to set a context for a request.
func NewWaypointServiceQueueAgentOperationParamsWithContext(ctx context.Context) *WaypointServiceQueueAgentOperationParams {
	return &WaypointServiceQueueAgentOperationParams{
		Context: ctx,
	}
}

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

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

	for the waypoint service queue agent operation operation.

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

	// Body.
	Body *models.HashicorpCloudWaypointWaypointServiceQueueAgentOperationBody

	// NamespaceID.
	NamespaceID string

	timeout    time.Duration
	Context    context.Context
	HTTPClient *http.Client
}

// WithDefaults hydrates default values in the waypoint service queue agent operation params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WaypointServiceQueueAgentOperationParams) WithDefaults() *WaypointServiceQueueAgentOperationParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the waypoint service queue agent operation params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *WaypointServiceQueueAgentOperationParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) WithTimeout(timeout time.Duration) *WaypointServiceQueueAgentOperationParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) WithContext(ctx context.Context) *WaypointServiceQueueAgentOperationParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) WithHTTPClient(client *http.Client) *WaypointServiceQueueAgentOperationParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) WithBody(body *models.HashicorpCloudWaypointWaypointServiceQueueAgentOperationBody) *WaypointServiceQueueAgentOperationParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) SetBody(body *models.HashicorpCloudWaypointWaypointServiceQueueAgentOperationBody) {
	o.Body = body
}

// WithNamespaceID adds the namespaceID to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) WithNamespaceID(namespaceID string) *WaypointServiceQueueAgentOperationParams {
	o.SetNamespaceID(namespaceID)
	return o
}

// SetNamespaceID adds the namespaceId to the waypoint service queue agent operation params
func (o *WaypointServiceQueueAgentOperationParams) SetNamespaceID(namespaceID string) {
	o.NamespaceID = namespaceID
}

// WriteToRequest writes these params to a swagger request
func (o *WaypointServiceQueueAgentOperationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	if err := r.SetTimeout(o.timeout); err != nil {
		return err
	}
	var res []error
	if o.Body != nil {
		if err := r.SetBodyParam(o.Body); err != nil {
			return err
		}
	}

	// path param namespace.id
	if err := r.SetPathParam("namespace.id", o.NamespaceID); err != nil {
		return err
	}

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