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.
160 lines
4.2 KiB
160 lines
4.2 KiB
3 years ago
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
package bundle_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/Cyclops-Labs/cyclops-4-hpc.git/services/plan-manager/models"
|
||
|
)
|
||
|
|
||
|
// NewUpdateSkuBundleParams creates a new UpdateSkuBundleParams object
|
||
|
// with the default values initialized.
|
||
|
func NewUpdateSkuBundleParams() *UpdateSkuBundleParams {
|
||
|
var ()
|
||
|
return &UpdateSkuBundleParams{
|
||
|
|
||
|
timeout: cr.DefaultTimeout,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewUpdateSkuBundleParamsWithTimeout creates a new UpdateSkuBundleParams object
|
||
|
// with the default values initialized, and the ability to set a timeout on a request
|
||
|
func NewUpdateSkuBundleParamsWithTimeout(timeout time.Duration) *UpdateSkuBundleParams {
|
||
|
var ()
|
||
|
return &UpdateSkuBundleParams{
|
||
|
|
||
|
timeout: timeout,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewUpdateSkuBundleParamsWithContext creates a new UpdateSkuBundleParams object
|
||
|
// with the default values initialized, and the ability to set a context for a request
|
||
|
func NewUpdateSkuBundleParamsWithContext(ctx context.Context) *UpdateSkuBundleParams {
|
||
|
var ()
|
||
|
return &UpdateSkuBundleParams{
|
||
|
|
||
|
Context: ctx,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewUpdateSkuBundleParamsWithHTTPClient creates a new UpdateSkuBundleParams object
|
||
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
||
|
func NewUpdateSkuBundleParamsWithHTTPClient(client *http.Client) *UpdateSkuBundleParams {
|
||
|
var ()
|
||
|
return &UpdateSkuBundleParams{
|
||
|
HTTPClient: client,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/*UpdateSkuBundleParams contains all the parameters to send to the API endpoint
|
||
|
for the update sku bundle operation typically these are written to a http.Request
|
||
|
*/
|
||
|
type UpdateSkuBundleParams struct {
|
||
|
|
||
|
/*Bundle
|
||
|
updated sku bundle containing all parameters except id
|
||
|
|
||
|
*/
|
||
|
Bundle *models.SkuBundle
|
||
|
/*ID
|
||
|
Id of sku bundle to be obtained
|
||
|
|
||
|
*/
|
||
|
ID string
|
||
|
|
||
|
timeout time.Duration
|
||
|
Context context.Context
|
||
|
HTTPClient *http.Client
|
||
|
}
|
||
|
|
||
|
// WithTimeout adds the timeout to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) WithTimeout(timeout time.Duration) *UpdateSkuBundleParams {
|
||
|
o.SetTimeout(timeout)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetTimeout adds the timeout to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) SetTimeout(timeout time.Duration) {
|
||
|
o.timeout = timeout
|
||
|
}
|
||
|
|
||
|
// WithContext adds the context to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) WithContext(ctx context.Context) *UpdateSkuBundleParams {
|
||
|
o.SetContext(ctx)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetContext adds the context to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) SetContext(ctx context.Context) {
|
||
|
o.Context = ctx
|
||
|
}
|
||
|
|
||
|
// WithHTTPClient adds the HTTPClient to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) WithHTTPClient(client *http.Client) *UpdateSkuBundleParams {
|
||
|
o.SetHTTPClient(client)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetHTTPClient adds the HTTPClient to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) SetHTTPClient(client *http.Client) {
|
||
|
o.HTTPClient = client
|
||
|
}
|
||
|
|
||
|
// WithBundle adds the bundle to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) WithBundle(bundle *models.SkuBundle) *UpdateSkuBundleParams {
|
||
|
o.SetBundle(bundle)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetBundle adds the bundle to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) SetBundle(bundle *models.SkuBundle) {
|
||
|
o.Bundle = bundle
|
||
|
}
|
||
|
|
||
|
// WithID adds the id to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) WithID(id string) *UpdateSkuBundleParams {
|
||
|
o.SetID(id)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetID adds the id to the update sku bundle params
|
||
|
func (o *UpdateSkuBundleParams) SetID(id string) {
|
||
|
o.ID = id
|
||
|
}
|
||
|
|
||
|
// WriteToRequest writes these params to a swagger request
|
||
|
func (o *UpdateSkuBundleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||
|
|
||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
var res []error
|
||
|
|
||
|
if o.Bundle != nil {
|
||
|
if err := r.SetBodyParam(o.Bundle); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// path param id
|
||
|
if err := r.SetPathParam("id", o.ID); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
if len(res) > 0 {
|
||
|
return errors.CompositeValidationError(res...)
|
||
|
}
|
||
|
return nil
|
||
|
}
|