lib/api/members/members_client/track_topics/put_track_topics_responses.go

487 lines
15 KiB
Go

// 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 track_topics
// 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"
)
// PutTrackTopicsReader is a Reader for the PutTrackTopics structure.
type PutTrackTopicsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutTrackTopicsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPutTrackTopicsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutTrackTopicsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPutTrackTopicsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutTrackTopicsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutTrackTopicsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutTrackTopicsInternalServerError()
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())
}
}
// NewPutTrackTopicsOK creates a PutTrackTopicsOK with default headers values
func NewPutTrackTopicsOK() *PutTrackTopicsOK {
return &PutTrackTopicsOK{}
}
/*
PutTrackTopicsOK describes a response with status code 200, with default header values.
TrackTopic Response Object
*/
type PutTrackTopicsOK struct {
Payload *members_models.TrackTopicResponse
}
// IsSuccess returns true when this put track topics o k response has a 2xx status code
func (o *PutTrackTopicsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put track topics o k response has a 3xx status code
func (o *PutTrackTopicsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put track topics o k response has a 4xx status code
func (o *PutTrackTopicsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put track topics o k response has a 5xx status code
func (o *PutTrackTopicsOK) IsServerError() bool {
return false
}
// IsCode returns true when this put track topics o k response a status code equal to that given
func (o *PutTrackTopicsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put track topics o k response
func (o *PutTrackTopicsOK) Code() int {
return 200
}
func (o *PutTrackTopicsOK) Error() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsOK %+v", 200, o.Payload)
}
func (o *PutTrackTopicsOK) String() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsOK %+v", 200, o.Payload)
}
func (o *PutTrackTopicsOK) GetPayload() *members_models.TrackTopicResponse {
return o.Payload
}
func (o *PutTrackTopicsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.TrackTopicResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPutTrackTopicsUnauthorized creates a PutTrackTopicsUnauthorized with default headers values
func NewPutTrackTopicsUnauthorized() *PutTrackTopicsUnauthorized {
return &PutTrackTopicsUnauthorized{}
}
/*
PutTrackTopicsUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PutTrackTopicsUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put track topics unauthorized response has a 2xx status code
func (o *PutTrackTopicsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put track topics unauthorized response has a 3xx status code
func (o *PutTrackTopicsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put track topics unauthorized response has a 4xx status code
func (o *PutTrackTopicsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put track topics unauthorized response has a 5xx status code
func (o *PutTrackTopicsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put track topics unauthorized response a status code equal to that given
func (o *PutTrackTopicsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put track topics unauthorized response
func (o *PutTrackTopicsUnauthorized) Code() int {
return 401
}
func (o *PutTrackTopicsUnauthorized) Error() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsUnauthorized %+v", 401, o.Payload)
}
func (o *PutTrackTopicsUnauthorized) String() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsUnauthorized %+v", 401, o.Payload)
}
func (o *PutTrackTopicsUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTrackTopicsUnauthorized) 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
}
// NewPutTrackTopicsForbidden creates a PutTrackTopicsForbidden with default headers values
func NewPutTrackTopicsForbidden() *PutTrackTopicsForbidden {
return &PutTrackTopicsForbidden{}
}
/*
PutTrackTopicsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PutTrackTopicsForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this put track topics forbidden response has a 2xx status code
func (o *PutTrackTopicsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put track topics forbidden response has a 3xx status code
func (o *PutTrackTopicsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this put track topics forbidden response has a 4xx status code
func (o *PutTrackTopicsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this put track topics forbidden response has a 5xx status code
func (o *PutTrackTopicsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this put track topics forbidden response a status code equal to that given
func (o *PutTrackTopicsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the put track topics forbidden response
func (o *PutTrackTopicsForbidden) Code() int {
return 403
}
func (o *PutTrackTopicsForbidden) Error() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsForbidden %+v", 403, o.Payload)
}
func (o *PutTrackTopicsForbidden) String() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsForbidden %+v", 403, o.Payload)
}
func (o *PutTrackTopicsForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTrackTopicsForbidden) 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
}
// NewPutTrackTopicsNotFound creates a PutTrackTopicsNotFound with default headers values
func NewPutTrackTopicsNotFound() *PutTrackTopicsNotFound {
return &PutTrackTopicsNotFound{}
}
/*
PutTrackTopicsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PutTrackTopicsNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put track topics not found response has a 2xx status code
func (o *PutTrackTopicsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put track topics not found response has a 3xx status code
func (o *PutTrackTopicsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put track topics not found response has a 4xx status code
func (o *PutTrackTopicsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put track topics not found response has a 5xx status code
func (o *PutTrackTopicsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put track topics not found response a status code equal to that given
func (o *PutTrackTopicsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put track topics not found response
func (o *PutTrackTopicsNotFound) Code() int {
return 404
}
func (o *PutTrackTopicsNotFound) Error() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsNotFound %+v", 404, o.Payload)
}
func (o *PutTrackTopicsNotFound) String() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsNotFound %+v", 404, o.Payload)
}
func (o *PutTrackTopicsNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTrackTopicsNotFound) 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
}
// NewPutTrackTopicsUnprocessableEntity creates a PutTrackTopicsUnprocessableEntity with default headers values
func NewPutTrackTopicsUnprocessableEntity() *PutTrackTopicsUnprocessableEntity {
return &PutTrackTopicsUnprocessableEntity{}
}
/*
PutTrackTopicsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PutTrackTopicsUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put track topics unprocessable entity response has a 2xx status code
func (o *PutTrackTopicsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put track topics unprocessable entity response has a 3xx status code
func (o *PutTrackTopicsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put track topics unprocessable entity response has a 4xx status code
func (o *PutTrackTopicsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put track topics unprocessable entity response has a 5xx status code
func (o *PutTrackTopicsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put track topics unprocessable entity response a status code equal to that given
func (o *PutTrackTopicsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put track topics unprocessable entity response
func (o *PutTrackTopicsUnprocessableEntity) Code() int {
return 422
}
func (o *PutTrackTopicsUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutTrackTopicsUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutTrackTopicsUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTrackTopicsUnprocessableEntity) 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
}
// NewPutTrackTopicsInternalServerError creates a PutTrackTopicsInternalServerError with default headers values
func NewPutTrackTopicsInternalServerError() *PutTrackTopicsInternalServerError {
return &PutTrackTopicsInternalServerError{}
}
/*
PutTrackTopicsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PutTrackTopicsInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put track topics internal server error response has a 2xx status code
func (o *PutTrackTopicsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put track topics internal server error response has a 3xx status code
func (o *PutTrackTopicsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put track topics internal server error response has a 4xx status code
func (o *PutTrackTopicsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put track topics internal server error response has a 5xx status code
func (o *PutTrackTopicsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put track topics internal server error response a status code equal to that given
func (o *PutTrackTopicsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put track topics internal server error response
func (o *PutTrackTopicsInternalServerError) Code() int {
return 500
}
func (o *PutTrackTopicsInternalServerError) Error() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsInternalServerError %+v", 500, o.Payload)
}
func (o *PutTrackTopicsInternalServerError) String() string {
return fmt.Sprintf("[PUT /tracktopics][%d] putTrackTopicsInternalServerError %+v", 500, o.Payload)
}
func (o *PutTrackTopicsInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTrackTopicsInternalServerError) 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
}