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

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

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

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

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

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

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

	for the s s o management service update s s o configuration operation.

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

	// Body.
	Body SSOManagementServiceUpdateSSOConfigurationBody

	/* OrganizationID.

	   OrganizationId is the identifier of the organization.
	*/
	OrganizationID string

	/* Type.

	     type is the type of Single Sign-On we are updating. This is only used for
	the RESTFul Gateway parameter. It must match the type in the config
	field. This is used due to a bug in the grpc-gateway generator that
	erases the field value if a field is used as a parameter. So we need to
	use this one instead of config.type.
	*/
	Type string

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

// WithDefaults hydrates default values in the s s o management service update s s o configuration params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SSOManagementServiceUpdateSSOConfigurationParams) WithDefaults() *SSOManagementServiceUpdateSSOConfigurationParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the s s o management service update s s o configuration params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *SSOManagementServiceUpdateSSOConfigurationParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) WithTimeout(timeout time.Duration) *SSOManagementServiceUpdateSSOConfigurationParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) WithContext(ctx context.Context) *SSOManagementServiceUpdateSSOConfigurationParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) WithHTTPClient(client *http.Client) *SSOManagementServiceUpdateSSOConfigurationParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) WithBody(body SSOManagementServiceUpdateSSOConfigurationBody) *SSOManagementServiceUpdateSSOConfigurationParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) SetBody(body SSOManagementServiceUpdateSSOConfigurationBody) {
	o.Body = body
}

// WithOrganizationID adds the organizationID to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) WithOrganizationID(organizationID string) *SSOManagementServiceUpdateSSOConfigurationParams {
	o.SetOrganizationID(organizationID)
	return o
}

// SetOrganizationID adds the organizationId to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) SetOrganizationID(organizationID string) {
	o.OrganizationID = organizationID
}

// WithType adds the typeVar to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) WithType(typeVar string) *SSOManagementServiceUpdateSSOConfigurationParams {
	o.SetType(typeVar)
	return o
}

// SetType adds the type to the s s o management service update s s o configuration params
func (o *SSOManagementServiceUpdateSSOConfigurationParams) SetType(typeVar string) {
	o.Type = typeVar
}

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

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

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

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

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