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.
cyclops-4-hpc/services/credit-system/client/account_management/enable_account_parameters.go

136 lines
3.5 KiB

// Code generated by go-swagger; DO NOT EDIT.
package account_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"
)
// NewEnableAccountParams creates a new EnableAccountParams object
// with the default values initialized.
func NewEnableAccountParams() *EnableAccountParams {
var ()
return &EnableAccountParams{
timeout: cr.DefaultTimeout,
}
}
// NewEnableAccountParamsWithTimeout creates a new EnableAccountParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewEnableAccountParamsWithTimeout(timeout time.Duration) *EnableAccountParams {
var ()
return &EnableAccountParams{
timeout: timeout,
}
}
// NewEnableAccountParamsWithContext creates a new EnableAccountParams object
// with the default values initialized, and the ability to set a context for a request
func NewEnableAccountParamsWithContext(ctx context.Context) *EnableAccountParams {
var ()
return &EnableAccountParams{
Context: ctx,
}
}
// NewEnableAccountParamsWithHTTPClient creates a new EnableAccountParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewEnableAccountParamsWithHTTPClient(client *http.Client) *EnableAccountParams {
var ()
return &EnableAccountParams{
HTTPClient: client,
}
}
/*EnableAccountParams contains all the parameters to send to the API endpoint
for the enable account operation typically these are written to a http.Request
*/
type EnableAccountParams struct {
/*ID
Id of the account to be enabled
*/
ID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the enable account params
func (o *EnableAccountParams) WithTimeout(timeout time.Duration) *EnableAccountParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the enable account params
func (o *EnableAccountParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the enable account params
func (o *EnableAccountParams) WithContext(ctx context.Context) *EnableAccountParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the enable account params
func (o *EnableAccountParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the enable account params
func (o *EnableAccountParams) WithHTTPClient(client *http.Client) *EnableAccountParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the enable account params
func (o *EnableAccountParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithID adds the id to the enable account params
func (o *EnableAccountParams) WithID(id string) *EnableAccountParams {
o.SetID(id)
return o
}
// SetID adds the id to the enable account params
func (o *EnableAccountParams) SetID(id string) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *EnableAccountParams) 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
}