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

// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package shop

// 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/taxnexus/go/lib/api/blaze/blaze_models"
)

// GetShopReader is a Reader for the GetShop structure.
type GetShopReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetShopReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetShopOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewGetShopUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetShopForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetShopNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetShopInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result

	default:
		return nil, runtime.NewAPIError("unknown error", response, response.Code())
	}
}

// NewGetShopOK creates a GetShopOK with default headers values
func NewGetShopOK() *GetShopOK {
	return &GetShopOK{}
}

/*GetShopOK handles this case with default header values.

Shop was successfully retrieved
*/
type GetShopOK struct {
	Payload *blaze_models.ShopResponse
}

func (o *GetShopOK) Error() string {
	return fmt.Sprintf("[GET /partner/store][%d] getShopOK  %+v", 200, o.Payload)
}

func (o *GetShopOK) GetPayload() *blaze_models.ShopResponse {
	return o.Payload
}

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

	o.Payload = new(blaze_models.ShopResponse)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetShopUnauthorized creates a GetShopUnauthorized with default headers values
func NewGetShopUnauthorized() *GetShopUnauthorized {
	return &GetShopUnauthorized{}
}

/*GetShopUnauthorized handles this case with default header values.

Access unauthorized, invalid API-KEY was used
*/
type GetShopUnauthorized struct {
	Payload *blaze_models.Error
}

func (o *GetShopUnauthorized) Error() string {
	return fmt.Sprintf("[GET /partner/store][%d] getShopUnauthorized  %+v", 401, o.Payload)
}

func (o *GetShopUnauthorized) GetPayload() *blaze_models.Error {
	return o.Payload
}

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

	o.Payload = new(blaze_models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetShopForbidden creates a GetShopForbidden with default headers values
func NewGetShopForbidden() *GetShopForbidden {
	return &GetShopForbidden{}
}

/*GetShopForbidden handles this case with default header values.

Access forbidden, account lacks access
*/
type GetShopForbidden struct {
	Payload *blaze_models.Error
}

func (o *GetShopForbidden) Error() string {
	return fmt.Sprintf("[GET /partner/store][%d] getShopForbidden  %+v", 403, o.Payload)
}

func (o *GetShopForbidden) GetPayload() *blaze_models.Error {
	return o.Payload
}

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

	o.Payload = new(blaze_models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetShopNotFound creates a GetShopNotFound with default headers values
func NewGetShopNotFound() *GetShopNotFound {
	return &GetShopNotFound{}
}

/*GetShopNotFound handles this case with default header values.

Resource was not found
*/
type GetShopNotFound struct {
	Payload *blaze_models.Error
}

func (o *GetShopNotFound) Error() string {
	return fmt.Sprintf("[GET /partner/store][%d] getShopNotFound  %+v", 404, o.Payload)
}

func (o *GetShopNotFound) GetPayload() *blaze_models.Error {
	return o.Payload
}

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

	o.Payload = new(blaze_models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetShopInternalServerError creates a GetShopInternalServerError with default headers values
func NewGetShopInternalServerError() *GetShopInternalServerError {
	return &GetShopInternalServerError{}
}

/*GetShopInternalServerError handles this case with default header values.

Server Internal Error
*/
type GetShopInternalServerError struct {
	Payload *blaze_models.Error
}

func (o *GetShopInternalServerError) Error() string {
	return fmt.Sprintf("[GET /partner/store][%d] getShopInternalServerError  %+v", 500, o.Payload)
}

func (o *GetShopInternalServerError) GetPayload() *blaze_models.Error {
	return o.Payload
}

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

	o.Payload = new(blaze_models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}
