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

package p_cloud_volumes

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

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

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

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

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

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

	for the pcloud pvminstances volumes post operation.

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

	/* CloudInstanceID.

	   Cloud Instance ID of a PCloud Instance
	*/
	CloudInstanceID string

	/* PvmInstanceID.

	   PCloud PVM Instance ID
	*/
	PvmInstanceID string

	/* VolumeID.

	   Volume ID
	*/
	VolumeID string

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

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

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

// WithTimeout adds the timeout to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) WithTimeout(timeout time.Duration) *PcloudPvminstancesVolumesPostParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) WithContext(ctx context.Context) *PcloudPvminstancesVolumesPostParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) WithHTTPClient(client *http.Client) *PcloudPvminstancesVolumesPostParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithCloudInstanceID adds the cloudInstanceID to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPvminstancesVolumesPostParams {
	o.SetCloudInstanceID(cloudInstanceID)
	return o
}

// SetCloudInstanceID adds the cloudInstanceId to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) SetCloudInstanceID(cloudInstanceID string) {
	o.CloudInstanceID = cloudInstanceID
}

// WithPvmInstanceID adds the pvmInstanceID to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) WithPvmInstanceID(pvmInstanceID string) *PcloudPvminstancesVolumesPostParams {
	o.SetPvmInstanceID(pvmInstanceID)
	return o
}

// SetPvmInstanceID adds the pvmInstanceId to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) SetPvmInstanceID(pvmInstanceID string) {
	o.PvmInstanceID = pvmInstanceID
}

// WithVolumeID adds the volumeID to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) WithVolumeID(volumeID string) *PcloudPvminstancesVolumesPostParams {
	o.SetVolumeID(volumeID)
	return o
}

// SetVolumeID adds the volumeId to the pcloud pvminstances volumes post params
func (o *PcloudPvminstancesVolumesPostParams) SetVolumeID(volumeID string) {
	o.VolumeID = volumeID
}

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

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

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

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

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

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