• 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/v3beta1/session.proto
18 
19 package com.google.cloud.dialogflow.cx.v3beta1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Response of [MatchIntent][].
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse}
29  */
30 public final class MatchIntentResponse extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse)
33     MatchIntentResponseOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use MatchIntentResponse.newBuilder() to construct.
MatchIntentResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private MatchIntentResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
MatchIntentResponse()40   private MatchIntentResponse() {
41     matches_ = java.util.Collections.emptyList();
42   }
43 
44   @java.lang.Override
45   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)46   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
47     return new MatchIntentResponse();
48   }
49 
50   @java.lang.Override
getUnknownFields()51   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
52     return this.unknownFields;
53   }
54 
getDescriptor()55   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
56     return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
57         .internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_descriptor;
58   }
59 
60   @java.lang.Override
61   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()62       internalGetFieldAccessorTable() {
63     return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
64         .internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse.class,
67             com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse.Builder.class);
68   }
69 
70   private int queryCase_ = 0;
71   private java.lang.Object query_;
72 
73   public enum QueryCase
74       implements
75           com.google.protobuf.Internal.EnumLite,
76           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
77     TEXT(1),
78     TRIGGER_INTENT(2),
79     TRANSCRIPT(3),
80     TRIGGER_EVENT(6),
81     QUERY_NOT_SET(0);
82     private final int value;
83 
QueryCase(int value)84     private QueryCase(int value) {
85       this.value = value;
86     }
87     /**
88      * @param value The number of the enum to look for.
89      * @return The enum associated with the given number.
90      * @deprecated Use {@link #forNumber(int)} instead.
91      */
92     @java.lang.Deprecated
valueOf(int value)93     public static QueryCase valueOf(int value) {
94       return forNumber(value);
95     }
96 
forNumber(int value)97     public static QueryCase forNumber(int value) {
98       switch (value) {
99         case 1:
100           return TEXT;
101         case 2:
102           return TRIGGER_INTENT;
103         case 3:
104           return TRANSCRIPT;
105         case 6:
106           return TRIGGER_EVENT;
107         case 0:
108           return QUERY_NOT_SET;
109         default:
110           return null;
111       }
112     }
113 
getNumber()114     public int getNumber() {
115       return this.value;
116     }
117   };
118 
getQueryCase()119   public QueryCase getQueryCase() {
120     return QueryCase.forNumber(queryCase_);
121   }
122 
123   public static final int TEXT_FIELD_NUMBER = 1;
124   /**
125    *
126    *
127    * <pre>
128    * If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
129    * was provided as input, this field will contain a copy of the text.
130    * </pre>
131    *
132    * <code>string text = 1;</code>
133    *
134    * @return Whether the text field is set.
135    */
hasText()136   public boolean hasText() {
137     return queryCase_ == 1;
138   }
139   /**
140    *
141    *
142    * <pre>
143    * If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
144    * was provided as input, this field will contain a copy of the text.
145    * </pre>
146    *
147    * <code>string text = 1;</code>
148    *
149    * @return The text.
150    */
getText()151   public java.lang.String getText() {
152     java.lang.Object ref = "";
153     if (queryCase_ == 1) {
154       ref = query_;
155     }
156     if (ref instanceof java.lang.String) {
157       return (java.lang.String) ref;
158     } else {
159       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
160       java.lang.String s = bs.toStringUtf8();
161       if (queryCase_ == 1) {
162         query_ = s;
163       }
164       return s;
165     }
166   }
167   /**
168    *
169    *
170    * <pre>
171    * If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
172    * was provided as input, this field will contain a copy of the text.
173    * </pre>
174    *
175    * <code>string text = 1;</code>
176    *
177    * @return The bytes for text.
178    */
getTextBytes()179   public com.google.protobuf.ByteString getTextBytes() {
180     java.lang.Object ref = "";
181     if (queryCase_ == 1) {
182       ref = query_;
183     }
184     if (ref instanceof java.lang.String) {
185       com.google.protobuf.ByteString b =
186           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
187       if (queryCase_ == 1) {
188         query_ = b;
189       }
190       return b;
191     } else {
192       return (com.google.protobuf.ByteString) ref;
193     }
194   }
195 
196   public static final int TRIGGER_INTENT_FIELD_NUMBER = 2;
197   /**
198    *
199    *
200    * <pre>
201    * If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
202    * provided as input, this field will contain a copy of the intent
203    * identifier. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
204    * ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;`.
205    * </pre>
206    *
207    * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
208    *
209    * @return Whether the triggerIntent field is set.
210    */
hasTriggerIntent()211   public boolean hasTriggerIntent() {
212     return queryCase_ == 2;
213   }
214   /**
215    *
216    *
217    * <pre>
218    * If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
219    * provided as input, this field will contain a copy of the intent
220    * identifier. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
221    * ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;`.
222    * </pre>
223    *
224    * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
225    *
226    * @return The triggerIntent.
227    */
getTriggerIntent()228   public java.lang.String getTriggerIntent() {
229     java.lang.Object ref = "";
230     if (queryCase_ == 2) {
231       ref = query_;
232     }
233     if (ref instanceof java.lang.String) {
234       return (java.lang.String) ref;
235     } else {
236       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
237       java.lang.String s = bs.toStringUtf8();
238       if (queryCase_ == 2) {
239         query_ = s;
240       }
241       return s;
242     }
243   }
244   /**
245    *
246    *
247    * <pre>
248    * If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
249    * provided as input, this field will contain a copy of the intent
250    * identifier. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
251    * ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;`.
252    * </pre>
253    *
254    * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
255    *
256    * @return The bytes for triggerIntent.
257    */
getTriggerIntentBytes()258   public com.google.protobuf.ByteString getTriggerIntentBytes() {
259     java.lang.Object ref = "";
260     if (queryCase_ == 2) {
261       ref = query_;
262     }
263     if (ref instanceof java.lang.String) {
264       com.google.protobuf.ByteString b =
265           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
266       if (queryCase_ == 2) {
267         query_ = b;
268       }
269       return b;
270     } else {
271       return (com.google.protobuf.ByteString) ref;
272     }
273   }
274 
275   public static final int TRANSCRIPT_FIELD_NUMBER = 3;
276   /**
277    *
278    *
279    * <pre>
280    * If [natural language speech
281    * audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
282    * input, this field will contain the transcript for the audio.
283    * </pre>
284    *
285    * <code>string transcript = 3;</code>
286    *
287    * @return Whether the transcript field is set.
288    */
hasTranscript()289   public boolean hasTranscript() {
290     return queryCase_ == 3;
291   }
292   /**
293    *
294    *
295    * <pre>
296    * If [natural language speech
297    * audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
298    * input, this field will contain the transcript for the audio.
299    * </pre>
300    *
301    * <code>string transcript = 3;</code>
302    *
303    * @return The transcript.
304    */
getTranscript()305   public java.lang.String getTranscript() {
306     java.lang.Object ref = "";
307     if (queryCase_ == 3) {
308       ref = query_;
309     }
310     if (ref instanceof java.lang.String) {
311       return (java.lang.String) ref;
312     } else {
313       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
314       java.lang.String s = bs.toStringUtf8();
315       if (queryCase_ == 3) {
316         query_ = s;
317       }
318       return s;
319     }
320   }
321   /**
322    *
323    *
324    * <pre>
325    * If [natural language speech
326    * audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
327    * input, this field will contain the transcript for the audio.
328    * </pre>
329    *
330    * <code>string transcript = 3;</code>
331    *
332    * @return The bytes for transcript.
333    */
getTranscriptBytes()334   public com.google.protobuf.ByteString getTranscriptBytes() {
335     java.lang.Object ref = "";
336     if (queryCase_ == 3) {
337       ref = query_;
338     }
339     if (ref instanceof java.lang.String) {
340       com.google.protobuf.ByteString b =
341           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
342       if (queryCase_ == 3) {
343         query_ = b;
344       }
345       return b;
346     } else {
347       return (com.google.protobuf.ByteString) ref;
348     }
349   }
350 
351   public static final int TRIGGER_EVENT_FIELD_NUMBER = 6;
352   /**
353    *
354    *
355    * <pre>
356    * If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
357    * as input, this field will contain a copy of the event name.
358    * </pre>
359    *
360    * <code>string trigger_event = 6;</code>
361    *
362    * @return Whether the triggerEvent field is set.
363    */
hasTriggerEvent()364   public boolean hasTriggerEvent() {
365     return queryCase_ == 6;
366   }
367   /**
368    *
369    *
370    * <pre>
371    * If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
372    * as input, this field will contain a copy of the event name.
373    * </pre>
374    *
375    * <code>string trigger_event = 6;</code>
376    *
377    * @return The triggerEvent.
378    */
getTriggerEvent()379   public java.lang.String getTriggerEvent() {
380     java.lang.Object ref = "";
381     if (queryCase_ == 6) {
382       ref = query_;
383     }
384     if (ref instanceof java.lang.String) {
385       return (java.lang.String) ref;
386     } else {
387       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
388       java.lang.String s = bs.toStringUtf8();
389       if (queryCase_ == 6) {
390         query_ = s;
391       }
392       return s;
393     }
394   }
395   /**
396    *
397    *
398    * <pre>
399    * If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
400    * as input, this field will contain a copy of the event name.
401    * </pre>
402    *
403    * <code>string trigger_event = 6;</code>
404    *
405    * @return The bytes for triggerEvent.
406    */
getTriggerEventBytes()407   public com.google.protobuf.ByteString getTriggerEventBytes() {
408     java.lang.Object ref = "";
409     if (queryCase_ == 6) {
410       ref = query_;
411     }
412     if (ref instanceof java.lang.String) {
413       com.google.protobuf.ByteString b =
414           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
415       if (queryCase_ == 6) {
416         query_ = b;
417       }
418       return b;
419     } else {
420       return (com.google.protobuf.ByteString) ref;
421     }
422   }
423 
424   public static final int MATCHES_FIELD_NUMBER = 4;
425 
426   @SuppressWarnings("serial")
427   private java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Match> matches_;
428   /**
429    *
430    *
431    * <pre>
432    * Match results, if more than one, ordered descendingly by the confidence
433    * we have that the particular intent matches the query.
434    * </pre>
435    *
436    * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
437    */
438   @java.lang.Override
getMatchesList()439   public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Match> getMatchesList() {
440     return matches_;
441   }
442   /**
443    *
444    *
445    * <pre>
446    * Match results, if more than one, ordered descendingly by the confidence
447    * we have that the particular intent matches the query.
448    * </pre>
449    *
450    * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
451    */
452   @java.lang.Override
453   public java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.MatchOrBuilder>
getMatchesOrBuilderList()454       getMatchesOrBuilderList() {
455     return matches_;
456   }
457   /**
458    *
459    *
460    * <pre>
461    * Match results, if more than one, ordered descendingly by the confidence
462    * we have that the particular intent matches the query.
463    * </pre>
464    *
465    * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
466    */
467   @java.lang.Override
getMatchesCount()468   public int getMatchesCount() {
469     return matches_.size();
470   }
471   /**
472    *
473    *
474    * <pre>
475    * Match results, if more than one, ordered descendingly by the confidence
476    * we have that the particular intent matches the query.
477    * </pre>
478    *
479    * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
480    */
481   @java.lang.Override
getMatches(int index)482   public com.google.cloud.dialogflow.cx.v3beta1.Match getMatches(int index) {
483     return matches_.get(index);
484   }
485   /**
486    *
487    *
488    * <pre>
489    * Match results, if more than one, ordered descendingly by the confidence
490    * we have that the particular intent matches the query.
491    * </pre>
492    *
493    * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
494    */
495   @java.lang.Override
getMatchesOrBuilder(int index)496   public com.google.cloud.dialogflow.cx.v3beta1.MatchOrBuilder getMatchesOrBuilder(int index) {
497     return matches_.get(index);
498   }
499 
500   public static final int CURRENT_PAGE_FIELD_NUMBER = 5;
501   private com.google.cloud.dialogflow.cx.v3beta1.Page currentPage_;
502   /**
503    *
504    *
505    * <pre>
506    * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
507    * fields are filled in this message, including but not limited to `name` and
508    * `display_name`.
509    * </pre>
510    *
511    * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
512    *
513    * @return Whether the currentPage field is set.
514    */
515   @java.lang.Override
hasCurrentPage()516   public boolean hasCurrentPage() {
517     return currentPage_ != null;
518   }
519   /**
520    *
521    *
522    * <pre>
523    * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
524    * fields are filled in this message, including but not limited to `name` and
525    * `display_name`.
526    * </pre>
527    *
528    * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
529    *
530    * @return The currentPage.
531    */
532   @java.lang.Override
getCurrentPage()533   public com.google.cloud.dialogflow.cx.v3beta1.Page getCurrentPage() {
534     return currentPage_ == null
535         ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance()
536         : currentPage_;
537   }
538   /**
539    *
540    *
541    * <pre>
542    * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
543    * fields are filled in this message, including but not limited to `name` and
544    * `display_name`.
545    * </pre>
546    *
547    * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
548    */
549   @java.lang.Override
getCurrentPageOrBuilder()550   public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuilder() {
551     return currentPage_ == null
552         ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance()
553         : currentPage_;
554   }
555 
556   private byte memoizedIsInitialized = -1;
557 
558   @java.lang.Override
isInitialized()559   public final boolean isInitialized() {
560     byte isInitialized = memoizedIsInitialized;
561     if (isInitialized == 1) return true;
562     if (isInitialized == 0) return false;
563 
564     memoizedIsInitialized = 1;
565     return true;
566   }
567 
568   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)569   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
570     if (queryCase_ == 1) {
571       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_);
572     }
573     if (queryCase_ == 2) {
574       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_);
575     }
576     if (queryCase_ == 3) {
577       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, query_);
578     }
579     for (int i = 0; i < matches_.size(); i++) {
580       output.writeMessage(4, matches_.get(i));
581     }
582     if (currentPage_ != null) {
583       output.writeMessage(5, getCurrentPage());
584     }
585     if (queryCase_ == 6) {
586       com.google.protobuf.GeneratedMessageV3.writeString(output, 6, query_);
587     }
588     getUnknownFields().writeTo(output);
589   }
590 
591   @java.lang.Override
getSerializedSize()592   public int getSerializedSize() {
593     int size = memoizedSize;
594     if (size != -1) return size;
595 
596     size = 0;
597     if (queryCase_ == 1) {
598       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_);
599     }
600     if (queryCase_ == 2) {
601       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_);
602     }
603     if (queryCase_ == 3) {
604       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, query_);
605     }
606     for (int i = 0; i < matches_.size(); i++) {
607       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, matches_.get(i));
608     }
609     if (currentPage_ != null) {
610       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCurrentPage());
611     }
612     if (queryCase_ == 6) {
613       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, query_);
614     }
615     size += getUnknownFields().getSerializedSize();
616     memoizedSize = size;
617     return size;
618   }
619 
620   @java.lang.Override
equals(final java.lang.Object obj)621   public boolean equals(final java.lang.Object obj) {
622     if (obj == this) {
623       return true;
624     }
625     if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse)) {
626       return super.equals(obj);
627     }
628     com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse other =
629         (com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse) obj;
630 
631     if (!getMatchesList().equals(other.getMatchesList())) return false;
632     if (hasCurrentPage() != other.hasCurrentPage()) return false;
633     if (hasCurrentPage()) {
634       if (!getCurrentPage().equals(other.getCurrentPage())) return false;
635     }
636     if (!getQueryCase().equals(other.getQueryCase())) return false;
637     switch (queryCase_) {
638       case 1:
639         if (!getText().equals(other.getText())) return false;
640         break;
641       case 2:
642         if (!getTriggerIntent().equals(other.getTriggerIntent())) return false;
643         break;
644       case 3:
645         if (!getTranscript().equals(other.getTranscript())) return false;
646         break;
647       case 6:
648         if (!getTriggerEvent().equals(other.getTriggerEvent())) return false;
649         break;
650       case 0:
651       default:
652     }
653     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
654     return true;
655   }
656 
657   @java.lang.Override
hashCode()658   public int hashCode() {
659     if (memoizedHashCode != 0) {
660       return memoizedHashCode;
661     }
662     int hash = 41;
663     hash = (19 * hash) + getDescriptor().hashCode();
664     if (getMatchesCount() > 0) {
665       hash = (37 * hash) + MATCHES_FIELD_NUMBER;
666       hash = (53 * hash) + getMatchesList().hashCode();
667     }
668     if (hasCurrentPage()) {
669       hash = (37 * hash) + CURRENT_PAGE_FIELD_NUMBER;
670       hash = (53 * hash) + getCurrentPage().hashCode();
671     }
672     switch (queryCase_) {
673       case 1:
674         hash = (37 * hash) + TEXT_FIELD_NUMBER;
675         hash = (53 * hash) + getText().hashCode();
676         break;
677       case 2:
678         hash = (37 * hash) + TRIGGER_INTENT_FIELD_NUMBER;
679         hash = (53 * hash) + getTriggerIntent().hashCode();
680         break;
681       case 3:
682         hash = (37 * hash) + TRANSCRIPT_FIELD_NUMBER;
683         hash = (53 * hash) + getTranscript().hashCode();
684         break;
685       case 6:
686         hash = (37 * hash) + TRIGGER_EVENT_FIELD_NUMBER;
687         hash = (53 * hash) + getTriggerEvent().hashCode();
688         break;
689       case 0:
690       default:
691     }
692     hash = (29 * hash) + getUnknownFields().hashCode();
693     memoizedHashCode = hash;
694     return hash;
695   }
696 
parseFrom( java.nio.ByteBuffer data)697   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(
698       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
699     return PARSER.parseFrom(data);
700   }
701 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)702   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(
703       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
704       throws com.google.protobuf.InvalidProtocolBufferException {
705     return PARSER.parseFrom(data, extensionRegistry);
706   }
707 
parseFrom( com.google.protobuf.ByteString data)708   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(
709       com.google.protobuf.ByteString data)
710       throws com.google.protobuf.InvalidProtocolBufferException {
711     return PARSER.parseFrom(data);
712   }
713 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)714   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(
715       com.google.protobuf.ByteString data,
716       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
717       throws com.google.protobuf.InvalidProtocolBufferException {
718     return PARSER.parseFrom(data, extensionRegistry);
719   }
720 
parseFrom(byte[] data)721   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(byte[] data)
722       throws com.google.protobuf.InvalidProtocolBufferException {
723     return PARSER.parseFrom(data);
724   }
725 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)726   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(
727       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
728       throws com.google.protobuf.InvalidProtocolBufferException {
729     return PARSER.parseFrom(data, extensionRegistry);
730   }
731 
parseFrom( java.io.InputStream input)732   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(
733       java.io.InputStream input) throws java.io.IOException {
734     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
735   }
736 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)737   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(
738       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
739       throws java.io.IOException {
740     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
741         PARSER, input, extensionRegistry);
742   }
743 
parseDelimitedFrom( java.io.InputStream input)744   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseDelimitedFrom(
745       java.io.InputStream input) throws java.io.IOException {
746     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
747   }
748 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)749   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseDelimitedFrom(
750       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
751       throws java.io.IOException {
752     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
753         PARSER, input, extensionRegistry);
754   }
755 
parseFrom( com.google.protobuf.CodedInputStream input)756   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(
757       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
758     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
759   }
760 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)761   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse parseFrom(
762       com.google.protobuf.CodedInputStream input,
763       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
764       throws java.io.IOException {
765     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
766         PARSER, input, extensionRegistry);
767   }
768 
769   @java.lang.Override
newBuilderForType()770   public Builder newBuilderForType() {
771     return newBuilder();
772   }
773 
newBuilder()774   public static Builder newBuilder() {
775     return DEFAULT_INSTANCE.toBuilder();
776   }
777 
newBuilder( com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse prototype)778   public static Builder newBuilder(
779       com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse prototype) {
780     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
781   }
782 
783   @java.lang.Override
toBuilder()784   public Builder toBuilder() {
785     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
786   }
787 
788   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)789   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
790     Builder builder = new Builder(parent);
791     return builder;
792   }
793   /**
794    *
795    *
796    * <pre>
797    * Response of [MatchIntent][].
798    * </pre>
799    *
800    * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse}
801    */
802   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
803       implements
804       // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse)
805       com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponseOrBuilder {
getDescriptor()806     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
807       return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
808           .internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_descriptor;
809     }
810 
811     @java.lang.Override
812     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()813         internalGetFieldAccessorTable() {
814       return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
815           .internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_fieldAccessorTable
816           .ensureFieldAccessorsInitialized(
817               com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse.class,
818               com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse.Builder.class);
819     }
820 
821     // Construct using com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse.newBuilder()
Builder()822     private Builder() {}
823 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)824     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
825       super(parent);
826     }
827 
828     @java.lang.Override
clear()829     public Builder clear() {
830       super.clear();
831       bitField0_ = 0;
832       if (matchesBuilder_ == null) {
833         matches_ = java.util.Collections.emptyList();
834       } else {
835         matches_ = null;
836         matchesBuilder_.clear();
837       }
838       bitField0_ = (bitField0_ & ~0x00000010);
839       currentPage_ = null;
840       if (currentPageBuilder_ != null) {
841         currentPageBuilder_.dispose();
842         currentPageBuilder_ = null;
843       }
844       queryCase_ = 0;
845       query_ = null;
846       return this;
847     }
848 
849     @java.lang.Override
getDescriptorForType()850     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
851       return com.google.cloud.dialogflow.cx.v3beta1.SessionProto
852           .internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_descriptor;
853     }
854 
855     @java.lang.Override
getDefaultInstanceForType()856     public com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse getDefaultInstanceForType() {
857       return com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse.getDefaultInstance();
858     }
859 
860     @java.lang.Override
build()861     public com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse build() {
862       com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse result = buildPartial();
863       if (!result.isInitialized()) {
864         throw newUninitializedMessageException(result);
865       }
866       return result;
867     }
868 
869     @java.lang.Override
buildPartial()870     public com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse buildPartial() {
871       com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse result =
872           new com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse(this);
873       buildPartialRepeatedFields(result);
874       if (bitField0_ != 0) {
875         buildPartial0(result);
876       }
877       buildPartialOneofs(result);
878       onBuilt();
879       return result;
880     }
881 
buildPartialRepeatedFields( com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse result)882     private void buildPartialRepeatedFields(
883         com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse result) {
884       if (matchesBuilder_ == null) {
885         if (((bitField0_ & 0x00000010) != 0)) {
886           matches_ = java.util.Collections.unmodifiableList(matches_);
887           bitField0_ = (bitField0_ & ~0x00000010);
888         }
889         result.matches_ = matches_;
890       } else {
891         result.matches_ = matchesBuilder_.build();
892       }
893     }
894 
buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse result)895     private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse result) {
896       int from_bitField0_ = bitField0_;
897       if (((from_bitField0_ & 0x00000020) != 0)) {
898         result.currentPage_ =
899             currentPageBuilder_ == null ? currentPage_ : currentPageBuilder_.build();
900       }
901     }
902 
buildPartialOneofs( com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse result)903     private void buildPartialOneofs(
904         com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse result) {
905       result.queryCase_ = queryCase_;
906       result.query_ = this.query_;
907     }
908 
909     @java.lang.Override
clone()910     public Builder clone() {
911       return super.clone();
912     }
913 
914     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)915     public Builder setField(
916         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
917       return super.setField(field, value);
918     }
919 
920     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)921     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
922       return super.clearField(field);
923     }
924 
925     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)926     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
927       return super.clearOneof(oneof);
928     }
929 
930     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)931     public Builder setRepeatedField(
932         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
933       return super.setRepeatedField(field, index, value);
934     }
935 
936     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)937     public Builder addRepeatedField(
938         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
939       return super.addRepeatedField(field, value);
940     }
941 
942     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)943     public Builder mergeFrom(com.google.protobuf.Message other) {
944       if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse) {
945         return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse) other);
946       } else {
947         super.mergeFrom(other);
948         return this;
949       }
950     }
951 
mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse other)952     public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse other) {
953       if (other == com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse.getDefaultInstance())
954         return this;
955       if (matchesBuilder_ == null) {
956         if (!other.matches_.isEmpty()) {
957           if (matches_.isEmpty()) {
958             matches_ = other.matches_;
959             bitField0_ = (bitField0_ & ~0x00000010);
960           } else {
961             ensureMatchesIsMutable();
962             matches_.addAll(other.matches_);
963           }
964           onChanged();
965         }
966       } else {
967         if (!other.matches_.isEmpty()) {
968           if (matchesBuilder_.isEmpty()) {
969             matchesBuilder_.dispose();
970             matchesBuilder_ = null;
971             matches_ = other.matches_;
972             bitField0_ = (bitField0_ & ~0x00000010);
973             matchesBuilder_ =
974                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
975                     ? getMatchesFieldBuilder()
976                     : null;
977           } else {
978             matchesBuilder_.addAllMessages(other.matches_);
979           }
980         }
981       }
982       if (other.hasCurrentPage()) {
983         mergeCurrentPage(other.getCurrentPage());
984       }
985       switch (other.getQueryCase()) {
986         case TEXT:
987           {
988             queryCase_ = 1;
989             query_ = other.query_;
990             onChanged();
991             break;
992           }
993         case TRIGGER_INTENT:
994           {
995             queryCase_ = 2;
996             query_ = other.query_;
997             onChanged();
998             break;
999           }
1000         case TRANSCRIPT:
1001           {
1002             queryCase_ = 3;
1003             query_ = other.query_;
1004             onChanged();
1005             break;
1006           }
1007         case TRIGGER_EVENT:
1008           {
1009             queryCase_ = 6;
1010             query_ = other.query_;
1011             onChanged();
1012             break;
1013           }
1014         case QUERY_NOT_SET:
1015           {
1016             break;
1017           }
1018       }
1019       this.mergeUnknownFields(other.getUnknownFields());
1020       onChanged();
1021       return this;
1022     }
1023 
1024     @java.lang.Override
isInitialized()1025     public final boolean isInitialized() {
1026       return true;
1027     }
1028 
1029     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1030     public Builder mergeFrom(
1031         com.google.protobuf.CodedInputStream input,
1032         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1033         throws java.io.IOException {
1034       if (extensionRegistry == null) {
1035         throw new java.lang.NullPointerException();
1036       }
1037       try {
1038         boolean done = false;
1039         while (!done) {
1040           int tag = input.readTag();
1041           switch (tag) {
1042             case 0:
1043               done = true;
1044               break;
1045             case 10:
1046               {
1047                 java.lang.String s = input.readStringRequireUtf8();
1048                 queryCase_ = 1;
1049                 query_ = s;
1050                 break;
1051               } // case 10
1052             case 18:
1053               {
1054                 java.lang.String s = input.readStringRequireUtf8();
1055                 queryCase_ = 2;
1056                 query_ = s;
1057                 break;
1058               } // case 18
1059             case 26:
1060               {
1061                 java.lang.String s = input.readStringRequireUtf8();
1062                 queryCase_ = 3;
1063                 query_ = s;
1064                 break;
1065               } // case 26
1066             case 34:
1067               {
1068                 com.google.cloud.dialogflow.cx.v3beta1.Match m =
1069                     input.readMessage(
1070                         com.google.cloud.dialogflow.cx.v3beta1.Match.parser(), extensionRegistry);
1071                 if (matchesBuilder_ == null) {
1072                   ensureMatchesIsMutable();
1073                   matches_.add(m);
1074                 } else {
1075                   matchesBuilder_.addMessage(m);
1076                 }
1077                 break;
1078               } // case 34
1079             case 42:
1080               {
1081                 input.readMessage(getCurrentPageFieldBuilder().getBuilder(), extensionRegistry);
1082                 bitField0_ |= 0x00000020;
1083                 break;
1084               } // case 42
1085             case 50:
1086               {
1087                 java.lang.String s = input.readStringRequireUtf8();
1088                 queryCase_ = 6;
1089                 query_ = s;
1090                 break;
1091               } // case 50
1092             default:
1093               {
1094                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1095                   done = true; // was an endgroup tag
1096                 }
1097                 break;
1098               } // default:
1099           } // switch (tag)
1100         } // while (!done)
1101       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1102         throw e.unwrapIOException();
1103       } finally {
1104         onChanged();
1105       } // finally
1106       return this;
1107     }
1108 
1109     private int queryCase_ = 0;
1110     private java.lang.Object query_;
1111 
getQueryCase()1112     public QueryCase getQueryCase() {
1113       return QueryCase.forNumber(queryCase_);
1114     }
1115 
clearQuery()1116     public Builder clearQuery() {
1117       queryCase_ = 0;
1118       query_ = null;
1119       onChanged();
1120       return this;
1121     }
1122 
1123     private int bitField0_;
1124 
1125     /**
1126      *
1127      *
1128      * <pre>
1129      * If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
1130      * was provided as input, this field will contain a copy of the text.
1131      * </pre>
1132      *
1133      * <code>string text = 1;</code>
1134      *
1135      * @return Whether the text field is set.
1136      */
1137     @java.lang.Override
hasText()1138     public boolean hasText() {
1139       return queryCase_ == 1;
1140     }
1141     /**
1142      *
1143      *
1144      * <pre>
1145      * If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
1146      * was provided as input, this field will contain a copy of the text.
1147      * </pre>
1148      *
1149      * <code>string text = 1;</code>
1150      *
1151      * @return The text.
1152      */
1153     @java.lang.Override
getText()1154     public java.lang.String getText() {
1155       java.lang.Object ref = "";
1156       if (queryCase_ == 1) {
1157         ref = query_;
1158       }
1159       if (!(ref instanceof java.lang.String)) {
1160         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1161         java.lang.String s = bs.toStringUtf8();
1162         if (queryCase_ == 1) {
1163           query_ = s;
1164         }
1165         return s;
1166       } else {
1167         return (java.lang.String) ref;
1168       }
1169     }
1170     /**
1171      *
1172      *
1173      * <pre>
1174      * If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
1175      * was provided as input, this field will contain a copy of the text.
1176      * </pre>
1177      *
1178      * <code>string text = 1;</code>
1179      *
1180      * @return The bytes for text.
1181      */
1182     @java.lang.Override
getTextBytes()1183     public com.google.protobuf.ByteString getTextBytes() {
1184       java.lang.Object ref = "";
1185       if (queryCase_ == 1) {
1186         ref = query_;
1187       }
1188       if (ref instanceof String) {
1189         com.google.protobuf.ByteString b =
1190             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1191         if (queryCase_ == 1) {
1192           query_ = b;
1193         }
1194         return b;
1195       } else {
1196         return (com.google.protobuf.ByteString) ref;
1197       }
1198     }
1199     /**
1200      *
1201      *
1202      * <pre>
1203      * If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
1204      * was provided as input, this field will contain a copy of the text.
1205      * </pre>
1206      *
1207      * <code>string text = 1;</code>
1208      *
1209      * @param value The text to set.
1210      * @return This builder for chaining.
1211      */
setText(java.lang.String value)1212     public Builder setText(java.lang.String value) {
1213       if (value == null) {
1214         throw new NullPointerException();
1215       }
1216       queryCase_ = 1;
1217       query_ = value;
1218       onChanged();
1219       return this;
1220     }
1221     /**
1222      *
1223      *
1224      * <pre>
1225      * If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
1226      * was provided as input, this field will contain a copy of the text.
1227      * </pre>
1228      *
1229      * <code>string text = 1;</code>
1230      *
1231      * @return This builder for chaining.
1232      */
clearText()1233     public Builder clearText() {
1234       if (queryCase_ == 1) {
1235         queryCase_ = 0;
1236         query_ = null;
1237         onChanged();
1238       }
1239       return this;
1240     }
1241     /**
1242      *
1243      *
1244      * <pre>
1245      * If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
1246      * was provided as input, this field will contain a copy of the text.
1247      * </pre>
1248      *
1249      * <code>string text = 1;</code>
1250      *
1251      * @param value The bytes for text to set.
1252      * @return This builder for chaining.
1253      */
setTextBytes(com.google.protobuf.ByteString value)1254     public Builder setTextBytes(com.google.protobuf.ByteString value) {
1255       if (value == null) {
1256         throw new NullPointerException();
1257       }
1258       checkByteStringIsUtf8(value);
1259       queryCase_ = 1;
1260       query_ = value;
1261       onChanged();
1262       return this;
1263     }
1264 
1265     /**
1266      *
1267      *
1268      * <pre>
1269      * If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
1270      * provided as input, this field will contain a copy of the intent
1271      * identifier. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
1272      * ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;`.
1273      * </pre>
1274      *
1275      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1276      *
1277      * @return Whether the triggerIntent field is set.
1278      */
1279     @java.lang.Override
hasTriggerIntent()1280     public boolean hasTriggerIntent() {
1281       return queryCase_ == 2;
1282     }
1283     /**
1284      *
1285      *
1286      * <pre>
1287      * If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
1288      * provided as input, this field will contain a copy of the intent
1289      * identifier. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
1290      * ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;`.
1291      * </pre>
1292      *
1293      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1294      *
1295      * @return The triggerIntent.
1296      */
1297     @java.lang.Override
getTriggerIntent()1298     public java.lang.String getTriggerIntent() {
1299       java.lang.Object ref = "";
1300       if (queryCase_ == 2) {
1301         ref = query_;
1302       }
1303       if (!(ref instanceof java.lang.String)) {
1304         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1305         java.lang.String s = bs.toStringUtf8();
1306         if (queryCase_ == 2) {
1307           query_ = s;
1308         }
1309         return s;
1310       } else {
1311         return (java.lang.String) ref;
1312       }
1313     }
1314     /**
1315      *
1316      *
1317      * <pre>
1318      * If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
1319      * provided as input, this field will contain a copy of the intent
1320      * identifier. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
1321      * ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;`.
1322      * </pre>
1323      *
1324      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1325      *
1326      * @return The bytes for triggerIntent.
1327      */
1328     @java.lang.Override
getTriggerIntentBytes()1329     public com.google.protobuf.ByteString getTriggerIntentBytes() {
1330       java.lang.Object ref = "";
1331       if (queryCase_ == 2) {
1332         ref = query_;
1333       }
1334       if (ref instanceof String) {
1335         com.google.protobuf.ByteString b =
1336             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1337         if (queryCase_ == 2) {
1338           query_ = b;
1339         }
1340         return b;
1341       } else {
1342         return (com.google.protobuf.ByteString) ref;
1343       }
1344     }
1345     /**
1346      *
1347      *
1348      * <pre>
1349      * If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
1350      * provided as input, this field will contain a copy of the intent
1351      * identifier. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
1352      * ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;`.
1353      * </pre>
1354      *
1355      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1356      *
1357      * @param value The triggerIntent to set.
1358      * @return This builder for chaining.
1359      */
setTriggerIntent(java.lang.String value)1360     public Builder setTriggerIntent(java.lang.String value) {
1361       if (value == null) {
1362         throw new NullPointerException();
1363       }
1364       queryCase_ = 2;
1365       query_ = value;
1366       onChanged();
1367       return this;
1368     }
1369     /**
1370      *
1371      *
1372      * <pre>
1373      * If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
1374      * provided as input, this field will contain a copy of the intent
1375      * identifier. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
1376      * ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;`.
1377      * </pre>
1378      *
1379      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1380      *
1381      * @return This builder for chaining.
1382      */
clearTriggerIntent()1383     public Builder clearTriggerIntent() {
1384       if (queryCase_ == 2) {
1385         queryCase_ = 0;
1386         query_ = null;
1387         onChanged();
1388       }
1389       return this;
1390     }
1391     /**
1392      *
1393      *
1394      * <pre>
1395      * If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
1396      * provided as input, this field will contain a copy of the intent
1397      * identifier. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location
1398      * ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;`.
1399      * </pre>
1400      *
1401      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1402      *
1403      * @param value The bytes for triggerIntent to set.
1404      * @return This builder for chaining.
1405      */
setTriggerIntentBytes(com.google.protobuf.ByteString value)1406     public Builder setTriggerIntentBytes(com.google.protobuf.ByteString value) {
1407       if (value == null) {
1408         throw new NullPointerException();
1409       }
1410       checkByteStringIsUtf8(value);
1411       queryCase_ = 2;
1412       query_ = value;
1413       onChanged();
1414       return this;
1415     }
1416 
1417     /**
1418      *
1419      *
1420      * <pre>
1421      * If [natural language speech
1422      * audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
1423      * input, this field will contain the transcript for the audio.
1424      * </pre>
1425      *
1426      * <code>string transcript = 3;</code>
1427      *
1428      * @return Whether the transcript field is set.
1429      */
1430     @java.lang.Override
hasTranscript()1431     public boolean hasTranscript() {
1432       return queryCase_ == 3;
1433     }
1434     /**
1435      *
1436      *
1437      * <pre>
1438      * If [natural language speech
1439      * audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
1440      * input, this field will contain the transcript for the audio.
1441      * </pre>
1442      *
1443      * <code>string transcript = 3;</code>
1444      *
1445      * @return The transcript.
1446      */
1447     @java.lang.Override
getTranscript()1448     public java.lang.String getTranscript() {
1449       java.lang.Object ref = "";
1450       if (queryCase_ == 3) {
1451         ref = query_;
1452       }
1453       if (!(ref instanceof java.lang.String)) {
1454         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1455         java.lang.String s = bs.toStringUtf8();
1456         if (queryCase_ == 3) {
1457           query_ = s;
1458         }
1459         return s;
1460       } else {
1461         return (java.lang.String) ref;
1462       }
1463     }
1464     /**
1465      *
1466      *
1467      * <pre>
1468      * If [natural language speech
1469      * audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
1470      * input, this field will contain the transcript for the audio.
1471      * </pre>
1472      *
1473      * <code>string transcript = 3;</code>
1474      *
1475      * @return The bytes for transcript.
1476      */
1477     @java.lang.Override
getTranscriptBytes()1478     public com.google.protobuf.ByteString getTranscriptBytes() {
1479       java.lang.Object ref = "";
1480       if (queryCase_ == 3) {
1481         ref = query_;
1482       }
1483       if (ref instanceof String) {
1484         com.google.protobuf.ByteString b =
1485             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1486         if (queryCase_ == 3) {
1487           query_ = b;
1488         }
1489         return b;
1490       } else {
1491         return (com.google.protobuf.ByteString) ref;
1492       }
1493     }
1494     /**
1495      *
1496      *
1497      * <pre>
1498      * If [natural language speech
1499      * audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
1500      * input, this field will contain the transcript for the audio.
1501      * </pre>
1502      *
1503      * <code>string transcript = 3;</code>
1504      *
1505      * @param value The transcript to set.
1506      * @return This builder for chaining.
1507      */
setTranscript(java.lang.String value)1508     public Builder setTranscript(java.lang.String value) {
1509       if (value == null) {
1510         throw new NullPointerException();
1511       }
1512       queryCase_ = 3;
1513       query_ = value;
1514       onChanged();
1515       return this;
1516     }
1517     /**
1518      *
1519      *
1520      * <pre>
1521      * If [natural language speech
1522      * audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
1523      * input, this field will contain the transcript for the audio.
1524      * </pre>
1525      *
1526      * <code>string transcript = 3;</code>
1527      *
1528      * @return This builder for chaining.
1529      */
clearTranscript()1530     public Builder clearTranscript() {
1531       if (queryCase_ == 3) {
1532         queryCase_ = 0;
1533         query_ = null;
1534         onChanged();
1535       }
1536       return this;
1537     }
1538     /**
1539      *
1540      *
1541      * <pre>
1542      * If [natural language speech
1543      * audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
1544      * input, this field will contain the transcript for the audio.
1545      * </pre>
1546      *
1547      * <code>string transcript = 3;</code>
1548      *
1549      * @param value The bytes for transcript to set.
1550      * @return This builder for chaining.
1551      */
setTranscriptBytes(com.google.protobuf.ByteString value)1552     public Builder setTranscriptBytes(com.google.protobuf.ByteString value) {
1553       if (value == null) {
1554         throw new NullPointerException();
1555       }
1556       checkByteStringIsUtf8(value);
1557       queryCase_ = 3;
1558       query_ = value;
1559       onChanged();
1560       return this;
1561     }
1562 
1563     /**
1564      *
1565      *
1566      * <pre>
1567      * If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
1568      * as input, this field will contain a copy of the event name.
1569      * </pre>
1570      *
1571      * <code>string trigger_event = 6;</code>
1572      *
1573      * @return Whether the triggerEvent field is set.
1574      */
1575     @java.lang.Override
hasTriggerEvent()1576     public boolean hasTriggerEvent() {
1577       return queryCase_ == 6;
1578     }
1579     /**
1580      *
1581      *
1582      * <pre>
1583      * If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
1584      * as input, this field will contain a copy of the event name.
1585      * </pre>
1586      *
1587      * <code>string trigger_event = 6;</code>
1588      *
1589      * @return The triggerEvent.
1590      */
1591     @java.lang.Override
getTriggerEvent()1592     public java.lang.String getTriggerEvent() {
1593       java.lang.Object ref = "";
1594       if (queryCase_ == 6) {
1595         ref = query_;
1596       }
1597       if (!(ref instanceof java.lang.String)) {
1598         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1599         java.lang.String s = bs.toStringUtf8();
1600         if (queryCase_ == 6) {
1601           query_ = s;
1602         }
1603         return s;
1604       } else {
1605         return (java.lang.String) ref;
1606       }
1607     }
1608     /**
1609      *
1610      *
1611      * <pre>
1612      * If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
1613      * as input, this field will contain a copy of the event name.
1614      * </pre>
1615      *
1616      * <code>string trigger_event = 6;</code>
1617      *
1618      * @return The bytes for triggerEvent.
1619      */
1620     @java.lang.Override
getTriggerEventBytes()1621     public com.google.protobuf.ByteString getTriggerEventBytes() {
1622       java.lang.Object ref = "";
1623       if (queryCase_ == 6) {
1624         ref = query_;
1625       }
1626       if (ref instanceof String) {
1627         com.google.protobuf.ByteString b =
1628             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1629         if (queryCase_ == 6) {
1630           query_ = b;
1631         }
1632         return b;
1633       } else {
1634         return (com.google.protobuf.ByteString) ref;
1635       }
1636     }
1637     /**
1638      *
1639      *
1640      * <pre>
1641      * If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
1642      * as input, this field will contain a copy of the event name.
1643      * </pre>
1644      *
1645      * <code>string trigger_event = 6;</code>
1646      *
1647      * @param value The triggerEvent to set.
1648      * @return This builder for chaining.
1649      */
setTriggerEvent(java.lang.String value)1650     public Builder setTriggerEvent(java.lang.String value) {
1651       if (value == null) {
1652         throw new NullPointerException();
1653       }
1654       queryCase_ = 6;
1655       query_ = value;
1656       onChanged();
1657       return this;
1658     }
1659     /**
1660      *
1661      *
1662      * <pre>
1663      * If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
1664      * as input, this field will contain a copy of the event name.
1665      * </pre>
1666      *
1667      * <code>string trigger_event = 6;</code>
1668      *
1669      * @return This builder for chaining.
1670      */
clearTriggerEvent()1671     public Builder clearTriggerEvent() {
1672       if (queryCase_ == 6) {
1673         queryCase_ = 0;
1674         query_ = null;
1675         onChanged();
1676       }
1677       return this;
1678     }
1679     /**
1680      *
1681      *
1682      * <pre>
1683      * If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
1684      * as input, this field will contain a copy of the event name.
1685      * </pre>
1686      *
1687      * <code>string trigger_event = 6;</code>
1688      *
1689      * @param value The bytes for triggerEvent to set.
1690      * @return This builder for chaining.
1691      */
setTriggerEventBytes(com.google.protobuf.ByteString value)1692     public Builder setTriggerEventBytes(com.google.protobuf.ByteString value) {
1693       if (value == null) {
1694         throw new NullPointerException();
1695       }
1696       checkByteStringIsUtf8(value);
1697       queryCase_ = 6;
1698       query_ = value;
1699       onChanged();
1700       return this;
1701     }
1702 
1703     private java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Match> matches_ =
1704         java.util.Collections.emptyList();
1705 
ensureMatchesIsMutable()1706     private void ensureMatchesIsMutable() {
1707       if (!((bitField0_ & 0x00000010) != 0)) {
1708         matches_ = new java.util.ArrayList<com.google.cloud.dialogflow.cx.v3beta1.Match>(matches_);
1709         bitField0_ |= 0x00000010;
1710       }
1711     }
1712 
1713     private com.google.protobuf.RepeatedFieldBuilderV3<
1714             com.google.cloud.dialogflow.cx.v3beta1.Match,
1715             com.google.cloud.dialogflow.cx.v3beta1.Match.Builder,
1716             com.google.cloud.dialogflow.cx.v3beta1.MatchOrBuilder>
1717         matchesBuilder_;
1718 
1719     /**
1720      *
1721      *
1722      * <pre>
1723      * Match results, if more than one, ordered descendingly by the confidence
1724      * we have that the particular intent matches the query.
1725      * </pre>
1726      *
1727      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1728      */
getMatchesList()1729     public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Match> getMatchesList() {
1730       if (matchesBuilder_ == null) {
1731         return java.util.Collections.unmodifiableList(matches_);
1732       } else {
1733         return matchesBuilder_.getMessageList();
1734       }
1735     }
1736     /**
1737      *
1738      *
1739      * <pre>
1740      * Match results, if more than one, ordered descendingly by the confidence
1741      * we have that the particular intent matches the query.
1742      * </pre>
1743      *
1744      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1745      */
getMatchesCount()1746     public int getMatchesCount() {
1747       if (matchesBuilder_ == null) {
1748         return matches_.size();
1749       } else {
1750         return matchesBuilder_.getCount();
1751       }
1752     }
1753     /**
1754      *
1755      *
1756      * <pre>
1757      * Match results, if more than one, ordered descendingly by the confidence
1758      * we have that the particular intent matches the query.
1759      * </pre>
1760      *
1761      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1762      */
getMatches(int index)1763     public com.google.cloud.dialogflow.cx.v3beta1.Match getMatches(int index) {
1764       if (matchesBuilder_ == null) {
1765         return matches_.get(index);
1766       } else {
1767         return matchesBuilder_.getMessage(index);
1768       }
1769     }
1770     /**
1771      *
1772      *
1773      * <pre>
1774      * Match results, if more than one, ordered descendingly by the confidence
1775      * we have that the particular intent matches the query.
1776      * </pre>
1777      *
1778      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1779      */
setMatches(int index, com.google.cloud.dialogflow.cx.v3beta1.Match value)1780     public Builder setMatches(int index, com.google.cloud.dialogflow.cx.v3beta1.Match value) {
1781       if (matchesBuilder_ == null) {
1782         if (value == null) {
1783           throw new NullPointerException();
1784         }
1785         ensureMatchesIsMutable();
1786         matches_.set(index, value);
1787         onChanged();
1788       } else {
1789         matchesBuilder_.setMessage(index, value);
1790       }
1791       return this;
1792     }
1793     /**
1794      *
1795      *
1796      * <pre>
1797      * Match results, if more than one, ordered descendingly by the confidence
1798      * we have that the particular intent matches the query.
1799      * </pre>
1800      *
1801      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1802      */
setMatches( int index, com.google.cloud.dialogflow.cx.v3beta1.Match.Builder builderForValue)1803     public Builder setMatches(
1804         int index, com.google.cloud.dialogflow.cx.v3beta1.Match.Builder builderForValue) {
1805       if (matchesBuilder_ == null) {
1806         ensureMatchesIsMutable();
1807         matches_.set(index, builderForValue.build());
1808         onChanged();
1809       } else {
1810         matchesBuilder_.setMessage(index, builderForValue.build());
1811       }
1812       return this;
1813     }
1814     /**
1815      *
1816      *
1817      * <pre>
1818      * Match results, if more than one, ordered descendingly by the confidence
1819      * we have that the particular intent matches the query.
1820      * </pre>
1821      *
1822      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1823      */
addMatches(com.google.cloud.dialogflow.cx.v3beta1.Match value)1824     public Builder addMatches(com.google.cloud.dialogflow.cx.v3beta1.Match value) {
1825       if (matchesBuilder_ == null) {
1826         if (value == null) {
1827           throw new NullPointerException();
1828         }
1829         ensureMatchesIsMutable();
1830         matches_.add(value);
1831         onChanged();
1832       } else {
1833         matchesBuilder_.addMessage(value);
1834       }
1835       return this;
1836     }
1837     /**
1838      *
1839      *
1840      * <pre>
1841      * Match results, if more than one, ordered descendingly by the confidence
1842      * we have that the particular intent matches the query.
1843      * </pre>
1844      *
1845      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1846      */
addMatches(int index, com.google.cloud.dialogflow.cx.v3beta1.Match value)1847     public Builder addMatches(int index, com.google.cloud.dialogflow.cx.v3beta1.Match value) {
1848       if (matchesBuilder_ == null) {
1849         if (value == null) {
1850           throw new NullPointerException();
1851         }
1852         ensureMatchesIsMutable();
1853         matches_.add(index, value);
1854         onChanged();
1855       } else {
1856         matchesBuilder_.addMessage(index, value);
1857       }
1858       return this;
1859     }
1860     /**
1861      *
1862      *
1863      * <pre>
1864      * Match results, if more than one, ordered descendingly by the confidence
1865      * we have that the particular intent matches the query.
1866      * </pre>
1867      *
1868      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1869      */
addMatches( com.google.cloud.dialogflow.cx.v3beta1.Match.Builder builderForValue)1870     public Builder addMatches(
1871         com.google.cloud.dialogflow.cx.v3beta1.Match.Builder builderForValue) {
1872       if (matchesBuilder_ == null) {
1873         ensureMatchesIsMutable();
1874         matches_.add(builderForValue.build());
1875         onChanged();
1876       } else {
1877         matchesBuilder_.addMessage(builderForValue.build());
1878       }
1879       return this;
1880     }
1881     /**
1882      *
1883      *
1884      * <pre>
1885      * Match results, if more than one, ordered descendingly by the confidence
1886      * we have that the particular intent matches the query.
1887      * </pre>
1888      *
1889      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1890      */
addMatches( int index, com.google.cloud.dialogflow.cx.v3beta1.Match.Builder builderForValue)1891     public Builder addMatches(
1892         int index, com.google.cloud.dialogflow.cx.v3beta1.Match.Builder builderForValue) {
1893       if (matchesBuilder_ == null) {
1894         ensureMatchesIsMutable();
1895         matches_.add(index, builderForValue.build());
1896         onChanged();
1897       } else {
1898         matchesBuilder_.addMessage(index, builderForValue.build());
1899       }
1900       return this;
1901     }
1902     /**
1903      *
1904      *
1905      * <pre>
1906      * Match results, if more than one, ordered descendingly by the confidence
1907      * we have that the particular intent matches the query.
1908      * </pre>
1909      *
1910      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1911      */
addAllMatches( java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3beta1.Match> values)1912     public Builder addAllMatches(
1913         java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3beta1.Match> values) {
1914       if (matchesBuilder_ == null) {
1915         ensureMatchesIsMutable();
1916         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, matches_);
1917         onChanged();
1918       } else {
1919         matchesBuilder_.addAllMessages(values);
1920       }
1921       return this;
1922     }
1923     /**
1924      *
1925      *
1926      * <pre>
1927      * Match results, if more than one, ordered descendingly by the confidence
1928      * we have that the particular intent matches the query.
1929      * </pre>
1930      *
1931      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1932      */
clearMatches()1933     public Builder clearMatches() {
1934       if (matchesBuilder_ == null) {
1935         matches_ = java.util.Collections.emptyList();
1936         bitField0_ = (bitField0_ & ~0x00000010);
1937         onChanged();
1938       } else {
1939         matchesBuilder_.clear();
1940       }
1941       return this;
1942     }
1943     /**
1944      *
1945      *
1946      * <pre>
1947      * Match results, if more than one, ordered descendingly by the confidence
1948      * we have that the particular intent matches the query.
1949      * </pre>
1950      *
1951      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1952      */
removeMatches(int index)1953     public Builder removeMatches(int index) {
1954       if (matchesBuilder_ == null) {
1955         ensureMatchesIsMutable();
1956         matches_.remove(index);
1957         onChanged();
1958       } else {
1959         matchesBuilder_.remove(index);
1960       }
1961       return this;
1962     }
1963     /**
1964      *
1965      *
1966      * <pre>
1967      * Match results, if more than one, ordered descendingly by the confidence
1968      * we have that the particular intent matches the query.
1969      * </pre>
1970      *
1971      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1972      */
getMatchesBuilder(int index)1973     public com.google.cloud.dialogflow.cx.v3beta1.Match.Builder getMatchesBuilder(int index) {
1974       return getMatchesFieldBuilder().getBuilder(index);
1975     }
1976     /**
1977      *
1978      *
1979      * <pre>
1980      * Match results, if more than one, ordered descendingly by the confidence
1981      * we have that the particular intent matches the query.
1982      * </pre>
1983      *
1984      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
1985      */
getMatchesOrBuilder(int index)1986     public com.google.cloud.dialogflow.cx.v3beta1.MatchOrBuilder getMatchesOrBuilder(int index) {
1987       if (matchesBuilder_ == null) {
1988         return matches_.get(index);
1989       } else {
1990         return matchesBuilder_.getMessageOrBuilder(index);
1991       }
1992     }
1993     /**
1994      *
1995      *
1996      * <pre>
1997      * Match results, if more than one, ordered descendingly by the confidence
1998      * we have that the particular intent matches the query.
1999      * </pre>
2000      *
2001      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
2002      */
2003     public java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.MatchOrBuilder>
getMatchesOrBuilderList()2004         getMatchesOrBuilderList() {
2005       if (matchesBuilder_ != null) {
2006         return matchesBuilder_.getMessageOrBuilderList();
2007       } else {
2008         return java.util.Collections.unmodifiableList(matches_);
2009       }
2010     }
2011     /**
2012      *
2013      *
2014      * <pre>
2015      * Match results, if more than one, ordered descendingly by the confidence
2016      * we have that the particular intent matches the query.
2017      * </pre>
2018      *
2019      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
2020      */
addMatchesBuilder()2021     public com.google.cloud.dialogflow.cx.v3beta1.Match.Builder addMatchesBuilder() {
2022       return getMatchesFieldBuilder()
2023           .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Match.getDefaultInstance());
2024     }
2025     /**
2026      *
2027      *
2028      * <pre>
2029      * Match results, if more than one, ordered descendingly by the confidence
2030      * we have that the particular intent matches the query.
2031      * </pre>
2032      *
2033      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
2034      */
addMatchesBuilder(int index)2035     public com.google.cloud.dialogflow.cx.v3beta1.Match.Builder addMatchesBuilder(int index) {
2036       return getMatchesFieldBuilder()
2037           .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.Match.getDefaultInstance());
2038     }
2039     /**
2040      *
2041      *
2042      * <pre>
2043      * Match results, if more than one, ordered descendingly by the confidence
2044      * we have that the particular intent matches the query.
2045      * </pre>
2046      *
2047      * <code>repeated .google.cloud.dialogflow.cx.v3beta1.Match matches = 4;</code>
2048      */
2049     public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Match.Builder>
getMatchesBuilderList()2050         getMatchesBuilderList() {
2051       return getMatchesFieldBuilder().getBuilderList();
2052     }
2053 
2054     private com.google.protobuf.RepeatedFieldBuilderV3<
2055             com.google.cloud.dialogflow.cx.v3beta1.Match,
2056             com.google.cloud.dialogflow.cx.v3beta1.Match.Builder,
2057             com.google.cloud.dialogflow.cx.v3beta1.MatchOrBuilder>
getMatchesFieldBuilder()2058         getMatchesFieldBuilder() {
2059       if (matchesBuilder_ == null) {
2060         matchesBuilder_ =
2061             new com.google.protobuf.RepeatedFieldBuilderV3<
2062                 com.google.cloud.dialogflow.cx.v3beta1.Match,
2063                 com.google.cloud.dialogflow.cx.v3beta1.Match.Builder,
2064                 com.google.cloud.dialogflow.cx.v3beta1.MatchOrBuilder>(
2065                 matches_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean());
2066         matches_ = null;
2067       }
2068       return matchesBuilder_;
2069     }
2070 
2071     private com.google.cloud.dialogflow.cx.v3beta1.Page currentPage_;
2072     private com.google.protobuf.SingleFieldBuilderV3<
2073             com.google.cloud.dialogflow.cx.v3beta1.Page,
2074             com.google.cloud.dialogflow.cx.v3beta1.Page.Builder,
2075             com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder>
2076         currentPageBuilder_;
2077     /**
2078      *
2079      *
2080      * <pre>
2081      * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
2082      * fields are filled in this message, including but not limited to `name` and
2083      * `display_name`.
2084      * </pre>
2085      *
2086      * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
2087      *
2088      * @return Whether the currentPage field is set.
2089      */
hasCurrentPage()2090     public boolean hasCurrentPage() {
2091       return ((bitField0_ & 0x00000020) != 0);
2092     }
2093     /**
2094      *
2095      *
2096      * <pre>
2097      * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
2098      * fields are filled in this message, including but not limited to `name` and
2099      * `display_name`.
2100      * </pre>
2101      *
2102      * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
2103      *
2104      * @return The currentPage.
2105      */
getCurrentPage()2106     public com.google.cloud.dialogflow.cx.v3beta1.Page getCurrentPage() {
2107       if (currentPageBuilder_ == null) {
2108         return currentPage_ == null
2109             ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance()
2110             : currentPage_;
2111       } else {
2112         return currentPageBuilder_.getMessage();
2113       }
2114     }
2115     /**
2116      *
2117      *
2118      * <pre>
2119      * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
2120      * fields are filled in this message, including but not limited to `name` and
2121      * `display_name`.
2122      * </pre>
2123      *
2124      * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
2125      */
setCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value)2126     public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) {
2127       if (currentPageBuilder_ == null) {
2128         if (value == null) {
2129           throw new NullPointerException();
2130         }
2131         currentPage_ = value;
2132       } else {
2133         currentPageBuilder_.setMessage(value);
2134       }
2135       bitField0_ |= 0x00000020;
2136       onChanged();
2137       return this;
2138     }
2139     /**
2140      *
2141      *
2142      * <pre>
2143      * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
2144      * fields are filled in this message, including but not limited to `name` and
2145      * `display_name`.
2146      * </pre>
2147      *
2148      * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
2149      */
setCurrentPage( com.google.cloud.dialogflow.cx.v3beta1.Page.Builder builderForValue)2150     public Builder setCurrentPage(
2151         com.google.cloud.dialogflow.cx.v3beta1.Page.Builder builderForValue) {
2152       if (currentPageBuilder_ == null) {
2153         currentPage_ = builderForValue.build();
2154       } else {
2155         currentPageBuilder_.setMessage(builderForValue.build());
2156       }
2157       bitField0_ |= 0x00000020;
2158       onChanged();
2159       return this;
2160     }
2161     /**
2162      *
2163      *
2164      * <pre>
2165      * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
2166      * fields are filled in this message, including but not limited to `name` and
2167      * `display_name`.
2168      * </pre>
2169      *
2170      * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
2171      */
mergeCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value)2172     public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) {
2173       if (currentPageBuilder_ == null) {
2174         if (((bitField0_ & 0x00000020) != 0)
2175             && currentPage_ != null
2176             && currentPage_ != com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance()) {
2177           getCurrentPageBuilder().mergeFrom(value);
2178         } else {
2179           currentPage_ = value;
2180         }
2181       } else {
2182         currentPageBuilder_.mergeFrom(value);
2183       }
2184       bitField0_ |= 0x00000020;
2185       onChanged();
2186       return this;
2187     }
2188     /**
2189      *
2190      *
2191      * <pre>
2192      * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
2193      * fields are filled in this message, including but not limited to `name` and
2194      * `display_name`.
2195      * </pre>
2196      *
2197      * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
2198      */
clearCurrentPage()2199     public Builder clearCurrentPage() {
2200       bitField0_ = (bitField0_ & ~0x00000020);
2201       currentPage_ = null;
2202       if (currentPageBuilder_ != null) {
2203         currentPageBuilder_.dispose();
2204         currentPageBuilder_ = null;
2205       }
2206       onChanged();
2207       return this;
2208     }
2209     /**
2210      *
2211      *
2212      * <pre>
2213      * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
2214      * fields are filled in this message, including but not limited to `name` and
2215      * `display_name`.
2216      * </pre>
2217      *
2218      * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
2219      */
getCurrentPageBuilder()2220     public com.google.cloud.dialogflow.cx.v3beta1.Page.Builder getCurrentPageBuilder() {
2221       bitField0_ |= 0x00000020;
2222       onChanged();
2223       return getCurrentPageFieldBuilder().getBuilder();
2224     }
2225     /**
2226      *
2227      *
2228      * <pre>
2229      * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
2230      * fields are filled in this message, including but not limited to `name` and
2231      * `display_name`.
2232      * </pre>
2233      *
2234      * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
2235      */
getCurrentPageOrBuilder()2236     public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuilder() {
2237       if (currentPageBuilder_ != null) {
2238         return currentPageBuilder_.getMessageOrBuilder();
2239       } else {
2240         return currentPage_ == null
2241             ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance()
2242             : currentPage_;
2243       }
2244     }
2245     /**
2246      *
2247      *
2248      * <pre>
2249      * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
2250      * fields are filled in this message, including but not limited to `name` and
2251      * `display_name`.
2252      * </pre>
2253      *
2254      * <code>.google.cloud.dialogflow.cx.v3beta1.Page current_page = 5;</code>
2255      */
2256     private com.google.protobuf.SingleFieldBuilderV3<
2257             com.google.cloud.dialogflow.cx.v3beta1.Page,
2258             com.google.cloud.dialogflow.cx.v3beta1.Page.Builder,
2259             com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder>
getCurrentPageFieldBuilder()2260         getCurrentPageFieldBuilder() {
2261       if (currentPageBuilder_ == null) {
2262         currentPageBuilder_ =
2263             new com.google.protobuf.SingleFieldBuilderV3<
2264                 com.google.cloud.dialogflow.cx.v3beta1.Page,
2265                 com.google.cloud.dialogflow.cx.v3beta1.Page.Builder,
2266                 com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder>(
2267                 getCurrentPage(), getParentForChildren(), isClean());
2268         currentPage_ = null;
2269       }
2270       return currentPageBuilder_;
2271     }
2272 
2273     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2274     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2275       return super.setUnknownFields(unknownFields);
2276     }
2277 
2278     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2279     public final Builder mergeUnknownFields(
2280         final com.google.protobuf.UnknownFieldSet unknownFields) {
2281       return super.mergeUnknownFields(unknownFields);
2282     }
2283 
2284     // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse)
2285   }
2286 
2287   // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse)
2288   private static final com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse DEFAULT_INSTANCE;
2289 
2290   static {
2291     DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse();
2292   }
2293 
getDefaultInstance()2294   public static com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse getDefaultInstance() {
2295     return DEFAULT_INSTANCE;
2296   }
2297 
2298   private static final com.google.protobuf.Parser<MatchIntentResponse> PARSER =
2299       new com.google.protobuf.AbstractParser<MatchIntentResponse>() {
2300         @java.lang.Override
2301         public MatchIntentResponse parsePartialFrom(
2302             com.google.protobuf.CodedInputStream input,
2303             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2304             throws com.google.protobuf.InvalidProtocolBufferException {
2305           Builder builder = newBuilder();
2306           try {
2307             builder.mergeFrom(input, extensionRegistry);
2308           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2309             throw e.setUnfinishedMessage(builder.buildPartial());
2310           } catch (com.google.protobuf.UninitializedMessageException e) {
2311             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2312           } catch (java.io.IOException e) {
2313             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2314                 .setUnfinishedMessage(builder.buildPartial());
2315           }
2316           return builder.buildPartial();
2317         }
2318       };
2319 
parser()2320   public static com.google.protobuf.Parser<MatchIntentResponse> parser() {
2321     return PARSER;
2322   }
2323 
2324   @java.lang.Override
getParserForType()2325   public com.google.protobuf.Parser<MatchIntentResponse> getParserForType() {
2326     return PARSER;
2327   }
2328 
2329   @java.lang.Override
getDefaultInstanceForType()2330   public com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse getDefaultInstanceForType() {
2331     return DEFAULT_INSTANCE;
2332   }
2333 }
2334