• 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/v2/context.proto
18 
19 package com.google.cloud.dialogflow.v2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Dialogflow contexts are similar to natural language context. If a person says
26  * to you "they are orange", you need context in order to understand what "they"
27  * is referring to. Similarly, for Dialogflow to handle an end-user expression
28  * like that, it needs to be provided with context in order to correctly match
29  * an intent.
30  * Using contexts, you can control the flow of a conversation. You can configure
31  * contexts for an intent by setting input and output contexts, which are
32  * identified by string names. When an intent is matched, any configured output
33  * contexts for that intent become active. While any contexts are active,
34  * Dialogflow is more likely to match intents that are configured with input
35  * contexts that correspond to the currently active contexts.
36  * For more information about context, see the
37  * [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview).
38  * </pre>
39  *
40  * Protobuf type {@code google.cloud.dialogflow.v2.Context}
41  */
42 public final class Context extends com.google.protobuf.GeneratedMessageV3
43     implements
44     // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Context)
45     ContextOrBuilder {
46   private static final long serialVersionUID = 0L;
47   // Use Context.newBuilder() to construct.
Context(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)48   private Context(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
49     super(builder);
50   }
51 
Context()52   private Context() {
53     name_ = "";
54   }
55 
56   @java.lang.Override
57   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)58   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
59     return new Context();
60   }
61 
62   @java.lang.Override
getUnknownFields()63   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
64     return this.unknownFields;
65   }
66 
getDescriptor()67   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
68     return com.google.cloud.dialogflow.v2.ContextProto
69         .internal_static_google_cloud_dialogflow_v2_Context_descriptor;
70   }
71 
72   @java.lang.Override
73   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()74       internalGetFieldAccessorTable() {
75     return com.google.cloud.dialogflow.v2.ContextProto
76         .internal_static_google_cloud_dialogflow_v2_Context_fieldAccessorTable
77         .ensureFieldAccessorsInitialized(
78             com.google.cloud.dialogflow.v2.Context.class,
79             com.google.cloud.dialogflow.v2.Context.Builder.class);
80   }
81 
82   public static final int NAME_FIELD_NUMBER = 1;
83 
84   @SuppressWarnings("serial")
85   private volatile java.lang.Object name_ = "";
86   /**
87    *
88    *
89    * <pre>
90    * Required. The unique identifier of the context. Format:
91    * `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
92    * or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
93    * ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
94    * The `Context ID` is always converted to lowercase, may only contain
95    * characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
96    * If `Environment ID` is not specified, we assume default 'draft'
97    * environment. If `User ID` is not specified, we assume default '-' user.
98    * The following context names are reserved for internal use by Dialogflow.
99    * You should not use these contexts or create contexts with these names:
100    * * `__system_counters__`
101    * * `*_id_dialog_context`
102    * * `*_dialog_params_size`
103    * </pre>
104    *
105    * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
106    *
107    * @return The name.
108    */
109   @java.lang.Override
getName()110   public java.lang.String getName() {
111     java.lang.Object ref = name_;
112     if (ref instanceof java.lang.String) {
113       return (java.lang.String) ref;
114     } else {
115       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
116       java.lang.String s = bs.toStringUtf8();
117       name_ = s;
118       return s;
119     }
120   }
121   /**
122    *
123    *
124    * <pre>
125    * Required. The unique identifier of the context. Format:
126    * `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
127    * or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
128    * ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
129    * The `Context ID` is always converted to lowercase, may only contain
130    * characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
131    * If `Environment ID` is not specified, we assume default 'draft'
132    * environment. If `User ID` is not specified, we assume default '-' user.
133    * The following context names are reserved for internal use by Dialogflow.
134    * You should not use these contexts or create contexts with these names:
135    * * `__system_counters__`
136    * * `*_id_dialog_context`
137    * * `*_dialog_params_size`
138    * </pre>
139    *
140    * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
141    *
142    * @return The bytes for name.
143    */
144   @java.lang.Override
getNameBytes()145   public com.google.protobuf.ByteString getNameBytes() {
146     java.lang.Object ref = name_;
147     if (ref instanceof java.lang.String) {
148       com.google.protobuf.ByteString b =
149           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
150       name_ = b;
151       return b;
152     } else {
153       return (com.google.protobuf.ByteString) ref;
154     }
155   }
156 
157   public static final int LIFESPAN_COUNT_FIELD_NUMBER = 2;
158   private int lifespanCount_ = 0;
159   /**
160    *
161    *
162    * <pre>
163    * Optional. The number of conversational query requests after which the
164    * context expires. The default is `0`. If set to `0`, the context expires
165    * immediately. Contexts expire automatically after 20 minutes if there
166    * are no matching queries.
167    * </pre>
168    *
169    * <code>int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
170    *
171    * @return The lifespanCount.
172    */
173   @java.lang.Override
getLifespanCount()174   public int getLifespanCount() {
175     return lifespanCount_;
176   }
177 
178   public static final int PARAMETERS_FIELD_NUMBER = 3;
179   private com.google.protobuf.Struct parameters_;
180   /**
181    *
182    *
183    * <pre>
184    * Optional. The collection of parameters associated with this context.
185    * Depending on your protocol or client library language, this is a
186    * map, associative array, symbol table, dictionary, or JSON object
187    * composed of a collection of (MapKey, MapValue) pairs:
188    * -   MapKey type: string
189    * -   MapKey value: parameter name
190    * -   MapValue type:
191    *     -   If parameter's entity type is a composite entity: map
192    *     -   Else: depending on parameter value type, could be one of string,
193    *         number, boolean, null, list or map
194    * -   MapValue value:
195    *     -   If parameter's entity type is a composite entity:
196    *         map from composite entity property names to property values
197    *     -   Else: parameter value
198    * </pre>
199    *
200    * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
201    *
202    * @return Whether the parameters field is set.
203    */
204   @java.lang.Override
hasParameters()205   public boolean hasParameters() {
206     return parameters_ != null;
207   }
208   /**
209    *
210    *
211    * <pre>
212    * Optional. The collection of parameters associated with this context.
213    * Depending on your protocol or client library language, this is a
214    * map, associative array, symbol table, dictionary, or JSON object
215    * composed of a collection of (MapKey, MapValue) pairs:
216    * -   MapKey type: string
217    * -   MapKey value: parameter name
218    * -   MapValue type:
219    *     -   If parameter's entity type is a composite entity: map
220    *     -   Else: depending on parameter value type, could be one of string,
221    *         number, boolean, null, list or map
222    * -   MapValue value:
223    *     -   If parameter's entity type is a composite entity:
224    *         map from composite entity property names to property values
225    *     -   Else: parameter value
226    * </pre>
227    *
228    * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
229    *
230    * @return The parameters.
231    */
232   @java.lang.Override
getParameters()233   public com.google.protobuf.Struct getParameters() {
234     return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_;
235   }
236   /**
237    *
238    *
239    * <pre>
240    * Optional. The collection of parameters associated with this context.
241    * Depending on your protocol or client library language, this is a
242    * map, associative array, symbol table, dictionary, or JSON object
243    * composed of a collection of (MapKey, MapValue) pairs:
244    * -   MapKey type: string
245    * -   MapKey value: parameter name
246    * -   MapValue type:
247    *     -   If parameter's entity type is a composite entity: map
248    *     -   Else: depending on parameter value type, could be one of string,
249    *         number, boolean, null, list or map
250    * -   MapValue value:
251    *     -   If parameter's entity type is a composite entity:
252    *         map from composite entity property names to property values
253    *     -   Else: parameter value
254    * </pre>
255    *
256    * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
257    */
258   @java.lang.Override
getParametersOrBuilder()259   public com.google.protobuf.StructOrBuilder getParametersOrBuilder() {
260     return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_;
261   }
262 
263   private byte memoizedIsInitialized = -1;
264 
265   @java.lang.Override
isInitialized()266   public final boolean isInitialized() {
267     byte isInitialized = memoizedIsInitialized;
268     if (isInitialized == 1) return true;
269     if (isInitialized == 0) return false;
270 
271     memoizedIsInitialized = 1;
272     return true;
273   }
274 
275   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)276   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
277     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
278       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
279     }
280     if (lifespanCount_ != 0) {
281       output.writeInt32(2, lifespanCount_);
282     }
283     if (parameters_ != null) {
284       output.writeMessage(3, getParameters());
285     }
286     getUnknownFields().writeTo(output);
287   }
288 
289   @java.lang.Override
getSerializedSize()290   public int getSerializedSize() {
291     int size = memoizedSize;
292     if (size != -1) return size;
293 
294     size = 0;
295     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
296       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
297     }
298     if (lifespanCount_ != 0) {
299       size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, lifespanCount_);
300     }
301     if (parameters_ != null) {
302       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters());
303     }
304     size += getUnknownFields().getSerializedSize();
305     memoizedSize = size;
306     return size;
307   }
308 
309   @java.lang.Override
equals(final java.lang.Object obj)310   public boolean equals(final java.lang.Object obj) {
311     if (obj == this) {
312       return true;
313     }
314     if (!(obj instanceof com.google.cloud.dialogflow.v2.Context)) {
315       return super.equals(obj);
316     }
317     com.google.cloud.dialogflow.v2.Context other = (com.google.cloud.dialogflow.v2.Context) obj;
318 
319     if (!getName().equals(other.getName())) return false;
320     if (getLifespanCount() != other.getLifespanCount()) return false;
321     if (hasParameters() != other.hasParameters()) return false;
322     if (hasParameters()) {
323       if (!getParameters().equals(other.getParameters())) return false;
324     }
325     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
326     return true;
327   }
328 
329   @java.lang.Override
hashCode()330   public int hashCode() {
331     if (memoizedHashCode != 0) {
332       return memoizedHashCode;
333     }
334     int hash = 41;
335     hash = (19 * hash) + getDescriptor().hashCode();
336     hash = (37 * hash) + NAME_FIELD_NUMBER;
337     hash = (53 * hash) + getName().hashCode();
338     hash = (37 * hash) + LIFESPAN_COUNT_FIELD_NUMBER;
339     hash = (53 * hash) + getLifespanCount();
340     if (hasParameters()) {
341       hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
342       hash = (53 * hash) + getParameters().hashCode();
343     }
344     hash = (29 * hash) + getUnknownFields().hashCode();
345     memoizedHashCode = hash;
346     return hash;
347   }
348 
parseFrom(java.nio.ByteBuffer data)349   public static com.google.cloud.dialogflow.v2.Context parseFrom(java.nio.ByteBuffer data)
350       throws com.google.protobuf.InvalidProtocolBufferException {
351     return PARSER.parseFrom(data);
352   }
353 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)354   public static com.google.cloud.dialogflow.v2.Context parseFrom(
355       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
356       throws com.google.protobuf.InvalidProtocolBufferException {
357     return PARSER.parseFrom(data, extensionRegistry);
358   }
359 
parseFrom( com.google.protobuf.ByteString data)360   public static com.google.cloud.dialogflow.v2.Context parseFrom(
361       com.google.protobuf.ByteString data)
362       throws com.google.protobuf.InvalidProtocolBufferException {
363     return PARSER.parseFrom(data);
364   }
365 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)366   public static com.google.cloud.dialogflow.v2.Context parseFrom(
367       com.google.protobuf.ByteString data,
368       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
369       throws com.google.protobuf.InvalidProtocolBufferException {
370     return PARSER.parseFrom(data, extensionRegistry);
371   }
372 
parseFrom(byte[] data)373   public static com.google.cloud.dialogflow.v2.Context parseFrom(byte[] data)
374       throws com.google.protobuf.InvalidProtocolBufferException {
375     return PARSER.parseFrom(data);
376   }
377 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)378   public static com.google.cloud.dialogflow.v2.Context parseFrom(
379       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
380       throws com.google.protobuf.InvalidProtocolBufferException {
381     return PARSER.parseFrom(data, extensionRegistry);
382   }
383 
parseFrom(java.io.InputStream input)384   public static com.google.cloud.dialogflow.v2.Context parseFrom(java.io.InputStream input)
385       throws java.io.IOException {
386     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
387   }
388 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)389   public static com.google.cloud.dialogflow.v2.Context parseFrom(
390       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
391       throws java.io.IOException {
392     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
393         PARSER, input, extensionRegistry);
394   }
395 
parseDelimitedFrom(java.io.InputStream input)396   public static com.google.cloud.dialogflow.v2.Context parseDelimitedFrom(java.io.InputStream input)
397       throws java.io.IOException {
398     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
399   }
400 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)401   public static com.google.cloud.dialogflow.v2.Context parseDelimitedFrom(
402       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
403       throws java.io.IOException {
404     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
405         PARSER, input, extensionRegistry);
406   }
407 
parseFrom( com.google.protobuf.CodedInputStream input)408   public static com.google.cloud.dialogflow.v2.Context parseFrom(
409       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
410     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
411   }
412 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)413   public static com.google.cloud.dialogflow.v2.Context parseFrom(
414       com.google.protobuf.CodedInputStream input,
415       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
416       throws java.io.IOException {
417     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
418         PARSER, input, extensionRegistry);
419   }
420 
421   @java.lang.Override
newBuilderForType()422   public Builder newBuilderForType() {
423     return newBuilder();
424   }
425 
newBuilder()426   public static Builder newBuilder() {
427     return DEFAULT_INSTANCE.toBuilder();
428   }
429 
newBuilder(com.google.cloud.dialogflow.v2.Context prototype)430   public static Builder newBuilder(com.google.cloud.dialogflow.v2.Context prototype) {
431     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
432   }
433 
434   @java.lang.Override
toBuilder()435   public Builder toBuilder() {
436     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
437   }
438 
439   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)440   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
441     Builder builder = new Builder(parent);
442     return builder;
443   }
444   /**
445    *
446    *
447    * <pre>
448    * Dialogflow contexts are similar to natural language context. If a person says
449    * to you "they are orange", you need context in order to understand what "they"
450    * is referring to. Similarly, for Dialogflow to handle an end-user expression
451    * like that, it needs to be provided with context in order to correctly match
452    * an intent.
453    * Using contexts, you can control the flow of a conversation. You can configure
454    * contexts for an intent by setting input and output contexts, which are
455    * identified by string names. When an intent is matched, any configured output
456    * contexts for that intent become active. While any contexts are active,
457    * Dialogflow is more likely to match intents that are configured with input
458    * contexts that correspond to the currently active contexts.
459    * For more information about context, see the
460    * [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview).
461    * </pre>
462    *
463    * Protobuf type {@code google.cloud.dialogflow.v2.Context}
464    */
465   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
466       implements
467       // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Context)
468       com.google.cloud.dialogflow.v2.ContextOrBuilder {
getDescriptor()469     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
470       return com.google.cloud.dialogflow.v2.ContextProto
471           .internal_static_google_cloud_dialogflow_v2_Context_descriptor;
472     }
473 
474     @java.lang.Override
475     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()476         internalGetFieldAccessorTable() {
477       return com.google.cloud.dialogflow.v2.ContextProto
478           .internal_static_google_cloud_dialogflow_v2_Context_fieldAccessorTable
479           .ensureFieldAccessorsInitialized(
480               com.google.cloud.dialogflow.v2.Context.class,
481               com.google.cloud.dialogflow.v2.Context.Builder.class);
482     }
483 
484     // Construct using com.google.cloud.dialogflow.v2.Context.newBuilder()
Builder()485     private Builder() {}
486 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)487     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
488       super(parent);
489     }
490 
491     @java.lang.Override
clear()492     public Builder clear() {
493       super.clear();
494       bitField0_ = 0;
495       name_ = "";
496       lifespanCount_ = 0;
497       parameters_ = null;
498       if (parametersBuilder_ != null) {
499         parametersBuilder_.dispose();
500         parametersBuilder_ = null;
501       }
502       return this;
503     }
504 
505     @java.lang.Override
getDescriptorForType()506     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
507       return com.google.cloud.dialogflow.v2.ContextProto
508           .internal_static_google_cloud_dialogflow_v2_Context_descriptor;
509     }
510 
511     @java.lang.Override
getDefaultInstanceForType()512     public com.google.cloud.dialogflow.v2.Context getDefaultInstanceForType() {
513       return com.google.cloud.dialogflow.v2.Context.getDefaultInstance();
514     }
515 
516     @java.lang.Override
build()517     public com.google.cloud.dialogflow.v2.Context build() {
518       com.google.cloud.dialogflow.v2.Context result = buildPartial();
519       if (!result.isInitialized()) {
520         throw newUninitializedMessageException(result);
521       }
522       return result;
523     }
524 
525     @java.lang.Override
buildPartial()526     public com.google.cloud.dialogflow.v2.Context buildPartial() {
527       com.google.cloud.dialogflow.v2.Context result =
528           new com.google.cloud.dialogflow.v2.Context(this);
529       if (bitField0_ != 0) {
530         buildPartial0(result);
531       }
532       onBuilt();
533       return result;
534     }
535 
buildPartial0(com.google.cloud.dialogflow.v2.Context result)536     private void buildPartial0(com.google.cloud.dialogflow.v2.Context result) {
537       int from_bitField0_ = bitField0_;
538       if (((from_bitField0_ & 0x00000001) != 0)) {
539         result.name_ = name_;
540       }
541       if (((from_bitField0_ & 0x00000002) != 0)) {
542         result.lifespanCount_ = lifespanCount_;
543       }
544       if (((from_bitField0_ & 0x00000004) != 0)) {
545         result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build();
546       }
547     }
548 
549     @java.lang.Override
clone()550     public Builder clone() {
551       return super.clone();
552     }
553 
554     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)555     public Builder setField(
556         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
557       return super.setField(field, value);
558     }
559 
560     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)561     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
562       return super.clearField(field);
563     }
564 
565     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)566     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
567       return super.clearOneof(oneof);
568     }
569 
570     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)571     public Builder setRepeatedField(
572         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
573       return super.setRepeatedField(field, index, value);
574     }
575 
576     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)577     public Builder addRepeatedField(
578         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
579       return super.addRepeatedField(field, value);
580     }
581 
582     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)583     public Builder mergeFrom(com.google.protobuf.Message other) {
584       if (other instanceof com.google.cloud.dialogflow.v2.Context) {
585         return mergeFrom((com.google.cloud.dialogflow.v2.Context) other);
586       } else {
587         super.mergeFrom(other);
588         return this;
589       }
590     }
591 
mergeFrom(com.google.cloud.dialogflow.v2.Context other)592     public Builder mergeFrom(com.google.cloud.dialogflow.v2.Context other) {
593       if (other == com.google.cloud.dialogflow.v2.Context.getDefaultInstance()) return this;
594       if (!other.getName().isEmpty()) {
595         name_ = other.name_;
596         bitField0_ |= 0x00000001;
597         onChanged();
598       }
599       if (other.getLifespanCount() != 0) {
600         setLifespanCount(other.getLifespanCount());
601       }
602       if (other.hasParameters()) {
603         mergeParameters(other.getParameters());
604       }
605       this.mergeUnknownFields(other.getUnknownFields());
606       onChanged();
607       return this;
608     }
609 
610     @java.lang.Override
isInitialized()611     public final boolean isInitialized() {
612       return true;
613     }
614 
615     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)616     public Builder mergeFrom(
617         com.google.protobuf.CodedInputStream input,
618         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
619         throws java.io.IOException {
620       if (extensionRegistry == null) {
621         throw new java.lang.NullPointerException();
622       }
623       try {
624         boolean done = false;
625         while (!done) {
626           int tag = input.readTag();
627           switch (tag) {
628             case 0:
629               done = true;
630               break;
631             case 10:
632               {
633                 name_ = input.readStringRequireUtf8();
634                 bitField0_ |= 0x00000001;
635                 break;
636               } // case 10
637             case 16:
638               {
639                 lifespanCount_ = input.readInt32();
640                 bitField0_ |= 0x00000002;
641                 break;
642               } // case 16
643             case 26:
644               {
645                 input.readMessage(getParametersFieldBuilder().getBuilder(), extensionRegistry);
646                 bitField0_ |= 0x00000004;
647                 break;
648               } // case 26
649             default:
650               {
651                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
652                   done = true; // was an endgroup tag
653                 }
654                 break;
655               } // default:
656           } // switch (tag)
657         } // while (!done)
658       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
659         throw e.unwrapIOException();
660       } finally {
661         onChanged();
662       } // finally
663       return this;
664     }
665 
666     private int bitField0_;
667 
668     private java.lang.Object name_ = "";
669     /**
670      *
671      *
672      * <pre>
673      * Required. The unique identifier of the context. Format:
674      * `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
675      * or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
676      * ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
677      * The `Context ID` is always converted to lowercase, may only contain
678      * characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
679      * If `Environment ID` is not specified, we assume default 'draft'
680      * environment. If `User ID` is not specified, we assume default '-' user.
681      * The following context names are reserved for internal use by Dialogflow.
682      * You should not use these contexts or create contexts with these names:
683      * * `__system_counters__`
684      * * `*_id_dialog_context`
685      * * `*_dialog_params_size`
686      * </pre>
687      *
688      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
689      *
690      * @return The name.
691      */
getName()692     public java.lang.String getName() {
693       java.lang.Object ref = name_;
694       if (!(ref instanceof java.lang.String)) {
695         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
696         java.lang.String s = bs.toStringUtf8();
697         name_ = s;
698         return s;
699       } else {
700         return (java.lang.String) ref;
701       }
702     }
703     /**
704      *
705      *
706      * <pre>
707      * Required. The unique identifier of the context. Format:
708      * `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
709      * or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
710      * ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
711      * The `Context ID` is always converted to lowercase, may only contain
712      * characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
713      * If `Environment ID` is not specified, we assume default 'draft'
714      * environment. If `User ID` is not specified, we assume default '-' user.
715      * The following context names are reserved for internal use by Dialogflow.
716      * You should not use these contexts or create contexts with these names:
717      * * `__system_counters__`
718      * * `*_id_dialog_context`
719      * * `*_dialog_params_size`
720      * </pre>
721      *
722      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
723      *
724      * @return The bytes for name.
725      */
getNameBytes()726     public com.google.protobuf.ByteString getNameBytes() {
727       java.lang.Object ref = name_;
728       if (ref instanceof String) {
729         com.google.protobuf.ByteString b =
730             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
731         name_ = b;
732         return b;
733       } else {
734         return (com.google.protobuf.ByteString) ref;
735       }
736     }
737     /**
738      *
739      *
740      * <pre>
741      * Required. The unique identifier of the context. Format:
742      * `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
743      * or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
744      * ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
745      * The `Context ID` is always converted to lowercase, may only contain
746      * characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
747      * If `Environment ID` is not specified, we assume default 'draft'
748      * environment. If `User ID` is not specified, we assume default '-' user.
749      * The following context names are reserved for internal use by Dialogflow.
750      * You should not use these contexts or create contexts with these names:
751      * * `__system_counters__`
752      * * `*_id_dialog_context`
753      * * `*_dialog_params_size`
754      * </pre>
755      *
756      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
757      *
758      * @param value The name to set.
759      * @return This builder for chaining.
760      */
setName(java.lang.String value)761     public Builder setName(java.lang.String value) {
762       if (value == null) {
763         throw new NullPointerException();
764       }
765       name_ = value;
766       bitField0_ |= 0x00000001;
767       onChanged();
768       return this;
769     }
770     /**
771      *
772      *
773      * <pre>
774      * Required. The unique identifier of the context. Format:
775      * `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
776      * or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
777      * ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
778      * The `Context ID` is always converted to lowercase, may only contain
779      * characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
780      * If `Environment ID` is not specified, we assume default 'draft'
781      * environment. If `User ID` is not specified, we assume default '-' user.
782      * The following context names are reserved for internal use by Dialogflow.
783      * You should not use these contexts or create contexts with these names:
784      * * `__system_counters__`
785      * * `*_id_dialog_context`
786      * * `*_dialog_params_size`
787      * </pre>
788      *
789      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
790      *
791      * @return This builder for chaining.
792      */
clearName()793     public Builder clearName() {
794       name_ = getDefaultInstance().getName();
795       bitField0_ = (bitField0_ & ~0x00000001);
796       onChanged();
797       return this;
798     }
799     /**
800      *
801      *
802      * <pre>
803      * Required. The unique identifier of the context. Format:
804      * `projects/&lt;Project ID&gt;/agent/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`,
805      * or `projects/&lt;Project ID&gt;/agent/environments/&lt;Environment ID&gt;/users/&lt;User
806      * ID&gt;/sessions/&lt;Session ID&gt;/contexts/&lt;Context ID&gt;`.
807      * The `Context ID` is always converted to lowercase, may only contain
808      * characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
809      * If `Environment ID` is not specified, we assume default 'draft'
810      * environment. If `User ID` is not specified, we assume default '-' user.
811      * The following context names are reserved for internal use by Dialogflow.
812      * You should not use these contexts or create contexts with these names:
813      * * `__system_counters__`
814      * * `*_id_dialog_context`
815      * * `*_dialog_params_size`
816      * </pre>
817      *
818      * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
819      *
820      * @param value The bytes for name to set.
821      * @return This builder for chaining.
822      */
setNameBytes(com.google.protobuf.ByteString value)823     public Builder setNameBytes(com.google.protobuf.ByteString value) {
824       if (value == null) {
825         throw new NullPointerException();
826       }
827       checkByteStringIsUtf8(value);
828       name_ = value;
829       bitField0_ |= 0x00000001;
830       onChanged();
831       return this;
832     }
833 
834     private int lifespanCount_;
835     /**
836      *
837      *
838      * <pre>
839      * Optional. The number of conversational query requests after which the
840      * context expires. The default is `0`. If set to `0`, the context expires
841      * immediately. Contexts expire automatically after 20 minutes if there
842      * are no matching queries.
843      * </pre>
844      *
845      * <code>int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
846      *
847      * @return The lifespanCount.
848      */
849     @java.lang.Override
getLifespanCount()850     public int getLifespanCount() {
851       return lifespanCount_;
852     }
853     /**
854      *
855      *
856      * <pre>
857      * Optional. The number of conversational query requests after which the
858      * context expires. The default is `0`. If set to `0`, the context expires
859      * immediately. Contexts expire automatically after 20 minutes if there
860      * are no matching queries.
861      * </pre>
862      *
863      * <code>int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
864      *
865      * @param value The lifespanCount to set.
866      * @return This builder for chaining.
867      */
setLifespanCount(int value)868     public Builder setLifespanCount(int value) {
869 
870       lifespanCount_ = value;
871       bitField0_ |= 0x00000002;
872       onChanged();
873       return this;
874     }
875     /**
876      *
877      *
878      * <pre>
879      * Optional. The number of conversational query requests after which the
880      * context expires. The default is `0`. If set to `0`, the context expires
881      * immediately. Contexts expire automatically after 20 minutes if there
882      * are no matching queries.
883      * </pre>
884      *
885      * <code>int32 lifespan_count = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
886      *
887      * @return This builder for chaining.
888      */
clearLifespanCount()889     public Builder clearLifespanCount() {
890       bitField0_ = (bitField0_ & ~0x00000002);
891       lifespanCount_ = 0;
892       onChanged();
893       return this;
894     }
895 
896     private com.google.protobuf.Struct parameters_;
897     private com.google.protobuf.SingleFieldBuilderV3<
898             com.google.protobuf.Struct,
899             com.google.protobuf.Struct.Builder,
900             com.google.protobuf.StructOrBuilder>
901         parametersBuilder_;
902     /**
903      *
904      *
905      * <pre>
906      * Optional. The collection of parameters associated with this context.
907      * Depending on your protocol or client library language, this is a
908      * map, associative array, symbol table, dictionary, or JSON object
909      * composed of a collection of (MapKey, MapValue) pairs:
910      * -   MapKey type: string
911      * -   MapKey value: parameter name
912      * -   MapValue type:
913      *     -   If parameter's entity type is a composite entity: map
914      *     -   Else: depending on parameter value type, could be one of string,
915      *         number, boolean, null, list or map
916      * -   MapValue value:
917      *     -   If parameter's entity type is a composite entity:
918      *         map from composite entity property names to property values
919      *     -   Else: parameter value
920      * </pre>
921      *
922      * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
923      * </code>
924      *
925      * @return Whether the parameters field is set.
926      */
hasParameters()927     public boolean hasParameters() {
928       return ((bitField0_ & 0x00000004) != 0);
929     }
930     /**
931      *
932      *
933      * <pre>
934      * Optional. The collection of parameters associated with this context.
935      * Depending on your protocol or client library language, this is a
936      * map, associative array, symbol table, dictionary, or JSON object
937      * composed of a collection of (MapKey, MapValue) pairs:
938      * -   MapKey type: string
939      * -   MapKey value: parameter name
940      * -   MapValue type:
941      *     -   If parameter's entity type is a composite entity: map
942      *     -   Else: depending on parameter value type, could be one of string,
943      *         number, boolean, null, list or map
944      * -   MapValue value:
945      *     -   If parameter's entity type is a composite entity:
946      *         map from composite entity property names to property values
947      *     -   Else: parameter value
948      * </pre>
949      *
950      * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
951      * </code>
952      *
953      * @return The parameters.
954      */
getParameters()955     public com.google.protobuf.Struct getParameters() {
956       if (parametersBuilder_ == null) {
957         return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_;
958       } else {
959         return parametersBuilder_.getMessage();
960       }
961     }
962     /**
963      *
964      *
965      * <pre>
966      * Optional. The collection of parameters associated with this context.
967      * Depending on your protocol or client library language, this is a
968      * map, associative array, symbol table, dictionary, or JSON object
969      * composed of a collection of (MapKey, MapValue) pairs:
970      * -   MapKey type: string
971      * -   MapKey value: parameter name
972      * -   MapValue type:
973      *     -   If parameter's entity type is a composite entity: map
974      *     -   Else: depending on parameter value type, could be one of string,
975      *         number, boolean, null, list or map
976      * -   MapValue value:
977      *     -   If parameter's entity type is a composite entity:
978      *         map from composite entity property names to property values
979      *     -   Else: parameter value
980      * </pre>
981      *
982      * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
983      * </code>
984      */
setParameters(com.google.protobuf.Struct value)985     public Builder setParameters(com.google.protobuf.Struct value) {
986       if (parametersBuilder_ == null) {
987         if (value == null) {
988           throw new NullPointerException();
989         }
990         parameters_ = value;
991       } else {
992         parametersBuilder_.setMessage(value);
993       }
994       bitField0_ |= 0x00000004;
995       onChanged();
996       return this;
997     }
998     /**
999      *
1000      *
1001      * <pre>
1002      * Optional. The collection of parameters associated with this context.
1003      * Depending on your protocol or client library language, this is a
1004      * map, associative array, symbol table, dictionary, or JSON object
1005      * composed of a collection of (MapKey, MapValue) pairs:
1006      * -   MapKey type: string
1007      * -   MapKey value: parameter name
1008      * -   MapValue type:
1009      *     -   If parameter's entity type is a composite entity: map
1010      *     -   Else: depending on parameter value type, could be one of string,
1011      *         number, boolean, null, list or map
1012      * -   MapValue value:
1013      *     -   If parameter's entity type is a composite entity:
1014      *         map from composite entity property names to property values
1015      *     -   Else: parameter value
1016      * </pre>
1017      *
1018      * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
1019      * </code>
1020      */
setParameters(com.google.protobuf.Struct.Builder builderForValue)1021     public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) {
1022       if (parametersBuilder_ == null) {
1023         parameters_ = builderForValue.build();
1024       } else {
1025         parametersBuilder_.setMessage(builderForValue.build());
1026       }
1027       bitField0_ |= 0x00000004;
1028       onChanged();
1029       return this;
1030     }
1031     /**
1032      *
1033      *
1034      * <pre>
1035      * Optional. The collection of parameters associated with this context.
1036      * Depending on your protocol or client library language, this is a
1037      * map, associative array, symbol table, dictionary, or JSON object
1038      * composed of a collection of (MapKey, MapValue) pairs:
1039      * -   MapKey type: string
1040      * -   MapKey value: parameter name
1041      * -   MapValue type:
1042      *     -   If parameter's entity type is a composite entity: map
1043      *     -   Else: depending on parameter value type, could be one of string,
1044      *         number, boolean, null, list or map
1045      * -   MapValue value:
1046      *     -   If parameter's entity type is a composite entity:
1047      *         map from composite entity property names to property values
1048      *     -   Else: parameter value
1049      * </pre>
1050      *
1051      * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
1052      * </code>
1053      */
mergeParameters(com.google.protobuf.Struct value)1054     public Builder mergeParameters(com.google.protobuf.Struct value) {
1055       if (parametersBuilder_ == null) {
1056         if (((bitField0_ & 0x00000004) != 0)
1057             && parameters_ != null
1058             && parameters_ != com.google.protobuf.Struct.getDefaultInstance()) {
1059           getParametersBuilder().mergeFrom(value);
1060         } else {
1061           parameters_ = value;
1062         }
1063       } else {
1064         parametersBuilder_.mergeFrom(value);
1065       }
1066       bitField0_ |= 0x00000004;
1067       onChanged();
1068       return this;
1069     }
1070     /**
1071      *
1072      *
1073      * <pre>
1074      * Optional. The collection of parameters associated with this context.
1075      * Depending on your protocol or client library language, this is a
1076      * map, associative array, symbol table, dictionary, or JSON object
1077      * composed of a collection of (MapKey, MapValue) pairs:
1078      * -   MapKey type: string
1079      * -   MapKey value: parameter name
1080      * -   MapValue type:
1081      *     -   If parameter's entity type is a composite entity: map
1082      *     -   Else: depending on parameter value type, could be one of string,
1083      *         number, boolean, null, list or map
1084      * -   MapValue value:
1085      *     -   If parameter's entity type is a composite entity:
1086      *         map from composite entity property names to property values
1087      *     -   Else: parameter value
1088      * </pre>
1089      *
1090      * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
1091      * </code>
1092      */
clearParameters()1093     public Builder clearParameters() {
1094       bitField0_ = (bitField0_ & ~0x00000004);
1095       parameters_ = null;
1096       if (parametersBuilder_ != null) {
1097         parametersBuilder_.dispose();
1098         parametersBuilder_ = null;
1099       }
1100       onChanged();
1101       return this;
1102     }
1103     /**
1104      *
1105      *
1106      * <pre>
1107      * Optional. The collection of parameters associated with this context.
1108      * Depending on your protocol or client library language, this is a
1109      * map, associative array, symbol table, dictionary, or JSON object
1110      * composed of a collection of (MapKey, MapValue) pairs:
1111      * -   MapKey type: string
1112      * -   MapKey value: parameter name
1113      * -   MapValue type:
1114      *     -   If parameter's entity type is a composite entity: map
1115      *     -   Else: depending on parameter value type, could be one of string,
1116      *         number, boolean, null, list or map
1117      * -   MapValue value:
1118      *     -   If parameter's entity type is a composite entity:
1119      *         map from composite entity property names to property values
1120      *     -   Else: parameter value
1121      * </pre>
1122      *
1123      * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
1124      * </code>
1125      */
getParametersBuilder()1126     public com.google.protobuf.Struct.Builder getParametersBuilder() {
1127       bitField0_ |= 0x00000004;
1128       onChanged();
1129       return getParametersFieldBuilder().getBuilder();
1130     }
1131     /**
1132      *
1133      *
1134      * <pre>
1135      * Optional. The collection of parameters associated with this context.
1136      * Depending on your protocol or client library language, this is a
1137      * map, associative array, symbol table, dictionary, or JSON object
1138      * composed of a collection of (MapKey, MapValue) pairs:
1139      * -   MapKey type: string
1140      * -   MapKey value: parameter name
1141      * -   MapValue type:
1142      *     -   If parameter's entity type is a composite entity: map
1143      *     -   Else: depending on parameter value type, could be one of string,
1144      *         number, boolean, null, list or map
1145      * -   MapValue value:
1146      *     -   If parameter's entity type is a composite entity:
1147      *         map from composite entity property names to property values
1148      *     -   Else: parameter value
1149      * </pre>
1150      *
1151      * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
1152      * </code>
1153      */
getParametersOrBuilder()1154     public com.google.protobuf.StructOrBuilder getParametersOrBuilder() {
1155       if (parametersBuilder_ != null) {
1156         return parametersBuilder_.getMessageOrBuilder();
1157       } else {
1158         return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_;
1159       }
1160     }
1161     /**
1162      *
1163      *
1164      * <pre>
1165      * Optional. The collection of parameters associated with this context.
1166      * Depending on your protocol or client library language, this is a
1167      * map, associative array, symbol table, dictionary, or JSON object
1168      * composed of a collection of (MapKey, MapValue) pairs:
1169      * -   MapKey type: string
1170      * -   MapKey value: parameter name
1171      * -   MapValue type:
1172      *     -   If parameter's entity type is a composite entity: map
1173      *     -   Else: depending on parameter value type, could be one of string,
1174      *         number, boolean, null, list or map
1175      * -   MapValue value:
1176      *     -   If parameter's entity type is a composite entity:
1177      *         map from composite entity property names to property values
1178      *     -   Else: parameter value
1179      * </pre>
1180      *
1181      * <code>.google.protobuf.Struct parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
1182      * </code>
1183      */
1184     private com.google.protobuf.SingleFieldBuilderV3<
1185             com.google.protobuf.Struct,
1186             com.google.protobuf.Struct.Builder,
1187             com.google.protobuf.StructOrBuilder>
getParametersFieldBuilder()1188         getParametersFieldBuilder() {
1189       if (parametersBuilder_ == null) {
1190         parametersBuilder_ =
1191             new com.google.protobuf.SingleFieldBuilderV3<
1192                 com.google.protobuf.Struct,
1193                 com.google.protobuf.Struct.Builder,
1194                 com.google.protobuf.StructOrBuilder>(
1195                 getParameters(), getParentForChildren(), isClean());
1196         parameters_ = null;
1197       }
1198       return parametersBuilder_;
1199     }
1200 
1201     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1202     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1203       return super.setUnknownFields(unknownFields);
1204     }
1205 
1206     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1207     public final Builder mergeUnknownFields(
1208         final com.google.protobuf.UnknownFieldSet unknownFields) {
1209       return super.mergeUnknownFields(unknownFields);
1210     }
1211 
1212     // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Context)
1213   }
1214 
1215   // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Context)
1216   private static final com.google.cloud.dialogflow.v2.Context DEFAULT_INSTANCE;
1217 
1218   static {
1219     DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Context();
1220   }
1221 
getDefaultInstance()1222   public static com.google.cloud.dialogflow.v2.Context getDefaultInstance() {
1223     return DEFAULT_INSTANCE;
1224   }
1225 
1226   private static final com.google.protobuf.Parser<Context> PARSER =
1227       new com.google.protobuf.AbstractParser<Context>() {
1228         @java.lang.Override
1229         public Context parsePartialFrom(
1230             com.google.protobuf.CodedInputStream input,
1231             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1232             throws com.google.protobuf.InvalidProtocolBufferException {
1233           Builder builder = newBuilder();
1234           try {
1235             builder.mergeFrom(input, extensionRegistry);
1236           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1237             throw e.setUnfinishedMessage(builder.buildPartial());
1238           } catch (com.google.protobuf.UninitializedMessageException e) {
1239             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1240           } catch (java.io.IOException e) {
1241             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1242                 .setUnfinishedMessage(builder.buildPartial());
1243           }
1244           return builder.buildPartial();
1245         }
1246       };
1247 
parser()1248   public static com.google.protobuf.Parser<Context> parser() {
1249     return PARSER;
1250   }
1251 
1252   @java.lang.Override
getParserForType()1253   public com.google.protobuf.Parser<Context> getParserForType() {
1254     return PARSER;
1255   }
1256 
1257   @java.lang.Override
getDefaultInstanceForType()1258   public com.google.cloud.dialogflow.v2.Context getDefaultInstanceForType() {
1259     return DEFAULT_INSTANCE;
1260   }
1261 }
1262