• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/dialogflow/cx/v3/flow.proto
18 
19 package com.google.cloud.dialogflow.cx.v3;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Flows represents the conversation flows when you build your chatbot agent.
26  * A flow consists of many pages connected by the transition routes.
27  * Conversations always start with the built-in Start Flow (with an all-0 ID).
28  * Transition routes can direct the conversation session from the current flow
29  * (parent flow) to another flow (sub flow). When the sub flow is finished,
30  * Dialogflow will bring the session back to the parent flow, where the sub flow
31  * is started.
32  * Usually, when a transition route is followed by a matched intent, the intent
33  * will be "consumed". This means the intent won't activate more transition
34  * routes. However, when the followed transition route moves the conversation
35  * session into a different flow, the matched intent can be carried over and to
36  * be consumed in the target flow.
37  * </pre>
38  *
39  * Protobuf type {@code google.cloud.dialogflow.cx.v3.Flow}
40  */
41 public final class Flow extends com.google.protobuf.GeneratedMessageV3
42     implements
43     // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Flow)
44     FlowOrBuilder {
45   private static final long serialVersionUID = 0L;
46   // Use Flow.newBuilder() to construct.
Flow(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)47   private Flow(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
48     super(builder);
49   }
50 
Flow()51   private Flow() {
52     name_ = "";
53     displayName_ = "";
54     description_ = "";
55     transitionRoutes_ = java.util.Collections.emptyList();
56     eventHandlers_ = java.util.Collections.emptyList();
57     transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY;
58   }
59 
60   @java.lang.Override
61   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)62   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
63     return new Flow();
64   }
65 
66   @java.lang.Override
getUnknownFields()67   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
68     return this.unknownFields;
69   }
70 
getDescriptor()71   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
72     return com.google.cloud.dialogflow.cx.v3.FlowProto
73         .internal_static_google_cloud_dialogflow_cx_v3_Flow_descriptor;
74   }
75 
76   @java.lang.Override
77   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()78       internalGetFieldAccessorTable() {
79     return com.google.cloud.dialogflow.cx.v3.FlowProto
80         .internal_static_google_cloud_dialogflow_cx_v3_Flow_fieldAccessorTable
81         .ensureFieldAccessorsInitialized(
82             com.google.cloud.dialogflow.cx.v3.Flow.class,
83             com.google.cloud.dialogflow.cx.v3.Flow.Builder.class);
84   }
85 
86   public static final int NAME_FIELD_NUMBER = 1;
87 
88   @SuppressWarnings("serial")
89   private volatile java.lang.Object name_ = "";
90   /**
91    *
92    *
93    * <pre>
94    * The unique identifier of the flow.
95    * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
96    * ID&gt;/flows/&lt;Flow ID&gt;`.
97    * </pre>
98    *
99    * <code>string name = 1;</code>
100    *
101    * @return The name.
102    */
103   @java.lang.Override
getName()104   public java.lang.String getName() {
105     java.lang.Object ref = name_;
106     if (ref instanceof java.lang.String) {
107       return (java.lang.String) ref;
108     } else {
109       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
110       java.lang.String s = bs.toStringUtf8();
111       name_ = s;
112       return s;
113     }
114   }
115   /**
116    *
117    *
118    * <pre>
119    * The unique identifier of the flow.
120    * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
121    * ID&gt;/flows/&lt;Flow ID&gt;`.
122    * </pre>
123    *
124    * <code>string name = 1;</code>
125    *
126    * @return The bytes for name.
127    */
128   @java.lang.Override
getNameBytes()129   public com.google.protobuf.ByteString getNameBytes() {
130     java.lang.Object ref = name_;
131     if (ref instanceof java.lang.String) {
132       com.google.protobuf.ByteString b =
133           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
134       name_ = b;
135       return b;
136     } else {
137       return (com.google.protobuf.ByteString) ref;
138     }
139   }
140 
141   public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
142 
143   @SuppressWarnings("serial")
144   private volatile java.lang.Object displayName_ = "";
145   /**
146    *
147    *
148    * <pre>
149    * Required. The human-readable name of the flow.
150    * </pre>
151    *
152    * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
153    *
154    * @return The displayName.
155    */
156   @java.lang.Override
getDisplayName()157   public java.lang.String getDisplayName() {
158     java.lang.Object ref = displayName_;
159     if (ref instanceof java.lang.String) {
160       return (java.lang.String) ref;
161     } else {
162       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
163       java.lang.String s = bs.toStringUtf8();
164       displayName_ = s;
165       return s;
166     }
167   }
168   /**
169    *
170    *
171    * <pre>
172    * Required. The human-readable name of the flow.
173    * </pre>
174    *
175    * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
176    *
177    * @return The bytes for displayName.
178    */
179   @java.lang.Override
getDisplayNameBytes()180   public com.google.protobuf.ByteString getDisplayNameBytes() {
181     java.lang.Object ref = displayName_;
182     if (ref instanceof java.lang.String) {
183       com.google.protobuf.ByteString b =
184           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
185       displayName_ = b;
186       return b;
187     } else {
188       return (com.google.protobuf.ByteString) ref;
189     }
190   }
191 
192   public static final int DESCRIPTION_FIELD_NUMBER = 3;
193 
194   @SuppressWarnings("serial")
195   private volatile java.lang.Object description_ = "";
196   /**
197    *
198    *
199    * <pre>
200    * The description of the flow. The maximum length is 500 characters. If
201    * exceeded, the request is rejected.
202    * </pre>
203    *
204    * <code>string description = 3;</code>
205    *
206    * @return The description.
207    */
208   @java.lang.Override
getDescription()209   public java.lang.String getDescription() {
210     java.lang.Object ref = description_;
211     if (ref instanceof java.lang.String) {
212       return (java.lang.String) ref;
213     } else {
214       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
215       java.lang.String s = bs.toStringUtf8();
216       description_ = s;
217       return s;
218     }
219   }
220   /**
221    *
222    *
223    * <pre>
224    * The description of the flow. The maximum length is 500 characters. If
225    * exceeded, the request is rejected.
226    * </pre>
227    *
228    * <code>string description = 3;</code>
229    *
230    * @return The bytes for description.
231    */
232   @java.lang.Override
getDescriptionBytes()233   public com.google.protobuf.ByteString getDescriptionBytes() {
234     java.lang.Object ref = description_;
235     if (ref instanceof java.lang.String) {
236       com.google.protobuf.ByteString b =
237           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
238       description_ = b;
239       return b;
240     } else {
241       return (com.google.protobuf.ByteString) ref;
242     }
243   }
244 
245   public static final int TRANSITION_ROUTES_FIELD_NUMBER = 4;
246 
247   @SuppressWarnings("serial")
248   private java.util.List<com.google.cloud.dialogflow.cx.v3.TransitionRoute> transitionRoutes_;
249   /**
250    *
251    *
252    * <pre>
253    * A flow's transition routes serve two purposes:
254    * *   They are responsible for matching the user's first utterances in the
255    * flow.
256    * *   They are inherited by every page's [transition
257    * routes][Page.transition_routes] and can support use cases such as the user
258    * saying "help" or "can I talk to a human?", which can be handled in a common
259    * way regardless of the current page. Transition routes defined in the page
260    * have higher priority than those defined in the flow.
261    * TransitionRoutes are evalauted in the following order:
262    * *   TransitionRoutes with intent specified.
263    * *   TransitionRoutes with only condition specified.
264    * TransitionRoutes with intent specified are inherited by pages in the flow.
265    * </pre>
266    *
267    * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
268    */
269   @java.lang.Override
270   public java.util.List<com.google.cloud.dialogflow.cx.v3.TransitionRoute>
getTransitionRoutesList()271       getTransitionRoutesList() {
272     return transitionRoutes_;
273   }
274   /**
275    *
276    *
277    * <pre>
278    * A flow's transition routes serve two purposes:
279    * *   They are responsible for matching the user's first utterances in the
280    * flow.
281    * *   They are inherited by every page's [transition
282    * routes][Page.transition_routes] and can support use cases such as the user
283    * saying "help" or "can I talk to a human?", which can be handled in a common
284    * way regardless of the current page. Transition routes defined in the page
285    * have higher priority than those defined in the flow.
286    * TransitionRoutes are evalauted in the following order:
287    * *   TransitionRoutes with intent specified.
288    * *   TransitionRoutes with only condition specified.
289    * TransitionRoutes with intent specified are inherited by pages in the flow.
290    * </pre>
291    *
292    * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
293    */
294   @java.lang.Override
295   public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder>
getTransitionRoutesOrBuilderList()296       getTransitionRoutesOrBuilderList() {
297     return transitionRoutes_;
298   }
299   /**
300    *
301    *
302    * <pre>
303    * A flow's transition routes serve two purposes:
304    * *   They are responsible for matching the user's first utterances in the
305    * flow.
306    * *   They are inherited by every page's [transition
307    * routes][Page.transition_routes] and can support use cases such as the user
308    * saying "help" or "can I talk to a human?", which can be handled in a common
309    * way regardless of the current page. Transition routes defined in the page
310    * have higher priority than those defined in the flow.
311    * TransitionRoutes are evalauted in the following order:
312    * *   TransitionRoutes with intent specified.
313    * *   TransitionRoutes with only condition specified.
314    * TransitionRoutes with intent specified are inherited by pages in the flow.
315    * </pre>
316    *
317    * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
318    */
319   @java.lang.Override
getTransitionRoutesCount()320   public int getTransitionRoutesCount() {
321     return transitionRoutes_.size();
322   }
323   /**
324    *
325    *
326    * <pre>
327    * A flow's transition routes serve two purposes:
328    * *   They are responsible for matching the user's first utterances in the
329    * flow.
330    * *   They are inherited by every page's [transition
331    * routes][Page.transition_routes] and can support use cases such as the user
332    * saying "help" or "can I talk to a human?", which can be handled in a common
333    * way regardless of the current page. Transition routes defined in the page
334    * have higher priority than those defined in the flow.
335    * TransitionRoutes are evalauted in the following order:
336    * *   TransitionRoutes with intent specified.
337    * *   TransitionRoutes with only condition specified.
338    * TransitionRoutes with intent specified are inherited by pages in the flow.
339    * </pre>
340    *
341    * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
342    */
343   @java.lang.Override
getTransitionRoutes(int index)344   public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int index) {
345     return transitionRoutes_.get(index);
346   }
347   /**
348    *
349    *
350    * <pre>
351    * A flow's transition routes serve two purposes:
352    * *   They are responsible for matching the user's first utterances in the
353    * flow.
354    * *   They are inherited by every page's [transition
355    * routes][Page.transition_routes] and can support use cases such as the user
356    * saying "help" or "can I talk to a human?", which can be handled in a common
357    * way regardless of the current page. Transition routes defined in the page
358    * have higher priority than those defined in the flow.
359    * TransitionRoutes are evalauted in the following order:
360    * *   TransitionRoutes with intent specified.
361    * *   TransitionRoutes with only condition specified.
362    * TransitionRoutes with intent specified are inherited by pages in the flow.
363    * </pre>
364    *
365    * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
366    */
367   @java.lang.Override
getTransitionRoutesOrBuilder( int index)368   public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOrBuilder(
369       int index) {
370     return transitionRoutes_.get(index);
371   }
372 
373   public static final int EVENT_HANDLERS_FIELD_NUMBER = 10;
374 
375   @SuppressWarnings("serial")
376   private java.util.List<com.google.cloud.dialogflow.cx.v3.EventHandler> eventHandlers_;
377   /**
378    *
379    *
380    * <pre>
381    * A flow's event handlers serve two purposes:
382    * *   They are responsible for handling events (e.g. no match,
383    * webhook errors) in the flow.
384    * *   They are inherited by every page's [event
385    * handlers][Page.event_handlers], which can be used to handle common events
386    * regardless of the current page. Event handlers defined in the page
387    * have higher priority than those defined in the flow.
388    * Unlike
389    * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
390    * these handlers are evaluated on a first-match basis. The first one that
391    * matches the event get executed, with the rest being ignored.
392    * </pre>
393    *
394    * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
395    */
396   @java.lang.Override
getEventHandlersList()397   public java.util.List<com.google.cloud.dialogflow.cx.v3.EventHandler> getEventHandlersList() {
398     return eventHandlers_;
399   }
400   /**
401    *
402    *
403    * <pre>
404    * A flow's event handlers serve two purposes:
405    * *   They are responsible for handling events (e.g. no match,
406    * webhook errors) in the flow.
407    * *   They are inherited by every page's [event
408    * handlers][Page.event_handlers], which can be used to handle common events
409    * regardless of the current page. Event handlers defined in the page
410    * have higher priority than those defined in the flow.
411    * Unlike
412    * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
413    * these handlers are evaluated on a first-match basis. The first one that
414    * matches the event get executed, with the rest being ignored.
415    * </pre>
416    *
417    * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
418    */
419   @java.lang.Override
420   public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder>
getEventHandlersOrBuilderList()421       getEventHandlersOrBuilderList() {
422     return eventHandlers_;
423   }
424   /**
425    *
426    *
427    * <pre>
428    * A flow's event handlers serve two purposes:
429    * *   They are responsible for handling events (e.g. no match,
430    * webhook errors) in the flow.
431    * *   They are inherited by every page's [event
432    * handlers][Page.event_handlers], which can be used to handle common events
433    * regardless of the current page. Event handlers defined in the page
434    * have higher priority than those defined in the flow.
435    * Unlike
436    * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
437    * these handlers are evaluated on a first-match basis. The first one that
438    * matches the event get executed, with the rest being ignored.
439    * </pre>
440    *
441    * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
442    */
443   @java.lang.Override
getEventHandlersCount()444   public int getEventHandlersCount() {
445     return eventHandlers_.size();
446   }
447   /**
448    *
449    *
450    * <pre>
451    * A flow's event handlers serve two purposes:
452    * *   They are responsible for handling events (e.g. no match,
453    * webhook errors) in the flow.
454    * *   They are inherited by every page's [event
455    * handlers][Page.event_handlers], which can be used to handle common events
456    * regardless of the current page. Event handlers defined in the page
457    * have higher priority than those defined in the flow.
458    * Unlike
459    * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
460    * these handlers are evaluated on a first-match basis. The first one that
461    * matches the event get executed, with the rest being ignored.
462    * </pre>
463    *
464    * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
465    */
466   @java.lang.Override
getEventHandlers(int index)467   public com.google.cloud.dialogflow.cx.v3.EventHandler getEventHandlers(int index) {
468     return eventHandlers_.get(index);
469   }
470   /**
471    *
472    *
473    * <pre>
474    * A flow's event handlers serve two purposes:
475    * *   They are responsible for handling events (e.g. no match,
476    * webhook errors) in the flow.
477    * *   They are inherited by every page's [event
478    * handlers][Page.event_handlers], which can be used to handle common events
479    * regardless of the current page. Event handlers defined in the page
480    * have higher priority than those defined in the flow.
481    * Unlike
482    * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
483    * these handlers are evaluated on a first-match basis. The first one that
484    * matches the event get executed, with the rest being ignored.
485    * </pre>
486    *
487    * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
488    */
489   @java.lang.Override
getEventHandlersOrBuilder( int index)490   public com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlersOrBuilder(
491       int index) {
492     return eventHandlers_.get(index);
493   }
494 
495   public static final int TRANSITION_ROUTE_GROUPS_FIELD_NUMBER = 15;
496 
497   @SuppressWarnings("serial")
498   private com.google.protobuf.LazyStringList transitionRouteGroups_;
499   /**
500    *
501    *
502    * <pre>
503    * A flow's transition route group serve two purposes:
504    * *   They are responsible for matching the user's first utterances in the
505    * flow.
506    * *   They are inherited by every page's [transition
507    * route groups][Page.transition_route_groups]. Transition route groups
508    * defined in the page have higher priority than those defined in the flow.
509    * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
510    * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
511    * </pre>
512    *
513    * <code>repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
514    * </code>
515    *
516    * @return A list containing the transitionRouteGroups.
517    */
getTransitionRouteGroupsList()518   public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() {
519     return transitionRouteGroups_;
520   }
521   /**
522    *
523    *
524    * <pre>
525    * A flow's transition route group serve two purposes:
526    * *   They are responsible for matching the user's first utterances in the
527    * flow.
528    * *   They are inherited by every page's [transition
529    * route groups][Page.transition_route_groups]. Transition route groups
530    * defined in the page have higher priority than those defined in the flow.
531    * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
532    * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
533    * </pre>
534    *
535    * <code>repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
536    * </code>
537    *
538    * @return The count of transitionRouteGroups.
539    */
getTransitionRouteGroupsCount()540   public int getTransitionRouteGroupsCount() {
541     return transitionRouteGroups_.size();
542   }
543   /**
544    *
545    *
546    * <pre>
547    * A flow's transition route group serve two purposes:
548    * *   They are responsible for matching the user's first utterances in the
549    * flow.
550    * *   They are inherited by every page's [transition
551    * route groups][Page.transition_route_groups]. Transition route groups
552    * defined in the page have higher priority than those defined in the flow.
553    * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
554    * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
555    * </pre>
556    *
557    * <code>repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
558    * </code>
559    *
560    * @param index The index of the element to return.
561    * @return The transitionRouteGroups at the given index.
562    */
getTransitionRouteGroups(int index)563   public java.lang.String getTransitionRouteGroups(int index) {
564     return transitionRouteGroups_.get(index);
565   }
566   /**
567    *
568    *
569    * <pre>
570    * A flow's transition route group serve two purposes:
571    * *   They are responsible for matching the user's first utterances in the
572    * flow.
573    * *   They are inherited by every page's [transition
574    * route groups][Page.transition_route_groups]. Transition route groups
575    * defined in the page have higher priority than those defined in the flow.
576    * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
577    * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
578    * </pre>
579    *
580    * <code>repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
581    * </code>
582    *
583    * @param index The index of the value to return.
584    * @return The bytes of the transitionRouteGroups at the given index.
585    */
getTransitionRouteGroupsBytes(int index)586   public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) {
587     return transitionRouteGroups_.getByteString(index);
588   }
589 
590   public static final int NLU_SETTINGS_FIELD_NUMBER = 11;
591   private com.google.cloud.dialogflow.cx.v3.NluSettings nluSettings_;
592   /**
593    *
594    *
595    * <pre>
596    * NLU related settings of the flow.
597    * </pre>
598    *
599    * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
600    *
601    * @return Whether the nluSettings field is set.
602    */
603   @java.lang.Override
hasNluSettings()604   public boolean hasNluSettings() {
605     return nluSettings_ != null;
606   }
607   /**
608    *
609    *
610    * <pre>
611    * NLU related settings of the flow.
612    * </pre>
613    *
614    * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
615    *
616    * @return The nluSettings.
617    */
618   @java.lang.Override
getNluSettings()619   public com.google.cloud.dialogflow.cx.v3.NluSettings getNluSettings() {
620     return nluSettings_ == null
621         ? com.google.cloud.dialogflow.cx.v3.NluSettings.getDefaultInstance()
622         : nluSettings_;
623   }
624   /**
625    *
626    *
627    * <pre>
628    * NLU related settings of the flow.
629    * </pre>
630    *
631    * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
632    */
633   @java.lang.Override
getNluSettingsOrBuilder()634   public com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder getNluSettingsOrBuilder() {
635     return nluSettings_ == null
636         ? com.google.cloud.dialogflow.cx.v3.NluSettings.getDefaultInstance()
637         : nluSettings_;
638   }
639 
640   private byte memoizedIsInitialized = -1;
641 
642   @java.lang.Override
isInitialized()643   public final boolean isInitialized() {
644     byte isInitialized = memoizedIsInitialized;
645     if (isInitialized == 1) return true;
646     if (isInitialized == 0) return false;
647 
648     memoizedIsInitialized = 1;
649     return true;
650   }
651 
652   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)653   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
654     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
655       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
656     }
657     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
658       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
659     }
660     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
661       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
662     }
663     for (int i = 0; i < transitionRoutes_.size(); i++) {
664       output.writeMessage(4, transitionRoutes_.get(i));
665     }
666     for (int i = 0; i < eventHandlers_.size(); i++) {
667       output.writeMessage(10, eventHandlers_.get(i));
668     }
669     if (nluSettings_ != null) {
670       output.writeMessage(11, getNluSettings());
671     }
672     for (int i = 0; i < transitionRouteGroups_.size(); i++) {
673       com.google.protobuf.GeneratedMessageV3.writeString(
674           output, 15, transitionRouteGroups_.getRaw(i));
675     }
676     getUnknownFields().writeTo(output);
677   }
678 
679   @java.lang.Override
getSerializedSize()680   public int getSerializedSize() {
681     int size = memoizedSize;
682     if (size != -1) return size;
683 
684     size = 0;
685     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
686       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
687     }
688     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
689       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
690     }
691     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
692       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
693     }
694     for (int i = 0; i < transitionRoutes_.size(); i++) {
695       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, transitionRoutes_.get(i));
696     }
697     for (int i = 0; i < eventHandlers_.size(); i++) {
698       size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, eventHandlers_.get(i));
699     }
700     if (nluSettings_ != null) {
701       size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getNluSettings());
702     }
703     {
704       int dataSize = 0;
705       for (int i = 0; i < transitionRouteGroups_.size(); i++) {
706         dataSize += computeStringSizeNoTag(transitionRouteGroups_.getRaw(i));
707       }
708       size += dataSize;
709       size += 1 * getTransitionRouteGroupsList().size();
710     }
711     size += getUnknownFields().getSerializedSize();
712     memoizedSize = size;
713     return size;
714   }
715 
716   @java.lang.Override
equals(final java.lang.Object obj)717   public boolean equals(final java.lang.Object obj) {
718     if (obj == this) {
719       return true;
720     }
721     if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Flow)) {
722       return super.equals(obj);
723     }
724     com.google.cloud.dialogflow.cx.v3.Flow other = (com.google.cloud.dialogflow.cx.v3.Flow) obj;
725 
726     if (!getName().equals(other.getName())) return false;
727     if (!getDisplayName().equals(other.getDisplayName())) return false;
728     if (!getDescription().equals(other.getDescription())) return false;
729     if (!getTransitionRoutesList().equals(other.getTransitionRoutesList())) return false;
730     if (!getEventHandlersList().equals(other.getEventHandlersList())) return false;
731     if (!getTransitionRouteGroupsList().equals(other.getTransitionRouteGroupsList())) return false;
732     if (hasNluSettings() != other.hasNluSettings()) return false;
733     if (hasNluSettings()) {
734       if (!getNluSettings().equals(other.getNluSettings())) return false;
735     }
736     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
737     return true;
738   }
739 
740   @java.lang.Override
hashCode()741   public int hashCode() {
742     if (memoizedHashCode != 0) {
743       return memoizedHashCode;
744     }
745     int hash = 41;
746     hash = (19 * hash) + getDescriptor().hashCode();
747     hash = (37 * hash) + NAME_FIELD_NUMBER;
748     hash = (53 * hash) + getName().hashCode();
749     hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
750     hash = (53 * hash) + getDisplayName().hashCode();
751     hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
752     hash = (53 * hash) + getDescription().hashCode();
753     if (getTransitionRoutesCount() > 0) {
754       hash = (37 * hash) + TRANSITION_ROUTES_FIELD_NUMBER;
755       hash = (53 * hash) + getTransitionRoutesList().hashCode();
756     }
757     if (getEventHandlersCount() > 0) {
758       hash = (37 * hash) + EVENT_HANDLERS_FIELD_NUMBER;
759       hash = (53 * hash) + getEventHandlersList().hashCode();
760     }
761     if (getTransitionRouteGroupsCount() > 0) {
762       hash = (37 * hash) + TRANSITION_ROUTE_GROUPS_FIELD_NUMBER;
763       hash = (53 * hash) + getTransitionRouteGroupsList().hashCode();
764     }
765     if (hasNluSettings()) {
766       hash = (37 * hash) + NLU_SETTINGS_FIELD_NUMBER;
767       hash = (53 * hash) + getNluSettings().hashCode();
768     }
769     hash = (29 * hash) + getUnknownFields().hashCode();
770     memoizedHashCode = hash;
771     return hash;
772   }
773 
parseFrom(java.nio.ByteBuffer data)774   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(java.nio.ByteBuffer data)
775       throws com.google.protobuf.InvalidProtocolBufferException {
776     return PARSER.parseFrom(data);
777   }
778 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)779   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(
780       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
781       throws com.google.protobuf.InvalidProtocolBufferException {
782     return PARSER.parseFrom(data, extensionRegistry);
783   }
784 
parseFrom( com.google.protobuf.ByteString data)785   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(
786       com.google.protobuf.ByteString data)
787       throws com.google.protobuf.InvalidProtocolBufferException {
788     return PARSER.parseFrom(data);
789   }
790 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)791   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(
792       com.google.protobuf.ByteString data,
793       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
794       throws com.google.protobuf.InvalidProtocolBufferException {
795     return PARSER.parseFrom(data, extensionRegistry);
796   }
797 
parseFrom(byte[] data)798   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(byte[] data)
799       throws com.google.protobuf.InvalidProtocolBufferException {
800     return PARSER.parseFrom(data);
801   }
802 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)803   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(
804       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
805       throws com.google.protobuf.InvalidProtocolBufferException {
806     return PARSER.parseFrom(data, extensionRegistry);
807   }
808 
parseFrom(java.io.InputStream input)809   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(java.io.InputStream input)
810       throws java.io.IOException {
811     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
812   }
813 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)814   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(
815       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
816       throws java.io.IOException {
817     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
818         PARSER, input, extensionRegistry);
819   }
820 
parseDelimitedFrom(java.io.InputStream input)821   public static com.google.cloud.dialogflow.cx.v3.Flow parseDelimitedFrom(java.io.InputStream input)
822       throws java.io.IOException {
823     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
824   }
825 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)826   public static com.google.cloud.dialogflow.cx.v3.Flow parseDelimitedFrom(
827       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
828       throws java.io.IOException {
829     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
830         PARSER, input, extensionRegistry);
831   }
832 
parseFrom( com.google.protobuf.CodedInputStream input)833   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(
834       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
835     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
836   }
837 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)838   public static com.google.cloud.dialogflow.cx.v3.Flow parseFrom(
839       com.google.protobuf.CodedInputStream input,
840       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
841       throws java.io.IOException {
842     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
843         PARSER, input, extensionRegistry);
844   }
845 
846   @java.lang.Override
newBuilderForType()847   public Builder newBuilderForType() {
848     return newBuilder();
849   }
850 
newBuilder()851   public static Builder newBuilder() {
852     return DEFAULT_INSTANCE.toBuilder();
853   }
854 
newBuilder(com.google.cloud.dialogflow.cx.v3.Flow prototype)855   public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.Flow prototype) {
856     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
857   }
858 
859   @java.lang.Override
toBuilder()860   public Builder toBuilder() {
861     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
862   }
863 
864   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)865   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
866     Builder builder = new Builder(parent);
867     return builder;
868   }
869   /**
870    *
871    *
872    * <pre>
873    * Flows represents the conversation flows when you build your chatbot agent.
874    * A flow consists of many pages connected by the transition routes.
875    * Conversations always start with the built-in Start Flow (with an all-0 ID).
876    * Transition routes can direct the conversation session from the current flow
877    * (parent flow) to another flow (sub flow). When the sub flow is finished,
878    * Dialogflow will bring the session back to the parent flow, where the sub flow
879    * is started.
880    * Usually, when a transition route is followed by a matched intent, the intent
881    * will be "consumed". This means the intent won't activate more transition
882    * routes. However, when the followed transition route moves the conversation
883    * session into a different flow, the matched intent can be carried over and to
884    * be consumed in the target flow.
885    * </pre>
886    *
887    * Protobuf type {@code google.cloud.dialogflow.cx.v3.Flow}
888    */
889   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
890       implements
891       // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Flow)
892       com.google.cloud.dialogflow.cx.v3.FlowOrBuilder {
getDescriptor()893     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
894       return com.google.cloud.dialogflow.cx.v3.FlowProto
895           .internal_static_google_cloud_dialogflow_cx_v3_Flow_descriptor;
896     }
897 
898     @java.lang.Override
899     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()900         internalGetFieldAccessorTable() {
901       return com.google.cloud.dialogflow.cx.v3.FlowProto
902           .internal_static_google_cloud_dialogflow_cx_v3_Flow_fieldAccessorTable
903           .ensureFieldAccessorsInitialized(
904               com.google.cloud.dialogflow.cx.v3.Flow.class,
905               com.google.cloud.dialogflow.cx.v3.Flow.Builder.class);
906     }
907 
908     // Construct using com.google.cloud.dialogflow.cx.v3.Flow.newBuilder()
Builder()909     private Builder() {}
910 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)911     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
912       super(parent);
913     }
914 
915     @java.lang.Override
clear()916     public Builder clear() {
917       super.clear();
918       bitField0_ = 0;
919       name_ = "";
920       displayName_ = "";
921       description_ = "";
922       if (transitionRoutesBuilder_ == null) {
923         transitionRoutes_ = java.util.Collections.emptyList();
924       } else {
925         transitionRoutes_ = null;
926         transitionRoutesBuilder_.clear();
927       }
928       bitField0_ = (bitField0_ & ~0x00000008);
929       if (eventHandlersBuilder_ == null) {
930         eventHandlers_ = java.util.Collections.emptyList();
931       } else {
932         eventHandlers_ = null;
933         eventHandlersBuilder_.clear();
934       }
935       bitField0_ = (bitField0_ & ~0x00000010);
936       transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY;
937       bitField0_ = (bitField0_ & ~0x00000020);
938       nluSettings_ = null;
939       if (nluSettingsBuilder_ != null) {
940         nluSettingsBuilder_.dispose();
941         nluSettingsBuilder_ = null;
942       }
943       return this;
944     }
945 
946     @java.lang.Override
getDescriptorForType()947     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
948       return com.google.cloud.dialogflow.cx.v3.FlowProto
949           .internal_static_google_cloud_dialogflow_cx_v3_Flow_descriptor;
950     }
951 
952     @java.lang.Override
getDefaultInstanceForType()953     public com.google.cloud.dialogflow.cx.v3.Flow getDefaultInstanceForType() {
954       return com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance();
955     }
956 
957     @java.lang.Override
build()958     public com.google.cloud.dialogflow.cx.v3.Flow build() {
959       com.google.cloud.dialogflow.cx.v3.Flow result = buildPartial();
960       if (!result.isInitialized()) {
961         throw newUninitializedMessageException(result);
962       }
963       return result;
964     }
965 
966     @java.lang.Override
buildPartial()967     public com.google.cloud.dialogflow.cx.v3.Flow buildPartial() {
968       com.google.cloud.dialogflow.cx.v3.Flow result =
969           new com.google.cloud.dialogflow.cx.v3.Flow(this);
970       buildPartialRepeatedFields(result);
971       if (bitField0_ != 0) {
972         buildPartial0(result);
973       }
974       onBuilt();
975       return result;
976     }
977 
buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.Flow result)978     private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.Flow result) {
979       if (transitionRoutesBuilder_ == null) {
980         if (((bitField0_ & 0x00000008) != 0)) {
981           transitionRoutes_ = java.util.Collections.unmodifiableList(transitionRoutes_);
982           bitField0_ = (bitField0_ & ~0x00000008);
983         }
984         result.transitionRoutes_ = transitionRoutes_;
985       } else {
986         result.transitionRoutes_ = transitionRoutesBuilder_.build();
987       }
988       if (eventHandlersBuilder_ == null) {
989         if (((bitField0_ & 0x00000010) != 0)) {
990           eventHandlers_ = java.util.Collections.unmodifiableList(eventHandlers_);
991           bitField0_ = (bitField0_ & ~0x00000010);
992         }
993         result.eventHandlers_ = eventHandlers_;
994       } else {
995         result.eventHandlers_ = eventHandlersBuilder_.build();
996       }
997       if (((bitField0_ & 0x00000020) != 0)) {
998         transitionRouteGroups_ = transitionRouteGroups_.getUnmodifiableView();
999         bitField0_ = (bitField0_ & ~0x00000020);
1000       }
1001       result.transitionRouteGroups_ = transitionRouteGroups_;
1002     }
1003 
buildPartial0(com.google.cloud.dialogflow.cx.v3.Flow result)1004     private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Flow result) {
1005       int from_bitField0_ = bitField0_;
1006       if (((from_bitField0_ & 0x00000001) != 0)) {
1007         result.name_ = name_;
1008       }
1009       if (((from_bitField0_ & 0x00000002) != 0)) {
1010         result.displayName_ = displayName_;
1011       }
1012       if (((from_bitField0_ & 0x00000004) != 0)) {
1013         result.description_ = description_;
1014       }
1015       if (((from_bitField0_ & 0x00000040) != 0)) {
1016         result.nluSettings_ =
1017             nluSettingsBuilder_ == null ? nluSettings_ : nluSettingsBuilder_.build();
1018       }
1019     }
1020 
1021     @java.lang.Override
clone()1022     public Builder clone() {
1023       return super.clone();
1024     }
1025 
1026     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1027     public Builder setField(
1028         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1029       return super.setField(field, value);
1030     }
1031 
1032     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1033     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1034       return super.clearField(field);
1035     }
1036 
1037     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1038     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1039       return super.clearOneof(oneof);
1040     }
1041 
1042     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1043     public Builder setRepeatedField(
1044         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1045       return super.setRepeatedField(field, index, value);
1046     }
1047 
1048     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1049     public Builder addRepeatedField(
1050         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1051       return super.addRepeatedField(field, value);
1052     }
1053 
1054     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1055     public Builder mergeFrom(com.google.protobuf.Message other) {
1056       if (other instanceof com.google.cloud.dialogflow.cx.v3.Flow) {
1057         return mergeFrom((com.google.cloud.dialogflow.cx.v3.Flow) other);
1058       } else {
1059         super.mergeFrom(other);
1060         return this;
1061       }
1062     }
1063 
mergeFrom(com.google.cloud.dialogflow.cx.v3.Flow other)1064     public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Flow other) {
1065       if (other == com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance()) return this;
1066       if (!other.getName().isEmpty()) {
1067         name_ = other.name_;
1068         bitField0_ |= 0x00000001;
1069         onChanged();
1070       }
1071       if (!other.getDisplayName().isEmpty()) {
1072         displayName_ = other.displayName_;
1073         bitField0_ |= 0x00000002;
1074         onChanged();
1075       }
1076       if (!other.getDescription().isEmpty()) {
1077         description_ = other.description_;
1078         bitField0_ |= 0x00000004;
1079         onChanged();
1080       }
1081       if (transitionRoutesBuilder_ == null) {
1082         if (!other.transitionRoutes_.isEmpty()) {
1083           if (transitionRoutes_.isEmpty()) {
1084             transitionRoutes_ = other.transitionRoutes_;
1085             bitField0_ = (bitField0_ & ~0x00000008);
1086           } else {
1087             ensureTransitionRoutesIsMutable();
1088             transitionRoutes_.addAll(other.transitionRoutes_);
1089           }
1090           onChanged();
1091         }
1092       } else {
1093         if (!other.transitionRoutes_.isEmpty()) {
1094           if (transitionRoutesBuilder_.isEmpty()) {
1095             transitionRoutesBuilder_.dispose();
1096             transitionRoutesBuilder_ = null;
1097             transitionRoutes_ = other.transitionRoutes_;
1098             bitField0_ = (bitField0_ & ~0x00000008);
1099             transitionRoutesBuilder_ =
1100                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1101                     ? getTransitionRoutesFieldBuilder()
1102                     : null;
1103           } else {
1104             transitionRoutesBuilder_.addAllMessages(other.transitionRoutes_);
1105           }
1106         }
1107       }
1108       if (eventHandlersBuilder_ == null) {
1109         if (!other.eventHandlers_.isEmpty()) {
1110           if (eventHandlers_.isEmpty()) {
1111             eventHandlers_ = other.eventHandlers_;
1112             bitField0_ = (bitField0_ & ~0x00000010);
1113           } else {
1114             ensureEventHandlersIsMutable();
1115             eventHandlers_.addAll(other.eventHandlers_);
1116           }
1117           onChanged();
1118         }
1119       } else {
1120         if (!other.eventHandlers_.isEmpty()) {
1121           if (eventHandlersBuilder_.isEmpty()) {
1122             eventHandlersBuilder_.dispose();
1123             eventHandlersBuilder_ = null;
1124             eventHandlers_ = other.eventHandlers_;
1125             bitField0_ = (bitField0_ & ~0x00000010);
1126             eventHandlersBuilder_ =
1127                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1128                     ? getEventHandlersFieldBuilder()
1129                     : null;
1130           } else {
1131             eventHandlersBuilder_.addAllMessages(other.eventHandlers_);
1132           }
1133         }
1134       }
1135       if (!other.transitionRouteGroups_.isEmpty()) {
1136         if (transitionRouteGroups_.isEmpty()) {
1137           transitionRouteGroups_ = other.transitionRouteGroups_;
1138           bitField0_ = (bitField0_ & ~0x00000020);
1139         } else {
1140           ensureTransitionRouteGroupsIsMutable();
1141           transitionRouteGroups_.addAll(other.transitionRouteGroups_);
1142         }
1143         onChanged();
1144       }
1145       if (other.hasNluSettings()) {
1146         mergeNluSettings(other.getNluSettings());
1147       }
1148       this.mergeUnknownFields(other.getUnknownFields());
1149       onChanged();
1150       return this;
1151     }
1152 
1153     @java.lang.Override
isInitialized()1154     public final boolean isInitialized() {
1155       return true;
1156     }
1157 
1158     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1159     public Builder mergeFrom(
1160         com.google.protobuf.CodedInputStream input,
1161         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1162         throws java.io.IOException {
1163       if (extensionRegistry == null) {
1164         throw new java.lang.NullPointerException();
1165       }
1166       try {
1167         boolean done = false;
1168         while (!done) {
1169           int tag = input.readTag();
1170           switch (tag) {
1171             case 0:
1172               done = true;
1173               break;
1174             case 10:
1175               {
1176                 name_ = input.readStringRequireUtf8();
1177                 bitField0_ |= 0x00000001;
1178                 break;
1179               } // case 10
1180             case 18:
1181               {
1182                 displayName_ = input.readStringRequireUtf8();
1183                 bitField0_ |= 0x00000002;
1184                 break;
1185               } // case 18
1186             case 26:
1187               {
1188                 description_ = input.readStringRequireUtf8();
1189                 bitField0_ |= 0x00000004;
1190                 break;
1191               } // case 26
1192             case 34:
1193               {
1194                 com.google.cloud.dialogflow.cx.v3.TransitionRoute m =
1195                     input.readMessage(
1196                         com.google.cloud.dialogflow.cx.v3.TransitionRoute.parser(),
1197                         extensionRegistry);
1198                 if (transitionRoutesBuilder_ == null) {
1199                   ensureTransitionRoutesIsMutable();
1200                   transitionRoutes_.add(m);
1201                 } else {
1202                   transitionRoutesBuilder_.addMessage(m);
1203                 }
1204                 break;
1205               } // case 34
1206             case 82:
1207               {
1208                 com.google.cloud.dialogflow.cx.v3.EventHandler m =
1209                     input.readMessage(
1210                         com.google.cloud.dialogflow.cx.v3.EventHandler.parser(), extensionRegistry);
1211                 if (eventHandlersBuilder_ == null) {
1212                   ensureEventHandlersIsMutable();
1213                   eventHandlers_.add(m);
1214                 } else {
1215                   eventHandlersBuilder_.addMessage(m);
1216                 }
1217                 break;
1218               } // case 82
1219             case 90:
1220               {
1221                 input.readMessage(getNluSettingsFieldBuilder().getBuilder(), extensionRegistry);
1222                 bitField0_ |= 0x00000040;
1223                 break;
1224               } // case 90
1225             case 122:
1226               {
1227                 java.lang.String s = input.readStringRequireUtf8();
1228                 ensureTransitionRouteGroupsIsMutable();
1229                 transitionRouteGroups_.add(s);
1230                 break;
1231               } // case 122
1232             default:
1233               {
1234                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1235                   done = true; // was an endgroup tag
1236                 }
1237                 break;
1238               } // default:
1239           } // switch (tag)
1240         } // while (!done)
1241       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1242         throw e.unwrapIOException();
1243       } finally {
1244         onChanged();
1245       } // finally
1246       return this;
1247     }
1248 
1249     private int bitField0_;
1250 
1251     private java.lang.Object name_ = "";
1252     /**
1253      *
1254      *
1255      * <pre>
1256      * The unique identifier of the flow.
1257      * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1258      * ID&gt;/flows/&lt;Flow ID&gt;`.
1259      * </pre>
1260      *
1261      * <code>string name = 1;</code>
1262      *
1263      * @return The name.
1264      */
getName()1265     public java.lang.String getName() {
1266       java.lang.Object ref = name_;
1267       if (!(ref instanceof java.lang.String)) {
1268         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1269         java.lang.String s = bs.toStringUtf8();
1270         name_ = s;
1271         return s;
1272       } else {
1273         return (java.lang.String) ref;
1274       }
1275     }
1276     /**
1277      *
1278      *
1279      * <pre>
1280      * The unique identifier of the flow.
1281      * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1282      * ID&gt;/flows/&lt;Flow ID&gt;`.
1283      * </pre>
1284      *
1285      * <code>string name = 1;</code>
1286      *
1287      * @return The bytes for name.
1288      */
getNameBytes()1289     public com.google.protobuf.ByteString getNameBytes() {
1290       java.lang.Object ref = name_;
1291       if (ref instanceof String) {
1292         com.google.protobuf.ByteString b =
1293             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1294         name_ = b;
1295         return b;
1296       } else {
1297         return (com.google.protobuf.ByteString) ref;
1298       }
1299     }
1300     /**
1301      *
1302      *
1303      * <pre>
1304      * The unique identifier of the flow.
1305      * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1306      * ID&gt;/flows/&lt;Flow ID&gt;`.
1307      * </pre>
1308      *
1309      * <code>string name = 1;</code>
1310      *
1311      * @param value The name to set.
1312      * @return This builder for chaining.
1313      */
setName(java.lang.String value)1314     public Builder setName(java.lang.String value) {
1315       if (value == null) {
1316         throw new NullPointerException();
1317       }
1318       name_ = value;
1319       bitField0_ |= 0x00000001;
1320       onChanged();
1321       return this;
1322     }
1323     /**
1324      *
1325      *
1326      * <pre>
1327      * The unique identifier of the flow.
1328      * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1329      * ID&gt;/flows/&lt;Flow ID&gt;`.
1330      * </pre>
1331      *
1332      * <code>string name = 1;</code>
1333      *
1334      * @return This builder for chaining.
1335      */
clearName()1336     public Builder clearName() {
1337       name_ = getDefaultInstance().getName();
1338       bitField0_ = (bitField0_ & ~0x00000001);
1339       onChanged();
1340       return this;
1341     }
1342     /**
1343      *
1344      *
1345      * <pre>
1346      * The unique identifier of the flow.
1347      * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1348      * ID&gt;/flows/&lt;Flow ID&gt;`.
1349      * </pre>
1350      *
1351      * <code>string name = 1;</code>
1352      *
1353      * @param value The bytes for name to set.
1354      * @return This builder for chaining.
1355      */
setNameBytes(com.google.protobuf.ByteString value)1356     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1357       if (value == null) {
1358         throw new NullPointerException();
1359       }
1360       checkByteStringIsUtf8(value);
1361       name_ = value;
1362       bitField0_ |= 0x00000001;
1363       onChanged();
1364       return this;
1365     }
1366 
1367     private java.lang.Object displayName_ = "";
1368     /**
1369      *
1370      *
1371      * <pre>
1372      * Required. The human-readable name of the flow.
1373      * </pre>
1374      *
1375      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1376      *
1377      * @return The displayName.
1378      */
getDisplayName()1379     public java.lang.String getDisplayName() {
1380       java.lang.Object ref = displayName_;
1381       if (!(ref instanceof java.lang.String)) {
1382         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1383         java.lang.String s = bs.toStringUtf8();
1384         displayName_ = s;
1385         return s;
1386       } else {
1387         return (java.lang.String) ref;
1388       }
1389     }
1390     /**
1391      *
1392      *
1393      * <pre>
1394      * Required. The human-readable name of the flow.
1395      * </pre>
1396      *
1397      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1398      *
1399      * @return The bytes for displayName.
1400      */
getDisplayNameBytes()1401     public com.google.protobuf.ByteString getDisplayNameBytes() {
1402       java.lang.Object ref = displayName_;
1403       if (ref instanceof String) {
1404         com.google.protobuf.ByteString b =
1405             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1406         displayName_ = b;
1407         return b;
1408       } else {
1409         return (com.google.protobuf.ByteString) ref;
1410       }
1411     }
1412     /**
1413      *
1414      *
1415      * <pre>
1416      * Required. The human-readable name of the flow.
1417      * </pre>
1418      *
1419      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1420      *
1421      * @param value The displayName to set.
1422      * @return This builder for chaining.
1423      */
setDisplayName(java.lang.String value)1424     public Builder setDisplayName(java.lang.String value) {
1425       if (value == null) {
1426         throw new NullPointerException();
1427       }
1428       displayName_ = value;
1429       bitField0_ |= 0x00000002;
1430       onChanged();
1431       return this;
1432     }
1433     /**
1434      *
1435      *
1436      * <pre>
1437      * Required. The human-readable name of the flow.
1438      * </pre>
1439      *
1440      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1441      *
1442      * @return This builder for chaining.
1443      */
clearDisplayName()1444     public Builder clearDisplayName() {
1445       displayName_ = getDefaultInstance().getDisplayName();
1446       bitField0_ = (bitField0_ & ~0x00000002);
1447       onChanged();
1448       return this;
1449     }
1450     /**
1451      *
1452      *
1453      * <pre>
1454      * Required. The human-readable name of the flow.
1455      * </pre>
1456      *
1457      * <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1458      *
1459      * @param value The bytes for displayName to set.
1460      * @return This builder for chaining.
1461      */
setDisplayNameBytes(com.google.protobuf.ByteString value)1462     public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
1463       if (value == null) {
1464         throw new NullPointerException();
1465       }
1466       checkByteStringIsUtf8(value);
1467       displayName_ = value;
1468       bitField0_ |= 0x00000002;
1469       onChanged();
1470       return this;
1471     }
1472 
1473     private java.lang.Object description_ = "";
1474     /**
1475      *
1476      *
1477      * <pre>
1478      * The description of the flow. The maximum length is 500 characters. If
1479      * exceeded, the request is rejected.
1480      * </pre>
1481      *
1482      * <code>string description = 3;</code>
1483      *
1484      * @return The description.
1485      */
getDescription()1486     public java.lang.String getDescription() {
1487       java.lang.Object ref = description_;
1488       if (!(ref instanceof java.lang.String)) {
1489         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1490         java.lang.String s = bs.toStringUtf8();
1491         description_ = s;
1492         return s;
1493       } else {
1494         return (java.lang.String) ref;
1495       }
1496     }
1497     /**
1498      *
1499      *
1500      * <pre>
1501      * The description of the flow. The maximum length is 500 characters. If
1502      * exceeded, the request is rejected.
1503      * </pre>
1504      *
1505      * <code>string description = 3;</code>
1506      *
1507      * @return The bytes for description.
1508      */
getDescriptionBytes()1509     public com.google.protobuf.ByteString getDescriptionBytes() {
1510       java.lang.Object ref = description_;
1511       if (ref instanceof String) {
1512         com.google.protobuf.ByteString b =
1513             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1514         description_ = b;
1515         return b;
1516       } else {
1517         return (com.google.protobuf.ByteString) ref;
1518       }
1519     }
1520     /**
1521      *
1522      *
1523      * <pre>
1524      * The description of the flow. The maximum length is 500 characters. If
1525      * exceeded, the request is rejected.
1526      * </pre>
1527      *
1528      * <code>string description = 3;</code>
1529      *
1530      * @param value The description to set.
1531      * @return This builder for chaining.
1532      */
setDescription(java.lang.String value)1533     public Builder setDescription(java.lang.String value) {
1534       if (value == null) {
1535         throw new NullPointerException();
1536       }
1537       description_ = value;
1538       bitField0_ |= 0x00000004;
1539       onChanged();
1540       return this;
1541     }
1542     /**
1543      *
1544      *
1545      * <pre>
1546      * The description of the flow. The maximum length is 500 characters. If
1547      * exceeded, the request is rejected.
1548      * </pre>
1549      *
1550      * <code>string description = 3;</code>
1551      *
1552      * @return This builder for chaining.
1553      */
clearDescription()1554     public Builder clearDescription() {
1555       description_ = getDefaultInstance().getDescription();
1556       bitField0_ = (bitField0_ & ~0x00000004);
1557       onChanged();
1558       return this;
1559     }
1560     /**
1561      *
1562      *
1563      * <pre>
1564      * The description of the flow. The maximum length is 500 characters. If
1565      * exceeded, the request is rejected.
1566      * </pre>
1567      *
1568      * <code>string description = 3;</code>
1569      *
1570      * @param value The bytes for description to set.
1571      * @return This builder for chaining.
1572      */
setDescriptionBytes(com.google.protobuf.ByteString value)1573     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
1574       if (value == null) {
1575         throw new NullPointerException();
1576       }
1577       checkByteStringIsUtf8(value);
1578       description_ = value;
1579       bitField0_ |= 0x00000004;
1580       onChanged();
1581       return this;
1582     }
1583 
1584     private java.util.List<com.google.cloud.dialogflow.cx.v3.TransitionRoute> transitionRoutes_ =
1585         java.util.Collections.emptyList();
1586 
ensureTransitionRoutesIsMutable()1587     private void ensureTransitionRoutesIsMutable() {
1588       if (!((bitField0_ & 0x00000008) != 0)) {
1589         transitionRoutes_ =
1590             new java.util.ArrayList<com.google.cloud.dialogflow.cx.v3.TransitionRoute>(
1591                 transitionRoutes_);
1592         bitField0_ |= 0x00000008;
1593       }
1594     }
1595 
1596     private com.google.protobuf.RepeatedFieldBuilderV3<
1597             com.google.cloud.dialogflow.cx.v3.TransitionRoute,
1598             com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder,
1599             com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder>
1600         transitionRoutesBuilder_;
1601 
1602     /**
1603      *
1604      *
1605      * <pre>
1606      * A flow's transition routes serve two purposes:
1607      * *   They are responsible for matching the user's first utterances in the
1608      * flow.
1609      * *   They are inherited by every page's [transition
1610      * routes][Page.transition_routes] and can support use cases such as the user
1611      * saying "help" or "can I talk to a human?", which can be handled in a common
1612      * way regardless of the current page. Transition routes defined in the page
1613      * have higher priority than those defined in the flow.
1614      * TransitionRoutes are evalauted in the following order:
1615      * *   TransitionRoutes with intent specified.
1616      * *   TransitionRoutes with only condition specified.
1617      * TransitionRoutes with intent specified are inherited by pages in the flow.
1618      * </pre>
1619      *
1620      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1621      */
1622     public java.util.List<com.google.cloud.dialogflow.cx.v3.TransitionRoute>
getTransitionRoutesList()1623         getTransitionRoutesList() {
1624       if (transitionRoutesBuilder_ == null) {
1625         return java.util.Collections.unmodifiableList(transitionRoutes_);
1626       } else {
1627         return transitionRoutesBuilder_.getMessageList();
1628       }
1629     }
1630     /**
1631      *
1632      *
1633      * <pre>
1634      * A flow's transition routes serve two purposes:
1635      * *   They are responsible for matching the user's first utterances in the
1636      * flow.
1637      * *   They are inherited by every page's [transition
1638      * routes][Page.transition_routes] and can support use cases such as the user
1639      * saying "help" or "can I talk to a human?", which can be handled in a common
1640      * way regardless of the current page. Transition routes defined in the page
1641      * have higher priority than those defined in the flow.
1642      * TransitionRoutes are evalauted in the following order:
1643      * *   TransitionRoutes with intent specified.
1644      * *   TransitionRoutes with only condition specified.
1645      * TransitionRoutes with intent specified are inherited by pages in the flow.
1646      * </pre>
1647      *
1648      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1649      */
getTransitionRoutesCount()1650     public int getTransitionRoutesCount() {
1651       if (transitionRoutesBuilder_ == null) {
1652         return transitionRoutes_.size();
1653       } else {
1654         return transitionRoutesBuilder_.getCount();
1655       }
1656     }
1657     /**
1658      *
1659      *
1660      * <pre>
1661      * A flow's transition routes serve two purposes:
1662      * *   They are responsible for matching the user's first utterances in the
1663      * flow.
1664      * *   They are inherited by every page's [transition
1665      * routes][Page.transition_routes] and can support use cases such as the user
1666      * saying "help" or "can I talk to a human?", which can be handled in a common
1667      * way regardless of the current page. Transition routes defined in the page
1668      * have higher priority than those defined in the flow.
1669      * TransitionRoutes are evalauted in the following order:
1670      * *   TransitionRoutes with intent specified.
1671      * *   TransitionRoutes with only condition specified.
1672      * TransitionRoutes with intent specified are inherited by pages in the flow.
1673      * </pre>
1674      *
1675      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1676      */
getTransitionRoutes(int index)1677     public com.google.cloud.dialogflow.cx.v3.TransitionRoute getTransitionRoutes(int index) {
1678       if (transitionRoutesBuilder_ == null) {
1679         return transitionRoutes_.get(index);
1680       } else {
1681         return transitionRoutesBuilder_.getMessage(index);
1682       }
1683     }
1684     /**
1685      *
1686      *
1687      * <pre>
1688      * A flow's transition routes serve two purposes:
1689      * *   They are responsible for matching the user's first utterances in the
1690      * flow.
1691      * *   They are inherited by every page's [transition
1692      * routes][Page.transition_routes] and can support use cases such as the user
1693      * saying "help" or "can I talk to a human?", which can be handled in a common
1694      * way regardless of the current page. Transition routes defined in the page
1695      * have higher priority than those defined in the flow.
1696      * TransitionRoutes are evalauted in the following order:
1697      * *   TransitionRoutes with intent specified.
1698      * *   TransitionRoutes with only condition specified.
1699      * TransitionRoutes with intent specified are inherited by pages in the flow.
1700      * </pre>
1701      *
1702      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1703      */
setTransitionRoutes( int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute value)1704     public Builder setTransitionRoutes(
1705         int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute value) {
1706       if (transitionRoutesBuilder_ == null) {
1707         if (value == null) {
1708           throw new NullPointerException();
1709         }
1710         ensureTransitionRoutesIsMutable();
1711         transitionRoutes_.set(index, value);
1712         onChanged();
1713       } else {
1714         transitionRoutesBuilder_.setMessage(index, value);
1715       }
1716       return this;
1717     }
1718     /**
1719      *
1720      *
1721      * <pre>
1722      * A flow's transition routes serve two purposes:
1723      * *   They are responsible for matching the user's first utterances in the
1724      * flow.
1725      * *   They are inherited by every page's [transition
1726      * routes][Page.transition_routes] and can support use cases such as the user
1727      * saying "help" or "can I talk to a human?", which can be handled in a common
1728      * way regardless of the current page. Transition routes defined in the page
1729      * have higher priority than those defined in the flow.
1730      * TransitionRoutes are evalauted in the following order:
1731      * *   TransitionRoutes with intent specified.
1732      * *   TransitionRoutes with only condition specified.
1733      * TransitionRoutes with intent specified are inherited by pages in the flow.
1734      * </pre>
1735      *
1736      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1737      */
setTransitionRoutes( int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue)1738     public Builder setTransitionRoutes(
1739         int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue) {
1740       if (transitionRoutesBuilder_ == null) {
1741         ensureTransitionRoutesIsMutable();
1742         transitionRoutes_.set(index, builderForValue.build());
1743         onChanged();
1744       } else {
1745         transitionRoutesBuilder_.setMessage(index, builderForValue.build());
1746       }
1747       return this;
1748     }
1749     /**
1750      *
1751      *
1752      * <pre>
1753      * A flow's transition routes serve two purposes:
1754      * *   They are responsible for matching the user's first utterances in the
1755      * flow.
1756      * *   They are inherited by every page's [transition
1757      * routes][Page.transition_routes] and can support use cases such as the user
1758      * saying "help" or "can I talk to a human?", which can be handled in a common
1759      * way regardless of the current page. Transition routes defined in the page
1760      * have higher priority than those defined in the flow.
1761      * TransitionRoutes are evalauted in the following order:
1762      * *   TransitionRoutes with intent specified.
1763      * *   TransitionRoutes with only condition specified.
1764      * TransitionRoutes with intent specified are inherited by pages in the flow.
1765      * </pre>
1766      *
1767      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1768      */
addTransitionRoutes(com.google.cloud.dialogflow.cx.v3.TransitionRoute value)1769     public Builder addTransitionRoutes(com.google.cloud.dialogflow.cx.v3.TransitionRoute value) {
1770       if (transitionRoutesBuilder_ == null) {
1771         if (value == null) {
1772           throw new NullPointerException();
1773         }
1774         ensureTransitionRoutesIsMutable();
1775         transitionRoutes_.add(value);
1776         onChanged();
1777       } else {
1778         transitionRoutesBuilder_.addMessage(value);
1779       }
1780       return this;
1781     }
1782     /**
1783      *
1784      *
1785      * <pre>
1786      * A flow's transition routes serve two purposes:
1787      * *   They are responsible for matching the user's first utterances in the
1788      * flow.
1789      * *   They are inherited by every page's [transition
1790      * routes][Page.transition_routes] and can support use cases such as the user
1791      * saying "help" or "can I talk to a human?", which can be handled in a common
1792      * way regardless of the current page. Transition routes defined in the page
1793      * have higher priority than those defined in the flow.
1794      * TransitionRoutes are evalauted in the following order:
1795      * *   TransitionRoutes with intent specified.
1796      * *   TransitionRoutes with only condition specified.
1797      * TransitionRoutes with intent specified are inherited by pages in the flow.
1798      * </pre>
1799      *
1800      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1801      */
addTransitionRoutes( int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute value)1802     public Builder addTransitionRoutes(
1803         int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute value) {
1804       if (transitionRoutesBuilder_ == null) {
1805         if (value == null) {
1806           throw new NullPointerException();
1807         }
1808         ensureTransitionRoutesIsMutable();
1809         transitionRoutes_.add(index, value);
1810         onChanged();
1811       } else {
1812         transitionRoutesBuilder_.addMessage(index, value);
1813       }
1814       return this;
1815     }
1816     /**
1817      *
1818      *
1819      * <pre>
1820      * A flow's transition routes serve two purposes:
1821      * *   They are responsible for matching the user's first utterances in the
1822      * flow.
1823      * *   They are inherited by every page's [transition
1824      * routes][Page.transition_routes] and can support use cases such as the user
1825      * saying "help" or "can I talk to a human?", which can be handled in a common
1826      * way regardless of the current page. Transition routes defined in the page
1827      * have higher priority than those defined in the flow.
1828      * TransitionRoutes are evalauted in the following order:
1829      * *   TransitionRoutes with intent specified.
1830      * *   TransitionRoutes with only condition specified.
1831      * TransitionRoutes with intent specified are inherited by pages in the flow.
1832      * </pre>
1833      *
1834      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1835      */
addTransitionRoutes( com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue)1836     public Builder addTransitionRoutes(
1837         com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue) {
1838       if (transitionRoutesBuilder_ == null) {
1839         ensureTransitionRoutesIsMutable();
1840         transitionRoutes_.add(builderForValue.build());
1841         onChanged();
1842       } else {
1843         transitionRoutesBuilder_.addMessage(builderForValue.build());
1844       }
1845       return this;
1846     }
1847     /**
1848      *
1849      *
1850      * <pre>
1851      * A flow's transition routes serve two purposes:
1852      * *   They are responsible for matching the user's first utterances in the
1853      * flow.
1854      * *   They are inherited by every page's [transition
1855      * routes][Page.transition_routes] and can support use cases such as the user
1856      * saying "help" or "can I talk to a human?", which can be handled in a common
1857      * way regardless of the current page. Transition routes defined in the page
1858      * have higher priority than those defined in the flow.
1859      * TransitionRoutes are evalauted in the following order:
1860      * *   TransitionRoutes with intent specified.
1861      * *   TransitionRoutes with only condition specified.
1862      * TransitionRoutes with intent specified are inherited by pages in the flow.
1863      * </pre>
1864      *
1865      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1866      */
addTransitionRoutes( int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue)1867     public Builder addTransitionRoutes(
1868         int index, com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder builderForValue) {
1869       if (transitionRoutesBuilder_ == null) {
1870         ensureTransitionRoutesIsMutable();
1871         transitionRoutes_.add(index, builderForValue.build());
1872         onChanged();
1873       } else {
1874         transitionRoutesBuilder_.addMessage(index, builderForValue.build());
1875       }
1876       return this;
1877     }
1878     /**
1879      *
1880      *
1881      * <pre>
1882      * A flow's transition routes serve two purposes:
1883      * *   They are responsible for matching the user's first utterances in the
1884      * flow.
1885      * *   They are inherited by every page's [transition
1886      * routes][Page.transition_routes] and can support use cases such as the user
1887      * saying "help" or "can I talk to a human?", which can be handled in a common
1888      * way regardless of the current page. Transition routes defined in the page
1889      * have higher priority than those defined in the flow.
1890      * TransitionRoutes are evalauted in the following order:
1891      * *   TransitionRoutes with intent specified.
1892      * *   TransitionRoutes with only condition specified.
1893      * TransitionRoutes with intent specified are inherited by pages in the flow.
1894      * </pre>
1895      *
1896      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1897      */
addAllTransitionRoutes( java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3.TransitionRoute> values)1898     public Builder addAllTransitionRoutes(
1899         java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3.TransitionRoute> values) {
1900       if (transitionRoutesBuilder_ == null) {
1901         ensureTransitionRoutesIsMutable();
1902         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitionRoutes_);
1903         onChanged();
1904       } else {
1905         transitionRoutesBuilder_.addAllMessages(values);
1906       }
1907       return this;
1908     }
1909     /**
1910      *
1911      *
1912      * <pre>
1913      * A flow's transition routes serve two purposes:
1914      * *   They are responsible for matching the user's first utterances in the
1915      * flow.
1916      * *   They are inherited by every page's [transition
1917      * routes][Page.transition_routes] and can support use cases such as the user
1918      * saying "help" or "can I talk to a human?", which can be handled in a common
1919      * way regardless of the current page. Transition routes defined in the page
1920      * have higher priority than those defined in the flow.
1921      * TransitionRoutes are evalauted in the following order:
1922      * *   TransitionRoutes with intent specified.
1923      * *   TransitionRoutes with only condition specified.
1924      * TransitionRoutes with intent specified are inherited by pages in the flow.
1925      * </pre>
1926      *
1927      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1928      */
clearTransitionRoutes()1929     public Builder clearTransitionRoutes() {
1930       if (transitionRoutesBuilder_ == null) {
1931         transitionRoutes_ = java.util.Collections.emptyList();
1932         bitField0_ = (bitField0_ & ~0x00000008);
1933         onChanged();
1934       } else {
1935         transitionRoutesBuilder_.clear();
1936       }
1937       return this;
1938     }
1939     /**
1940      *
1941      *
1942      * <pre>
1943      * A flow's transition routes serve two purposes:
1944      * *   They are responsible for matching the user's first utterances in the
1945      * flow.
1946      * *   They are inherited by every page's [transition
1947      * routes][Page.transition_routes] and can support use cases such as the user
1948      * saying "help" or "can I talk to a human?", which can be handled in a common
1949      * way regardless of the current page. Transition routes defined in the page
1950      * have higher priority than those defined in the flow.
1951      * TransitionRoutes are evalauted in the following order:
1952      * *   TransitionRoutes with intent specified.
1953      * *   TransitionRoutes with only condition specified.
1954      * TransitionRoutes with intent specified are inherited by pages in the flow.
1955      * </pre>
1956      *
1957      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1958      */
removeTransitionRoutes(int index)1959     public Builder removeTransitionRoutes(int index) {
1960       if (transitionRoutesBuilder_ == null) {
1961         ensureTransitionRoutesIsMutable();
1962         transitionRoutes_.remove(index);
1963         onChanged();
1964       } else {
1965         transitionRoutesBuilder_.remove(index);
1966       }
1967       return this;
1968     }
1969     /**
1970      *
1971      *
1972      * <pre>
1973      * A flow's transition routes serve two purposes:
1974      * *   They are responsible for matching the user's first utterances in the
1975      * flow.
1976      * *   They are inherited by every page's [transition
1977      * routes][Page.transition_routes] and can support use cases such as the user
1978      * saying "help" or "can I talk to a human?", which can be handled in a common
1979      * way regardless of the current page. Transition routes defined in the page
1980      * have higher priority than those defined in the flow.
1981      * TransitionRoutes are evalauted in the following order:
1982      * *   TransitionRoutes with intent specified.
1983      * *   TransitionRoutes with only condition specified.
1984      * TransitionRoutes with intent specified are inherited by pages in the flow.
1985      * </pre>
1986      *
1987      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
1988      */
getTransitionRoutesBuilder( int index)1989     public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder getTransitionRoutesBuilder(
1990         int index) {
1991       return getTransitionRoutesFieldBuilder().getBuilder(index);
1992     }
1993     /**
1994      *
1995      *
1996      * <pre>
1997      * A flow's transition routes serve two purposes:
1998      * *   They are responsible for matching the user's first utterances in the
1999      * flow.
2000      * *   They are inherited by every page's [transition
2001      * routes][Page.transition_routes] and can support use cases such as the user
2002      * saying "help" or "can I talk to a human?", which can be handled in a common
2003      * way regardless of the current page. Transition routes defined in the page
2004      * have higher priority than those defined in the flow.
2005      * TransitionRoutes are evalauted in the following order:
2006      * *   TransitionRoutes with intent specified.
2007      * *   TransitionRoutes with only condition specified.
2008      * TransitionRoutes with intent specified are inherited by pages in the flow.
2009      * </pre>
2010      *
2011      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
2012      */
getTransitionRoutesOrBuilder( int index)2013     public com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder getTransitionRoutesOrBuilder(
2014         int index) {
2015       if (transitionRoutesBuilder_ == null) {
2016         return transitionRoutes_.get(index);
2017       } else {
2018         return transitionRoutesBuilder_.getMessageOrBuilder(index);
2019       }
2020     }
2021     /**
2022      *
2023      *
2024      * <pre>
2025      * A flow's transition routes serve two purposes:
2026      * *   They are responsible for matching the user's first utterances in the
2027      * flow.
2028      * *   They are inherited by every page's [transition
2029      * routes][Page.transition_routes] and can support use cases such as the user
2030      * saying "help" or "can I talk to a human?", which can be handled in a common
2031      * way regardless of the current page. Transition routes defined in the page
2032      * have higher priority than those defined in the flow.
2033      * TransitionRoutes are evalauted in the following order:
2034      * *   TransitionRoutes with intent specified.
2035      * *   TransitionRoutes with only condition specified.
2036      * TransitionRoutes with intent specified are inherited by pages in the flow.
2037      * </pre>
2038      *
2039      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
2040      */
2041     public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder>
getTransitionRoutesOrBuilderList()2042         getTransitionRoutesOrBuilderList() {
2043       if (transitionRoutesBuilder_ != null) {
2044         return transitionRoutesBuilder_.getMessageOrBuilderList();
2045       } else {
2046         return java.util.Collections.unmodifiableList(transitionRoutes_);
2047       }
2048     }
2049     /**
2050      *
2051      *
2052      * <pre>
2053      * A flow's transition routes serve two purposes:
2054      * *   They are responsible for matching the user's first utterances in the
2055      * flow.
2056      * *   They are inherited by every page's [transition
2057      * routes][Page.transition_routes] and can support use cases such as the user
2058      * saying "help" or "can I talk to a human?", which can be handled in a common
2059      * way regardless of the current page. Transition routes defined in the page
2060      * have higher priority than those defined in the flow.
2061      * TransitionRoutes are evalauted in the following order:
2062      * *   TransitionRoutes with intent specified.
2063      * *   TransitionRoutes with only condition specified.
2064      * TransitionRoutes with intent specified are inherited by pages in the flow.
2065      * </pre>
2066      *
2067      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
2068      */
addTransitionRoutesBuilder()2069     public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRoutesBuilder() {
2070       return getTransitionRoutesFieldBuilder()
2071           .addBuilder(com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance());
2072     }
2073     /**
2074      *
2075      *
2076      * <pre>
2077      * A flow's transition routes serve two purposes:
2078      * *   They are responsible for matching the user's first utterances in the
2079      * flow.
2080      * *   They are inherited by every page's [transition
2081      * routes][Page.transition_routes] and can support use cases such as the user
2082      * saying "help" or "can I talk to a human?", which can be handled in a common
2083      * way regardless of the current page. Transition routes defined in the page
2084      * have higher priority than those defined in the flow.
2085      * TransitionRoutes are evalauted in the following order:
2086      * *   TransitionRoutes with intent specified.
2087      * *   TransitionRoutes with only condition specified.
2088      * TransitionRoutes with intent specified are inherited by pages in the flow.
2089      * </pre>
2090      *
2091      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
2092      */
addTransitionRoutesBuilder( int index)2093     public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRoutesBuilder(
2094         int index) {
2095       return getTransitionRoutesFieldBuilder()
2096           .addBuilder(
2097               index, com.google.cloud.dialogflow.cx.v3.TransitionRoute.getDefaultInstance());
2098     }
2099     /**
2100      *
2101      *
2102      * <pre>
2103      * A flow's transition routes serve two purposes:
2104      * *   They are responsible for matching the user's first utterances in the
2105      * flow.
2106      * *   They are inherited by every page's [transition
2107      * routes][Page.transition_routes] and can support use cases such as the user
2108      * saying "help" or "can I talk to a human?", which can be handled in a common
2109      * way regardless of the current page. Transition routes defined in the page
2110      * have higher priority than those defined in the flow.
2111      * TransitionRoutes are evalauted in the following order:
2112      * *   TransitionRoutes with intent specified.
2113      * *   TransitionRoutes with only condition specified.
2114      * TransitionRoutes with intent specified are inherited by pages in the flow.
2115      * </pre>
2116      *
2117      * <code>repeated .google.cloud.dialogflow.cx.v3.TransitionRoute transition_routes = 4;</code>
2118      */
2119     public java.util.List<com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder>
getTransitionRoutesBuilderList()2120         getTransitionRoutesBuilderList() {
2121       return getTransitionRoutesFieldBuilder().getBuilderList();
2122     }
2123 
2124     private com.google.protobuf.RepeatedFieldBuilderV3<
2125             com.google.cloud.dialogflow.cx.v3.TransitionRoute,
2126             com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder,
2127             com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder>
getTransitionRoutesFieldBuilder()2128         getTransitionRoutesFieldBuilder() {
2129       if (transitionRoutesBuilder_ == null) {
2130         transitionRoutesBuilder_ =
2131             new com.google.protobuf.RepeatedFieldBuilderV3<
2132                 com.google.cloud.dialogflow.cx.v3.TransitionRoute,
2133                 com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder,
2134                 com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder>(
2135                 transitionRoutes_,
2136                 ((bitField0_ & 0x00000008) != 0),
2137                 getParentForChildren(),
2138                 isClean());
2139         transitionRoutes_ = null;
2140       }
2141       return transitionRoutesBuilder_;
2142     }
2143 
2144     private java.util.List<com.google.cloud.dialogflow.cx.v3.EventHandler> eventHandlers_ =
2145         java.util.Collections.emptyList();
2146 
ensureEventHandlersIsMutable()2147     private void ensureEventHandlersIsMutable() {
2148       if (!((bitField0_ & 0x00000010) != 0)) {
2149         eventHandlers_ =
2150             new java.util.ArrayList<com.google.cloud.dialogflow.cx.v3.EventHandler>(eventHandlers_);
2151         bitField0_ |= 0x00000010;
2152       }
2153     }
2154 
2155     private com.google.protobuf.RepeatedFieldBuilderV3<
2156             com.google.cloud.dialogflow.cx.v3.EventHandler,
2157             com.google.cloud.dialogflow.cx.v3.EventHandler.Builder,
2158             com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder>
2159         eventHandlersBuilder_;
2160 
2161     /**
2162      *
2163      *
2164      * <pre>
2165      * A flow's event handlers serve two purposes:
2166      * *   They are responsible for handling events (e.g. no match,
2167      * webhook errors) in the flow.
2168      * *   They are inherited by every page's [event
2169      * handlers][Page.event_handlers], which can be used to handle common events
2170      * regardless of the current page. Event handlers defined in the page
2171      * have higher priority than those defined in the flow.
2172      * Unlike
2173      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2174      * these handlers are evaluated on a first-match basis. The first one that
2175      * matches the event get executed, with the rest being ignored.
2176      * </pre>
2177      *
2178      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2179      */
getEventHandlersList()2180     public java.util.List<com.google.cloud.dialogflow.cx.v3.EventHandler> getEventHandlersList() {
2181       if (eventHandlersBuilder_ == null) {
2182         return java.util.Collections.unmodifiableList(eventHandlers_);
2183       } else {
2184         return eventHandlersBuilder_.getMessageList();
2185       }
2186     }
2187     /**
2188      *
2189      *
2190      * <pre>
2191      * A flow's event handlers serve two purposes:
2192      * *   They are responsible for handling events (e.g. no match,
2193      * webhook errors) in the flow.
2194      * *   They are inherited by every page's [event
2195      * handlers][Page.event_handlers], which can be used to handle common events
2196      * regardless of the current page. Event handlers defined in the page
2197      * have higher priority than those defined in the flow.
2198      * Unlike
2199      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2200      * these handlers are evaluated on a first-match basis. The first one that
2201      * matches the event get executed, with the rest being ignored.
2202      * </pre>
2203      *
2204      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2205      */
getEventHandlersCount()2206     public int getEventHandlersCount() {
2207       if (eventHandlersBuilder_ == null) {
2208         return eventHandlers_.size();
2209       } else {
2210         return eventHandlersBuilder_.getCount();
2211       }
2212     }
2213     /**
2214      *
2215      *
2216      * <pre>
2217      * A flow's event handlers serve two purposes:
2218      * *   They are responsible for handling events (e.g. no match,
2219      * webhook errors) in the flow.
2220      * *   They are inherited by every page's [event
2221      * handlers][Page.event_handlers], which can be used to handle common events
2222      * regardless of the current page. Event handlers defined in the page
2223      * have higher priority than those defined in the flow.
2224      * Unlike
2225      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2226      * these handlers are evaluated on a first-match basis. The first one that
2227      * matches the event get executed, with the rest being ignored.
2228      * </pre>
2229      *
2230      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2231      */
getEventHandlers(int index)2232     public com.google.cloud.dialogflow.cx.v3.EventHandler getEventHandlers(int index) {
2233       if (eventHandlersBuilder_ == null) {
2234         return eventHandlers_.get(index);
2235       } else {
2236         return eventHandlersBuilder_.getMessage(index);
2237       }
2238     }
2239     /**
2240      *
2241      *
2242      * <pre>
2243      * A flow's event handlers serve two purposes:
2244      * *   They are responsible for handling events (e.g. no match,
2245      * webhook errors) in the flow.
2246      * *   They are inherited by every page's [event
2247      * handlers][Page.event_handlers], which can be used to handle common events
2248      * regardless of the current page. Event handlers defined in the page
2249      * have higher priority than those defined in the flow.
2250      * Unlike
2251      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2252      * these handlers are evaluated on a first-match basis. The first one that
2253      * matches the event get executed, with the rest being ignored.
2254      * </pre>
2255      *
2256      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2257      */
setEventHandlers( int index, com.google.cloud.dialogflow.cx.v3.EventHandler value)2258     public Builder setEventHandlers(
2259         int index, com.google.cloud.dialogflow.cx.v3.EventHandler value) {
2260       if (eventHandlersBuilder_ == null) {
2261         if (value == null) {
2262           throw new NullPointerException();
2263         }
2264         ensureEventHandlersIsMutable();
2265         eventHandlers_.set(index, value);
2266         onChanged();
2267       } else {
2268         eventHandlersBuilder_.setMessage(index, value);
2269       }
2270       return this;
2271     }
2272     /**
2273      *
2274      *
2275      * <pre>
2276      * A flow's event handlers serve two purposes:
2277      * *   They are responsible for handling events (e.g. no match,
2278      * webhook errors) in the flow.
2279      * *   They are inherited by every page's [event
2280      * handlers][Page.event_handlers], which can be used to handle common events
2281      * regardless of the current page. Event handlers defined in the page
2282      * have higher priority than those defined in the flow.
2283      * Unlike
2284      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2285      * these handlers are evaluated on a first-match basis. The first one that
2286      * matches the event get executed, with the rest being ignored.
2287      * </pre>
2288      *
2289      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2290      */
setEventHandlers( int index, com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue)2291     public Builder setEventHandlers(
2292         int index, com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue) {
2293       if (eventHandlersBuilder_ == null) {
2294         ensureEventHandlersIsMutable();
2295         eventHandlers_.set(index, builderForValue.build());
2296         onChanged();
2297       } else {
2298         eventHandlersBuilder_.setMessage(index, builderForValue.build());
2299       }
2300       return this;
2301     }
2302     /**
2303      *
2304      *
2305      * <pre>
2306      * A flow's event handlers serve two purposes:
2307      * *   They are responsible for handling events (e.g. no match,
2308      * webhook errors) in the flow.
2309      * *   They are inherited by every page's [event
2310      * handlers][Page.event_handlers], which can be used to handle common events
2311      * regardless of the current page. Event handlers defined in the page
2312      * have higher priority than those defined in the flow.
2313      * Unlike
2314      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2315      * these handlers are evaluated on a first-match basis. The first one that
2316      * matches the event get executed, with the rest being ignored.
2317      * </pre>
2318      *
2319      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2320      */
addEventHandlers(com.google.cloud.dialogflow.cx.v3.EventHandler value)2321     public Builder addEventHandlers(com.google.cloud.dialogflow.cx.v3.EventHandler value) {
2322       if (eventHandlersBuilder_ == null) {
2323         if (value == null) {
2324           throw new NullPointerException();
2325         }
2326         ensureEventHandlersIsMutable();
2327         eventHandlers_.add(value);
2328         onChanged();
2329       } else {
2330         eventHandlersBuilder_.addMessage(value);
2331       }
2332       return this;
2333     }
2334     /**
2335      *
2336      *
2337      * <pre>
2338      * A flow's event handlers serve two purposes:
2339      * *   They are responsible for handling events (e.g. no match,
2340      * webhook errors) in the flow.
2341      * *   They are inherited by every page's [event
2342      * handlers][Page.event_handlers], which can be used to handle common events
2343      * regardless of the current page. Event handlers defined in the page
2344      * have higher priority than those defined in the flow.
2345      * Unlike
2346      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2347      * these handlers are evaluated on a first-match basis. The first one that
2348      * matches the event get executed, with the rest being ignored.
2349      * </pre>
2350      *
2351      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2352      */
addEventHandlers( int index, com.google.cloud.dialogflow.cx.v3.EventHandler value)2353     public Builder addEventHandlers(
2354         int index, com.google.cloud.dialogflow.cx.v3.EventHandler value) {
2355       if (eventHandlersBuilder_ == null) {
2356         if (value == null) {
2357           throw new NullPointerException();
2358         }
2359         ensureEventHandlersIsMutable();
2360         eventHandlers_.add(index, value);
2361         onChanged();
2362       } else {
2363         eventHandlersBuilder_.addMessage(index, value);
2364       }
2365       return this;
2366     }
2367     /**
2368      *
2369      *
2370      * <pre>
2371      * A flow's event handlers serve two purposes:
2372      * *   They are responsible for handling events (e.g. no match,
2373      * webhook errors) in the flow.
2374      * *   They are inherited by every page's [event
2375      * handlers][Page.event_handlers], which can be used to handle common events
2376      * regardless of the current page. Event handlers defined in the page
2377      * have higher priority than those defined in the flow.
2378      * Unlike
2379      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2380      * these handlers are evaluated on a first-match basis. The first one that
2381      * matches the event get executed, with the rest being ignored.
2382      * </pre>
2383      *
2384      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2385      */
addEventHandlers( com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue)2386     public Builder addEventHandlers(
2387         com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue) {
2388       if (eventHandlersBuilder_ == null) {
2389         ensureEventHandlersIsMutable();
2390         eventHandlers_.add(builderForValue.build());
2391         onChanged();
2392       } else {
2393         eventHandlersBuilder_.addMessage(builderForValue.build());
2394       }
2395       return this;
2396     }
2397     /**
2398      *
2399      *
2400      * <pre>
2401      * A flow's event handlers serve two purposes:
2402      * *   They are responsible for handling events (e.g. no match,
2403      * webhook errors) in the flow.
2404      * *   They are inherited by every page's [event
2405      * handlers][Page.event_handlers], which can be used to handle common events
2406      * regardless of the current page. Event handlers defined in the page
2407      * have higher priority than those defined in the flow.
2408      * Unlike
2409      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2410      * these handlers are evaluated on a first-match basis. The first one that
2411      * matches the event get executed, with the rest being ignored.
2412      * </pre>
2413      *
2414      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2415      */
addEventHandlers( int index, com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue)2416     public Builder addEventHandlers(
2417         int index, com.google.cloud.dialogflow.cx.v3.EventHandler.Builder builderForValue) {
2418       if (eventHandlersBuilder_ == null) {
2419         ensureEventHandlersIsMutable();
2420         eventHandlers_.add(index, builderForValue.build());
2421         onChanged();
2422       } else {
2423         eventHandlersBuilder_.addMessage(index, builderForValue.build());
2424       }
2425       return this;
2426     }
2427     /**
2428      *
2429      *
2430      * <pre>
2431      * A flow's event handlers serve two purposes:
2432      * *   They are responsible for handling events (e.g. no match,
2433      * webhook errors) in the flow.
2434      * *   They are inherited by every page's [event
2435      * handlers][Page.event_handlers], which can be used to handle common events
2436      * regardless of the current page. Event handlers defined in the page
2437      * have higher priority than those defined in the flow.
2438      * Unlike
2439      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2440      * these handlers are evaluated on a first-match basis. The first one that
2441      * matches the event get executed, with the rest being ignored.
2442      * </pre>
2443      *
2444      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2445      */
addAllEventHandlers( java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3.EventHandler> values)2446     public Builder addAllEventHandlers(
2447         java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3.EventHandler> values) {
2448       if (eventHandlersBuilder_ == null) {
2449         ensureEventHandlersIsMutable();
2450         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, eventHandlers_);
2451         onChanged();
2452       } else {
2453         eventHandlersBuilder_.addAllMessages(values);
2454       }
2455       return this;
2456     }
2457     /**
2458      *
2459      *
2460      * <pre>
2461      * A flow's event handlers serve two purposes:
2462      * *   They are responsible for handling events (e.g. no match,
2463      * webhook errors) in the flow.
2464      * *   They are inherited by every page's [event
2465      * handlers][Page.event_handlers], which can be used to handle common events
2466      * regardless of the current page. Event handlers defined in the page
2467      * have higher priority than those defined in the flow.
2468      * Unlike
2469      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2470      * these handlers are evaluated on a first-match basis. The first one that
2471      * matches the event get executed, with the rest being ignored.
2472      * </pre>
2473      *
2474      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2475      */
clearEventHandlers()2476     public Builder clearEventHandlers() {
2477       if (eventHandlersBuilder_ == null) {
2478         eventHandlers_ = java.util.Collections.emptyList();
2479         bitField0_ = (bitField0_ & ~0x00000010);
2480         onChanged();
2481       } else {
2482         eventHandlersBuilder_.clear();
2483       }
2484       return this;
2485     }
2486     /**
2487      *
2488      *
2489      * <pre>
2490      * A flow's event handlers serve two purposes:
2491      * *   They are responsible for handling events (e.g. no match,
2492      * webhook errors) in the flow.
2493      * *   They are inherited by every page's [event
2494      * handlers][Page.event_handlers], which can be used to handle common events
2495      * regardless of the current page. Event handlers defined in the page
2496      * have higher priority than those defined in the flow.
2497      * Unlike
2498      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2499      * these handlers are evaluated on a first-match basis. The first one that
2500      * matches the event get executed, with the rest being ignored.
2501      * </pre>
2502      *
2503      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2504      */
removeEventHandlers(int index)2505     public Builder removeEventHandlers(int index) {
2506       if (eventHandlersBuilder_ == null) {
2507         ensureEventHandlersIsMutable();
2508         eventHandlers_.remove(index);
2509         onChanged();
2510       } else {
2511         eventHandlersBuilder_.remove(index);
2512       }
2513       return this;
2514     }
2515     /**
2516      *
2517      *
2518      * <pre>
2519      * A flow's event handlers serve two purposes:
2520      * *   They are responsible for handling events (e.g. no match,
2521      * webhook errors) in the flow.
2522      * *   They are inherited by every page's [event
2523      * handlers][Page.event_handlers], which can be used to handle common events
2524      * regardless of the current page. Event handlers defined in the page
2525      * have higher priority than those defined in the flow.
2526      * Unlike
2527      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2528      * these handlers are evaluated on a first-match basis. The first one that
2529      * matches the event get executed, with the rest being ignored.
2530      * </pre>
2531      *
2532      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2533      */
getEventHandlersBuilder( int index)2534     public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder getEventHandlersBuilder(
2535         int index) {
2536       return getEventHandlersFieldBuilder().getBuilder(index);
2537     }
2538     /**
2539      *
2540      *
2541      * <pre>
2542      * A flow's event handlers serve two purposes:
2543      * *   They are responsible for handling events (e.g. no match,
2544      * webhook errors) in the flow.
2545      * *   They are inherited by every page's [event
2546      * handlers][Page.event_handlers], which can be used to handle common events
2547      * regardless of the current page. Event handlers defined in the page
2548      * have higher priority than those defined in the flow.
2549      * Unlike
2550      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2551      * these handlers are evaluated on a first-match basis. The first one that
2552      * matches the event get executed, with the rest being ignored.
2553      * </pre>
2554      *
2555      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2556      */
getEventHandlersOrBuilder( int index)2557     public com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder getEventHandlersOrBuilder(
2558         int index) {
2559       if (eventHandlersBuilder_ == null) {
2560         return eventHandlers_.get(index);
2561       } else {
2562         return eventHandlersBuilder_.getMessageOrBuilder(index);
2563       }
2564     }
2565     /**
2566      *
2567      *
2568      * <pre>
2569      * A flow's event handlers serve two purposes:
2570      * *   They are responsible for handling events (e.g. no match,
2571      * webhook errors) in the flow.
2572      * *   They are inherited by every page's [event
2573      * handlers][Page.event_handlers], which can be used to handle common events
2574      * regardless of the current page. Event handlers defined in the page
2575      * have higher priority than those defined in the flow.
2576      * Unlike
2577      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2578      * these handlers are evaluated on a first-match basis. The first one that
2579      * matches the event get executed, with the rest being ignored.
2580      * </pre>
2581      *
2582      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2583      */
2584     public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder>
getEventHandlersOrBuilderList()2585         getEventHandlersOrBuilderList() {
2586       if (eventHandlersBuilder_ != null) {
2587         return eventHandlersBuilder_.getMessageOrBuilderList();
2588       } else {
2589         return java.util.Collections.unmodifiableList(eventHandlers_);
2590       }
2591     }
2592     /**
2593      *
2594      *
2595      * <pre>
2596      * A flow's event handlers serve two purposes:
2597      * *   They are responsible for handling events (e.g. no match,
2598      * webhook errors) in the flow.
2599      * *   They are inherited by every page's [event
2600      * handlers][Page.event_handlers], which can be used to handle common events
2601      * regardless of the current page. Event handlers defined in the page
2602      * have higher priority than those defined in the flow.
2603      * Unlike
2604      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2605      * these handlers are evaluated on a first-match basis. The first one that
2606      * matches the event get executed, with the rest being ignored.
2607      * </pre>
2608      *
2609      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2610      */
addEventHandlersBuilder()2611     public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder addEventHandlersBuilder() {
2612       return getEventHandlersFieldBuilder()
2613           .addBuilder(com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance());
2614     }
2615     /**
2616      *
2617      *
2618      * <pre>
2619      * A flow's event handlers serve two purposes:
2620      * *   They are responsible for handling events (e.g. no match,
2621      * webhook errors) in the flow.
2622      * *   They are inherited by every page's [event
2623      * handlers][Page.event_handlers], which can be used to handle common events
2624      * regardless of the current page. Event handlers defined in the page
2625      * have higher priority than those defined in the flow.
2626      * Unlike
2627      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2628      * these handlers are evaluated on a first-match basis. The first one that
2629      * matches the event get executed, with the rest being ignored.
2630      * </pre>
2631      *
2632      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2633      */
addEventHandlersBuilder( int index)2634     public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder addEventHandlersBuilder(
2635         int index) {
2636       return getEventHandlersFieldBuilder()
2637           .addBuilder(index, com.google.cloud.dialogflow.cx.v3.EventHandler.getDefaultInstance());
2638     }
2639     /**
2640      *
2641      *
2642      * <pre>
2643      * A flow's event handlers serve two purposes:
2644      * *   They are responsible for handling events (e.g. no match,
2645      * webhook errors) in the flow.
2646      * *   They are inherited by every page's [event
2647      * handlers][Page.event_handlers], which can be used to handle common events
2648      * regardless of the current page. Event handlers defined in the page
2649      * have higher priority than those defined in the flow.
2650      * Unlike
2651      * [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes],
2652      * these handlers are evaluated on a first-match basis. The first one that
2653      * matches the event get executed, with the rest being ignored.
2654      * </pre>
2655      *
2656      * <code>repeated .google.cloud.dialogflow.cx.v3.EventHandler event_handlers = 10;</code>
2657      */
2658     public java.util.List<com.google.cloud.dialogflow.cx.v3.EventHandler.Builder>
getEventHandlersBuilderList()2659         getEventHandlersBuilderList() {
2660       return getEventHandlersFieldBuilder().getBuilderList();
2661     }
2662 
2663     private com.google.protobuf.RepeatedFieldBuilderV3<
2664             com.google.cloud.dialogflow.cx.v3.EventHandler,
2665             com.google.cloud.dialogflow.cx.v3.EventHandler.Builder,
2666             com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder>
getEventHandlersFieldBuilder()2667         getEventHandlersFieldBuilder() {
2668       if (eventHandlersBuilder_ == null) {
2669         eventHandlersBuilder_ =
2670             new com.google.protobuf.RepeatedFieldBuilderV3<
2671                 com.google.cloud.dialogflow.cx.v3.EventHandler,
2672                 com.google.cloud.dialogflow.cx.v3.EventHandler.Builder,
2673                 com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder>(
2674                 eventHandlers_,
2675                 ((bitField0_ & 0x00000010) != 0),
2676                 getParentForChildren(),
2677                 isClean());
2678         eventHandlers_ = null;
2679       }
2680       return eventHandlersBuilder_;
2681     }
2682 
2683     private com.google.protobuf.LazyStringList transitionRouteGroups_ =
2684         com.google.protobuf.LazyStringArrayList.EMPTY;
2685 
ensureTransitionRouteGroupsIsMutable()2686     private void ensureTransitionRouteGroupsIsMutable() {
2687       if (!((bitField0_ & 0x00000020) != 0)) {
2688         transitionRouteGroups_ =
2689             new com.google.protobuf.LazyStringArrayList(transitionRouteGroups_);
2690         bitField0_ |= 0x00000020;
2691       }
2692     }
2693     /**
2694      *
2695      *
2696      * <pre>
2697      * A flow's transition route group serve two purposes:
2698      * *   They are responsible for matching the user's first utterances in the
2699      * flow.
2700      * *   They are inherited by every page's [transition
2701      * route groups][Page.transition_route_groups]. Transition route groups
2702      * defined in the page have higher priority than those defined in the flow.
2703      * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
2704      * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
2705      * </pre>
2706      *
2707      * <code>
2708      * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
2709      * </code>
2710      *
2711      * @return A list containing the transitionRouteGroups.
2712      */
getTransitionRouteGroupsList()2713     public com.google.protobuf.ProtocolStringList getTransitionRouteGroupsList() {
2714       return transitionRouteGroups_.getUnmodifiableView();
2715     }
2716     /**
2717      *
2718      *
2719      * <pre>
2720      * A flow's transition route group serve two purposes:
2721      * *   They are responsible for matching the user's first utterances in the
2722      * flow.
2723      * *   They are inherited by every page's [transition
2724      * route groups][Page.transition_route_groups]. Transition route groups
2725      * defined in the page have higher priority than those defined in the flow.
2726      * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
2727      * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
2728      * </pre>
2729      *
2730      * <code>
2731      * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
2732      * </code>
2733      *
2734      * @return The count of transitionRouteGroups.
2735      */
getTransitionRouteGroupsCount()2736     public int getTransitionRouteGroupsCount() {
2737       return transitionRouteGroups_.size();
2738     }
2739     /**
2740      *
2741      *
2742      * <pre>
2743      * A flow's transition route group serve two purposes:
2744      * *   They are responsible for matching the user's first utterances in the
2745      * flow.
2746      * *   They are inherited by every page's [transition
2747      * route groups][Page.transition_route_groups]. Transition route groups
2748      * defined in the page have higher priority than those defined in the flow.
2749      * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
2750      * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
2751      * </pre>
2752      *
2753      * <code>
2754      * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
2755      * </code>
2756      *
2757      * @param index The index of the element to return.
2758      * @return The transitionRouteGroups at the given index.
2759      */
getTransitionRouteGroups(int index)2760     public java.lang.String getTransitionRouteGroups(int index) {
2761       return transitionRouteGroups_.get(index);
2762     }
2763     /**
2764      *
2765      *
2766      * <pre>
2767      * A flow's transition route group serve two purposes:
2768      * *   They are responsible for matching the user's first utterances in the
2769      * flow.
2770      * *   They are inherited by every page's [transition
2771      * route groups][Page.transition_route_groups]. Transition route groups
2772      * defined in the page have higher priority than those defined in the flow.
2773      * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
2774      * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
2775      * </pre>
2776      *
2777      * <code>
2778      * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
2779      * </code>
2780      *
2781      * @param index The index of the value to return.
2782      * @return The bytes of the transitionRouteGroups at the given index.
2783      */
getTransitionRouteGroupsBytes(int index)2784     public com.google.protobuf.ByteString getTransitionRouteGroupsBytes(int index) {
2785       return transitionRouteGroups_.getByteString(index);
2786     }
2787     /**
2788      *
2789      *
2790      * <pre>
2791      * A flow's transition route group serve two purposes:
2792      * *   They are responsible for matching the user's first utterances in the
2793      * flow.
2794      * *   They are inherited by every page's [transition
2795      * route groups][Page.transition_route_groups]. Transition route groups
2796      * defined in the page have higher priority than those defined in the flow.
2797      * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
2798      * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
2799      * </pre>
2800      *
2801      * <code>
2802      * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
2803      * </code>
2804      *
2805      * @param index The index to set the value at.
2806      * @param value The transitionRouteGroups to set.
2807      * @return This builder for chaining.
2808      */
setTransitionRouteGroups(int index, java.lang.String value)2809     public Builder setTransitionRouteGroups(int index, java.lang.String value) {
2810       if (value == null) {
2811         throw new NullPointerException();
2812       }
2813       ensureTransitionRouteGroupsIsMutable();
2814       transitionRouteGroups_.set(index, value);
2815       onChanged();
2816       return this;
2817     }
2818     /**
2819      *
2820      *
2821      * <pre>
2822      * A flow's transition route group serve two purposes:
2823      * *   They are responsible for matching the user's first utterances in the
2824      * flow.
2825      * *   They are inherited by every page's [transition
2826      * route groups][Page.transition_route_groups]. Transition route groups
2827      * defined in the page have higher priority than those defined in the flow.
2828      * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
2829      * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
2830      * </pre>
2831      *
2832      * <code>
2833      * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
2834      * </code>
2835      *
2836      * @param value The transitionRouteGroups to add.
2837      * @return This builder for chaining.
2838      */
addTransitionRouteGroups(java.lang.String value)2839     public Builder addTransitionRouteGroups(java.lang.String value) {
2840       if (value == null) {
2841         throw new NullPointerException();
2842       }
2843       ensureTransitionRouteGroupsIsMutable();
2844       transitionRouteGroups_.add(value);
2845       onChanged();
2846       return this;
2847     }
2848     /**
2849      *
2850      *
2851      * <pre>
2852      * A flow's transition route group serve two purposes:
2853      * *   They are responsible for matching the user's first utterances in the
2854      * flow.
2855      * *   They are inherited by every page's [transition
2856      * route groups][Page.transition_route_groups]. Transition route groups
2857      * defined in the page have higher priority than those defined in the flow.
2858      * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
2859      * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
2860      * </pre>
2861      *
2862      * <code>
2863      * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
2864      * </code>
2865      *
2866      * @param values The transitionRouteGroups to add.
2867      * @return This builder for chaining.
2868      */
addAllTransitionRouteGroups(java.lang.Iterable<java.lang.String> values)2869     public Builder addAllTransitionRouteGroups(java.lang.Iterable<java.lang.String> values) {
2870       ensureTransitionRouteGroupsIsMutable();
2871       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitionRouteGroups_);
2872       onChanged();
2873       return this;
2874     }
2875     /**
2876      *
2877      *
2878      * <pre>
2879      * A flow's transition route group serve two purposes:
2880      * *   They are responsible for matching the user's first utterances in the
2881      * flow.
2882      * *   They are inherited by every page's [transition
2883      * route groups][Page.transition_route_groups]. Transition route groups
2884      * defined in the page have higher priority than those defined in the flow.
2885      * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
2886      * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
2887      * </pre>
2888      *
2889      * <code>
2890      * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
2891      * </code>
2892      *
2893      * @return This builder for chaining.
2894      */
clearTransitionRouteGroups()2895     public Builder clearTransitionRouteGroups() {
2896       transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2897       bitField0_ = (bitField0_ & ~0x00000020);
2898       onChanged();
2899       return this;
2900     }
2901     /**
2902      *
2903      *
2904      * <pre>
2905      * A flow's transition route group serve two purposes:
2906      * *   They are responsible for matching the user's first utterances in the
2907      * flow.
2908      * *   They are inherited by every page's [transition
2909      * route groups][Page.transition_route_groups]. Transition route groups
2910      * defined in the page have higher priority than those defined in the flow.
2911      * Format:`projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
2912      * ID&gt;/flows/&lt;Flow ID&gt;/transitionRouteGroups/&lt;TransitionRouteGroup ID&gt;`.
2913      * </pre>
2914      *
2915      * <code>
2916      * repeated string transition_route_groups = 15 [(.google.api.resource_reference) = { ... }
2917      * </code>
2918      *
2919      * @param value The bytes of the transitionRouteGroups to add.
2920      * @return This builder for chaining.
2921      */
addTransitionRouteGroupsBytes(com.google.protobuf.ByteString value)2922     public Builder addTransitionRouteGroupsBytes(com.google.protobuf.ByteString value) {
2923       if (value == null) {
2924         throw new NullPointerException();
2925       }
2926       checkByteStringIsUtf8(value);
2927       ensureTransitionRouteGroupsIsMutable();
2928       transitionRouteGroups_.add(value);
2929       onChanged();
2930       return this;
2931     }
2932 
2933     private com.google.cloud.dialogflow.cx.v3.NluSettings nluSettings_;
2934     private com.google.protobuf.SingleFieldBuilderV3<
2935             com.google.cloud.dialogflow.cx.v3.NluSettings,
2936             com.google.cloud.dialogflow.cx.v3.NluSettings.Builder,
2937             com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder>
2938         nluSettingsBuilder_;
2939     /**
2940      *
2941      *
2942      * <pre>
2943      * NLU related settings of the flow.
2944      * </pre>
2945      *
2946      * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
2947      *
2948      * @return Whether the nluSettings field is set.
2949      */
hasNluSettings()2950     public boolean hasNluSettings() {
2951       return ((bitField0_ & 0x00000040) != 0);
2952     }
2953     /**
2954      *
2955      *
2956      * <pre>
2957      * NLU related settings of the flow.
2958      * </pre>
2959      *
2960      * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
2961      *
2962      * @return The nluSettings.
2963      */
getNluSettings()2964     public com.google.cloud.dialogflow.cx.v3.NluSettings getNluSettings() {
2965       if (nluSettingsBuilder_ == null) {
2966         return nluSettings_ == null
2967             ? com.google.cloud.dialogflow.cx.v3.NluSettings.getDefaultInstance()
2968             : nluSettings_;
2969       } else {
2970         return nluSettingsBuilder_.getMessage();
2971       }
2972     }
2973     /**
2974      *
2975      *
2976      * <pre>
2977      * NLU related settings of the flow.
2978      * </pre>
2979      *
2980      * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
2981      */
setNluSettings(com.google.cloud.dialogflow.cx.v3.NluSettings value)2982     public Builder setNluSettings(com.google.cloud.dialogflow.cx.v3.NluSettings value) {
2983       if (nluSettingsBuilder_ == null) {
2984         if (value == null) {
2985           throw new NullPointerException();
2986         }
2987         nluSettings_ = value;
2988       } else {
2989         nluSettingsBuilder_.setMessage(value);
2990       }
2991       bitField0_ |= 0x00000040;
2992       onChanged();
2993       return this;
2994     }
2995     /**
2996      *
2997      *
2998      * <pre>
2999      * NLU related settings of the flow.
3000      * </pre>
3001      *
3002      * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
3003      */
setNluSettings( com.google.cloud.dialogflow.cx.v3.NluSettings.Builder builderForValue)3004     public Builder setNluSettings(
3005         com.google.cloud.dialogflow.cx.v3.NluSettings.Builder builderForValue) {
3006       if (nluSettingsBuilder_ == null) {
3007         nluSettings_ = builderForValue.build();
3008       } else {
3009         nluSettingsBuilder_.setMessage(builderForValue.build());
3010       }
3011       bitField0_ |= 0x00000040;
3012       onChanged();
3013       return this;
3014     }
3015     /**
3016      *
3017      *
3018      * <pre>
3019      * NLU related settings of the flow.
3020      * </pre>
3021      *
3022      * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
3023      */
mergeNluSettings(com.google.cloud.dialogflow.cx.v3.NluSettings value)3024     public Builder mergeNluSettings(com.google.cloud.dialogflow.cx.v3.NluSettings value) {
3025       if (nluSettingsBuilder_ == null) {
3026         if (((bitField0_ & 0x00000040) != 0)
3027             && nluSettings_ != null
3028             && nluSettings_ != com.google.cloud.dialogflow.cx.v3.NluSettings.getDefaultInstance()) {
3029           getNluSettingsBuilder().mergeFrom(value);
3030         } else {
3031           nluSettings_ = value;
3032         }
3033       } else {
3034         nluSettingsBuilder_.mergeFrom(value);
3035       }
3036       bitField0_ |= 0x00000040;
3037       onChanged();
3038       return this;
3039     }
3040     /**
3041      *
3042      *
3043      * <pre>
3044      * NLU related settings of the flow.
3045      * </pre>
3046      *
3047      * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
3048      */
clearNluSettings()3049     public Builder clearNluSettings() {
3050       bitField0_ = (bitField0_ & ~0x00000040);
3051       nluSettings_ = null;
3052       if (nluSettingsBuilder_ != null) {
3053         nluSettingsBuilder_.dispose();
3054         nluSettingsBuilder_ = null;
3055       }
3056       onChanged();
3057       return this;
3058     }
3059     /**
3060      *
3061      *
3062      * <pre>
3063      * NLU related settings of the flow.
3064      * </pre>
3065      *
3066      * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
3067      */
getNluSettingsBuilder()3068     public com.google.cloud.dialogflow.cx.v3.NluSettings.Builder getNluSettingsBuilder() {
3069       bitField0_ |= 0x00000040;
3070       onChanged();
3071       return getNluSettingsFieldBuilder().getBuilder();
3072     }
3073     /**
3074      *
3075      *
3076      * <pre>
3077      * NLU related settings of the flow.
3078      * </pre>
3079      *
3080      * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
3081      */
getNluSettingsOrBuilder()3082     public com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder getNluSettingsOrBuilder() {
3083       if (nluSettingsBuilder_ != null) {
3084         return nluSettingsBuilder_.getMessageOrBuilder();
3085       } else {
3086         return nluSettings_ == null
3087             ? com.google.cloud.dialogflow.cx.v3.NluSettings.getDefaultInstance()
3088             : nluSettings_;
3089       }
3090     }
3091     /**
3092      *
3093      *
3094      * <pre>
3095      * NLU related settings of the flow.
3096      * </pre>
3097      *
3098      * <code>.google.cloud.dialogflow.cx.v3.NluSettings nlu_settings = 11;</code>
3099      */
3100     private com.google.protobuf.SingleFieldBuilderV3<
3101             com.google.cloud.dialogflow.cx.v3.NluSettings,
3102             com.google.cloud.dialogflow.cx.v3.NluSettings.Builder,
3103             com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder>
getNluSettingsFieldBuilder()3104         getNluSettingsFieldBuilder() {
3105       if (nluSettingsBuilder_ == null) {
3106         nluSettingsBuilder_ =
3107             new com.google.protobuf.SingleFieldBuilderV3<
3108                 com.google.cloud.dialogflow.cx.v3.NluSettings,
3109                 com.google.cloud.dialogflow.cx.v3.NluSettings.Builder,
3110                 com.google.cloud.dialogflow.cx.v3.NluSettingsOrBuilder>(
3111                 getNluSettings(), getParentForChildren(), isClean());
3112         nluSettings_ = null;
3113       }
3114       return nluSettingsBuilder_;
3115     }
3116 
3117     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3118     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3119       return super.setUnknownFields(unknownFields);
3120     }
3121 
3122     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3123     public final Builder mergeUnknownFields(
3124         final com.google.protobuf.UnknownFieldSet unknownFields) {
3125       return super.mergeUnknownFields(unknownFields);
3126     }
3127 
3128     // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Flow)
3129   }
3130 
3131   // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Flow)
3132   private static final com.google.cloud.dialogflow.cx.v3.Flow DEFAULT_INSTANCE;
3133 
3134   static {
3135     DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Flow();
3136   }
3137 
getDefaultInstance()3138   public static com.google.cloud.dialogflow.cx.v3.Flow getDefaultInstance() {
3139     return DEFAULT_INSTANCE;
3140   }
3141 
3142   private static final com.google.protobuf.Parser<Flow> PARSER =
3143       new com.google.protobuf.AbstractParser<Flow>() {
3144         @java.lang.Override
3145         public Flow parsePartialFrom(
3146             com.google.protobuf.CodedInputStream input,
3147             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3148             throws com.google.protobuf.InvalidProtocolBufferException {
3149           Builder builder = newBuilder();
3150           try {
3151             builder.mergeFrom(input, extensionRegistry);
3152           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3153             throw e.setUnfinishedMessage(builder.buildPartial());
3154           } catch (com.google.protobuf.UninitializedMessageException e) {
3155             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3156           } catch (java.io.IOException e) {
3157             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3158                 .setUnfinishedMessage(builder.buildPartial());
3159           }
3160           return builder.buildPartial();
3161         }
3162       };
3163 
parser()3164   public static com.google.protobuf.Parser<Flow> parser() {
3165     return PARSER;
3166   }
3167 
3168   @java.lang.Override
getParserForType()3169   public com.google.protobuf.Parser<Flow> getParserForType() {
3170     return PARSER;
3171   }
3172 
3173   @java.lang.Override
getDefaultInstanceForType()3174   public com.google.cloud.dialogflow.cx.v3.Flow getDefaultInstanceForType() {
3175     return DEFAULT_INSTANCE;
3176   }
3177 }
3178