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

package calendar

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

// PutCharactersCharacterIDCalendarEventIDReader is a Reader for the PutCharactersCharacterIDCalendarEventID structure.
type PutCharactersCharacterIDCalendarEventIDReader struct {
	formats strfmt.Registry
}

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

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

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

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

// NewPutCharactersCharacterIDCalendarEventIDNoContent creates a PutCharactersCharacterIDCalendarEventIDNoContent with default headers values
func NewPutCharactersCharacterIDCalendarEventIDNoContent() *PutCharactersCharacterIDCalendarEventIDNoContent {
	return &PutCharactersCharacterIDCalendarEventIDNoContent{}
}

/*PutCharactersCharacterIDCalendarEventIDNoContent handles this case with default header values.

Event updated
*/
type PutCharactersCharacterIDCalendarEventIDNoContent struct {
}

func (o *PutCharactersCharacterIDCalendarEventIDNoContent) Error() string {
	return fmt.Sprintf("[PUT /characters/{character_id}/calendar/{event_id}/][%d] putCharactersCharacterIdCalendarEventIdNoContent ", 204)
}

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

	return nil
}

// NewPutCharactersCharacterIDCalendarEventIDForbidden creates a PutCharactersCharacterIDCalendarEventIDForbidden with default headers values
func NewPutCharactersCharacterIDCalendarEventIDForbidden() *PutCharactersCharacterIDCalendarEventIDForbidden {
	return &PutCharactersCharacterIDCalendarEventIDForbidden{}
}

/*PutCharactersCharacterIDCalendarEventIDForbidden handles this case with default header values.

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

func (o *PutCharactersCharacterIDCalendarEventIDForbidden) Error() string {
	return fmt.Sprintf("[PUT /characters/{character_id}/calendar/{event_id}/][%d] putCharactersCharacterIdCalendarEventIdForbidden  %+v", 403, o.Payload)
}

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

// NewPutCharactersCharacterIDCalendarEventIDInternalServerError creates a PutCharactersCharacterIDCalendarEventIDInternalServerError with default headers values
func NewPutCharactersCharacterIDCalendarEventIDInternalServerError() *PutCharactersCharacterIDCalendarEventIDInternalServerError {
	return &PutCharactersCharacterIDCalendarEventIDInternalServerError{}
}

/*PutCharactersCharacterIDCalendarEventIDInternalServerError handles this case with default header values.

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

func (o *PutCharactersCharacterIDCalendarEventIDInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /characters/{character_id}/calendar/{event_id}/][%d] putCharactersCharacterIdCalendarEventIdInternalServerError  %+v", 500, o.Payload)
}

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