• 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/v2beta/common.proto
18 
19 package com.google.cloud.retail.v2beta;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Fulfillment information, such as the store IDs for in-store pickup or region
26  * IDs for different shipping methods.
27  * </pre>
28  *
29  * Protobuf type {@code google.cloud.retail.v2beta.FulfillmentInfo}
30  */
31 public final class FulfillmentInfo extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.FulfillmentInfo)
34     FulfillmentInfoOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use FulfillmentInfo.newBuilder() to construct.
FulfillmentInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private FulfillmentInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
FulfillmentInfo()41   private FulfillmentInfo() {
42     type_ = "";
43     placeIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new FulfillmentInfo();
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.retail.v2beta.CommonProto
59         .internal_static_google_cloud_retail_v2beta_FulfillmentInfo_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.cloud.retail.v2beta.CommonProto
66         .internal_static_google_cloud_retail_v2beta_FulfillmentInfo_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloud.retail.v2beta.FulfillmentInfo.class,
69             com.google.cloud.retail.v2beta.FulfillmentInfo.Builder.class);
70   }
71 
72   public static final int TYPE_FIELD_NUMBER = 1;
73 
74   @SuppressWarnings("serial")
75   private volatile java.lang.Object type_ = "";
76   /**
77    *
78    *
79    * <pre>
80    * The fulfillment type, including commonly used types (such as pickup in
81    * store and same day delivery), and custom types. Customers have to map
82    * custom types to their display names before rendering UI.
83    * Supported values:
84    * * "pickup-in-store"
85    * * "ship-to-store"
86    * * "same-day-delivery"
87    * * "next-day-delivery"
88    * * "custom-type-1"
89    * * "custom-type-2"
90    * * "custom-type-3"
91    * * "custom-type-4"
92    * * "custom-type-5"
93    * If this field is set to an invalid value other than these, an
94    * INVALID_ARGUMENT error is returned.
95    * </pre>
96    *
97    * <code>string type = 1;</code>
98    *
99    * @return The type.
100    */
101   @java.lang.Override
getType()102   public java.lang.String getType() {
103     java.lang.Object ref = type_;
104     if (ref instanceof java.lang.String) {
105       return (java.lang.String) ref;
106     } else {
107       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
108       java.lang.String s = bs.toStringUtf8();
109       type_ = s;
110       return s;
111     }
112   }
113   /**
114    *
115    *
116    * <pre>
117    * The fulfillment type, including commonly used types (such as pickup in
118    * store and same day delivery), and custom types. Customers have to map
119    * custom types to their display names before rendering UI.
120    * Supported values:
121    * * "pickup-in-store"
122    * * "ship-to-store"
123    * * "same-day-delivery"
124    * * "next-day-delivery"
125    * * "custom-type-1"
126    * * "custom-type-2"
127    * * "custom-type-3"
128    * * "custom-type-4"
129    * * "custom-type-5"
130    * If this field is set to an invalid value other than these, an
131    * INVALID_ARGUMENT error is returned.
132    * </pre>
133    *
134    * <code>string type = 1;</code>
135    *
136    * @return The bytes for type.
137    */
138   @java.lang.Override
getTypeBytes()139   public com.google.protobuf.ByteString getTypeBytes() {
140     java.lang.Object ref = type_;
141     if (ref instanceof java.lang.String) {
142       com.google.protobuf.ByteString b =
143           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
144       type_ = b;
145       return b;
146     } else {
147       return (com.google.protobuf.ByteString) ref;
148     }
149   }
150 
151   public static final int PLACE_IDS_FIELD_NUMBER = 2;
152 
153   @SuppressWarnings("serial")
154   private com.google.protobuf.LazyStringList placeIds_;
155   /**
156    *
157    *
158    * <pre>
159    * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
160    * such as the store IDs for
161    * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
162    * or the region IDs for
163    * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
164    * A maximum of 3000 values are allowed. Each value must be a string with a
165    * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
166    * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
167    * returned.
168    * </pre>
169    *
170    * <code>repeated string place_ids = 2;</code>
171    *
172    * @return A list containing the placeIds.
173    */
getPlaceIdsList()174   public com.google.protobuf.ProtocolStringList getPlaceIdsList() {
175     return placeIds_;
176   }
177   /**
178    *
179    *
180    * <pre>
181    * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
182    * such as the store IDs for
183    * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
184    * or the region IDs for
185    * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
186    * A maximum of 3000 values are allowed. Each value must be a string with a
187    * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
188    * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
189    * returned.
190    * </pre>
191    *
192    * <code>repeated string place_ids = 2;</code>
193    *
194    * @return The count of placeIds.
195    */
getPlaceIdsCount()196   public int getPlaceIdsCount() {
197     return placeIds_.size();
198   }
199   /**
200    *
201    *
202    * <pre>
203    * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
204    * such as the store IDs for
205    * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
206    * or the region IDs for
207    * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
208    * A maximum of 3000 values are allowed. Each value must be a string with a
209    * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
210    * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
211    * returned.
212    * </pre>
213    *
214    * <code>repeated string place_ids = 2;</code>
215    *
216    * @param index The index of the element to return.
217    * @return The placeIds at the given index.
218    */
getPlaceIds(int index)219   public java.lang.String getPlaceIds(int index) {
220     return placeIds_.get(index);
221   }
222   /**
223    *
224    *
225    * <pre>
226    * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
227    * such as the store IDs for
228    * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
229    * or the region IDs for
230    * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
231    * A maximum of 3000 values are allowed. Each value must be a string with a
232    * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
233    * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
234    * returned.
235    * </pre>
236    *
237    * <code>repeated string place_ids = 2;</code>
238    *
239    * @param index The index of the value to return.
240    * @return The bytes of the placeIds at the given index.
241    */
getPlaceIdsBytes(int index)242   public com.google.protobuf.ByteString getPlaceIdsBytes(int index) {
243     return placeIds_.getByteString(index);
244   }
245 
246   private byte memoizedIsInitialized = -1;
247 
248   @java.lang.Override
isInitialized()249   public final boolean isInitialized() {
250     byte isInitialized = memoizedIsInitialized;
251     if (isInitialized == 1) return true;
252     if (isInitialized == 0) return false;
253 
254     memoizedIsInitialized = 1;
255     return true;
256   }
257 
258   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)259   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
260     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
261       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
262     }
263     for (int i = 0; i < placeIds_.size(); i++) {
264       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, placeIds_.getRaw(i));
265     }
266     getUnknownFields().writeTo(output);
267   }
268 
269   @java.lang.Override
getSerializedSize()270   public int getSerializedSize() {
271     int size = memoizedSize;
272     if (size != -1) return size;
273 
274     size = 0;
275     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
276       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
277     }
278     {
279       int dataSize = 0;
280       for (int i = 0; i < placeIds_.size(); i++) {
281         dataSize += computeStringSizeNoTag(placeIds_.getRaw(i));
282       }
283       size += dataSize;
284       size += 1 * getPlaceIdsList().size();
285     }
286     size += getUnknownFields().getSerializedSize();
287     memoizedSize = size;
288     return size;
289   }
290 
291   @java.lang.Override
equals(final java.lang.Object obj)292   public boolean equals(final java.lang.Object obj) {
293     if (obj == this) {
294       return true;
295     }
296     if (!(obj instanceof com.google.cloud.retail.v2beta.FulfillmentInfo)) {
297       return super.equals(obj);
298     }
299     com.google.cloud.retail.v2beta.FulfillmentInfo other =
300         (com.google.cloud.retail.v2beta.FulfillmentInfo) obj;
301 
302     if (!getType().equals(other.getType())) return false;
303     if (!getPlaceIdsList().equals(other.getPlaceIdsList())) return false;
304     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
305     return true;
306   }
307 
308   @java.lang.Override
hashCode()309   public int hashCode() {
310     if (memoizedHashCode != 0) {
311       return memoizedHashCode;
312     }
313     int hash = 41;
314     hash = (19 * hash) + getDescriptor().hashCode();
315     hash = (37 * hash) + TYPE_FIELD_NUMBER;
316     hash = (53 * hash) + getType().hashCode();
317     if (getPlaceIdsCount() > 0) {
318       hash = (37 * hash) + PLACE_IDS_FIELD_NUMBER;
319       hash = (53 * hash) + getPlaceIdsList().hashCode();
320     }
321     hash = (29 * hash) + getUnknownFields().hashCode();
322     memoizedHashCode = hash;
323     return hash;
324   }
325 
parseFrom(java.nio.ByteBuffer data)326   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(java.nio.ByteBuffer data)
327       throws com.google.protobuf.InvalidProtocolBufferException {
328     return PARSER.parseFrom(data);
329   }
330 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)331   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(
332       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
333       throws com.google.protobuf.InvalidProtocolBufferException {
334     return PARSER.parseFrom(data, extensionRegistry);
335   }
336 
parseFrom( com.google.protobuf.ByteString data)337   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(
338       com.google.protobuf.ByteString data)
339       throws com.google.protobuf.InvalidProtocolBufferException {
340     return PARSER.parseFrom(data);
341   }
342 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)343   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(
344       com.google.protobuf.ByteString data,
345       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
346       throws com.google.protobuf.InvalidProtocolBufferException {
347     return PARSER.parseFrom(data, extensionRegistry);
348   }
349 
parseFrom(byte[] data)350   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(byte[] data)
351       throws com.google.protobuf.InvalidProtocolBufferException {
352     return PARSER.parseFrom(data);
353   }
354 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)355   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(
356       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
357       throws com.google.protobuf.InvalidProtocolBufferException {
358     return PARSER.parseFrom(data, extensionRegistry);
359   }
360 
parseFrom(java.io.InputStream input)361   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(java.io.InputStream input)
362       throws java.io.IOException {
363     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
364   }
365 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)366   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(
367       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
368       throws java.io.IOException {
369     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
370         PARSER, input, extensionRegistry);
371   }
372 
parseDelimitedFrom( java.io.InputStream input)373   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseDelimitedFrom(
374       java.io.InputStream input) throws java.io.IOException {
375     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
376   }
377 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)378   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseDelimitedFrom(
379       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
380       throws java.io.IOException {
381     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
382         PARSER, input, extensionRegistry);
383   }
384 
parseFrom( com.google.protobuf.CodedInputStream input)385   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(
386       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
387     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
388   }
389 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)390   public static com.google.cloud.retail.v2beta.FulfillmentInfo parseFrom(
391       com.google.protobuf.CodedInputStream input,
392       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
393       throws java.io.IOException {
394     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
395         PARSER, input, extensionRegistry);
396   }
397 
398   @java.lang.Override
newBuilderForType()399   public Builder newBuilderForType() {
400     return newBuilder();
401   }
402 
newBuilder()403   public static Builder newBuilder() {
404     return DEFAULT_INSTANCE.toBuilder();
405   }
406 
newBuilder(com.google.cloud.retail.v2beta.FulfillmentInfo prototype)407   public static Builder newBuilder(com.google.cloud.retail.v2beta.FulfillmentInfo prototype) {
408     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
409   }
410 
411   @java.lang.Override
toBuilder()412   public Builder toBuilder() {
413     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
414   }
415 
416   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)417   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
418     Builder builder = new Builder(parent);
419     return builder;
420   }
421   /**
422    *
423    *
424    * <pre>
425    * Fulfillment information, such as the store IDs for in-store pickup or region
426    * IDs for different shipping methods.
427    * </pre>
428    *
429    * Protobuf type {@code google.cloud.retail.v2beta.FulfillmentInfo}
430    */
431   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
432       implements
433       // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.FulfillmentInfo)
434       com.google.cloud.retail.v2beta.FulfillmentInfoOrBuilder {
getDescriptor()435     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
436       return com.google.cloud.retail.v2beta.CommonProto
437           .internal_static_google_cloud_retail_v2beta_FulfillmentInfo_descriptor;
438     }
439 
440     @java.lang.Override
441     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()442         internalGetFieldAccessorTable() {
443       return com.google.cloud.retail.v2beta.CommonProto
444           .internal_static_google_cloud_retail_v2beta_FulfillmentInfo_fieldAccessorTable
445           .ensureFieldAccessorsInitialized(
446               com.google.cloud.retail.v2beta.FulfillmentInfo.class,
447               com.google.cloud.retail.v2beta.FulfillmentInfo.Builder.class);
448     }
449 
450     // Construct using com.google.cloud.retail.v2beta.FulfillmentInfo.newBuilder()
Builder()451     private Builder() {}
452 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)453     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
454       super(parent);
455     }
456 
457     @java.lang.Override
clear()458     public Builder clear() {
459       super.clear();
460       bitField0_ = 0;
461       type_ = "";
462       placeIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
463       bitField0_ = (bitField0_ & ~0x00000002);
464       return this;
465     }
466 
467     @java.lang.Override
getDescriptorForType()468     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
469       return com.google.cloud.retail.v2beta.CommonProto
470           .internal_static_google_cloud_retail_v2beta_FulfillmentInfo_descriptor;
471     }
472 
473     @java.lang.Override
getDefaultInstanceForType()474     public com.google.cloud.retail.v2beta.FulfillmentInfo getDefaultInstanceForType() {
475       return com.google.cloud.retail.v2beta.FulfillmentInfo.getDefaultInstance();
476     }
477 
478     @java.lang.Override
build()479     public com.google.cloud.retail.v2beta.FulfillmentInfo build() {
480       com.google.cloud.retail.v2beta.FulfillmentInfo result = buildPartial();
481       if (!result.isInitialized()) {
482         throw newUninitializedMessageException(result);
483       }
484       return result;
485     }
486 
487     @java.lang.Override
buildPartial()488     public com.google.cloud.retail.v2beta.FulfillmentInfo buildPartial() {
489       com.google.cloud.retail.v2beta.FulfillmentInfo result =
490           new com.google.cloud.retail.v2beta.FulfillmentInfo(this);
491       buildPartialRepeatedFields(result);
492       if (bitField0_ != 0) {
493         buildPartial0(result);
494       }
495       onBuilt();
496       return result;
497     }
498 
buildPartialRepeatedFields(com.google.cloud.retail.v2beta.FulfillmentInfo result)499     private void buildPartialRepeatedFields(com.google.cloud.retail.v2beta.FulfillmentInfo result) {
500       if (((bitField0_ & 0x00000002) != 0)) {
501         placeIds_ = placeIds_.getUnmodifiableView();
502         bitField0_ = (bitField0_ & ~0x00000002);
503       }
504       result.placeIds_ = placeIds_;
505     }
506 
buildPartial0(com.google.cloud.retail.v2beta.FulfillmentInfo result)507     private void buildPartial0(com.google.cloud.retail.v2beta.FulfillmentInfo result) {
508       int from_bitField0_ = bitField0_;
509       if (((from_bitField0_ & 0x00000001) != 0)) {
510         result.type_ = type_;
511       }
512     }
513 
514     @java.lang.Override
clone()515     public Builder clone() {
516       return super.clone();
517     }
518 
519     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)520     public Builder setField(
521         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
522       return super.setField(field, value);
523     }
524 
525     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)526     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
527       return super.clearField(field);
528     }
529 
530     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)531     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
532       return super.clearOneof(oneof);
533     }
534 
535     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)536     public Builder setRepeatedField(
537         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
538       return super.setRepeatedField(field, index, value);
539     }
540 
541     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)542     public Builder addRepeatedField(
543         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
544       return super.addRepeatedField(field, value);
545     }
546 
547     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)548     public Builder mergeFrom(com.google.protobuf.Message other) {
549       if (other instanceof com.google.cloud.retail.v2beta.FulfillmentInfo) {
550         return mergeFrom((com.google.cloud.retail.v2beta.FulfillmentInfo) other);
551       } else {
552         super.mergeFrom(other);
553         return this;
554       }
555     }
556 
mergeFrom(com.google.cloud.retail.v2beta.FulfillmentInfo other)557     public Builder mergeFrom(com.google.cloud.retail.v2beta.FulfillmentInfo other) {
558       if (other == com.google.cloud.retail.v2beta.FulfillmentInfo.getDefaultInstance()) return this;
559       if (!other.getType().isEmpty()) {
560         type_ = other.type_;
561         bitField0_ |= 0x00000001;
562         onChanged();
563       }
564       if (!other.placeIds_.isEmpty()) {
565         if (placeIds_.isEmpty()) {
566           placeIds_ = other.placeIds_;
567           bitField0_ = (bitField0_ & ~0x00000002);
568         } else {
569           ensurePlaceIdsIsMutable();
570           placeIds_.addAll(other.placeIds_);
571         }
572         onChanged();
573       }
574       this.mergeUnknownFields(other.getUnknownFields());
575       onChanged();
576       return this;
577     }
578 
579     @java.lang.Override
isInitialized()580     public final boolean isInitialized() {
581       return true;
582     }
583 
584     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)585     public Builder mergeFrom(
586         com.google.protobuf.CodedInputStream input,
587         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
588         throws java.io.IOException {
589       if (extensionRegistry == null) {
590         throw new java.lang.NullPointerException();
591       }
592       try {
593         boolean done = false;
594         while (!done) {
595           int tag = input.readTag();
596           switch (tag) {
597             case 0:
598               done = true;
599               break;
600             case 10:
601               {
602                 type_ = input.readStringRequireUtf8();
603                 bitField0_ |= 0x00000001;
604                 break;
605               } // case 10
606             case 18:
607               {
608                 java.lang.String s = input.readStringRequireUtf8();
609                 ensurePlaceIdsIsMutable();
610                 placeIds_.add(s);
611                 break;
612               } // case 18
613             default:
614               {
615                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
616                   done = true; // was an endgroup tag
617                 }
618                 break;
619               } // default:
620           } // switch (tag)
621         } // while (!done)
622       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
623         throw e.unwrapIOException();
624       } finally {
625         onChanged();
626       } // finally
627       return this;
628     }
629 
630     private int bitField0_;
631 
632     private java.lang.Object type_ = "";
633     /**
634      *
635      *
636      * <pre>
637      * The fulfillment type, including commonly used types (such as pickup in
638      * store and same day delivery), and custom types. Customers have to map
639      * custom types to their display names before rendering UI.
640      * Supported values:
641      * * "pickup-in-store"
642      * * "ship-to-store"
643      * * "same-day-delivery"
644      * * "next-day-delivery"
645      * * "custom-type-1"
646      * * "custom-type-2"
647      * * "custom-type-3"
648      * * "custom-type-4"
649      * * "custom-type-5"
650      * If this field is set to an invalid value other than these, an
651      * INVALID_ARGUMENT error is returned.
652      * </pre>
653      *
654      * <code>string type = 1;</code>
655      *
656      * @return The type.
657      */
getType()658     public java.lang.String getType() {
659       java.lang.Object ref = type_;
660       if (!(ref instanceof java.lang.String)) {
661         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
662         java.lang.String s = bs.toStringUtf8();
663         type_ = s;
664         return s;
665       } else {
666         return (java.lang.String) ref;
667       }
668     }
669     /**
670      *
671      *
672      * <pre>
673      * The fulfillment type, including commonly used types (such as pickup in
674      * store and same day delivery), and custom types. Customers have to map
675      * custom types to their display names before rendering UI.
676      * Supported values:
677      * * "pickup-in-store"
678      * * "ship-to-store"
679      * * "same-day-delivery"
680      * * "next-day-delivery"
681      * * "custom-type-1"
682      * * "custom-type-2"
683      * * "custom-type-3"
684      * * "custom-type-4"
685      * * "custom-type-5"
686      * If this field is set to an invalid value other than these, an
687      * INVALID_ARGUMENT error is returned.
688      * </pre>
689      *
690      * <code>string type = 1;</code>
691      *
692      * @return The bytes for type.
693      */
getTypeBytes()694     public com.google.protobuf.ByteString getTypeBytes() {
695       java.lang.Object ref = type_;
696       if (ref instanceof String) {
697         com.google.protobuf.ByteString b =
698             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
699         type_ = b;
700         return b;
701       } else {
702         return (com.google.protobuf.ByteString) ref;
703       }
704     }
705     /**
706      *
707      *
708      * <pre>
709      * The fulfillment type, including commonly used types (such as pickup in
710      * store and same day delivery), and custom types. Customers have to map
711      * custom types to their display names before rendering UI.
712      * Supported values:
713      * * "pickup-in-store"
714      * * "ship-to-store"
715      * * "same-day-delivery"
716      * * "next-day-delivery"
717      * * "custom-type-1"
718      * * "custom-type-2"
719      * * "custom-type-3"
720      * * "custom-type-4"
721      * * "custom-type-5"
722      * If this field is set to an invalid value other than these, an
723      * INVALID_ARGUMENT error is returned.
724      * </pre>
725      *
726      * <code>string type = 1;</code>
727      *
728      * @param value The type to set.
729      * @return This builder for chaining.
730      */
setType(java.lang.String value)731     public Builder setType(java.lang.String value) {
732       if (value == null) {
733         throw new NullPointerException();
734       }
735       type_ = value;
736       bitField0_ |= 0x00000001;
737       onChanged();
738       return this;
739     }
740     /**
741      *
742      *
743      * <pre>
744      * The fulfillment type, including commonly used types (such as pickup in
745      * store and same day delivery), and custom types. Customers have to map
746      * custom types to their display names before rendering UI.
747      * Supported values:
748      * * "pickup-in-store"
749      * * "ship-to-store"
750      * * "same-day-delivery"
751      * * "next-day-delivery"
752      * * "custom-type-1"
753      * * "custom-type-2"
754      * * "custom-type-3"
755      * * "custom-type-4"
756      * * "custom-type-5"
757      * If this field is set to an invalid value other than these, an
758      * INVALID_ARGUMENT error is returned.
759      * </pre>
760      *
761      * <code>string type = 1;</code>
762      *
763      * @return This builder for chaining.
764      */
clearType()765     public Builder clearType() {
766       type_ = getDefaultInstance().getType();
767       bitField0_ = (bitField0_ & ~0x00000001);
768       onChanged();
769       return this;
770     }
771     /**
772      *
773      *
774      * <pre>
775      * The fulfillment type, including commonly used types (such as pickup in
776      * store and same day delivery), and custom types. Customers have to map
777      * custom types to their display names before rendering UI.
778      * Supported values:
779      * * "pickup-in-store"
780      * * "ship-to-store"
781      * * "same-day-delivery"
782      * * "next-day-delivery"
783      * * "custom-type-1"
784      * * "custom-type-2"
785      * * "custom-type-3"
786      * * "custom-type-4"
787      * * "custom-type-5"
788      * If this field is set to an invalid value other than these, an
789      * INVALID_ARGUMENT error is returned.
790      * </pre>
791      *
792      * <code>string type = 1;</code>
793      *
794      * @param value The bytes for type to set.
795      * @return This builder for chaining.
796      */
setTypeBytes(com.google.protobuf.ByteString value)797     public Builder setTypeBytes(com.google.protobuf.ByteString value) {
798       if (value == null) {
799         throw new NullPointerException();
800       }
801       checkByteStringIsUtf8(value);
802       type_ = value;
803       bitField0_ |= 0x00000001;
804       onChanged();
805       return this;
806     }
807 
808     private com.google.protobuf.LazyStringList placeIds_ =
809         com.google.protobuf.LazyStringArrayList.EMPTY;
810 
ensurePlaceIdsIsMutable()811     private void ensurePlaceIdsIsMutable() {
812       if (!((bitField0_ & 0x00000002) != 0)) {
813         placeIds_ = new com.google.protobuf.LazyStringArrayList(placeIds_);
814         bitField0_ |= 0x00000002;
815       }
816     }
817     /**
818      *
819      *
820      * <pre>
821      * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
822      * such as the store IDs for
823      * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
824      * or the region IDs for
825      * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
826      * A maximum of 3000 values are allowed. Each value must be a string with a
827      * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
828      * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
829      * returned.
830      * </pre>
831      *
832      * <code>repeated string place_ids = 2;</code>
833      *
834      * @return A list containing the placeIds.
835      */
getPlaceIdsList()836     public com.google.protobuf.ProtocolStringList getPlaceIdsList() {
837       return placeIds_.getUnmodifiableView();
838     }
839     /**
840      *
841      *
842      * <pre>
843      * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
844      * such as the store IDs for
845      * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
846      * or the region IDs for
847      * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
848      * A maximum of 3000 values are allowed. Each value must be a string with a
849      * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
850      * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
851      * returned.
852      * </pre>
853      *
854      * <code>repeated string place_ids = 2;</code>
855      *
856      * @return The count of placeIds.
857      */
getPlaceIdsCount()858     public int getPlaceIdsCount() {
859       return placeIds_.size();
860     }
861     /**
862      *
863      *
864      * <pre>
865      * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
866      * such as the store IDs for
867      * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
868      * or the region IDs for
869      * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
870      * A maximum of 3000 values are allowed. Each value must be a string with a
871      * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
872      * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
873      * returned.
874      * </pre>
875      *
876      * <code>repeated string place_ids = 2;</code>
877      *
878      * @param index The index of the element to return.
879      * @return The placeIds at the given index.
880      */
getPlaceIds(int index)881     public java.lang.String getPlaceIds(int index) {
882       return placeIds_.get(index);
883     }
884     /**
885      *
886      *
887      * <pre>
888      * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
889      * such as the store IDs for
890      * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
891      * or the region IDs for
892      * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
893      * A maximum of 3000 values are allowed. Each value must be a string with a
894      * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
895      * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
896      * returned.
897      * </pre>
898      *
899      * <code>repeated string place_ids = 2;</code>
900      *
901      * @param index The index of the value to return.
902      * @return The bytes of the placeIds at the given index.
903      */
getPlaceIdsBytes(int index)904     public com.google.protobuf.ByteString getPlaceIdsBytes(int index) {
905       return placeIds_.getByteString(index);
906     }
907     /**
908      *
909      *
910      * <pre>
911      * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
912      * such as the store IDs for
913      * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
914      * or the region IDs for
915      * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
916      * A maximum of 3000 values are allowed. Each value must be a string with a
917      * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
918      * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
919      * returned.
920      * </pre>
921      *
922      * <code>repeated string place_ids = 2;</code>
923      *
924      * @param index The index to set the value at.
925      * @param value The placeIds to set.
926      * @return This builder for chaining.
927      */
setPlaceIds(int index, java.lang.String value)928     public Builder setPlaceIds(int index, java.lang.String value) {
929       if (value == null) {
930         throw new NullPointerException();
931       }
932       ensurePlaceIdsIsMutable();
933       placeIds_.set(index, value);
934       onChanged();
935       return this;
936     }
937     /**
938      *
939      *
940      * <pre>
941      * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
942      * such as the store IDs for
943      * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
944      * or the region IDs for
945      * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
946      * A maximum of 3000 values are allowed. Each value must be a string with a
947      * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
948      * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
949      * returned.
950      * </pre>
951      *
952      * <code>repeated string place_ids = 2;</code>
953      *
954      * @param value The placeIds to add.
955      * @return This builder for chaining.
956      */
addPlaceIds(java.lang.String value)957     public Builder addPlaceIds(java.lang.String value) {
958       if (value == null) {
959         throw new NullPointerException();
960       }
961       ensurePlaceIdsIsMutable();
962       placeIds_.add(value);
963       onChanged();
964       return this;
965     }
966     /**
967      *
968      *
969      * <pre>
970      * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
971      * such as the store IDs for
972      * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
973      * or the region IDs for
974      * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
975      * A maximum of 3000 values are allowed. Each value must be a string with a
976      * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
977      * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
978      * returned.
979      * </pre>
980      *
981      * <code>repeated string place_ids = 2;</code>
982      *
983      * @param values The placeIds to add.
984      * @return This builder for chaining.
985      */
addAllPlaceIds(java.lang.Iterable<java.lang.String> values)986     public Builder addAllPlaceIds(java.lang.Iterable<java.lang.String> values) {
987       ensurePlaceIdsIsMutable();
988       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, placeIds_);
989       onChanged();
990       return this;
991     }
992     /**
993      *
994      *
995      * <pre>
996      * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
997      * such as the store IDs for
998      * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
999      * or the region IDs for
1000      * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
1001      * A maximum of 3000 values are allowed. Each value must be a string with a
1002      * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
1003      * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
1004      * returned.
1005      * </pre>
1006      *
1007      * <code>repeated string place_ids = 2;</code>
1008      *
1009      * @return This builder for chaining.
1010      */
clearPlaceIds()1011     public Builder clearPlaceIds() {
1012       placeIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1013       bitField0_ = (bitField0_ & ~0x00000002);
1014       onChanged();
1015       return this;
1016     }
1017     /**
1018      *
1019      *
1020      * <pre>
1021      * The IDs for this [type][google.cloud.retail.v2beta.FulfillmentInfo.type],
1022      * such as the store IDs for
1023      * [FulfillmentInfo.type.pickup-in-store][google.cloud.retail.v2beta.FulfillmentInfo.type]
1024      * or the region IDs for
1025      * [FulfillmentInfo.type.same-day-delivery][google.cloud.retail.v2beta.FulfillmentInfo.type].
1026      * A maximum of 3000 values are allowed. Each value must be a string with a
1027      * length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such
1028      * as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is
1029      * returned.
1030      * </pre>
1031      *
1032      * <code>repeated string place_ids = 2;</code>
1033      *
1034      * @param value The bytes of the placeIds to add.
1035      * @return This builder for chaining.
1036      */
addPlaceIdsBytes(com.google.protobuf.ByteString value)1037     public Builder addPlaceIdsBytes(com.google.protobuf.ByteString value) {
1038       if (value == null) {
1039         throw new NullPointerException();
1040       }
1041       checkByteStringIsUtf8(value);
1042       ensurePlaceIdsIsMutable();
1043       placeIds_.add(value);
1044       onChanged();
1045       return this;
1046     }
1047 
1048     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1049     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1050       return super.setUnknownFields(unknownFields);
1051     }
1052 
1053     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1054     public final Builder mergeUnknownFields(
1055         final com.google.protobuf.UnknownFieldSet unknownFields) {
1056       return super.mergeUnknownFields(unknownFields);
1057     }
1058 
1059     // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.FulfillmentInfo)
1060   }
1061 
1062   // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.FulfillmentInfo)
1063   private static final com.google.cloud.retail.v2beta.FulfillmentInfo DEFAULT_INSTANCE;
1064 
1065   static {
1066     DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.FulfillmentInfo();
1067   }
1068 
getDefaultInstance()1069   public static com.google.cloud.retail.v2beta.FulfillmentInfo getDefaultInstance() {
1070     return DEFAULT_INSTANCE;
1071   }
1072 
1073   private static final com.google.protobuf.Parser<FulfillmentInfo> PARSER =
1074       new com.google.protobuf.AbstractParser<FulfillmentInfo>() {
1075         @java.lang.Override
1076         public FulfillmentInfo parsePartialFrom(
1077             com.google.protobuf.CodedInputStream input,
1078             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1079             throws com.google.protobuf.InvalidProtocolBufferException {
1080           Builder builder = newBuilder();
1081           try {
1082             builder.mergeFrom(input, extensionRegistry);
1083           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1084             throw e.setUnfinishedMessage(builder.buildPartial());
1085           } catch (com.google.protobuf.UninitializedMessageException e) {
1086             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1087           } catch (java.io.IOException e) {
1088             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1089                 .setUnfinishedMessage(builder.buildPartial());
1090           }
1091           return builder.buildPartial();
1092         }
1093       };
1094 
parser()1095   public static com.google.protobuf.Parser<FulfillmentInfo> parser() {
1096     return PARSER;
1097   }
1098 
1099   @java.lang.Override
getParserForType()1100   public com.google.protobuf.Parser<FulfillmentInfo> getParserForType() {
1101     return PARSER;
1102   }
1103 
1104   @java.lang.Override
getDefaultInstanceForType()1105   public com.google.cloud.retail.v2beta.FulfillmentInfo getDefaultInstanceForType() {
1106     return DEFAULT_INSTANCE;
1107   }
1108 }
1109