2021-07-31 03:05:02 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Telnexus LLC
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package queue
// 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"
2021-08-01 00:08:25 +00:00
"code.tnxs.net/vernonkeenan/lib/api/voip/voip_models"
2021-07-31 03:05:02 +00:00
)
// GetQueuesReader is a Reader for the GetQueues structure.
type GetQueuesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetQueuesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetQueuesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetQueuesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetQueuesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetQueuesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetQueuesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetQueuesInternalServerError ( )
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 ( ) )
}
}
// NewGetQueuesOK creates a GetQueuesOK with default headers values
func NewGetQueuesOK ( ) * GetQueuesOK {
return & GetQueuesOK { }
}
/ * GetQueuesOK describes a response with status code 200 , with default header values .
Telnexus Response with an array of Queue objects
* /
type GetQueuesOK struct {
Payload * voip_models . QueueResponse
}
func ( o * GetQueuesOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /queues][%d] getQueuesOK %+v" , 200 , o . Payload )
}
func ( o * GetQueuesOK ) GetPayload ( ) * voip_models . QueueResponse {
return o . Payload
}
func ( o * GetQueuesOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( voip_models . QueueResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetQueuesUnauthorized creates a GetQueuesUnauthorized with default headers values
func NewGetQueuesUnauthorized ( ) * GetQueuesUnauthorized {
return & GetQueuesUnauthorized { }
}
/ * GetQueuesUnauthorized describes a response with status code 401 , with default header values .
Access Unauthorized , invalid API - KEY was used
* /
type GetQueuesUnauthorized struct {
Payload * voip_models . Error
}
func ( o * GetQueuesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /queues][%d] getQueuesUnauthorized %+v" , 401 , o . Payload )
}
func ( o * GetQueuesUnauthorized ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * GetQueuesUnauthorized ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( voip_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetQueuesForbidden creates a GetQueuesForbidden with default headers values
func NewGetQueuesForbidden ( ) * GetQueuesForbidden {
return & GetQueuesForbidden { }
}
/ * GetQueuesForbidden describes a response with status code 403 , with default header values .
Access forbidden , account lacks access
* /
type GetQueuesForbidden struct {
Payload * voip_models . Error
}
func ( o * GetQueuesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /queues][%d] getQueuesForbidden %+v" , 403 , o . Payload )
}
func ( o * GetQueuesForbidden ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * GetQueuesForbidden ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( voip_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetQueuesNotFound creates a GetQueuesNotFound with default headers values
func NewGetQueuesNotFound ( ) * GetQueuesNotFound {
return & GetQueuesNotFound { }
}
/ * GetQueuesNotFound describes a response with status code 404 , with default header values .
Resource was not found
* /
type GetQueuesNotFound struct {
Payload * voip_models . Error
}
func ( o * GetQueuesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /queues][%d] getQueuesNotFound %+v" , 404 , o . Payload )
}
func ( o * GetQueuesNotFound ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * GetQueuesNotFound ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( voip_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetQueuesUnprocessableEntity creates a GetQueuesUnprocessableEntity with default headers values
func NewGetQueuesUnprocessableEntity ( ) * GetQueuesUnprocessableEntity {
return & GetQueuesUnprocessableEntity { }
}
/ * GetQueuesUnprocessableEntity describes a response with status code 422 , with default header values .
Unprocessable Entity , likely a bad parameter
* /
type GetQueuesUnprocessableEntity struct {
Payload * voip_models . Error
}
func ( o * GetQueuesUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /queues][%d] getQueuesUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * GetQueuesUnprocessableEntity ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * GetQueuesUnprocessableEntity ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( voip_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetQueuesInternalServerError creates a GetQueuesInternalServerError with default headers values
func NewGetQueuesInternalServerError ( ) * GetQueuesInternalServerError {
return & GetQueuesInternalServerError { }
}
/ * GetQueuesInternalServerError describes a response with status code 500 , with default header values .
Server Internal Error
* /
type GetQueuesInternalServerError struct {
Payload * voip_models . Error
}
func ( o * GetQueuesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /queues][%d] getQueuesInternalServerError %+v" , 500 , o . Payload )
}
func ( o * GetQueuesInternalServerError ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * GetQueuesInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( voip_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}