lib/api/kazoo/kazoo_models/get_number_response.go

370 lines
8.8 KiB
Go
Raw Permalink 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"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// GetNumberResponse get number response
//
// swagger:model GetNumberResponse
type GetNumberResponse struct {
// auth token
AuthToken string `json:"auth_token,omitempty"`
// data
Data *GetNumberResponseData `json:"data,omitempty"`
// node
// Example: dqZFtHthbelyE8MI6vU-LA
Node string `json:"node,omitempty"`
// page size
// Example: 117
PageSize float64 `json:"page_size,omitempty"`
// request id
// Example: a73973839c028f42519105681482b64f
RequestID string `json:"request_id,omitempty"`
// revision
// Example: 7c9f4f30f97ba288bad4f0f620e9e0bc
Revision string `json:"revision,omitempty"`
// status
// Example: success
Status string `json:"status,omitempty"`
// timestamp
// Example: 2020-05-07T01:56:53Z
Timestamp string `json:"timestamp,omitempty"`
// version
// Example: 4.3.103
Version string `json:"version,omitempty"`
}
// Validate validates this get number response
func (m *GetNumberResponse) 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 *GetNumberResponse) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
if m.Data != nil {
if err := m.Data.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data")
}
return err
}
}
return nil
}
// ContextValidate validate this get number response based on the context it is used
func (m *GetNumberResponse) 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 *GetNumberResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
if m.Data != nil {
if err := m.Data.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *GetNumberResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetNumberResponse) UnmarshalBinary(b []byte) error {
var res GetNumberResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// GetNumberResponseData get number response data
//
// swagger:model GetNumberResponseData
type GetNumberResponseData struct {
// cascade quantity
// Example: 61
CascadeQuantity float64 `json:"cascade_quantity,omitempty"`
// numbers
Numbers *GetNumberResponseDataNumbers `json:"numbers,omitempty"`
}
// Validate validates this get number response data
func (m *GetNumberResponseData) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateNumbers(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GetNumberResponseData) validateNumbers(formats strfmt.Registry) error {
if swag.IsZero(m.Numbers) { // not required
return nil
}
if m.Numbers != nil {
if err := m.Numbers.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + "numbers")
}
return err
}
}
return nil
}
// ContextValidate validate this get number response data based on the context it is used
func (m *GetNumberResponseData) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateNumbers(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GetNumberResponseData) contextValidateNumbers(ctx context.Context, formats strfmt.Registry) error {
if m.Numbers != nil {
if err := m.Numbers.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + "numbers")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *GetNumberResponseData) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetNumberResponseData) UnmarshalBinary(b []byte) error {
var res GetNumberResponseData
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// GetNumberResponseDataNumbers get number response data numbers
//
// swagger:model GetNumberResponseDataNumbers
type GetNumberResponseDataNumbers struct {
// numberitem
Numberitem *GetNumberResponseDataNumbersNumberitem `json:"numberitem,omitempty"`
}
// Validate validates this get number response data numbers
func (m *GetNumberResponseDataNumbers) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateNumberitem(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GetNumberResponseDataNumbers) validateNumberitem(formats strfmt.Registry) error {
if swag.IsZero(m.Numberitem) { // not required
return nil
}
if m.Numberitem != nil {
if err := m.Numberitem.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + "numbers" + "." + "numberitem")
}
return err
}
}
return nil
}
// ContextValidate validate this get number response data numbers based on the context it is used
func (m *GetNumberResponseDataNumbers) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateNumberitem(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GetNumberResponseDataNumbers) contextValidateNumberitem(ctx context.Context, formats strfmt.Registry) error {
if m.Numberitem != nil {
if err := m.Numberitem.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + "numbers" + "." + "numberitem")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *GetNumberResponseDataNumbers) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetNumberResponseDataNumbers) UnmarshalBinary(b []byte) error {
var res GetNumberResponseDataNumbers
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// GetNumberResponseDataNumbersNumberitem get number response data numbers numberitem
//
// swagger:model GetNumberResponseDataNumbersNumberitem
type GetNumberResponseDataNumbersNumberitem struct {
// assigned to
// Example: a66f2b7a40944b744dcc63ca6f10f47a
AssignedTo string `json:"assigned_to,omitempty"`
// created
// Example: 63714718327
Created float64 `json:"created,omitempty"`
// features
// Example: ["local"]
Features []string `json:"features"`
// features available
// Example: ["cnam","e911","force_outbound","port","prepend","ringback"]
FeaturesAvailable []string `json:"features_available"`
// state
// Example: in_service
State string `json:"state,omitempty"`
// updated
// Example: 63755492918
Updated float64 `json:"updated,omitempty"`
}
// Validate validates this get number response data numbers numberitem
func (m *GetNumberResponseDataNumbersNumberitem) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this get number response data numbers numberitem based on context it is used
func (m *GetNumberResponseDataNumbersNumberitem) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *GetNumberResponseDataNumbersNumberitem) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetNumberResponseDataNumbersNumberitem) UnmarshalBinary(b []byte) error {
var res GetNumberResponseDataNumbersNumberitem
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}