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

package statuses

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"encoding/json"
	"fmt"
	"io"

	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"

	"git.coopcloud.tech/decentral1se/gtslib/models"
)

// StatusUnfaveReader is a Reader for the StatusUnfave structure.
type StatusUnfaveReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *StatusUnfaveReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewStatusUnfaveOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewStatusUnfaveBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewStatusUnfaveUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewStatusUnfaveForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewStatusUnfaveNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewStatusUnfaveNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewStatusUnfaveInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[POST /api/v1/statuses/{id}/unfavourite] statusUnfave", response, response.Code())
	}
}

// NewStatusUnfaveOK creates a StatusUnfaveOK with default headers values
func NewStatusUnfaveOK() *StatusUnfaveOK {
	return &StatusUnfaveOK{}
}

/*
StatusUnfaveOK describes a response with status code 200, with default header values.

The unfaved status.
*/
type StatusUnfaveOK struct {
	Payload *models.Status
}

// IsSuccess returns true when this status unfave o k response has a 2xx status code
func (o *StatusUnfaveOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this status unfave o k response has a 3xx status code
func (o *StatusUnfaveOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this status unfave o k response has a 4xx status code
func (o *StatusUnfaveOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this status unfave o k response has a 5xx status code
func (o *StatusUnfaveOK) IsServerError() bool {
	return false
}

// IsCode returns true when this status unfave o k response a status code equal to that given
func (o *StatusUnfaveOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the status unfave o k response
func (o *StatusUnfaveOK) Code() int {
	return 200
}

func (o *StatusUnfaveOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveOK %s", 200, payload)
}

func (o *StatusUnfaveOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveOK %s", 200, payload)
}

func (o *StatusUnfaveOK) GetPayload() *models.Status {
	return o.Payload
}

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

	o.Payload = new(models.Status)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewStatusUnfaveBadRequest creates a StatusUnfaveBadRequest with default headers values
func NewStatusUnfaveBadRequest() *StatusUnfaveBadRequest {
	return &StatusUnfaveBadRequest{}
}

/*
StatusUnfaveBadRequest describes a response with status code 400, with default header values.

bad request
*/
type StatusUnfaveBadRequest struct {
}

// IsSuccess returns true when this status unfave bad request response has a 2xx status code
func (o *StatusUnfaveBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this status unfave bad request response has a 3xx status code
func (o *StatusUnfaveBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this status unfave bad request response has a 4xx status code
func (o *StatusUnfaveBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this status unfave bad request response has a 5xx status code
func (o *StatusUnfaveBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this status unfave bad request response a status code equal to that given
func (o *StatusUnfaveBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the status unfave bad request response
func (o *StatusUnfaveBadRequest) Code() int {
	return 400
}

func (o *StatusUnfaveBadRequest) Error() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveBadRequest", 400)
}

func (o *StatusUnfaveBadRequest) String() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveBadRequest", 400)
}

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

	return nil
}

// NewStatusUnfaveUnauthorized creates a StatusUnfaveUnauthorized with default headers values
func NewStatusUnfaveUnauthorized() *StatusUnfaveUnauthorized {
	return &StatusUnfaveUnauthorized{}
}

/*
StatusUnfaveUnauthorized describes a response with status code 401, with default header values.

unauthorized
*/
type StatusUnfaveUnauthorized struct {
}

// IsSuccess returns true when this status unfave unauthorized response has a 2xx status code
func (o *StatusUnfaveUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this status unfave unauthorized response has a 3xx status code
func (o *StatusUnfaveUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this status unfave unauthorized response has a 4xx status code
func (o *StatusUnfaveUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this status unfave unauthorized response has a 5xx status code
func (o *StatusUnfaveUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this status unfave unauthorized response a status code equal to that given
func (o *StatusUnfaveUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the status unfave unauthorized response
func (o *StatusUnfaveUnauthorized) Code() int {
	return 401
}

func (o *StatusUnfaveUnauthorized) Error() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveUnauthorized", 401)
}

func (o *StatusUnfaveUnauthorized) String() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveUnauthorized", 401)
}

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

	return nil
}

// NewStatusUnfaveForbidden creates a StatusUnfaveForbidden with default headers values
func NewStatusUnfaveForbidden() *StatusUnfaveForbidden {
	return &StatusUnfaveForbidden{}
}

/*
StatusUnfaveForbidden describes a response with status code 403, with default header values.

forbidden
*/
type StatusUnfaveForbidden struct {
}

// IsSuccess returns true when this status unfave forbidden response has a 2xx status code
func (o *StatusUnfaveForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this status unfave forbidden response has a 3xx status code
func (o *StatusUnfaveForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this status unfave forbidden response has a 4xx status code
func (o *StatusUnfaveForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this status unfave forbidden response has a 5xx status code
func (o *StatusUnfaveForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this status unfave forbidden response a status code equal to that given
func (o *StatusUnfaveForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the status unfave forbidden response
func (o *StatusUnfaveForbidden) Code() int {
	return 403
}

func (o *StatusUnfaveForbidden) Error() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveForbidden", 403)
}

func (o *StatusUnfaveForbidden) String() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveForbidden", 403)
}

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

	return nil
}

// NewStatusUnfaveNotFound creates a StatusUnfaveNotFound with default headers values
func NewStatusUnfaveNotFound() *StatusUnfaveNotFound {
	return &StatusUnfaveNotFound{}
}

/*
StatusUnfaveNotFound describes a response with status code 404, with default header values.

not found
*/
type StatusUnfaveNotFound struct {
}

// IsSuccess returns true when this status unfave not found response has a 2xx status code
func (o *StatusUnfaveNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this status unfave not found response has a 3xx status code
func (o *StatusUnfaveNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this status unfave not found response has a 4xx status code
func (o *StatusUnfaveNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this status unfave not found response has a 5xx status code
func (o *StatusUnfaveNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this status unfave not found response a status code equal to that given
func (o *StatusUnfaveNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the status unfave not found response
func (o *StatusUnfaveNotFound) Code() int {
	return 404
}

func (o *StatusUnfaveNotFound) Error() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveNotFound", 404)
}

func (o *StatusUnfaveNotFound) String() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveNotFound", 404)
}

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

	return nil
}

// NewStatusUnfaveNotAcceptable creates a StatusUnfaveNotAcceptable with default headers values
func NewStatusUnfaveNotAcceptable() *StatusUnfaveNotAcceptable {
	return &StatusUnfaveNotAcceptable{}
}

/*
StatusUnfaveNotAcceptable describes a response with status code 406, with default header values.

not acceptable
*/
type StatusUnfaveNotAcceptable struct {
}

// IsSuccess returns true when this status unfave not acceptable response has a 2xx status code
func (o *StatusUnfaveNotAcceptable) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this status unfave not acceptable response has a 3xx status code
func (o *StatusUnfaveNotAcceptable) IsRedirect() bool {
	return false
}

// IsClientError returns true when this status unfave not acceptable response has a 4xx status code
func (o *StatusUnfaveNotAcceptable) IsClientError() bool {
	return true
}

// IsServerError returns true when this status unfave not acceptable response has a 5xx status code
func (o *StatusUnfaveNotAcceptable) IsServerError() bool {
	return false
}

// IsCode returns true when this status unfave not acceptable response a status code equal to that given
func (o *StatusUnfaveNotAcceptable) IsCode(code int) bool {
	return code == 406
}

// Code gets the status code for the status unfave not acceptable response
func (o *StatusUnfaveNotAcceptable) Code() int {
	return 406
}

func (o *StatusUnfaveNotAcceptable) Error() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveNotAcceptable", 406)
}

func (o *StatusUnfaveNotAcceptable) String() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveNotAcceptable", 406)
}

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

	return nil
}

// NewStatusUnfaveInternalServerError creates a StatusUnfaveInternalServerError with default headers values
func NewStatusUnfaveInternalServerError() *StatusUnfaveInternalServerError {
	return &StatusUnfaveInternalServerError{}
}

/*
StatusUnfaveInternalServerError describes a response with status code 500, with default header values.

internal server error
*/
type StatusUnfaveInternalServerError struct {
}

// IsSuccess returns true when this status unfave internal server error response has a 2xx status code
func (o *StatusUnfaveInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this status unfave internal server error response has a 3xx status code
func (o *StatusUnfaveInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this status unfave internal server error response has a 4xx status code
func (o *StatusUnfaveInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this status unfave internal server error response has a 5xx status code
func (o *StatusUnfaveInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this status unfave internal server error response a status code equal to that given
func (o *StatusUnfaveInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the status unfave internal server error response
func (o *StatusUnfaveInternalServerError) Code() int {
	return 500
}

func (o *StatusUnfaveInternalServerError) Error() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveInternalServerError", 500)
}

func (o *StatusUnfaveInternalServerError) String() string {
	return fmt.Sprintf("[POST /api/v1/statuses/{id}/unfavourite][%d] statusUnfaveInternalServerError", 500)
}

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

	return nil
}
