gtslib/client/notifications/clear_notifications_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

413 lines
14 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package notifications
// 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"
)
// ClearNotificationsReader is a Reader for the ClearNotifications structure.
type ClearNotificationsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ClearNotificationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewClearNotificationsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewClearNotificationsBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 401:
result := NewClearNotificationsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewClearNotificationsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 406:
result := NewClearNotificationsNotAcceptable()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewClearNotificationsInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[POST /api/v1/notifications/clear] clearNotifications", response, response.Code())
}
}
// NewClearNotificationsOK creates a ClearNotificationsOK with default headers values
func NewClearNotificationsOK() *ClearNotificationsOK {
return &ClearNotificationsOK{}
}
/*
ClearNotificationsOK describes a response with status code 200, with default header values.
ClearNotificationsOK clear notifications o k
*/
type ClearNotificationsOK struct {
Payload interface{}
}
// IsSuccess returns true when this clear notifications o k response has a 2xx status code
func (o *ClearNotificationsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this clear notifications o k response has a 3xx status code
func (o *ClearNotificationsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this clear notifications o k response has a 4xx status code
func (o *ClearNotificationsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this clear notifications o k response has a 5xx status code
func (o *ClearNotificationsOK) IsServerError() bool {
return false
}
// IsCode returns true when this clear notifications o k response a status code equal to that given
func (o *ClearNotificationsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the clear notifications o k response
func (o *ClearNotificationsOK) Code() int {
return 200
}
func (o *ClearNotificationsOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsOK %s", 200, payload)
}
func (o *ClearNotificationsOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsOK %s", 200, payload)
}
func (o *ClearNotificationsOK) GetPayload() interface{} {
return o.Payload
}
func (o *ClearNotificationsOK) 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
}
// NewClearNotificationsBadRequest creates a ClearNotificationsBadRequest with default headers values
func NewClearNotificationsBadRequest() *ClearNotificationsBadRequest {
return &ClearNotificationsBadRequest{}
}
/*
ClearNotificationsBadRequest describes a response with status code 400, with default header values.
bad request
*/
type ClearNotificationsBadRequest struct {
}
// IsSuccess returns true when this clear notifications bad request response has a 2xx status code
func (o *ClearNotificationsBadRequest) IsSuccess() bool {
return false
}
// IsRedirect returns true when this clear notifications bad request response has a 3xx status code
func (o *ClearNotificationsBadRequest) IsRedirect() bool {
return false
}
// IsClientError returns true when this clear notifications bad request response has a 4xx status code
func (o *ClearNotificationsBadRequest) IsClientError() bool {
return true
}
// IsServerError returns true when this clear notifications bad request response has a 5xx status code
func (o *ClearNotificationsBadRequest) IsServerError() bool {
return false
}
// IsCode returns true when this clear notifications bad request response a status code equal to that given
func (o *ClearNotificationsBadRequest) IsCode(code int) bool {
return code == 400
}
// Code gets the status code for the clear notifications bad request response
func (o *ClearNotificationsBadRequest) Code() int {
return 400
}
func (o *ClearNotificationsBadRequest) Error() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsBadRequest", 400)
}
func (o *ClearNotificationsBadRequest) String() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsBadRequest", 400)
}
func (o *ClearNotificationsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewClearNotificationsUnauthorized creates a ClearNotificationsUnauthorized with default headers values
func NewClearNotificationsUnauthorized() *ClearNotificationsUnauthorized {
return &ClearNotificationsUnauthorized{}
}
/*
ClearNotificationsUnauthorized describes a response with status code 401, with default header values.
unauthorized
*/
type ClearNotificationsUnauthorized struct {
}
// IsSuccess returns true when this clear notifications unauthorized response has a 2xx status code
func (o *ClearNotificationsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this clear notifications unauthorized response has a 3xx status code
func (o *ClearNotificationsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this clear notifications unauthorized response has a 4xx status code
func (o *ClearNotificationsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this clear notifications unauthorized response has a 5xx status code
func (o *ClearNotificationsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this clear notifications unauthorized response a status code equal to that given
func (o *ClearNotificationsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the clear notifications unauthorized response
func (o *ClearNotificationsUnauthorized) Code() int {
return 401
}
func (o *ClearNotificationsUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsUnauthorized", 401)
}
func (o *ClearNotificationsUnauthorized) String() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsUnauthorized", 401)
}
func (o *ClearNotificationsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewClearNotificationsNotFound creates a ClearNotificationsNotFound with default headers values
func NewClearNotificationsNotFound() *ClearNotificationsNotFound {
return &ClearNotificationsNotFound{}
}
/*
ClearNotificationsNotFound describes a response with status code 404, with default header values.
not found
*/
type ClearNotificationsNotFound struct {
}
// IsSuccess returns true when this clear notifications not found response has a 2xx status code
func (o *ClearNotificationsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this clear notifications not found response has a 3xx status code
func (o *ClearNotificationsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this clear notifications not found response has a 4xx status code
func (o *ClearNotificationsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this clear notifications not found response has a 5xx status code
func (o *ClearNotificationsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this clear notifications not found response a status code equal to that given
func (o *ClearNotificationsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the clear notifications not found response
func (o *ClearNotificationsNotFound) Code() int {
return 404
}
func (o *ClearNotificationsNotFound) Error() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsNotFound", 404)
}
func (o *ClearNotificationsNotFound) String() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsNotFound", 404)
}
func (o *ClearNotificationsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewClearNotificationsNotAcceptable creates a ClearNotificationsNotAcceptable with default headers values
func NewClearNotificationsNotAcceptable() *ClearNotificationsNotAcceptable {
return &ClearNotificationsNotAcceptable{}
}
/*
ClearNotificationsNotAcceptable describes a response with status code 406, with default header values.
not acceptable
*/
type ClearNotificationsNotAcceptable struct {
}
// IsSuccess returns true when this clear notifications not acceptable response has a 2xx status code
func (o *ClearNotificationsNotAcceptable) IsSuccess() bool {
return false
}
// IsRedirect returns true when this clear notifications not acceptable response has a 3xx status code
func (o *ClearNotificationsNotAcceptable) IsRedirect() bool {
return false
}
// IsClientError returns true when this clear notifications not acceptable response has a 4xx status code
func (o *ClearNotificationsNotAcceptable) IsClientError() bool {
return true
}
// IsServerError returns true when this clear notifications not acceptable response has a 5xx status code
func (o *ClearNotificationsNotAcceptable) IsServerError() bool {
return false
}
// IsCode returns true when this clear notifications not acceptable response a status code equal to that given
func (o *ClearNotificationsNotAcceptable) IsCode(code int) bool {
return code == 406
}
// Code gets the status code for the clear notifications not acceptable response
func (o *ClearNotificationsNotAcceptable) Code() int {
return 406
}
func (o *ClearNotificationsNotAcceptable) Error() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsNotAcceptable", 406)
}
func (o *ClearNotificationsNotAcceptable) String() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsNotAcceptable", 406)
}
func (o *ClearNotificationsNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewClearNotificationsInternalServerError creates a ClearNotificationsInternalServerError with default headers values
func NewClearNotificationsInternalServerError() *ClearNotificationsInternalServerError {
return &ClearNotificationsInternalServerError{}
}
/*
ClearNotificationsInternalServerError describes a response with status code 500, with default header values.
internal server error
*/
type ClearNotificationsInternalServerError struct {
}
// IsSuccess returns true when this clear notifications internal server error response has a 2xx status code
func (o *ClearNotificationsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this clear notifications internal server error response has a 3xx status code
func (o *ClearNotificationsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this clear notifications internal server error response has a 4xx status code
func (o *ClearNotificationsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this clear notifications internal server error response has a 5xx status code
func (o *ClearNotificationsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this clear notifications internal server error response a status code equal to that given
func (o *ClearNotificationsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the clear notifications internal server error response
func (o *ClearNotificationsInternalServerError) Code() int {
return 500
}
func (o *ClearNotificationsInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsInternalServerError", 500)
}
func (o *ClearNotificationsInternalServerError) String() string {
return fmt.Sprintf("[POST /api/v1/notifications/clear][%d] clearNotificationsInternalServerError", 500)
}
func (o *ClearNotificationsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}