func NewGetMessagesForbidden() *GetMessagesForbidden {
	return &GetMessagesForbidden{}
}
NewGetMessagesForbidden creates a GetMessagesForbidden with default headers values
package message
import (
	"fmt"
	"io"
	"github.com/go-openapi/runtime"
	strfmt "github.com/go-openapi/strfmt"
	models "github.com/gotify/go-api-client/v2/models"
)
type GetMessagesReader struct {
	formats strfmt.Registry
}
func (o *GetMessagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetMessagesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetMessagesBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewGetMessagesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetMessagesForbidden()
		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())
	}
}
func NewGetMessagesOK() *GetMessagesOK {
	return &GetMessagesOK{}
}
type GetMessagesOK struct {
	Payload *models.PagedMessages
}
func (o *GetMessagesOK) Error() string {
	return fmt.Sprintf("[GET /message][%d] getMessagesOK  %+v", 200, o.Payload)
}
func (o *GetMessagesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.PagedMessages)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetMessagesBadRequest() *GetMessagesBadRequest {
	return &GetMessagesBadRequest{}
}
type GetMessagesBadRequest struct {
	Payload *models.Error
}
func (o *GetMessagesBadRequest) Error() string {
	return fmt.Sprintf("[GET /message][%d] getMessagesBadRequest  %+v", 400, o.Payload)
}
func (o *GetMessagesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.Error)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetMessagesUnauthorized() *GetMessagesUnauthorized {
	return &GetMessagesUnauthorized{}
}
type GetMessagesUnauthorized struct {
	Payload *models.Error
}
func (o *GetMessagesUnauthorized) Error() string {
	return fmt.Sprintf("[GET /message][%d] getMessagesUnauthorized  %+v", 401, o.Payload)
}
func (o *GetMessagesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.Error)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}