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

package legacy_alerts_notification_channels

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

	"github.com/grafana/grafana-openapi-client-go/models"
)

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

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

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

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

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

	for the update alert notification channel by UID operation.

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

	// Body.
	Body *models.UpdateAlertNotificationWithUIDCommand

	// NotificationChannelUID.
	NotificationChannelUID string

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

// WithDefaults hydrates default values in the update alert notification channel by UID params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UpdateAlertNotificationChannelByUIDParams) WithDefaults() *UpdateAlertNotificationChannelByUIDParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the update alert notification channel by UID params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UpdateAlertNotificationChannelByUIDParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) WithTimeout(timeout time.Duration) *UpdateAlertNotificationChannelByUIDParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) WithContext(ctx context.Context) *UpdateAlertNotificationChannelByUIDParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) WithHTTPClient(client *http.Client) *UpdateAlertNotificationChannelByUIDParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) WithBody(body *models.UpdateAlertNotificationWithUIDCommand) *UpdateAlertNotificationChannelByUIDParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) SetBody(body *models.UpdateAlertNotificationWithUIDCommand) {
	o.Body = body
}

// WithNotificationChannelUID adds the notificationChannelUID to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) WithNotificationChannelUID(notificationChannelUID string) *UpdateAlertNotificationChannelByUIDParams {
	o.SetNotificationChannelUID(notificationChannelUID)
	return o
}

// SetNotificationChannelUID adds the notificationChannelUid to the update alert notification channel by UID params
func (o *UpdateAlertNotificationChannelByUIDParams) SetNotificationChannelUID(notificationChannelUID string) {
	o.NotificationChannelUID = notificationChannelUID
}

// WriteToRequest writes these params to a swagger request
func (o *UpdateAlertNotificationChannelByUIDParams) 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 notification_channel_uid
	if err := r.SetPathParam("notification_channel_uid", o.NotificationChannelUID); err != nil {
		return err
	}

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