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

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

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

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

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

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

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

	for the groups service count organization groups operation.

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

	/* ParentResourceName.

	     parent_resource is the parent resource of the group.
	organization/<org_id>
	*/
	ParentResourceName string

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

// WithDefaults hydrates default values in the groups service count organization groups params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GroupsServiceCountOrganizationGroupsParams) WithDefaults() *GroupsServiceCountOrganizationGroupsParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the groups service count organization groups params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GroupsServiceCountOrganizationGroupsParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the groups service count organization groups params
func (o *GroupsServiceCountOrganizationGroupsParams) WithTimeout(timeout time.Duration) *GroupsServiceCountOrganizationGroupsParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the groups service count organization groups params
func (o *GroupsServiceCountOrganizationGroupsParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the groups service count organization groups params
func (o *GroupsServiceCountOrganizationGroupsParams) WithContext(ctx context.Context) *GroupsServiceCountOrganizationGroupsParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the groups service count organization groups params
func (o *GroupsServiceCountOrganizationGroupsParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the groups service count organization groups params
func (o *GroupsServiceCountOrganizationGroupsParams) WithHTTPClient(client *http.Client) *GroupsServiceCountOrganizationGroupsParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the groups service count organization groups params
func (o *GroupsServiceCountOrganizationGroupsParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithParentResourceName adds the parentResourceName to the groups service count organization groups params
func (o *GroupsServiceCountOrganizationGroupsParams) WithParentResourceName(parentResourceName string) *GroupsServiceCountOrganizationGroupsParams {
	o.SetParentResourceName(parentResourceName)
	return o
}

// SetParentResourceName adds the parentResourceName to the groups service count organization groups params
func (o *GroupsServiceCountOrganizationGroupsParams) SetParentResourceName(parentResourceName string) {
	o.ParentResourceName = parentResourceName
}

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

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

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

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