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

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

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

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

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

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

	for the post supplier activate email operation.

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

	/* Email.

	   Supplier email address
	*/
	Email string

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

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

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

// WithTimeout adds the timeout to the post supplier activate email params
func (o *PostSupplierActivateEmailParams) WithTimeout(timeout time.Duration) *PostSupplierActivateEmailParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the post supplier activate email params
func (o *PostSupplierActivateEmailParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the post supplier activate email params
func (o *PostSupplierActivateEmailParams) WithContext(ctx context.Context) *PostSupplierActivateEmailParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the post supplier activate email params
func (o *PostSupplierActivateEmailParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the post supplier activate email params
func (o *PostSupplierActivateEmailParams) WithHTTPClient(client *http.Client) *PostSupplierActivateEmailParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the post supplier activate email params
func (o *PostSupplierActivateEmailParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithEmail adds the email to the post supplier activate email params
func (o *PostSupplierActivateEmailParams) WithEmail(email string) *PostSupplierActivateEmailParams {
	o.SetEmail(email)
	return o
}

// SetEmail adds the email to the post supplier activate email params
func (o *PostSupplierActivateEmailParams) SetEmail(email string) {
	o.Email = email
}

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

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

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

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