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

487 lines
15 KiB
Go
Raw 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"
)
// PutAttendeesReader is a Reader for the PutAttendees structure.
type PutAttendeesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutAttendeesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPutAttendeesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutAttendeesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPutAttendeesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutAttendeesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutAttendeesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutAttendeesInternalServerError()
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())
}
}
// NewPutAttendeesOK creates a PutAttendeesOK with default headers values
func NewPutAttendeesOK() *PutAttendeesOK {
return &PutAttendeesOK{}
}
/*
PutAttendeesOK describes a response with status code 200, with default header values.
Attendee Response Object
*/
type PutAttendeesOK struct {
Payload *members_models.AttendeeResponse
}
// IsSuccess returns true when this put attendees o k response has a 2xx status code
func (o *PutAttendeesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put attendees o k response has a 3xx status code
func (o *PutAttendeesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put attendees o k response has a 4xx status code
func (o *PutAttendeesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put attendees o k response has a 5xx status code
func (o *PutAttendeesOK) IsServerError() bool {
return false
}
// IsCode returns true when this put attendees o k response a status code equal to that given
func (o *PutAttendeesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put attendees o k response
func (o *PutAttendeesOK) Code() int {
return 200
}
func (o *PutAttendeesOK) Error() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesOK %+v", 200, o.Payload)
}
func (o *PutAttendeesOK) String() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesOK %+v", 200, o.Payload)
}
func (o *PutAttendeesOK) GetPayload() *members_models.AttendeeResponse {
return o.Payload
}
func (o *PutAttendeesOK) 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
}
// NewPutAttendeesUnauthorized creates a PutAttendeesUnauthorized with default headers values
func NewPutAttendeesUnauthorized() *PutAttendeesUnauthorized {
return &PutAttendeesUnauthorized{}
}
/*
PutAttendeesUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PutAttendeesUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put attendees unauthorized response has a 2xx status code
func (o *PutAttendeesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put attendees unauthorized response has a 3xx status code
func (o *PutAttendeesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put attendees unauthorized response has a 4xx status code
func (o *PutAttendeesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put attendees unauthorized response has a 5xx status code
func (o *PutAttendeesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put attendees unauthorized response a status code equal to that given
func (o *PutAttendeesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put attendees unauthorized response
func (o *PutAttendeesUnauthorized) Code() int {
return 401
}
func (o *PutAttendeesUnauthorized) Error() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesUnauthorized %+v", 401, o.Payload)
}
func (o *PutAttendeesUnauthorized) String() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesUnauthorized %+v", 401, o.Payload)
}
func (o *PutAttendeesUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutAttendeesUnauthorized) 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
}
// NewPutAttendeesForbidden creates a PutAttendeesForbidden with default headers values
func NewPutAttendeesForbidden() *PutAttendeesForbidden {
return &PutAttendeesForbidden{}
}
/*
PutAttendeesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PutAttendeesForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this put attendees forbidden response has a 2xx status code
func (o *PutAttendeesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put attendees forbidden response has a 3xx status code
func (o *PutAttendeesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this put attendees forbidden response has a 4xx status code
func (o *PutAttendeesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this put attendees forbidden response has a 5xx status code
func (o *PutAttendeesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this put attendees forbidden response a status code equal to that given
func (o *PutAttendeesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the put attendees forbidden response
func (o *PutAttendeesForbidden) Code() int {
return 403
}
func (o *PutAttendeesForbidden) Error() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesForbidden %+v", 403, o.Payload)
}
func (o *PutAttendeesForbidden) String() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesForbidden %+v", 403, o.Payload)
}
func (o *PutAttendeesForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutAttendeesForbidden) 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
}
// NewPutAttendeesNotFound creates a PutAttendeesNotFound with default headers values
func NewPutAttendeesNotFound() *PutAttendeesNotFound {
return &PutAttendeesNotFound{}
}
/*
PutAttendeesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PutAttendeesNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put attendees not found response has a 2xx status code
func (o *PutAttendeesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put attendees not found response has a 3xx status code
func (o *PutAttendeesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put attendees not found response has a 4xx status code
func (o *PutAttendeesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put attendees not found response has a 5xx status code
func (o *PutAttendeesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put attendees not found response a status code equal to that given
func (o *PutAttendeesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put attendees not found response
func (o *PutAttendeesNotFound) Code() int {
return 404
}
func (o *PutAttendeesNotFound) Error() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesNotFound %+v", 404, o.Payload)
}
func (o *PutAttendeesNotFound) String() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesNotFound %+v", 404, o.Payload)
}
func (o *PutAttendeesNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutAttendeesNotFound) 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
}
// NewPutAttendeesUnprocessableEntity creates a PutAttendeesUnprocessableEntity with default headers values
func NewPutAttendeesUnprocessableEntity() *PutAttendeesUnprocessableEntity {
return &PutAttendeesUnprocessableEntity{}
}
/*
PutAttendeesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PutAttendeesUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put attendees unprocessable entity response has a 2xx status code
func (o *PutAttendeesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put attendees unprocessable entity response has a 3xx status code
func (o *PutAttendeesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put attendees unprocessable entity response has a 4xx status code
func (o *PutAttendeesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put attendees unprocessable entity response has a 5xx status code
func (o *PutAttendeesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put attendees unprocessable entity response a status code equal to that given
func (o *PutAttendeesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put attendees unprocessable entity response
func (o *PutAttendeesUnprocessableEntity) Code() int {
return 422
}
func (o *PutAttendeesUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutAttendeesUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutAttendeesUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutAttendeesUnprocessableEntity) 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
}
// NewPutAttendeesInternalServerError creates a PutAttendeesInternalServerError with default headers values
func NewPutAttendeesInternalServerError() *PutAttendeesInternalServerError {
return &PutAttendeesInternalServerError{}
}
/*
PutAttendeesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PutAttendeesInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put attendees internal server error response has a 2xx status code
func (o *PutAttendeesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put attendees internal server error response has a 3xx status code
func (o *PutAttendeesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put attendees internal server error response has a 4xx status code
func (o *PutAttendeesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put attendees internal server error response has a 5xx status code
func (o *PutAttendeesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put attendees internal server error response a status code equal to that given
func (o *PutAttendeesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put attendees internal server error response
func (o *PutAttendeesInternalServerError) Code() int {
return 500
}
func (o *PutAttendeesInternalServerError) Error() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesInternalServerError %+v", 500, o.Payload)
}
func (o *PutAttendeesInternalServerError) String() string {
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesInternalServerError %+v", 500, o.Payload)
}
func (o *PutAttendeesInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutAttendeesInternalServerError) 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
}