All checks were successful
continuous-integration/drone/push Build is passing
152 lines
3.9 KiB
Go
152 lines
3.9 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package statuses
|
|
|
|
// 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"
|
|
)
|
|
|
|
// NewStatusMuteParams creates a new StatusMuteParams 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 NewStatusMuteParams() *StatusMuteParams {
|
|
return &StatusMuteParams{
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewStatusMuteParamsWithTimeout creates a new StatusMuteParams object
|
|
// with the ability to set a timeout on a request.
|
|
func NewStatusMuteParamsWithTimeout(timeout time.Duration) *StatusMuteParams {
|
|
return &StatusMuteParams{
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewStatusMuteParamsWithContext creates a new StatusMuteParams object
|
|
// with the ability to set a context for a request.
|
|
func NewStatusMuteParamsWithContext(ctx context.Context) *StatusMuteParams {
|
|
return &StatusMuteParams{
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewStatusMuteParamsWithHTTPClient creates a new StatusMuteParams object
|
|
// with the ability to set a custom HTTPClient for a request.
|
|
func NewStatusMuteParamsWithHTTPClient(client *http.Client) *StatusMuteParams {
|
|
return &StatusMuteParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*
|
|
StatusMuteParams contains all the parameters to send to the API endpoint
|
|
|
|
for the status mute operation.
|
|
|
|
Typically these are written to a http.Request.
|
|
*/
|
|
type StatusMuteParams struct {
|
|
|
|
/* ID.
|
|
|
|
Target status ID.
|
|
*/
|
|
ID string
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithDefaults hydrates default values in the status mute params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *StatusMuteParams) WithDefaults() *StatusMuteParams {
|
|
o.SetDefaults()
|
|
return o
|
|
}
|
|
|
|
// SetDefaults hydrates default values in the status mute params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *StatusMuteParams) SetDefaults() {
|
|
// no default values defined for this parameter
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the status mute params
|
|
func (o *StatusMuteParams) WithTimeout(timeout time.Duration) *StatusMuteParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the status mute params
|
|
func (o *StatusMuteParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the status mute params
|
|
func (o *StatusMuteParams) WithContext(ctx context.Context) *StatusMuteParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the status mute params
|
|
func (o *StatusMuteParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the status mute params
|
|
func (o *StatusMuteParams) WithHTTPClient(client *http.Client) *StatusMuteParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the status mute params
|
|
func (o *StatusMuteParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithID adds the id to the status mute params
|
|
func (o *StatusMuteParams) WithID(id string) *StatusMuteParams {
|
|
o.SetID(id)
|
|
return o
|
|
}
|
|
|
|
// SetID adds the id to the status mute params
|
|
func (o *StatusMuteParams) SetID(id string) {
|
|
o.ID = id
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *StatusMuteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
// path param id
|
|
if err := r.SetPathParam("id", o.ID); err != nil {
|
|
return err
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|