lib/api/kazoo/kazoo_client/media/get_account_media_responses.go

148 lines
4.3 KiB
Go
Raw Normal View History

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 media
// 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/kazoo/kazoo_models"
2021-07-31 03:05:02 +00:00
)
// GetAccountMediaReader is a Reader for the GetAccountMedia structure.
type GetAccountMediaReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetAccountMediaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetAccountMediaOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetAccountMediaUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetAccountMediaNotFound()
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())
}
}
// NewGetAccountMediaOK creates a GetAccountMediaOK with default headers values
func NewGetAccountMediaOK() *GetAccountMediaOK {
return &GetAccountMediaOK{}
}
/* GetAccountMediaOK describes a response with status code 200, with default header values.
Kazoo response
*/
type GetAccountMediaOK struct {
Payload *kazoo_models.GetAccountMediaResponse
}
func (o *GetAccountMediaOK) Error() string {
return fmt.Sprintf("[GET /accounts/{accountId}/media][%d] getAccountMediaOK %+v", 200, o.Payload)
}
func (o *GetAccountMediaOK) GetPayload() *kazoo_models.GetAccountMediaResponse {
return o.Payload
}
func (o *GetAccountMediaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(kazoo_models.GetAccountMediaResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetAccountMediaUnauthorized creates a GetAccountMediaUnauthorized with default headers values
func NewGetAccountMediaUnauthorized() *GetAccountMediaUnauthorized {
return &GetAccountMediaUnauthorized{}
}
/* GetAccountMediaUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetAccountMediaUnauthorized struct {
Payload *kazoo_models.Error
}
func (o *GetAccountMediaUnauthorized) Error() string {
return fmt.Sprintf("[GET /accounts/{accountId}/media][%d] getAccountMediaUnauthorized %+v", 401, o.Payload)
}
func (o *GetAccountMediaUnauthorized) GetPayload() *kazoo_models.Error {
return o.Payload
}
func (o *GetAccountMediaUnauthorized) 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
}
// NewGetAccountMediaNotFound creates a GetAccountMediaNotFound with default headers values
func NewGetAccountMediaNotFound() *GetAccountMediaNotFound {
return &GetAccountMediaNotFound{}
}
/* GetAccountMediaNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetAccountMediaNotFound struct {
Payload *kazoo_models.Error
}
func (o *GetAccountMediaNotFound) Error() string {
return fmt.Sprintf("[GET /accounts/{accountId}/media][%d] getAccountMediaNotFound %+v", 404, o.Payload)
}
func (o *GetAccountMediaNotFound) GetPayload() *kazoo_models.Error {
return o.Payload
}
func (o *GetAccountMediaNotFound) 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
}