mirror of https://github.com/vernonkeenan/lib
487 lines
16 KiB
Go
487 lines
16 KiB
Go
|
// 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
|
||
|
|
||
|
package events
|
||
|
|
||
|
// 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/vernonkeenan/lib/api/members/members_models"
|
||
|
)
|
||
|
|
||
|
// GetEventCategoriesReader is a Reader for the GetEventCategories structure.
|
||
|
type GetEventCategoriesReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *GetEventCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewGetEventCategoriesOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewGetEventCategoriesUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewGetEventCategoriesForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewGetEventCategoriesNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewGetEventCategoriesUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewGetEventCategoriesInternalServerError()
|
||
|
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())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewGetEventCategoriesOK creates a GetEventCategoriesOK with default headers values
|
||
|
func NewGetEventCategoriesOK() *GetEventCategoriesOK {
|
||
|
return &GetEventCategoriesOK{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEventCategoriesOK describes a response with status code 200, with default header values.
|
||
|
|
||
|
Event Response Object
|
||
|
*/
|
||
|
type GetEventCategoriesOK struct {
|
||
|
Payload *members_models.EventCategoryResponse
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get event categories o k response has a 2xx status code
|
||
|
func (o *GetEventCategoriesOK) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get event categories o k response has a 3xx status code
|
||
|
func (o *GetEventCategoriesOK) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get event categories o k response has a 4xx status code
|
||
|
func (o *GetEventCategoriesOK) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get event categories o k response has a 5xx status code
|
||
|
func (o *GetEventCategoriesOK) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get event categories o k response a status code equal to that given
|
||
|
func (o *GetEventCategoriesOK) IsCode(code int) bool {
|
||
|
return code == 200
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get event categories o k response
|
||
|
func (o *GetEventCategoriesOK) Code() int {
|
||
|
return 200
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesOK) Error() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesOK) String() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesOK) GetPayload() *members_models.EventCategoryResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(members_models.EventCategoryResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewGetEventCategoriesUnauthorized creates a GetEventCategoriesUnauthorized with default headers values
|
||
|
func NewGetEventCategoriesUnauthorized() *GetEventCategoriesUnauthorized {
|
||
|
return &GetEventCategoriesUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEventCategoriesUnauthorized describes a response with status code 401, with default header values.
|
||
|
|
||
|
Access Unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type GetEventCategoriesUnauthorized struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get event categories unauthorized response has a 2xx status code
|
||
|
func (o *GetEventCategoriesUnauthorized) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get event categories unauthorized response has a 3xx status code
|
||
|
func (o *GetEventCategoriesUnauthorized) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get event categories unauthorized response has a 4xx status code
|
||
|
func (o *GetEventCategoriesUnauthorized) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get event categories unauthorized response has a 5xx status code
|
||
|
func (o *GetEventCategoriesUnauthorized) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get event categories unauthorized response a status code equal to that given
|
||
|
func (o *GetEventCategoriesUnauthorized) IsCode(code int) bool {
|
||
|
return code == 401
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get event categories unauthorized response
|
||
|
func (o *GetEventCategoriesUnauthorized) Code() int {
|
||
|
return 401
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesUnauthorized) String() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesUnauthorized) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesUnauthorized) 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
|
||
|
}
|
||
|
|
||
|
// NewGetEventCategoriesForbidden creates a GetEventCategoriesForbidden with default headers values
|
||
|
func NewGetEventCategoriesForbidden() *GetEventCategoriesForbidden {
|
||
|
return &GetEventCategoriesForbidden{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEventCategoriesForbidden describes a response with status code 403, with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type GetEventCategoriesForbidden struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get event categories forbidden response has a 2xx status code
|
||
|
func (o *GetEventCategoriesForbidden) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get event categories forbidden response has a 3xx status code
|
||
|
func (o *GetEventCategoriesForbidden) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get event categories forbidden response has a 4xx status code
|
||
|
func (o *GetEventCategoriesForbidden) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get event categories forbidden response has a 5xx status code
|
||
|
func (o *GetEventCategoriesForbidden) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get event categories forbidden response a status code equal to that given
|
||
|
func (o *GetEventCategoriesForbidden) IsCode(code int) bool {
|
||
|
return code == 403
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get event categories forbidden response
|
||
|
func (o *GetEventCategoriesForbidden) Code() int {
|
||
|
return 403
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesForbidden) Error() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesForbidden) String() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesForbidden) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesForbidden) 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
|
||
|
}
|
||
|
|
||
|
// NewGetEventCategoriesNotFound creates a GetEventCategoriesNotFound with default headers values
|
||
|
func NewGetEventCategoriesNotFound() *GetEventCategoriesNotFound {
|
||
|
return &GetEventCategoriesNotFound{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEventCategoriesNotFound describes a response with status code 404, with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type GetEventCategoriesNotFound struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get event categories not found response has a 2xx status code
|
||
|
func (o *GetEventCategoriesNotFound) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get event categories not found response has a 3xx status code
|
||
|
func (o *GetEventCategoriesNotFound) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get event categories not found response has a 4xx status code
|
||
|
func (o *GetEventCategoriesNotFound) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get event categories not found response has a 5xx status code
|
||
|
func (o *GetEventCategoriesNotFound) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get event categories not found response a status code equal to that given
|
||
|
func (o *GetEventCategoriesNotFound) IsCode(code int) bool {
|
||
|
return code == 404
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get event categories not found response
|
||
|
func (o *GetEventCategoriesNotFound) Code() int {
|
||
|
return 404
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesNotFound) Error() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesNotFound) String() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesNotFound) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesNotFound) 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
|
||
|
}
|
||
|
|
||
|
// NewGetEventCategoriesUnprocessableEntity creates a GetEventCategoriesUnprocessableEntity with default headers values
|
||
|
func NewGetEventCategoriesUnprocessableEntity() *GetEventCategoriesUnprocessableEntity {
|
||
|
return &GetEventCategoriesUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEventCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type GetEventCategoriesUnprocessableEntity struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get event categories unprocessable entity response has a 2xx status code
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get event categories unprocessable entity response has a 3xx status code
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get event categories unprocessable entity response has a 4xx status code
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get event categories unprocessable entity response has a 5xx status code
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get event categories unprocessable entity response a status code equal to that given
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) IsCode(code int) bool {
|
||
|
return code == 422
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get event categories unprocessable entity response
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) Code() int {
|
||
|
return 422
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) String() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesUnprocessableEntity) 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
|
||
|
}
|
||
|
|
||
|
// NewGetEventCategoriesInternalServerError creates a GetEventCategoriesInternalServerError with default headers values
|
||
|
func NewGetEventCategoriesInternalServerError() *GetEventCategoriesInternalServerError {
|
||
|
return &GetEventCategoriesInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEventCategoriesInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type GetEventCategoriesInternalServerError struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get event categories internal server error response has a 2xx status code
|
||
|
func (o *GetEventCategoriesInternalServerError) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get event categories internal server error response has a 3xx status code
|
||
|
func (o *GetEventCategoriesInternalServerError) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get event categories internal server error response has a 4xx status code
|
||
|
func (o *GetEventCategoriesInternalServerError) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get event categories internal server error response has a 5xx status code
|
||
|
func (o *GetEventCategoriesInternalServerError) IsServerError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get event categories internal server error response a status code equal to that given
|
||
|
func (o *GetEventCategoriesInternalServerError) IsCode(code int) bool {
|
||
|
return code == 500
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get event categories internal server error response
|
||
|
func (o *GetEventCategoriesInternalServerError) Code() int {
|
||
|
return 500
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesInternalServerError) String() string {
|
||
|
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesInternalServerError) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEventCategoriesInternalServerError) 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
|
||
|
}
|