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

package package_appr

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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*DeletePackageParams contains all the parameters to send to the API endpoint
for the delete package operation typically these are written to a http.Request
*/
type DeletePackageParams struct {

	/*MediaType
	  content type

	*/
	MediaType string
	/*Namespace
	  namespace

	*/
	Namespace string
	/*Package
	  package name

	*/
	Package string
	/*Release
	  release name

	*/
	Release string

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

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

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

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

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

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

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

// WithMediaType adds the mediaType to the delete package params
func (o *DeletePackageParams) WithMediaType(mediaType string) *DeletePackageParams {
	o.SetMediaType(mediaType)
	return o
}

// SetMediaType adds the mediaType to the delete package params
func (o *DeletePackageParams) SetMediaType(mediaType string) {
	o.MediaType = mediaType
}

// WithNamespace adds the namespace to the delete package params
func (o *DeletePackageParams) WithNamespace(namespace string) *DeletePackageParams {
	o.SetNamespace(namespace)
	return o
}

// SetNamespace adds the namespace to the delete package params
func (o *DeletePackageParams) SetNamespace(namespace string) {
	o.Namespace = namespace
}

// WithPackage adds the packageVar to the delete package params
func (o *DeletePackageParams) WithPackage(packageVar string) *DeletePackageParams {
	o.SetPackage(packageVar)
	return o
}

// SetPackage adds the package to the delete package params
func (o *DeletePackageParams) SetPackage(packageVar string) {
	o.Package = packageVar
}

// WithRelease adds the release to the delete package params
func (o *DeletePackageParams) WithRelease(release string) *DeletePackageParams {
	o.SetRelease(release)
	return o
}

// SetRelease adds the release to the delete package params
func (o *DeletePackageParams) SetRelease(release string) {
	o.Release = release
}

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

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

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

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

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

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

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