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

package experiment_service

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

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

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

		timeout: cr.DefaultTimeout,
	}
}

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

		timeout: timeout,
	}
}

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

		Context: ctx,
	}
}

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

/*UnarchiveExperimentParams contains all the parameters to send to the API endpoint
for the unarchive experiment operation typically these are written to a http.Request
*/
type UnarchiveExperimentParams struct {

	/*ID
	  The ID of the experiment to be restored.

	*/
	ID string

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

// WithTimeout adds the timeout to the unarchive experiment params
func (o *UnarchiveExperimentParams) WithTimeout(timeout time.Duration) *UnarchiveExperimentParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the unarchive experiment params
func (o *UnarchiveExperimentParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the unarchive experiment params
func (o *UnarchiveExperimentParams) WithContext(ctx context.Context) *UnarchiveExperimentParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the unarchive experiment params
func (o *UnarchiveExperimentParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the unarchive experiment params
func (o *UnarchiveExperimentParams) WithHTTPClient(client *http.Client) *UnarchiveExperimentParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the unarchive experiment params
func (o *UnarchiveExperimentParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithID adds the id to the unarchive experiment params
func (o *UnarchiveExperimentParams) WithID(id string) *UnarchiveExperimentParams {
	o.SetID(id)
	return o
}

// SetID adds the id to the unarchive experiment params
func (o *UnarchiveExperimentParams) SetID(id string) {
	o.ID = id
}

// WriteToRequest writes these params to a swagger request
func (o *UnarchiveExperimentParams) 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
	}

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