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"
|
||
|
)
|
||
|
|
||
|
// PostEventCategoriesReader is a Reader for the PostEventCategories structure.
|
||
|
type PostEventCategoriesReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *PostEventCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewPostEventCategoriesOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewPostEventCategoriesUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewPostEventCategoriesForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewPostEventCategoriesNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewPostEventCategoriesUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewPostEventCategoriesInternalServerError()
|
||
|
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())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPostEventCategoriesOK creates a PostEventCategoriesOK with default headers values
|
||
|
func NewPostEventCategoriesOK() *PostEventCategoriesOK {
|
||
|
return &PostEventCategoriesOK{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostEventCategoriesOK describes a response with status code 200, with default header values.
|
||
|
|
||
|
Event Response Object
|
||
|
*/
|
||
|
type PostEventCategoriesOK struct {
|
||
|
Payload *members_models.EventCategoryResponse
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post event categories o k response has a 2xx status code
|
||
|
func (o *PostEventCategoriesOK) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post event categories o k response has a 3xx status code
|
||
|
func (o *PostEventCategoriesOK) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post event categories o k response has a 4xx status code
|
||
|
func (o *PostEventCategoriesOK) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post event categories o k response has a 5xx status code
|
||
|
func (o *PostEventCategoriesOK) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post event categories o k response a status code equal to that given
|
||
|
func (o *PostEventCategoriesOK) IsCode(code int) bool {
|
||
|
return code == 200
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post event categories o k response
|
||
|
func (o *PostEventCategoriesOK) Code() int {
|
||
|
return 200
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesOK) Error() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesOK) String() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesOK) GetPayload() *members_models.EventCategoryResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesOK) 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
|
||
|
}
|
||
|
|
||
|
// NewPostEventCategoriesUnauthorized creates a PostEventCategoriesUnauthorized with default headers values
|
||
|
func NewPostEventCategoriesUnauthorized() *PostEventCategoriesUnauthorized {
|
||
|
return &PostEventCategoriesUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostEventCategoriesUnauthorized describes a response with status code 401, with default header values.
|
||
|
|
||
|
Access Unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type PostEventCategoriesUnauthorized struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post event categories unauthorized response has a 2xx status code
|
||
|
func (o *PostEventCategoriesUnauthorized) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post event categories unauthorized response has a 3xx status code
|
||
|
func (o *PostEventCategoriesUnauthorized) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post event categories unauthorized response has a 4xx status code
|
||
|
func (o *PostEventCategoriesUnauthorized) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post event categories unauthorized response has a 5xx status code
|
||
|
func (o *PostEventCategoriesUnauthorized) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post event categories unauthorized response a status code equal to that given
|
||
|
func (o *PostEventCategoriesUnauthorized) IsCode(code int) bool {
|
||
|
return code == 401
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post event categories unauthorized response
|
||
|
func (o *PostEventCategoriesUnauthorized) Code() int {
|
||
|
return 401
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesUnauthorized) String() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesUnauthorized) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesUnauthorized) 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
|
||
|
}
|
||
|
|
||
|
// NewPostEventCategoriesForbidden creates a PostEventCategoriesForbidden with default headers values
|
||
|
func NewPostEventCategoriesForbidden() *PostEventCategoriesForbidden {
|
||
|
return &PostEventCategoriesForbidden{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostEventCategoriesForbidden describes a response with status code 403, with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type PostEventCategoriesForbidden struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post event categories forbidden response has a 2xx status code
|
||
|
func (o *PostEventCategoriesForbidden) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post event categories forbidden response has a 3xx status code
|
||
|
func (o *PostEventCategoriesForbidden) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post event categories forbidden response has a 4xx status code
|
||
|
func (o *PostEventCategoriesForbidden) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post event categories forbidden response has a 5xx status code
|
||
|
func (o *PostEventCategoriesForbidden) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post event categories forbidden response a status code equal to that given
|
||
|
func (o *PostEventCategoriesForbidden) IsCode(code int) bool {
|
||
|
return code == 403
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post event categories forbidden response
|
||
|
func (o *PostEventCategoriesForbidden) Code() int {
|
||
|
return 403
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesForbidden) Error() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesForbidden) String() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesForbidden) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesForbidden) 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
|
||
|
}
|
||
|
|
||
|
// NewPostEventCategoriesNotFound creates a PostEventCategoriesNotFound with default headers values
|
||
|
func NewPostEventCategoriesNotFound() *PostEventCategoriesNotFound {
|
||
|
return &PostEventCategoriesNotFound{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostEventCategoriesNotFound describes a response with status code 404, with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type PostEventCategoriesNotFound struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post event categories not found response has a 2xx status code
|
||
|
func (o *PostEventCategoriesNotFound) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post event categories not found response has a 3xx status code
|
||
|
func (o *PostEventCategoriesNotFound) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post event categories not found response has a 4xx status code
|
||
|
func (o *PostEventCategoriesNotFound) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post event categories not found response has a 5xx status code
|
||
|
func (o *PostEventCategoriesNotFound) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post event categories not found response a status code equal to that given
|
||
|
func (o *PostEventCategoriesNotFound) IsCode(code int) bool {
|
||
|
return code == 404
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post event categories not found response
|
||
|
func (o *PostEventCategoriesNotFound) Code() int {
|
||
|
return 404
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesNotFound) Error() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesNotFound) String() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesNotFound) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesNotFound) 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
|
||
|
}
|
||
|
|
||
|
// NewPostEventCategoriesUnprocessableEntity creates a PostEventCategoriesUnprocessableEntity with default headers values
|
||
|
func NewPostEventCategoriesUnprocessableEntity() *PostEventCategoriesUnprocessableEntity {
|
||
|
return &PostEventCategoriesUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostEventCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type PostEventCategoriesUnprocessableEntity struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post event categories unprocessable entity response has a 2xx status code
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post event categories unprocessable entity response has a 3xx status code
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post event categories unprocessable entity response has a 4xx status code
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post event categories unprocessable entity response has a 5xx status code
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post event categories unprocessable entity response a status code equal to that given
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) IsCode(code int) bool {
|
||
|
return code == 422
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post event categories unprocessable entity response
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) Code() int {
|
||
|
return 422
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) String() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesUnprocessableEntity) 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
|
||
|
}
|
||
|
|
||
|
// NewPostEventCategoriesInternalServerError creates a PostEventCategoriesInternalServerError with default headers values
|
||
|
func NewPostEventCategoriesInternalServerError() *PostEventCategoriesInternalServerError {
|
||
|
return &PostEventCategoriesInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostEventCategoriesInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type PostEventCategoriesInternalServerError struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post event categories internal server error response has a 2xx status code
|
||
|
func (o *PostEventCategoriesInternalServerError) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post event categories internal server error response has a 3xx status code
|
||
|
func (o *PostEventCategoriesInternalServerError) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post event categories internal server error response has a 4xx status code
|
||
|
func (o *PostEventCategoriesInternalServerError) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post event categories internal server error response has a 5xx status code
|
||
|
func (o *PostEventCategoriesInternalServerError) IsServerError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post event categories internal server error response a status code equal to that given
|
||
|
func (o *PostEventCategoriesInternalServerError) IsCode(code int) bool {
|
||
|
return code == 500
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post event categories internal server error response
|
||
|
func (o *PostEventCategoriesInternalServerError) Code() int {
|
||
|
return 500
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesInternalServerError) String() string {
|
||
|
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesInternalServerError) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostEventCategoriesInternalServerError) 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
|
||
|
}
|