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

// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package portal_memberships

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

// NewGetTenantMembershipParams creates a new GetTenantMembershipParams 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 NewGetTenantMembershipParams() *GetTenantMembershipParams {
	return NewGetTenantMembershipParamsWithTimeout(cr.DefaultTimeout)
}

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

// NewGetTenantMembershipParamsWithContext creates a new GetTenantMembershipParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [GetTenantMembershipParams].
func NewGetTenantMembershipParamsWithContext(ctx context.Context) *GetTenantMembershipParams {
	return &GetTenantMembershipParams{
		inner: innerParams{
			ctx: ctx,
		},
	}
}

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

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

	for the get tenant membership operation.

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

	// MembershipID.
	//
	// Format: uuid
	MembershipID strfmt.UUID

	HTTPClient *http.Client

	inner innerParams
}

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

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

// WithTimeout adds the timeout to the get tenant membership params.
func (o *GetTenantMembershipParams) WithTimeout(timeout time.Duration) *GetTenantMembershipParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the get tenant membership params.
func (o *GetTenantMembershipParams) SetTimeout(timeout time.Duration) {
	o.inner.timeout = timeout
}

// WithContext adds the context to the get tenant membership params.
//
// Deprecated: use the operation call with context to pass the context instead of [GetTenantMembershipParams].
func (o *GetTenantMembershipParams) WithContext(ctx context.Context) *GetTenantMembershipParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the get tenant membership params.
//
// Deprecated: use the operation call with context to pass the context instead of [GetTenantMembershipParams].
func (o *GetTenantMembershipParams) SetContext(ctx context.Context) {
	o.inner.ctx = ctx
}

// WithHTTPClient adds the HTTPClient to the get tenant membership params.
func (o *GetTenantMembershipParams) WithHTTPClient(client *http.Client) *GetTenantMembershipParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the get tenant membership params.
func (o *GetTenantMembershipParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithMembershipID adds the membershipID to the get tenant membership params.
func (o *GetTenantMembershipParams) WithMembershipID(membershipID strfmt.UUID) *GetTenantMembershipParams {
	o.SetMembershipID(membershipID)
	return o
}

// SetMembershipID adds the membershipId to the get tenant membership params.
func (o *GetTenantMembershipParams) SetMembershipID(membershipID strfmt.UUID) {
	o.MembershipID = membershipID
}

// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *GetTenantMembershipParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
	if err := r.SetTimeout(o.inner.timeout); err != nil {
		return err
	}
	var res []error

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

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