// Code generated by go-swagger; DO NOT EDIT.

package price_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"
)

// CreateSkuPriceReader is a Reader for the CreateSkuPrice structure.
type CreateSkuPriceReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *CreateSkuPriceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 201:
		result := NewCreateSkuPriceCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewCreateSkuPriceBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewCreateSkuPriceConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewCreateSkuPriceInternalServerError()
		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())
	}
}

// NewCreateSkuPriceCreated creates a CreateSkuPriceCreated with default headers values
func NewCreateSkuPriceCreated() *CreateSkuPriceCreated {
	return &CreateSkuPriceCreated{}
}

/*CreateSkuPriceCreated handles this case with default header values.

item created
*/
type CreateSkuPriceCreated struct {
	Payload *models.ItemCreatedResponse
}

func (o *CreateSkuPriceCreated) Error() string {
	return fmt.Sprintf("[POST /sku/price][%d] createSkuPriceCreated  %+v", 201, o.Payload)
}

func (o *CreateSkuPriceCreated) GetPayload() *models.ItemCreatedResponse {
	return o.Payload
}

func (o *CreateSkuPriceCreated) 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
}

// NewCreateSkuPriceBadRequest creates a CreateSkuPriceBadRequest with default headers values
func NewCreateSkuPriceBadRequest() *CreateSkuPriceBadRequest {
	return &CreateSkuPriceBadRequest{}
}

/*CreateSkuPriceBadRequest handles this case with default header values.

invalid input, object invalid
*/
type CreateSkuPriceBadRequest struct {
}

func (o *CreateSkuPriceBadRequest) Error() string {
	return fmt.Sprintf("[POST /sku/price][%d] createSkuPriceBadRequest ", 400)
}

func (o *CreateSkuPriceBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewCreateSkuPriceConflict creates a CreateSkuPriceConflict with default headers values
func NewCreateSkuPriceConflict() *CreateSkuPriceConflict {
	return &CreateSkuPriceConflict{}
}

/*CreateSkuPriceConflict handles this case with default header values.

an existing item already exists
*/
type CreateSkuPriceConflict struct {
	Payload *models.ErrorResponse
}

func (o *CreateSkuPriceConflict) Error() string {
	return fmt.Sprintf("[POST /sku/price][%d] createSkuPriceConflict  %+v", 409, o.Payload)
}

func (o *CreateSkuPriceConflict) GetPayload() *models.ErrorResponse {
	return o.Payload
}

func (o *CreateSkuPriceConflict) 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
}

// NewCreateSkuPriceInternalServerError creates a CreateSkuPriceInternalServerError with default headers values
func NewCreateSkuPriceInternalServerError() *CreateSkuPriceInternalServerError {
	return &CreateSkuPriceInternalServerError{}
}

/*CreateSkuPriceInternalServerError handles this case with default header values.

unexpected error
*/
type CreateSkuPriceInternalServerError struct {
	Payload *models.ErrorResponse
}

func (o *CreateSkuPriceInternalServerError) Error() string {
	return fmt.Sprintf("[POST /sku/price][%d] createSkuPriceInternalServerError  %+v", 500, o.Payload)
}

func (o *CreateSkuPriceInternalServerError) GetPayload() *models.ErrorResponse {
	return o.Payload
}

func (o *CreateSkuPriceInternalServerError) 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
}
