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

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

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

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

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

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

	for the a bit of everything service update v23 operation.

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

	// Body.
	Body *models.ABitOfEverythingServiceUpdateV2Body

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

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

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

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

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

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

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

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

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

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

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

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

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