• 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/session.proto
18 
19 package com.google.cloud.dialogflow.v2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * The sentiment, such as positive/negative feeling or association, for a unit
26  * of analysis, such as the query text. See:
27  * https://cloud.google.com/natural-language/docs/basics#interpreting_sentiment_analysis_values
28  * for how to interpret the result.
29  * </pre>
30  *
31  * Protobuf type {@code google.cloud.dialogflow.v2.Sentiment}
32  */
33 public final class Sentiment extends com.google.protobuf.GeneratedMessageV3
34     implements
35     // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Sentiment)
36     SentimentOrBuilder {
37   private static final long serialVersionUID = 0L;
38   // Use Sentiment.newBuilder() to construct.
Sentiment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)39   private Sentiment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
40     super(builder);
41   }
42 
Sentiment()43   private Sentiment() {}
44 
45   @java.lang.Override
46   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)47   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
48     return new Sentiment();
49   }
50 
51   @java.lang.Override
getUnknownFields()52   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53     return this.unknownFields;
54   }
55 
getDescriptor()56   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
57     return com.google.cloud.dialogflow.v2.SessionProto
58         .internal_static_google_cloud_dialogflow_v2_Sentiment_descriptor;
59   }
60 
61   @java.lang.Override
62   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()63       internalGetFieldAccessorTable() {
64     return com.google.cloud.dialogflow.v2.SessionProto
65         .internal_static_google_cloud_dialogflow_v2_Sentiment_fieldAccessorTable
66         .ensureFieldAccessorsInitialized(
67             com.google.cloud.dialogflow.v2.Sentiment.class,
68             com.google.cloud.dialogflow.v2.Sentiment.Builder.class);
69   }
70 
71   public static final int SCORE_FIELD_NUMBER = 1;
72   private float score_ = 0F;
73   /**
74    *
75    *
76    * <pre>
77    * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
78    * sentiment).
79    * </pre>
80    *
81    * <code>float score = 1;</code>
82    *
83    * @return The score.
84    */
85   @java.lang.Override
getScore()86   public float getScore() {
87     return score_;
88   }
89 
90   public static final int MAGNITUDE_FIELD_NUMBER = 2;
91   private float magnitude_ = 0F;
92   /**
93    *
94    *
95    * <pre>
96    * A non-negative number in the [0, +inf) range, which represents the absolute
97    * magnitude of sentiment, regardless of score (positive or negative).
98    * </pre>
99    *
100    * <code>float magnitude = 2;</code>
101    *
102    * @return The magnitude.
103    */
104   @java.lang.Override
getMagnitude()105   public float getMagnitude() {
106     return magnitude_;
107   }
108 
109   private byte memoizedIsInitialized = -1;
110 
111   @java.lang.Override
isInitialized()112   public final boolean isInitialized() {
113     byte isInitialized = memoizedIsInitialized;
114     if (isInitialized == 1) return true;
115     if (isInitialized == 0) return false;
116 
117     memoizedIsInitialized = 1;
118     return true;
119   }
120 
121   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)122   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
123     if (java.lang.Float.floatToRawIntBits(score_) != 0) {
124       output.writeFloat(1, score_);
125     }
126     if (java.lang.Float.floatToRawIntBits(magnitude_) != 0) {
127       output.writeFloat(2, magnitude_);
128     }
129     getUnknownFields().writeTo(output);
130   }
131 
132   @java.lang.Override
getSerializedSize()133   public int getSerializedSize() {
134     int size = memoizedSize;
135     if (size != -1) return size;
136 
137     size = 0;
138     if (java.lang.Float.floatToRawIntBits(score_) != 0) {
139       size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, score_);
140     }
141     if (java.lang.Float.floatToRawIntBits(magnitude_) != 0) {
142       size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, magnitude_);
143     }
144     size += getUnknownFields().getSerializedSize();
145     memoizedSize = size;
146     return size;
147   }
148 
149   @java.lang.Override
equals(final java.lang.Object obj)150   public boolean equals(final java.lang.Object obj) {
151     if (obj == this) {
152       return true;
153     }
154     if (!(obj instanceof com.google.cloud.dialogflow.v2.Sentiment)) {
155       return super.equals(obj);
156     }
157     com.google.cloud.dialogflow.v2.Sentiment other = (com.google.cloud.dialogflow.v2.Sentiment) obj;
158 
159     if (java.lang.Float.floatToIntBits(getScore())
160         != java.lang.Float.floatToIntBits(other.getScore())) return false;
161     if (java.lang.Float.floatToIntBits(getMagnitude())
162         != java.lang.Float.floatToIntBits(other.getMagnitude())) return false;
163     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
164     return true;
165   }
166 
167   @java.lang.Override
hashCode()168   public int hashCode() {
169     if (memoizedHashCode != 0) {
170       return memoizedHashCode;
171     }
172     int hash = 41;
173     hash = (19 * hash) + getDescriptor().hashCode();
174     hash = (37 * hash) + SCORE_FIELD_NUMBER;
175     hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore());
176     hash = (37 * hash) + MAGNITUDE_FIELD_NUMBER;
177     hash = (53 * hash) + java.lang.Float.floatToIntBits(getMagnitude());
178     hash = (29 * hash) + getUnknownFields().hashCode();
179     memoizedHashCode = hash;
180     return hash;
181   }
182 
parseFrom(java.nio.ByteBuffer data)183   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(java.nio.ByteBuffer data)
184       throws com.google.protobuf.InvalidProtocolBufferException {
185     return PARSER.parseFrom(data);
186   }
187 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)188   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(
189       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
190       throws com.google.protobuf.InvalidProtocolBufferException {
191     return PARSER.parseFrom(data, extensionRegistry);
192   }
193 
parseFrom( com.google.protobuf.ByteString data)194   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(
195       com.google.protobuf.ByteString data)
196       throws com.google.protobuf.InvalidProtocolBufferException {
197     return PARSER.parseFrom(data);
198   }
199 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)200   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(
201       com.google.protobuf.ByteString data,
202       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
203       throws com.google.protobuf.InvalidProtocolBufferException {
204     return PARSER.parseFrom(data, extensionRegistry);
205   }
206 
parseFrom(byte[] data)207   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(byte[] data)
208       throws com.google.protobuf.InvalidProtocolBufferException {
209     return PARSER.parseFrom(data);
210   }
211 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)212   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(
213       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
214       throws com.google.protobuf.InvalidProtocolBufferException {
215     return PARSER.parseFrom(data, extensionRegistry);
216   }
217 
parseFrom(java.io.InputStream input)218   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(java.io.InputStream input)
219       throws java.io.IOException {
220     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
221   }
222 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)223   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(
224       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
225       throws java.io.IOException {
226     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
227         PARSER, input, extensionRegistry);
228   }
229 
parseDelimitedFrom( java.io.InputStream input)230   public static com.google.cloud.dialogflow.v2.Sentiment parseDelimitedFrom(
231       java.io.InputStream input) throws java.io.IOException {
232     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
233   }
234 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)235   public static com.google.cloud.dialogflow.v2.Sentiment parseDelimitedFrom(
236       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
237       throws java.io.IOException {
238     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
239         PARSER, input, extensionRegistry);
240   }
241 
parseFrom( com.google.protobuf.CodedInputStream input)242   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(
243       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
244     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
245   }
246 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)247   public static com.google.cloud.dialogflow.v2.Sentiment parseFrom(
248       com.google.protobuf.CodedInputStream input,
249       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250       throws java.io.IOException {
251     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
252         PARSER, input, extensionRegistry);
253   }
254 
255   @java.lang.Override
newBuilderForType()256   public Builder newBuilderForType() {
257     return newBuilder();
258   }
259 
newBuilder()260   public static Builder newBuilder() {
261     return DEFAULT_INSTANCE.toBuilder();
262   }
263 
newBuilder(com.google.cloud.dialogflow.v2.Sentiment prototype)264   public static Builder newBuilder(com.google.cloud.dialogflow.v2.Sentiment prototype) {
265     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
266   }
267 
268   @java.lang.Override
toBuilder()269   public Builder toBuilder() {
270     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
271   }
272 
273   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)274   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
275     Builder builder = new Builder(parent);
276     return builder;
277   }
278   /**
279    *
280    *
281    * <pre>
282    * The sentiment, such as positive/negative feeling or association, for a unit
283    * of analysis, such as the query text. See:
284    * https://cloud.google.com/natural-language/docs/basics#interpreting_sentiment_analysis_values
285    * for how to interpret the result.
286    * </pre>
287    *
288    * Protobuf type {@code google.cloud.dialogflow.v2.Sentiment}
289    */
290   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
291       implements
292       // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Sentiment)
293       com.google.cloud.dialogflow.v2.SentimentOrBuilder {
getDescriptor()294     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
295       return com.google.cloud.dialogflow.v2.SessionProto
296           .internal_static_google_cloud_dialogflow_v2_Sentiment_descriptor;
297     }
298 
299     @java.lang.Override
300     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()301         internalGetFieldAccessorTable() {
302       return com.google.cloud.dialogflow.v2.SessionProto
303           .internal_static_google_cloud_dialogflow_v2_Sentiment_fieldAccessorTable
304           .ensureFieldAccessorsInitialized(
305               com.google.cloud.dialogflow.v2.Sentiment.class,
306               com.google.cloud.dialogflow.v2.Sentiment.Builder.class);
307     }
308 
309     // Construct using com.google.cloud.dialogflow.v2.Sentiment.newBuilder()
Builder()310     private Builder() {}
311 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)312     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
313       super(parent);
314     }
315 
316     @java.lang.Override
clear()317     public Builder clear() {
318       super.clear();
319       bitField0_ = 0;
320       score_ = 0F;
321       magnitude_ = 0F;
322       return this;
323     }
324 
325     @java.lang.Override
getDescriptorForType()326     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
327       return com.google.cloud.dialogflow.v2.SessionProto
328           .internal_static_google_cloud_dialogflow_v2_Sentiment_descriptor;
329     }
330 
331     @java.lang.Override
getDefaultInstanceForType()332     public com.google.cloud.dialogflow.v2.Sentiment getDefaultInstanceForType() {
333       return com.google.cloud.dialogflow.v2.Sentiment.getDefaultInstance();
334     }
335 
336     @java.lang.Override
build()337     public com.google.cloud.dialogflow.v2.Sentiment build() {
338       com.google.cloud.dialogflow.v2.Sentiment result = buildPartial();
339       if (!result.isInitialized()) {
340         throw newUninitializedMessageException(result);
341       }
342       return result;
343     }
344 
345     @java.lang.Override
buildPartial()346     public com.google.cloud.dialogflow.v2.Sentiment buildPartial() {
347       com.google.cloud.dialogflow.v2.Sentiment result =
348           new com.google.cloud.dialogflow.v2.Sentiment(this);
349       if (bitField0_ != 0) {
350         buildPartial0(result);
351       }
352       onBuilt();
353       return result;
354     }
355 
buildPartial0(com.google.cloud.dialogflow.v2.Sentiment result)356     private void buildPartial0(com.google.cloud.dialogflow.v2.Sentiment result) {
357       int from_bitField0_ = bitField0_;
358       if (((from_bitField0_ & 0x00000001) != 0)) {
359         result.score_ = score_;
360       }
361       if (((from_bitField0_ & 0x00000002) != 0)) {
362         result.magnitude_ = magnitude_;
363       }
364     }
365 
366     @java.lang.Override
clone()367     public Builder clone() {
368       return super.clone();
369     }
370 
371     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)372     public Builder setField(
373         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
374       return super.setField(field, value);
375     }
376 
377     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)378     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
379       return super.clearField(field);
380     }
381 
382     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)383     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
384       return super.clearOneof(oneof);
385     }
386 
387     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)388     public Builder setRepeatedField(
389         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
390       return super.setRepeatedField(field, index, value);
391     }
392 
393     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)394     public Builder addRepeatedField(
395         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
396       return super.addRepeatedField(field, value);
397     }
398 
399     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)400     public Builder mergeFrom(com.google.protobuf.Message other) {
401       if (other instanceof com.google.cloud.dialogflow.v2.Sentiment) {
402         return mergeFrom((com.google.cloud.dialogflow.v2.Sentiment) other);
403       } else {
404         super.mergeFrom(other);
405         return this;
406       }
407     }
408 
mergeFrom(com.google.cloud.dialogflow.v2.Sentiment other)409     public Builder mergeFrom(com.google.cloud.dialogflow.v2.Sentiment other) {
410       if (other == com.google.cloud.dialogflow.v2.Sentiment.getDefaultInstance()) return this;
411       if (other.getScore() != 0F) {
412         setScore(other.getScore());
413       }
414       if (other.getMagnitude() != 0F) {
415         setMagnitude(other.getMagnitude());
416       }
417       this.mergeUnknownFields(other.getUnknownFields());
418       onChanged();
419       return this;
420     }
421 
422     @java.lang.Override
isInitialized()423     public final boolean isInitialized() {
424       return true;
425     }
426 
427     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)428     public Builder mergeFrom(
429         com.google.protobuf.CodedInputStream input,
430         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
431         throws java.io.IOException {
432       if (extensionRegistry == null) {
433         throw new java.lang.NullPointerException();
434       }
435       try {
436         boolean done = false;
437         while (!done) {
438           int tag = input.readTag();
439           switch (tag) {
440             case 0:
441               done = true;
442               break;
443             case 13:
444               {
445                 score_ = input.readFloat();
446                 bitField0_ |= 0x00000001;
447                 break;
448               } // case 13
449             case 21:
450               {
451                 magnitude_ = input.readFloat();
452                 bitField0_ |= 0x00000002;
453                 break;
454               } // case 21
455             default:
456               {
457                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
458                   done = true; // was an endgroup tag
459                 }
460                 break;
461               } // default:
462           } // switch (tag)
463         } // while (!done)
464       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
465         throw e.unwrapIOException();
466       } finally {
467         onChanged();
468       } // finally
469       return this;
470     }
471 
472     private int bitField0_;
473 
474     private float score_;
475     /**
476      *
477      *
478      * <pre>
479      * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
480      * sentiment).
481      * </pre>
482      *
483      * <code>float score = 1;</code>
484      *
485      * @return The score.
486      */
487     @java.lang.Override
getScore()488     public float getScore() {
489       return score_;
490     }
491     /**
492      *
493      *
494      * <pre>
495      * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
496      * sentiment).
497      * </pre>
498      *
499      * <code>float score = 1;</code>
500      *
501      * @param value The score to set.
502      * @return This builder for chaining.
503      */
setScore(float value)504     public Builder setScore(float value) {
505 
506       score_ = value;
507       bitField0_ |= 0x00000001;
508       onChanged();
509       return this;
510     }
511     /**
512      *
513      *
514      * <pre>
515      * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
516      * sentiment).
517      * </pre>
518      *
519      * <code>float score = 1;</code>
520      *
521      * @return This builder for chaining.
522      */
clearScore()523     public Builder clearScore() {
524       bitField0_ = (bitField0_ & ~0x00000001);
525       score_ = 0F;
526       onChanged();
527       return this;
528     }
529 
530     private float magnitude_;
531     /**
532      *
533      *
534      * <pre>
535      * A non-negative number in the [0, +inf) range, which represents the absolute
536      * magnitude of sentiment, regardless of score (positive or negative).
537      * </pre>
538      *
539      * <code>float magnitude = 2;</code>
540      *
541      * @return The magnitude.
542      */
543     @java.lang.Override
getMagnitude()544     public float getMagnitude() {
545       return magnitude_;
546     }
547     /**
548      *
549      *
550      * <pre>
551      * A non-negative number in the [0, +inf) range, which represents the absolute
552      * magnitude of sentiment, regardless of score (positive or negative).
553      * </pre>
554      *
555      * <code>float magnitude = 2;</code>
556      *
557      * @param value The magnitude to set.
558      * @return This builder for chaining.
559      */
setMagnitude(float value)560     public Builder setMagnitude(float value) {
561 
562       magnitude_ = value;
563       bitField0_ |= 0x00000002;
564       onChanged();
565       return this;
566     }
567     /**
568      *
569      *
570      * <pre>
571      * A non-negative number in the [0, +inf) range, which represents the absolute
572      * magnitude of sentiment, regardless of score (positive or negative).
573      * </pre>
574      *
575      * <code>float magnitude = 2;</code>
576      *
577      * @return This builder for chaining.
578      */
clearMagnitude()579     public Builder clearMagnitude() {
580       bitField0_ = (bitField0_ & ~0x00000002);
581       magnitude_ = 0F;
582       onChanged();
583       return this;
584     }
585 
586     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)587     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
588       return super.setUnknownFields(unknownFields);
589     }
590 
591     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)592     public final Builder mergeUnknownFields(
593         final com.google.protobuf.UnknownFieldSet unknownFields) {
594       return super.mergeUnknownFields(unknownFields);
595     }
596 
597     // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Sentiment)
598   }
599 
600   // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Sentiment)
601   private static final com.google.cloud.dialogflow.v2.Sentiment DEFAULT_INSTANCE;
602 
603   static {
604     DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Sentiment();
605   }
606 
getDefaultInstance()607   public static com.google.cloud.dialogflow.v2.Sentiment getDefaultInstance() {
608     return DEFAULT_INSTANCE;
609   }
610 
611   private static final com.google.protobuf.Parser<Sentiment> PARSER =
612       new com.google.protobuf.AbstractParser<Sentiment>() {
613         @java.lang.Override
614         public Sentiment parsePartialFrom(
615             com.google.protobuf.CodedInputStream input,
616             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
617             throws com.google.protobuf.InvalidProtocolBufferException {
618           Builder builder = newBuilder();
619           try {
620             builder.mergeFrom(input, extensionRegistry);
621           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
622             throw e.setUnfinishedMessage(builder.buildPartial());
623           } catch (com.google.protobuf.UninitializedMessageException e) {
624             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
625           } catch (java.io.IOException e) {
626             throw new com.google.protobuf.InvalidProtocolBufferException(e)
627                 .setUnfinishedMessage(builder.buildPartial());
628           }
629           return builder.buildPartial();
630         }
631       };
632 
parser()633   public static com.google.protobuf.Parser<Sentiment> parser() {
634     return PARSER;
635   }
636 
637   @java.lang.Override
getParserForType()638   public com.google.protobuf.Parser<Sentiment> getParserForType() {
639     return PARSER;
640   }
641 
642   @java.lang.Override
getDefaultInstanceForType()643   public com.google.cloud.dialogflow.v2.Sentiment getDefaultInstanceForType() {
644     return DEFAULT_INSTANCE;
645   }
646 }
647