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

package cluster

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

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

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

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

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

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

	for the create aws cmek operation.

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

	// Body.
	Body CreateAwsCmekBody

	/* ProjectID.

	   The ID of the project. You can get the project ID from the response of [List all accessible projects](#tag/Project/operation/ListProjects).

	   Format: uint64
	*/
	ProjectID string

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

// WithDefaults hydrates default values in the create aws cmek params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CreateAwsCmekParams) WithDefaults() *CreateAwsCmekParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the create aws cmek params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *CreateAwsCmekParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the create aws cmek params
func (o *CreateAwsCmekParams) WithTimeout(timeout time.Duration) *CreateAwsCmekParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the create aws cmek params
func (o *CreateAwsCmekParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the create aws cmek params
func (o *CreateAwsCmekParams) WithContext(ctx context.Context) *CreateAwsCmekParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the create aws cmek params
func (o *CreateAwsCmekParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the create aws cmek params
func (o *CreateAwsCmekParams) WithHTTPClient(client *http.Client) *CreateAwsCmekParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the create aws cmek params
func (o *CreateAwsCmekParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithBody adds the body to the create aws cmek params
func (o *CreateAwsCmekParams) WithBody(body CreateAwsCmekBody) *CreateAwsCmekParams {
	o.SetBody(body)
	return o
}

// SetBody adds the body to the create aws cmek params
func (o *CreateAwsCmekParams) SetBody(body CreateAwsCmekBody) {
	o.Body = body
}

// WithProjectID adds the projectID to the create aws cmek params
func (o *CreateAwsCmekParams) WithProjectID(projectID string) *CreateAwsCmekParams {
	o.SetProjectID(projectID)
	return o
}

// SetProjectID adds the projectId to the create aws cmek params
func (o *CreateAwsCmekParams) SetProjectID(projectID string) {
	o.ProjectID = projectID
}

// WriteToRequest writes these params to a swagger request
func (o *CreateAwsCmekParams) 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.Body); err != nil {
		return err
	}

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

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