All checks were successful
continuous-integration/drone/push Build is passing
479 lines
15 KiB
Go
479 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"
|
|
)
|
|
|
|
// StatusBookmarkReader is a Reader for the StatusBookmark structure.
|
|
type StatusBookmarkReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *StatusBookmarkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewStatusBookmarkOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewStatusBookmarkBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewStatusBookmarkUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewStatusBookmarkForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewStatusBookmarkNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 406:
|
|
result := NewStatusBookmarkNotAcceptable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewStatusBookmarkInternalServerError()
|
|
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}/bookmark] statusBookmark", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewStatusBookmarkOK creates a StatusBookmarkOK with default headers values
|
|
func NewStatusBookmarkOK() *StatusBookmarkOK {
|
|
return &StatusBookmarkOK{}
|
|
}
|
|
|
|
/*
|
|
StatusBookmarkOK describes a response with status code 200, with default header values.
|
|
|
|
The status.
|
|
*/
|
|
type StatusBookmarkOK struct {
|
|
Payload *models.Status
|
|
}
|
|
|
|
// IsSuccess returns true when this status bookmark o k response has a 2xx status code
|
|
func (o *StatusBookmarkOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this status bookmark o k response has a 3xx status code
|
|
func (o *StatusBookmarkOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this status bookmark o k response has a 4xx status code
|
|
func (o *StatusBookmarkOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this status bookmark o k response has a 5xx status code
|
|
func (o *StatusBookmarkOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this status bookmark o k response a status code equal to that given
|
|
func (o *StatusBookmarkOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the status bookmark o k response
|
|
func (o *StatusBookmarkOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *StatusBookmarkOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *StatusBookmarkOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *StatusBookmarkOK) GetPayload() *models.Status {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *StatusBookmarkOK) 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
|
|
}
|
|
|
|
// NewStatusBookmarkBadRequest creates a StatusBookmarkBadRequest with default headers values
|
|
func NewStatusBookmarkBadRequest() *StatusBookmarkBadRequest {
|
|
return &StatusBookmarkBadRequest{}
|
|
}
|
|
|
|
/*
|
|
StatusBookmarkBadRequest describes a response with status code 400, with default header values.
|
|
|
|
bad request
|
|
*/
|
|
type StatusBookmarkBadRequest struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this status bookmark bad request response has a 2xx status code
|
|
func (o *StatusBookmarkBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this status bookmark bad request response has a 3xx status code
|
|
func (o *StatusBookmarkBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this status bookmark bad request response has a 4xx status code
|
|
func (o *StatusBookmarkBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this status bookmark bad request response has a 5xx status code
|
|
func (o *StatusBookmarkBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this status bookmark bad request response a status code equal to that given
|
|
func (o *StatusBookmarkBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the status bookmark bad request response
|
|
func (o *StatusBookmarkBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *StatusBookmarkBadRequest) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkBadRequest", 400)
|
|
}
|
|
|
|
func (o *StatusBookmarkBadRequest) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkBadRequest", 400)
|
|
}
|
|
|
|
func (o *StatusBookmarkBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewStatusBookmarkUnauthorized creates a StatusBookmarkUnauthorized with default headers values
|
|
func NewStatusBookmarkUnauthorized() *StatusBookmarkUnauthorized {
|
|
return &StatusBookmarkUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
StatusBookmarkUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type StatusBookmarkUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this status bookmark unauthorized response has a 2xx status code
|
|
func (o *StatusBookmarkUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this status bookmark unauthorized response has a 3xx status code
|
|
func (o *StatusBookmarkUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this status bookmark unauthorized response has a 4xx status code
|
|
func (o *StatusBookmarkUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this status bookmark unauthorized response has a 5xx status code
|
|
func (o *StatusBookmarkUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this status bookmark unauthorized response a status code equal to that given
|
|
func (o *StatusBookmarkUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the status bookmark unauthorized response
|
|
func (o *StatusBookmarkUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *StatusBookmarkUnauthorized) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkUnauthorized", 401)
|
|
}
|
|
|
|
func (o *StatusBookmarkUnauthorized) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkUnauthorized", 401)
|
|
}
|
|
|
|
func (o *StatusBookmarkUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewStatusBookmarkForbidden creates a StatusBookmarkForbidden with default headers values
|
|
func NewStatusBookmarkForbidden() *StatusBookmarkForbidden {
|
|
return &StatusBookmarkForbidden{}
|
|
}
|
|
|
|
/*
|
|
StatusBookmarkForbidden describes a response with status code 403, with default header values.
|
|
|
|
forbidden
|
|
*/
|
|
type StatusBookmarkForbidden struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this status bookmark forbidden response has a 2xx status code
|
|
func (o *StatusBookmarkForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this status bookmark forbidden response has a 3xx status code
|
|
func (o *StatusBookmarkForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this status bookmark forbidden response has a 4xx status code
|
|
func (o *StatusBookmarkForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this status bookmark forbidden response has a 5xx status code
|
|
func (o *StatusBookmarkForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this status bookmark forbidden response a status code equal to that given
|
|
func (o *StatusBookmarkForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the status bookmark forbidden response
|
|
func (o *StatusBookmarkForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *StatusBookmarkForbidden) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkForbidden", 403)
|
|
}
|
|
|
|
func (o *StatusBookmarkForbidden) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkForbidden", 403)
|
|
}
|
|
|
|
func (o *StatusBookmarkForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewStatusBookmarkNotFound creates a StatusBookmarkNotFound with default headers values
|
|
func NewStatusBookmarkNotFound() *StatusBookmarkNotFound {
|
|
return &StatusBookmarkNotFound{}
|
|
}
|
|
|
|
/*
|
|
StatusBookmarkNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type StatusBookmarkNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this status bookmark not found response has a 2xx status code
|
|
func (o *StatusBookmarkNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this status bookmark not found response has a 3xx status code
|
|
func (o *StatusBookmarkNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this status bookmark not found response has a 4xx status code
|
|
func (o *StatusBookmarkNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this status bookmark not found response has a 5xx status code
|
|
func (o *StatusBookmarkNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this status bookmark not found response a status code equal to that given
|
|
func (o *StatusBookmarkNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the status bookmark not found response
|
|
func (o *StatusBookmarkNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *StatusBookmarkNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkNotFound", 404)
|
|
}
|
|
|
|
func (o *StatusBookmarkNotFound) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkNotFound", 404)
|
|
}
|
|
|
|
func (o *StatusBookmarkNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewStatusBookmarkNotAcceptable creates a StatusBookmarkNotAcceptable with default headers values
|
|
func NewStatusBookmarkNotAcceptable() *StatusBookmarkNotAcceptable {
|
|
return &StatusBookmarkNotAcceptable{}
|
|
}
|
|
|
|
/*
|
|
StatusBookmarkNotAcceptable describes a response with status code 406, with default header values.
|
|
|
|
not acceptable
|
|
*/
|
|
type StatusBookmarkNotAcceptable struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this status bookmark not acceptable response has a 2xx status code
|
|
func (o *StatusBookmarkNotAcceptable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this status bookmark not acceptable response has a 3xx status code
|
|
func (o *StatusBookmarkNotAcceptable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this status bookmark not acceptable response has a 4xx status code
|
|
func (o *StatusBookmarkNotAcceptable) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this status bookmark not acceptable response has a 5xx status code
|
|
func (o *StatusBookmarkNotAcceptable) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this status bookmark not acceptable response a status code equal to that given
|
|
func (o *StatusBookmarkNotAcceptable) IsCode(code int) bool {
|
|
return code == 406
|
|
}
|
|
|
|
// Code gets the status code for the status bookmark not acceptable response
|
|
func (o *StatusBookmarkNotAcceptable) Code() int {
|
|
return 406
|
|
}
|
|
|
|
func (o *StatusBookmarkNotAcceptable) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *StatusBookmarkNotAcceptable) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkNotAcceptable", 406)
|
|
}
|
|
|
|
func (o *StatusBookmarkNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewStatusBookmarkInternalServerError creates a StatusBookmarkInternalServerError with default headers values
|
|
func NewStatusBookmarkInternalServerError() *StatusBookmarkInternalServerError {
|
|
return &StatusBookmarkInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
StatusBookmarkInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type StatusBookmarkInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this status bookmark internal server error response has a 2xx status code
|
|
func (o *StatusBookmarkInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this status bookmark internal server error response has a 3xx status code
|
|
func (o *StatusBookmarkInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this status bookmark internal server error response has a 4xx status code
|
|
func (o *StatusBookmarkInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this status bookmark internal server error response has a 5xx status code
|
|
func (o *StatusBookmarkInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this status bookmark internal server error response a status code equal to that given
|
|
func (o *StatusBookmarkInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the status bookmark internal server error response
|
|
func (o *StatusBookmarkInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *StatusBookmarkInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkInternalServerError", 500)
|
|
}
|
|
|
|
func (o *StatusBookmarkInternalServerError) String() string {
|
|
return fmt.Sprintf("[POST /api/v1/statuses/{id}/bookmark][%d] statusBookmarkInternalServerError", 500)
|
|
}
|
|
|
|
func (o *StatusBookmarkInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|