All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.dialogflow.cx.v3.Flow Maven / Gradle / Ivy

There is a newer version: 0.66.0
Show newest version
/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dialogflow/cx/v3/flow.proto

package com.google.cloud.dialogflow.cx.v3;

/**
 *
 *
 * 
 * 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 {@code google.cloud.dialogflow.cx.v3.Flow} */ public final class Flow extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Flow) FlowOrBuilder { private static final long serialVersionUID = 0L; // Use Flow.newBuilder() to construct. private Flow(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Flow() { name_ = ""; displayName_ = ""; description_ = ""; transitionRoutes_ = java.util.Collections.emptyList(); eventHandlers_ = java.util.Collections.emptyList(); transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Flow(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Flow( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); displayName_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); description_ = s; break; } case 34: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { transitionRoutes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } transitionRoutes_.add( input.readMessage( com.google.cloud.dialogflow.cx.v3.TransitionRoute.parser(), extensionRegistry)); break; } case 82: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { eventHandlers_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } eventHandlers_.add( input.readMessage( com.google.cloud.dialogflow.cx.v3.EventHandler.parser(), extensionRegistry)); break; } case 90: { com.google.cloud.dialogflow.cx.v3.NluSettings.Builder subBuilder = null; if (nluSettings_ != null) { subBuilder = nluSettings_.toBuilder(); } nluSettings_ = input.readMessage( com.google.cloud.dialogflow.cx.v3.NluSettings.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(nluSettings_); nluSettings_ = subBuilder.buildPartial(); } break; } case 122: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000004) != 0)) { transitionRouteGroups_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; } transitionRouteGroups_.add(s); break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { transitionRoutes_ = java.util.Collections.unmodifiableList(transitionRoutes_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { eventHandlers_ = java.util.Collections.unmodifiableList(eventHandlers_); } if (((mutable_bitField0_ & 0x00000004) != 0)) { transitionRouteGroups_ = transitionRouteGroups_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.FlowProto .internal_static_google_cloud_dialogflow_cx_v3_Flow_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.FlowProto .internal_static_google_cloud_dialogflow_cx_v3_Flow_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.cx.v3.Flow.class, com.google.cloud.dialogflow.cx.v3.Flow.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** * * *
   * The unique identifier of the flow.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/flows/<Flow ID>`.
   * 
* * string name = 1; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
   * The unique identifier of the flow.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/flows/<Flow ID>`.
   * 
* * string name = 1; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DISPLAY_NAME_FIELD_NUMBER = 2; private volatile java.lang.Object displayName_; /** * * *
   * Required. The human-readable name of the flow.
   * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The displayName. */ @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } } /** * * *
   * Required. The human-readable name of the flow.
   * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for displayName. */ @java.lang.Override public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 3; private volatile java.lang.Object description_; /** * * *
   * The description of the flow. The maximum length is 500 characters. If
   * exceeded, the request is rejected.
   * 
* * string description = 3; * * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** * * *
   * The description of the flow. The maximum length is 500 characters. If
   * exceeded, the request is rejected.
   * 
* * string description = 3; * * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TRANSITION_ROUTES_FIELD_NUMBER = 4; private java.util.List transitionRoutes_; /** * * *
   * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ @java.lang.Override public java.util.List getTransitionRoutesList() { return transitionRoutes_; } /** * * *
   * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ @java.lang.Override public java.util.List getTransitionRoutesOrBuilderList() { return transitionRoutes_; } /** * * *
   * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ @java.lang.Override public int getTransitionRoutesCount() { return transitionRoutes_.size(); } /** * * *
   * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int index) { return transitionRoutes_.get(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][Page.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.v3.TransitionRoute transition_routes = 4; */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOrBuilder( int index) { return transitionRoutes_.get(index); } public static final int EVENT_HANDLERS_FIELD_NUMBER = 10; private java.util.List eventHandlers_; /** * * *
   * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ @java.lang.Override public java.util.List getEventHandlersList() { return eventHandlers_; } /** * * *
   * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ @java.lang.Override public java.util.List getEventHandlersOrBuilderList() { return eventHandlers_; } /** * * *
   * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ @java.lang.Override public int getEventHandlersCount() { return eventHandlers_.size(); } /** * * *
   * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.EventHandler getEventHandlers(int index) { return eventHandlers_.get(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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlersOrBuilder( int index) { return eventHandlers_.get(index); } public static final int TRANSITION_ROUTE_GROUPS_FIELD_NUMBER = 15; private com.google.protobuf.LazyStringList transitionRouteGroups_; /** * * *
   * 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][Page.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) = { ... } * * * @return A list containing the transitionRouteGroups. */ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { return transitionRouteGroups_; } /** * * *
   * 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][Page.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) = { ... } * * * @return The count of transitionRouteGroups. */ public int getTransitionRouteGroupsCount() { return transitionRouteGroups_.size(); } /** * * *
   * 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][Page.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) = { ... } * * * @param index The index of the element to return. * @return The transitionRouteGroups at the given index. */ public java.lang.String getTransitionRouteGroups(int index) { return transitionRouteGroups_.get(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][Page.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) = { ... } * * * @param index The index of the value to return. * @return The bytes of the transitionRouteGroups at the given index. */ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { return transitionRouteGroups_.getByteString(index); } public static final int NLU_SETTINGS_FIELD_NUMBER = 11; private com.google.cloud.dialogflow.cx.v3.NluSettings nluSettings_; /** * * *
   * NLU related settings of the flow.
   * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; * * @return Whether the nluSettings field is set. */ @java.lang.Override public boolean hasNluSettings() { return nluSettings_ != null; } /** * * *
   * NLU related settings of the flow.
   * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; * * @return The nluSettings. */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.NluSettings getNluSettings() { return nluSettings_ == null ? com.google.cloud.dialogflow.cx.v3.NluSettings.getDefaultInstance() : nluSettings_; } /** * * *
   * NLU related settings of the flow.
   * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder getNluSettingsOrBuilder() { return getNluSettings(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!getDisplayNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); } if (!getDescriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } for (int i = 0; i < transitionRoutes_.size(); i++) { output.writeMessage(4, transitionRoutes_.get(i)); } for (int i = 0; i < eventHandlers_.size(); i++) { output.writeMessage(10, eventHandlers_.get(i)); } if (nluSettings_ != null) { output.writeMessage(11, getNluSettings()); } for (int i = 0; i < transitionRouteGroups_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString( output, 15, transitionRouteGroups_.getRaw(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (!getDisplayNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); } if (!getDescriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } for (int i = 0; i < transitionRoutes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, transitionRoutes_.get(i)); } for (int i = 0; i < eventHandlers_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, eventHandlers_.get(i)); } if (nluSettings_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getNluSettings()); } { int dataSize = 0; for (int i = 0; i < transitionRouteGroups_.size(); i++) { dataSize += computeStringSizeNoTag(transitionRouteGroups_.getRaw(i)); } size += dataSize; size += 1 * getTransitionRouteGroupsList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Flow)) { return super.equals(obj); } com.google.cloud.dialogflow.cx.v3.Flow other = (com.google.cloud.dialogflow.cx.v3.Flow) obj; if (!getName().equals(other.getName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (!getDescription().equals(other.getDescription())) return false; if (!getTransitionRoutesList().equals(other.getTransitionRoutesList())) return false; if (!getEventHandlersList().equals(other.getEventHandlersList())) return false; if (!getTransitionRouteGroupsList().equals(other.getTransitionRouteGroupsList())) return false; if (hasNluSettings() != other.hasNluSettings()) return false; if (hasNluSettings()) { if (!getNluSettings().equals(other.getNluSettings())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); if (getTransitionRoutesCount() > 0) { hash = (37 * hash) + TRANSITION_ROUTES_FIELD_NUMBER; hash = (53 * hash) + getTransitionRoutesList().hashCode(); } if (getEventHandlersCount() > 0) { hash = (37 * hash) + EVENT_HANDLERS_FIELD_NUMBER; hash = (53 * hash) + getEventHandlersList().hashCode(); } if (getTransitionRouteGroupsCount() > 0) { hash = (37 * hash) + TRANSITION_ROUTE_GROUPS_FIELD_NUMBER; hash = (53 * hash) + getTransitionRouteGroupsList().hashCode(); } if (hasNluSettings()) { hash = (37 * hash) + NLU_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getNluSettings().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.cx.v3.Flow parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3.Flow parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.Flow prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * 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 {@code google.cloud.dialogflow.cx.v3.Flow} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Flow) com.google.cloud.dialogflow.cx.v3.FlowOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.FlowProto .internal_static_google_cloud_dialogflow_cx_v3_Flow_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.FlowProto .internal_static_google_cloud_dialogflow_cx_v3_Flow_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.cx.v3.Flow.class, com.google.cloud.dialogflow.cx.v3.Flow.Builder.class); } // Construct using com.google.cloud.dialogflow.cx.v3.Flow.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getTransitionRoutesFieldBuilder(); getEventHandlersFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; displayName_ = ""; description_ = ""; if (transitionRoutesBuilder_ == null) { transitionRoutes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { transitionRoutesBuilder_.clear(); } if (eventHandlersBuilder_ == null) { eventHandlers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { eventHandlersBuilder_.clear(); } transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); if (nluSettingsBuilder_ == null) { nluSettings_ = null; } else { nluSettings_ = null; nluSettingsBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3.FlowProto .internal_static_google_cloud_dialogflow_cx_v3_Flow_descriptor; } @java.lang.Override public com.google.cloud.dialogflow.cx.v3.Flow getDefaultInstanceForType() { return com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dialogflow.cx.v3.Flow build() { com.google.cloud.dialogflow.cx.v3.Flow result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dialogflow.cx.v3.Flow buildPartial() { com.google.cloud.dialogflow.cx.v3.Flow result = new com.google.cloud.dialogflow.cx.v3.Flow(this); int from_bitField0_ = bitField0_; result.name_ = name_; result.displayName_ = displayName_; result.description_ = description_; if (transitionRoutesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { transitionRoutes_ = java.util.Collections.unmodifiableList(transitionRoutes_); bitField0_ = (bitField0_ & ~0x00000001); } result.transitionRoutes_ = transitionRoutes_; } else { result.transitionRoutes_ = transitionRoutesBuilder_.build(); } if (eventHandlersBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { eventHandlers_ = java.util.Collections.unmodifiableList(eventHandlers_); bitField0_ = (bitField0_ & ~0x00000002); } result.eventHandlers_ = eventHandlers_; } else { result.eventHandlers_ = eventHandlersBuilder_.build(); } if (((bitField0_ & 0x00000004) != 0)) { transitionRouteGroups_ = transitionRouteGroups_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } result.transitionRouteGroups_ = transitionRouteGroups_; if (nluSettingsBuilder_ == null) { result.nluSettings_ = nluSettings_; } else { result.nluSettings_ = nluSettingsBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.cx.v3.Flow) { return mergeFrom((com.google.cloud.dialogflow.cx.v3.Flow) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Flow other) { if (other == com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } if (transitionRoutesBuilder_ == null) { if (!other.transitionRoutes_.isEmpty()) { if (transitionRoutes_.isEmpty()) { transitionRoutes_ = other.transitionRoutes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureTransitionRoutesIsMutable(); transitionRoutes_.addAll(other.transitionRoutes_); } onChanged(); } } else { if (!other.transitionRoutes_.isEmpty()) { if (transitionRoutesBuilder_.isEmpty()) { transitionRoutesBuilder_.dispose(); transitionRoutesBuilder_ = null; transitionRoutes_ = other.transitionRoutes_; bitField0_ = (bitField0_ & ~0x00000001); transitionRoutesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTransitionRoutesFieldBuilder() : null; } else { transitionRoutesBuilder_.addAllMessages(other.transitionRoutes_); } } } if (eventHandlersBuilder_ == null) { if (!other.eventHandlers_.isEmpty()) { if (eventHandlers_.isEmpty()) { eventHandlers_ = other.eventHandlers_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureEventHandlersIsMutable(); eventHandlers_.addAll(other.eventHandlers_); } onChanged(); } } else { if (!other.eventHandlers_.isEmpty()) { if (eventHandlersBuilder_.isEmpty()) { eventHandlersBuilder_.dispose(); eventHandlersBuilder_ = null; eventHandlers_ = other.eventHandlers_; bitField0_ = (bitField0_ & ~0x00000002); eventHandlersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEventHandlersFieldBuilder() : null; } else { eventHandlersBuilder_.addAllMessages(other.eventHandlers_); } } } if (!other.transitionRouteGroups_.isEmpty()) { if (transitionRouteGroups_.isEmpty()) { transitionRouteGroups_ = other.transitionRouteGroups_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.addAll(other.transitionRouteGroups_); } onChanged(); } if (other.hasNluSettings()) { mergeNluSettings(other.getNluSettings()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.cx.v3.Flow parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.cx.v3.Flow) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
     * The unique identifier of the flow.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     * 
* * string name = 1; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The unique identifier of the flow.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     * 
* * string name = 1; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The unique identifier of the flow.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     * 
* * string name = 1; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** * * *
     * The unique identifier of the flow.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     * 
* * string name = 1; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** * * *
     * The unique identifier of the flow.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     * 
* * string name = 1; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private java.lang.Object displayName_ = ""; /** * * *
     * Required. The human-readable name of the flow.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The displayName. */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. The human-readable name of the flow.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for displayName. */ public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. The human-readable name of the flow.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The displayName to set. * @return This builder for chaining. */ public Builder setDisplayName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; onChanged(); return this; } /** * * *
     * Required. The human-readable name of the flow.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); onChanged(); return this; } /** * * *
     * Required. The human-readable name of the flow.
     * 
* * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for displayName to set. * @return This builder for chaining. */ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; onChanged(); return this; } private java.lang.Object description_ = ""; /** * * *
     * The description of the flow. The maximum length is 500 characters. If
     * exceeded, the request is rejected.
     * 
* * string description = 3; * * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The description of the flow. The maximum length is 500 characters. If
     * exceeded, the request is rejected.
     * 
* * string description = 3; * * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The description of the flow. The maximum length is 500 characters. If
     * exceeded, the request is rejected.
     * 
* * string description = 3; * * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription(java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; onChanged(); return this; } /** * * *
     * The description of the flow. The maximum length is 500 characters. If
     * exceeded, the request is rejected.
     * 
* * string description = 3; * * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** * * *
     * The description of the flow. The maximum length is 500 characters. If
     * exceeded, the request is rejected.
     * 
* * string description = 3; * * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; onChanged(); return this; } private java.util.List transitionRoutes_ = java.util.Collections.emptyList(); private void ensureTransitionRoutesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { transitionRoutes_ = new java.util.ArrayList( transitionRoutes_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.TransitionRoute, com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder> transitionRoutesBuilder_; /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public java.util.List getTransitionRoutesList() { if (transitionRoutesBuilder_ == null) { return java.util.Collections.unmodifiableList(transitionRoutes_); } else { return transitionRoutesBuilder_.getMessageList(); } } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public int getTransitionRoutesCount() { if (transitionRoutesBuilder_ == null) { return transitionRoutes_.size(); } else { return transitionRoutesBuilder_.getCount(); } } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int index) { if (transitionRoutesBuilder_ == null) { return transitionRoutes_.get(index); } else { return transitionRoutesBuilder_.getMessage(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][Page.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.v3.TransitionRoute transition_routes = 4; */ public Builder setTransitionRoutes( int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute value) { if (transitionRoutesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTransitionRoutesIsMutable(); transitionRoutes_.set(index, value); onChanged(); } else { transitionRoutesBuilder_.setMessage(index, value); } return this; } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public Builder setTransitionRoutes( int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue) { if (transitionRoutesBuilder_ == null) { ensureTransitionRoutesIsMutable(); transitionRoutes_.set(index, builderForValue.build()); onChanged(); } else { transitionRoutesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public Builder addTransitionRoutes(com.google.cloud.dialogflow.cx.v3.TransitionRoute value) { if (transitionRoutesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTransitionRoutesIsMutable(); transitionRoutes_.add(value); onChanged(); } else { transitionRoutesBuilder_.addMessage(value); } return this; } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public Builder addTransitionRoutes( int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute value) { if (transitionRoutesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTransitionRoutesIsMutable(); transitionRoutes_.add(index, value); onChanged(); } else { transitionRoutesBuilder_.addMessage(index, value); } return this; } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public Builder addTransitionRoutes( com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue) { if (transitionRoutesBuilder_ == null) { ensureTransitionRoutesIsMutable(); transitionRoutes_.add(builderForValue.build()); onChanged(); } else { transitionRoutesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public Builder addTransitionRoutes( int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue) { if (transitionRoutesBuilder_ == null) { ensureTransitionRoutesIsMutable(); transitionRoutes_.add(index, builderForValue.build()); onChanged(); } else { transitionRoutesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public Builder addAllTransitionRoutes( java.lang.Iterable values) { if (transitionRoutesBuilder_ == null) { ensureTransitionRoutesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitionRoutes_); onChanged(); } else { transitionRoutesBuilder_.addAllMessages(values); } return this; } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public Builder clearTransitionRoutes() { if (transitionRoutesBuilder_ == null) { transitionRoutes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { transitionRoutesBuilder_.clear(); } return this; } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public Builder removeTransitionRoutes(int index) { if (transitionRoutesBuilder_ == null) { ensureTransitionRoutesIsMutable(); transitionRoutes_.remove(index); onChanged(); } else { transitionRoutesBuilder_.remove(index); } return this; } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder getTransitionRoutesBuilder( int index) { return getTransitionRoutesFieldBuilder().getBuilder(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][Page.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.v3.TransitionRoute transition_routes = 4; */ public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOrBuilder( int index) { if (transitionRoutesBuilder_ == null) { return transitionRoutes_.get(index); } else { return transitionRoutesBuilder_.getMessageOrBuilder(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][Page.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.v3.TransitionRoute transition_routes = 4; */ public java.util.List getTransitionRoutesOrBuilderList() { if (transitionRoutesBuilder_ != null) { return transitionRoutesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(transitionRoutes_); } } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRoutesBuilder() { return getTransitionRoutesFieldBuilder() .addBuilder(com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance()); } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRoutesBuilder( int index) { return getTransitionRoutesFieldBuilder() .addBuilder( index, com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance()); } /** * * *
     * 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][Page.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.v3.TransitionRoute transition_routes = 4; */ public java.util.List getTransitionRoutesBuilderList() { return getTransitionRoutesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.TransitionRoute, com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder> getTransitionRoutesFieldBuilder() { if (transitionRoutesBuilder_ == null) { transitionRoutesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.TransitionRoute, com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder>( transitionRoutes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); transitionRoutes_ = null; } return transitionRoutesBuilder_; } private java.util.List eventHandlers_ = java.util.Collections.emptyList(); private void ensureEventHandlersIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { eventHandlers_ = new java.util.ArrayList(eventHandlers_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.EventHandler, com.google.cloud.dialogflow.cx.v3.EventHandler.Builder, com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder> eventHandlersBuilder_; /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public java.util.List getEventHandlersList() { if (eventHandlersBuilder_ == null) { return java.util.Collections.unmodifiableList(eventHandlers_); } else { return eventHandlersBuilder_.getMessageList(); } } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public int getEventHandlersCount() { if (eventHandlersBuilder_ == null) { return eventHandlers_.size(); } else { return eventHandlersBuilder_.getCount(); } } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public com.google.cloud.dialogflow.cx.v3.EventHandler getEventHandlers(int index) { if (eventHandlersBuilder_ == null) { return eventHandlers_.get(index); } else { return eventHandlersBuilder_.getMessage(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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public Builder setEventHandlers( int index, com.google.cloud.dialogflow.cx.v3.EventHandler value) { if (eventHandlersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventHandlersIsMutable(); eventHandlers_.set(index, value); onChanged(); } else { eventHandlersBuilder_.setMessage(index, value); } return this; } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public Builder setEventHandlers( int index, com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue) { if (eventHandlersBuilder_ == null) { ensureEventHandlersIsMutable(); eventHandlers_.set(index, builderForValue.build()); onChanged(); } else { eventHandlersBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public Builder addEventHandlers(com.google.cloud.dialogflow.cx.v3.EventHandler value) { if (eventHandlersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventHandlersIsMutable(); eventHandlers_.add(value); onChanged(); } else { eventHandlersBuilder_.addMessage(value); } return this; } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public Builder addEventHandlers( int index, com.google.cloud.dialogflow.cx.v3.EventHandler value) { if (eventHandlersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventHandlersIsMutable(); eventHandlers_.add(index, value); onChanged(); } else { eventHandlersBuilder_.addMessage(index, value); } return this; } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public Builder addEventHandlers( com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue) { if (eventHandlersBuilder_ == null) { ensureEventHandlersIsMutable(); eventHandlers_.add(builderForValue.build()); onChanged(); } else { eventHandlersBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public Builder addEventHandlers( int index, com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue) { if (eventHandlersBuilder_ == null) { ensureEventHandlersIsMutable(); eventHandlers_.add(index, builderForValue.build()); onChanged(); } else { eventHandlersBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public Builder addAllEventHandlers( java.lang.Iterable values) { if (eventHandlersBuilder_ == null) { ensureEventHandlersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, eventHandlers_); onChanged(); } else { eventHandlersBuilder_.addAllMessages(values); } return this; } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public Builder clearEventHandlers() { if (eventHandlersBuilder_ == null) { eventHandlers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { eventHandlersBuilder_.clear(); } return this; } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public Builder removeEventHandlers(int index) { if (eventHandlersBuilder_ == null) { ensureEventHandlersIsMutable(); eventHandlers_.remove(index); onChanged(); } else { eventHandlersBuilder_.remove(index); } return this; } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder getEventHandlersBuilder( int index) { return getEventHandlersFieldBuilder().getBuilder(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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlersOrBuilder( int index) { if (eventHandlersBuilder_ == null) { return eventHandlers_.get(index); } else { return eventHandlersBuilder_.getMessageOrBuilder(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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public java.util.List getEventHandlersOrBuilderList() { if (eventHandlersBuilder_ != null) { return eventHandlersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(eventHandlers_); } } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder addEventHandlersBuilder() { return getEventHandlersFieldBuilder() .addBuilder(com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance()); } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder addEventHandlersBuilder( int index) { return getEventHandlersFieldBuilder() .addBuilder(index, com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance()); } /** * * *
     * 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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.v3.EventHandler event_handlers = 10; */ public java.util.List getEventHandlersBuilderList() { return getEventHandlersFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.EventHandler, com.google.cloud.dialogflow.cx.v3.EventHandler.Builder, com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder> getEventHandlersFieldBuilder() { if (eventHandlersBuilder_ == null) { eventHandlersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.EventHandler, com.google.cloud.dialogflow.cx.v3.EventHandler.Builder, com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder>( eventHandlers_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); eventHandlers_ = null; } return eventHandlersBuilder_; } private com.google.protobuf.LazyStringList transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureTransitionRouteGroupsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { transitionRouteGroups_ = new com.google.protobuf.LazyStringArrayList(transitionRouteGroups_); bitField0_ |= 0x00000004; } } /** * * *
     * 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][Page.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) = { ... } * * * @return A list containing the transitionRouteGroups. */ public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() { return transitionRouteGroups_.getUnmodifiableView(); } /** * * *
     * 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][Page.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) = { ... } * * * @return The count of transitionRouteGroups. */ public int getTransitionRouteGroupsCount() { return transitionRouteGroups_.size(); } /** * * *
     * 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][Page.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) = { ... } * * * @param index The index of the element to return. * @return The transitionRouteGroups at the given index. */ public java.lang.String getTransitionRouteGroups(int index) { return transitionRouteGroups_.get(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][Page.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) = { ... } * * * @param index The index of the value to return. * @return The bytes of the transitionRouteGroups at the given index. */ public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) { return transitionRouteGroups_.getByteString(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][Page.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) = { ... } * * * @param index The index to set the value at. * @param value The transitionRouteGroups to set. * @return This builder for chaining. */ public Builder setTransitionRouteGroups(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.set(index, value); onChanged(); return this; } /** * * *
     * 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][Page.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) = { ... } * * * @param value The transitionRouteGroups to add. * @return This builder for chaining. */ public Builder addTransitionRouteGroups(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.add(value); onChanged(); return this; } /** * * *
     * 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][Page.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) = { ... } * * * @param values The transitionRouteGroups to add. * @return This builder for chaining. */ public Builder addAllTransitionRouteGroups(java.lang.Iterable values) { ensureTransitionRouteGroupsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitionRouteGroups_); onChanged(); return this; } /** * * *
     * 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][Page.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) = { ... } * * * @return This builder for chaining. */ public Builder clearTransitionRouteGroups() { transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * 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][Page.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) = { ... } * * * @param value The bytes of the transitionRouteGroups to add. * @return This builder for chaining. */ public Builder addTransitionRouteGroupsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.add(value); onChanged(); return this; } private com.google.cloud.dialogflow.cx.v3.NluSettings nluSettings_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.NluSettings, com.google.cloud.dialogflow.cx.v3.NluSettings.Builder, com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder> nluSettingsBuilder_; /** * * *
     * NLU related settings of the flow.
     * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; * * @return Whether the nluSettings field is set. */ public boolean hasNluSettings() { return nluSettingsBuilder_ != null || nluSettings_ != null; } /** * * *
     * NLU related settings of the flow.
     * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; * * @return The nluSettings. */ public com.google.cloud.dialogflow.cx.v3.NluSettings getNluSettings() { if (nluSettingsBuilder_ == null) { return nluSettings_ == null ? com.google.cloud.dialogflow.cx.v3.NluSettings.getDefaultInstance() : nluSettings_; } else { return nluSettingsBuilder_.getMessage(); } } /** * * *
     * NLU related settings of the flow.
     * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; */ public Builder setNluSettings(com.google.cloud.dialogflow.cx.v3.NluSettings value) { if (nluSettingsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } nluSettings_ = value; onChanged(); } else { nluSettingsBuilder_.setMessage(value); } return this; } /** * * *
     * NLU related settings of the flow.
     * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; */ public Builder setNluSettings( com.google.cloud.dialogflow.cx.v3.NluSettings.Builder builderForValue) { if (nluSettingsBuilder_ == null) { nluSettings_ = builderForValue.build(); onChanged(); } else { nluSettingsBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * NLU related settings of the flow.
     * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; */ public Builder mergeNluSettings(com.google.cloud.dialogflow.cx.v3.NluSettings value) { if (nluSettingsBuilder_ == null) { if (nluSettings_ != null) { nluSettings_ = com.google.cloud.dialogflow.cx.v3.NluSettings.newBuilder(nluSettings_) .mergeFrom(value) .buildPartial(); } else { nluSettings_ = value; } onChanged(); } else { nluSettingsBuilder_.mergeFrom(value); } return this; } /** * * *
     * NLU related settings of the flow.
     * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; */ public Builder clearNluSettings() { if (nluSettingsBuilder_ == null) { nluSettings_ = null; onChanged(); } else { nluSettings_ = null; nluSettingsBuilder_ = null; } return this; } /** * * *
     * NLU related settings of the flow.
     * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; */ public com.google.cloud.dialogflow.cx.v3.NluSettings.Builder getNluSettingsBuilder() { onChanged(); return getNluSettingsFieldBuilder().getBuilder(); } /** * * *
     * NLU related settings of the flow.
     * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; */ public com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder getNluSettingsOrBuilder() { if (nluSettingsBuilder_ != null) { return nluSettingsBuilder_.getMessageOrBuilder(); } else { return nluSettings_ == null ? com.google.cloud.dialogflow.cx.v3.NluSettings.getDefaultInstance() : nluSettings_; } } /** * * *
     * NLU related settings of the flow.
     * 
* * .google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.NluSettings, com.google.cloud.dialogflow.cx.v3.NluSettings.Builder, com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder> getNluSettingsFieldBuilder() { if (nluSettingsBuilder_ == null) { nluSettingsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.NluSettings, com.google.cloud.dialogflow.cx.v3.NluSettings.Builder, com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder>( getNluSettings(), getParentForChildren(), isClean()); nluSettings_ = null; } return nluSettingsBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Flow) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Flow) private static final com.google.cloud.dialogflow.cx.v3.Flow DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Flow(); } public static com.google.cloud.dialogflow.cx.v3.Flow getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Flow parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Flow(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dialogflow.cx.v3.Flow getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy