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

package a_bit_of_everything

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

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

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

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

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

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

	for the a bit of everything service update v22 operation.

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

	/* Abe.

	     A bit of everything

	Intentionally complicated message type to cover many features of Protobuf.
	*/
	Abe ABitOfEverythingServiceUpdateV22Body

	// UUIDName.
	//
	// Format: uuid
	UUIDName strfmt.UUID

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

// WithDefaults hydrates default values in the a bit of everything service update v22 params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ABitOfEverythingServiceUpdateV22Params) WithDefaults() *ABitOfEverythingServiceUpdateV22Params {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the a bit of everything service update v22 params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ABitOfEverythingServiceUpdateV22Params) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) WithTimeout(timeout time.Duration) *ABitOfEverythingServiceUpdateV22Params {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) WithContext(ctx context.Context) *ABitOfEverythingServiceUpdateV22Params {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) WithHTTPClient(client *http.Client) *ABitOfEverythingServiceUpdateV22Params {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithAbe adds the abe to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) WithAbe(abe ABitOfEverythingServiceUpdateV22Body) *ABitOfEverythingServiceUpdateV22Params {
	o.SetAbe(abe)
	return o
}

// SetAbe adds the abe to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) SetAbe(abe ABitOfEverythingServiceUpdateV22Body) {
	o.Abe = abe
}

// WithUUIDName adds the uuidName to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) WithUUIDName(uuidName strfmt.UUID) *ABitOfEverythingServiceUpdateV22Params {
	o.SetUUIDName(uuidName)
	return o
}

// SetUUIDName adds the uuidName to the a bit of everything service update v22 params
func (o *ABitOfEverythingServiceUpdateV22Params) SetUUIDName(uuidName strfmt.UUID) {
	o.UUIDName = uuidName
}

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

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

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

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