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

package filters

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

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

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

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

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

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

	for the filter status post operation.

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

	/* ID.

	   ID of the filter to add the filtered status to.
	*/
	ID string

	/* StatusID.

	     The ID of the status to filter.

	Sample: 01HXA2NE0K8T1C70K90E74GYD0
	*/
	StatusID string

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

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

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

// WithTimeout adds the timeout to the filter status post params
func (o *FilterStatusPostParams) WithTimeout(timeout time.Duration) *FilterStatusPostParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the filter status post params
func (o *FilterStatusPostParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the filter status post params
func (o *FilterStatusPostParams) WithContext(ctx context.Context) *FilterStatusPostParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the filter status post params
func (o *FilterStatusPostParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the filter status post params
func (o *FilterStatusPostParams) WithHTTPClient(client *http.Client) *FilterStatusPostParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the filter status post params
func (o *FilterStatusPostParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithID adds the id to the filter status post params
func (o *FilterStatusPostParams) WithID(id string) *FilterStatusPostParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the filter status post params
func (o *FilterStatusPostParams) SetID(id string) {
	o.ID = id
}

// WithStatusID adds the statusID to the filter status post params
func (o *FilterStatusPostParams) WithStatusID(statusID string) *FilterStatusPostParams {
	o.SetStatusID(statusID)
	return o
}

// SetStatusID adds the statusId to the filter status post params
func (o *FilterStatusPostParams) SetStatusID(statusID string) {
	o.StatusID = statusID
}

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

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

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

	// form param status_id
	frStatusID := o.StatusID
	fStatusID := frStatusID
	if fStatusID != "" {
		if err := r.SetFormParam("status_id", fStatusID); err != nil {
			return err
		}
	}

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