You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
3.0 KiB
112 lines
3.0 KiB
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package trigger_management
|
|
|
|
// 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"
|
|
)
|
|
|
|
// NewExecSampleParams creates a new ExecSampleParams object
|
|
// with the default values initialized.
|
|
func NewExecSampleParams() *ExecSampleParams {
|
|
|
|
return &ExecSampleParams{
|
|
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewExecSampleParamsWithTimeout creates a new ExecSampleParams object
|
|
// with the default values initialized, and the ability to set a timeout on a request
|
|
func NewExecSampleParamsWithTimeout(timeout time.Duration) *ExecSampleParams {
|
|
|
|
return &ExecSampleParams{
|
|
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewExecSampleParamsWithContext creates a new ExecSampleParams object
|
|
// with the default values initialized, and the ability to set a context for a request
|
|
func NewExecSampleParamsWithContext(ctx context.Context) *ExecSampleParams {
|
|
|
|
return &ExecSampleParams{
|
|
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewExecSampleParamsWithHTTPClient creates a new ExecSampleParams object
|
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
func NewExecSampleParamsWithHTTPClient(client *http.Client) *ExecSampleParams {
|
|
|
|
return &ExecSampleParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*ExecSampleParams contains all the parameters to send to the API endpoint
|
|
for the exec sample operation typically these are written to a http.Request
|
|
*/
|
|
type ExecSampleParams struct {
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the exec sample params
|
|
func (o *ExecSampleParams) WithTimeout(timeout time.Duration) *ExecSampleParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the exec sample params
|
|
func (o *ExecSampleParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the exec sample params
|
|
func (o *ExecSampleParams) WithContext(ctx context.Context) *ExecSampleParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the exec sample params
|
|
func (o *ExecSampleParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the exec sample params
|
|
func (o *ExecSampleParams) WithHTTPClient(client *http.Client) *ExecSampleParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the exec sample params
|
|
func (o *ExecSampleParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *ExecSampleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|