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.
175 lines
5.0 KiB
175 lines
5.0 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 (
|
||
|
"fmt"
|
||
|
"io"
|
||
|
|
||
|
"github.com/go-openapi/runtime"
|
||
|
"github.com/go-openapi/strfmt"
|
||
|
|
||
|
"github.com/Cyclops-Labs/cyclops-4-hpc.git/services/plan-manager/models"
|
||
|
)
|
||
|
|
||
|
// CreateSkuBundleReader is a Reader for the CreateSkuBundle structure.
|
||
|
type CreateSkuBundleReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *CreateSkuBundleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 201:
|
||
|
result := NewCreateSkuBundleCreated()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 400:
|
||
|
result := NewCreateSkuBundleBadRequest()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 409:
|
||
|
result := NewCreateSkuBundleConflict()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewCreateSkuBundleInternalServerError()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
|
||
|
default:
|
||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewCreateSkuBundleCreated creates a CreateSkuBundleCreated with default headers values
|
||
|
func NewCreateSkuBundleCreated() *CreateSkuBundleCreated {
|
||
|
return &CreateSkuBundleCreated{}
|
||
|
}
|
||
|
|
||
|
/*CreateSkuBundleCreated handles this case with default header values.
|
||
|
|
||
|
item created
|
||
|
*/
|
||
|
type CreateSkuBundleCreated struct {
|
||
|
Payload *models.ItemCreatedResponse
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleCreated) Error() string {
|
||
|
return fmt.Sprintf("[POST /sku/bundle][%d] createSkuBundleCreated %+v", 201, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleCreated) GetPayload() *models.ItemCreatedResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(models.ItemCreatedResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewCreateSkuBundleBadRequest creates a CreateSkuBundleBadRequest with default headers values
|
||
|
func NewCreateSkuBundleBadRequest() *CreateSkuBundleBadRequest {
|
||
|
return &CreateSkuBundleBadRequest{}
|
||
|
}
|
||
|
|
||
|
/*CreateSkuBundleBadRequest handles this case with default header values.
|
||
|
|
||
|
invalid input, object invalid
|
||
|
*/
|
||
|
type CreateSkuBundleBadRequest struct {
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleBadRequest) Error() string {
|
||
|
return fmt.Sprintf("[POST /sku/bundle][%d] createSkuBundleBadRequest ", 400)
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewCreateSkuBundleConflict creates a CreateSkuBundleConflict with default headers values
|
||
|
func NewCreateSkuBundleConflict() *CreateSkuBundleConflict {
|
||
|
return &CreateSkuBundleConflict{}
|
||
|
}
|
||
|
|
||
|
/*CreateSkuBundleConflict handles this case with default header values.
|
||
|
|
||
|
an existing item already exists
|
||
|
*/
|
||
|
type CreateSkuBundleConflict struct {
|
||
|
Payload *models.ErrorResponse
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleConflict) Error() string {
|
||
|
return fmt.Sprintf("[POST /sku/bundle][%d] createSkuBundleConflict %+v", 409, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleConflict) GetPayload() *models.ErrorResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(models.ErrorResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewCreateSkuBundleInternalServerError creates a CreateSkuBundleInternalServerError with default headers values
|
||
|
func NewCreateSkuBundleInternalServerError() *CreateSkuBundleInternalServerError {
|
||
|
return &CreateSkuBundleInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*CreateSkuBundleInternalServerError handles this case with default header values.
|
||
|
|
||
|
unexpected error
|
||
|
*/
|
||
|
type CreateSkuBundleInternalServerError struct {
|
||
|
Payload *models.ErrorResponse
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[POST /sku/bundle][%d] createSkuBundleInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleInternalServerError) GetPayload() *models.ErrorResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *CreateSkuBundleInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(models.ErrorResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|