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

package installer

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

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

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

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

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

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

	for the get supported architectures operation.

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

	/* OpenshiftVersion.

	   Version of the OpenShift cluster.
	*/
	OpenshiftVersion string

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

// WithDefaults hydrates default values in the get supported architectures params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetSupportedArchitecturesParams) WithDefaults() *GetSupportedArchitecturesParams {
	o.SetDefaults()
	return o
}

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

// WithTimeout adds the timeout to the get supported architectures params
func (o *GetSupportedArchitecturesParams) WithTimeout(timeout time.Duration) *GetSupportedArchitecturesParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get supported architectures params
func (o *GetSupportedArchitecturesParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the get supported architectures params
func (o *GetSupportedArchitecturesParams) WithContext(ctx context.Context) *GetSupportedArchitecturesParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get supported architectures params
func (o *GetSupportedArchitecturesParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the get supported architectures params
func (o *GetSupportedArchitecturesParams) WithHTTPClient(client *http.Client) *GetSupportedArchitecturesParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get supported architectures params
func (o *GetSupportedArchitecturesParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithOpenshiftVersion adds the openshiftVersion to the get supported architectures params
func (o *GetSupportedArchitecturesParams) WithOpenshiftVersion(openshiftVersion string) *GetSupportedArchitecturesParams {
	o.SetOpenshiftVersion(openshiftVersion)
	return o
}

// SetOpenshiftVersion adds the openshiftVersion to the get supported architectures params
func (o *GetSupportedArchitecturesParams) SetOpenshiftVersion(openshiftVersion string) {
	o.OpenshiftVersion = openshiftVersion
}

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

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

	// query param openshift_version
	qrOpenshiftVersion := o.OpenshiftVersion
	qOpenshiftVersion := qrOpenshiftVersion
	if qOpenshiftVersion != "" {

		if err := r.SetQueryParam("openshift_version", qOpenshiftVersion); err != nil {
			return err
		}
	}

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