func NewGetAppMessagesForbidden() *GetAppMessagesForbidden {
	return &GetAppMessagesForbidden{}
}
NewGetAppMessagesForbidden creates a GetAppMessagesForbidden 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 GetAppMessagesReader struct {
	formats strfmt.Registry
}
func (o *GetAppMessagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetAppMessagesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetAppMessagesBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewGetAppMessagesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetAppMessagesForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetAppMessagesNotFound()
		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 NewGetAppMessagesOK() *GetAppMessagesOK {
	return &GetAppMessagesOK{}
}
type GetAppMessagesOK struct {
	Payload *models.PagedMessages
}
func (o *GetAppMessagesOK) Error() string {
	return fmt.Sprintf("[GET /application/{id}/message][%d] getAppMessagesOK  %+v", 200, o.Payload)
}
func (o *GetAppMessagesOK) 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 NewGetAppMessagesBadRequest() *GetAppMessagesBadRequest {
	return &GetAppMessagesBadRequest{}
}
type GetAppMessagesBadRequest struct {
	Payload *models.Error
}
func (o *GetAppMessagesBadRequest) Error() string {
	return fmt.Sprintf("[GET /application/{id}/message][%d] getAppMessagesBadRequest  %+v", 400, o.Payload)
}
func (o *GetAppMessagesBadRequest) 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 NewGetAppMessagesUnauthorized() *GetAppMessagesUnauthorized {
	return &GetAppMessagesUnauthorized{}
}
type GetAppMessagesUnauthorized struct {
	Payload *models.Error
}
func (o *GetAppMessagesUnauthorized) Error() string {
	return fmt.Sprintf("[GET /application/{id}/message][%d] getAppMessagesUnauthorized  %+v", 401, o.Payload)
}
func (o *GetAppMessagesUnauthorized) 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
}