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

	"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/abe/models"
)

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

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

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

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

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

	for the a bit of everything service update operation.

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

	// Body.
	Body *models.ExamplepbABitOfEverythingServiceUpdateBody

	// 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 params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ABitOfEverythingServiceUpdateParams) WithDefaults() *ABitOfEverythingServiceUpdateParams {
	o.SetDefaults()
	return o
}

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

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

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

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

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

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

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

// WithBody adds the body to the a bit of everything service update params
func (o *ABitOfEverythingServiceUpdateParams) WithBody(body *models.ExamplepbABitOfEverythingServiceUpdateBody) *ABitOfEverythingServiceUpdateParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the a bit of everything service update params
func (o *ABitOfEverythingServiceUpdateParams) SetBody(body *models.ExamplepbABitOfEverythingServiceUpdateBody) {
	o.Body = body
}

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

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

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

	if err := r.SetTimeout(o.timeout); err != nil {
		return err
	}
	var res []error
	if o.Body != nil {
		if err := r.SetBodyParam(o.Body); 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
}
