lib/api/members/members_client/events/update_event_responses.go

487 lines
14 KiB
Go
Raw Normal View History

2023-03-28 17:47:34 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
2023-04-07 18:00:15 +00:00
package events
2023-03-28 17:47:34 +00:00
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
2023-04-30 02:07:31 +00:00
"io"
2023-03-28 17:47:34 +00:00
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
2023-04-30 02:07:31 +00:00
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
2023-03-28 17:47:34 +00:00
)
// UpdateEventReader is a Reader for the UpdateEvent structure.
type UpdateEventReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *UpdateEventReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewUpdateEventOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
2023-04-30 02:07:31 +00:00
case 401:
result := NewUpdateEventUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewUpdateEventForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewUpdateEventNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewUpdateEventUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewUpdateEventInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
2023-03-28 17:47:34 +00:00
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewUpdateEventOK creates a UpdateEventOK with default headers values
func NewUpdateEventOK() *UpdateEventOK {
return &UpdateEventOK{}
}
/*
UpdateEventOK describes a response with status code 200, with default header values.
2023-04-30 02:07:31 +00:00
Event Response Object
2023-03-28 17:47:34 +00:00
*/
type UpdateEventOK struct {
2023-04-30 02:07:31 +00:00
Payload *members_models.EventResponse
2023-03-28 17:47:34 +00:00
}
// IsSuccess returns true when this update event o k response has a 2xx status code
func (o *UpdateEventOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this update event o k response has a 3xx status code
func (o *UpdateEventOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event o k response has a 4xx status code
func (o *UpdateEventOK) IsClientError() bool {
return false
}
// IsServerError returns true when this update event o k response has a 5xx status code
func (o *UpdateEventOK) IsServerError() bool {
return false
}
// IsCode returns true when this update event o k response a status code equal to that given
func (o *UpdateEventOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the update event o k response
func (o *UpdateEventOK) Code() int {
return 200
}
func (o *UpdateEventOK) Error() string {
2023-04-30 02:07:31 +00:00
return fmt.Sprintf("[PUT /events][%d] updateEventOK %+v", 200, o.Payload)
2023-03-28 17:47:34 +00:00
}
func (o *UpdateEventOK) String() string {
2023-04-30 02:07:31 +00:00
return fmt.Sprintf("[PUT /events][%d] updateEventOK %+v", 200, o.Payload)
}
func (o *UpdateEventOK) GetPayload() *members_models.EventResponse {
return o.Payload
2023-03-28 17:47:34 +00:00
}
func (o *UpdateEventOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2023-04-30 02:07:31 +00:00
o.Payload = new(members_models.EventResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateEventUnauthorized creates a UpdateEventUnauthorized with default headers values
func NewUpdateEventUnauthorized() *UpdateEventUnauthorized {
return &UpdateEventUnauthorized{}
}
/*
UpdateEventUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type UpdateEventUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update event unauthorized response has a 2xx status code
func (o *UpdateEventUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event unauthorized response has a 3xx status code
func (o *UpdateEventUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event unauthorized response has a 4xx status code
func (o *UpdateEventUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this update event unauthorized response has a 5xx status code
func (o *UpdateEventUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this update event unauthorized response a status code equal to that given
func (o *UpdateEventUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the update event unauthorized response
func (o *UpdateEventUnauthorized) Code() int {
return 401
}
func (o *UpdateEventUnauthorized) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventUnauthorized %+v", 401, o.Payload)
}
func (o *UpdateEventUnauthorized) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventUnauthorized %+v", 401, o.Payload)
}
func (o *UpdateEventUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateEventForbidden creates a UpdateEventForbidden with default headers values
func NewUpdateEventForbidden() *UpdateEventForbidden {
return &UpdateEventForbidden{}
}
/*
UpdateEventForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type UpdateEventForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this update event forbidden response has a 2xx status code
func (o *UpdateEventForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event forbidden response has a 3xx status code
func (o *UpdateEventForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event forbidden response has a 4xx status code
func (o *UpdateEventForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this update event forbidden response has a 5xx status code
func (o *UpdateEventForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this update event forbidden response a status code equal to that given
func (o *UpdateEventForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the update event forbidden response
func (o *UpdateEventForbidden) Code() int {
return 403
}
func (o *UpdateEventForbidden) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventForbidden %+v", 403, o.Payload)
}
func (o *UpdateEventForbidden) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventForbidden %+v", 403, o.Payload)
}
func (o *UpdateEventForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateEventNotFound creates a UpdateEventNotFound with default headers values
func NewUpdateEventNotFound() *UpdateEventNotFound {
return &UpdateEventNotFound{}
}
/*
UpdateEventNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type UpdateEventNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update event not found response has a 2xx status code
func (o *UpdateEventNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event not found response has a 3xx status code
func (o *UpdateEventNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event not found response has a 4xx status code
func (o *UpdateEventNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this update event not found response has a 5xx status code
func (o *UpdateEventNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this update event not found response a status code equal to that given
func (o *UpdateEventNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the update event not found response
func (o *UpdateEventNotFound) Code() int {
return 404
}
func (o *UpdateEventNotFound) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventNotFound %+v", 404, o.Payload)
}
func (o *UpdateEventNotFound) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventNotFound %+v", 404, o.Payload)
}
func (o *UpdateEventNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateEventUnprocessableEntity creates a UpdateEventUnprocessableEntity with default headers values
func NewUpdateEventUnprocessableEntity() *UpdateEventUnprocessableEntity {
return &UpdateEventUnprocessableEntity{}
}
/*
UpdateEventUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type UpdateEventUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update event unprocessable entity response has a 2xx status code
func (o *UpdateEventUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event unprocessable entity response has a 3xx status code
func (o *UpdateEventUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event unprocessable entity response has a 4xx status code
func (o *UpdateEventUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this update event unprocessable entity response has a 5xx status code
func (o *UpdateEventUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this update event unprocessable entity response a status code equal to that given
func (o *UpdateEventUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the update event unprocessable entity response
func (o *UpdateEventUnprocessableEntity) Code() int {
return 422
}
func (o *UpdateEventUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventUnprocessableEntity %+v", 422, o.Payload)
}
func (o *UpdateEventUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventUnprocessableEntity %+v", 422, o.Payload)
}
func (o *UpdateEventUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateEventInternalServerError creates a UpdateEventInternalServerError with default headers values
func NewUpdateEventInternalServerError() *UpdateEventInternalServerError {
return &UpdateEventInternalServerError{}
}
/*
UpdateEventInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type UpdateEventInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update event internal server error response has a 2xx status code
func (o *UpdateEventInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event internal server error response has a 3xx status code
func (o *UpdateEventInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event internal server error response has a 4xx status code
func (o *UpdateEventInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this update event internal server error response has a 5xx status code
func (o *UpdateEventInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this update event internal server error response a status code equal to that given
func (o *UpdateEventInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the update event internal server error response
func (o *UpdateEventInternalServerError) Code() int {
return 500
}
func (o *UpdateEventInternalServerError) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventInternalServerError %+v", 500, o.Payload)
}
func (o *UpdateEventInternalServerError) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventInternalServerError %+v", 500, o.Payload)
}
func (o *UpdateEventInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
2023-03-28 17:47:34 +00:00
return nil
}