mirror of https://github.com/vernonkeenan/lib
93 lines
2.3 KiB
Go
93 lines
2.3 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 voip_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"
|
||
|
"github.com/go-openapi/validate"
|
||
|
)
|
||
|
|
||
|
// CallFlowAction Call flows describe steps to take in order to process a phone call. They are trees of information related to a phone call such as "answer, play file, record file" etc. that are logically grouped together and ordered.
|
||
|
//
|
||
|
// swagger:model CallFlowAction
|
||
|
type CallFlowAction struct {
|
||
|
|
||
|
// Children callflows
|
||
|
Children interface{} `json:"Children,omitempty"`
|
||
|
|
||
|
// The data/arguments of the callflow module
|
||
|
Data interface{} `json:"Data,omitempty"`
|
||
|
|
||
|
// Telnexus Record Identifier
|
||
|
ID string `json:"ID,omitempty"`
|
||
|
|
||
|
// The name of the callflow module to execute at this node
|
||
|
// Max Length: 64
|
||
|
// Min Length: 1
|
||
|
Module string `json:"Module,omitempty"`
|
||
|
}
|
||
|
|
||
|
// Validate validates this call flow action
|
||
|
func (m *CallFlowAction) Validate(formats strfmt.Registry) error {
|
||
|
var res []error
|
||
|
|
||
|
if err := m.validateModule(formats); err != nil {
|
||
|
res = append(res, err)
|
||
|
}
|
||
|
|
||
|
if len(res) > 0 {
|
||
|
return errors.CompositeValidationError(res...)
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *CallFlowAction) validateModule(formats strfmt.Registry) error {
|
||
|
if swag.IsZero(m.Module) { // not required
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
if err := validate.MinLength("Module", "body", m.Module, 1); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
if err := validate.MaxLength("Module", "body", m.Module, 64); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// ContextValidate validates this call flow action based on context it is used
|
||
|
func (m *CallFlowAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// MarshalBinary interface implementation
|
||
|
func (m *CallFlowAction) MarshalBinary() ([]byte, error) {
|
||
|
if m == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
return swag.WriteJSON(m)
|
||
|
}
|
||
|
|
||
|
// UnmarshalBinary interface implementation
|
||
|
func (m *CallFlowAction) UnmarshalBinary(b []byte) error {
|
||
|
var res CallFlowAction
|
||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
*m = res
|
||
|
return nil
|
||
|
}
|