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

// PutFleetsFleetIDMembersMemberIDReader is a Reader for the PutFleetsFleetIDMembersMemberID structure.
type PutFleetsFleetIDMembersMemberIDReader struct {
	formats strfmt.Registry
}

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

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

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

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

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

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

// NewPutFleetsFleetIDMembersMemberIDNoContent creates a PutFleetsFleetIDMembersMemberIDNoContent with default headers values
func NewPutFleetsFleetIDMembersMemberIDNoContent() *PutFleetsFleetIDMembersMemberIDNoContent {
	return &PutFleetsFleetIDMembersMemberIDNoContent{}
}

/*PutFleetsFleetIDMembersMemberIDNoContent handles this case with default header values.

Fleet invitation sent
*/
type PutFleetsFleetIDMembersMemberIDNoContent struct {
}

func (o *PutFleetsFleetIDMembersMemberIDNoContent) Error() string {
	return fmt.Sprintf("[PUT /fleets/{fleet_id}/members/{member_id}/][%d] putFleetsFleetIdMembersMemberIdNoContent ", 204)
}

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

	return nil
}

// NewPutFleetsFleetIDMembersMemberIDForbidden creates a PutFleetsFleetIDMembersMemberIDForbidden with default headers values
func NewPutFleetsFleetIDMembersMemberIDForbidden() *PutFleetsFleetIDMembersMemberIDForbidden {
	return &PutFleetsFleetIDMembersMemberIDForbidden{}
}

/*PutFleetsFleetIDMembersMemberIDForbidden handles this case with default header values.

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

func (o *PutFleetsFleetIDMembersMemberIDForbidden) Error() string {
	return fmt.Sprintf("[PUT /fleets/{fleet_id}/members/{member_id}/][%d] putFleetsFleetIdMembersMemberIdForbidden  %+v", 403, o.Payload)
}

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

// NewPutFleetsFleetIDMembersMemberIDNotFound creates a PutFleetsFleetIDMembersMemberIDNotFound with default headers values
func NewPutFleetsFleetIDMembersMemberIDNotFound() *PutFleetsFleetIDMembersMemberIDNotFound {
	return &PutFleetsFleetIDMembersMemberIDNotFound{}
}

/*PutFleetsFleetIDMembersMemberIDNotFound handles this case with default header values.

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

func (o *PutFleetsFleetIDMembersMemberIDNotFound) Error() string {
	return fmt.Sprintf("[PUT /fleets/{fleet_id}/members/{member_id}/][%d] putFleetsFleetIdMembersMemberIdNotFound  %+v", 404, o.Payload)
}

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

	o.Payload = new(models.PutFleetsFleetIDMembersMemberIDNotFoundBody)

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

	return nil
}

// NewPutFleetsFleetIDMembersMemberIDUnprocessableEntity creates a PutFleetsFleetIDMembersMemberIDUnprocessableEntity with default headers values
func NewPutFleetsFleetIDMembersMemberIDUnprocessableEntity() *PutFleetsFleetIDMembersMemberIDUnprocessableEntity {
	return &PutFleetsFleetIDMembersMemberIDUnprocessableEntity{}
}

/*PutFleetsFleetIDMembersMemberIDUnprocessableEntity handles this case with default header values.

Errors in invitation
*/
type PutFleetsFleetIDMembersMemberIDUnprocessableEntity struct {
	Payload *models.PutFleetsFleetIDMembersMemberIDUnprocessableEntityBody
}

func (o *PutFleetsFleetIDMembersMemberIDUnprocessableEntity) Error() string {
	return fmt.Sprintf("[PUT /fleets/{fleet_id}/members/{member_id}/][%d] putFleetsFleetIdMembersMemberIdUnprocessableEntity  %+v", 422, o.Payload)
}

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

	o.Payload = new(models.PutFleetsFleetIDMembersMemberIDUnprocessableEntityBody)

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

	return nil
}

// NewPutFleetsFleetIDMembersMemberIDInternalServerError creates a PutFleetsFleetIDMembersMemberIDInternalServerError with default headers values
func NewPutFleetsFleetIDMembersMemberIDInternalServerError() *PutFleetsFleetIDMembersMemberIDInternalServerError {
	return &PutFleetsFleetIDMembersMemberIDInternalServerError{}
}

/*PutFleetsFleetIDMembersMemberIDInternalServerError handles this case with default header values.

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

func (o *PutFleetsFleetIDMembersMemberIDInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /fleets/{fleet_id}/members/{member_id}/][%d] putFleetsFleetIdMembersMemberIdInternalServerError  %+v", 500, o.Payload)
}

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