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

package fleets

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

// PostFleetsFleetIDWingsWingIDSquadsReader is a Reader for the PostFleetsFleetIDWingsWingIDSquads structure.
type PostFleetsFleetIDWingsWingIDSquadsReader struct {
	formats strfmt.Registry
}

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

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

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

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

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

// NewPostFleetsFleetIDWingsWingIDSquadsCreated creates a PostFleetsFleetIDWingsWingIDSquadsCreated with default headers values
func NewPostFleetsFleetIDWingsWingIDSquadsCreated() *PostFleetsFleetIDWingsWingIDSquadsCreated {
	return &PostFleetsFleetIDWingsWingIDSquadsCreated{}
}

/*PostFleetsFleetIDWingsWingIDSquadsCreated handles this case with default header values.

Squad created
*/
type PostFleetsFleetIDWingsWingIDSquadsCreated struct {
	Payload *models.PostFleetsFleetIDWingsWingIDSquadsCreatedBody
}

func (o *PostFleetsFleetIDWingsWingIDSquadsCreated) Error() string {
	return fmt.Sprintf("[POST /fleets/{fleet_id}/wings/{wing_id}/squads/][%d] postFleetsFleetIdWingsWingIdSquadsCreated  %+v", 201, o.Payload)
}

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

	o.Payload = new(models.PostFleetsFleetIDWingsWingIDSquadsCreatedBody)

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

	return nil
}

// NewPostFleetsFleetIDWingsWingIDSquadsForbidden creates a PostFleetsFleetIDWingsWingIDSquadsForbidden with default headers values
func NewPostFleetsFleetIDWingsWingIDSquadsForbidden() *PostFleetsFleetIDWingsWingIDSquadsForbidden {
	return &PostFleetsFleetIDWingsWingIDSquadsForbidden{}
}

/*PostFleetsFleetIDWingsWingIDSquadsForbidden handles this case with default header values.

Forbidden
*/
type PostFleetsFleetIDWingsWingIDSquadsForbidden struct {
	Payload *models.Forbidden
}

func (o *PostFleetsFleetIDWingsWingIDSquadsForbidden) Error() string {
	return fmt.Sprintf("[POST /fleets/{fleet_id}/wings/{wing_id}/squads/][%d] postFleetsFleetIdWingsWingIdSquadsForbidden  %+v", 403, o.Payload)
}

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

	o.Payload = new(models.Forbidden)

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

	return nil
}

// NewPostFleetsFleetIDWingsWingIDSquadsNotFound creates a PostFleetsFleetIDWingsWingIDSquadsNotFound with default headers values
func NewPostFleetsFleetIDWingsWingIDSquadsNotFound() *PostFleetsFleetIDWingsWingIDSquadsNotFound {
	return &PostFleetsFleetIDWingsWingIDSquadsNotFound{}
}

/*PostFleetsFleetIDWingsWingIDSquadsNotFound handles this case with default header values.

The fleet does not exist or you don't have access to it
*/
type PostFleetsFleetIDWingsWingIDSquadsNotFound struct {
	Payload *models.PostFleetsFleetIDWingsWingIDSquadsNotFoundBody
}

func (o *PostFleetsFleetIDWingsWingIDSquadsNotFound) Error() string {
	return fmt.Sprintf("[POST /fleets/{fleet_id}/wings/{wing_id}/squads/][%d] postFleetsFleetIdWingsWingIdSquadsNotFound  %+v", 404, o.Payload)
}

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

	o.Payload = new(models.PostFleetsFleetIDWingsWingIDSquadsNotFoundBody)

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

	return nil
}

// NewPostFleetsFleetIDWingsWingIDSquadsInternalServerError creates a PostFleetsFleetIDWingsWingIDSquadsInternalServerError with default headers values
func NewPostFleetsFleetIDWingsWingIDSquadsInternalServerError() *PostFleetsFleetIDWingsWingIDSquadsInternalServerError {
	return &PostFleetsFleetIDWingsWingIDSquadsInternalServerError{}
}

/*PostFleetsFleetIDWingsWingIDSquadsInternalServerError handles this case with default header values.

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

func (o *PostFleetsFleetIDWingsWingIDSquadsInternalServerError) Error() string {
	return fmt.Sprintf("[POST /fleets/{fleet_id}/wings/{wing_id}/squads/][%d] postFleetsFleetIdWingsWingIdSquadsInternalServerError  %+v", 500, o.Payload)
}

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