• 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/session.proto
18 
19 package com.google.cloud.dialogflow.cx.v3;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Response of [MatchIntent][].
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.dialogflow.cx.v3.MatchIntentResponse}
29  */
30 public final class MatchIntentResponse extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.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.v3.SessionProto
57         .internal_static_google_cloud_dialogflow_cx_v3_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.v3.SessionProto
64         .internal_static_google_cloud_dialogflow_cx_v3_MatchIntentResponse_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             com.google.cloud.dialogflow.cx.v3.MatchIntentResponse.class,
67             com.google.cloud.dialogflow.cx.v3.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.v3.TextInput] was
129    * 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.v3.TextInput] was
144    * 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.v3.TextInput] was
172    * 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.v3.IntentInput] was provided as
202    * input, this field will contain a copy of the intent identifier. Format:
203    * `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
204    * 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.v3.IntentInput] was provided as
219    * input, this field will contain a copy of the intent identifier. Format:
220    * `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
221    * 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.v3.IntentInput] was provided as
249    * input, this field will contain a copy of the intent identifier. Format:
250    * `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
251    * 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.v3.AudioInput] was provided as input,
282    * 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.v3.AudioInput] was provided as input,
298    * 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.v3.AudioInput] was provided as input,
327    * 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.v3.EventInput] was provided as
357    * 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.v3.EventInput] was provided as
372    * 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.v3.EventInput] was provided as
400    * 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.v3.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.v3.Match matches = 4;</code>
437    */
438   @java.lang.Override
getMatchesList()439   public java.util.List<com.google.cloud.dialogflow.cx.v3.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.v3.Match matches = 4;</code>
451    */
452   @java.lang.Override
453   public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.Match matches = 4;</code>
480    */
481   @java.lang.Override
getMatches(int index)482   public com.google.cloud.dialogflow.cx.v3.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.v3.Match matches = 4;</code>
494    */
495   @java.lang.Override
getMatchesOrBuilder(int index)496   public com.google.cloud.dialogflow.cx.v3.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.v3.Page currentPage_;
502   /**
503    *
504    *
505    * <pre>
506    * The current [Page][google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.Page current_page = 5;</code>
529    *
530    * @return The currentPage.
531    */
532   @java.lang.Override
getCurrentPage()533   public com.google.cloud.dialogflow.cx.v3.Page getCurrentPage() {
534     return currentPage_ == null
535         ? com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance()
536         : currentPage_;
537   }
538   /**
539    *
540    *
541    * <pre>
542    * The current [Page][google.cloud.dialogflow.cx.v3.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.v3.Page current_page = 5;</code>
548    */
549   @java.lang.Override
getCurrentPageOrBuilder()550   public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() {
551     return currentPage_ == null
552         ? com.google.cloud.dialogflow.cx.v3.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.v3.MatchIntentResponse)) {
626       return super.equals(obj);
627     }
628     com.google.cloud.dialogflow.cx.v3.MatchIntentResponse other =
629         (com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.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.v3.MatchIntentResponse prototype)778   public static Builder newBuilder(
779       com.google.cloud.dialogflow.cx.v3.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.v3.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.v3.MatchIntentResponse)
805       com.google.cloud.dialogflow.cx.v3.MatchIntentResponseOrBuilder {
getDescriptor()806     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
807       return com.google.cloud.dialogflow.cx.v3.SessionProto
808           .internal_static_google_cloud_dialogflow_cx_v3_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.v3.SessionProto
815           .internal_static_google_cloud_dialogflow_cx_v3_MatchIntentResponse_fieldAccessorTable
816           .ensureFieldAccessorsInitialized(
817               com.google.cloud.dialogflow.cx.v3.MatchIntentResponse.class,
818               com.google.cloud.dialogflow.cx.v3.MatchIntentResponse.Builder.class);
819     }
820 
821     // Construct using com.google.cloud.dialogflow.cx.v3.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.v3.SessionProto
852           .internal_static_google_cloud_dialogflow_cx_v3_MatchIntentResponse_descriptor;
853     }
854 
855     @java.lang.Override
getDefaultInstanceForType()856     public com.google.cloud.dialogflow.cx.v3.MatchIntentResponse getDefaultInstanceForType() {
857       return com.google.cloud.dialogflow.cx.v3.MatchIntentResponse.getDefaultInstance();
858     }
859 
860     @java.lang.Override
build()861     public com.google.cloud.dialogflow.cx.v3.MatchIntentResponse build() {
862       com.google.cloud.dialogflow.cx.v3.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.v3.MatchIntentResponse buildPartial() {
871       com.google.cloud.dialogflow.cx.v3.MatchIntentResponse result =
872           new com.google.cloud.dialogflow.cx.v3.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.v3.MatchIntentResponse result)882     private void buildPartialRepeatedFields(
883         com.google.cloud.dialogflow.cx.v3.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.v3.MatchIntentResponse result)895     private void buildPartial0(com.google.cloud.dialogflow.cx.v3.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.v3.MatchIntentResponse result)903     private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3.MatchIntentResponse result) {
904       result.queryCase_ = queryCase_;
905       result.query_ = this.query_;
906     }
907 
908     @java.lang.Override
clone()909     public Builder clone() {
910       return super.clone();
911     }
912 
913     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)914     public Builder setField(
915         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
916       return super.setField(field, value);
917     }
918 
919     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)920     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
921       return super.clearField(field);
922     }
923 
924     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)925     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
926       return super.clearOneof(oneof);
927     }
928 
929     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)930     public Builder setRepeatedField(
931         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
932       return super.setRepeatedField(field, index, value);
933     }
934 
935     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)936     public Builder addRepeatedField(
937         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
938       return super.addRepeatedField(field, value);
939     }
940 
941     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)942     public Builder mergeFrom(com.google.protobuf.Message other) {
943       if (other instanceof com.google.cloud.dialogflow.cx.v3.MatchIntentResponse) {
944         return mergeFrom((com.google.cloud.dialogflow.cx.v3.MatchIntentResponse) other);
945       } else {
946         super.mergeFrom(other);
947         return this;
948       }
949     }
950 
mergeFrom(com.google.cloud.dialogflow.cx.v3.MatchIntentResponse other)951     public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.MatchIntentResponse other) {
952       if (other == com.google.cloud.dialogflow.cx.v3.MatchIntentResponse.getDefaultInstance())
953         return this;
954       if (matchesBuilder_ == null) {
955         if (!other.matches_.isEmpty()) {
956           if (matches_.isEmpty()) {
957             matches_ = other.matches_;
958             bitField0_ = (bitField0_ & ~0x00000010);
959           } else {
960             ensureMatchesIsMutable();
961             matches_.addAll(other.matches_);
962           }
963           onChanged();
964         }
965       } else {
966         if (!other.matches_.isEmpty()) {
967           if (matchesBuilder_.isEmpty()) {
968             matchesBuilder_.dispose();
969             matchesBuilder_ = null;
970             matches_ = other.matches_;
971             bitField0_ = (bitField0_ & ~0x00000010);
972             matchesBuilder_ =
973                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
974                     ? getMatchesFieldBuilder()
975                     : null;
976           } else {
977             matchesBuilder_.addAllMessages(other.matches_);
978           }
979         }
980       }
981       if (other.hasCurrentPage()) {
982         mergeCurrentPage(other.getCurrentPage());
983       }
984       switch (other.getQueryCase()) {
985         case TEXT:
986           {
987             queryCase_ = 1;
988             query_ = other.query_;
989             onChanged();
990             break;
991           }
992         case TRIGGER_INTENT:
993           {
994             queryCase_ = 2;
995             query_ = other.query_;
996             onChanged();
997             break;
998           }
999         case TRANSCRIPT:
1000           {
1001             queryCase_ = 3;
1002             query_ = other.query_;
1003             onChanged();
1004             break;
1005           }
1006         case TRIGGER_EVENT:
1007           {
1008             queryCase_ = 6;
1009             query_ = other.query_;
1010             onChanged();
1011             break;
1012           }
1013         case QUERY_NOT_SET:
1014           {
1015             break;
1016           }
1017       }
1018       this.mergeUnknownFields(other.getUnknownFields());
1019       onChanged();
1020       return this;
1021     }
1022 
1023     @java.lang.Override
isInitialized()1024     public final boolean isInitialized() {
1025       return true;
1026     }
1027 
1028     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1029     public Builder mergeFrom(
1030         com.google.protobuf.CodedInputStream input,
1031         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1032         throws java.io.IOException {
1033       if (extensionRegistry == null) {
1034         throw new java.lang.NullPointerException();
1035       }
1036       try {
1037         boolean done = false;
1038         while (!done) {
1039           int tag = input.readTag();
1040           switch (tag) {
1041             case 0:
1042               done = true;
1043               break;
1044             case 10:
1045               {
1046                 java.lang.String s = input.readStringRequireUtf8();
1047                 queryCase_ = 1;
1048                 query_ = s;
1049                 break;
1050               } // case 10
1051             case 18:
1052               {
1053                 java.lang.String s = input.readStringRequireUtf8();
1054                 queryCase_ = 2;
1055                 query_ = s;
1056                 break;
1057               } // case 18
1058             case 26:
1059               {
1060                 java.lang.String s = input.readStringRequireUtf8();
1061                 queryCase_ = 3;
1062                 query_ = s;
1063                 break;
1064               } // case 26
1065             case 34:
1066               {
1067                 com.google.cloud.dialogflow.cx.v3.Match m =
1068                     input.readMessage(
1069                         com.google.cloud.dialogflow.cx.v3.Match.parser(), extensionRegistry);
1070                 if (matchesBuilder_ == null) {
1071                   ensureMatchesIsMutable();
1072                   matches_.add(m);
1073                 } else {
1074                   matchesBuilder_.addMessage(m);
1075                 }
1076                 break;
1077               } // case 34
1078             case 42:
1079               {
1080                 input.readMessage(getCurrentPageFieldBuilder().getBuilder(), extensionRegistry);
1081                 bitField0_ |= 0x00000020;
1082                 break;
1083               } // case 42
1084             case 50:
1085               {
1086                 java.lang.String s = input.readStringRequireUtf8();
1087                 queryCase_ = 6;
1088                 query_ = s;
1089                 break;
1090               } // case 50
1091             default:
1092               {
1093                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1094                   done = true; // was an endgroup tag
1095                 }
1096                 break;
1097               } // default:
1098           } // switch (tag)
1099         } // while (!done)
1100       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1101         throw e.unwrapIOException();
1102       } finally {
1103         onChanged();
1104       } // finally
1105       return this;
1106     }
1107 
1108     private int queryCase_ = 0;
1109     private java.lang.Object query_;
1110 
getQueryCase()1111     public QueryCase getQueryCase() {
1112       return QueryCase.forNumber(queryCase_);
1113     }
1114 
clearQuery()1115     public Builder clearQuery() {
1116       queryCase_ = 0;
1117       query_ = null;
1118       onChanged();
1119       return this;
1120     }
1121 
1122     private int bitField0_;
1123 
1124     /**
1125      *
1126      *
1127      * <pre>
1128      * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was
1129      * provided as input, this field will contain a copy of the text.
1130      * </pre>
1131      *
1132      * <code>string text = 1;</code>
1133      *
1134      * @return Whether the text field is set.
1135      */
1136     @java.lang.Override
hasText()1137     public boolean hasText() {
1138       return queryCase_ == 1;
1139     }
1140     /**
1141      *
1142      *
1143      * <pre>
1144      * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was
1145      * provided as input, this field will contain a copy of the text.
1146      * </pre>
1147      *
1148      * <code>string text = 1;</code>
1149      *
1150      * @return The text.
1151      */
1152     @java.lang.Override
getText()1153     public java.lang.String getText() {
1154       java.lang.Object ref = "";
1155       if (queryCase_ == 1) {
1156         ref = query_;
1157       }
1158       if (!(ref instanceof java.lang.String)) {
1159         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1160         java.lang.String s = bs.toStringUtf8();
1161         if (queryCase_ == 1) {
1162           query_ = s;
1163         }
1164         return s;
1165       } else {
1166         return (java.lang.String) ref;
1167       }
1168     }
1169     /**
1170      *
1171      *
1172      * <pre>
1173      * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was
1174      * provided as input, this field will contain a copy of the text.
1175      * </pre>
1176      *
1177      * <code>string text = 1;</code>
1178      *
1179      * @return The bytes for text.
1180      */
1181     @java.lang.Override
getTextBytes()1182     public com.google.protobuf.ByteString getTextBytes() {
1183       java.lang.Object ref = "";
1184       if (queryCase_ == 1) {
1185         ref = query_;
1186       }
1187       if (ref instanceof String) {
1188         com.google.protobuf.ByteString b =
1189             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1190         if (queryCase_ == 1) {
1191           query_ = b;
1192         }
1193         return b;
1194       } else {
1195         return (com.google.protobuf.ByteString) ref;
1196       }
1197     }
1198     /**
1199      *
1200      *
1201      * <pre>
1202      * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was
1203      * provided as input, this field will contain a copy of the text.
1204      * </pre>
1205      *
1206      * <code>string text = 1;</code>
1207      *
1208      * @param value The text to set.
1209      * @return This builder for chaining.
1210      */
setText(java.lang.String value)1211     public Builder setText(java.lang.String value) {
1212       if (value == null) {
1213         throw new NullPointerException();
1214       }
1215       queryCase_ = 1;
1216       query_ = value;
1217       onChanged();
1218       return this;
1219     }
1220     /**
1221      *
1222      *
1223      * <pre>
1224      * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was
1225      * provided as input, this field will contain a copy of the text.
1226      * </pre>
1227      *
1228      * <code>string text = 1;</code>
1229      *
1230      * @return This builder for chaining.
1231      */
clearText()1232     public Builder clearText() {
1233       if (queryCase_ == 1) {
1234         queryCase_ = 0;
1235         query_ = null;
1236         onChanged();
1237       }
1238       return this;
1239     }
1240     /**
1241      *
1242      *
1243      * <pre>
1244      * If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was
1245      * provided as input, this field will contain a copy of the text.
1246      * </pre>
1247      *
1248      * <code>string text = 1;</code>
1249      *
1250      * @param value The bytes for text to set.
1251      * @return This builder for chaining.
1252      */
setTextBytes(com.google.protobuf.ByteString value)1253     public Builder setTextBytes(com.google.protobuf.ByteString value) {
1254       if (value == null) {
1255         throw new NullPointerException();
1256       }
1257       checkByteStringIsUtf8(value);
1258       queryCase_ = 1;
1259       query_ = value;
1260       onChanged();
1261       return this;
1262     }
1263 
1264     /**
1265      *
1266      *
1267      * <pre>
1268      * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as
1269      * input, this field will contain a copy of the intent identifier. Format:
1270      * `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1271      * ID&gt;/intents/&lt;Intent ID&gt;`.
1272      * </pre>
1273      *
1274      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1275      *
1276      * @return Whether the triggerIntent field is set.
1277      */
1278     @java.lang.Override
hasTriggerIntent()1279     public boolean hasTriggerIntent() {
1280       return queryCase_ == 2;
1281     }
1282     /**
1283      *
1284      *
1285      * <pre>
1286      * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as
1287      * input, this field will contain a copy of the intent identifier. Format:
1288      * `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1289      * ID&gt;/intents/&lt;Intent ID&gt;`.
1290      * </pre>
1291      *
1292      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1293      *
1294      * @return The triggerIntent.
1295      */
1296     @java.lang.Override
getTriggerIntent()1297     public java.lang.String getTriggerIntent() {
1298       java.lang.Object ref = "";
1299       if (queryCase_ == 2) {
1300         ref = query_;
1301       }
1302       if (!(ref instanceof java.lang.String)) {
1303         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1304         java.lang.String s = bs.toStringUtf8();
1305         if (queryCase_ == 2) {
1306           query_ = s;
1307         }
1308         return s;
1309       } else {
1310         return (java.lang.String) ref;
1311       }
1312     }
1313     /**
1314      *
1315      *
1316      * <pre>
1317      * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as
1318      * input, this field will contain a copy of the intent identifier. Format:
1319      * `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1320      * ID&gt;/intents/&lt;Intent ID&gt;`.
1321      * </pre>
1322      *
1323      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1324      *
1325      * @return The bytes for triggerIntent.
1326      */
1327     @java.lang.Override
getTriggerIntentBytes()1328     public com.google.protobuf.ByteString getTriggerIntentBytes() {
1329       java.lang.Object ref = "";
1330       if (queryCase_ == 2) {
1331         ref = query_;
1332       }
1333       if (ref instanceof String) {
1334         com.google.protobuf.ByteString b =
1335             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1336         if (queryCase_ == 2) {
1337           query_ = b;
1338         }
1339         return b;
1340       } else {
1341         return (com.google.protobuf.ByteString) ref;
1342       }
1343     }
1344     /**
1345      *
1346      *
1347      * <pre>
1348      * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as
1349      * input, this field will contain a copy of the intent identifier. Format:
1350      * `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1351      * ID&gt;/intents/&lt;Intent ID&gt;`.
1352      * </pre>
1353      *
1354      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1355      *
1356      * @param value The triggerIntent to set.
1357      * @return This builder for chaining.
1358      */
setTriggerIntent(java.lang.String value)1359     public Builder setTriggerIntent(java.lang.String value) {
1360       if (value == null) {
1361         throw new NullPointerException();
1362       }
1363       queryCase_ = 2;
1364       query_ = value;
1365       onChanged();
1366       return this;
1367     }
1368     /**
1369      *
1370      *
1371      * <pre>
1372      * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as
1373      * input, this field will contain a copy of the intent identifier. Format:
1374      * `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1375      * ID&gt;/intents/&lt;Intent ID&gt;`.
1376      * </pre>
1377      *
1378      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1379      *
1380      * @return This builder for chaining.
1381      */
clearTriggerIntent()1382     public Builder clearTriggerIntent() {
1383       if (queryCase_ == 2) {
1384         queryCase_ = 0;
1385         query_ = null;
1386         onChanged();
1387       }
1388       return this;
1389     }
1390     /**
1391      *
1392      *
1393      * <pre>
1394      * If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as
1395      * input, this field will contain a copy of the intent identifier. Format:
1396      * `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
1397      * ID&gt;/intents/&lt;Intent ID&gt;`.
1398      * </pre>
1399      *
1400      * <code>string trigger_intent = 2 [(.google.api.resource_reference) = { ... }</code>
1401      *
1402      * @param value The bytes for triggerIntent to set.
1403      * @return This builder for chaining.
1404      */
setTriggerIntentBytes(com.google.protobuf.ByteString value)1405     public Builder setTriggerIntentBytes(com.google.protobuf.ByteString value) {
1406       if (value == null) {
1407         throw new NullPointerException();
1408       }
1409       checkByteStringIsUtf8(value);
1410       queryCase_ = 2;
1411       query_ = value;
1412       onChanged();
1413       return this;
1414     }
1415 
1416     /**
1417      *
1418      *
1419      * <pre>
1420      * If [natural language speech
1421      * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
1422      * this field will contain the transcript for the audio.
1423      * </pre>
1424      *
1425      * <code>string transcript = 3;</code>
1426      *
1427      * @return Whether the transcript field is set.
1428      */
1429     @java.lang.Override
hasTranscript()1430     public boolean hasTranscript() {
1431       return queryCase_ == 3;
1432     }
1433     /**
1434      *
1435      *
1436      * <pre>
1437      * If [natural language speech
1438      * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
1439      * this field will contain the transcript for the audio.
1440      * </pre>
1441      *
1442      * <code>string transcript = 3;</code>
1443      *
1444      * @return The transcript.
1445      */
1446     @java.lang.Override
getTranscript()1447     public java.lang.String getTranscript() {
1448       java.lang.Object ref = "";
1449       if (queryCase_ == 3) {
1450         ref = query_;
1451       }
1452       if (!(ref instanceof java.lang.String)) {
1453         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1454         java.lang.String s = bs.toStringUtf8();
1455         if (queryCase_ == 3) {
1456           query_ = s;
1457         }
1458         return s;
1459       } else {
1460         return (java.lang.String) ref;
1461       }
1462     }
1463     /**
1464      *
1465      *
1466      * <pre>
1467      * If [natural language speech
1468      * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
1469      * this field will contain the transcript for the audio.
1470      * </pre>
1471      *
1472      * <code>string transcript = 3;</code>
1473      *
1474      * @return The bytes for transcript.
1475      */
1476     @java.lang.Override
getTranscriptBytes()1477     public com.google.protobuf.ByteString getTranscriptBytes() {
1478       java.lang.Object ref = "";
1479       if (queryCase_ == 3) {
1480         ref = query_;
1481       }
1482       if (ref instanceof String) {
1483         com.google.protobuf.ByteString b =
1484             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1485         if (queryCase_ == 3) {
1486           query_ = b;
1487         }
1488         return b;
1489       } else {
1490         return (com.google.protobuf.ByteString) ref;
1491       }
1492     }
1493     /**
1494      *
1495      *
1496      * <pre>
1497      * If [natural language speech
1498      * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
1499      * this field will contain the transcript for the audio.
1500      * </pre>
1501      *
1502      * <code>string transcript = 3;</code>
1503      *
1504      * @param value The transcript to set.
1505      * @return This builder for chaining.
1506      */
setTranscript(java.lang.String value)1507     public Builder setTranscript(java.lang.String value) {
1508       if (value == null) {
1509         throw new NullPointerException();
1510       }
1511       queryCase_ = 3;
1512       query_ = value;
1513       onChanged();
1514       return this;
1515     }
1516     /**
1517      *
1518      *
1519      * <pre>
1520      * If [natural language speech
1521      * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
1522      * this field will contain the transcript for the audio.
1523      * </pre>
1524      *
1525      * <code>string transcript = 3;</code>
1526      *
1527      * @return This builder for chaining.
1528      */
clearTranscript()1529     public Builder clearTranscript() {
1530       if (queryCase_ == 3) {
1531         queryCase_ = 0;
1532         query_ = null;
1533         onChanged();
1534       }
1535       return this;
1536     }
1537     /**
1538      *
1539      *
1540      * <pre>
1541      * If [natural language speech
1542      * audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
1543      * this field will contain the transcript for the audio.
1544      * </pre>
1545      *
1546      * <code>string transcript = 3;</code>
1547      *
1548      * @param value The bytes for transcript to set.
1549      * @return This builder for chaining.
1550      */
setTranscriptBytes(com.google.protobuf.ByteString value)1551     public Builder setTranscriptBytes(com.google.protobuf.ByteString value) {
1552       if (value == null) {
1553         throw new NullPointerException();
1554       }
1555       checkByteStringIsUtf8(value);
1556       queryCase_ = 3;
1557       query_ = value;
1558       onChanged();
1559       return this;
1560     }
1561 
1562     /**
1563      *
1564      *
1565      * <pre>
1566      * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as
1567      * input, this field will contain a copy of the event name.
1568      * </pre>
1569      *
1570      * <code>string trigger_event = 6;</code>
1571      *
1572      * @return Whether the triggerEvent field is set.
1573      */
1574     @java.lang.Override
hasTriggerEvent()1575     public boolean hasTriggerEvent() {
1576       return queryCase_ == 6;
1577     }
1578     /**
1579      *
1580      *
1581      * <pre>
1582      * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as
1583      * input, this field will contain a copy of the event name.
1584      * </pre>
1585      *
1586      * <code>string trigger_event = 6;</code>
1587      *
1588      * @return The triggerEvent.
1589      */
1590     @java.lang.Override
getTriggerEvent()1591     public java.lang.String getTriggerEvent() {
1592       java.lang.Object ref = "";
1593       if (queryCase_ == 6) {
1594         ref = query_;
1595       }
1596       if (!(ref instanceof java.lang.String)) {
1597         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1598         java.lang.String s = bs.toStringUtf8();
1599         if (queryCase_ == 6) {
1600           query_ = s;
1601         }
1602         return s;
1603       } else {
1604         return (java.lang.String) ref;
1605       }
1606     }
1607     /**
1608      *
1609      *
1610      * <pre>
1611      * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as
1612      * input, this field will contain a copy of the event name.
1613      * </pre>
1614      *
1615      * <code>string trigger_event = 6;</code>
1616      *
1617      * @return The bytes for triggerEvent.
1618      */
1619     @java.lang.Override
getTriggerEventBytes()1620     public com.google.protobuf.ByteString getTriggerEventBytes() {
1621       java.lang.Object ref = "";
1622       if (queryCase_ == 6) {
1623         ref = query_;
1624       }
1625       if (ref instanceof String) {
1626         com.google.protobuf.ByteString b =
1627             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1628         if (queryCase_ == 6) {
1629           query_ = b;
1630         }
1631         return b;
1632       } else {
1633         return (com.google.protobuf.ByteString) ref;
1634       }
1635     }
1636     /**
1637      *
1638      *
1639      * <pre>
1640      * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as
1641      * input, this field will contain a copy of the event name.
1642      * </pre>
1643      *
1644      * <code>string trigger_event = 6;</code>
1645      *
1646      * @param value The triggerEvent to set.
1647      * @return This builder for chaining.
1648      */
setTriggerEvent(java.lang.String value)1649     public Builder setTriggerEvent(java.lang.String value) {
1650       if (value == null) {
1651         throw new NullPointerException();
1652       }
1653       queryCase_ = 6;
1654       query_ = value;
1655       onChanged();
1656       return this;
1657     }
1658     /**
1659      *
1660      *
1661      * <pre>
1662      * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as
1663      * input, this field will contain a copy of the event name.
1664      * </pre>
1665      *
1666      * <code>string trigger_event = 6;</code>
1667      *
1668      * @return This builder for chaining.
1669      */
clearTriggerEvent()1670     public Builder clearTriggerEvent() {
1671       if (queryCase_ == 6) {
1672         queryCase_ = 0;
1673         query_ = null;
1674         onChanged();
1675       }
1676       return this;
1677     }
1678     /**
1679      *
1680      *
1681      * <pre>
1682      * If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as
1683      * input, this field will contain a copy of the event name.
1684      * </pre>
1685      *
1686      * <code>string trigger_event = 6;</code>
1687      *
1688      * @param value The bytes for triggerEvent to set.
1689      * @return This builder for chaining.
1690      */
setTriggerEventBytes(com.google.protobuf.ByteString value)1691     public Builder setTriggerEventBytes(com.google.protobuf.ByteString value) {
1692       if (value == null) {
1693         throw new NullPointerException();
1694       }
1695       checkByteStringIsUtf8(value);
1696       queryCase_ = 6;
1697       query_ = value;
1698       onChanged();
1699       return this;
1700     }
1701 
1702     private java.util.List<com.google.cloud.dialogflow.cx.v3.Match> matches_ =
1703         java.util.Collections.emptyList();
1704 
ensureMatchesIsMutable()1705     private void ensureMatchesIsMutable() {
1706       if (!((bitField0_ & 0x00000010) != 0)) {
1707         matches_ = new java.util.ArrayList<com.google.cloud.dialogflow.cx.v3.Match>(matches_);
1708         bitField0_ |= 0x00000010;
1709       }
1710     }
1711 
1712     private com.google.protobuf.RepeatedFieldBuilderV3<
1713             com.google.cloud.dialogflow.cx.v3.Match,
1714             com.google.cloud.dialogflow.cx.v3.Match.Builder,
1715             com.google.cloud.dialogflow.cx.v3.MatchOrBuilder>
1716         matchesBuilder_;
1717 
1718     /**
1719      *
1720      *
1721      * <pre>
1722      * Match results, if more than one, ordered descendingly by the confidence
1723      * we have that the particular intent matches the query.
1724      * </pre>
1725      *
1726      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1727      */
getMatchesList()1728     public java.util.List<com.google.cloud.dialogflow.cx.v3.Match> getMatchesList() {
1729       if (matchesBuilder_ == null) {
1730         return java.util.Collections.unmodifiableList(matches_);
1731       } else {
1732         return matchesBuilder_.getMessageList();
1733       }
1734     }
1735     /**
1736      *
1737      *
1738      * <pre>
1739      * Match results, if more than one, ordered descendingly by the confidence
1740      * we have that the particular intent matches the query.
1741      * </pre>
1742      *
1743      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1744      */
getMatchesCount()1745     public int getMatchesCount() {
1746       if (matchesBuilder_ == null) {
1747         return matches_.size();
1748       } else {
1749         return matchesBuilder_.getCount();
1750       }
1751     }
1752     /**
1753      *
1754      *
1755      * <pre>
1756      * Match results, if more than one, ordered descendingly by the confidence
1757      * we have that the particular intent matches the query.
1758      * </pre>
1759      *
1760      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1761      */
getMatches(int index)1762     public com.google.cloud.dialogflow.cx.v3.Match getMatches(int index) {
1763       if (matchesBuilder_ == null) {
1764         return matches_.get(index);
1765       } else {
1766         return matchesBuilder_.getMessage(index);
1767       }
1768     }
1769     /**
1770      *
1771      *
1772      * <pre>
1773      * Match results, if more than one, ordered descendingly by the confidence
1774      * we have that the particular intent matches the query.
1775      * </pre>
1776      *
1777      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1778      */
setMatches(int index, com.google.cloud.dialogflow.cx.v3.Match value)1779     public Builder setMatches(int index, com.google.cloud.dialogflow.cx.v3.Match value) {
1780       if (matchesBuilder_ == null) {
1781         if (value == null) {
1782           throw new NullPointerException();
1783         }
1784         ensureMatchesIsMutable();
1785         matches_.set(index, value);
1786         onChanged();
1787       } else {
1788         matchesBuilder_.setMessage(index, value);
1789       }
1790       return this;
1791     }
1792     /**
1793      *
1794      *
1795      * <pre>
1796      * Match results, if more than one, ordered descendingly by the confidence
1797      * we have that the particular intent matches the query.
1798      * </pre>
1799      *
1800      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1801      */
setMatches( int index, com.google.cloud.dialogflow.cx.v3.Match.Builder builderForValue)1802     public Builder setMatches(
1803         int index, com.google.cloud.dialogflow.cx.v3.Match.Builder builderForValue) {
1804       if (matchesBuilder_ == null) {
1805         ensureMatchesIsMutable();
1806         matches_.set(index, builderForValue.build());
1807         onChanged();
1808       } else {
1809         matchesBuilder_.setMessage(index, builderForValue.build());
1810       }
1811       return this;
1812     }
1813     /**
1814      *
1815      *
1816      * <pre>
1817      * Match results, if more than one, ordered descendingly by the confidence
1818      * we have that the particular intent matches the query.
1819      * </pre>
1820      *
1821      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1822      */
addMatches(com.google.cloud.dialogflow.cx.v3.Match value)1823     public Builder addMatches(com.google.cloud.dialogflow.cx.v3.Match value) {
1824       if (matchesBuilder_ == null) {
1825         if (value == null) {
1826           throw new NullPointerException();
1827         }
1828         ensureMatchesIsMutable();
1829         matches_.add(value);
1830         onChanged();
1831       } else {
1832         matchesBuilder_.addMessage(value);
1833       }
1834       return this;
1835     }
1836     /**
1837      *
1838      *
1839      * <pre>
1840      * Match results, if more than one, ordered descendingly by the confidence
1841      * we have that the particular intent matches the query.
1842      * </pre>
1843      *
1844      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1845      */
addMatches(int index, com.google.cloud.dialogflow.cx.v3.Match value)1846     public Builder addMatches(int index, com.google.cloud.dialogflow.cx.v3.Match value) {
1847       if (matchesBuilder_ == null) {
1848         if (value == null) {
1849           throw new NullPointerException();
1850         }
1851         ensureMatchesIsMutable();
1852         matches_.add(index, value);
1853         onChanged();
1854       } else {
1855         matchesBuilder_.addMessage(index, value);
1856       }
1857       return this;
1858     }
1859     /**
1860      *
1861      *
1862      * <pre>
1863      * Match results, if more than one, ordered descendingly by the confidence
1864      * we have that the particular intent matches the query.
1865      * </pre>
1866      *
1867      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1868      */
addMatches(com.google.cloud.dialogflow.cx.v3.Match.Builder builderForValue)1869     public Builder addMatches(com.google.cloud.dialogflow.cx.v3.Match.Builder builderForValue) {
1870       if (matchesBuilder_ == null) {
1871         ensureMatchesIsMutable();
1872         matches_.add(builderForValue.build());
1873         onChanged();
1874       } else {
1875         matchesBuilder_.addMessage(builderForValue.build());
1876       }
1877       return this;
1878     }
1879     /**
1880      *
1881      *
1882      * <pre>
1883      * Match results, if more than one, ordered descendingly by the confidence
1884      * we have that the particular intent matches the query.
1885      * </pre>
1886      *
1887      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1888      */
addMatches( int index, com.google.cloud.dialogflow.cx.v3.Match.Builder builderForValue)1889     public Builder addMatches(
1890         int index, com.google.cloud.dialogflow.cx.v3.Match.Builder builderForValue) {
1891       if (matchesBuilder_ == null) {
1892         ensureMatchesIsMutable();
1893         matches_.add(index, builderForValue.build());
1894         onChanged();
1895       } else {
1896         matchesBuilder_.addMessage(index, builderForValue.build());
1897       }
1898       return this;
1899     }
1900     /**
1901      *
1902      *
1903      * <pre>
1904      * Match results, if more than one, ordered descendingly by the confidence
1905      * we have that the particular intent matches the query.
1906      * </pre>
1907      *
1908      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1909      */
addAllMatches( java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3.Match> values)1910     public Builder addAllMatches(
1911         java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3.Match> values) {
1912       if (matchesBuilder_ == null) {
1913         ensureMatchesIsMutable();
1914         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, matches_);
1915         onChanged();
1916       } else {
1917         matchesBuilder_.addAllMessages(values);
1918       }
1919       return this;
1920     }
1921     /**
1922      *
1923      *
1924      * <pre>
1925      * Match results, if more than one, ordered descendingly by the confidence
1926      * we have that the particular intent matches the query.
1927      * </pre>
1928      *
1929      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1930      */
clearMatches()1931     public Builder clearMatches() {
1932       if (matchesBuilder_ == null) {
1933         matches_ = java.util.Collections.emptyList();
1934         bitField0_ = (bitField0_ & ~0x00000010);
1935         onChanged();
1936       } else {
1937         matchesBuilder_.clear();
1938       }
1939       return this;
1940     }
1941     /**
1942      *
1943      *
1944      * <pre>
1945      * Match results, if more than one, ordered descendingly by the confidence
1946      * we have that the particular intent matches the query.
1947      * </pre>
1948      *
1949      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1950      */
removeMatches(int index)1951     public Builder removeMatches(int index) {
1952       if (matchesBuilder_ == null) {
1953         ensureMatchesIsMutable();
1954         matches_.remove(index);
1955         onChanged();
1956       } else {
1957         matchesBuilder_.remove(index);
1958       }
1959       return this;
1960     }
1961     /**
1962      *
1963      *
1964      * <pre>
1965      * Match results, if more than one, ordered descendingly by the confidence
1966      * we have that the particular intent matches the query.
1967      * </pre>
1968      *
1969      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1970      */
getMatchesBuilder(int index)1971     public com.google.cloud.dialogflow.cx.v3.Match.Builder getMatchesBuilder(int index) {
1972       return getMatchesFieldBuilder().getBuilder(index);
1973     }
1974     /**
1975      *
1976      *
1977      * <pre>
1978      * Match results, if more than one, ordered descendingly by the confidence
1979      * we have that the particular intent matches the query.
1980      * </pre>
1981      *
1982      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
1983      */
getMatchesOrBuilder(int index)1984     public com.google.cloud.dialogflow.cx.v3.MatchOrBuilder getMatchesOrBuilder(int index) {
1985       if (matchesBuilder_ == null) {
1986         return matches_.get(index);
1987       } else {
1988         return matchesBuilder_.getMessageOrBuilder(index);
1989       }
1990     }
1991     /**
1992      *
1993      *
1994      * <pre>
1995      * Match results, if more than one, ordered descendingly by the confidence
1996      * we have that the particular intent matches the query.
1997      * </pre>
1998      *
1999      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
2000      */
2001     public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.MatchOrBuilder>
getMatchesOrBuilderList()2002         getMatchesOrBuilderList() {
2003       if (matchesBuilder_ != null) {
2004         return matchesBuilder_.getMessageOrBuilderList();
2005       } else {
2006         return java.util.Collections.unmodifiableList(matches_);
2007       }
2008     }
2009     /**
2010      *
2011      *
2012      * <pre>
2013      * Match results, if more than one, ordered descendingly by the confidence
2014      * we have that the particular intent matches the query.
2015      * </pre>
2016      *
2017      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
2018      */
addMatchesBuilder()2019     public com.google.cloud.dialogflow.cx.v3.Match.Builder addMatchesBuilder() {
2020       return getMatchesFieldBuilder()
2021           .addBuilder(com.google.cloud.dialogflow.cx.v3.Match.getDefaultInstance());
2022     }
2023     /**
2024      *
2025      *
2026      * <pre>
2027      * Match results, if more than one, ordered descendingly by the confidence
2028      * we have that the particular intent matches the query.
2029      * </pre>
2030      *
2031      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
2032      */
addMatchesBuilder(int index)2033     public com.google.cloud.dialogflow.cx.v3.Match.Builder addMatchesBuilder(int index) {
2034       return getMatchesFieldBuilder()
2035           .addBuilder(index, com.google.cloud.dialogflow.cx.v3.Match.getDefaultInstance());
2036     }
2037     /**
2038      *
2039      *
2040      * <pre>
2041      * Match results, if more than one, ordered descendingly by the confidence
2042      * we have that the particular intent matches the query.
2043      * </pre>
2044      *
2045      * <code>repeated .google.cloud.dialogflow.cx.v3.Match matches = 4;</code>
2046      */
getMatchesBuilderList()2047     public java.util.List<com.google.cloud.dialogflow.cx.v3.Match.Builder> getMatchesBuilderList() {
2048       return getMatchesFieldBuilder().getBuilderList();
2049     }
2050 
2051     private com.google.protobuf.RepeatedFieldBuilderV3<
2052             com.google.cloud.dialogflow.cx.v3.Match,
2053             com.google.cloud.dialogflow.cx.v3.Match.Builder,
2054             com.google.cloud.dialogflow.cx.v3.MatchOrBuilder>
getMatchesFieldBuilder()2055         getMatchesFieldBuilder() {
2056       if (matchesBuilder_ == null) {
2057         matchesBuilder_ =
2058             new com.google.protobuf.RepeatedFieldBuilderV3<
2059                 com.google.cloud.dialogflow.cx.v3.Match,
2060                 com.google.cloud.dialogflow.cx.v3.Match.Builder,
2061                 com.google.cloud.dialogflow.cx.v3.MatchOrBuilder>(
2062                 matches_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean());
2063         matches_ = null;
2064       }
2065       return matchesBuilder_;
2066     }
2067 
2068     private com.google.cloud.dialogflow.cx.v3.Page currentPage_;
2069     private com.google.protobuf.SingleFieldBuilderV3<
2070             com.google.cloud.dialogflow.cx.v3.Page,
2071             com.google.cloud.dialogflow.cx.v3.Page.Builder,
2072             com.google.cloud.dialogflow.cx.v3.PageOrBuilder>
2073         currentPageBuilder_;
2074     /**
2075      *
2076      *
2077      * <pre>
2078      * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all
2079      * fields are filled in this message, including but not limited to `name` and
2080      * `display_name`.
2081      * </pre>
2082      *
2083      * <code>.google.cloud.dialogflow.cx.v3.Page current_page = 5;</code>
2084      *
2085      * @return Whether the currentPage field is set.
2086      */
hasCurrentPage()2087     public boolean hasCurrentPage() {
2088       return ((bitField0_ & 0x00000020) != 0);
2089     }
2090     /**
2091      *
2092      *
2093      * <pre>
2094      * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all
2095      * fields are filled in this message, including but not limited to `name` and
2096      * `display_name`.
2097      * </pre>
2098      *
2099      * <code>.google.cloud.dialogflow.cx.v3.Page current_page = 5;</code>
2100      *
2101      * @return The currentPage.
2102      */
getCurrentPage()2103     public com.google.cloud.dialogflow.cx.v3.Page getCurrentPage() {
2104       if (currentPageBuilder_ == null) {
2105         return currentPage_ == null
2106             ? com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance()
2107             : currentPage_;
2108       } else {
2109         return currentPageBuilder_.getMessage();
2110       }
2111     }
2112     /**
2113      *
2114      *
2115      * <pre>
2116      * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all
2117      * fields are filled in this message, including but not limited to `name` and
2118      * `display_name`.
2119      * </pre>
2120      *
2121      * <code>.google.cloud.dialogflow.cx.v3.Page current_page = 5;</code>
2122      */
setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value)2123     public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) {
2124       if (currentPageBuilder_ == null) {
2125         if (value == null) {
2126           throw new NullPointerException();
2127         }
2128         currentPage_ = value;
2129       } else {
2130         currentPageBuilder_.setMessage(value);
2131       }
2132       bitField0_ |= 0x00000020;
2133       onChanged();
2134       return this;
2135     }
2136     /**
2137      *
2138      *
2139      * <pre>
2140      * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all
2141      * fields are filled in this message, including but not limited to `name` and
2142      * `display_name`.
2143      * </pre>
2144      *
2145      * <code>.google.cloud.dialogflow.cx.v3.Page current_page = 5;</code>
2146      */
setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page.Builder builderForValue)2147     public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page.Builder builderForValue) {
2148       if (currentPageBuilder_ == null) {
2149         currentPage_ = builderForValue.build();
2150       } else {
2151         currentPageBuilder_.setMessage(builderForValue.build());
2152       }
2153       bitField0_ |= 0x00000020;
2154       onChanged();
2155       return this;
2156     }
2157     /**
2158      *
2159      *
2160      * <pre>
2161      * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all
2162      * fields are filled in this message, including but not limited to `name` and
2163      * `display_name`.
2164      * </pre>
2165      *
2166      * <code>.google.cloud.dialogflow.cx.v3.Page current_page = 5;</code>
2167      */
mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value)2168     public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) {
2169       if (currentPageBuilder_ == null) {
2170         if (((bitField0_ & 0x00000020) != 0)
2171             && currentPage_ != null
2172             && currentPage_ != com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance()) {
2173           getCurrentPageBuilder().mergeFrom(value);
2174         } else {
2175           currentPage_ = value;
2176         }
2177       } else {
2178         currentPageBuilder_.mergeFrom(value);
2179       }
2180       bitField0_ |= 0x00000020;
2181       onChanged();
2182       return this;
2183     }
2184     /**
2185      *
2186      *
2187      * <pre>
2188      * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all
2189      * fields are filled in this message, including but not limited to `name` and
2190      * `display_name`.
2191      * </pre>
2192      *
2193      * <code>.google.cloud.dialogflow.cx.v3.Page current_page = 5;</code>
2194      */
clearCurrentPage()2195     public Builder clearCurrentPage() {
2196       bitField0_ = (bitField0_ & ~0x00000020);
2197       currentPage_ = null;
2198       if (currentPageBuilder_ != null) {
2199         currentPageBuilder_.dispose();
2200         currentPageBuilder_ = null;
2201       }
2202       onChanged();
2203       return this;
2204     }
2205     /**
2206      *
2207      *
2208      * <pre>
2209      * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all
2210      * fields are filled in this message, including but not limited to `name` and
2211      * `display_name`.
2212      * </pre>
2213      *
2214      * <code>.google.cloud.dialogflow.cx.v3.Page current_page = 5;</code>
2215      */
getCurrentPageBuilder()2216     public com.google.cloud.dialogflow.cx.v3.Page.Builder getCurrentPageBuilder() {
2217       bitField0_ |= 0x00000020;
2218       onChanged();
2219       return getCurrentPageFieldBuilder().getBuilder();
2220     }
2221     /**
2222      *
2223      *
2224      * <pre>
2225      * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all
2226      * fields are filled in this message, including but not limited to `name` and
2227      * `display_name`.
2228      * </pre>
2229      *
2230      * <code>.google.cloud.dialogflow.cx.v3.Page current_page = 5;</code>
2231      */
getCurrentPageOrBuilder()2232     public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() {
2233       if (currentPageBuilder_ != null) {
2234         return currentPageBuilder_.getMessageOrBuilder();
2235       } else {
2236         return currentPage_ == null
2237             ? com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance()
2238             : currentPage_;
2239       }
2240     }
2241     /**
2242      *
2243      *
2244      * <pre>
2245      * The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all
2246      * fields are filled in this message, including but not limited to `name` and
2247      * `display_name`.
2248      * </pre>
2249      *
2250      * <code>.google.cloud.dialogflow.cx.v3.Page current_page = 5;</code>
2251      */
2252     private com.google.protobuf.SingleFieldBuilderV3<
2253             com.google.cloud.dialogflow.cx.v3.Page,
2254             com.google.cloud.dialogflow.cx.v3.Page.Builder,
2255             com.google.cloud.dialogflow.cx.v3.PageOrBuilder>
getCurrentPageFieldBuilder()2256         getCurrentPageFieldBuilder() {
2257       if (currentPageBuilder_ == null) {
2258         currentPageBuilder_ =
2259             new com.google.protobuf.SingleFieldBuilderV3<
2260                 com.google.cloud.dialogflow.cx.v3.Page,
2261                 com.google.cloud.dialogflow.cx.v3.Page.Builder,
2262                 com.google.cloud.dialogflow.cx.v3.PageOrBuilder>(
2263                 getCurrentPage(), getParentForChildren(), isClean());
2264         currentPage_ = null;
2265       }
2266       return currentPageBuilder_;
2267     }
2268 
2269     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2270     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2271       return super.setUnknownFields(unknownFields);
2272     }
2273 
2274     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2275     public final Builder mergeUnknownFields(
2276         final com.google.protobuf.UnknownFieldSet unknownFields) {
2277       return super.mergeUnknownFields(unknownFields);
2278     }
2279 
2280     // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.MatchIntentResponse)
2281   }
2282 
2283   // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.MatchIntentResponse)
2284   private static final com.google.cloud.dialogflow.cx.v3.MatchIntentResponse DEFAULT_INSTANCE;
2285 
2286   static {
2287     DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.MatchIntentResponse();
2288   }
2289 
getDefaultInstance()2290   public static com.google.cloud.dialogflow.cx.v3.MatchIntentResponse getDefaultInstance() {
2291     return DEFAULT_INSTANCE;
2292   }
2293 
2294   private static final com.google.protobuf.Parser<MatchIntentResponse> PARSER =
2295       new com.google.protobuf.AbstractParser<MatchIntentResponse>() {
2296         @java.lang.Override
2297         public MatchIntentResponse parsePartialFrom(
2298             com.google.protobuf.CodedInputStream input,
2299             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2300             throws com.google.protobuf.InvalidProtocolBufferException {
2301           Builder builder = newBuilder();
2302           try {
2303             builder.mergeFrom(input, extensionRegistry);
2304           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2305             throw e.setUnfinishedMessage(builder.buildPartial());
2306           } catch (com.google.protobuf.UninitializedMessageException e) {
2307             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2308           } catch (java.io.IOException e) {
2309             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2310                 .setUnfinishedMessage(builder.buildPartial());
2311           }
2312           return builder.buildPartial();
2313         }
2314       };
2315 
parser()2316   public static com.google.protobuf.Parser<MatchIntentResponse> parser() {
2317     return PARSER;
2318   }
2319 
2320   @java.lang.Override
getParserForType()2321   public com.google.protobuf.Parser<MatchIntentResponse> getParserForType() {
2322     return PARSER;
2323   }
2324 
2325   @java.lang.Override
getDefaultInstanceForType()2326   public com.google.cloud.dialogflow.cx.v3.MatchIntentResponse getDefaultInstanceForType() {
2327     return DEFAULT_INSTANCE;
2328   }
2329 }
2330