zrok/rest_client_zrok/metadata/get_share_detail_parameters.go

149 lines
4.2 KiB
Go
Raw Normal View History

// Code generated by go-swagger; DO NOT EDIT.
package metadata
// 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"
)
// NewGetShareDetailParams creates a new GetShareDetailParams 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 NewGetShareDetailParams() *GetShareDetailParams {
return &GetShareDetailParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetShareDetailParamsWithTimeout creates a new GetShareDetailParams object
// with the ability to set a timeout on a request.
func NewGetShareDetailParamsWithTimeout(timeout time.Duration) *GetShareDetailParams {
return &GetShareDetailParams{
timeout: timeout,
}
}
// NewGetShareDetailParamsWithContext creates a new GetShareDetailParams object
// with the ability to set a context for a request.
func NewGetShareDetailParamsWithContext(ctx context.Context) *GetShareDetailParams {
return &GetShareDetailParams{
Context: ctx,
}
}
// NewGetShareDetailParamsWithHTTPClient creates a new GetShareDetailParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetShareDetailParamsWithHTTPClient(client *http.Client) *GetShareDetailParams {
return &GetShareDetailParams{
HTTPClient: client,
}
}
/*
GetShareDetailParams contains all the parameters to send to the API endpoint
for the get share detail operation.
Typically these are written to a http.Request.
*/
type GetShareDetailParams struct {
// ShrToken.
ShrToken string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get share detail params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetShareDetailParams) WithDefaults() *GetShareDetailParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get share detail params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetShareDetailParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get share detail params
func (o *GetShareDetailParams) WithTimeout(timeout time.Duration) *GetShareDetailParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get share detail params
func (o *GetShareDetailParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get share detail params
func (o *GetShareDetailParams) WithContext(ctx context.Context) *GetShareDetailParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get share detail params
func (o *GetShareDetailParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get share detail params
func (o *GetShareDetailParams) WithHTTPClient(client *http.Client) *GetShareDetailParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get share detail params
func (o *GetShareDetailParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithShrToken adds the shrToken to the get share detail params
func (o *GetShareDetailParams) WithShrToken(shrToken string) *GetShareDetailParams {
o.SetShrToken(shrToken)
return o
}
// SetShrToken adds the shrToken to the get share detail params
func (o *GetShareDetailParams) SetShrToken(shrToken string) {
o.ShrToken = shrToken
}
// WriteToRequest writes these params to a swagger request
func (o *GetShareDetailParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param shrToken
if err := r.SetPathParam("shrToken", o.ShrToken); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}