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

package repository

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

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

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

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

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

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

	for the repo validate issue config operation.

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

	/* Owner.

	   owner of the repo
	*/
	Owner string

	/* Repo.

	   name of the repo
	*/
	Repo string

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

// WithDefaults hydrates default values in the repo validate issue config params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *RepoValidateIssueConfigParams) WithDefaults() *RepoValidateIssueConfigParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the repo validate issue config params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *RepoValidateIssueConfigParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) WithTimeout(timeout time.Duration) *RepoValidateIssueConfigParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) WithContext(ctx context.Context) *RepoValidateIssueConfigParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) WithHTTPClient(client *http.Client) *RepoValidateIssueConfigParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithOwner adds the owner to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) WithOwner(owner string) *RepoValidateIssueConfigParams {
	o.SetOwner(owner)
	return o
}

// SetOwner adds the owner to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) SetOwner(owner string) {
	o.Owner = owner
}

// WithRepo adds the repo to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) WithRepo(repo string) *RepoValidateIssueConfigParams {
	o.SetRepo(repo)
	return o
}

// SetRepo adds the repo to the repo validate issue config params
func (o *RepoValidateIssueConfigParams) SetRepo(repo string) {
	o.Repo = repo
}

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

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

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

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

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