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

package p_cloud_s_a_p

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

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

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

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

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

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

	for the pcloud sap get operation.

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

	/* CloudInstanceID.

	   Cloud Instance ID of a PCloud Instance
	*/
	CloudInstanceID string

	/* SapProfileID.

	   SAP Profile ID
	*/
	SapProfileID string

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

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

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

// WithTimeout adds the timeout to the pcloud sap get params
func (o *PcloudSapGetParams) WithTimeout(timeout time.Duration) *PcloudSapGetParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the pcloud sap get params
func (o *PcloudSapGetParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the pcloud sap get params
func (o *PcloudSapGetParams) WithContext(ctx context.Context) *PcloudSapGetParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the pcloud sap get params
func (o *PcloudSapGetParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the pcloud sap get params
func (o *PcloudSapGetParams) WithHTTPClient(client *http.Client) *PcloudSapGetParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the pcloud sap get params
func (o *PcloudSapGetParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithCloudInstanceID adds the cloudInstanceID to the pcloud sap get params
func (o *PcloudSapGetParams) WithCloudInstanceID(cloudInstanceID string) *PcloudSapGetParams {
	o.SetCloudInstanceID(cloudInstanceID)
	return o
}

// SetCloudInstanceID adds the cloudInstanceId to the pcloud sap get params
func (o *PcloudSapGetParams) SetCloudInstanceID(cloudInstanceID string) {
	o.CloudInstanceID = cloudInstanceID
}

// WithSapProfileID adds the sapProfileID to the pcloud sap get params
func (o *PcloudSapGetParams) WithSapProfileID(sapProfileID string) *PcloudSapGetParams {
	o.SetSapProfileID(sapProfileID)
	return o
}

// SetSapProfileID adds the sapProfileId to the pcloud sap get params
func (o *PcloudSapGetParams) SetSapProfileID(sapProfileID string) {
	o.SapProfileID = sapProfileID
}

// WriteToRequest writes these params to a swagger request
func (o *PcloudSapGetParams) 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 sap_profile_id
	if err := r.SetPathParam("sap_profile_id", o.SapProfileID); err != nil {
		return err
	}

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