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

package correlations

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

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

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

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

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

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

	for the delete correlation operation.

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

	// CorrelationUID.
	CorrelationUID string

	// UID.
	UID string

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

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

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

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

// SetTimeout adds the timeout to the delete correlation params
func (o *DeleteCorrelationParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

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

// SetContext adds the context to the delete correlation params
func (o *DeleteCorrelationParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

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

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

// WithCorrelationUID adds the correlationUID to the delete correlation params
func (o *DeleteCorrelationParams) WithCorrelationUID(correlationUID string) *DeleteCorrelationParams {
	o.SetCorrelationUID(correlationUID)
	return o
}

// SetCorrelationUID adds the correlationUid to the delete correlation params
func (o *DeleteCorrelationParams) SetCorrelationUID(correlationUID string) {
	o.CorrelationUID = correlationUID
}

// WithUID adds the uid to the delete correlation params
func (o *DeleteCorrelationParams) WithUID(uid string) *DeleteCorrelationParams {
	o.SetUID(uid)
	return o
}

// SetUID adds the uid to the delete correlation params
func (o *DeleteCorrelationParams) SetUID(uid string) {
	o.UID = uid
}

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

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

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

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

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