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

package corporation

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

// PutCorporationsCorporationIDStructuresStructureIDReader is a Reader for the PutCorporationsCorporationIDStructuresStructureID structure.
type PutCorporationsCorporationIDStructuresStructureIDReader struct {
	formats strfmt.Registry
}

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

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

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

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

// NewPutCorporationsCorporationIDStructuresStructureIDNoContent creates a PutCorporationsCorporationIDStructuresStructureIDNoContent with default headers values
func NewPutCorporationsCorporationIDStructuresStructureIDNoContent() *PutCorporationsCorporationIDStructuresStructureIDNoContent {
	return &PutCorporationsCorporationIDStructuresStructureIDNoContent{}
}

/*PutCorporationsCorporationIDStructuresStructureIDNoContent handles this case with default header values.

Structure vulnerability window updated
*/
type PutCorporationsCorporationIDStructuresStructureIDNoContent struct {
}

func (o *PutCorporationsCorporationIDStructuresStructureIDNoContent) Error() string {
	return fmt.Sprintf("[PUT /corporations/{corporation_id}/structures/{structure_id}/][%d] putCorporationsCorporationIdStructuresStructureIdNoContent ", 204)
}

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

	return nil
}

// NewPutCorporationsCorporationIDStructuresStructureIDForbidden creates a PutCorporationsCorporationIDStructuresStructureIDForbidden with default headers values
func NewPutCorporationsCorporationIDStructuresStructureIDForbidden() *PutCorporationsCorporationIDStructuresStructureIDForbidden {
	return &PutCorporationsCorporationIDStructuresStructureIDForbidden{}
}

/*PutCorporationsCorporationIDStructuresStructureIDForbidden handles this case with default header values.

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

func (o *PutCorporationsCorporationIDStructuresStructureIDForbidden) Error() string {
	return fmt.Sprintf("[PUT /corporations/{corporation_id}/structures/{structure_id}/][%d] putCorporationsCorporationIdStructuresStructureIdForbidden  %+v", 403, o.Payload)
}

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

// NewPutCorporationsCorporationIDStructuresStructureIDInternalServerError creates a PutCorporationsCorporationIDStructuresStructureIDInternalServerError with default headers values
func NewPutCorporationsCorporationIDStructuresStructureIDInternalServerError() *PutCorporationsCorporationIDStructuresStructureIDInternalServerError {
	return &PutCorporationsCorporationIDStructuresStructureIDInternalServerError{}
}

/*PutCorporationsCorporationIDStructuresStructureIDInternalServerError handles this case with default header values.

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

func (o *PutCorporationsCorporationIDStructuresStructureIDInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /corporations/{corporation_id}/structures/{structure_id}/][%d] putCorporationsCorporationIdStructuresStructureIdInternalServerError  %+v", 500, o.Payload)
}

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