• 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/retail/v2/import_config.proto
18 
19 package com.google.cloud.retail.v2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Configuration of destination for Import related errors.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.retail.v2.ImportErrorsConfig}
29  */
30 public final class ImportErrorsConfig extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.ImportErrorsConfig)
33     ImportErrorsConfigOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use ImportErrorsConfig.newBuilder() to construct.
ImportErrorsConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private ImportErrorsConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
ImportErrorsConfig()40   private ImportErrorsConfig() {}
41 
42   @java.lang.Override
43   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)44   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
45     return new ImportErrorsConfig();
46   }
47 
48   @java.lang.Override
getUnknownFields()49   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
50     return this.unknownFields;
51   }
52 
getDescriptor()53   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
54     return com.google.cloud.retail.v2.ImportConfigProto
55         .internal_static_google_cloud_retail_v2_ImportErrorsConfig_descriptor;
56   }
57 
58   @java.lang.Override
59   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()60       internalGetFieldAccessorTable() {
61     return com.google.cloud.retail.v2.ImportConfigProto
62         .internal_static_google_cloud_retail_v2_ImportErrorsConfig_fieldAccessorTable
63         .ensureFieldAccessorsInitialized(
64             com.google.cloud.retail.v2.ImportErrorsConfig.class,
65             com.google.cloud.retail.v2.ImportErrorsConfig.Builder.class);
66   }
67 
68   private int destinationCase_ = 0;
69   private java.lang.Object destination_;
70 
71   public enum DestinationCase
72       implements
73           com.google.protobuf.Internal.EnumLite,
74           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
75     GCS_PREFIX(1),
76     DESTINATION_NOT_SET(0);
77     private final int value;
78 
DestinationCase(int value)79     private DestinationCase(int value) {
80       this.value = value;
81     }
82     /**
83      * @param value The number of the enum to look for.
84      * @return The enum associated with the given number.
85      * @deprecated Use {@link #forNumber(int)} instead.
86      */
87     @java.lang.Deprecated
valueOf(int value)88     public static DestinationCase valueOf(int value) {
89       return forNumber(value);
90     }
91 
forNumber(int value)92     public static DestinationCase forNumber(int value) {
93       switch (value) {
94         case 1:
95           return GCS_PREFIX;
96         case 0:
97           return DESTINATION_NOT_SET;
98         default:
99           return null;
100       }
101     }
102 
getNumber()103     public int getNumber() {
104       return this.value;
105     }
106   };
107 
getDestinationCase()108   public DestinationCase getDestinationCase() {
109     return DestinationCase.forNumber(destinationCase_);
110   }
111 
112   public static final int GCS_PREFIX_FIELD_NUMBER = 1;
113   /**
114    *
115    *
116    * <pre>
117    * Google Cloud Storage prefix for import errors. This must be an empty,
118    * existing Cloud Storage directory. Import errors are written to
119    * sharded files in this directory, one per line, as a JSON-encoded
120    * `google.rpc.Status` message.
121    * </pre>
122    *
123    * <code>string gcs_prefix = 1;</code>
124    *
125    * @return Whether the gcsPrefix field is set.
126    */
hasGcsPrefix()127   public boolean hasGcsPrefix() {
128     return destinationCase_ == 1;
129   }
130   /**
131    *
132    *
133    * <pre>
134    * Google Cloud Storage prefix for import errors. This must be an empty,
135    * existing Cloud Storage directory. Import errors are written to
136    * sharded files in this directory, one per line, as a JSON-encoded
137    * `google.rpc.Status` message.
138    * </pre>
139    *
140    * <code>string gcs_prefix = 1;</code>
141    *
142    * @return The gcsPrefix.
143    */
getGcsPrefix()144   public java.lang.String getGcsPrefix() {
145     java.lang.Object ref = "";
146     if (destinationCase_ == 1) {
147       ref = destination_;
148     }
149     if (ref instanceof java.lang.String) {
150       return (java.lang.String) ref;
151     } else {
152       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
153       java.lang.String s = bs.toStringUtf8();
154       if (destinationCase_ == 1) {
155         destination_ = s;
156       }
157       return s;
158     }
159   }
160   /**
161    *
162    *
163    * <pre>
164    * Google Cloud Storage prefix for import errors. This must be an empty,
165    * existing Cloud Storage directory. Import errors are written to
166    * sharded files in this directory, one per line, as a JSON-encoded
167    * `google.rpc.Status` message.
168    * </pre>
169    *
170    * <code>string gcs_prefix = 1;</code>
171    *
172    * @return The bytes for gcsPrefix.
173    */
getGcsPrefixBytes()174   public com.google.protobuf.ByteString getGcsPrefixBytes() {
175     java.lang.Object ref = "";
176     if (destinationCase_ == 1) {
177       ref = destination_;
178     }
179     if (ref instanceof java.lang.String) {
180       com.google.protobuf.ByteString b =
181           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
182       if (destinationCase_ == 1) {
183         destination_ = b;
184       }
185       return b;
186     } else {
187       return (com.google.protobuf.ByteString) ref;
188     }
189   }
190 
191   private byte memoizedIsInitialized = -1;
192 
193   @java.lang.Override
isInitialized()194   public final boolean isInitialized() {
195     byte isInitialized = memoizedIsInitialized;
196     if (isInitialized == 1) return true;
197     if (isInitialized == 0) return false;
198 
199     memoizedIsInitialized = 1;
200     return true;
201   }
202 
203   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)204   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
205     if (destinationCase_ == 1) {
206       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_);
207     }
208     getUnknownFields().writeTo(output);
209   }
210 
211   @java.lang.Override
getSerializedSize()212   public int getSerializedSize() {
213     int size = memoizedSize;
214     if (size != -1) return size;
215 
216     size = 0;
217     if (destinationCase_ == 1) {
218       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_);
219     }
220     size += getUnknownFields().getSerializedSize();
221     memoizedSize = size;
222     return size;
223   }
224 
225   @java.lang.Override
equals(final java.lang.Object obj)226   public boolean equals(final java.lang.Object obj) {
227     if (obj == this) {
228       return true;
229     }
230     if (!(obj instanceof com.google.cloud.retail.v2.ImportErrorsConfig)) {
231       return super.equals(obj);
232     }
233     com.google.cloud.retail.v2.ImportErrorsConfig other =
234         (com.google.cloud.retail.v2.ImportErrorsConfig) obj;
235 
236     if (!getDestinationCase().equals(other.getDestinationCase())) return false;
237     switch (destinationCase_) {
238       case 1:
239         if (!getGcsPrefix().equals(other.getGcsPrefix())) return false;
240         break;
241       case 0:
242       default:
243     }
244     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
245     return true;
246   }
247 
248   @java.lang.Override
hashCode()249   public int hashCode() {
250     if (memoizedHashCode != 0) {
251       return memoizedHashCode;
252     }
253     int hash = 41;
254     hash = (19 * hash) + getDescriptor().hashCode();
255     switch (destinationCase_) {
256       case 1:
257         hash = (37 * hash) + GCS_PREFIX_FIELD_NUMBER;
258         hash = (53 * hash) + getGcsPrefix().hashCode();
259         break;
260       case 0:
261       default:
262     }
263     hash = (29 * hash) + getUnknownFields().hashCode();
264     memoizedHashCode = hash;
265     return hash;
266   }
267 
parseFrom(java.nio.ByteBuffer data)268   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(java.nio.ByteBuffer data)
269       throws com.google.protobuf.InvalidProtocolBufferException {
270     return PARSER.parseFrom(data);
271   }
272 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)273   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(
274       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
275       throws com.google.protobuf.InvalidProtocolBufferException {
276     return PARSER.parseFrom(data, extensionRegistry);
277   }
278 
parseFrom( com.google.protobuf.ByteString data)279   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(
280       com.google.protobuf.ByteString data)
281       throws com.google.protobuf.InvalidProtocolBufferException {
282     return PARSER.parseFrom(data);
283   }
284 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)285   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(
286       com.google.protobuf.ByteString data,
287       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
288       throws com.google.protobuf.InvalidProtocolBufferException {
289     return PARSER.parseFrom(data, extensionRegistry);
290   }
291 
parseFrom(byte[] data)292   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(byte[] data)
293       throws com.google.protobuf.InvalidProtocolBufferException {
294     return PARSER.parseFrom(data);
295   }
296 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)297   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(
298       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
299       throws com.google.protobuf.InvalidProtocolBufferException {
300     return PARSER.parseFrom(data, extensionRegistry);
301   }
302 
parseFrom(java.io.InputStream input)303   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(java.io.InputStream input)
304       throws java.io.IOException {
305     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
306   }
307 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)308   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(
309       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
310       throws java.io.IOException {
311     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
312         PARSER, input, extensionRegistry);
313   }
314 
parseDelimitedFrom( java.io.InputStream input)315   public static com.google.cloud.retail.v2.ImportErrorsConfig parseDelimitedFrom(
316       java.io.InputStream input) throws java.io.IOException {
317     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
318   }
319 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)320   public static com.google.cloud.retail.v2.ImportErrorsConfig parseDelimitedFrom(
321       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
322       throws java.io.IOException {
323     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
324         PARSER, input, extensionRegistry);
325   }
326 
parseFrom( com.google.protobuf.CodedInputStream input)327   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(
328       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
329     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
330   }
331 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)332   public static com.google.cloud.retail.v2.ImportErrorsConfig parseFrom(
333       com.google.protobuf.CodedInputStream input,
334       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
335       throws java.io.IOException {
336     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
337         PARSER, input, extensionRegistry);
338   }
339 
340   @java.lang.Override
newBuilderForType()341   public Builder newBuilderForType() {
342     return newBuilder();
343   }
344 
newBuilder()345   public static Builder newBuilder() {
346     return DEFAULT_INSTANCE.toBuilder();
347   }
348 
newBuilder(com.google.cloud.retail.v2.ImportErrorsConfig prototype)349   public static Builder newBuilder(com.google.cloud.retail.v2.ImportErrorsConfig prototype) {
350     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
351   }
352 
353   @java.lang.Override
toBuilder()354   public Builder toBuilder() {
355     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
356   }
357 
358   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)359   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
360     Builder builder = new Builder(parent);
361     return builder;
362   }
363   /**
364    *
365    *
366    * <pre>
367    * Configuration of destination for Import related errors.
368    * </pre>
369    *
370    * Protobuf type {@code google.cloud.retail.v2.ImportErrorsConfig}
371    */
372   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
373       implements
374       // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.ImportErrorsConfig)
375       com.google.cloud.retail.v2.ImportErrorsConfigOrBuilder {
getDescriptor()376     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
377       return com.google.cloud.retail.v2.ImportConfigProto
378           .internal_static_google_cloud_retail_v2_ImportErrorsConfig_descriptor;
379     }
380 
381     @java.lang.Override
382     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()383         internalGetFieldAccessorTable() {
384       return com.google.cloud.retail.v2.ImportConfigProto
385           .internal_static_google_cloud_retail_v2_ImportErrorsConfig_fieldAccessorTable
386           .ensureFieldAccessorsInitialized(
387               com.google.cloud.retail.v2.ImportErrorsConfig.class,
388               com.google.cloud.retail.v2.ImportErrorsConfig.Builder.class);
389     }
390 
391     // Construct using com.google.cloud.retail.v2.ImportErrorsConfig.newBuilder()
Builder()392     private Builder() {}
393 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)394     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
395       super(parent);
396     }
397 
398     @java.lang.Override
clear()399     public Builder clear() {
400       super.clear();
401       bitField0_ = 0;
402       destinationCase_ = 0;
403       destination_ = null;
404       return this;
405     }
406 
407     @java.lang.Override
getDescriptorForType()408     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
409       return com.google.cloud.retail.v2.ImportConfigProto
410           .internal_static_google_cloud_retail_v2_ImportErrorsConfig_descriptor;
411     }
412 
413     @java.lang.Override
getDefaultInstanceForType()414     public com.google.cloud.retail.v2.ImportErrorsConfig getDefaultInstanceForType() {
415       return com.google.cloud.retail.v2.ImportErrorsConfig.getDefaultInstance();
416     }
417 
418     @java.lang.Override
build()419     public com.google.cloud.retail.v2.ImportErrorsConfig build() {
420       com.google.cloud.retail.v2.ImportErrorsConfig result = buildPartial();
421       if (!result.isInitialized()) {
422         throw newUninitializedMessageException(result);
423       }
424       return result;
425     }
426 
427     @java.lang.Override
buildPartial()428     public com.google.cloud.retail.v2.ImportErrorsConfig buildPartial() {
429       com.google.cloud.retail.v2.ImportErrorsConfig result =
430           new com.google.cloud.retail.v2.ImportErrorsConfig(this);
431       if (bitField0_ != 0) {
432         buildPartial0(result);
433       }
434       buildPartialOneofs(result);
435       onBuilt();
436       return result;
437     }
438 
buildPartial0(com.google.cloud.retail.v2.ImportErrorsConfig result)439     private void buildPartial0(com.google.cloud.retail.v2.ImportErrorsConfig result) {
440       int from_bitField0_ = bitField0_;
441     }
442 
buildPartialOneofs(com.google.cloud.retail.v2.ImportErrorsConfig result)443     private void buildPartialOneofs(com.google.cloud.retail.v2.ImportErrorsConfig result) {
444       result.destinationCase_ = destinationCase_;
445       result.destination_ = this.destination_;
446     }
447 
448     @java.lang.Override
clone()449     public Builder clone() {
450       return super.clone();
451     }
452 
453     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)454     public Builder setField(
455         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
456       return super.setField(field, value);
457     }
458 
459     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)460     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
461       return super.clearField(field);
462     }
463 
464     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)465     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
466       return super.clearOneof(oneof);
467     }
468 
469     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)470     public Builder setRepeatedField(
471         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
472       return super.setRepeatedField(field, index, value);
473     }
474 
475     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)476     public Builder addRepeatedField(
477         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
478       return super.addRepeatedField(field, value);
479     }
480 
481     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)482     public Builder mergeFrom(com.google.protobuf.Message other) {
483       if (other instanceof com.google.cloud.retail.v2.ImportErrorsConfig) {
484         return mergeFrom((com.google.cloud.retail.v2.ImportErrorsConfig) other);
485       } else {
486         super.mergeFrom(other);
487         return this;
488       }
489     }
490 
mergeFrom(com.google.cloud.retail.v2.ImportErrorsConfig other)491     public Builder mergeFrom(com.google.cloud.retail.v2.ImportErrorsConfig other) {
492       if (other == com.google.cloud.retail.v2.ImportErrorsConfig.getDefaultInstance()) return this;
493       switch (other.getDestinationCase()) {
494         case GCS_PREFIX:
495           {
496             destinationCase_ = 1;
497             destination_ = other.destination_;
498             onChanged();
499             break;
500           }
501         case DESTINATION_NOT_SET:
502           {
503             break;
504           }
505       }
506       this.mergeUnknownFields(other.getUnknownFields());
507       onChanged();
508       return this;
509     }
510 
511     @java.lang.Override
isInitialized()512     public final boolean isInitialized() {
513       return true;
514     }
515 
516     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)517     public Builder mergeFrom(
518         com.google.protobuf.CodedInputStream input,
519         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
520         throws java.io.IOException {
521       if (extensionRegistry == null) {
522         throw new java.lang.NullPointerException();
523       }
524       try {
525         boolean done = false;
526         while (!done) {
527           int tag = input.readTag();
528           switch (tag) {
529             case 0:
530               done = true;
531               break;
532             case 10:
533               {
534                 java.lang.String s = input.readStringRequireUtf8();
535                 destinationCase_ = 1;
536                 destination_ = s;
537                 break;
538               } // case 10
539             default:
540               {
541                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
542                   done = true; // was an endgroup tag
543                 }
544                 break;
545               } // default:
546           } // switch (tag)
547         } // while (!done)
548       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
549         throw e.unwrapIOException();
550       } finally {
551         onChanged();
552       } // finally
553       return this;
554     }
555 
556     private int destinationCase_ = 0;
557     private java.lang.Object destination_;
558 
getDestinationCase()559     public DestinationCase getDestinationCase() {
560       return DestinationCase.forNumber(destinationCase_);
561     }
562 
clearDestination()563     public Builder clearDestination() {
564       destinationCase_ = 0;
565       destination_ = null;
566       onChanged();
567       return this;
568     }
569 
570     private int bitField0_;
571 
572     /**
573      *
574      *
575      * <pre>
576      * Google Cloud Storage prefix for import errors. This must be an empty,
577      * existing Cloud Storage directory. Import errors are written to
578      * sharded files in this directory, one per line, as a JSON-encoded
579      * `google.rpc.Status` message.
580      * </pre>
581      *
582      * <code>string gcs_prefix = 1;</code>
583      *
584      * @return Whether the gcsPrefix field is set.
585      */
586     @java.lang.Override
hasGcsPrefix()587     public boolean hasGcsPrefix() {
588       return destinationCase_ == 1;
589     }
590     /**
591      *
592      *
593      * <pre>
594      * Google Cloud Storage prefix for import errors. This must be an empty,
595      * existing Cloud Storage directory. Import errors are written to
596      * sharded files in this directory, one per line, as a JSON-encoded
597      * `google.rpc.Status` message.
598      * </pre>
599      *
600      * <code>string gcs_prefix = 1;</code>
601      *
602      * @return The gcsPrefix.
603      */
604     @java.lang.Override
getGcsPrefix()605     public java.lang.String getGcsPrefix() {
606       java.lang.Object ref = "";
607       if (destinationCase_ == 1) {
608         ref = destination_;
609       }
610       if (!(ref instanceof java.lang.String)) {
611         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
612         java.lang.String s = bs.toStringUtf8();
613         if (destinationCase_ == 1) {
614           destination_ = s;
615         }
616         return s;
617       } else {
618         return (java.lang.String) ref;
619       }
620     }
621     /**
622      *
623      *
624      * <pre>
625      * Google Cloud Storage prefix for import errors. This must be an empty,
626      * existing Cloud Storage directory. Import errors are written to
627      * sharded files in this directory, one per line, as a JSON-encoded
628      * `google.rpc.Status` message.
629      * </pre>
630      *
631      * <code>string gcs_prefix = 1;</code>
632      *
633      * @return The bytes for gcsPrefix.
634      */
635     @java.lang.Override
getGcsPrefixBytes()636     public com.google.protobuf.ByteString getGcsPrefixBytes() {
637       java.lang.Object ref = "";
638       if (destinationCase_ == 1) {
639         ref = destination_;
640       }
641       if (ref instanceof String) {
642         com.google.protobuf.ByteString b =
643             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
644         if (destinationCase_ == 1) {
645           destination_ = b;
646         }
647         return b;
648       } else {
649         return (com.google.protobuf.ByteString) ref;
650       }
651     }
652     /**
653      *
654      *
655      * <pre>
656      * Google Cloud Storage prefix for import errors. This must be an empty,
657      * existing Cloud Storage directory. Import errors are written to
658      * sharded files in this directory, one per line, as a JSON-encoded
659      * `google.rpc.Status` message.
660      * </pre>
661      *
662      * <code>string gcs_prefix = 1;</code>
663      *
664      * @param value The gcsPrefix to set.
665      * @return This builder for chaining.
666      */
setGcsPrefix(java.lang.String value)667     public Builder setGcsPrefix(java.lang.String value) {
668       if (value == null) {
669         throw new NullPointerException();
670       }
671       destinationCase_ = 1;
672       destination_ = value;
673       onChanged();
674       return this;
675     }
676     /**
677      *
678      *
679      * <pre>
680      * Google Cloud Storage prefix for import errors. This must be an empty,
681      * existing Cloud Storage directory. Import errors are written to
682      * sharded files in this directory, one per line, as a JSON-encoded
683      * `google.rpc.Status` message.
684      * </pre>
685      *
686      * <code>string gcs_prefix = 1;</code>
687      *
688      * @return This builder for chaining.
689      */
clearGcsPrefix()690     public Builder clearGcsPrefix() {
691       if (destinationCase_ == 1) {
692         destinationCase_ = 0;
693         destination_ = null;
694         onChanged();
695       }
696       return this;
697     }
698     /**
699      *
700      *
701      * <pre>
702      * Google Cloud Storage prefix for import errors. This must be an empty,
703      * existing Cloud Storage directory. Import errors are written to
704      * sharded files in this directory, one per line, as a JSON-encoded
705      * `google.rpc.Status` message.
706      * </pre>
707      *
708      * <code>string gcs_prefix = 1;</code>
709      *
710      * @param value The bytes for gcsPrefix to set.
711      * @return This builder for chaining.
712      */
setGcsPrefixBytes(com.google.protobuf.ByteString value)713     public Builder setGcsPrefixBytes(com.google.protobuf.ByteString value) {
714       if (value == null) {
715         throw new NullPointerException();
716       }
717       checkByteStringIsUtf8(value);
718       destinationCase_ = 1;
719       destination_ = value;
720       onChanged();
721       return this;
722     }
723 
724     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)725     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
726       return super.setUnknownFields(unknownFields);
727     }
728 
729     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)730     public final Builder mergeUnknownFields(
731         final com.google.protobuf.UnknownFieldSet unknownFields) {
732       return super.mergeUnknownFields(unknownFields);
733     }
734 
735     // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.ImportErrorsConfig)
736   }
737 
738   // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.ImportErrorsConfig)
739   private static final com.google.cloud.retail.v2.ImportErrorsConfig DEFAULT_INSTANCE;
740 
741   static {
742     DEFAULT_INSTANCE = new com.google.cloud.retail.v2.ImportErrorsConfig();
743   }
744 
getDefaultInstance()745   public static com.google.cloud.retail.v2.ImportErrorsConfig getDefaultInstance() {
746     return DEFAULT_INSTANCE;
747   }
748 
749   private static final com.google.protobuf.Parser<ImportErrorsConfig> PARSER =
750       new com.google.protobuf.AbstractParser<ImportErrorsConfig>() {
751         @java.lang.Override
752         public ImportErrorsConfig parsePartialFrom(
753             com.google.protobuf.CodedInputStream input,
754             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
755             throws com.google.protobuf.InvalidProtocolBufferException {
756           Builder builder = newBuilder();
757           try {
758             builder.mergeFrom(input, extensionRegistry);
759           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
760             throw e.setUnfinishedMessage(builder.buildPartial());
761           } catch (com.google.protobuf.UninitializedMessageException e) {
762             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
763           } catch (java.io.IOException e) {
764             throw new com.google.protobuf.InvalidProtocolBufferException(e)
765                 .setUnfinishedMessage(builder.buildPartial());
766           }
767           return builder.buildPartial();
768         }
769       };
770 
parser()771   public static com.google.protobuf.Parser<ImportErrorsConfig> parser() {
772     return PARSER;
773   }
774 
775   @java.lang.Override
getParserForType()776   public com.google.protobuf.Parser<ImportErrorsConfig> getParserForType() {
777     return PARSER;
778   }
779 
780   @java.lang.Override
getDefaultInstanceForType()781   public com.google.cloud.retail.v2.ImportErrorsConfig getDefaultInstanceForType() {
782     return DEFAULT_INSTANCE;
783   }
784 }
785