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

package invitations_service

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

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

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

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

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

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

	for the invitations service get organization name by invitation token operation.

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

	// InvitationToken.
	InvitationToken string

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

// WithDefaults hydrates default values in the invitations service get organization name by invitation token params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) WithDefaults() *InvitationsServiceGetOrganizationNameByInvitationTokenParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the invitations service get organization name by invitation token params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the invitations service get organization name by invitation token params
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) WithTimeout(timeout time.Duration) *InvitationsServiceGetOrganizationNameByInvitationTokenParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the invitations service get organization name by invitation token params
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the invitations service get organization name by invitation token params
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) WithContext(ctx context.Context) *InvitationsServiceGetOrganizationNameByInvitationTokenParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the invitations service get organization name by invitation token params
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the invitations service get organization name by invitation token params
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) WithHTTPClient(client *http.Client) *InvitationsServiceGetOrganizationNameByInvitationTokenParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the invitations service get organization name by invitation token params
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithInvitationToken adds the invitationToken to the invitations service get organization name by invitation token params
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) WithInvitationToken(invitationToken string) *InvitationsServiceGetOrganizationNameByInvitationTokenParams {
	o.SetInvitationToken(invitationToken)
	return o
}

// SetInvitationToken adds the invitationToken to the invitations service get organization name by invitation token params
func (o *InvitationsServiceGetOrganizationNameByInvitationTokenParams) SetInvitationToken(invitationToken string) {
	o.InvitationToken = invitationToken
}

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

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

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

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