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

package universe

// 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"

	strfmt "github.com/go-openapi/strfmt"

	"git.inf3.xyz/tschwery/eve-goclient.git/models"
)

// GetUniverseConstellationsConstellationIDReader is a Reader for the GetUniverseConstellationsConstellationID structure.
type GetUniverseConstellationsConstellationIDReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetUniverseConstellationsConstellationIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {

	case 200:
		result := NewGetUniverseConstellationsConstellationIDOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil

	case 404:
		result := NewGetUniverseConstellationsConstellationIDNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result

	case 500:
		result := NewGetUniverseConstellationsConstellationIDInternalServerError()
		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())
	}
}

// NewGetUniverseConstellationsConstellationIDOK creates a GetUniverseConstellationsConstellationIDOK with default headers values
func NewGetUniverseConstellationsConstellationIDOK() *GetUniverseConstellationsConstellationIDOK {
	return &GetUniverseConstellationsConstellationIDOK{}
}

/*GetUniverseConstellationsConstellationIDOK handles this case with default header values.

Information about a constellation
*/
type GetUniverseConstellationsConstellationIDOK struct {
	/*The caching mechanism used
	 */
	CacheControl string
	/*The language used in the response
	 */
	ContentLanguage string
	/*RFC7231 formatted datetime string
	 */
	Expires string
	/*RFC7231 formatted datetime string
	 */
	LastModified string

	Payload *models.GetUniverseConstellationsConstellationIDOKBody
}

func (o *GetUniverseConstellationsConstellationIDOK) Error() string {
	return fmt.Sprintf("[GET /universe/constellations/{constellation_id}/][%d] getUniverseConstellationsConstellationIdOK  %+v", 200, o.Payload)
}

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

	// response header Cache-Control
	o.CacheControl = response.GetHeader("Cache-Control")

	// response header Content-Language
	o.ContentLanguage = response.GetHeader("Content-Language")

	// response header Expires
	o.Expires = response.GetHeader("Expires")

	// response header Last-Modified
	o.LastModified = response.GetHeader("Last-Modified")

	o.Payload = new(models.GetUniverseConstellationsConstellationIDOKBody)

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

	return nil
}

// NewGetUniverseConstellationsConstellationIDNotFound creates a GetUniverseConstellationsConstellationIDNotFound with default headers values
func NewGetUniverseConstellationsConstellationIDNotFound() *GetUniverseConstellationsConstellationIDNotFound {
	return &GetUniverseConstellationsConstellationIDNotFound{}
}

/*GetUniverseConstellationsConstellationIDNotFound handles this case with default header values.

Constellation not found
*/
type GetUniverseConstellationsConstellationIDNotFound struct {
	Payload *models.GetUniverseConstellationsConstellationIDNotFoundBody
}

func (o *GetUniverseConstellationsConstellationIDNotFound) Error() string {
	return fmt.Sprintf("[GET /universe/constellations/{constellation_id}/][%d] getUniverseConstellationsConstellationIdNotFound  %+v", 404, o.Payload)
}

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

	o.Payload = new(models.GetUniverseConstellationsConstellationIDNotFoundBody)

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

	return nil
}

// NewGetUniverseConstellationsConstellationIDInternalServerError creates a GetUniverseConstellationsConstellationIDInternalServerError with default headers values
func NewGetUniverseConstellationsConstellationIDInternalServerError() *GetUniverseConstellationsConstellationIDInternalServerError {
	return &GetUniverseConstellationsConstellationIDInternalServerError{}
}

/*GetUniverseConstellationsConstellationIDInternalServerError handles this case with default header values.

Internal server error
*/
type GetUniverseConstellationsConstellationIDInternalServerError struct {
	Payload *models.InternalServerError
}

func (o *GetUniverseConstellationsConstellationIDInternalServerError) Error() string {
	return fmt.Sprintf("[GET /universe/constellations/{constellation_id}/][%d] getUniverseConstellationsConstellationIdInternalServerError  %+v", 500, o.Payload)
}

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

	o.Payload = new(models.InternalServerError)

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

	return nil
}
