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
)
// PutQueuesReader is a Reader for the PutQueues structure.
type PutQueuesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * PutQueuesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewPutQueuesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewPutQueuesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewPutQueuesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewPutQueuesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewPutQueuesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewPutQueuesInternalServerError ( )
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 ( ) )
}
}
// NewPutQueuesOK creates a PutQueuesOK with default headers values
func NewPutQueuesOK ( ) * PutQueuesOK {
return & PutQueuesOK { }
}
/ * PutQueuesOK describes a response with status code 200 , with default header values .
Telnexus Response with an array of Queue objects
* /
type PutQueuesOK struct {
Payload * voip_models . QueueResponse
}
func ( o * PutQueuesOK ) Error ( ) string {
return fmt . Sprintf ( "[PUT /queues][%d] putQueuesOK %+v" , 200 , o . Payload )
}
func ( o * PutQueuesOK ) GetPayload ( ) * voip_models . QueueResponse {
return o . Payload
}
func ( o * PutQueuesOK ) 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
}
// NewPutQueuesUnauthorized creates a PutQueuesUnauthorized with default headers values
func NewPutQueuesUnauthorized ( ) * PutQueuesUnauthorized {
return & PutQueuesUnauthorized { }
}
/ * PutQueuesUnauthorized describes a response with status code 401 , with default header values .
Access Unauthorized , invalid API - KEY was used
* /
type PutQueuesUnauthorized struct {
Payload * voip_models . Error
}
func ( o * PutQueuesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[PUT /queues][%d] putQueuesUnauthorized %+v" , 401 , o . Payload )
}
func ( o * PutQueuesUnauthorized ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * PutQueuesUnauthorized ) 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
}
// NewPutQueuesForbidden creates a PutQueuesForbidden with default headers values
func NewPutQueuesForbidden ( ) * PutQueuesForbidden {
return & PutQueuesForbidden { }
}
/ * PutQueuesForbidden describes a response with status code 403 , with default header values .
Access forbidden , account lacks access
* /
type PutQueuesForbidden struct {
Payload * voip_models . Error
}
func ( o * PutQueuesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[PUT /queues][%d] putQueuesForbidden %+v" , 403 , o . Payload )
}
func ( o * PutQueuesForbidden ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * PutQueuesForbidden ) 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
}
// NewPutQueuesNotFound creates a PutQueuesNotFound with default headers values
func NewPutQueuesNotFound ( ) * PutQueuesNotFound {
return & PutQueuesNotFound { }
}
/ * PutQueuesNotFound describes a response with status code 404 , with default header values .
Resource was not found
* /
type PutQueuesNotFound struct {
Payload * voip_models . Error
}
func ( o * PutQueuesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[PUT /queues][%d] putQueuesNotFound %+v" , 404 , o . Payload )
}
func ( o * PutQueuesNotFound ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * PutQueuesNotFound ) 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
}
// NewPutQueuesUnprocessableEntity creates a PutQueuesUnprocessableEntity with default headers values
func NewPutQueuesUnprocessableEntity ( ) * PutQueuesUnprocessableEntity {
return & PutQueuesUnprocessableEntity { }
}
/ * PutQueuesUnprocessableEntity describes a response with status code 422 , with default header values .
Unprocessable Entity , likely a bad parameter
* /
type PutQueuesUnprocessableEntity struct {
Payload * voip_models . Error
}
func ( o * PutQueuesUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[PUT /queues][%d] putQueuesUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * PutQueuesUnprocessableEntity ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * PutQueuesUnprocessableEntity ) 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
}
// NewPutQueuesInternalServerError creates a PutQueuesInternalServerError with default headers values
func NewPutQueuesInternalServerError ( ) * PutQueuesInternalServerError {
return & PutQueuesInternalServerError { }
}
/ * PutQueuesInternalServerError describes a response with status code 500 , with default header values .
Server Internal Error
* /
type PutQueuesInternalServerError struct {
Payload * voip_models . Error
}
func ( o * PutQueuesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[PUT /queues][%d] putQueuesInternalServerError %+v" , 500 , o . Payload )
}
func ( o * PutQueuesInternalServerError ) GetPayload ( ) * voip_models . Error {
return o . Payload
}
func ( o * PutQueuesInternalServerError ) 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
}