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

package sso_settings

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

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

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

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

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

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

	for the get provider settings operation.

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

	// Key.
	Key string

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

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

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

// WithTimeout adds the timeout to the get provider settings params
func (o *GetProviderSettingsParams) WithTimeout(timeout time.Duration) *GetProviderSettingsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get provider settings params
func (o *GetProviderSettingsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get provider settings params
func (o *GetProviderSettingsParams) WithContext(ctx context.Context) *GetProviderSettingsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get provider settings params
func (o *GetProviderSettingsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get provider settings params
func (o *GetProviderSettingsParams) WithHTTPClient(client *http.Client) *GetProviderSettingsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get provider settings params
func (o *GetProviderSettingsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithKey adds the key to the get provider settings params
func (o *GetProviderSettingsParams) WithKey(key string) *GetProviderSettingsParams {
	o.SetKey(key)
	return o
}

// SetKey adds the key to the get provider settings params
func (o *GetProviderSettingsParams) SetKey(key string) {
	o.Key = key
}

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

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

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

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