mirror of https://github.com/vernonkeenan/lib
148 lines
4.4 KiB
Go
148 lines
4.4 KiB
Go
// 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 group
|
|
|
|
// 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/telnexus/lib/api/kazoo/kazoo_models"
|
|
)
|
|
|
|
// GetAccountGroupsReader is a Reader for the GetAccountGroups structure.
|
|
type GetAccountGroupsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetAccountGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetAccountGroupsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetAccountGroupsUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetAccountGroupsNotFound()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetAccountGroupsOK creates a GetAccountGroupsOK with default headers values
|
|
func NewGetAccountGroupsOK() *GetAccountGroupsOK {
|
|
return &GetAccountGroupsOK{}
|
|
}
|
|
|
|
/* GetAccountGroupsOK describes a response with status code 200, with default header values.
|
|
|
|
Kazoo response
|
|
*/
|
|
type GetAccountGroupsOK struct {
|
|
Payload *kazoo_models.GetAccountGroupResponse
|
|
}
|
|
|
|
func (o *GetAccountGroupsOK) Error() string {
|
|
return fmt.Sprintf("[GET /accounts/{accountId}/groups][%d] getAccountGroupsOK %+v", 200, o.Payload)
|
|
}
|
|
func (o *GetAccountGroupsOK) GetPayload() *kazoo_models.GetAccountGroupResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetAccountGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(kazoo_models.GetAccountGroupResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetAccountGroupsUnauthorized creates a GetAccountGroupsUnauthorized with default headers values
|
|
func NewGetAccountGroupsUnauthorized() *GetAccountGroupsUnauthorized {
|
|
return &GetAccountGroupsUnauthorized{}
|
|
}
|
|
|
|
/* GetAccountGroupsUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetAccountGroupsUnauthorized struct {
|
|
Payload *kazoo_models.Error
|
|
}
|
|
|
|
func (o *GetAccountGroupsUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /accounts/{accountId}/groups][%d] getAccountGroupsUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
func (o *GetAccountGroupsUnauthorized) GetPayload() *kazoo_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetAccountGroupsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(kazoo_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetAccountGroupsNotFound creates a GetAccountGroupsNotFound with default headers values
|
|
func NewGetAccountGroupsNotFound() *GetAccountGroupsNotFound {
|
|
return &GetAccountGroupsNotFound{}
|
|
}
|
|
|
|
/* GetAccountGroupsNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetAccountGroupsNotFound struct {
|
|
Payload *kazoo_models.Error
|
|
}
|
|
|
|
func (o *GetAccountGroupsNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /accounts/{accountId}/groups][%d] getAccountGroupsNotFound %+v", 404, o.Payload)
|
|
}
|
|
func (o *GetAccountGroupsNotFound) GetPayload() *kazoo_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetAccountGroupsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(kazoo_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|