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

package operations

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"net/http"
	"time"

	"golang.org/x/net/context"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	cr "github.com/go-openapi/runtime/client"

	strfmt "github.com/go-openapi/strfmt"
)

// NewPurgeConfigurationParams creates a new PurgeConfigurationParams object
// with the default values initialized.
func NewPurgeConfigurationParams() *PurgeConfigurationParams {
	var ()
	return &PurgeConfigurationParams{

		timeout: cr.DefaultTimeout,
	}
}

// NewPurgeConfigurationParamsWithTimeout creates a new PurgeConfigurationParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewPurgeConfigurationParamsWithTimeout(timeout time.Duration) *PurgeConfigurationParams {
	var ()
	return &PurgeConfigurationParams{

		timeout: timeout,
	}
}

// NewPurgeConfigurationParamsWithContext creates a new PurgeConfigurationParams object
// with the default values initialized, and the ability to set a context for a request
func NewPurgeConfigurationParamsWithContext(ctx context.Context) *PurgeConfigurationParams {
	var ()
	return &PurgeConfigurationParams{

		Context: ctx,
	}
}

// NewPurgeConfigurationParamsWithHTTPClient creates a new PurgeConfigurationParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPurgeConfigurationParamsWithHTTPClient(client *http.Client) *PurgeConfigurationParams {
	var ()
	return &PurgeConfigurationParams{
		HTTPClient: client,
	}
}

/*PurgeConfigurationParams contains all the parameters to send to the API endpoint
for the purge configuration operation typically these are written to a http.Request
*/
type PurgeConfigurationParams struct {

	/*Org*/
	Org string
	/*Space*/
	Space string

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

// WithTimeout adds the timeout to the purge configuration params
func (o *PurgeConfigurationParams) WithTimeout(timeout time.Duration) *PurgeConfigurationParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the purge configuration params
func (o *PurgeConfigurationParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the purge configuration params
func (o *PurgeConfigurationParams) WithContext(ctx context.Context) *PurgeConfigurationParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the purge configuration params
func (o *PurgeConfigurationParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the purge configuration params
func (o *PurgeConfigurationParams) WithHTTPClient(client *http.Client) *PurgeConfigurationParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the purge configuration params
func (o *PurgeConfigurationParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithOrg adds the org to the purge configuration params
func (o *PurgeConfigurationParams) WithOrg(org string) *PurgeConfigurationParams {
	o.SetOrg(org)
	return o
}

// SetOrg adds the org to the purge configuration params
func (o *PurgeConfigurationParams) SetOrg(org string) {
	o.Org = org
}

// WithSpace adds the space to the purge configuration params
func (o *PurgeConfigurationParams) WithSpace(space string) *PurgeConfigurationParams {
	o.SetSpace(space)
	return o
}

// SetSpace adds the space to the purge configuration params
func (o *PurgeConfigurationParams) SetSpace(space string) {
	o.Space = space
}

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

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

	// query param org
	qrOrg := o.Org
	qOrg := qrOrg
	if qOrg != "" {
		if err := r.SetQueryParam("org", qOrg); err != nil {
			return err
		}
	}

	// query param space
	qrSpace := o.Space
	qSpace := qrSpace
	if qSpace != "" {
		if err := r.SetQueryParam("space", qSpace); err != nil {
			return err
		}
	}

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