gtslib/client/statuses/status_history_get_responses.go
decentral1se e4ade9c758
All checks were successful
continuous-integration/drone/push Build is passing
feat: init
2024-07-31 22:47:18 +02:00

477 lines
15 KiB
Go

// 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"
)
// StatusHistoryGetReader is a Reader for the StatusHistoryGet structure.
type StatusHistoryGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *StatusHistoryGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewStatusHistoryGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewStatusHistoryGetBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewStatusHistoryGetUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewStatusHistoryGetForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewStatusHistoryGetNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewStatusHistoryGetNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewStatusHistoryGetInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[GET /api/v1/statuses/{id}/history] statusHistoryGet", response, response.Code())
}
}
// NewStatusHistoryGetOK creates a StatusHistoryGetOK with default headers values
func NewStatusHistoryGetOK() *StatusHistoryGetOK {
return &StatusHistoryGetOK{}
}
/*
StatusHistoryGetOK describes a response with status code 200, with default header values.
StatusHistoryGetOK status history get o k
*/
type StatusHistoryGetOK struct {
Payload []*models.StatusEdit
}
// IsSuccess returns true when this status history get o k response has a 2xx status code
func (o *StatusHistoryGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this status history get o k response has a 3xx status code
func (o *StatusHistoryGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this status history get o k response has a 4xx status code
func (o *StatusHistoryGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this status history get o k response has a 5xx status code
func (o *StatusHistoryGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this status history get o k response a status code equal to that given
func (o *StatusHistoryGetOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the status history get o k response
func (o *StatusHistoryGetOK) Code() int {
return 200
}
func (o *StatusHistoryGetOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetOK %s", 200, payload)
}
func (o *StatusHistoryGetOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetOK %s", 200, payload)
}
func (o *StatusHistoryGetOK) GetPayload() []*models.StatusEdit {
return o.Payload
}
func (o *StatusHistoryGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewStatusHistoryGetBadRequest creates a StatusHistoryGetBadRequest with default headers values
func NewStatusHistoryGetBadRequest() *StatusHistoryGetBadRequest {
return &StatusHistoryGetBadRequest{}
}
/*
StatusHistoryGetBadRequest describes a response with status code 400, with default header values.
bad request
*/
type StatusHistoryGetBadRequest struct {
}
// IsSuccess returns true when this status history get bad request response has a 2xx status code
func (o *StatusHistoryGetBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status history get bad request response has a 3xx status code
func (o *StatusHistoryGetBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this status history get bad request response has a 4xx status code
func (o *StatusHistoryGetBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this status history get bad request response has a 5xx status code
func (o *StatusHistoryGetBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this status history get bad request response a status code equal to that given
func (o *StatusHistoryGetBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the status history get bad request response
func (o *StatusHistoryGetBadRequest) Code() int {
return 400
}
func (o *StatusHistoryGetBadRequest) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetBadRequest", 400)
}
func (o *StatusHistoryGetBadRequest) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetBadRequest", 400)
}
func (o *StatusHistoryGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusHistoryGetUnauthorized creates a StatusHistoryGetUnauthorized with default headers values
func NewStatusHistoryGetUnauthorized() *StatusHistoryGetUnauthorized {
return &StatusHistoryGetUnauthorized{}
}
/*
StatusHistoryGetUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type StatusHistoryGetUnauthorized struct {
}
// IsSuccess returns true when this status history get unauthorized response has a 2xx status code
func (o *StatusHistoryGetUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status history get unauthorized response has a 3xx status code
func (o *StatusHistoryGetUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this status history get unauthorized response has a 4xx status code
func (o *StatusHistoryGetUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this status history get unauthorized response has a 5xx status code
func (o *StatusHistoryGetUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this status history get unauthorized response a status code equal to that given
func (o *StatusHistoryGetUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the status history get unauthorized response
func (o *StatusHistoryGetUnauthorized) Code() int {
return 401
}
func (o *StatusHistoryGetUnauthorized) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetUnauthorized", 401)
}
func (o *StatusHistoryGetUnauthorized) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetUnauthorized", 401)
}
func (o *StatusHistoryGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusHistoryGetForbidden creates a StatusHistoryGetForbidden with default headers values
func NewStatusHistoryGetForbidden() *StatusHistoryGetForbidden {
return &StatusHistoryGetForbidden{}
}
/*
StatusHistoryGetForbidden describes a response with status code 403, with default header values.
forbidden
*/
type StatusHistoryGetForbidden struct {
}
// IsSuccess returns true when this status history get forbidden response has a 2xx status code
func (o *StatusHistoryGetForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status history get forbidden response has a 3xx status code
func (o *StatusHistoryGetForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this status history get forbidden response has a 4xx status code
func (o *StatusHistoryGetForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this status history get forbidden response has a 5xx status code
func (o *StatusHistoryGetForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this status history get forbidden response a status code equal to that given
func (o *StatusHistoryGetForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the status history get forbidden response
func (o *StatusHistoryGetForbidden) Code() int {
return 403
}
func (o *StatusHistoryGetForbidden) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetForbidden", 403)
}
func (o *StatusHistoryGetForbidden) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetForbidden", 403)
}
func (o *StatusHistoryGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusHistoryGetNotFound creates a StatusHistoryGetNotFound with default headers values
func NewStatusHistoryGetNotFound() *StatusHistoryGetNotFound {
return &StatusHistoryGetNotFound{}
}
/*
StatusHistoryGetNotFound describes a response with status code 404, with default header values.
not found
*/
type StatusHistoryGetNotFound struct {
}
// IsSuccess returns true when this status history get not found response has a 2xx status code
func (o *StatusHistoryGetNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status history get not found response has a 3xx status code
func (o *StatusHistoryGetNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this status history get not found response has a 4xx status code
func (o *StatusHistoryGetNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this status history get not found response has a 5xx status code
func (o *StatusHistoryGetNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this status history get not found response a status code equal to that given
func (o *StatusHistoryGetNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the status history get not found response
func (o *StatusHistoryGetNotFound) Code() int {
return 404
}
func (o *StatusHistoryGetNotFound) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetNotFound", 404)
}
func (o *StatusHistoryGetNotFound) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetNotFound", 404)
}
func (o *StatusHistoryGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusHistoryGetNotAcceptable creates a StatusHistoryGetNotAcceptable with default headers values
func NewStatusHistoryGetNotAcceptable() *StatusHistoryGetNotAcceptable {
return &StatusHistoryGetNotAcceptable{}
}
/*
StatusHistoryGetNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type StatusHistoryGetNotAcceptable struct {
}
// IsSuccess returns true when this status history get not acceptable response has a 2xx status code
func (o *StatusHistoryGetNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status history get not acceptable response has a 3xx status code
func (o *StatusHistoryGetNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this status history get not acceptable response has a 4xx status code
func (o *StatusHistoryGetNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this status history get not acceptable response has a 5xx status code
func (o *StatusHistoryGetNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this status history get not acceptable response a status code equal to that given
func (o *StatusHistoryGetNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the status history get not acceptable response
func (o *StatusHistoryGetNotAcceptable) Code() int {
return 406
}
func (o *StatusHistoryGetNotAcceptable) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetNotAcceptable", 406)
}
func (o *StatusHistoryGetNotAcceptable) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetNotAcceptable", 406)
}
func (o *StatusHistoryGetNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewStatusHistoryGetInternalServerError creates a StatusHistoryGetInternalServerError with default headers values
func NewStatusHistoryGetInternalServerError() *StatusHistoryGetInternalServerError {
return &StatusHistoryGetInternalServerError{}
}
/*
StatusHistoryGetInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type StatusHistoryGetInternalServerError struct {
}
// IsSuccess returns true when this status history get internal server error response has a 2xx status code
func (o *StatusHistoryGetInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this status history get internal server error response has a 3xx status code
func (o *StatusHistoryGetInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this status history get internal server error response has a 4xx status code
func (o *StatusHistoryGetInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this status history get internal server error response has a 5xx status code
func (o *StatusHistoryGetInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this status history get internal server error response a status code equal to that given
func (o *StatusHistoryGetInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the status history get internal server error response
func (o *StatusHistoryGetInternalServerError) Code() int {
return 500
}
func (o *StatusHistoryGetInternalServerError) Error() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetInternalServerError", 500)
}
func (o *StatusHistoryGetInternalServerError) String() string {
return fmt.Sprintf("[GET /api/v1/statuses/{id}/history][%d] statusHistoryGetInternalServerError", 500)
}
func (o *StatusHistoryGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}