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

package fittings

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

// DeleteCharactersCharacterIDFittingsFittingIDReader is a Reader for the DeleteCharactersCharacterIDFittingsFittingID structure.
type DeleteCharactersCharacterIDFittingsFittingIDReader struct {
	formats strfmt.Registry
}

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

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

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

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

// NewDeleteCharactersCharacterIDFittingsFittingIDNoContent creates a DeleteCharactersCharacterIDFittingsFittingIDNoContent with default headers values
func NewDeleteCharactersCharacterIDFittingsFittingIDNoContent() *DeleteCharactersCharacterIDFittingsFittingIDNoContent {
	return &DeleteCharactersCharacterIDFittingsFittingIDNoContent{}
}

/*DeleteCharactersCharacterIDFittingsFittingIDNoContent handles this case with default header values.

Fitting deleted
*/
type DeleteCharactersCharacterIDFittingsFittingIDNoContent struct {
}

func (o *DeleteCharactersCharacterIDFittingsFittingIDNoContent) Error() string {
	return fmt.Sprintf("[DELETE /characters/{character_id}/fittings/{fitting_id}/][%d] deleteCharactersCharacterIdFittingsFittingIdNoContent ", 204)
}

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

	return nil
}

// NewDeleteCharactersCharacterIDFittingsFittingIDForbidden creates a DeleteCharactersCharacterIDFittingsFittingIDForbidden with default headers values
func NewDeleteCharactersCharacterIDFittingsFittingIDForbidden() *DeleteCharactersCharacterIDFittingsFittingIDForbidden {
	return &DeleteCharactersCharacterIDFittingsFittingIDForbidden{}
}

/*DeleteCharactersCharacterIDFittingsFittingIDForbidden handles this case with default header values.

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

func (o *DeleteCharactersCharacterIDFittingsFittingIDForbidden) Error() string {
	return fmt.Sprintf("[DELETE /characters/{character_id}/fittings/{fitting_id}/][%d] deleteCharactersCharacterIdFittingsFittingIdForbidden  %+v", 403, o.Payload)
}

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

// NewDeleteCharactersCharacterIDFittingsFittingIDInternalServerError creates a DeleteCharactersCharacterIDFittingsFittingIDInternalServerError with default headers values
func NewDeleteCharactersCharacterIDFittingsFittingIDInternalServerError() *DeleteCharactersCharacterIDFittingsFittingIDInternalServerError {
	return &DeleteCharactersCharacterIDFittingsFittingIDInternalServerError{}
}

/*DeleteCharactersCharacterIDFittingsFittingIDInternalServerError handles this case with default header values.

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

func (o *DeleteCharactersCharacterIDFittingsFittingIDInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /characters/{character_id}/fittings/{fitting_id}/][%d] deleteCharactersCharacterIdFittingsFittingIdInternalServerError  %+v", 500, o.Payload)
}

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