lib/api/sfgate/sfgate_client/track_users/post_track_users_responses.go

478 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_users
// 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/sfgate/sfgate_models"
)
// PostTrackUsersReader is a Reader for the PostTrackUsers structure.
type PostTrackUsersReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostTrackUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostTrackUsersOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostTrackUsersUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostTrackUsersForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostTrackUsersNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostTrackUsersUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostTrackUsersInternalServerError()
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())
}
}
// NewPostTrackUsersOK creates a PostTrackUsersOK with default headers values
func NewPostTrackUsersOK() *PostTrackUsersOK {
return &PostTrackUsersOK{}
}
/*
PostTrackUsersOK describes a response with status code 200, with default header values.
TrackUser Response Object
*/
type PostTrackUsersOK struct {
Payload *sfgate_models.TrackUserResponse
}
// IsSuccess returns true when this post track users o k response has a 2xx status code
func (o *PostTrackUsersOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post track users o k response has a 3xx status code
func (o *PostTrackUsersOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post track users o k response has a 4xx status code
func (o *PostTrackUsersOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post track users o k response has a 5xx status code
func (o *PostTrackUsersOK) IsServerError() bool {
return false
}
// IsCode returns true when this post track users o k response a status code equal to that given
func (o *PostTrackUsersOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post track users o k response
func (o *PostTrackUsersOK) Code() int {
return 200
}
func (o *PostTrackUsersOK) Error() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersOK %+v", 200, o.Payload)
}
func (o *PostTrackUsersOK) String() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersOK %+v", 200, o.Payload)
}
func (o *PostTrackUsersOK) GetPayload() *sfgate_models.TrackUserResponse {
return o.Payload
}
func (o *PostTrackUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.TrackUserResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostTrackUsersUnauthorized creates a PostTrackUsersUnauthorized with default headers values
func NewPostTrackUsersUnauthorized() *PostTrackUsersUnauthorized {
return &PostTrackUsersUnauthorized{}
}
/*
PostTrackUsersUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PostTrackUsersUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post track users unauthorized response has a 2xx status code
func (o *PostTrackUsersUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post track users unauthorized response has a 3xx status code
func (o *PostTrackUsersUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post track users unauthorized response has a 4xx status code
func (o *PostTrackUsersUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post track users unauthorized response has a 5xx status code
func (o *PostTrackUsersUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post track users unauthorized response a status code equal to that given
func (o *PostTrackUsersUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post track users unauthorized response
func (o *PostTrackUsersUnauthorized) Code() int {
return 401
}
func (o *PostTrackUsersUnauthorized) Error() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersUnauthorized %+v", 401, o.Payload)
}
func (o *PostTrackUsersUnauthorized) String() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersUnauthorized %+v", 401, o.Payload)
}
func (o *PostTrackUsersUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostTrackUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostTrackUsersForbidden creates a PostTrackUsersForbidden with default headers values
func NewPostTrackUsersForbidden() *PostTrackUsersForbidden {
return &PostTrackUsersForbidden{}
}
/*
PostTrackUsersForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostTrackUsersForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post track users forbidden response has a 2xx status code
func (o *PostTrackUsersForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post track users forbidden response has a 3xx status code
func (o *PostTrackUsersForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post track users forbidden response has a 4xx status code
func (o *PostTrackUsersForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post track users forbidden response has a 5xx status code
func (o *PostTrackUsersForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post track users forbidden response a status code equal to that given
func (o *PostTrackUsersForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post track users forbidden response
func (o *PostTrackUsersForbidden) Code() int {
return 403
}
func (o *PostTrackUsersForbidden) Error() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersForbidden %+v", 403, o.Payload)
}
func (o *PostTrackUsersForbidden) String() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersForbidden %+v", 403, o.Payload)
}
func (o *PostTrackUsersForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostTrackUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostTrackUsersNotFound creates a PostTrackUsersNotFound with default headers values
func NewPostTrackUsersNotFound() *PostTrackUsersNotFound {
return &PostTrackUsersNotFound{}
}
/*
PostTrackUsersNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostTrackUsersNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post track users not found response has a 2xx status code
func (o *PostTrackUsersNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post track users not found response has a 3xx status code
func (o *PostTrackUsersNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post track users not found response has a 4xx status code
func (o *PostTrackUsersNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post track users not found response has a 5xx status code
func (o *PostTrackUsersNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post track users not found response a status code equal to that given
func (o *PostTrackUsersNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post track users not found response
func (o *PostTrackUsersNotFound) Code() int {
return 404
}
func (o *PostTrackUsersNotFound) Error() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersNotFound %+v", 404, o.Payload)
}
func (o *PostTrackUsersNotFound) String() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersNotFound %+v", 404, o.Payload)
}
func (o *PostTrackUsersNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostTrackUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostTrackUsersUnprocessableEntity creates a PostTrackUsersUnprocessableEntity with default headers values
func NewPostTrackUsersUnprocessableEntity() *PostTrackUsersUnprocessableEntity {
return &PostTrackUsersUnprocessableEntity{}
}
/*
PostTrackUsersUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostTrackUsersUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post track users unprocessable entity response has a 2xx status code
func (o *PostTrackUsersUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post track users unprocessable entity response has a 3xx status code
func (o *PostTrackUsersUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post track users unprocessable entity response has a 4xx status code
func (o *PostTrackUsersUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post track users unprocessable entity response has a 5xx status code
func (o *PostTrackUsersUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post track users unprocessable entity response a status code equal to that given
func (o *PostTrackUsersUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post track users unprocessable entity response
func (o *PostTrackUsersUnprocessableEntity) Code() int {
return 422
}
func (o *PostTrackUsersUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostTrackUsersUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostTrackUsersUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostTrackUsersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostTrackUsersInternalServerError creates a PostTrackUsersInternalServerError with default headers values
func NewPostTrackUsersInternalServerError() *PostTrackUsersInternalServerError {
return &PostTrackUsersInternalServerError{}
}
/*
PostTrackUsersInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostTrackUsersInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post track users internal server error response has a 2xx status code
func (o *PostTrackUsersInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post track users internal server error response has a 3xx status code
func (o *PostTrackUsersInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post track users internal server error response has a 4xx status code
func (o *PostTrackUsersInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post track users internal server error response has a 5xx status code
func (o *PostTrackUsersInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post track users internal server error response a status code equal to that given
func (o *PostTrackUsersInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post track users internal server error response
func (o *PostTrackUsersInternalServerError) Code() int {
return 500
}
func (o *PostTrackUsersInternalServerError) Error() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersInternalServerError %+v", 500, o.Payload)
}
func (o *PostTrackUsersInternalServerError) String() string {
return fmt.Sprintf("[POST /trackusers][%d] postTrackUsersInternalServerError %+v", 500, o.Payload)
}
func (o *PostTrackUsersInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostTrackUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}