lib/api/kazoo/kazoo_models/get_account_media_response.go

202 lines
4.6 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 kazoo_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// GetAccountMediaResponse get account media response
//
// swagger:model GetAccountMediaResponse
type GetAccountMediaResponse struct {
// auth token
AuthToken string `json:"auth_token,omitempty"`
// data
Data []*GetAccountMediaResponseDataItems0 `json:"data"`
// node
// Example: dqZFtHthbelyE8MI6vU-LA
Node string `json:"node,omitempty"`
// page size
// Example: 49
PageSize float64 `json:"page_size,omitempty"`
// request id
// Example: 6e6dc6f474d1aa1689ac27a3c0605b38
RequestID string `json:"request_id,omitempty"`
// revision
// Example: b74319c4b8fb8cdba510362fa98facf0
Revision string `json:"revision,omitempty"`
// status
// Example: success
Status string `json:"status,omitempty"`
// timestamp
// Example: 2020-05-07T01:41:49Z
Timestamp string `json:"timestamp,omitempty"`
// version
// Example: 4.3.103
Version string `json:"version,omitempty"`
}
// Validate validates this get account media response
func (m *GetAccountMediaResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GetAccountMediaResponse) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if swag.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this get account media response based on the context it is used
func (m *GetAccountMediaResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GetAccountMediaResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *GetAccountMediaResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountMediaResponse) UnmarshalBinary(b []byte) error {
var res GetAccountMediaResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// GetAccountMediaResponseDataItems0 get account media response data items0
//
// swagger:model GetAccountMediaResponseDataItems0
type GetAccountMediaResponseDataItems0 struct {
// id
// Example: fea26d66047257e74c132092b149e533
ID string `json:"id,omitempty"`
// is prompt
// Example: false
IsPrompt bool `json:"is_prompt,omitempty"`
// language
// Example: en-us
Language string `json:"language,omitempty"`
// media source
// Example: tts
MediaSource string `json:"media_source,omitempty"`
// name
// Example: test
Name string `json:"name,omitempty"`
}
// Validate validates this get account media response data items0
func (m *GetAccountMediaResponseDataItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this get account media response data items0 based on context it is used
func (m *GetAccountMediaResponseDataItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *GetAccountMediaResponseDataItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountMediaResponseDataItems0) UnmarshalBinary(b []byte) error {
var res GetAccountMediaResponseDataItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}