Cyclops 4 HPC is the purpose built stack to support large HPC centers with resource accounting and billing of cluster as well as cloud resources.
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.
 
 
cyclops-4-hpc/services/cdr/client/trigger_management/exec_transformation_paramet...

211 lines
5.3 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"
"github.com/go-openapi/swag"
)
// NewExecTransformationParams creates a new ExecTransformationParams object
// with the default values initialized.
func NewExecTransformationParams() *ExecTransformationParams {
var ()
return &ExecTransformationParams{
timeout: cr.DefaultTimeout,
}
}
// NewExecTransformationParamsWithTimeout creates a new ExecTransformationParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewExecTransformationParamsWithTimeout(timeout time.Duration) *ExecTransformationParams {
var ()
return &ExecTransformationParams{
timeout: timeout,
}
}
// NewExecTransformationParamsWithContext creates a new ExecTransformationParams object
// with the default values initialized, and the ability to set a context for a request
func NewExecTransformationParamsWithContext(ctx context.Context) *ExecTransformationParams {
var ()
return &ExecTransformationParams{
Context: ctx,
}
}
// NewExecTransformationParamsWithHTTPClient creates a new ExecTransformationParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewExecTransformationParamsWithHTTPClient(client *http.Client) *ExecTransformationParams {
var ()
return &ExecTransformationParams{
HTTPClient: client,
}
}
/*ExecTransformationParams contains all the parameters to send to the API endpoint
for the exec transformation operation typically these are written to a http.Request
*/
type ExecTransformationParams struct {
/*FastMode
Switch for using 15m boundaries instead of 8h
*/
FastMode *bool
/*From
Datetime from which to get the usage report
*/
From *strfmt.DateTime
/*To
Datetime until which to get the usage report
*/
To *strfmt.DateTime
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the exec transformation params
func (o *ExecTransformationParams) WithTimeout(timeout time.Duration) *ExecTransformationParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the exec transformation params
func (o *ExecTransformationParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the exec transformation params
func (o *ExecTransformationParams) WithContext(ctx context.Context) *ExecTransformationParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the exec transformation params
func (o *ExecTransformationParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the exec transformation params
func (o *ExecTransformationParams) WithHTTPClient(client *http.Client) *ExecTransformationParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the exec transformation params
func (o *ExecTransformationParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithFastMode adds the fastMode to the exec transformation params
func (o *ExecTransformationParams) WithFastMode(fastMode *bool) *ExecTransformationParams {
o.SetFastMode(fastMode)
return o
}
// SetFastMode adds the fastMode to the exec transformation params
func (o *ExecTransformationParams) SetFastMode(fastMode *bool) {
o.FastMode = fastMode
}
// WithFrom adds the from to the exec transformation params
func (o *ExecTransformationParams) WithFrom(from *strfmt.DateTime) *ExecTransformationParams {
o.SetFrom(from)
return o
}
// SetFrom adds the from to the exec transformation params
func (o *ExecTransformationParams) SetFrom(from *strfmt.DateTime) {
o.From = from
}
// WithTo adds the to to the exec transformation params
func (o *ExecTransformationParams) WithTo(to *strfmt.DateTime) *ExecTransformationParams {
o.SetTo(to)
return o
}
// SetTo adds the to to the exec transformation params
func (o *ExecTransformationParams) SetTo(to *strfmt.DateTime) {
o.To = to
}
// WriteToRequest writes these params to a swagger request
func (o *ExecTransformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.FastMode != nil {
// query param fast_mode
var qrFastMode bool
if o.FastMode != nil {
qrFastMode = *o.FastMode
}
qFastMode := swag.FormatBool(qrFastMode)
if qFastMode != "" {
if err := r.SetQueryParam("fast_mode", qFastMode); err != nil {
return err
}
}
}
if o.From != nil {
// query param from
var qrFrom strfmt.DateTime
if o.From != nil {
qrFrom = *o.From
}
qFrom := qrFrom.String()
if qFrom != "" {
if err := r.SetQueryParam("from", qFrom); err != nil {
return err
}
}
}
if o.To != nil {
// query param to
var qrTo strfmt.DateTime
if o.To != nil {
qrTo = *o.To
}
qTo := qrTo.String()
if qTo != "" {
if err := r.SetQueryParam("to", qTo); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}