lib/api/kazoo/kazoo_models/get_account_descendent_resp...

203 lines
5.6 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"
)
// GetAccountDescendentResponse get account descendent response
//
// swagger:model GetAccountDescendentResponse
type GetAccountDescendentResponse struct {
// auth token
// Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImM2M2I1NjY5YmE0NTQzZWVmMTE5OTc3ZTUyNDYxYzRlIn0.eyJpc3MiOiJrYXpvbyIsImlkZW50aXR5X3NpZyI6InJUMW5DNnNOOHNKQWp4blBSSk1LVE5Ed1ZEQWZwek9sSFBnb0FYTHgtQU0iLCJhY2NvdW50X2lkIjoiYTY2ZjJiN2E0MDk0NGI3NDRkY2M2M2NhNmYxMGY0N2EiLCJvd25lcl9pZCI6IjUwOTE2MWZmMmE1NzZiZDZhYmU1YjhjNzVmNmIxNWYwIiwibWV0aG9kIjoiY2JfdXNlcl9hdXRoIiwiZXhwIjoxNTg4ODA3NjcyfQ.rsxUwAef3JnHzTc4eckxIx_RToGbNsKr3WVUoVDEPQ7slKLxhpfDTrNqXQ_kou-1646Z539YQCQGRsB5One4BfEDAfhAmH63d6jKwEU49yQUiZCBn8tbuzN4iiZmYn6z8wmqUQHO2KA3fo6IKrjggs3t1EK8iG05se4ltS21ZVQ-C0HVvvENoERu9iKEcM2SeKhl9Ucl3cqQpWRKBN9BEvTKpuXqM_Bkf2FiczQ3TJQ2SS0YJTYjoIKnOLHfM4H59ZcPwnTh0S3zplJ8e6dQv6t020x0gVYdA_U9EseIGhNQTtMEAztwleZJwdpBh6kiDxJb9-l4ENX4kFtvxsH4QQ
AuthToken string `json:"auth_token,omitempty"`
// data
Data []*GetAccountDescendentResponseDataItems0 `json:"data"`
// node
// Example: dqZFtHthbelyE8MI6vU-LA
Node string `json:"node,omitempty"`
// page size
// Example: 48
PageSize float64 `json:"page_size,omitempty"`
// request id
// Example: 0035dec0e0e4c486e3bcd4502cf6a95d
RequestID string `json:"request_id,omitempty"`
// revision
// Example: b3a4cb72580c7c2f93572a6ef2748b74
Revision string `json:"revision,omitempty"`
// start key
// Example: g20AAAAA
StartKey string `json:"start_key,omitempty"`
// status
// Example: success
Status string `json:"status,omitempty"`
// timestamp
// Example: 2020-05-06T23:01:48Z
Timestamp string `json:"timestamp,omitempty"`
// version
// Example: 4.3.103
Version string `json:"version,omitempty"`
}
// Validate validates this get account descendent response
func (m *GetAccountDescendentResponse) 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 *GetAccountDescendentResponse) 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 descendent response based on the context it is used
func (m *GetAccountDescendentResponse) 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 *GetAccountDescendentResponse) 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 *GetAccountDescendentResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountDescendentResponse) UnmarshalBinary(b []byte) error {
var res GetAccountDescendentResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// GetAccountDescendentResponseDataItems0 get account descendent response data items0
//
// swagger:model GetAccountDescendentResponseDataItems0
type GetAccountDescendentResponseDataItems0 struct {
// id
// Example: 7cebd991bd99ffd909dbb08a7d8e2db4
ID string `json:"id,omitempty"`
// name
// Example: Affinity
Name string `json:"name,omitempty"`
// realm
// Example: b5df22.s.zswitch.net
Realm string `json:"realm,omitempty"`
// tree
// Example: ["fb7cc960d5037466992af0e9504d0b27","d4804caa6d7a78c83ff2bc7fdf646398","33776f3f94eb642c81e199cf5f1059ae","a66f2b7a40944b744dcc63ca6f10f47a"]
Tree []string `json:"tree"`
}
// Validate validates this get account descendent response data items0
func (m *GetAccountDescendentResponseDataItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this get account descendent response data items0 based on context it is used
func (m *GetAccountDescendentResponseDataItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *GetAccountDescendentResponseDataItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetAccountDescendentResponseDataItems0) UnmarshalBinary(b []byte) error {
var res GetAccountDescendentResponseDataItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}