• 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/validation_result.proto
18 
19 package com.google.cloud.dialogflow.v2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents a single validation error.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.dialogflow.v2.ValidationError}
29  */
30 public final class ValidationError extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.ValidationError)
33     ValidationErrorOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use ValidationError.newBuilder() to construct.
ValidationError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private ValidationError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
ValidationError()40   private ValidationError() {
41     severity_ = 0;
42     entries_ = com.google.protobuf.LazyStringArrayList.EMPTY;
43     errorMessage_ = "";
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new ValidationError();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.cloud.dialogflow.v2.ValidationResultProto
59         .internal_static_google_cloud_dialogflow_v2_ValidationError_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.cloud.dialogflow.v2.ValidationResultProto
66         .internal_static_google_cloud_dialogflow_v2_ValidationError_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloud.dialogflow.v2.ValidationError.class,
69             com.google.cloud.dialogflow.v2.ValidationError.Builder.class);
70   }
71 
72   /**
73    *
74    *
75    * <pre>
76    * Represents a level of severity.
77    * </pre>
78    *
79    * Protobuf enum {@code google.cloud.dialogflow.v2.ValidationError.Severity}
80    */
81   public enum Severity implements com.google.protobuf.ProtocolMessageEnum {
82     /**
83      *
84      *
85      * <pre>
86      * Not specified. This value should never be used.
87      * </pre>
88      *
89      * <code>SEVERITY_UNSPECIFIED = 0;</code>
90      */
91     SEVERITY_UNSPECIFIED(0),
92     /**
93      *
94      *
95      * <pre>
96      * The agent doesn't follow Dialogflow best practices.
97      * </pre>
98      *
99      * <code>INFO = 1;</code>
100      */
101     INFO(1),
102     /**
103      *
104      *
105      * <pre>
106      * The agent may not behave as expected.
107      * </pre>
108      *
109      * <code>WARNING = 2;</code>
110      */
111     WARNING(2),
112     /**
113      *
114      *
115      * <pre>
116      * The agent may experience partial failures.
117      * </pre>
118      *
119      * <code>ERROR = 3;</code>
120      */
121     ERROR(3),
122     /**
123      *
124      *
125      * <pre>
126      * The agent may completely fail.
127      * </pre>
128      *
129      * <code>CRITICAL = 4;</code>
130      */
131     CRITICAL(4),
132     UNRECOGNIZED(-1),
133     ;
134 
135     /**
136      *
137      *
138      * <pre>
139      * Not specified. This value should never be used.
140      * </pre>
141      *
142      * <code>SEVERITY_UNSPECIFIED = 0;</code>
143      */
144     public static final int SEVERITY_UNSPECIFIED_VALUE = 0;
145     /**
146      *
147      *
148      * <pre>
149      * The agent doesn't follow Dialogflow best practices.
150      * </pre>
151      *
152      * <code>INFO = 1;</code>
153      */
154     public static final int INFO_VALUE = 1;
155     /**
156      *
157      *
158      * <pre>
159      * The agent may not behave as expected.
160      * </pre>
161      *
162      * <code>WARNING = 2;</code>
163      */
164     public static final int WARNING_VALUE = 2;
165     /**
166      *
167      *
168      * <pre>
169      * The agent may experience partial failures.
170      * </pre>
171      *
172      * <code>ERROR = 3;</code>
173      */
174     public static final int ERROR_VALUE = 3;
175     /**
176      *
177      *
178      * <pre>
179      * The agent may completely fail.
180      * </pre>
181      *
182      * <code>CRITICAL = 4;</code>
183      */
184     public static final int CRITICAL_VALUE = 4;
185 
getNumber()186     public final int getNumber() {
187       if (this == UNRECOGNIZED) {
188         throw new java.lang.IllegalArgumentException(
189             "Can't get the number of an unknown enum value.");
190       }
191       return value;
192     }
193 
194     /**
195      * @param value The numeric wire value of the corresponding enum entry.
196      * @return The enum associated with the given numeric wire value.
197      * @deprecated Use {@link #forNumber(int)} instead.
198      */
199     @java.lang.Deprecated
valueOf(int value)200     public static Severity valueOf(int value) {
201       return forNumber(value);
202     }
203 
204     /**
205      * @param value The numeric wire value of the corresponding enum entry.
206      * @return The enum associated with the given numeric wire value.
207      */
forNumber(int value)208     public static Severity forNumber(int value) {
209       switch (value) {
210         case 0:
211           return SEVERITY_UNSPECIFIED;
212         case 1:
213           return INFO;
214         case 2:
215           return WARNING;
216         case 3:
217           return ERROR;
218         case 4:
219           return CRITICAL;
220         default:
221           return null;
222       }
223     }
224 
internalGetValueMap()225     public static com.google.protobuf.Internal.EnumLiteMap<Severity> internalGetValueMap() {
226       return internalValueMap;
227     }
228 
229     private static final com.google.protobuf.Internal.EnumLiteMap<Severity> internalValueMap =
230         new com.google.protobuf.Internal.EnumLiteMap<Severity>() {
231           public Severity findValueByNumber(int number) {
232             return Severity.forNumber(number);
233           }
234         };
235 
getValueDescriptor()236     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
237       if (this == UNRECOGNIZED) {
238         throw new java.lang.IllegalStateException(
239             "Can't get the descriptor of an unrecognized enum value.");
240       }
241       return getDescriptor().getValues().get(ordinal());
242     }
243 
getDescriptorForType()244     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
245       return getDescriptor();
246     }
247 
getDescriptor()248     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
249       return com.google.cloud.dialogflow.v2.ValidationError.getDescriptor().getEnumTypes().get(0);
250     }
251 
252     private static final Severity[] VALUES = values();
253 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)254     public static Severity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
255       if (desc.getType() != getDescriptor()) {
256         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
257       }
258       if (desc.getIndex() == -1) {
259         return UNRECOGNIZED;
260       }
261       return VALUES[desc.getIndex()];
262     }
263 
264     private final int value;
265 
Severity(int value)266     private Severity(int value) {
267       this.value = value;
268     }
269 
270     // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.ValidationError.Severity)
271   }
272 
273   public static final int SEVERITY_FIELD_NUMBER = 1;
274   private int severity_ = 0;
275   /**
276    *
277    *
278    * <pre>
279    * The severity of the error.
280    * </pre>
281    *
282    * <code>.google.cloud.dialogflow.v2.ValidationError.Severity severity = 1;</code>
283    *
284    * @return The enum numeric value on the wire for severity.
285    */
286   @java.lang.Override
getSeverityValue()287   public int getSeverityValue() {
288     return severity_;
289   }
290   /**
291    *
292    *
293    * <pre>
294    * The severity of the error.
295    * </pre>
296    *
297    * <code>.google.cloud.dialogflow.v2.ValidationError.Severity severity = 1;</code>
298    *
299    * @return The severity.
300    */
301   @java.lang.Override
getSeverity()302   public com.google.cloud.dialogflow.v2.ValidationError.Severity getSeverity() {
303     com.google.cloud.dialogflow.v2.ValidationError.Severity result =
304         com.google.cloud.dialogflow.v2.ValidationError.Severity.forNumber(severity_);
305     return result == null
306         ? com.google.cloud.dialogflow.v2.ValidationError.Severity.UNRECOGNIZED
307         : result;
308   }
309 
310   public static final int ENTRIES_FIELD_NUMBER = 3;
311 
312   @SuppressWarnings("serial")
313   private com.google.protobuf.LazyStringList entries_;
314   /**
315    *
316    *
317    * <pre>
318    * The names of the entries that the error is associated with.
319    * Format:
320    * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
321    * agent.
322    * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
323    * associated with certain intents.
324    * - "projects/&lt;Project
325    * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
326    * error is associated with certain intent training phrases.
327    * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
328    * ID&gt;", if the error is associated with certain intent parameters.
329    * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
330    * associated with certain entities.
331    * </pre>
332    *
333    * <code>repeated string entries = 3;</code>
334    *
335    * @return A list containing the entries.
336    */
getEntriesList()337   public com.google.protobuf.ProtocolStringList getEntriesList() {
338     return entries_;
339   }
340   /**
341    *
342    *
343    * <pre>
344    * The names of the entries that the error is associated with.
345    * Format:
346    * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
347    * agent.
348    * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
349    * associated with certain intents.
350    * - "projects/&lt;Project
351    * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
352    * error is associated with certain intent training phrases.
353    * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
354    * ID&gt;", if the error is associated with certain intent parameters.
355    * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
356    * associated with certain entities.
357    * </pre>
358    *
359    * <code>repeated string entries = 3;</code>
360    *
361    * @return The count of entries.
362    */
getEntriesCount()363   public int getEntriesCount() {
364     return entries_.size();
365   }
366   /**
367    *
368    *
369    * <pre>
370    * The names of the entries that the error is associated with.
371    * Format:
372    * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
373    * agent.
374    * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
375    * associated with certain intents.
376    * - "projects/&lt;Project
377    * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
378    * error is associated with certain intent training phrases.
379    * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
380    * ID&gt;", if the error is associated with certain intent parameters.
381    * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
382    * associated with certain entities.
383    * </pre>
384    *
385    * <code>repeated string entries = 3;</code>
386    *
387    * @param index The index of the element to return.
388    * @return The entries at the given index.
389    */
getEntries(int index)390   public java.lang.String getEntries(int index) {
391     return entries_.get(index);
392   }
393   /**
394    *
395    *
396    * <pre>
397    * The names of the entries that the error is associated with.
398    * Format:
399    * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
400    * agent.
401    * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
402    * associated with certain intents.
403    * - "projects/&lt;Project
404    * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
405    * error is associated with certain intent training phrases.
406    * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
407    * ID&gt;", if the error is associated with certain intent parameters.
408    * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
409    * associated with certain entities.
410    * </pre>
411    *
412    * <code>repeated string entries = 3;</code>
413    *
414    * @param index The index of the value to return.
415    * @return The bytes of the entries at the given index.
416    */
getEntriesBytes(int index)417   public com.google.protobuf.ByteString getEntriesBytes(int index) {
418     return entries_.getByteString(index);
419   }
420 
421   public static final int ERROR_MESSAGE_FIELD_NUMBER = 4;
422 
423   @SuppressWarnings("serial")
424   private volatile java.lang.Object errorMessage_ = "";
425   /**
426    *
427    *
428    * <pre>
429    * The detailed error message.
430    * </pre>
431    *
432    * <code>string error_message = 4;</code>
433    *
434    * @return The errorMessage.
435    */
436   @java.lang.Override
getErrorMessage()437   public java.lang.String getErrorMessage() {
438     java.lang.Object ref = errorMessage_;
439     if (ref instanceof java.lang.String) {
440       return (java.lang.String) ref;
441     } else {
442       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
443       java.lang.String s = bs.toStringUtf8();
444       errorMessage_ = s;
445       return s;
446     }
447   }
448   /**
449    *
450    *
451    * <pre>
452    * The detailed error message.
453    * </pre>
454    *
455    * <code>string error_message = 4;</code>
456    *
457    * @return The bytes for errorMessage.
458    */
459   @java.lang.Override
getErrorMessageBytes()460   public com.google.protobuf.ByteString getErrorMessageBytes() {
461     java.lang.Object ref = errorMessage_;
462     if (ref instanceof java.lang.String) {
463       com.google.protobuf.ByteString b =
464           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
465       errorMessage_ = b;
466       return b;
467     } else {
468       return (com.google.protobuf.ByteString) ref;
469     }
470   }
471 
472   private byte memoizedIsInitialized = -1;
473 
474   @java.lang.Override
isInitialized()475   public final boolean isInitialized() {
476     byte isInitialized = memoizedIsInitialized;
477     if (isInitialized == 1) return true;
478     if (isInitialized == 0) return false;
479 
480     memoizedIsInitialized = 1;
481     return true;
482   }
483 
484   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)485   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
486     if (severity_
487         != com.google.cloud.dialogflow.v2.ValidationError.Severity.SEVERITY_UNSPECIFIED
488             .getNumber()) {
489       output.writeEnum(1, severity_);
490     }
491     for (int i = 0; i < entries_.size(); i++) {
492       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entries_.getRaw(i));
493     }
494     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) {
495       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, errorMessage_);
496     }
497     getUnknownFields().writeTo(output);
498   }
499 
500   @java.lang.Override
getSerializedSize()501   public int getSerializedSize() {
502     int size = memoizedSize;
503     if (size != -1) return size;
504 
505     size = 0;
506     if (severity_
507         != com.google.cloud.dialogflow.v2.ValidationError.Severity.SEVERITY_UNSPECIFIED
508             .getNumber()) {
509       size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, severity_);
510     }
511     {
512       int dataSize = 0;
513       for (int i = 0; i < entries_.size(); i++) {
514         dataSize += computeStringSizeNoTag(entries_.getRaw(i));
515       }
516       size += dataSize;
517       size += 1 * getEntriesList().size();
518     }
519     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) {
520       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, errorMessage_);
521     }
522     size += getUnknownFields().getSerializedSize();
523     memoizedSize = size;
524     return size;
525   }
526 
527   @java.lang.Override
equals(final java.lang.Object obj)528   public boolean equals(final java.lang.Object obj) {
529     if (obj == this) {
530       return true;
531     }
532     if (!(obj instanceof com.google.cloud.dialogflow.v2.ValidationError)) {
533       return super.equals(obj);
534     }
535     com.google.cloud.dialogflow.v2.ValidationError other =
536         (com.google.cloud.dialogflow.v2.ValidationError) obj;
537 
538     if (severity_ != other.severity_) return false;
539     if (!getEntriesList().equals(other.getEntriesList())) return false;
540     if (!getErrorMessage().equals(other.getErrorMessage())) return false;
541     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
542     return true;
543   }
544 
545   @java.lang.Override
hashCode()546   public int hashCode() {
547     if (memoizedHashCode != 0) {
548       return memoizedHashCode;
549     }
550     int hash = 41;
551     hash = (19 * hash) + getDescriptor().hashCode();
552     hash = (37 * hash) + SEVERITY_FIELD_NUMBER;
553     hash = (53 * hash) + severity_;
554     if (getEntriesCount() > 0) {
555       hash = (37 * hash) + ENTRIES_FIELD_NUMBER;
556       hash = (53 * hash) + getEntriesList().hashCode();
557     }
558     hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER;
559     hash = (53 * hash) + getErrorMessage().hashCode();
560     hash = (29 * hash) + getUnknownFields().hashCode();
561     memoizedHashCode = hash;
562     return hash;
563   }
564 
parseFrom(java.nio.ByteBuffer data)565   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(java.nio.ByteBuffer data)
566       throws com.google.protobuf.InvalidProtocolBufferException {
567     return PARSER.parseFrom(data);
568   }
569 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)570   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(
571       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
572       throws com.google.protobuf.InvalidProtocolBufferException {
573     return PARSER.parseFrom(data, extensionRegistry);
574   }
575 
parseFrom( com.google.protobuf.ByteString data)576   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(
577       com.google.protobuf.ByteString data)
578       throws com.google.protobuf.InvalidProtocolBufferException {
579     return PARSER.parseFrom(data);
580   }
581 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)582   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(
583       com.google.protobuf.ByteString data,
584       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
585       throws com.google.protobuf.InvalidProtocolBufferException {
586     return PARSER.parseFrom(data, extensionRegistry);
587   }
588 
parseFrom(byte[] data)589   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(byte[] data)
590       throws com.google.protobuf.InvalidProtocolBufferException {
591     return PARSER.parseFrom(data);
592   }
593 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)594   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(
595       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
596       throws com.google.protobuf.InvalidProtocolBufferException {
597     return PARSER.parseFrom(data, extensionRegistry);
598   }
599 
parseFrom(java.io.InputStream input)600   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(java.io.InputStream input)
601       throws java.io.IOException {
602     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
603   }
604 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)605   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(
606       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
607       throws java.io.IOException {
608     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
609         PARSER, input, extensionRegistry);
610   }
611 
parseDelimitedFrom( java.io.InputStream input)612   public static com.google.cloud.dialogflow.v2.ValidationError parseDelimitedFrom(
613       java.io.InputStream input) throws java.io.IOException {
614     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
615   }
616 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)617   public static com.google.cloud.dialogflow.v2.ValidationError parseDelimitedFrom(
618       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
619       throws java.io.IOException {
620     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
621         PARSER, input, extensionRegistry);
622   }
623 
parseFrom( com.google.protobuf.CodedInputStream input)624   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(
625       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
626     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
627   }
628 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)629   public static com.google.cloud.dialogflow.v2.ValidationError parseFrom(
630       com.google.protobuf.CodedInputStream input,
631       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
632       throws java.io.IOException {
633     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
634         PARSER, input, extensionRegistry);
635   }
636 
637   @java.lang.Override
newBuilderForType()638   public Builder newBuilderForType() {
639     return newBuilder();
640   }
641 
newBuilder()642   public static Builder newBuilder() {
643     return DEFAULT_INSTANCE.toBuilder();
644   }
645 
newBuilder(com.google.cloud.dialogflow.v2.ValidationError prototype)646   public static Builder newBuilder(com.google.cloud.dialogflow.v2.ValidationError prototype) {
647     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
648   }
649 
650   @java.lang.Override
toBuilder()651   public Builder toBuilder() {
652     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
653   }
654 
655   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)656   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
657     Builder builder = new Builder(parent);
658     return builder;
659   }
660   /**
661    *
662    *
663    * <pre>
664    * Represents a single validation error.
665    * </pre>
666    *
667    * Protobuf type {@code google.cloud.dialogflow.v2.ValidationError}
668    */
669   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
670       implements
671       // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.ValidationError)
672       com.google.cloud.dialogflow.v2.ValidationErrorOrBuilder {
getDescriptor()673     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
674       return com.google.cloud.dialogflow.v2.ValidationResultProto
675           .internal_static_google_cloud_dialogflow_v2_ValidationError_descriptor;
676     }
677 
678     @java.lang.Override
679     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()680         internalGetFieldAccessorTable() {
681       return com.google.cloud.dialogflow.v2.ValidationResultProto
682           .internal_static_google_cloud_dialogflow_v2_ValidationError_fieldAccessorTable
683           .ensureFieldAccessorsInitialized(
684               com.google.cloud.dialogflow.v2.ValidationError.class,
685               com.google.cloud.dialogflow.v2.ValidationError.Builder.class);
686     }
687 
688     // Construct using com.google.cloud.dialogflow.v2.ValidationError.newBuilder()
Builder()689     private Builder() {}
690 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)691     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
692       super(parent);
693     }
694 
695     @java.lang.Override
clear()696     public Builder clear() {
697       super.clear();
698       bitField0_ = 0;
699       severity_ = 0;
700       entries_ = com.google.protobuf.LazyStringArrayList.EMPTY;
701       bitField0_ = (bitField0_ & ~0x00000002);
702       errorMessage_ = "";
703       return this;
704     }
705 
706     @java.lang.Override
getDescriptorForType()707     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
708       return com.google.cloud.dialogflow.v2.ValidationResultProto
709           .internal_static_google_cloud_dialogflow_v2_ValidationError_descriptor;
710     }
711 
712     @java.lang.Override
getDefaultInstanceForType()713     public com.google.cloud.dialogflow.v2.ValidationError getDefaultInstanceForType() {
714       return com.google.cloud.dialogflow.v2.ValidationError.getDefaultInstance();
715     }
716 
717     @java.lang.Override
build()718     public com.google.cloud.dialogflow.v2.ValidationError build() {
719       com.google.cloud.dialogflow.v2.ValidationError result = buildPartial();
720       if (!result.isInitialized()) {
721         throw newUninitializedMessageException(result);
722       }
723       return result;
724     }
725 
726     @java.lang.Override
buildPartial()727     public com.google.cloud.dialogflow.v2.ValidationError buildPartial() {
728       com.google.cloud.dialogflow.v2.ValidationError result =
729           new com.google.cloud.dialogflow.v2.ValidationError(this);
730       buildPartialRepeatedFields(result);
731       if (bitField0_ != 0) {
732         buildPartial0(result);
733       }
734       onBuilt();
735       return result;
736     }
737 
buildPartialRepeatedFields(com.google.cloud.dialogflow.v2.ValidationError result)738     private void buildPartialRepeatedFields(com.google.cloud.dialogflow.v2.ValidationError result) {
739       if (((bitField0_ & 0x00000002) != 0)) {
740         entries_ = entries_.getUnmodifiableView();
741         bitField0_ = (bitField0_ & ~0x00000002);
742       }
743       result.entries_ = entries_;
744     }
745 
buildPartial0(com.google.cloud.dialogflow.v2.ValidationError result)746     private void buildPartial0(com.google.cloud.dialogflow.v2.ValidationError result) {
747       int from_bitField0_ = bitField0_;
748       if (((from_bitField0_ & 0x00000001) != 0)) {
749         result.severity_ = severity_;
750       }
751       if (((from_bitField0_ & 0x00000004) != 0)) {
752         result.errorMessage_ = errorMessage_;
753       }
754     }
755 
756     @java.lang.Override
clone()757     public Builder clone() {
758       return super.clone();
759     }
760 
761     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)762     public Builder setField(
763         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
764       return super.setField(field, value);
765     }
766 
767     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)768     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
769       return super.clearField(field);
770     }
771 
772     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)773     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
774       return super.clearOneof(oneof);
775     }
776 
777     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)778     public Builder setRepeatedField(
779         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
780       return super.setRepeatedField(field, index, value);
781     }
782 
783     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)784     public Builder addRepeatedField(
785         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
786       return super.addRepeatedField(field, value);
787     }
788 
789     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)790     public Builder mergeFrom(com.google.protobuf.Message other) {
791       if (other instanceof com.google.cloud.dialogflow.v2.ValidationError) {
792         return mergeFrom((com.google.cloud.dialogflow.v2.ValidationError) other);
793       } else {
794         super.mergeFrom(other);
795         return this;
796       }
797     }
798 
mergeFrom(com.google.cloud.dialogflow.v2.ValidationError other)799     public Builder mergeFrom(com.google.cloud.dialogflow.v2.ValidationError other) {
800       if (other == com.google.cloud.dialogflow.v2.ValidationError.getDefaultInstance()) return this;
801       if (other.severity_ != 0) {
802         setSeverityValue(other.getSeverityValue());
803       }
804       if (!other.entries_.isEmpty()) {
805         if (entries_.isEmpty()) {
806           entries_ = other.entries_;
807           bitField0_ = (bitField0_ & ~0x00000002);
808         } else {
809           ensureEntriesIsMutable();
810           entries_.addAll(other.entries_);
811         }
812         onChanged();
813       }
814       if (!other.getErrorMessage().isEmpty()) {
815         errorMessage_ = other.errorMessage_;
816         bitField0_ |= 0x00000004;
817         onChanged();
818       }
819       this.mergeUnknownFields(other.getUnknownFields());
820       onChanged();
821       return this;
822     }
823 
824     @java.lang.Override
isInitialized()825     public final boolean isInitialized() {
826       return true;
827     }
828 
829     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)830     public Builder mergeFrom(
831         com.google.protobuf.CodedInputStream input,
832         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
833         throws java.io.IOException {
834       if (extensionRegistry == null) {
835         throw new java.lang.NullPointerException();
836       }
837       try {
838         boolean done = false;
839         while (!done) {
840           int tag = input.readTag();
841           switch (tag) {
842             case 0:
843               done = true;
844               break;
845             case 8:
846               {
847                 severity_ = input.readEnum();
848                 bitField0_ |= 0x00000001;
849                 break;
850               } // case 8
851             case 26:
852               {
853                 java.lang.String s = input.readStringRequireUtf8();
854                 ensureEntriesIsMutable();
855                 entries_.add(s);
856                 break;
857               } // case 26
858             case 34:
859               {
860                 errorMessage_ = input.readStringRequireUtf8();
861                 bitField0_ |= 0x00000004;
862                 break;
863               } // case 34
864             default:
865               {
866                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
867                   done = true; // was an endgroup tag
868                 }
869                 break;
870               } // default:
871           } // switch (tag)
872         } // while (!done)
873       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
874         throw e.unwrapIOException();
875       } finally {
876         onChanged();
877       } // finally
878       return this;
879     }
880 
881     private int bitField0_;
882 
883     private int severity_ = 0;
884     /**
885      *
886      *
887      * <pre>
888      * The severity of the error.
889      * </pre>
890      *
891      * <code>.google.cloud.dialogflow.v2.ValidationError.Severity severity = 1;</code>
892      *
893      * @return The enum numeric value on the wire for severity.
894      */
895     @java.lang.Override
getSeverityValue()896     public int getSeverityValue() {
897       return severity_;
898     }
899     /**
900      *
901      *
902      * <pre>
903      * The severity of the error.
904      * </pre>
905      *
906      * <code>.google.cloud.dialogflow.v2.ValidationError.Severity severity = 1;</code>
907      *
908      * @param value The enum numeric value on the wire for severity to set.
909      * @return This builder for chaining.
910      */
setSeverityValue(int value)911     public Builder setSeverityValue(int value) {
912       severity_ = value;
913       bitField0_ |= 0x00000001;
914       onChanged();
915       return this;
916     }
917     /**
918      *
919      *
920      * <pre>
921      * The severity of the error.
922      * </pre>
923      *
924      * <code>.google.cloud.dialogflow.v2.ValidationError.Severity severity = 1;</code>
925      *
926      * @return The severity.
927      */
928     @java.lang.Override
getSeverity()929     public com.google.cloud.dialogflow.v2.ValidationError.Severity getSeverity() {
930       com.google.cloud.dialogflow.v2.ValidationError.Severity result =
931           com.google.cloud.dialogflow.v2.ValidationError.Severity.forNumber(severity_);
932       return result == null
933           ? com.google.cloud.dialogflow.v2.ValidationError.Severity.UNRECOGNIZED
934           : result;
935     }
936     /**
937      *
938      *
939      * <pre>
940      * The severity of the error.
941      * </pre>
942      *
943      * <code>.google.cloud.dialogflow.v2.ValidationError.Severity severity = 1;</code>
944      *
945      * @param value The severity to set.
946      * @return This builder for chaining.
947      */
setSeverity(com.google.cloud.dialogflow.v2.ValidationError.Severity value)948     public Builder setSeverity(com.google.cloud.dialogflow.v2.ValidationError.Severity value) {
949       if (value == null) {
950         throw new NullPointerException();
951       }
952       bitField0_ |= 0x00000001;
953       severity_ = value.getNumber();
954       onChanged();
955       return this;
956     }
957     /**
958      *
959      *
960      * <pre>
961      * The severity of the error.
962      * </pre>
963      *
964      * <code>.google.cloud.dialogflow.v2.ValidationError.Severity severity = 1;</code>
965      *
966      * @return This builder for chaining.
967      */
clearSeverity()968     public Builder clearSeverity() {
969       bitField0_ = (bitField0_ & ~0x00000001);
970       severity_ = 0;
971       onChanged();
972       return this;
973     }
974 
975     private com.google.protobuf.LazyStringList entries_ =
976         com.google.protobuf.LazyStringArrayList.EMPTY;
977 
ensureEntriesIsMutable()978     private void ensureEntriesIsMutable() {
979       if (!((bitField0_ & 0x00000002) != 0)) {
980         entries_ = new com.google.protobuf.LazyStringArrayList(entries_);
981         bitField0_ |= 0x00000002;
982       }
983     }
984     /**
985      *
986      *
987      * <pre>
988      * The names of the entries that the error is associated with.
989      * Format:
990      * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
991      * agent.
992      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
993      * associated with certain intents.
994      * - "projects/&lt;Project
995      * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
996      * error is associated with certain intent training phrases.
997      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
998      * ID&gt;", if the error is associated with certain intent parameters.
999      * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
1000      * associated with certain entities.
1001      * </pre>
1002      *
1003      * <code>repeated string entries = 3;</code>
1004      *
1005      * @return A list containing the entries.
1006      */
getEntriesList()1007     public com.google.protobuf.ProtocolStringList getEntriesList() {
1008       return entries_.getUnmodifiableView();
1009     }
1010     /**
1011      *
1012      *
1013      * <pre>
1014      * The names of the entries that the error is associated with.
1015      * Format:
1016      * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
1017      * agent.
1018      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
1019      * associated with certain intents.
1020      * - "projects/&lt;Project
1021      * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
1022      * error is associated with certain intent training phrases.
1023      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
1024      * ID&gt;", if the error is associated with certain intent parameters.
1025      * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
1026      * associated with certain entities.
1027      * </pre>
1028      *
1029      * <code>repeated string entries = 3;</code>
1030      *
1031      * @return The count of entries.
1032      */
getEntriesCount()1033     public int getEntriesCount() {
1034       return entries_.size();
1035     }
1036     /**
1037      *
1038      *
1039      * <pre>
1040      * The names of the entries that the error is associated with.
1041      * Format:
1042      * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
1043      * agent.
1044      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
1045      * associated with certain intents.
1046      * - "projects/&lt;Project
1047      * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
1048      * error is associated with certain intent training phrases.
1049      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
1050      * ID&gt;", if the error is associated with certain intent parameters.
1051      * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
1052      * associated with certain entities.
1053      * </pre>
1054      *
1055      * <code>repeated string entries = 3;</code>
1056      *
1057      * @param index The index of the element to return.
1058      * @return The entries at the given index.
1059      */
getEntries(int index)1060     public java.lang.String getEntries(int index) {
1061       return entries_.get(index);
1062     }
1063     /**
1064      *
1065      *
1066      * <pre>
1067      * The names of the entries that the error is associated with.
1068      * Format:
1069      * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
1070      * agent.
1071      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
1072      * associated with certain intents.
1073      * - "projects/&lt;Project
1074      * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
1075      * error is associated with certain intent training phrases.
1076      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
1077      * ID&gt;", if the error is associated with certain intent parameters.
1078      * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
1079      * associated with certain entities.
1080      * </pre>
1081      *
1082      * <code>repeated string entries = 3;</code>
1083      *
1084      * @param index The index of the value to return.
1085      * @return The bytes of the entries at the given index.
1086      */
getEntriesBytes(int index)1087     public com.google.protobuf.ByteString getEntriesBytes(int index) {
1088       return entries_.getByteString(index);
1089     }
1090     /**
1091      *
1092      *
1093      * <pre>
1094      * The names of the entries that the error is associated with.
1095      * Format:
1096      * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
1097      * agent.
1098      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
1099      * associated with certain intents.
1100      * - "projects/&lt;Project
1101      * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
1102      * error is associated with certain intent training phrases.
1103      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
1104      * ID&gt;", if the error is associated with certain intent parameters.
1105      * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
1106      * associated with certain entities.
1107      * </pre>
1108      *
1109      * <code>repeated string entries = 3;</code>
1110      *
1111      * @param index The index to set the value at.
1112      * @param value The entries to set.
1113      * @return This builder for chaining.
1114      */
setEntries(int index, java.lang.String value)1115     public Builder setEntries(int index, java.lang.String value) {
1116       if (value == null) {
1117         throw new NullPointerException();
1118       }
1119       ensureEntriesIsMutable();
1120       entries_.set(index, value);
1121       onChanged();
1122       return this;
1123     }
1124     /**
1125      *
1126      *
1127      * <pre>
1128      * The names of the entries that the error is associated with.
1129      * Format:
1130      * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
1131      * agent.
1132      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
1133      * associated with certain intents.
1134      * - "projects/&lt;Project
1135      * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
1136      * error is associated with certain intent training phrases.
1137      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
1138      * ID&gt;", if the error is associated with certain intent parameters.
1139      * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
1140      * associated with certain entities.
1141      * </pre>
1142      *
1143      * <code>repeated string entries = 3;</code>
1144      *
1145      * @param value The entries to add.
1146      * @return This builder for chaining.
1147      */
addEntries(java.lang.String value)1148     public Builder addEntries(java.lang.String value) {
1149       if (value == null) {
1150         throw new NullPointerException();
1151       }
1152       ensureEntriesIsMutable();
1153       entries_.add(value);
1154       onChanged();
1155       return this;
1156     }
1157     /**
1158      *
1159      *
1160      * <pre>
1161      * The names of the entries that the error is associated with.
1162      * Format:
1163      * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
1164      * agent.
1165      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
1166      * associated with certain intents.
1167      * - "projects/&lt;Project
1168      * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
1169      * error is associated with certain intent training phrases.
1170      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
1171      * ID&gt;", if the error is associated with certain intent parameters.
1172      * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
1173      * associated with certain entities.
1174      * </pre>
1175      *
1176      * <code>repeated string entries = 3;</code>
1177      *
1178      * @param values The entries to add.
1179      * @return This builder for chaining.
1180      */
addAllEntries(java.lang.Iterable<java.lang.String> values)1181     public Builder addAllEntries(java.lang.Iterable<java.lang.String> values) {
1182       ensureEntriesIsMutable();
1183       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_);
1184       onChanged();
1185       return this;
1186     }
1187     /**
1188      *
1189      *
1190      * <pre>
1191      * The names of the entries that the error is associated with.
1192      * Format:
1193      * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
1194      * agent.
1195      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
1196      * associated with certain intents.
1197      * - "projects/&lt;Project
1198      * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
1199      * error is associated with certain intent training phrases.
1200      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
1201      * ID&gt;", if the error is associated with certain intent parameters.
1202      * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
1203      * associated with certain entities.
1204      * </pre>
1205      *
1206      * <code>repeated string entries = 3;</code>
1207      *
1208      * @return This builder for chaining.
1209      */
clearEntries()1210     public Builder clearEntries() {
1211       entries_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1212       bitField0_ = (bitField0_ & ~0x00000002);
1213       onChanged();
1214       return this;
1215     }
1216     /**
1217      *
1218      *
1219      * <pre>
1220      * The names of the entries that the error is associated with.
1221      * Format:
1222      * - "projects/&lt;Project ID&gt;/agent", if the error is associated with the entire
1223      * agent.
1224      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent ID&gt;", if the error is
1225      * associated with certain intents.
1226      * - "projects/&lt;Project
1227      * ID&gt;/agent/intents/&lt;Intent Id&gt;/trainingPhrases/&lt;Training Phrase ID&gt;", if the
1228      * error is associated with certain intent training phrases.
1229      * - "projects/&lt;Project ID&gt;/agent/intents/&lt;Intent Id&gt;/parameters/&lt;Parameter
1230      * ID&gt;", if the error is associated with certain intent parameters.
1231      * - "projects/&lt;Project ID&gt;/agent/entities/&lt;Entity ID&gt;", if the error is
1232      * associated with certain entities.
1233      * </pre>
1234      *
1235      * <code>repeated string entries = 3;</code>
1236      *
1237      * @param value The bytes of the entries to add.
1238      * @return This builder for chaining.
1239      */
addEntriesBytes(com.google.protobuf.ByteString value)1240     public Builder addEntriesBytes(com.google.protobuf.ByteString value) {
1241       if (value == null) {
1242         throw new NullPointerException();
1243       }
1244       checkByteStringIsUtf8(value);
1245       ensureEntriesIsMutable();
1246       entries_.add(value);
1247       onChanged();
1248       return this;
1249     }
1250 
1251     private java.lang.Object errorMessage_ = "";
1252     /**
1253      *
1254      *
1255      * <pre>
1256      * The detailed error message.
1257      * </pre>
1258      *
1259      * <code>string error_message = 4;</code>
1260      *
1261      * @return The errorMessage.
1262      */
getErrorMessage()1263     public java.lang.String getErrorMessage() {
1264       java.lang.Object ref = errorMessage_;
1265       if (!(ref instanceof java.lang.String)) {
1266         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1267         java.lang.String s = bs.toStringUtf8();
1268         errorMessage_ = s;
1269         return s;
1270       } else {
1271         return (java.lang.String) ref;
1272       }
1273     }
1274     /**
1275      *
1276      *
1277      * <pre>
1278      * The detailed error message.
1279      * </pre>
1280      *
1281      * <code>string error_message = 4;</code>
1282      *
1283      * @return The bytes for errorMessage.
1284      */
getErrorMessageBytes()1285     public com.google.protobuf.ByteString getErrorMessageBytes() {
1286       java.lang.Object ref = errorMessage_;
1287       if (ref instanceof String) {
1288         com.google.protobuf.ByteString b =
1289             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1290         errorMessage_ = b;
1291         return b;
1292       } else {
1293         return (com.google.protobuf.ByteString) ref;
1294       }
1295     }
1296     /**
1297      *
1298      *
1299      * <pre>
1300      * The detailed error message.
1301      * </pre>
1302      *
1303      * <code>string error_message = 4;</code>
1304      *
1305      * @param value The errorMessage to set.
1306      * @return This builder for chaining.
1307      */
setErrorMessage(java.lang.String value)1308     public Builder setErrorMessage(java.lang.String value) {
1309       if (value == null) {
1310         throw new NullPointerException();
1311       }
1312       errorMessage_ = value;
1313       bitField0_ |= 0x00000004;
1314       onChanged();
1315       return this;
1316     }
1317     /**
1318      *
1319      *
1320      * <pre>
1321      * The detailed error message.
1322      * </pre>
1323      *
1324      * <code>string error_message = 4;</code>
1325      *
1326      * @return This builder for chaining.
1327      */
clearErrorMessage()1328     public Builder clearErrorMessage() {
1329       errorMessage_ = getDefaultInstance().getErrorMessage();
1330       bitField0_ = (bitField0_ & ~0x00000004);
1331       onChanged();
1332       return this;
1333     }
1334     /**
1335      *
1336      *
1337      * <pre>
1338      * The detailed error message.
1339      * </pre>
1340      *
1341      * <code>string error_message = 4;</code>
1342      *
1343      * @param value The bytes for errorMessage to set.
1344      * @return This builder for chaining.
1345      */
setErrorMessageBytes(com.google.protobuf.ByteString value)1346     public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) {
1347       if (value == null) {
1348         throw new NullPointerException();
1349       }
1350       checkByteStringIsUtf8(value);
1351       errorMessage_ = value;
1352       bitField0_ |= 0x00000004;
1353       onChanged();
1354       return this;
1355     }
1356 
1357     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1358     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1359       return super.setUnknownFields(unknownFields);
1360     }
1361 
1362     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1363     public final Builder mergeUnknownFields(
1364         final com.google.protobuf.UnknownFieldSet unknownFields) {
1365       return super.mergeUnknownFields(unknownFields);
1366     }
1367 
1368     // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.ValidationError)
1369   }
1370 
1371   // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ValidationError)
1372   private static final com.google.cloud.dialogflow.v2.ValidationError DEFAULT_INSTANCE;
1373 
1374   static {
1375     DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.ValidationError();
1376   }
1377 
getDefaultInstance()1378   public static com.google.cloud.dialogflow.v2.ValidationError getDefaultInstance() {
1379     return DEFAULT_INSTANCE;
1380   }
1381 
1382   private static final com.google.protobuf.Parser<ValidationError> PARSER =
1383       new com.google.protobuf.AbstractParser<ValidationError>() {
1384         @java.lang.Override
1385         public ValidationError parsePartialFrom(
1386             com.google.protobuf.CodedInputStream input,
1387             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1388             throws com.google.protobuf.InvalidProtocolBufferException {
1389           Builder builder = newBuilder();
1390           try {
1391             builder.mergeFrom(input, extensionRegistry);
1392           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1393             throw e.setUnfinishedMessage(builder.buildPartial());
1394           } catch (com.google.protobuf.UninitializedMessageException e) {
1395             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1396           } catch (java.io.IOException e) {
1397             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1398                 .setUnfinishedMessage(builder.buildPartial());
1399           }
1400           return builder.buildPartial();
1401         }
1402       };
1403 
parser()1404   public static com.google.protobuf.Parser<ValidationError> parser() {
1405     return PARSER;
1406   }
1407 
1408   @java.lang.Override
getParserForType()1409   public com.google.protobuf.Parser<ValidationError> getParserForType() {
1410     return PARSER;
1411   }
1412 
1413   @java.lang.Override
getDefaultInstanceForType()1414   public com.google.cloud.dialogflow.v2.ValidationError getDefaultInstanceForType() {
1415     return DEFAULT_INSTANCE;
1416   }
1417 }
1418