lib/api/kazoo/kazoo_models/get_account_vm_box_response.go

202 lines
4.7 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"
)
// GetAccountVMBoxResponse get account Vm box response
//
// swagger:model GetAccountVmBoxResponse
type GetAccountVMBoxResponse struct {
// auth token
AuthToken string `json:"auth_token,omitempty"`
// data
Data []*GetAccountVMBoxResponseDataItems0 `json:"data"`
// node
// Example: dqZFtHthbelyE8MI6vU-LA
Node string `json:"node,omitempty"`
// page size
// Example: 5
PageSize float64 `json:"page_size,omitempty"`
// request id
// Example: 0452de0d2fbef2cbccafaf7b3894bc0b
RequestID string `json:"request_id,omitempty"`
// revision
// Example: 171c5eb1c826f66fe16cfb0669f55994
Revision string `json:"revision,omitempty"`
// status
// Example: success
Status string `json:"status,omitempty"`
// timestamp
// Example: 2020-05-07T02:52:10Z
Timestamp string `json:"timestamp,omitempty"`
// version
// Example: 4.3.103
Version string `json:"version,omitempty"`
}
// Validate validates this get account Vm box response
func (m *GetAccountVMBoxResponse) 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 *GetAccountVMBoxResponse) 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 Vm box response based on the context it is used
func (m *GetAccountVMBoxResponse) 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 *GetAccountVMBoxResponse) 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 *GetAccountVMBoxResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountVMBoxResponse) UnmarshalBinary(b []byte) error {
var res GetAccountVMBoxResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// GetAccountVMBoxResponseDataItems0 get account VM box response data items0
//
// swagger:model GetAccountVMBoxResponseDataItems0
type GetAccountVMBoxResponseDataItems0 struct {
// id
// Example: cbd3606fea91c9b834c5a1fc0efa1098
ID string `json:"id,omitempty"`
// mailbox
// Example: 2005
Mailbox string `json:"mailbox,omitempty"`
// messages
// Example: 12
Messages float64 `json:"messages,omitempty"`
// name
// Example: 2005 - Bill VM
Name string `json:"name,omitempty"`
// owner id
// Example: f95626ebc2db4fd1a2b5ac5f6b11f7a3
OwnerID string `json:"owner_id,omitempty"`
}
// Validate validates this get account VM box response data items0
func (m *GetAccountVMBoxResponseDataItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this get account VM box response data items0 based on context it is used
func (m *GetAccountVMBoxResponseDataItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *GetAccountVMBoxResponseDataItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountVMBoxResponseDataItems0) UnmarshalBinary(b []byte) error {
var res GetAccountVMBoxResponseDataItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}