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.
		
		
		
		
		
			
		
			
				
					
					
						
							138 lines
						
					
					
						
							3.4 KiB
						
					
					
				
			
		
		
	
	
							138 lines
						
					
					
						
							3.4 KiB
						
					
					
				| // Code generated by go-swagger; DO NOT EDIT.
 | |
| 
 | |
| package sku_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"
 | |
| )
 | |
| 
 | |
| // NewCreateSkuParams creates a new CreateSkuParams object
 | |
| // with the default values initialized.
 | |
| func NewCreateSkuParams() *CreateSkuParams {
 | |
| 	var ()
 | |
| 	return &CreateSkuParams{
 | |
| 
 | |
| 		timeout: cr.DefaultTimeout,
 | |
| 	}
 | |
| }
 | |
| 
 | |
| // NewCreateSkuParamsWithTimeout creates a new CreateSkuParams object
 | |
| // with the default values initialized, and the ability to set a timeout on a request
 | |
| func NewCreateSkuParamsWithTimeout(timeout time.Duration) *CreateSkuParams {
 | |
| 	var ()
 | |
| 	return &CreateSkuParams{
 | |
| 
 | |
| 		timeout: timeout,
 | |
| 	}
 | |
| }
 | |
| 
 | |
| // NewCreateSkuParamsWithContext creates a new CreateSkuParams object
 | |
| // with the default values initialized, and the ability to set a context for a request
 | |
| func NewCreateSkuParamsWithContext(ctx context.Context) *CreateSkuParams {
 | |
| 	var ()
 | |
| 	return &CreateSkuParams{
 | |
| 
 | |
| 		Context: ctx,
 | |
| 	}
 | |
| }
 | |
| 
 | |
| // NewCreateSkuParamsWithHTTPClient creates a new CreateSkuParams object
 | |
| // with the default values initialized, and the ability to set a custom HTTPClient for a request
 | |
| func NewCreateSkuParamsWithHTTPClient(client *http.Client) *CreateSkuParams {
 | |
| 	var ()
 | |
| 	return &CreateSkuParams{
 | |
| 		HTTPClient: client,
 | |
| 	}
 | |
| }
 | |
| 
 | |
| /*CreateSkuParams contains all the parameters to send to the API endpoint
 | |
| for the create sku operation typically these are written to a http.Request
 | |
| */
 | |
| type CreateSkuParams struct {
 | |
| 
 | |
| 	/*Sku
 | |
| 	  SKU to be added
 | |
| 
 | |
| 	*/
 | |
| 	Sku *models.Sku
 | |
| 
 | |
| 	timeout    time.Duration
 | |
| 	Context    context.Context
 | |
| 	HTTPClient *http.Client
 | |
| }
 | |
| 
 | |
| // WithTimeout adds the timeout to the create sku params
 | |
| func (o *CreateSkuParams) WithTimeout(timeout time.Duration) *CreateSkuParams {
 | |
| 	o.SetTimeout(timeout)
 | |
| 	return o
 | |
| }
 | |
| 
 | |
| // SetTimeout adds the timeout to the create sku params
 | |
| func (o *CreateSkuParams) SetTimeout(timeout time.Duration) {
 | |
| 	o.timeout = timeout
 | |
| }
 | |
| 
 | |
| // WithContext adds the context to the create sku params
 | |
| func (o *CreateSkuParams) WithContext(ctx context.Context) *CreateSkuParams {
 | |
| 	o.SetContext(ctx)
 | |
| 	return o
 | |
| }
 | |
| 
 | |
| // SetContext adds the context to the create sku params
 | |
| func (o *CreateSkuParams) SetContext(ctx context.Context) {
 | |
| 	o.Context = ctx
 | |
| }
 | |
| 
 | |
| // WithHTTPClient adds the HTTPClient to the create sku params
 | |
| func (o *CreateSkuParams) WithHTTPClient(client *http.Client) *CreateSkuParams {
 | |
| 	o.SetHTTPClient(client)
 | |
| 	return o
 | |
| }
 | |
| 
 | |
| // SetHTTPClient adds the HTTPClient to the create sku params
 | |
| func (o *CreateSkuParams) SetHTTPClient(client *http.Client) {
 | |
| 	o.HTTPClient = client
 | |
| }
 | |
| 
 | |
| // WithSku adds the sku to the create sku params
 | |
| func (o *CreateSkuParams) WithSku(sku *models.Sku) *CreateSkuParams {
 | |
| 	o.SetSku(sku)
 | |
| 	return o
 | |
| }
 | |
| 
 | |
| // SetSku adds the sku to the create sku params
 | |
| func (o *CreateSkuParams) SetSku(sku *models.Sku) {
 | |
| 	o.Sku = sku
 | |
| }
 | |
| 
 | |
| // WriteToRequest writes these params to a swagger request
 | |
| func (o *CreateSkuParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
 | |
| 
 | |
| 	if err := r.SetTimeout(o.timeout); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	var res []error
 | |
| 
 | |
| 	if o.Sku != nil {
 | |
| 		if err := r.SetBodyParam(o.Sku); err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 	if len(res) > 0 {
 | |
| 		return errors.CompositeValidationError(res...)
 | |
| 	}
 | |
| 	return nil
 | |
| }
 | |
| 
 |