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

package lists

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

// ListUpdateReader is a Reader for the ListUpdate structure.
type ListUpdateReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *ListUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewListUpdateOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewListUpdateBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewListUpdateUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewListUpdateForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewListUpdateNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 406:
		result := NewListUpdateNotAcceptable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewListUpdateInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[PUT /api/v1/lists/{id}] listUpdate", response, response.Code())
	}
}

// NewListUpdateOK creates a ListUpdateOK with default headers values
func NewListUpdateOK() *ListUpdateOK {
	return &ListUpdateOK{}
}

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

The newly updated list.
*/
type ListUpdateOK struct {
	Payload *models.List
}

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

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

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

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

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

// Code gets the status code for the list update o k response
func (o *ListUpdateOK) Code() int {
	return 200
}

func (o *ListUpdateOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateOK %s", 200, payload)
}

func (o *ListUpdateOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateOK %s", 200, payload)
}

func (o *ListUpdateOK) GetPayload() *models.List {
	return o.Payload
}

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

	o.Payload = new(models.List)

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

	return nil
}

// NewListUpdateBadRequest creates a ListUpdateBadRequest with default headers values
func NewListUpdateBadRequest() *ListUpdateBadRequest {
	return &ListUpdateBadRequest{}
}

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

bad request
*/
type ListUpdateBadRequest struct {
}

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

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

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

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

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

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

func (o *ListUpdateBadRequest) Error() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateBadRequest", 400)
}

func (o *ListUpdateBadRequest) String() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateBadRequest", 400)
}

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

	return nil
}

// NewListUpdateUnauthorized creates a ListUpdateUnauthorized with default headers values
func NewListUpdateUnauthorized() *ListUpdateUnauthorized {
	return &ListUpdateUnauthorized{}
}

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

unauthorized
*/
type ListUpdateUnauthorized struct {
}

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

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

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

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

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

// Code gets the status code for the list update unauthorized response
func (o *ListUpdateUnauthorized) Code() int {
	return 401
}

func (o *ListUpdateUnauthorized) Error() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateUnauthorized", 401)
}

func (o *ListUpdateUnauthorized) String() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateUnauthorized", 401)
}

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

	return nil
}

// NewListUpdateForbidden creates a ListUpdateForbidden with default headers values
func NewListUpdateForbidden() *ListUpdateForbidden {
	return &ListUpdateForbidden{}
}

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

forbidden
*/
type ListUpdateForbidden struct {
}

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

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

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

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

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

// Code gets the status code for the list update forbidden response
func (o *ListUpdateForbidden) Code() int {
	return 403
}

func (o *ListUpdateForbidden) Error() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateForbidden", 403)
}

func (o *ListUpdateForbidden) String() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateForbidden", 403)
}

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

	return nil
}

// NewListUpdateNotFound creates a ListUpdateNotFound with default headers values
func NewListUpdateNotFound() *ListUpdateNotFound {
	return &ListUpdateNotFound{}
}

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

not found
*/
type ListUpdateNotFound struct {
}

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

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

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

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

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

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

func (o *ListUpdateNotFound) Error() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateNotFound", 404)
}

func (o *ListUpdateNotFound) String() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateNotFound", 404)
}

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

	return nil
}

// NewListUpdateNotAcceptable creates a ListUpdateNotAcceptable with default headers values
func NewListUpdateNotAcceptable() *ListUpdateNotAcceptable {
	return &ListUpdateNotAcceptable{}
}

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

not acceptable
*/
type ListUpdateNotAcceptable struct {
}

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

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

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

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

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

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

func (o *ListUpdateNotAcceptable) Error() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateNotAcceptable", 406)
}

func (o *ListUpdateNotAcceptable) String() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateNotAcceptable", 406)
}

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

	return nil
}

// NewListUpdateInternalServerError creates a ListUpdateInternalServerError with default headers values
func NewListUpdateInternalServerError() *ListUpdateInternalServerError {
	return &ListUpdateInternalServerError{}
}

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

internal server error
*/
type ListUpdateInternalServerError struct {
}

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

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

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

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

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

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

func (o *ListUpdateInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateInternalServerError", 500)
}

func (o *ListUpdateInternalServerError) String() string {
	return fmt.Sprintf("[PUT /api/v1/lists/{id}][%d] listUpdateInternalServerError", 500)
}

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

	return nil
}
