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

package organizations

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

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

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

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

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

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

	for the uninstall org webhook operation.

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

	/* OrgID.

	   Organization ID.
	*/
	OrgID string

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

// WithDefaults hydrates default values in the uninstall org webhook params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UninstallOrgWebhookParams) WithDefaults() *UninstallOrgWebhookParams {
	o.SetDefaults()
	return o
}

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

// WithTimeout adds the timeout to the uninstall org webhook params
func (o *UninstallOrgWebhookParams) WithTimeout(timeout time.Duration) *UninstallOrgWebhookParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the uninstall org webhook params
func (o *UninstallOrgWebhookParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the uninstall org webhook params
func (o *UninstallOrgWebhookParams) WithContext(ctx context.Context) *UninstallOrgWebhookParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the uninstall org webhook params
func (o *UninstallOrgWebhookParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the uninstall org webhook params
func (o *UninstallOrgWebhookParams) WithHTTPClient(client *http.Client) *UninstallOrgWebhookParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the uninstall org webhook params
func (o *UninstallOrgWebhookParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithOrgID adds the orgID to the uninstall org webhook params
func (o *UninstallOrgWebhookParams) WithOrgID(orgID string) *UninstallOrgWebhookParams {
	o.SetOrgID(orgID)
	return o
}

// SetOrgID adds the orgId to the uninstall org webhook params
func (o *UninstallOrgWebhookParams) SetOrgID(orgID string) {
	o.OrgID = orgID
}

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

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

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

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