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

package user

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

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

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

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

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

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

	for the user current delete star operation.

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

	/* Owner.

	   owner of the repo to unstar
	*/
	Owner string

	/* Repo.

	   name of the repo to unstar
	*/
	Repo string

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

// WithDefaults hydrates default values in the user current delete star params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UserCurrentDeleteStarParams) WithDefaults() *UserCurrentDeleteStarParams {
	o.SetDefaults()
	return o
}

// SetDefaults hydrates default values in the user current delete star params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UserCurrentDeleteStarParams) SetDefaults() {
	// no default values defined for this parameter
}

// WithTimeout adds the timeout to the user current delete star params
func (o *UserCurrentDeleteStarParams) WithTimeout(timeout time.Duration) *UserCurrentDeleteStarParams {
	o.SetTimeout(timeout)
	return o
}

// SetTimeout adds the timeout to the user current delete star params
func (o *UserCurrentDeleteStarParams) SetTimeout(timeout time.Duration) {
	o.timeout = timeout
}

// WithContext adds the context to the user current delete star params
func (o *UserCurrentDeleteStarParams) WithContext(ctx context.Context) *UserCurrentDeleteStarParams {
	o.SetContext(ctx)
	return o
}

// SetContext adds the context to the user current delete star params
func (o *UserCurrentDeleteStarParams) SetContext(ctx context.Context) {
	o.Context = ctx
}

// WithHTTPClient adds the HTTPClient to the user current delete star params
func (o *UserCurrentDeleteStarParams) WithHTTPClient(client *http.Client) *UserCurrentDeleteStarParams {
	o.SetHTTPClient(client)
	return o
}

// SetHTTPClient adds the HTTPClient to the user current delete star params
func (o *UserCurrentDeleteStarParams) SetHTTPClient(client *http.Client) {
	o.HTTPClient = client
}

// WithOwner adds the owner to the user current delete star params
func (o *UserCurrentDeleteStarParams) WithOwner(owner string) *UserCurrentDeleteStarParams {
	o.SetOwner(owner)
	return o
}

// SetOwner adds the owner to the user current delete star params
func (o *UserCurrentDeleteStarParams) SetOwner(owner string) {
	o.Owner = owner
}

// WithRepo adds the repo to the user current delete star params
func (o *UserCurrentDeleteStarParams) WithRepo(repo string) *UserCurrentDeleteStarParams {
	o.SetRepo(repo)
	return o
}

// SetRepo adds the repo to the user current delete star params
func (o *UserCurrentDeleteStarParams) SetRepo(repo string) {
	o.Repo = repo
}

// WriteToRequest writes these params to a swagger request
func (o *UserCurrentDeleteStarParams) 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
}
