Class Flow (0.13.0)

public final class Flow extends GeneratedMessageV3 implements FlowOrBuilder

Flows represents the conversation flows when you build your chatbot agent. A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started. Usually, when a transition route is followed by a matched intent, the intent will be "consumed". This means the intent won't activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow.

Protobuf type google.cloud.dialogflow.cx.v3beta1.Flow

Implements

FlowOrBuilder

Static Fields

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

EVENT_HANDLERS_FIELD_NUMBER

public static final int EVENT_HANDLERS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NLU_SETTINGS_FIELD_NUMBER

public static final int NLU_SETTINGS_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSITION_ROUTES_FIELD_NUMBER

public static final int TRANSITION_ROUTES_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSITION_ROUTE_GROUPS_FIELD_NUMBER

public static final int TRANSITION_ROUTE_GROUPS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Flow getDefaultInstance()
Returns
TypeDescription
Flow

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Flow.Builder newBuilder()
Returns
TypeDescription
Flow.Builder

newBuilder(Flow prototype)

public static Flow.Builder newBuilder(Flow prototype)
Parameter
NameDescription
prototypeFlow
Returns
TypeDescription
Flow.Builder

parseDelimitedFrom(InputStream input)

public static Flow parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Flow
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Flow parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Flow
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Flow parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Flow
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Flow parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Flow
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Flow parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Flow
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Flow parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Flow
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Flow parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Flow
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Flow parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Flow
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Flow parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Flow
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Flow parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Flow
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Flow parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Flow
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Flow parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Flow
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Flow> parser()
Returns
TypeDescription
Parser<Flow>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Flow getDefaultInstanceForType()
Returns
TypeDescription
Flow

getDescription()

public String getDescription()

The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.

string description = 3;

Returns
TypeDescription
ByteString

The bytes for description.

getDisplayName()

public String getDisplayName()

Required. The human-readable name of the flow.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The human-readable name of the flow.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for displayName.

getEventHandlers(int index)

public EventHandler getEventHandlers(int index)

A flow's event handlers serve two purposes:

  • They are responsible for handling events (e.g. no match, webhook errors) in the flow.
  • They are inherited by every page's event handlers, which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow. Unlike transition_routes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.

repeated .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handlers = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventHandler

getEventHandlersCount()

public int getEventHandlersCount()

A flow's event handlers serve two purposes:

  • They are responsible for handling events (e.g. no match, webhook errors) in the flow.
  • They are inherited by every page's event handlers, which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow. Unlike transition_routes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.

repeated .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handlers = 10;

Returns
TypeDescription
int

getEventHandlersList()

public List<EventHandler> getEventHandlersList()

A flow's event handlers serve two purposes:

  • They are responsible for handling events (e.g. no match, webhook errors) in the flow.
  • They are inherited by every page's event handlers, which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow. Unlike transition_routes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.

repeated .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handlers = 10;

Returns
TypeDescription
List<EventHandler>

getEventHandlersOrBuilder(int index)

public EventHandlerOrBuilder getEventHandlersOrBuilder(int index)

A flow's event handlers serve two purposes:

  • They are responsible for handling events (e.g. no match, webhook errors) in the flow.
  • They are inherited by every page's event handlers, which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow. Unlike transition_routes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.

repeated .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handlers = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventHandlerOrBuilder

getEventHandlersOrBuilderList()

public List<? extends EventHandlerOrBuilder> getEventHandlersOrBuilderList()

A flow's event handlers serve two purposes:

  • They are responsible for handling events (e.g. no match, webhook errors) in the flow.
  • They are inherited by every page's event handlers, which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow. Unlike transition_routes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.

repeated .google.cloud.dialogflow.cx.v3beta1.EventHandler event_handlers = 10;

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder>

getName()

public String getName()

The unique identifier of the flow. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of the flow. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getNluSettings()

public NluSettings getNluSettings()

NLU related settings of the flow.

.google.cloud.dialogflow.cx.v3beta1.NluSettings nlu_settings = 11;

Returns
TypeDescription
NluSettings

The nluSettings.

getNluSettingsOrBuilder()

public NluSettingsOrBuilder getNluSettingsOrBuilder()

NLU related settings of the flow.

.google.cloud.dialogflow.cx.v3beta1.NluSettings nlu_settings = 11;

Returns
TypeDescription
NluSettingsOrBuilder

getParserForType()

public Parser<Flow> getParserForType()
Returns
TypeDescription
Parser<Flow>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTransitionRouteGroups(int index)

public String getTransitionRouteGroups(int index)

A flow's transition route group serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's transition route groups. Transition route groups defined in the page have higher priority than those defined in the flow. Format:projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>.

repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The transitionRouteGroups at the given index.

getTransitionRouteGroupsBytes(int index)

public ByteString getTransitionRouteGroupsBytes(int index)

A flow's transition route group serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's transition route groups. Transition route groups defined in the page have higher priority than those defined in the flow. Format:projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>.

repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the transitionRouteGroups at the given index.

getTransitionRouteGroupsCount()

public int getTransitionRouteGroupsCount()

A flow's transition route group serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's transition route groups. Transition route groups defined in the page have higher priority than those defined in the flow. Format:projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>.

repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
int

The count of transitionRouteGroups.

getTransitionRouteGroupsList()

public ProtocolStringList getTransitionRouteGroupsList()

A flow's transition route group serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's transition route groups. Transition route groups defined in the page have higher priority than those defined in the flow. Format:projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>.

repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ProtocolStringList

A list containing the transitionRouteGroups.

getTransitionRoutes(int index)

public TransitionRoute getTransitionRoutes(int index)

A flow's transition routes serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's transition routes and can support use cases such as the user saying "help" or "can I talk to a human?", which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow. TransitionRoutes are evalauted in the following order:
  • TransitionRoutes with intent specified.
  • TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow.

repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
TransitionRoute

getTransitionRoutesCount()

public int getTransitionRoutesCount()

A flow's transition routes serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's transition routes and can support use cases such as the user saying "help" or "can I talk to a human?", which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow. TransitionRoutes are evalauted in the following order:
  • TransitionRoutes with intent specified.
  • TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow.

repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 4;

Returns
TypeDescription
int

getTransitionRoutesList()

public List<TransitionRoute> getTransitionRoutesList()

A flow's transition routes serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's transition routes and can support use cases such as the user saying "help" or "can I talk to a human?", which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow. TransitionRoutes are evalauted in the following order:
  • TransitionRoutes with intent specified.
  • TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow.

repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 4;

Returns
TypeDescription
List<TransitionRoute>

getTransitionRoutesOrBuilder(int index)

public TransitionRouteOrBuilder getTransitionRoutesOrBuilder(int index)

A flow's transition routes serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's transition routes and can support use cases such as the user saying "help" or "can I talk to a human?", which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow. TransitionRoutes are evalauted in the following order:
  • TransitionRoutes with intent specified.
  • TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow.

repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
TransitionRouteOrBuilder

getTransitionRoutesOrBuilderList()

public List<? extends TransitionRouteOrBuilder> getTransitionRoutesOrBuilderList()

A flow's transition routes serve two purposes:

  • They are responsible for matching the user's first utterances in the flow.
  • They are inherited by every page's transition routes and can support use cases such as the user saying "help" or "can I talk to a human?", which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow. TransitionRoutes are evalauted in the following order:
  • TransitionRoutes with intent specified.
  • TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow.

repeated .google.cloud.dialogflow.cx.v3beta1.TransitionRoute transition_routes = 4;

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder>

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasNluSettings()

public boolean hasNluSettings()

NLU related settings of the flow.

.google.cloud.dialogflow.cx.v3beta1.NluSettings nlu_settings = 11;

Returns
TypeDescription
boolean

Whether the nluSettings field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Flow.Builder newBuilderForType()
Returns
TypeDescription
Flow.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Flow.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Flow.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Flow.Builder toBuilder()
Returns
TypeDescription
Flow.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException