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

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

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

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

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

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

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

	for the service principals service get project service principal operation.

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

	/* OrganizationID.

	     organization_id is the unique identifier (UUID) of the organization that
	owns the requested service principal or project.
	*/
	OrganizationID string

	/* PrincipalID.

	   principal_id is the ID of the service principal being requested.
	*/
	PrincipalID string

	/* ProjectID.

	     project_id is the unique identifier (UUID) of the project that
	under which the service principal should be created.
	*/
	ProjectID string

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

// WithDefaults hydrates default values in the service principals service get project service principal params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) WithDefaults() *ServicePrincipalsServiceGetProjectServicePrincipalParams {
	o.SetDefaults()
	return o
}

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

// WithTimeout adds the timeout to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) WithTimeout(timeout time.Duration) *ServicePrincipalsServiceGetProjectServicePrincipalParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) WithContext(ctx context.Context) *ServicePrincipalsServiceGetProjectServicePrincipalParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) WithHTTPClient(client *http.Client) *ServicePrincipalsServiceGetProjectServicePrincipalParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithOrganizationID adds the organizationID to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) WithOrganizationID(organizationID string) *ServicePrincipalsServiceGetProjectServicePrincipalParams {
	o.SetOrganizationID(organizationID)
	return o
}

// SetOrganizationID adds the organizationId to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) SetOrganizationID(organizationID string) {
	o.OrganizationID = organizationID
}

// WithPrincipalID adds the principalID to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) WithPrincipalID(principalID string) *ServicePrincipalsServiceGetProjectServicePrincipalParams {
	o.SetPrincipalID(principalID)
	return o
}

// SetPrincipalID adds the principalId to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) SetPrincipalID(principalID string) {
	o.PrincipalID = principalID
}

// WithProjectID adds the projectID to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) WithProjectID(projectID string) *ServicePrincipalsServiceGetProjectServicePrincipalParams {
	o.SetProjectID(projectID)
	return o
}

// SetProjectID adds the projectId to the service principals service get project service principal params
func (o *ServicePrincipalsServiceGetProjectServicePrincipalParams) SetProjectID(projectID string) {
	o.ProjectID = projectID
}

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

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

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

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

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

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