Evo Voice

<back to all web services

GetFlow

Get the specified flow

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
GET/flows/{flowId}
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class EntityInfo implements JsonSerializable
{
    public function __construct(
        /** @description The ID of the object */
        // @ApiMember(Description="The ID of the object")
        /** @var string|null */
        public ?string $id=null,

        /** @description The date the object was created */
        // @ApiMember(Description="The date the object was created")
        /** @var string|null */
        public ?string $dateCreated=null,

        /** @description The date the object was last modified */
        // @ApiMember(Description="The date the object was last modified")
        /** @var string|null */
        public ?string $dateLastModified=null,

        /** @description The user that created this object */
        // @ApiMember(Description="The user that created this object")
        /** @var string|null */
        public ?string $createdBy=null,

        /** @description The user that last modified this object */
        // @ApiMember(Description="The user that last modified this object")
        /** @var string|null */
        public ?string $lastModifiedBy=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['dateCreated'])) $this->dateCreated = $o['dateCreated'];
        if (isset($o['dateLastModified'])) $this->dateLastModified = $o['dateLastModified'];
        if (isset($o['createdBy'])) $this->createdBy = $o['createdBy'];
        if (isset($o['lastModifiedBy'])) $this->lastModifiedBy = $o['lastModifiedBy'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->dateCreated)) $o['dateCreated'] = $this->dateCreated;
        if (isset($this->dateLastModified)) $o['dateLastModified'] = $this->dateLastModified;
        if (isset($this->createdBy)) $o['createdBy'] = $this->createdBy;
        if (isset($this->lastModifiedBy)) $o['lastModifiedBy'] = $this->lastModifiedBy;
        return empty($o) ? new class(){} : $o;
    }
}

enum FlowRoles : string
{
    case UI = 'UI';
    case Reference = 'Reference';
    case PhoneNumberRouting = 'PhoneNumberRouting';
    case UserDialOut = 'UserDialOut';
    case FaxNumberRouting = 'FaxNumberRouting';
}

class CustomerBreadcrumb implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $name=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['name'])) $this->name = $o['name'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->name)) $o['name'] = $this->name;
        return empty($o) ? new class(){} : $o;
    }
}

enum FlowNodeCategories : string
{
    case General = 'General';
    case Voice = 'Voice';
    case Logic = 'Logic';
    case DateAndTime = 'DateAndTime';
    case Audio = 'Audio';
    case Messaging = 'Messaging';
    case Assistant = 'Assistant';
    case Flows = 'Flows';
    case Fax = 'Fax';
    case Network = 'Network';
    case Cookies = 'Cookies';
    case CallCenter = 'CallCenter';
    case Intelligence = 'Intelligence';
}

enum ValueTypes : string
{
    case NotSpecified = 'NotSpecified';
    case String = 'String';
    case Boolean = 'Boolean';
    case Number = 'Number';
    case List = 'List';
    case Struct = 'Struct';
    case Transition = 'Transition';
    case Custom = 'Custom';
    case Date = 'Date';
    case AudioFile = 'AudioFile';
    case TimeZoneId = 'TimeZoneId';
    case PhoneNumber = 'PhoneNumber';
    case User = 'User';
    case Endpoint = 'Endpoint';
    case Time = 'Time';
    case File = 'File';
    case FaxNumber = 'FaxNumber';
    case EmailAccount = 'EmailAccount';
    case Customer = 'Customer';
    case Flow = 'Flow';
    case Team = 'Team';
    case FlowReference = 'FlowReference';
    case Integration = 'Integration';
    case Assistant = 'Assistant';
}

enum UIHints : string
{
    case None = 'None';
    case LargeText = 'LargeText';
    case InlineForm = 'InlineForm';
    case Password = 'Password';
    case InlineStruct = 'InlineStruct';
}

/**
 * @template array of String
 * @template array1 of Value
 */
class Struct extends array implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

class Value implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $boolValue=null,
        /** @var string|null */
        public ?string $stringValue=null,
        /** @var float|null */
        public ?float $numberValue=null,
        /** @var array<Struct>|null */
        public ?array $listValue=null,
        /** @var Struct|null */
        public ?Struct $structValue=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['boolValue'])) $this->boolValue = $o['boolValue'];
        if (isset($o['stringValue'])) $this->stringValue = $o['stringValue'];
        if (isset($o['numberValue'])) $this->numberValue = $o['numberValue'];
        if (isset($o['listValue'])) $this->listValue = JsonConverters::fromArray('Struct', $o['listValue']);
        if (isset($o['structValue'])) $this->structValue = JsonConverters::from('Struct', $o['structValue']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->boolValue)) $o['boolValue'] = $this->boolValue;
        if (isset($this->stringValue)) $o['stringValue'] = $this->stringValue;
        if (isset($this->numberValue)) $o['numberValue'] = $this->numberValue;
        if (isset($this->listValue)) $o['listValue'] = JsonConverters::toArray('Struct', $this->listValue);
        if (isset($this->structValue)) $o['structValue'] = JsonConverters::to('Struct', $this->structValue);
        return empty($o) ? new class(){} : $o;
    }
}

enum DataFieldUniqueness : string
{
    case NotUnique = 'NotUnique';
    case Unique = 'Unique';
    case UniqueToCustomer = 'UniqueToCustomer';
}

enum UserDataFieldModes : string
{
    case Hidden = 'Hidden';
    case ReadOnly = 'ReadOnly';
    case ReadWrite = 'ReadWrite';
}

class DataField implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var ValueTypes|null */
        public ?ValueTypes $type=null,
        /** @var UIHints|null */
        public ?UIHints $uiHint=null,
        /** @var string|null */
        public ?string $uiTab=null,
        /** @var bool|null */
        public ?bool $isAsync=null,
        /** @var bool|null */
        public ?bool $disableBinding=null,
        /** @var DataType|null */
        public ?DataType $structType=null,
        /** @var DataType|null */
        public ?DataType $listType=null,
        /** @var string|null */
        public ?string $description=null,
        /** @var array<string>|null */
        public ?array $possibleValues=null,
        /** @var bool|null */
        public ?bool $isOutput=null,
        /** @var string|null */
        public ?string $customFieldValuesUrl=null,
        /** @var Value|null */
        public ?Value $defaultValue=null,
        /** @var string|null */
        public ?string $transitionNameFormat=null,
        /** @var DataFieldUniqueness|null */
        public ?DataFieldUniqueness $uniqueness=null,
        /** @var bool|null */
        public ?bool $voiceOnly=null,
        /** @var string|null */
        public ?string $conditionalVisibilityField=null,
        /** @var string|null */
        public ?string $conditionalVisibilityValue=null,
        /** @var bool|null */
        public ?bool $noEvalTemplate=null,
        /** @var UserDataFieldModes|null */
        public ?UserDataFieldModes $userMode=null,
        /** @var bool|null */
        public ?bool $anyValueType=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['type'])) $this->type = JsonConverters::from('ValueTypes', $o['type']);
        if (isset($o['uiHint'])) $this->uiHint = JsonConverters::from('UIHints', $o['uiHint']);
        if (isset($o['uiTab'])) $this->uiTab = $o['uiTab'];
        if (isset($o['isAsync'])) $this->isAsync = $o['isAsync'];
        if (isset($o['disableBinding'])) $this->disableBinding = $o['disableBinding'];
        if (isset($o['structType'])) $this->structType = JsonConverters::from('DataType', $o['structType']);
        if (isset($o['listType'])) $this->listType = JsonConverters::from('DataType', $o['listType']);
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['possibleValues'])) $this->possibleValues = JsonConverters::fromArray('string', $o['possibleValues']);
        if (isset($o['isOutput'])) $this->isOutput = $o['isOutput'];
        if (isset($o['customFieldValuesUrl'])) $this->customFieldValuesUrl = $o['customFieldValuesUrl'];
        if (isset($o['defaultValue'])) $this->defaultValue = JsonConverters::from('Value', $o['defaultValue']);
        if (isset($o['transitionNameFormat'])) $this->transitionNameFormat = $o['transitionNameFormat'];
        if (isset($o['uniqueness'])) $this->uniqueness = JsonConverters::from('DataFieldUniqueness', $o['uniqueness']);
        if (isset($o['voiceOnly'])) $this->voiceOnly = $o['voiceOnly'];
        if (isset($o['conditionalVisibilityField'])) $this->conditionalVisibilityField = $o['conditionalVisibilityField'];
        if (isset($o['conditionalVisibilityValue'])) $this->conditionalVisibilityValue = $o['conditionalVisibilityValue'];
        if (isset($o['noEvalTemplate'])) $this->noEvalTemplate = $o['noEvalTemplate'];
        if (isset($o['userMode'])) $this->userMode = JsonConverters::from('UserDataFieldModes', $o['userMode']);
        if (isset($o['anyValueType'])) $this->anyValueType = $o['anyValueType'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->type)) $o['type'] = JsonConverters::to('ValueTypes', $this->type);
        if (isset($this->uiHint)) $o['uiHint'] = JsonConverters::to('UIHints', $this->uiHint);
        if (isset($this->uiTab)) $o['uiTab'] = $this->uiTab;
        if (isset($this->isAsync)) $o['isAsync'] = $this->isAsync;
        if (isset($this->disableBinding)) $o['disableBinding'] = $this->disableBinding;
        if (isset($this->structType)) $o['structType'] = JsonConverters::to('DataType', $this->structType);
        if (isset($this->listType)) $o['listType'] = JsonConverters::to('DataType', $this->listType);
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->possibleValues)) $o['possibleValues'] = JsonConverters::toArray('string', $this->possibleValues);
        if (isset($this->isOutput)) $o['isOutput'] = $this->isOutput;
        if (isset($this->customFieldValuesUrl)) $o['customFieldValuesUrl'] = $this->customFieldValuesUrl;
        if (isset($this->defaultValue)) $o['defaultValue'] = JsonConverters::to('Value', $this->defaultValue);
        if (isset($this->transitionNameFormat)) $o['transitionNameFormat'] = $this->transitionNameFormat;
        if (isset($this->uniqueness)) $o['uniqueness'] = JsonConverters::to('DataFieldUniqueness', $this->uniqueness);
        if (isset($this->voiceOnly)) $o['voiceOnly'] = $this->voiceOnly;
        if (isset($this->conditionalVisibilityField)) $o['conditionalVisibilityField'] = $this->conditionalVisibilityField;
        if (isset($this->conditionalVisibilityValue)) $o['conditionalVisibilityValue'] = $this->conditionalVisibilityValue;
        if (isset($this->noEvalTemplate)) $o['noEvalTemplate'] = $this->noEvalTemplate;
        if (isset($this->userMode)) $o['userMode'] = JsonConverters::to('UserDataFieldModes', $this->userMode);
        if (isset($this->anyValueType)) $o['anyValueType'] = $this->anyValueType;
        return empty($o) ? new class(){} : $o;
    }
}

class DataType implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $typeName=null,
        /** @var array<DataField>|null */
        public ?array $fields=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['typeName'])) $this->typeName = $o['typeName'];
        if (isset($o['fields'])) $this->fields = JsonConverters::fromArray('DataField', $o['fields']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->typeName)) $o['typeName'] = $this->typeName;
        if (isset($this->fields)) $o['fields'] = JsonConverters::toArray('DataField', $this->fields);
        return empty($o) ? new class(){} : $o;
    }
}

enum FlowChannels : string
{
    case Voice = 'Voice';
    case Chat = 'Chat';
    case Fax = 'Fax';
}

class FlowNodeSpec implements JsonSerializable
{
    public function __construct(
        /** @description The name of this node */
        // @ApiMember(Description="The name of this node")
        /** @var string|null */
        public ?string $name=null,

        /** @description A description of this node */
        // @ApiMember(Description="A description of this node")
        /** @var string|null */
        public ?string $description=null,

        /** @description Icon class for this node (FontAwesome) */
        // @ApiMember(Description="Icon class for this node (FontAwesome)")
        /** @var string|null */
        public ?string $iconClass=null,

        /** @description The type name for this node */
        // @ApiMember(Description="The type name for this node")
        /** @var string|null */
        public ?string $typeName=null,

        /** @description The category this node should be grouped under */
        // @ApiMember(Description="The category this node should be grouped under")
        /** @var FlowNodeCategories|null */
        public ?FlowNodeCategories $category=null,

        /** @description The URL where this node is located */
        // @ApiMember(Description="The URL where this node is located")
        /** @var string|null */
        public ?string $url=null,

        /** @description The data type for this node */
        // @ApiMember(Description="The data type for this node")
        /** @var DataType|null */
        public ?DataType $dataType=null,

        /** @description URL for documentation for this node */
        // @ApiMember(Description="URL for documentation for this node")
        /** @var string|null */
        public ?string $documentationUrl=null,

        /** @description The channels that this node is restricted to */
        // @ApiMember(Description="The channels that this node is restricted to")
        /** @var array<FlowChannels>|null */
        public ?array $restrictToChannels=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['iconClass'])) $this->iconClass = $o['iconClass'];
        if (isset($o['typeName'])) $this->typeName = $o['typeName'];
        if (isset($o['category'])) $this->category = JsonConverters::from('FlowNodeCategories', $o['category']);
        if (isset($o['url'])) $this->url = $o['url'];
        if (isset($o['dataType'])) $this->dataType = JsonConverters::from('DataType', $o['dataType']);
        if (isset($o['documentationUrl'])) $this->documentationUrl = $o['documentationUrl'];
        if (isset($o['restrictToChannels'])) $this->restrictToChannels = JsonConverters::fromArray('FlowChannels', $o['restrictToChannels']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->iconClass)) $o['iconClass'] = $this->iconClass;
        if (isset($this->typeName)) $o['typeName'] = $this->typeName;
        if (isset($this->category)) $o['category'] = JsonConverters::to('FlowNodeCategories', $this->category);
        if (isset($this->url)) $o['url'] = $this->url;
        if (isset($this->dataType)) $o['dataType'] = JsonConverters::to('DataType', $this->dataType);
        if (isset($this->documentationUrl)) $o['documentationUrl'] = $this->documentationUrl;
        if (isset($this->restrictToChannels)) $o['restrictToChannels'] = JsonConverters::toArray('FlowChannels', $this->restrictToChannels);
        return empty($o) ? new class(){} : $o;
    }
}

class FlowNodeUI implements JsonSerializable
{
    public function __construct(
        /** @description The X position of the node */
        // @ApiMember(Description="The X position of the node")
        /** @var float */
        public float $x=0.0,

        /** @description The Y position of the node */
        // @ApiMember(Description="The Y position of the node")
        /** @var float */
        public float $y=0.0,

        /** @description Notes for this node */
        // @ApiMember(Description="Notes for this node")
        /** @var string|null */
        public ?string $notes=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['x'])) $this->x = $o['x'];
        if (isset($o['y'])) $this->y = $o['y'];
        if (isset($o['notes'])) $this->notes = $o['notes'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->x)) $o['x'] = $this->x;
        if (isset($this->y)) $o['y'] = $this->y;
        if (isset($this->notes)) $o['notes'] = $this->notes;
        return empty($o) ? new class(){} : $o;
    }
}

enum ValueSources : string
{
    case Value = 'Value';
    case Flow = 'Flow';
    case System = 'System';
    case Customer = 'Customer';
    case Session = 'Session';
    case Endpoint = 'Endpoint';
    case Expression = 'Expression';
    case User = 'User';
}

class NodeParameter implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var ValueTypes|null */
        public ?ValueTypes $type=null,
        /** @var ValueSources|null */
        public ?ValueSources $source=null,
        /** @var bool|null */
        public ?bool $isAsync=null,
        /** @var string|null */
        public ?string $referenceId=null,
        /** @var Value|null */
        public ?Value $value=null,
        /** @var bool|null */
        public ?bool $noEvalTemplate=null,
        /** @var array<NodeParameterMap>|null */
        public ?array $listParameters=null,
        /** @var NodeParameterMap|null */
        public ?NodeParameterMap $structParameters=null,
        /** @var bool|null */
        public ?bool $isOutput=null,
        /** @var string|null */
        public ?string $expression=null,
        /** @var DataType|null */
        public ?DataType $listType=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['type'])) $this->type = JsonConverters::from('ValueTypes', $o['type']);
        if (isset($o['source'])) $this->source = JsonConverters::from('ValueSources', $o['source']);
        if (isset($o['isAsync'])) $this->isAsync = $o['isAsync'];
        if (isset($o['referenceId'])) $this->referenceId = $o['referenceId'];
        if (isset($o['value'])) $this->value = JsonConverters::from('Value', $o['value']);
        if (isset($o['noEvalTemplate'])) $this->noEvalTemplate = $o['noEvalTemplate'];
        if (isset($o['listParameters'])) $this->listParameters = JsonConverters::fromArray('NodeParameterMap', $o['listParameters']);
        if (isset($o['structParameters'])) $this->structParameters = JsonConverters::from('NodeParameterMap', $o['structParameters']);
        if (isset($o['isOutput'])) $this->isOutput = $o['isOutput'];
        if (isset($o['expression'])) $this->expression = $o['expression'];
        if (isset($o['listType'])) $this->listType = JsonConverters::from('DataType', $o['listType']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->type)) $o['type'] = JsonConverters::to('ValueTypes', $this->type);
        if (isset($this->source)) $o['source'] = JsonConverters::to('ValueSources', $this->source);
        if (isset($this->isAsync)) $o['isAsync'] = $this->isAsync;
        if (isset($this->referenceId)) $o['referenceId'] = $this->referenceId;
        if (isset($this->value)) $o['value'] = JsonConverters::to('Value', $this->value);
        if (isset($this->noEvalTemplate)) $o['noEvalTemplate'] = $this->noEvalTemplate;
        if (isset($this->listParameters)) $o['listParameters'] = JsonConverters::toArray('NodeParameterMap', $this->listParameters);
        if (isset($this->structParameters)) $o['structParameters'] = JsonConverters::to('NodeParameterMap', $this->structParameters);
        if (isset($this->isOutput)) $o['isOutput'] = $this->isOutput;
        if (isset($this->expression)) $o['expression'] = $this->expression;
        if (isset($this->listType)) $o['listType'] = JsonConverters::to('DataType', $this->listType);
        return empty($o) ? new class(){} : $o;
    }
}

/**
 * @template array of String
 * @template array1 of NodeParameter
 */
class NodeParameterMap extends array implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

class FlowNode implements JsonSerializable
{
    public function __construct(
        /** @description The ID of this node. Must be unique within the flow but can be anything */
        // @ApiMember(Description="The ID of this node. Must be unique within the flow but can be anything")
        /** @var string|null */
        public ?string $id=null,

        /** @description Is this the starting node for the flow. Only one node can have this set */
        // @ApiMember(Description="Is this the starting node for the flow. Only one node can have this set")
        /** @var bool|null */
        public ?bool $isStartNode=null,

        /** @description The name of the node, descriptive to be used as a reminder in the GUI */
        // @ApiMember(Description="The name of the node, descriptive to be used as a reminder in the GUI")
        /** @var string|null */
        public ?string $name=null,

        /** @description The specification for the node */
        // @ApiMember(Description="The specification for the node")
        /** @var FlowNodeSpec|null */
        public ?FlowNodeSpec $spec=null,

        /** @description The UI data for the node */
        // @ApiMember(Description="The UI data for the node")
        /** @var FlowNodeUI|null */
        public ?FlowNodeUI $ui=null,

        /** @description The data for this node. These will be POST'd to the endpoint when it is called. */
        // @ApiMember(Description="The data for this node. These will be POST'd to the endpoint when it is called.")
        /** @var NodeParameterMap|null */
        public ?NodeParameterMap $parameters=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['isStartNode'])) $this->isStartNode = $o['isStartNode'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['spec'])) $this->spec = JsonConverters::from('FlowNodeSpec', $o['spec']);
        if (isset($o['ui'])) $this->ui = JsonConverters::from('FlowNodeUI', $o['ui']);
        if (isset($o['parameters'])) $this->parameters = JsonConverters::from('NodeParameterMap', $o['parameters']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->isStartNode)) $o['isStartNode'] = $this->isStartNode;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->spec)) $o['spec'] = JsonConverters::to('FlowNodeSpec', $this->spec);
        if (isset($this->ui)) $o['ui'] = JsonConverters::to('FlowNodeUI', $this->ui);
        if (isset($this->parameters)) $o['parameters'] = JsonConverters::to('NodeParameterMap', $this->parameters);
        return empty($o) ? new class(){} : $o;
    }
}

class FlowParameter extends DataField implements JsonSerializable
{
    /**
     * @param string|null $id
     * @param string|null $name
     * @param ValueTypes|null $type
     * @param UIHints|null $uiHint
     * @param string|null $uiTab
     * @param bool|null $isAsync
     * @param bool|null $disableBinding
     * @param DataType|null $structType
     * @param DataType|null $listType
     * @param string|null $description
     * @param array<string>|null $possibleValues
     * @param bool|null $isOutput
     * @param string|null $customFieldValuesUrl
     * @param Value|null $defaultValue
     * @param string|null $transitionNameFormat
     * @param DataFieldUniqueness|null $uniqueness
     * @param bool|null $voiceOnly
     * @param string|null $conditionalVisibilityField
     * @param string|null $conditionalVisibilityValue
     * @param bool|null $noEvalTemplate
     * @param UserDataFieldModes|null $userMode
     * @param bool|null $anyValueType
     */
    public function __construct(
        ?string $id=null,
        ?string $name=null,
        ?ValueTypes $type=null,
        ?UIHints $uiHint=null,
        ?string $uiTab=null,
        ?bool $isAsync=null,
        ?bool $disableBinding=null,
        ?DataType $structType=null,
        ?DataType $listType=null,
        ?string $description=null,
        ?array $possibleValues=null,
        ?bool $isOutput=null,
        ?string $customFieldValuesUrl=null,
        ?Value $defaultValue=null,
        ?string $transitionNameFormat=null,
        ?DataFieldUniqueness $uniqueness=null,
        ?bool $voiceOnly=null,
        ?string $conditionalVisibilityField=null,
        ?string $conditionalVisibilityValue=null,
        ?bool $noEvalTemplate=null,
        ?UserDataFieldModes $userMode=null,
        ?bool $anyValueType=null,
        /** @var bool|null */
        public ?bool $isPublic=null,
        /** @var bool|null */
        public ?bool $isKnob=null
    ) {
        parent::__construct($id,$name,$type,$uiHint,$uiTab,$isAsync,$disableBinding,$structType,$listType,$description,$possibleValues,$isOutput,$customFieldValuesUrl,$defaultValue,$transitionNameFormat,$uniqueness,$voiceOnly,$conditionalVisibilityField,$conditionalVisibilityValue,$noEvalTemplate,$userMode,$anyValueType);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['isPublic'])) $this->isPublic = $o['isPublic'];
        if (isset($o['isKnob'])) $this->isKnob = $o['isKnob'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->isPublic)) $o['isPublic'] = $this->isPublic;
        if (isset($this->isKnob)) $o['isKnob'] = $this->isKnob;
        return empty($o) ? new class(){} : $o;
    }
}

class FlowExit implements JsonSerializable
{
    public function __construct(
        /** @description The unique ID for this exit */
        // @ApiMember(Description="The unique ID for this exit")
        /** @var string|null */
        public ?string $id=null,

        /** @description The name of this exit */
        // @ApiMember(Description="The name of this exit")
        /** @var string|null */
        public ?string $name=null,

        /** @description The UI for the exit */
        // @ApiMember(Description="The UI for the exit")
        /** @var FlowNodeUI|null */
        public ?FlowNodeUI $ui=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['ui'])) $this->ui = JsonConverters::from('FlowNodeUI', $o['ui']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->ui)) $o['ui'] = JsonConverters::to('FlowNodeUI', $this->ui);
        return empty($o) ? new class(){} : $o;
    }
}

class FlowUI implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $selectedNode=null,
        /** @var float */
        public float $canvasX=0.0,
        /** @var float */
        public float $canvasY=0.0,
        /** @var float */
        public float $canvasZoom=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['selectedNode'])) $this->selectedNode = $o['selectedNode'];
        if (isset($o['canvasX'])) $this->canvasX = $o['canvasX'];
        if (isset($o['canvasY'])) $this->canvasY = $o['canvasY'];
        if (isset($o['canvasZoom'])) $this->canvasZoom = $o['canvasZoom'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->selectedNode)) $o['selectedNode'] = $this->selectedNode;
        if (isset($this->canvasX)) $o['canvasX'] = $this->canvasX;
        if (isset($this->canvasY)) $o['canvasY'] = $this->canvasY;
        if (isset($this->canvasZoom)) $o['canvasZoom'] = $this->canvasZoom;
        return empty($o) ? new class(){} : $o;
    }
}

enum TagColors : string
{
    case Magenta = 'Magenta';
    case Red = 'Red';
    case Volcano = 'Volcano';
    case Orange = 'Orange';
    case Gold = 'Gold';
    case Lime = 'Lime';
    case Green = 'Green';
    case Cyan = 'Cyan';
    case Blue = 'Blue';
    case GeekBlue = 'GeekBlue';
    case Purple = 'Purple';
}

class Tag implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var TagColors|null */
        public ?TagColors $color=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['color'])) $this->color = JsonConverters::from('TagColors', $o['color']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->color)) $o['color'] = JsonConverters::to('TagColors', $this->color);
        return empty($o) ? new class(){} : $o;
    }
}

class FlowInfo extends EntityInfo implements JsonSerializable
{
    /**
     * @param string|null $id
     * @param string|null $dateCreated
     * @param string|null $dateLastModified
     * @param string|null $createdBy
     * @param string|null $lastModifiedBy
     */
    public function __construct(
        ?string $id=null,
        ?string $dateCreated=null,
        ?string $dateLastModified=null,
        ?string $createdBy=null,
        ?string $lastModifiedBy=null,
        /** @description The name of this flow */
        // @ApiMember(Description="The name of this flow")
        /** @var string|null */
        public ?string $name=null,

        /** @description The roles that this flow has */
        // @ApiMember(Description="The roles that this flow has")
        /** @var array<FlowRoles>|null */
        public ?array $roles=null,

        /** @description What this flow does */
        // @ApiMember(Description="What this flow does")
        /** @var string|null */
        public ?string $description=null,

        /** @description Any notes for this flow */
        // @ApiMember(Description="Any notes for this flow")
        /** @var string|null */
        public ?string $notes=null,

        /** @description The ID of the account associated with the flow */
        // @ApiMember(Description="The ID of the account associated with the flow")
        /** @var string|null */
        public ?string $accountId=null,

        /** @description The name of the account associated with the flow */
        // @ApiMember(Description="The name of the account associated with the flow")
        /** @var string|null */
        public ?string $accountName=null,

        /** @description The ID of the customer this flow is associated with */
        // @ApiMember(Description="The ID of the customer this flow is associated with")
        /** @var string|null */
        public ?string $customerId=null,

        /** @description The name of the customer this flow is associated with */
        // @ApiMember(Description="The name of the customer this flow is associated with")
        /** @var string|null */
        public ?string $customerName=null,

        /** @description The breadcrumb to the flow for this endpoint */
        // @ApiMember(Description="The breadcrumb to the flow for this endpoint")
        /** @var array<CustomerBreadcrumb>|null */
        public ?array $customerBreadcrumb=null,

        /** @description The nodes in this flow */
        // @ApiMember(Description="The nodes in this flow")
        /** @var array<FlowNode>|null */
        public ?array $nodes=null,

        /** @description The flow's parameters */
        // @ApiMember(Description="The flow's parameters")
        /** @var array<FlowParameter>|null */
        public ?array $parameters=null,

        /** @description The flow's exits */
        // @ApiMember(Description="The flow's exits")
        /** @var array<FlowExit>|null */
        public ?array $exits=null,

        /** @description The UI data for the flow */
        // @ApiMember(Description="The UI data for the flow")
        /** @var FlowUI|null */
        public ?FlowUI $ui=null,

        /** @description The list of tags for this flow */
        // @ApiMember(Description="The list of tags for this flow")
        /** @var array<Tag>|null */
        public ?array $tags=null,

        /** @description The number of nodes in this flow */
        // @ApiMember(Description="The number of nodes in this flow")
        /** @var int */
        public int $nodeCount=0
    ) {
        parent::__construct($id,$dateCreated,$dateLastModified,$createdBy,$lastModifiedBy);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['roles'])) $this->roles = JsonConverters::fromArray('FlowRoles', $o['roles']);
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['notes'])) $this->notes = $o['notes'];
        if (isset($o['accountId'])) $this->accountId = $o['accountId'];
        if (isset($o['accountName'])) $this->accountName = $o['accountName'];
        if (isset($o['customerId'])) $this->customerId = $o['customerId'];
        if (isset($o['customerName'])) $this->customerName = $o['customerName'];
        if (isset($o['customerBreadcrumb'])) $this->customerBreadcrumb = JsonConverters::fromArray('CustomerBreadcrumb', $o['customerBreadcrumb']);
        if (isset($o['nodes'])) $this->nodes = JsonConverters::fromArray('FlowNode', $o['nodes']);
        if (isset($o['parameters'])) $this->parameters = JsonConverters::fromArray('FlowParameter', $o['parameters']);
        if (isset($o['exits'])) $this->exits = JsonConverters::fromArray('FlowExit', $o['exits']);
        if (isset($o['ui'])) $this->ui = JsonConverters::from('FlowUI', $o['ui']);
        if (isset($o['tags'])) $this->tags = JsonConverters::fromArray('Tag', $o['tags']);
        if (isset($o['nodeCount'])) $this->nodeCount = $o['nodeCount'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->roles)) $o['roles'] = JsonConverters::toArray('FlowRoles', $this->roles);
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->notes)) $o['notes'] = $this->notes;
        if (isset($this->accountId)) $o['accountId'] = $this->accountId;
        if (isset($this->accountName)) $o['accountName'] = $this->accountName;
        if (isset($this->customerId)) $o['customerId'] = $this->customerId;
        if (isset($this->customerName)) $o['customerName'] = $this->customerName;
        if (isset($this->customerBreadcrumb)) $o['customerBreadcrumb'] = JsonConverters::toArray('CustomerBreadcrumb', $this->customerBreadcrumb);
        if (isset($this->nodes)) $o['nodes'] = JsonConverters::toArray('FlowNode', $this->nodes);
        if (isset($this->parameters)) $o['parameters'] = JsonConverters::toArray('FlowParameter', $this->parameters);
        if (isset($this->exits)) $o['exits'] = JsonConverters::toArray('FlowExit', $this->exits);
        if (isset($this->ui)) $o['ui'] = JsonConverters::to('FlowUI', $this->ui);
        if (isset($this->tags)) $o['tags'] = JsonConverters::toArray('Tag', $this->tags);
        if (isset($this->nodeCount)) $o['nodeCount'] = $this->nodeCount;
        return empty($o) ? new class(){} : $o;
    }
}

/** @description Get the specified flow */
// @Api(Description="Get the specified flow")
class GetFlow implements IGet, JsonSerializable
{
    public function __construct(
        /** @description the ID of the flow to retrieve */
        // @ApiMember(Description="the ID of the flow to retrieve")
        /** @var string|null */
        public ?string $flowId=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['flowId'])) $this->flowId = $o['flowId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->flowId)) $o['flowId'] = $this->flowId;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetFlow DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /flows/{flowId} HTTP/1.1 
Host: team.evovoice.io 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"name":"String","roles":["UI"],"description":"String","notes":"String","accountId":"String","accountName":"String","customerId":"String","customerName":"String","customerBreadcrumb":[{"id":"String","name":"String"}],"nodes":[{"id":"String","isStartNode":false,"name":"String","spec":{"name":"String","description":"String","iconClass":"String","typeName":"String","category":"General","url":"String","documentationUrl":"String","restrictToChannels":["Voice"]},"ui":{"x":0,"y":0,"notes":"String"},"parameters":{}}],"parameters":[{"isPublic":false,"isKnob":false,"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"exits":[{"id":"String","name":"String","ui":{"x":0,"y":0,"notes":"String"}}],"ui":{"selectedNode":"String","canvasX":0,"canvasY":0,"canvasZoom":0},"tags":[{"id":"String","name":"String","color":"Magenta"}],"nodeCount":0,"id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}