lib/api/members/members_client/attendees/get_attendees_responses.go

487 lines
15 KiB
Go
Raw Permalink Normal View History

2023-09-23 17:19:44 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2023 by Vernon Keenan
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package attendees
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/work/lib/api/members/members_models"
)
// GetAttendeesReader is a Reader for the GetAttendees structure.
type GetAttendeesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetAttendeesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetAttendeesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetAttendeesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetAttendeesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetAttendeesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetAttendeesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetAttendeesInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
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())
}
}
// NewGetAttendeesOK creates a GetAttendeesOK with default headers values
func NewGetAttendeesOK() *GetAttendeesOK {
return &GetAttendeesOK{}
}
/*
GetAttendeesOK describes a response with status code 200, with default header values.
Attendee Response Object
*/
type GetAttendeesOK struct {
Payload *members_models.AttendeeResponse
}
// IsSuccess returns true when this get attendees o k response has a 2xx status code
func (o *GetAttendeesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get attendees o k response has a 3xx status code
func (o *GetAttendeesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get attendees o k response has a 4xx status code
func (o *GetAttendeesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get attendees o k response has a 5xx status code
func (o *GetAttendeesOK) IsServerError() bool {
return false
}
// IsCode returns true when this get attendees o k response a status code equal to that given
func (o *GetAttendeesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get attendees o k response
func (o *GetAttendeesOK) Code() int {
return 200
}
func (o *GetAttendeesOK) Error() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesOK %+v", 200, o.Payload)
}
func (o *GetAttendeesOK) String() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesOK %+v", 200, o.Payload)
}
func (o *GetAttendeesOK) GetPayload() *members_models.AttendeeResponse {
return o.Payload
}
func (o *GetAttendeesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.AttendeeResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetAttendeesUnauthorized creates a GetAttendeesUnauthorized with default headers values
func NewGetAttendeesUnauthorized() *GetAttendeesUnauthorized {
return &GetAttendeesUnauthorized{}
}
/*
GetAttendeesUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetAttendeesUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get attendees unauthorized response has a 2xx status code
func (o *GetAttendeesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get attendees unauthorized response has a 3xx status code
func (o *GetAttendeesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get attendees unauthorized response has a 4xx status code
func (o *GetAttendeesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get attendees unauthorized response has a 5xx status code
func (o *GetAttendeesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get attendees unauthorized response a status code equal to that given
func (o *GetAttendeesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get attendees unauthorized response
func (o *GetAttendeesUnauthorized) Code() int {
return 401
}
func (o *GetAttendeesUnauthorized) Error() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesUnauthorized %+v", 401, o.Payload)
}
func (o *GetAttendeesUnauthorized) String() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesUnauthorized %+v", 401, o.Payload)
}
func (o *GetAttendeesUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetAttendeesUnauthorized) 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
}
// NewGetAttendeesForbidden creates a GetAttendeesForbidden with default headers values
func NewGetAttendeesForbidden() *GetAttendeesForbidden {
return &GetAttendeesForbidden{}
}
/*
GetAttendeesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetAttendeesForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this get attendees forbidden response has a 2xx status code
func (o *GetAttendeesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get attendees forbidden response has a 3xx status code
func (o *GetAttendeesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get attendees forbidden response has a 4xx status code
func (o *GetAttendeesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get attendees forbidden response has a 5xx status code
func (o *GetAttendeesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get attendees forbidden response a status code equal to that given
func (o *GetAttendeesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get attendees forbidden response
func (o *GetAttendeesForbidden) Code() int {
return 403
}
func (o *GetAttendeesForbidden) Error() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesForbidden %+v", 403, o.Payload)
}
func (o *GetAttendeesForbidden) String() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesForbidden %+v", 403, o.Payload)
}
func (o *GetAttendeesForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetAttendeesForbidden) 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
}
// NewGetAttendeesNotFound creates a GetAttendeesNotFound with default headers values
func NewGetAttendeesNotFound() *GetAttendeesNotFound {
return &GetAttendeesNotFound{}
}
/*
GetAttendeesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetAttendeesNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get attendees not found response has a 2xx status code
func (o *GetAttendeesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get attendees not found response has a 3xx status code
func (o *GetAttendeesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get attendees not found response has a 4xx status code
func (o *GetAttendeesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get attendees not found response has a 5xx status code
func (o *GetAttendeesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get attendees not found response a status code equal to that given
func (o *GetAttendeesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get attendees not found response
func (o *GetAttendeesNotFound) Code() int {
return 404
}
func (o *GetAttendeesNotFound) Error() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesNotFound %+v", 404, o.Payload)
}
func (o *GetAttendeesNotFound) String() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesNotFound %+v", 404, o.Payload)
}
func (o *GetAttendeesNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetAttendeesNotFound) 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
}
// NewGetAttendeesUnprocessableEntity creates a GetAttendeesUnprocessableEntity with default headers values
func NewGetAttendeesUnprocessableEntity() *GetAttendeesUnprocessableEntity {
return &GetAttendeesUnprocessableEntity{}
}
/*
GetAttendeesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetAttendeesUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get attendees unprocessable entity response has a 2xx status code
func (o *GetAttendeesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get attendees unprocessable entity response has a 3xx status code
func (o *GetAttendeesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get attendees unprocessable entity response has a 4xx status code
func (o *GetAttendeesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get attendees unprocessable entity response has a 5xx status code
func (o *GetAttendeesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get attendees unprocessable entity response a status code equal to that given
func (o *GetAttendeesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get attendees unprocessable entity response
func (o *GetAttendeesUnprocessableEntity) Code() int {
return 422
}
func (o *GetAttendeesUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetAttendeesUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetAttendeesUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetAttendeesUnprocessableEntity) 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
}
// NewGetAttendeesInternalServerError creates a GetAttendeesInternalServerError with default headers values
func NewGetAttendeesInternalServerError() *GetAttendeesInternalServerError {
return &GetAttendeesInternalServerError{}
}
/*
GetAttendeesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetAttendeesInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get attendees internal server error response has a 2xx status code
func (o *GetAttendeesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get attendees internal server error response has a 3xx status code
func (o *GetAttendeesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get attendees internal server error response has a 4xx status code
func (o *GetAttendeesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get attendees internal server error response has a 5xx status code
func (o *GetAttendeesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get attendees internal server error response a status code equal to that given
func (o *GetAttendeesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get attendees internal server error response
func (o *GetAttendeesInternalServerError) Code() int {
return 500
}
func (o *GetAttendeesInternalServerError) Error() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesInternalServerError %+v", 500, o.Payload)
}
func (o *GetAttendeesInternalServerError) String() string {
return fmt.Sprintf("[GET /attendees][%d] getAttendeesInternalServerError %+v", 500, o.Payload)
}
func (o *GetAttendeesInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetAttendeesInternalServerError) 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
}