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

package organization

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

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

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

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

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

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

	for the delete org secret operation.

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

	/* Org.

	   name of organization
	*/
	Org string

	/* Secretname.

	   name of the secret
	*/
	Secretname string

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

// WithDefaults hydrates default values in the delete org secret params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteOrgSecretParams) WithDefaults() *DeleteOrgSecretParams {
	o.SetDefaults()
	return o
}

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

// WithTimeout adds the timeout to the delete org secret params
func (o *DeleteOrgSecretParams) WithTimeout(timeout time.Duration) *DeleteOrgSecretParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the delete org secret params
func (o *DeleteOrgSecretParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the delete org secret params
func (o *DeleteOrgSecretParams) WithContext(ctx context.Context) *DeleteOrgSecretParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the delete org secret params
func (o *DeleteOrgSecretParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the delete org secret params
func (o *DeleteOrgSecretParams) WithHTTPClient(client *http.Client) *DeleteOrgSecretParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the delete org secret params
func (o *DeleteOrgSecretParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithOrg adds the org to the delete org secret params
func (o *DeleteOrgSecretParams) WithOrg(org string) *DeleteOrgSecretParams {
	o.SetOrg(org)
	return o
}

// SetOrg adds the org to the delete org secret params
func (o *DeleteOrgSecretParams) SetOrg(org string) {
	o.Org = org
}

// WithSecretname adds the secretname to the delete org secret params
func (o *DeleteOrgSecretParams) WithSecretname(secretname string) *DeleteOrgSecretParams {
	o.SetSecretname(secretname)
	return o
}

// SetSecretname adds the secretname to the delete org secret params
func (o *DeleteOrgSecretParams) SetSecretname(secretname string) {
	o.Secretname = secretname
}

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

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

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

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

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