mirror of https://github.com/vernonkeenan/lib
194 lines
4.5 KiB
Go
194 lines
4.5 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"
|
|
)
|
|
|
|
// GetAccountGroupResponse get account group response
|
|
//
|
|
// swagger:model GetAccountGroupResponse
|
|
type GetAccountGroupResponse struct {
|
|
|
|
// auth token
|
|
AuthToken string `json:"auth_token,omitempty"`
|
|
|
|
// data
|
|
Data []*GetAccountGroupResponseDataItems0 `json:"data"`
|
|
|
|
// node
|
|
// Example: dqZFtHthbelyE8MI6vU-LA
|
|
Node string `json:"node,omitempty"`
|
|
|
|
// page size
|
|
// Example: 3
|
|
PageSize float64 `json:"page_size,omitempty"`
|
|
|
|
// request id
|
|
// Example: 22d1269690b8a553106e929bd8923a55
|
|
RequestID string `json:"request_id,omitempty"`
|
|
|
|
// revision
|
|
// Example: ac7c6fde786a11c16c4dd265eccb9aa5
|
|
Revision string `json:"revision,omitempty"`
|
|
|
|
// status
|
|
// Example: success
|
|
Status string `json:"status,omitempty"`
|
|
|
|
// timestamp
|
|
// Example: 2020-05-07T01:36:50Z
|
|
Timestamp string `json:"timestamp,omitempty"`
|
|
|
|
// version
|
|
// Example: 4.3.103
|
|
Version string `json:"version,omitempty"`
|
|
}
|
|
|
|
// Validate validates this get account group response
|
|
func (m *GetAccountGroupResponse) 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 *GetAccountGroupResponse) 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 group response based on the context it is used
|
|
func (m *GetAccountGroupResponse) 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 *GetAccountGroupResponse) 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 *GetAccountGroupResponse) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *GetAccountGroupResponse) UnmarshalBinary(b []byte) error {
|
|
var res GetAccountGroupResponse
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|
|
|
|
// GetAccountGroupResponseDataItems0 get account group response data items0
|
|
//
|
|
// swagger:model GetAccountGroupResponseDataItems0
|
|
type GetAccountGroupResponseDataItems0 struct {
|
|
|
|
// endpoints
|
|
// Example: 5
|
|
Endpoints float64 `json:"endpoints,omitempty"`
|
|
|
|
// id
|
|
// Example: e9e0627a0d41c4be4e8fa65a6d4777aa
|
|
ID string `json:"id,omitempty"`
|
|
|
|
// name
|
|
// Example: Berkeley Office
|
|
Name string `json:"name,omitempty"`
|
|
}
|
|
|
|
// Validate validates this get account group response data items0
|
|
func (m *GetAccountGroupResponseDataItems0) Validate(formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// ContextValidate validates this get account group response data items0 based on context it is used
|
|
func (m *GetAccountGroupResponseDataItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *GetAccountGroupResponseDataItems0) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *GetAccountGroupResponseDataItems0) UnmarshalBinary(b []byte) error {
|
|
var res GetAccountGroupResponseDataItems0
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|