lib/api/kazoo/kazoo_models/get_account_cdr_response.go

310 lines
7.2 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 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"
)
// GetAccountCdrResponse get account cdr response
//
// swagger:model GetAccountCdrResponse
type GetAccountCdrResponse struct {
// auth token
AuthToken string `json:"auth_token,omitempty"`
// data
Data []*GetAccountCdrResponseDataItems0 `json:"data"`
// node
// Example: dqZFtHthbelyE8MI6vU-LA
Node string `json:"node,omitempty"`
// page size
// Example: 534
PageSize string `json:"page_size,omitempty"`
// request id
// Example: e7897c563fb45f3b377046d9b54c3cb5
RequestID string `json:"request_id,omitempty"`
// start key
// Example: g2wAAAACbgUAAOqn1w5oAWpq
StartKey string `json:"start_key,omitempty"`
// status
// Example: success
Status string `json:"status,omitempty"`
// timestamp
// Example: 2020-05-07T01:06:49Z
Timestamp string `json:"timestamp,omitempty"`
// version
// Example: 4.3.103
Version string `json:"version,omitempty"`
}
// Validate validates this get account cdr response
func (m *GetAccountCdrResponse) 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 *GetAccountCdrResponse) 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 cdr response based on the context it is used
func (m *GetAccountCdrResponse) 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 *GetAccountCdrResponse) 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 *GetAccountCdrResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountCdrResponse) UnmarshalBinary(b []byte) error {
var res GetAccountCdrResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// GetAccountCdrResponseDataItems0 get account cdr response data items0
//
// swagger:model GetAccountCdrResponseDataItems0
type GetAccountCdrResponseDataItems0 struct {
// authorizing id
// Example: f9627ff1bcca2d112931ee00dcfdb0c6
AuthorizingID string `json:"authorizing_id,omitempty"`
// billing seconds
// Example: 0
BillingSeconds float64 `json:"billing_seconds,omitempty"`
// bridge id
// Example: 1967142278_134071066@67.231.5.176
BridgeID string `json:"bridge_id,omitempty"`
// call id
// Example: 2b35a5ec-43a1-11ea-99b1-ed64c60fd1ac
CallID string `json:"call_id,omitempty"`
// call priority
CallPriority string `json:"call_priority,omitempty"`
// call type
CallType string `json:"call_type,omitempty"`
// callee id name
// Example: Telnexus
CalleeIDName string `json:"callee_id_name,omitempty"`
// callee id number
// Example: +15108597000
CalleeIDNumber string `json:"callee_id_number,omitempty"`
// caller id name
// Example: Unavailable
CallerIDName string `json:"caller_id_name,omitempty"`
// caller id number
// Example: +17045943795
CallerIDNumber string `json:"caller_id_number,omitempty"`
// calling from
// Example: +17045943795
CallingFrom string `json:"calling_from,omitempty"`
// cost
// Example: 0
Cost string `json:"cost,omitempty"`
// datetime
// Example: 2020-01-30 20:43:28
Datetime string `json:"datetime,omitempty"`
// dialed number
// Example: user_jaemid
DialedNumber string `json:"dialed_number,omitempty"`
// direction
// Example: outbound
Direction string `json:"direction,omitempty"`
// duration seconds
// Example: 15
DurationSeconds float64 `json:"duration_seconds,omitempty"`
// from
// Example: +17045943795@e0f5f0.s.zswitch.net
From string `json:"from,omitempty"`
// hangup cause
// Example: ORIGINATOR_CANCEL
HangupCause string `json:"hangup_cause,omitempty"`
// id
// Example: 202001-2b35a5ec-43a1-11ea-99b1-ed64c60fd1ac
ID string `json:"id,omitempty"`
// interaction id
// Example: 63747636207-cc274afb
InteractionID string `json:"interaction_id,omitempty"`
// iso 8601
// Example: 2020-01-30
Iso8601 string `json:"iso_8601,omitempty"`
// iso 8601 combined
// Example: 2020-01-30T20:43:28Z
Iso8601Combined string `json:"iso_8601_combined,omitempty"`
// media server
// Example: fs004.ord.p.zswitch.net
MediaServer string `json:"media_server,omitempty"`
// other leg call id
// Example: 1967142278_134071066@67.231.5.176
OtherLegCallID string `json:"other_leg_call_id,omitempty"`
// owner id
// Example: c0a881b0dfbc7fc574cb67dcaf10879f
OwnerID string `json:"owner_id,omitempty"`
// rate
// Example: 0.0
Rate string `json:"rate,omitempty"`
// rate name
RateName string `json:"rate_name,omitempty"`
// recording url
RecordingURL string `json:"recording_url,omitempty"`
// request
// Example: user_jaemid@e0f5f0.s.zswitch.net
Request string `json:"request,omitempty"`
// rfc 1036
// Example: Thu, 30 Jan 2020 20:43:28 GMT
Rfc1036 string `json:"rfc_1036,omitempty"`
// timestamp
// Example: 63747636208
Timestamp string `json:"timestamp,omitempty"`
// to
// Example: user_jaemid@e0f5f0.s.zswitch.net
To string `json:"to,omitempty"`
// unix timestamp
// Example: 1580417008
UnixTimestamp string `json:"unix_timestamp,omitempty"`
}
// Validate validates this get account cdr response data items0
func (m *GetAccountCdrResponseDataItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this get account cdr response data items0 based on context it is used
func (m *GetAccountCdrResponseDataItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *GetAccountCdrResponseDataItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountCdrResponseDataItems0) UnmarshalBinary(b []byte) error {
var res GetAccountCdrResponseDataItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}