• 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/product.proto
18 
19 package com.google.cloud.retail.v2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Product captures all metadata information of items to be recommended or
26  * searched.
27  * </pre>
28  *
29  * Protobuf type {@code google.cloud.retail.v2.Product}
30  */
31 public final class Product extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.Product)
34     ProductOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use Product.newBuilder() to construct.
Product(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private Product(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
Product()41   private Product() {
42     name_ = "";
43     id_ = "";
44     type_ = 0;
45     primaryProductId_ = "";
46     collectionMemberIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
47     gtin_ = "";
48     categories_ = com.google.protobuf.LazyStringArrayList.EMPTY;
49     title_ = "";
50     brands_ = com.google.protobuf.LazyStringArrayList.EMPTY;
51     description_ = "";
52     languageCode_ = "";
53     tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
54     availability_ = 0;
55     fulfillmentInfo_ = java.util.Collections.emptyList();
56     uri_ = "";
57     images_ = java.util.Collections.emptyList();
58     sizes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
59     materials_ = com.google.protobuf.LazyStringArrayList.EMPTY;
60     patterns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
61     conditions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
62     promotions_ = java.util.Collections.emptyList();
63     variants_ = java.util.Collections.emptyList();
64     localInventories_ = java.util.Collections.emptyList();
65   }
66 
67   @java.lang.Override
68   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)69   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
70     return new Product();
71   }
72 
73   @java.lang.Override
getUnknownFields()74   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
75     return this.unknownFields;
76   }
77 
getDescriptor()78   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
79     return com.google.cloud.retail.v2.ProductProto
80         .internal_static_google_cloud_retail_v2_Product_descriptor;
81   }
82 
83   @SuppressWarnings({"rawtypes"})
84   @java.lang.Override
internalGetMapField(int number)85   protected com.google.protobuf.MapField internalGetMapField(int number) {
86     switch (number) {
87       case 12:
88         return internalGetAttributes();
89       default:
90         throw new RuntimeException("Invalid map field number: " + number);
91     }
92   }
93 
94   @java.lang.Override
95   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()96       internalGetFieldAccessorTable() {
97     return com.google.cloud.retail.v2.ProductProto
98         .internal_static_google_cloud_retail_v2_Product_fieldAccessorTable
99         .ensureFieldAccessorsInitialized(
100             com.google.cloud.retail.v2.Product.class,
101             com.google.cloud.retail.v2.Product.Builder.class);
102   }
103 
104   /**
105    *
106    *
107    * <pre>
108    * The type of this product.
109    * </pre>
110    *
111    * Protobuf enum {@code google.cloud.retail.v2.Product.Type}
112    */
113   public enum Type implements com.google.protobuf.ProtocolMessageEnum {
114     /**
115      *
116      *
117      * <pre>
118      * Default value. Default to
119      * [Catalog.product_level_config.ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
120      * if unset.
121      * </pre>
122      *
123      * <code>TYPE_UNSPECIFIED = 0;</code>
124      */
125     TYPE_UNSPECIFIED(0),
126     /**
127      *
128      *
129      * <pre>
130      * The primary type.
131      * As the primary unit for predicting, indexing and search serving, a
132      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
133      * [Product][google.cloud.retail.v2.Product] is grouped with multiple
134      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
135      * [Product][google.cloud.retail.v2.Product]s.
136      * </pre>
137      *
138      * <code>PRIMARY = 1;</code>
139      */
140     PRIMARY(1),
141     /**
142      *
143      *
144      * <pre>
145      * The variant type.
146      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
147      * [Product][google.cloud.retail.v2.Product]s usually share some common
148      * attributes on the same
149      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
150      * [Product][google.cloud.retail.v2.Product]s, but they have variant
151      * attributes like different colors, sizes and prices, etc.
152      * </pre>
153      *
154      * <code>VARIANT = 2;</code>
155      */
156     VARIANT(2),
157     /**
158      *
159      *
160      * <pre>
161      * The collection type. Collection products are bundled
162      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
163      * [Product][google.cloud.retail.v2.Product]s or
164      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
165      * [Product][google.cloud.retail.v2.Product]s that are sold together, such
166      * as a jewelry set with necklaces, earrings and rings, etc.
167      * </pre>
168      *
169      * <code>COLLECTION = 3;</code>
170      */
171     COLLECTION(3),
172     UNRECOGNIZED(-1),
173     ;
174 
175     /**
176      *
177      *
178      * <pre>
179      * Default value. Default to
180      * [Catalog.product_level_config.ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
181      * if unset.
182      * </pre>
183      *
184      * <code>TYPE_UNSPECIFIED = 0;</code>
185      */
186     public static final int TYPE_UNSPECIFIED_VALUE = 0;
187     /**
188      *
189      *
190      * <pre>
191      * The primary type.
192      * As the primary unit for predicting, indexing and search serving, a
193      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
194      * [Product][google.cloud.retail.v2.Product] is grouped with multiple
195      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
196      * [Product][google.cloud.retail.v2.Product]s.
197      * </pre>
198      *
199      * <code>PRIMARY = 1;</code>
200      */
201     public static final int PRIMARY_VALUE = 1;
202     /**
203      *
204      *
205      * <pre>
206      * The variant type.
207      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
208      * [Product][google.cloud.retail.v2.Product]s usually share some common
209      * attributes on the same
210      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
211      * [Product][google.cloud.retail.v2.Product]s, but they have variant
212      * attributes like different colors, sizes and prices, etc.
213      * </pre>
214      *
215      * <code>VARIANT = 2;</code>
216      */
217     public static final int VARIANT_VALUE = 2;
218     /**
219      *
220      *
221      * <pre>
222      * The collection type. Collection products are bundled
223      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
224      * [Product][google.cloud.retail.v2.Product]s or
225      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
226      * [Product][google.cloud.retail.v2.Product]s that are sold together, such
227      * as a jewelry set with necklaces, earrings and rings, etc.
228      * </pre>
229      *
230      * <code>COLLECTION = 3;</code>
231      */
232     public static final int COLLECTION_VALUE = 3;
233 
getNumber()234     public final int getNumber() {
235       if (this == UNRECOGNIZED) {
236         throw new java.lang.IllegalArgumentException(
237             "Can't get the number of an unknown enum value.");
238       }
239       return value;
240     }
241 
242     /**
243      * @param value The numeric wire value of the corresponding enum entry.
244      * @return The enum associated with the given numeric wire value.
245      * @deprecated Use {@link #forNumber(int)} instead.
246      */
247     @java.lang.Deprecated
valueOf(int value)248     public static Type valueOf(int value) {
249       return forNumber(value);
250     }
251 
252     /**
253      * @param value The numeric wire value of the corresponding enum entry.
254      * @return The enum associated with the given numeric wire value.
255      */
forNumber(int value)256     public static Type forNumber(int value) {
257       switch (value) {
258         case 0:
259           return TYPE_UNSPECIFIED;
260         case 1:
261           return PRIMARY;
262         case 2:
263           return VARIANT;
264         case 3:
265           return COLLECTION;
266         default:
267           return null;
268       }
269     }
270 
internalGetValueMap()271     public static com.google.protobuf.Internal.EnumLiteMap<Type> internalGetValueMap() {
272       return internalValueMap;
273     }
274 
275     private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap =
276         new com.google.protobuf.Internal.EnumLiteMap<Type>() {
277           public Type findValueByNumber(int number) {
278             return Type.forNumber(number);
279           }
280         };
281 
getValueDescriptor()282     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
283       if (this == UNRECOGNIZED) {
284         throw new java.lang.IllegalStateException(
285             "Can't get the descriptor of an unrecognized enum value.");
286       }
287       return getDescriptor().getValues().get(ordinal());
288     }
289 
getDescriptorForType()290     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
291       return getDescriptor();
292     }
293 
getDescriptor()294     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
295       return com.google.cloud.retail.v2.Product.getDescriptor().getEnumTypes().get(0);
296     }
297 
298     private static final Type[] VALUES = values();
299 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)300     public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
301       if (desc.getType() != getDescriptor()) {
302         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
303       }
304       if (desc.getIndex() == -1) {
305         return UNRECOGNIZED;
306       }
307       return VALUES[desc.getIndex()];
308     }
309 
310     private final int value;
311 
Type(int value)312     private Type(int value) {
313       this.value = value;
314     }
315 
316     // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2.Product.Type)
317   }
318 
319   /**
320    *
321    *
322    * <pre>
323    * Product availability. If this field is unspecified, the product is
324    * assumed to be in stock.
325    * </pre>
326    *
327    * Protobuf enum {@code google.cloud.retail.v2.Product.Availability}
328    */
329   public enum Availability implements com.google.protobuf.ProtocolMessageEnum {
330     /**
331      *
332      *
333      * <pre>
334      * Default product availability. Default to
335      * [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK]
336      * if unset.
337      * </pre>
338      *
339      * <code>AVAILABILITY_UNSPECIFIED = 0;</code>
340      */
341     AVAILABILITY_UNSPECIFIED(0),
342     /**
343      *
344      *
345      * <pre>
346      * Product in stock.
347      * </pre>
348      *
349      * <code>IN_STOCK = 1;</code>
350      */
351     IN_STOCK(1),
352     /**
353      *
354      *
355      * <pre>
356      * Product out of stock.
357      * </pre>
358      *
359      * <code>OUT_OF_STOCK = 2;</code>
360      */
361     OUT_OF_STOCK(2),
362     /**
363      *
364      *
365      * <pre>
366      * Product that is in pre-order state.
367      * </pre>
368      *
369      * <code>PREORDER = 3;</code>
370      */
371     PREORDER(3),
372     /**
373      *
374      *
375      * <pre>
376      * Product that is back-ordered (i.e. temporarily out of stock).
377      * </pre>
378      *
379      * <code>BACKORDER = 4;</code>
380      */
381     BACKORDER(4),
382     UNRECOGNIZED(-1),
383     ;
384 
385     /**
386      *
387      *
388      * <pre>
389      * Default product availability. Default to
390      * [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK]
391      * if unset.
392      * </pre>
393      *
394      * <code>AVAILABILITY_UNSPECIFIED = 0;</code>
395      */
396     public static final int AVAILABILITY_UNSPECIFIED_VALUE = 0;
397     /**
398      *
399      *
400      * <pre>
401      * Product in stock.
402      * </pre>
403      *
404      * <code>IN_STOCK = 1;</code>
405      */
406     public static final int IN_STOCK_VALUE = 1;
407     /**
408      *
409      *
410      * <pre>
411      * Product out of stock.
412      * </pre>
413      *
414      * <code>OUT_OF_STOCK = 2;</code>
415      */
416     public static final int OUT_OF_STOCK_VALUE = 2;
417     /**
418      *
419      *
420      * <pre>
421      * Product that is in pre-order state.
422      * </pre>
423      *
424      * <code>PREORDER = 3;</code>
425      */
426     public static final int PREORDER_VALUE = 3;
427     /**
428      *
429      *
430      * <pre>
431      * Product that is back-ordered (i.e. temporarily out of stock).
432      * </pre>
433      *
434      * <code>BACKORDER = 4;</code>
435      */
436     public static final int BACKORDER_VALUE = 4;
437 
getNumber()438     public final int getNumber() {
439       if (this == UNRECOGNIZED) {
440         throw new java.lang.IllegalArgumentException(
441             "Can't get the number of an unknown enum value.");
442       }
443       return value;
444     }
445 
446     /**
447      * @param value The numeric wire value of the corresponding enum entry.
448      * @return The enum associated with the given numeric wire value.
449      * @deprecated Use {@link #forNumber(int)} instead.
450      */
451     @java.lang.Deprecated
valueOf(int value)452     public static Availability valueOf(int value) {
453       return forNumber(value);
454     }
455 
456     /**
457      * @param value The numeric wire value of the corresponding enum entry.
458      * @return The enum associated with the given numeric wire value.
459      */
forNumber(int value)460     public static Availability forNumber(int value) {
461       switch (value) {
462         case 0:
463           return AVAILABILITY_UNSPECIFIED;
464         case 1:
465           return IN_STOCK;
466         case 2:
467           return OUT_OF_STOCK;
468         case 3:
469           return PREORDER;
470         case 4:
471           return BACKORDER;
472         default:
473           return null;
474       }
475     }
476 
internalGetValueMap()477     public static com.google.protobuf.Internal.EnumLiteMap<Availability> internalGetValueMap() {
478       return internalValueMap;
479     }
480 
481     private static final com.google.protobuf.Internal.EnumLiteMap<Availability> internalValueMap =
482         new com.google.protobuf.Internal.EnumLiteMap<Availability>() {
483           public Availability findValueByNumber(int number) {
484             return Availability.forNumber(number);
485           }
486         };
487 
getValueDescriptor()488     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
489       if (this == UNRECOGNIZED) {
490         throw new java.lang.IllegalStateException(
491             "Can't get the descriptor of an unrecognized enum value.");
492       }
493       return getDescriptor().getValues().get(ordinal());
494     }
495 
getDescriptorForType()496     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
497       return getDescriptor();
498     }
499 
getDescriptor()500     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
501       return com.google.cloud.retail.v2.Product.getDescriptor().getEnumTypes().get(1);
502     }
503 
504     private static final Availability[] VALUES = values();
505 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)506     public static Availability valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
507       if (desc.getType() != getDescriptor()) {
508         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
509       }
510       if (desc.getIndex() == -1) {
511         return UNRECOGNIZED;
512       }
513       return VALUES[desc.getIndex()];
514     }
515 
516     private final int value;
517 
Availability(int value)518     private Availability(int value) {
519       this.value = value;
520     }
521 
522     // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2.Product.Availability)
523   }
524 
525   private int expirationCase_ = 0;
526   private java.lang.Object expiration_;
527 
528   public enum ExpirationCase
529       implements
530           com.google.protobuf.Internal.EnumLite,
531           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
532     EXPIRE_TIME(16),
533     TTL(17),
534     EXPIRATION_NOT_SET(0);
535     private final int value;
536 
ExpirationCase(int value)537     private ExpirationCase(int value) {
538       this.value = value;
539     }
540     /**
541      * @param value The number of the enum to look for.
542      * @return The enum associated with the given number.
543      * @deprecated Use {@link #forNumber(int)} instead.
544      */
545     @java.lang.Deprecated
valueOf(int value)546     public static ExpirationCase valueOf(int value) {
547       return forNumber(value);
548     }
549 
forNumber(int value)550     public static ExpirationCase forNumber(int value) {
551       switch (value) {
552         case 16:
553           return EXPIRE_TIME;
554         case 17:
555           return TTL;
556         case 0:
557           return EXPIRATION_NOT_SET;
558         default:
559           return null;
560       }
561     }
562 
getNumber()563     public int getNumber() {
564       return this.value;
565     }
566   };
567 
getExpirationCase()568   public ExpirationCase getExpirationCase() {
569     return ExpirationCase.forNumber(expirationCase_);
570   }
571 
572   public static final int EXPIRE_TIME_FIELD_NUMBER = 16;
573   /**
574    *
575    *
576    * <pre>
577    * The timestamp when this product becomes unavailable for
578    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
579    * that this is only applicable to
580    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
581    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
582    * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
583    * In general, we suggest the users to delete the stale products explicitly,
584    * instead of using this field to determine staleness.
585    * If it is set, the [Product][google.cloud.retail.v2.Product] is not
586    * available for
587    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
588    * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
589    * product can still be retrieved by
590    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
591    * and
592    * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
593    * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
594    * than [available_time][google.cloud.retail.v2.Product.available_time] and
595    * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
596    * INVALID_ARGUMENT error is thrown.
597    * Corresponding properties: Google Merchant Center property
598    * [expiration_date](https://support.google.com/merchants/answer/6324499).
599    * </pre>
600    *
601    * <code>.google.protobuf.Timestamp expire_time = 16;</code>
602    *
603    * @return Whether the expireTime field is set.
604    */
605   @java.lang.Override
hasExpireTime()606   public boolean hasExpireTime() {
607     return expirationCase_ == 16;
608   }
609   /**
610    *
611    *
612    * <pre>
613    * The timestamp when this product becomes unavailable for
614    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
615    * that this is only applicable to
616    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
617    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
618    * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
619    * In general, we suggest the users to delete the stale products explicitly,
620    * instead of using this field to determine staleness.
621    * If it is set, the [Product][google.cloud.retail.v2.Product] is not
622    * available for
623    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
624    * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
625    * product can still be retrieved by
626    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
627    * and
628    * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
629    * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
630    * than [available_time][google.cloud.retail.v2.Product.available_time] and
631    * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
632    * INVALID_ARGUMENT error is thrown.
633    * Corresponding properties: Google Merchant Center property
634    * [expiration_date](https://support.google.com/merchants/answer/6324499).
635    * </pre>
636    *
637    * <code>.google.protobuf.Timestamp expire_time = 16;</code>
638    *
639    * @return The expireTime.
640    */
641   @java.lang.Override
getExpireTime()642   public com.google.protobuf.Timestamp getExpireTime() {
643     if (expirationCase_ == 16) {
644       return (com.google.protobuf.Timestamp) expiration_;
645     }
646     return com.google.protobuf.Timestamp.getDefaultInstance();
647   }
648   /**
649    *
650    *
651    * <pre>
652    * The timestamp when this product becomes unavailable for
653    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
654    * that this is only applicable to
655    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
656    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
657    * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
658    * In general, we suggest the users to delete the stale products explicitly,
659    * instead of using this field to determine staleness.
660    * If it is set, the [Product][google.cloud.retail.v2.Product] is not
661    * available for
662    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
663    * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
664    * product can still be retrieved by
665    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
666    * and
667    * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
668    * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
669    * than [available_time][google.cloud.retail.v2.Product.available_time] and
670    * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
671    * INVALID_ARGUMENT error is thrown.
672    * Corresponding properties: Google Merchant Center property
673    * [expiration_date](https://support.google.com/merchants/answer/6324499).
674    * </pre>
675    *
676    * <code>.google.protobuf.Timestamp expire_time = 16;</code>
677    */
678   @java.lang.Override
getExpireTimeOrBuilder()679   public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
680     if (expirationCase_ == 16) {
681       return (com.google.protobuf.Timestamp) expiration_;
682     }
683     return com.google.protobuf.Timestamp.getDefaultInstance();
684   }
685 
686   public static final int TTL_FIELD_NUMBER = 17;
687   /**
688    *
689    *
690    * <pre>
691    * Input only. The TTL (time to live) of the product. Note that this is only
692    * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
693    * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
694    * and ignored for
695    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
696    * we suggest the users to delete the stale products explicitly, instead of
697    * using this field to determine staleness.
698    * If it is set, it must be a non-negative value, and
699    * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
700    * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
701    * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
702    * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
703    * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
704    * If it is set, the product is not available for
705    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
706    * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
707    * However, the product can still be retrieved by
708    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
709    * and
710    * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
711    * </pre>
712    *
713    * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
714    *
715    * @return Whether the ttl field is set.
716    */
717   @java.lang.Override
hasTtl()718   public boolean hasTtl() {
719     return expirationCase_ == 17;
720   }
721   /**
722    *
723    *
724    * <pre>
725    * Input only. The TTL (time to live) of the product. Note that this is only
726    * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
727    * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
728    * and ignored for
729    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
730    * we suggest the users to delete the stale products explicitly, instead of
731    * using this field to determine staleness.
732    * If it is set, it must be a non-negative value, and
733    * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
734    * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
735    * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
736    * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
737    * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
738    * If it is set, the product is not available for
739    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
740    * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
741    * However, the product can still be retrieved by
742    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
743    * and
744    * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
745    * </pre>
746    *
747    * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
748    *
749    * @return The ttl.
750    */
751   @java.lang.Override
getTtl()752   public com.google.protobuf.Duration getTtl() {
753     if (expirationCase_ == 17) {
754       return (com.google.protobuf.Duration) expiration_;
755     }
756     return com.google.protobuf.Duration.getDefaultInstance();
757   }
758   /**
759    *
760    *
761    * <pre>
762    * Input only. The TTL (time to live) of the product. Note that this is only
763    * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
764    * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
765    * and ignored for
766    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
767    * we suggest the users to delete the stale products explicitly, instead of
768    * using this field to determine staleness.
769    * If it is set, it must be a non-negative value, and
770    * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
771    * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
772    * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
773    * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
774    * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
775    * If it is set, the product is not available for
776    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
777    * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
778    * However, the product can still be retrieved by
779    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
780    * and
781    * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
782    * </pre>
783    *
784    * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
785    */
786   @java.lang.Override
getTtlOrBuilder()787   public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
788     if (expirationCase_ == 17) {
789       return (com.google.protobuf.Duration) expiration_;
790     }
791     return com.google.protobuf.Duration.getDefaultInstance();
792   }
793 
794   public static final int NAME_FIELD_NUMBER = 1;
795 
796   @SuppressWarnings("serial")
797   private volatile java.lang.Object name_ = "";
798   /**
799    *
800    *
801    * <pre>
802    * Immutable. Full resource name of the product, such as
803    * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
804    * </pre>
805    *
806    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
807    *
808    * @return The name.
809    */
810   @java.lang.Override
getName()811   public java.lang.String getName() {
812     java.lang.Object ref = name_;
813     if (ref instanceof java.lang.String) {
814       return (java.lang.String) ref;
815     } else {
816       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
817       java.lang.String s = bs.toStringUtf8();
818       name_ = s;
819       return s;
820     }
821   }
822   /**
823    *
824    *
825    * <pre>
826    * Immutable. Full resource name of the product, such as
827    * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
828    * </pre>
829    *
830    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
831    *
832    * @return The bytes for name.
833    */
834   @java.lang.Override
getNameBytes()835   public com.google.protobuf.ByteString getNameBytes() {
836     java.lang.Object ref = name_;
837     if (ref instanceof java.lang.String) {
838       com.google.protobuf.ByteString b =
839           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
840       name_ = b;
841       return b;
842     } else {
843       return (com.google.protobuf.ByteString) ref;
844     }
845   }
846 
847   public static final int ID_FIELD_NUMBER = 2;
848 
849   @SuppressWarnings("serial")
850   private volatile java.lang.Object id_ = "";
851   /**
852    *
853    *
854    * <pre>
855    * Immutable. [Product][google.cloud.retail.v2.Product] identifier, which is
856    * the final component of [name][google.cloud.retail.v2.Product.name]. For
857    * example, this field is "id_1", if
858    * [name][google.cloud.retail.v2.Product.name] is
859    * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`.
860    * This field must be a UTF-8 encoded string with a length limit of 128
861    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
862    * Corresponding properties: Google Merchant Center property
863    * [id](https://support.google.com/merchants/answer/6324405). Schema.org
864    * property [Product.sku](https://schema.org/sku).
865    * </pre>
866    *
867    * <code>string id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
868    *
869    * @return The id.
870    */
871   @java.lang.Override
getId()872   public java.lang.String getId() {
873     java.lang.Object ref = id_;
874     if (ref instanceof java.lang.String) {
875       return (java.lang.String) ref;
876     } else {
877       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
878       java.lang.String s = bs.toStringUtf8();
879       id_ = s;
880       return s;
881     }
882   }
883   /**
884    *
885    *
886    * <pre>
887    * Immutable. [Product][google.cloud.retail.v2.Product] identifier, which is
888    * the final component of [name][google.cloud.retail.v2.Product.name]. For
889    * example, this field is "id_1", if
890    * [name][google.cloud.retail.v2.Product.name] is
891    * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`.
892    * This field must be a UTF-8 encoded string with a length limit of 128
893    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
894    * Corresponding properties: Google Merchant Center property
895    * [id](https://support.google.com/merchants/answer/6324405). Schema.org
896    * property [Product.sku](https://schema.org/sku).
897    * </pre>
898    *
899    * <code>string id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
900    *
901    * @return The bytes for id.
902    */
903   @java.lang.Override
getIdBytes()904   public com.google.protobuf.ByteString getIdBytes() {
905     java.lang.Object ref = id_;
906     if (ref instanceof java.lang.String) {
907       com.google.protobuf.ByteString b =
908           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
909       id_ = b;
910       return b;
911     } else {
912       return (com.google.protobuf.ByteString) ref;
913     }
914   }
915 
916   public static final int TYPE_FIELD_NUMBER = 3;
917   private int type_ = 0;
918   /**
919    *
920    *
921    * <pre>
922    * Immutable. The type of the product. Default to
923    * [Catalog.product_level_config.ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
924    * if unset.
925    * </pre>
926    *
927    * <code>.google.cloud.retail.v2.Product.Type type = 3 [(.google.api.field_behavior) = IMMUTABLE];
928    * </code>
929    *
930    * @return The enum numeric value on the wire for type.
931    */
932   @java.lang.Override
getTypeValue()933   public int getTypeValue() {
934     return type_;
935   }
936   /**
937    *
938    *
939    * <pre>
940    * Immutable. The type of the product. Default to
941    * [Catalog.product_level_config.ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
942    * if unset.
943    * </pre>
944    *
945    * <code>.google.cloud.retail.v2.Product.Type type = 3 [(.google.api.field_behavior) = IMMUTABLE];
946    * </code>
947    *
948    * @return The type.
949    */
950   @java.lang.Override
getType()951   public com.google.cloud.retail.v2.Product.Type getType() {
952     com.google.cloud.retail.v2.Product.Type result =
953         com.google.cloud.retail.v2.Product.Type.forNumber(type_);
954     return result == null ? com.google.cloud.retail.v2.Product.Type.UNRECOGNIZED : result;
955   }
956 
957   public static final int PRIMARY_PRODUCT_ID_FIELD_NUMBER = 4;
958 
959   @SuppressWarnings("serial")
960   private volatile java.lang.Object primaryProductId_ = "";
961   /**
962    *
963    *
964    * <pre>
965    * Variant group identifier. Must be an
966    * [id][google.cloud.retail.v2.Product.id], with the same parent branch with
967    * this product. Otherwise, an error is thrown.
968    * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
969    * [Product][google.cloud.retail.v2.Product]s, this field can only be empty or
970    * set to the same value as [id][google.cloud.retail.v2.Product.id].
971    * For VARIANT [Product][google.cloud.retail.v2.Product]s, this field cannot
972    * be empty. A maximum of 2,000 products are allowed to share the same
973    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
974    * [Product][google.cloud.retail.v2.Product]. Otherwise, an INVALID_ARGUMENT
975    * error is returned.
976    * Corresponding properties: Google Merchant Center property
977    * [item_group_id](https://support.google.com/merchants/answer/6324507).
978    * Schema.org property
979    * [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
980    * </pre>
981    *
982    * <code>string primary_product_id = 4;</code>
983    *
984    * @return The primaryProductId.
985    */
986   @java.lang.Override
getPrimaryProductId()987   public java.lang.String getPrimaryProductId() {
988     java.lang.Object ref = primaryProductId_;
989     if (ref instanceof java.lang.String) {
990       return (java.lang.String) ref;
991     } else {
992       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
993       java.lang.String s = bs.toStringUtf8();
994       primaryProductId_ = s;
995       return s;
996     }
997   }
998   /**
999    *
1000    *
1001    * <pre>
1002    * Variant group identifier. Must be an
1003    * [id][google.cloud.retail.v2.Product.id], with the same parent branch with
1004    * this product. Otherwise, an error is thrown.
1005    * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
1006    * [Product][google.cloud.retail.v2.Product]s, this field can only be empty or
1007    * set to the same value as [id][google.cloud.retail.v2.Product.id].
1008    * For VARIANT [Product][google.cloud.retail.v2.Product]s, this field cannot
1009    * be empty. A maximum of 2,000 products are allowed to share the same
1010    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
1011    * [Product][google.cloud.retail.v2.Product]. Otherwise, an INVALID_ARGUMENT
1012    * error is returned.
1013    * Corresponding properties: Google Merchant Center property
1014    * [item_group_id](https://support.google.com/merchants/answer/6324507).
1015    * Schema.org property
1016    * [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
1017    * </pre>
1018    *
1019    * <code>string primary_product_id = 4;</code>
1020    *
1021    * @return The bytes for primaryProductId.
1022    */
1023   @java.lang.Override
getPrimaryProductIdBytes()1024   public com.google.protobuf.ByteString getPrimaryProductIdBytes() {
1025     java.lang.Object ref = primaryProductId_;
1026     if (ref instanceof java.lang.String) {
1027       com.google.protobuf.ByteString b =
1028           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1029       primaryProductId_ = b;
1030       return b;
1031     } else {
1032       return (com.google.protobuf.ByteString) ref;
1033     }
1034   }
1035 
1036   public static final int COLLECTION_MEMBER_IDS_FIELD_NUMBER = 5;
1037 
1038   @SuppressWarnings("serial")
1039   private com.google.protobuf.LazyStringList collectionMemberIds_;
1040   /**
1041    *
1042    *
1043    * <pre>
1044    * The [id][google.cloud.retail.v2.Product.id] of the collection members when
1045    * [type][google.cloud.retail.v2.Product.type] is
1046    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
1047    * Non-existent product ids are allowed.
1048    * The [type][google.cloud.retail.v2.Product.type] of the members must be
1049    * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
1050    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
1051    * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
1052    * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
1053    * return.
1054    * </pre>
1055    *
1056    * <code>repeated string collection_member_ids = 5;</code>
1057    *
1058    * @return A list containing the collectionMemberIds.
1059    */
getCollectionMemberIdsList()1060   public com.google.protobuf.ProtocolStringList getCollectionMemberIdsList() {
1061     return collectionMemberIds_;
1062   }
1063   /**
1064    *
1065    *
1066    * <pre>
1067    * The [id][google.cloud.retail.v2.Product.id] of the collection members when
1068    * [type][google.cloud.retail.v2.Product.type] is
1069    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
1070    * Non-existent product ids are allowed.
1071    * The [type][google.cloud.retail.v2.Product.type] of the members must be
1072    * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
1073    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
1074    * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
1075    * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
1076    * return.
1077    * </pre>
1078    *
1079    * <code>repeated string collection_member_ids = 5;</code>
1080    *
1081    * @return The count of collectionMemberIds.
1082    */
getCollectionMemberIdsCount()1083   public int getCollectionMemberIdsCount() {
1084     return collectionMemberIds_.size();
1085   }
1086   /**
1087    *
1088    *
1089    * <pre>
1090    * The [id][google.cloud.retail.v2.Product.id] of the collection members when
1091    * [type][google.cloud.retail.v2.Product.type] is
1092    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
1093    * Non-existent product ids are allowed.
1094    * The [type][google.cloud.retail.v2.Product.type] of the members must be
1095    * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
1096    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
1097    * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
1098    * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
1099    * return.
1100    * </pre>
1101    *
1102    * <code>repeated string collection_member_ids = 5;</code>
1103    *
1104    * @param index The index of the element to return.
1105    * @return The collectionMemberIds at the given index.
1106    */
getCollectionMemberIds(int index)1107   public java.lang.String getCollectionMemberIds(int index) {
1108     return collectionMemberIds_.get(index);
1109   }
1110   /**
1111    *
1112    *
1113    * <pre>
1114    * The [id][google.cloud.retail.v2.Product.id] of the collection members when
1115    * [type][google.cloud.retail.v2.Product.type] is
1116    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
1117    * Non-existent product ids are allowed.
1118    * The [type][google.cloud.retail.v2.Product.type] of the members must be
1119    * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
1120    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
1121    * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
1122    * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
1123    * return.
1124    * </pre>
1125    *
1126    * <code>repeated string collection_member_ids = 5;</code>
1127    *
1128    * @param index The index of the value to return.
1129    * @return The bytes of the collectionMemberIds at the given index.
1130    */
getCollectionMemberIdsBytes(int index)1131   public com.google.protobuf.ByteString getCollectionMemberIdsBytes(int index) {
1132     return collectionMemberIds_.getByteString(index);
1133   }
1134 
1135   public static final int GTIN_FIELD_NUMBER = 6;
1136 
1137   @SuppressWarnings("serial")
1138   private volatile java.lang.Object gtin_ = "";
1139   /**
1140    *
1141    *
1142    * <pre>
1143    * The Global Trade Item Number (GTIN) of the product.
1144    * This field must be a UTF-8 encoded string with a length limit of 128
1145    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1146    * This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
1147    * returned.
1148    * Corresponding properties: Google Merchant Center property
1149    * [gtin](https://support.google.com/merchants/answer/6324461).
1150    * Schema.org property
1151    * [Product.isbn](https://schema.org/isbn),
1152    * [Product.gtin8](https://schema.org/gtin8),
1153    * [Product.gtin12](https://schema.org/gtin12),
1154    * [Product.gtin13](https://schema.org/gtin13), or
1155    * [Product.gtin14](https://schema.org/gtin14).
1156    * If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
1157    * </pre>
1158    *
1159    * <code>string gtin = 6;</code>
1160    *
1161    * @return The gtin.
1162    */
1163   @java.lang.Override
getGtin()1164   public java.lang.String getGtin() {
1165     java.lang.Object ref = gtin_;
1166     if (ref instanceof java.lang.String) {
1167       return (java.lang.String) ref;
1168     } else {
1169       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1170       java.lang.String s = bs.toStringUtf8();
1171       gtin_ = s;
1172       return s;
1173     }
1174   }
1175   /**
1176    *
1177    *
1178    * <pre>
1179    * The Global Trade Item Number (GTIN) of the product.
1180    * This field must be a UTF-8 encoded string with a length limit of 128
1181    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1182    * This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
1183    * returned.
1184    * Corresponding properties: Google Merchant Center property
1185    * [gtin](https://support.google.com/merchants/answer/6324461).
1186    * Schema.org property
1187    * [Product.isbn](https://schema.org/isbn),
1188    * [Product.gtin8](https://schema.org/gtin8),
1189    * [Product.gtin12](https://schema.org/gtin12),
1190    * [Product.gtin13](https://schema.org/gtin13), or
1191    * [Product.gtin14](https://schema.org/gtin14).
1192    * If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
1193    * </pre>
1194    *
1195    * <code>string gtin = 6;</code>
1196    *
1197    * @return The bytes for gtin.
1198    */
1199   @java.lang.Override
getGtinBytes()1200   public com.google.protobuf.ByteString getGtinBytes() {
1201     java.lang.Object ref = gtin_;
1202     if (ref instanceof java.lang.String) {
1203       com.google.protobuf.ByteString b =
1204           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1205       gtin_ = b;
1206       return b;
1207     } else {
1208       return (com.google.protobuf.ByteString) ref;
1209     }
1210   }
1211 
1212   public static final int CATEGORIES_FIELD_NUMBER = 7;
1213 
1214   @SuppressWarnings("serial")
1215   private com.google.protobuf.LazyStringList categories_;
1216   /**
1217    *
1218    *
1219    * <pre>
1220    * Product categories. This field is repeated for supporting one product
1221    * belonging to several parallel categories. Strongly recommended using the
1222    * full path for better search / recommendation quality.
1223    * To represent full path of category, use '&gt;' sign to separate different
1224    * hierarchies. If '&gt;' is part of the category name, replace it with
1225    * other character(s).
1226    * For example, if a shoes product belongs to both
1227    * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
1228    * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
1229    * represented as:
1230    *      "categories": [
1231    *        "Shoes &amp; Accessories &gt; Shoes",
1232    *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
1233    *      ]
1234    * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
1235    * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
1236    * error is returned.
1237    * At most 250 values are allowed per
1238    * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
1239    * Each value must be a UTF-8 encoded string with a length limit of 5,000
1240    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1241    * Corresponding properties: Google Merchant Center property
1242    * [google_product_category][mc_google_product_category]. Schema.org property
1243    * [Product.category] (https://schema.org/category).
1244    * [mc_google_product_category]:
1245    * https://support.google.com/merchants/answer/6324436
1246    * </pre>
1247    *
1248    * <code>repeated string categories = 7;</code>
1249    *
1250    * @return A list containing the categories.
1251    */
getCategoriesList()1252   public com.google.protobuf.ProtocolStringList getCategoriesList() {
1253     return categories_;
1254   }
1255   /**
1256    *
1257    *
1258    * <pre>
1259    * Product categories. This field is repeated for supporting one product
1260    * belonging to several parallel categories. Strongly recommended using the
1261    * full path for better search / recommendation quality.
1262    * To represent full path of category, use '&gt;' sign to separate different
1263    * hierarchies. If '&gt;' is part of the category name, replace it with
1264    * other character(s).
1265    * For example, if a shoes product belongs to both
1266    * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
1267    * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
1268    * represented as:
1269    *      "categories": [
1270    *        "Shoes &amp; Accessories &gt; Shoes",
1271    *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
1272    *      ]
1273    * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
1274    * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
1275    * error is returned.
1276    * At most 250 values are allowed per
1277    * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
1278    * Each value must be a UTF-8 encoded string with a length limit of 5,000
1279    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1280    * Corresponding properties: Google Merchant Center property
1281    * [google_product_category][mc_google_product_category]. Schema.org property
1282    * [Product.category] (https://schema.org/category).
1283    * [mc_google_product_category]:
1284    * https://support.google.com/merchants/answer/6324436
1285    * </pre>
1286    *
1287    * <code>repeated string categories = 7;</code>
1288    *
1289    * @return The count of categories.
1290    */
getCategoriesCount()1291   public int getCategoriesCount() {
1292     return categories_.size();
1293   }
1294   /**
1295    *
1296    *
1297    * <pre>
1298    * Product categories. This field is repeated for supporting one product
1299    * belonging to several parallel categories. Strongly recommended using the
1300    * full path for better search / recommendation quality.
1301    * To represent full path of category, use '&gt;' sign to separate different
1302    * hierarchies. If '&gt;' is part of the category name, replace it with
1303    * other character(s).
1304    * For example, if a shoes product belongs to both
1305    * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
1306    * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
1307    * represented as:
1308    *      "categories": [
1309    *        "Shoes &amp; Accessories &gt; Shoes",
1310    *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
1311    *      ]
1312    * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
1313    * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
1314    * error is returned.
1315    * At most 250 values are allowed per
1316    * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
1317    * Each value must be a UTF-8 encoded string with a length limit of 5,000
1318    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1319    * Corresponding properties: Google Merchant Center property
1320    * [google_product_category][mc_google_product_category]. Schema.org property
1321    * [Product.category] (https://schema.org/category).
1322    * [mc_google_product_category]:
1323    * https://support.google.com/merchants/answer/6324436
1324    * </pre>
1325    *
1326    * <code>repeated string categories = 7;</code>
1327    *
1328    * @param index The index of the element to return.
1329    * @return The categories at the given index.
1330    */
getCategories(int index)1331   public java.lang.String getCategories(int index) {
1332     return categories_.get(index);
1333   }
1334   /**
1335    *
1336    *
1337    * <pre>
1338    * Product categories. This field is repeated for supporting one product
1339    * belonging to several parallel categories. Strongly recommended using the
1340    * full path for better search / recommendation quality.
1341    * To represent full path of category, use '&gt;' sign to separate different
1342    * hierarchies. If '&gt;' is part of the category name, replace it with
1343    * other character(s).
1344    * For example, if a shoes product belongs to both
1345    * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
1346    * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
1347    * represented as:
1348    *      "categories": [
1349    *        "Shoes &amp; Accessories &gt; Shoes",
1350    *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
1351    *      ]
1352    * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
1353    * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
1354    * error is returned.
1355    * At most 250 values are allowed per
1356    * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
1357    * Each value must be a UTF-8 encoded string with a length limit of 5,000
1358    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1359    * Corresponding properties: Google Merchant Center property
1360    * [google_product_category][mc_google_product_category]. Schema.org property
1361    * [Product.category] (https://schema.org/category).
1362    * [mc_google_product_category]:
1363    * https://support.google.com/merchants/answer/6324436
1364    * </pre>
1365    *
1366    * <code>repeated string categories = 7;</code>
1367    *
1368    * @param index The index of the value to return.
1369    * @return The bytes of the categories at the given index.
1370    */
getCategoriesBytes(int index)1371   public com.google.protobuf.ByteString getCategoriesBytes(int index) {
1372     return categories_.getByteString(index);
1373   }
1374 
1375   public static final int TITLE_FIELD_NUMBER = 8;
1376 
1377   @SuppressWarnings("serial")
1378   private volatile java.lang.Object title_ = "";
1379   /**
1380    *
1381    *
1382    * <pre>
1383    * Required. Product title.
1384    * This field must be a UTF-8 encoded string with a length limit of 1,000
1385    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1386    * Corresponding properties: Google Merchant Center property
1387    * [title](https://support.google.com/merchants/answer/6324415). Schema.org
1388    * property [Product.name](https://schema.org/name).
1389    * </pre>
1390    *
1391    * <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
1392    *
1393    * @return The title.
1394    */
1395   @java.lang.Override
getTitle()1396   public java.lang.String getTitle() {
1397     java.lang.Object ref = title_;
1398     if (ref instanceof java.lang.String) {
1399       return (java.lang.String) ref;
1400     } else {
1401       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1402       java.lang.String s = bs.toStringUtf8();
1403       title_ = s;
1404       return s;
1405     }
1406   }
1407   /**
1408    *
1409    *
1410    * <pre>
1411    * Required. Product title.
1412    * This field must be a UTF-8 encoded string with a length limit of 1,000
1413    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1414    * Corresponding properties: Google Merchant Center property
1415    * [title](https://support.google.com/merchants/answer/6324415). Schema.org
1416    * property [Product.name](https://schema.org/name).
1417    * </pre>
1418    *
1419    * <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
1420    *
1421    * @return The bytes for title.
1422    */
1423   @java.lang.Override
getTitleBytes()1424   public com.google.protobuf.ByteString getTitleBytes() {
1425     java.lang.Object ref = title_;
1426     if (ref instanceof java.lang.String) {
1427       com.google.protobuf.ByteString b =
1428           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1429       title_ = b;
1430       return b;
1431     } else {
1432       return (com.google.protobuf.ByteString) ref;
1433     }
1434   }
1435 
1436   public static final int BRANDS_FIELD_NUMBER = 9;
1437 
1438   @SuppressWarnings("serial")
1439   private com.google.protobuf.LazyStringList brands_;
1440   /**
1441    *
1442    *
1443    * <pre>
1444    * The brands of the product.
1445    * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
1446    * string with a length limit of 1,000 characters. Otherwise, an
1447    * INVALID_ARGUMENT error is returned.
1448    * Corresponding properties: Google Merchant Center property
1449    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
1450    * property [Product.brand](https://schema.org/brand).
1451    * </pre>
1452    *
1453    * <code>repeated string brands = 9;</code>
1454    *
1455    * @return A list containing the brands.
1456    */
getBrandsList()1457   public com.google.protobuf.ProtocolStringList getBrandsList() {
1458     return brands_;
1459   }
1460   /**
1461    *
1462    *
1463    * <pre>
1464    * The brands of the product.
1465    * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
1466    * string with a length limit of 1,000 characters. Otherwise, an
1467    * INVALID_ARGUMENT error is returned.
1468    * Corresponding properties: Google Merchant Center property
1469    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
1470    * property [Product.brand](https://schema.org/brand).
1471    * </pre>
1472    *
1473    * <code>repeated string brands = 9;</code>
1474    *
1475    * @return The count of brands.
1476    */
getBrandsCount()1477   public int getBrandsCount() {
1478     return brands_.size();
1479   }
1480   /**
1481    *
1482    *
1483    * <pre>
1484    * The brands of the product.
1485    * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
1486    * string with a length limit of 1,000 characters. Otherwise, an
1487    * INVALID_ARGUMENT error is returned.
1488    * Corresponding properties: Google Merchant Center property
1489    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
1490    * property [Product.brand](https://schema.org/brand).
1491    * </pre>
1492    *
1493    * <code>repeated string brands = 9;</code>
1494    *
1495    * @param index The index of the element to return.
1496    * @return The brands at the given index.
1497    */
getBrands(int index)1498   public java.lang.String getBrands(int index) {
1499     return brands_.get(index);
1500   }
1501   /**
1502    *
1503    *
1504    * <pre>
1505    * The brands of the product.
1506    * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
1507    * string with a length limit of 1,000 characters. Otherwise, an
1508    * INVALID_ARGUMENT error is returned.
1509    * Corresponding properties: Google Merchant Center property
1510    * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
1511    * property [Product.brand](https://schema.org/brand).
1512    * </pre>
1513    *
1514    * <code>repeated string brands = 9;</code>
1515    *
1516    * @param index The index of the value to return.
1517    * @return The bytes of the brands at the given index.
1518    */
getBrandsBytes(int index)1519   public com.google.protobuf.ByteString getBrandsBytes(int index) {
1520     return brands_.getByteString(index);
1521   }
1522 
1523   public static final int DESCRIPTION_FIELD_NUMBER = 10;
1524 
1525   @SuppressWarnings("serial")
1526   private volatile java.lang.Object description_ = "";
1527   /**
1528    *
1529    *
1530    * <pre>
1531    * Product description.
1532    * This field must be a UTF-8 encoded string with a length limit of 5,000
1533    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1534    * Corresponding properties: Google Merchant Center property
1535    * [description](https://support.google.com/merchants/answer/6324468).
1536    * Schema.org property [Product.description](https://schema.org/description).
1537    * </pre>
1538    *
1539    * <code>string description = 10;</code>
1540    *
1541    * @return The description.
1542    */
1543   @java.lang.Override
getDescription()1544   public java.lang.String getDescription() {
1545     java.lang.Object ref = description_;
1546     if (ref instanceof java.lang.String) {
1547       return (java.lang.String) ref;
1548     } else {
1549       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1550       java.lang.String s = bs.toStringUtf8();
1551       description_ = s;
1552       return s;
1553     }
1554   }
1555   /**
1556    *
1557    *
1558    * <pre>
1559    * Product description.
1560    * This field must be a UTF-8 encoded string with a length limit of 5,000
1561    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
1562    * Corresponding properties: Google Merchant Center property
1563    * [description](https://support.google.com/merchants/answer/6324468).
1564    * Schema.org property [Product.description](https://schema.org/description).
1565    * </pre>
1566    *
1567    * <code>string description = 10;</code>
1568    *
1569    * @return The bytes for description.
1570    */
1571   @java.lang.Override
getDescriptionBytes()1572   public com.google.protobuf.ByteString getDescriptionBytes() {
1573     java.lang.Object ref = description_;
1574     if (ref instanceof java.lang.String) {
1575       com.google.protobuf.ByteString b =
1576           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1577       description_ = b;
1578       return b;
1579     } else {
1580       return (com.google.protobuf.ByteString) ref;
1581     }
1582   }
1583 
1584   public static final int LANGUAGE_CODE_FIELD_NUMBER = 11;
1585 
1586   @SuppressWarnings("serial")
1587   private volatile java.lang.Object languageCode_ = "";
1588   /**
1589    *
1590    *
1591    * <pre>
1592    * Language of the title/description and other string attributes. Use language
1593    * tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
1594    * For product prediction, this field is ignored and the model automatically
1595    * detects the text language. The [Product][google.cloud.retail.v2.Product]
1596    * can include text in different languages, but duplicating
1597    * [Product][google.cloud.retail.v2.Product]s to provide text in multiple
1598    * languages can result in degraded model performance.
1599    * For product search this field is in use. It defaults to "en-US" if unset.
1600    * </pre>
1601    *
1602    * <code>string language_code = 11;</code>
1603    *
1604    * @return The languageCode.
1605    */
1606   @java.lang.Override
getLanguageCode()1607   public java.lang.String getLanguageCode() {
1608     java.lang.Object ref = languageCode_;
1609     if (ref instanceof java.lang.String) {
1610       return (java.lang.String) ref;
1611     } else {
1612       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1613       java.lang.String s = bs.toStringUtf8();
1614       languageCode_ = s;
1615       return s;
1616     }
1617   }
1618   /**
1619    *
1620    *
1621    * <pre>
1622    * Language of the title/description and other string attributes. Use language
1623    * tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
1624    * For product prediction, this field is ignored and the model automatically
1625    * detects the text language. The [Product][google.cloud.retail.v2.Product]
1626    * can include text in different languages, but duplicating
1627    * [Product][google.cloud.retail.v2.Product]s to provide text in multiple
1628    * languages can result in degraded model performance.
1629    * For product search this field is in use. It defaults to "en-US" if unset.
1630    * </pre>
1631    *
1632    * <code>string language_code = 11;</code>
1633    *
1634    * @return The bytes for languageCode.
1635    */
1636   @java.lang.Override
getLanguageCodeBytes()1637   public com.google.protobuf.ByteString getLanguageCodeBytes() {
1638     java.lang.Object ref = languageCode_;
1639     if (ref instanceof java.lang.String) {
1640       com.google.protobuf.ByteString b =
1641           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1642       languageCode_ = b;
1643       return b;
1644     } else {
1645       return (com.google.protobuf.ByteString) ref;
1646     }
1647   }
1648 
1649   public static final int ATTRIBUTES_FIELD_NUMBER = 12;
1650 
1651   private static final class AttributesDefaultEntryHolder {
1652     static final com.google.protobuf.MapEntry<
1653             java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
1654         defaultEntry =
1655             com.google.protobuf.MapEntry
1656                 .<java.lang.String, com.google.cloud.retail.v2.CustomAttribute>newDefaultInstance(
1657                     com.google.cloud.retail.v2.ProductProto
1658                         .internal_static_google_cloud_retail_v2_Product_AttributesEntry_descriptor,
1659                     com.google.protobuf.WireFormat.FieldType.STRING,
1660                     "",
1661                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
1662                     com.google.cloud.retail.v2.CustomAttribute.getDefaultInstance());
1663   }
1664 
1665   @SuppressWarnings("serial")
1666   private com.google.protobuf.MapField<java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
1667       attributes_;
1668 
1669   private com.google.protobuf.MapField<java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
internalGetAttributes()1670       internalGetAttributes() {
1671     if (attributes_ == null) {
1672       return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry);
1673     }
1674     return attributes_;
1675   }
1676 
getAttributesCount()1677   public int getAttributesCount() {
1678     return internalGetAttributes().getMap().size();
1679   }
1680   /**
1681    *
1682    *
1683    * <pre>
1684    * Highly encouraged. Extra product attributes to be included. For example,
1685    * for products, this could include the store name, vendor, style, color, etc.
1686    * These are very strong signals for recommendation model, thus we highly
1687    * recommend providing the attributes here.
1688    * Features that can take on one of a limited number of possible values. Two
1689    * types of features can be set are:
1690    * Textual features. some examples would be the brand/maker of a product, or
1691    * country of a customer. Numerical features. Some examples would be the
1692    * height/weight of a product, or age of a customer.
1693    * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
1694    * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
1695    * }`.
1696    * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
1697    * error is returned:
1698    * * Max entries count: 200.
1699    * * The key must be a UTF-8 encoded string with a length limit of 128
1700    *   characters.
1701    * * For indexable attribute, the key must match the pattern:
1702    *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
1703    *   `KEY_1_LIKE_THIS`.
1704    * * For text attributes, at most 400 values are allowed. Empty values are not
1705    *   allowed. Each value must be a non-empty UTF-8 encoded string with a
1706    *   length limit of 256 characters.
1707    * * For number attributes, at most 400 values are allowed.
1708    * </pre>
1709    *
1710    * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
1711    */
1712   @java.lang.Override
containsAttributes(java.lang.String key)1713   public boolean containsAttributes(java.lang.String key) {
1714     if (key == null) {
1715       throw new NullPointerException("map key");
1716     }
1717     return internalGetAttributes().getMap().containsKey(key);
1718   }
1719   /** Use {@link #getAttributesMap()} instead. */
1720   @java.lang.Override
1721   @java.lang.Deprecated
1722   public java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
getAttributes()1723       getAttributes() {
1724     return getAttributesMap();
1725   }
1726   /**
1727    *
1728    *
1729    * <pre>
1730    * Highly encouraged. Extra product attributes to be included. For example,
1731    * for products, this could include the store name, vendor, style, color, etc.
1732    * These are very strong signals for recommendation model, thus we highly
1733    * recommend providing the attributes here.
1734    * Features that can take on one of a limited number of possible values. Two
1735    * types of features can be set are:
1736    * Textual features. some examples would be the brand/maker of a product, or
1737    * country of a customer. Numerical features. Some examples would be the
1738    * height/weight of a product, or age of a customer.
1739    * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
1740    * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
1741    * }`.
1742    * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
1743    * error is returned:
1744    * * Max entries count: 200.
1745    * * The key must be a UTF-8 encoded string with a length limit of 128
1746    *   characters.
1747    * * For indexable attribute, the key must match the pattern:
1748    *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
1749    *   `KEY_1_LIKE_THIS`.
1750    * * For text attributes, at most 400 values are allowed. Empty values are not
1751    *   allowed. Each value must be a non-empty UTF-8 encoded string with a
1752    *   length limit of 256 characters.
1753    * * For number attributes, at most 400 values are allowed.
1754    * </pre>
1755    *
1756    * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
1757    */
1758   @java.lang.Override
1759   public java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
getAttributesMap()1760       getAttributesMap() {
1761     return internalGetAttributes().getMap();
1762   }
1763   /**
1764    *
1765    *
1766    * <pre>
1767    * Highly encouraged. Extra product attributes to be included. For example,
1768    * for products, this could include the store name, vendor, style, color, etc.
1769    * These are very strong signals for recommendation model, thus we highly
1770    * recommend providing the attributes here.
1771    * Features that can take on one of a limited number of possible values. Two
1772    * types of features can be set are:
1773    * Textual features. some examples would be the brand/maker of a product, or
1774    * country of a customer. Numerical features. Some examples would be the
1775    * height/weight of a product, or age of a customer.
1776    * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
1777    * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
1778    * }`.
1779    * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
1780    * error is returned:
1781    * * Max entries count: 200.
1782    * * The key must be a UTF-8 encoded string with a length limit of 128
1783    *   characters.
1784    * * For indexable attribute, the key must match the pattern:
1785    *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
1786    *   `KEY_1_LIKE_THIS`.
1787    * * For text attributes, at most 400 values are allowed. Empty values are not
1788    *   allowed. Each value must be a non-empty UTF-8 encoded string with a
1789    *   length limit of 256 characters.
1790    * * For number attributes, at most 400 values are allowed.
1791    * </pre>
1792    *
1793    * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
1794    */
1795   @java.lang.Override
getAttributesOrDefault( java.lang.String key, com.google.cloud.retail.v2.CustomAttribute defaultValue)1796   public /* nullable */ com.google.cloud.retail.v2.CustomAttribute getAttributesOrDefault(
1797       java.lang.String key,
1798       /* nullable */
1799       com.google.cloud.retail.v2.CustomAttribute defaultValue) {
1800     if (key == null) {
1801       throw new NullPointerException("map key");
1802     }
1803     java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute> map =
1804         internalGetAttributes().getMap();
1805     return map.containsKey(key) ? map.get(key) : defaultValue;
1806   }
1807   /**
1808    *
1809    *
1810    * <pre>
1811    * Highly encouraged. Extra product attributes to be included. For example,
1812    * for products, this could include the store name, vendor, style, color, etc.
1813    * These are very strong signals for recommendation model, thus we highly
1814    * recommend providing the attributes here.
1815    * Features that can take on one of a limited number of possible values. Two
1816    * types of features can be set are:
1817    * Textual features. some examples would be the brand/maker of a product, or
1818    * country of a customer. Numerical features. Some examples would be the
1819    * height/weight of a product, or age of a customer.
1820    * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
1821    * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
1822    * }`.
1823    * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
1824    * error is returned:
1825    * * Max entries count: 200.
1826    * * The key must be a UTF-8 encoded string with a length limit of 128
1827    *   characters.
1828    * * For indexable attribute, the key must match the pattern:
1829    *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
1830    *   `KEY_1_LIKE_THIS`.
1831    * * For text attributes, at most 400 values are allowed. Empty values are not
1832    *   allowed. Each value must be a non-empty UTF-8 encoded string with a
1833    *   length limit of 256 characters.
1834    * * For number attributes, at most 400 values are allowed.
1835    * </pre>
1836    *
1837    * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
1838    */
1839   @java.lang.Override
getAttributesOrThrow(java.lang.String key)1840   public com.google.cloud.retail.v2.CustomAttribute getAttributesOrThrow(java.lang.String key) {
1841     if (key == null) {
1842       throw new NullPointerException("map key");
1843     }
1844     java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute> map =
1845         internalGetAttributes().getMap();
1846     if (!map.containsKey(key)) {
1847       throw new java.lang.IllegalArgumentException();
1848     }
1849     return map.get(key);
1850   }
1851 
1852   public static final int TAGS_FIELD_NUMBER = 13;
1853 
1854   @SuppressWarnings("serial")
1855   private com.google.protobuf.LazyStringList tags_;
1856   /**
1857    *
1858    *
1859    * <pre>
1860    * Custom tags associated with the product.
1861    * At most 250 values are allowed per
1862    * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
1863    * encoded string with a length limit of 1,000 characters. Otherwise, an
1864    * INVALID_ARGUMENT error is returned.
1865    * This tag can be used for filtering recommendation results by passing the
1866    * tag as part of the
1867    * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
1868    * Corresponding properties: Google Merchant Center property
1869    * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
1870    * </pre>
1871    *
1872    * <code>repeated string tags = 13;</code>
1873    *
1874    * @return A list containing the tags.
1875    */
getTagsList()1876   public com.google.protobuf.ProtocolStringList getTagsList() {
1877     return tags_;
1878   }
1879   /**
1880    *
1881    *
1882    * <pre>
1883    * Custom tags associated with the product.
1884    * At most 250 values are allowed per
1885    * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
1886    * encoded string with a length limit of 1,000 characters. Otherwise, an
1887    * INVALID_ARGUMENT error is returned.
1888    * This tag can be used for filtering recommendation results by passing the
1889    * tag as part of the
1890    * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
1891    * Corresponding properties: Google Merchant Center property
1892    * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
1893    * </pre>
1894    *
1895    * <code>repeated string tags = 13;</code>
1896    *
1897    * @return The count of tags.
1898    */
getTagsCount()1899   public int getTagsCount() {
1900     return tags_.size();
1901   }
1902   /**
1903    *
1904    *
1905    * <pre>
1906    * Custom tags associated with the product.
1907    * At most 250 values are allowed per
1908    * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
1909    * encoded string with a length limit of 1,000 characters. Otherwise, an
1910    * INVALID_ARGUMENT error is returned.
1911    * This tag can be used for filtering recommendation results by passing the
1912    * tag as part of the
1913    * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
1914    * Corresponding properties: Google Merchant Center property
1915    * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
1916    * </pre>
1917    *
1918    * <code>repeated string tags = 13;</code>
1919    *
1920    * @param index The index of the element to return.
1921    * @return The tags at the given index.
1922    */
getTags(int index)1923   public java.lang.String getTags(int index) {
1924     return tags_.get(index);
1925   }
1926   /**
1927    *
1928    *
1929    * <pre>
1930    * Custom tags associated with the product.
1931    * At most 250 values are allowed per
1932    * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
1933    * encoded string with a length limit of 1,000 characters. Otherwise, an
1934    * INVALID_ARGUMENT error is returned.
1935    * This tag can be used for filtering recommendation results by passing the
1936    * tag as part of the
1937    * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
1938    * Corresponding properties: Google Merchant Center property
1939    * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
1940    * </pre>
1941    *
1942    * <code>repeated string tags = 13;</code>
1943    *
1944    * @param index The index of the value to return.
1945    * @return The bytes of the tags at the given index.
1946    */
getTagsBytes(int index)1947   public com.google.protobuf.ByteString getTagsBytes(int index) {
1948     return tags_.getByteString(index);
1949   }
1950 
1951   public static final int PRICE_INFO_FIELD_NUMBER = 14;
1952   private com.google.cloud.retail.v2.PriceInfo priceInfo_;
1953   /**
1954    *
1955    *
1956    * <pre>
1957    * Product price and cost information.
1958    * Corresponding properties: Google Merchant Center property
1959    * [price](https://support.google.com/merchants/answer/6324371).
1960    * </pre>
1961    *
1962    * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
1963    *
1964    * @return Whether the priceInfo field is set.
1965    */
1966   @java.lang.Override
hasPriceInfo()1967   public boolean hasPriceInfo() {
1968     return priceInfo_ != null;
1969   }
1970   /**
1971    *
1972    *
1973    * <pre>
1974    * Product price and cost information.
1975    * Corresponding properties: Google Merchant Center property
1976    * [price](https://support.google.com/merchants/answer/6324371).
1977    * </pre>
1978    *
1979    * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
1980    *
1981    * @return The priceInfo.
1982    */
1983   @java.lang.Override
getPriceInfo()1984   public com.google.cloud.retail.v2.PriceInfo getPriceInfo() {
1985     return priceInfo_ == null
1986         ? com.google.cloud.retail.v2.PriceInfo.getDefaultInstance()
1987         : priceInfo_;
1988   }
1989   /**
1990    *
1991    *
1992    * <pre>
1993    * Product price and cost information.
1994    * Corresponding properties: Google Merchant Center property
1995    * [price](https://support.google.com/merchants/answer/6324371).
1996    * </pre>
1997    *
1998    * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
1999    */
2000   @java.lang.Override
getPriceInfoOrBuilder()2001   public com.google.cloud.retail.v2.PriceInfoOrBuilder getPriceInfoOrBuilder() {
2002     return priceInfo_ == null
2003         ? com.google.cloud.retail.v2.PriceInfo.getDefaultInstance()
2004         : priceInfo_;
2005   }
2006 
2007   public static final int RATING_FIELD_NUMBER = 15;
2008   private com.google.cloud.retail.v2.Rating rating_;
2009   /**
2010    *
2011    *
2012    * <pre>
2013    * The rating of this product.
2014    * </pre>
2015    *
2016    * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
2017    *
2018    * @return Whether the rating field is set.
2019    */
2020   @java.lang.Override
hasRating()2021   public boolean hasRating() {
2022     return rating_ != null;
2023   }
2024   /**
2025    *
2026    *
2027    * <pre>
2028    * The rating of this product.
2029    * </pre>
2030    *
2031    * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
2032    *
2033    * @return The rating.
2034    */
2035   @java.lang.Override
getRating()2036   public com.google.cloud.retail.v2.Rating getRating() {
2037     return rating_ == null ? com.google.cloud.retail.v2.Rating.getDefaultInstance() : rating_;
2038   }
2039   /**
2040    *
2041    *
2042    * <pre>
2043    * The rating of this product.
2044    * </pre>
2045    *
2046    * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
2047    */
2048   @java.lang.Override
getRatingOrBuilder()2049   public com.google.cloud.retail.v2.RatingOrBuilder getRatingOrBuilder() {
2050     return rating_ == null ? com.google.cloud.retail.v2.Rating.getDefaultInstance() : rating_;
2051   }
2052 
2053   public static final int AVAILABLE_TIME_FIELD_NUMBER = 18;
2054   private com.google.protobuf.Timestamp availableTime_;
2055   /**
2056    *
2057    *
2058    * <pre>
2059    * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
2060    * available for
2061    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
2062    * that this is only applicable to
2063    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
2064    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
2065    * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
2066    * </pre>
2067    *
2068    * <code>.google.protobuf.Timestamp available_time = 18;</code>
2069    *
2070    * @return Whether the availableTime field is set.
2071    */
2072   @java.lang.Override
hasAvailableTime()2073   public boolean hasAvailableTime() {
2074     return availableTime_ != null;
2075   }
2076   /**
2077    *
2078    *
2079    * <pre>
2080    * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
2081    * available for
2082    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
2083    * that this is only applicable to
2084    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
2085    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
2086    * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
2087    * </pre>
2088    *
2089    * <code>.google.protobuf.Timestamp available_time = 18;</code>
2090    *
2091    * @return The availableTime.
2092    */
2093   @java.lang.Override
getAvailableTime()2094   public com.google.protobuf.Timestamp getAvailableTime() {
2095     return availableTime_ == null
2096         ? com.google.protobuf.Timestamp.getDefaultInstance()
2097         : availableTime_;
2098   }
2099   /**
2100    *
2101    *
2102    * <pre>
2103    * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
2104    * available for
2105    * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
2106    * that this is only applicable to
2107    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
2108    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
2109    * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
2110    * </pre>
2111    *
2112    * <code>.google.protobuf.Timestamp available_time = 18;</code>
2113    */
2114   @java.lang.Override
getAvailableTimeOrBuilder()2115   public com.google.protobuf.TimestampOrBuilder getAvailableTimeOrBuilder() {
2116     return availableTime_ == null
2117         ? com.google.protobuf.Timestamp.getDefaultInstance()
2118         : availableTime_;
2119   }
2120 
2121   public static final int AVAILABILITY_FIELD_NUMBER = 19;
2122   private int availability_ = 0;
2123   /**
2124    *
2125    *
2126    * <pre>
2127    * The online availability of the [Product][google.cloud.retail.v2.Product].
2128    * Default to
2129    * [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK].
2130    * Corresponding properties: Google Merchant Center property
2131    * [availability](https://support.google.com/merchants/answer/6324448).
2132    * Schema.org property [Offer.availability](https://schema.org/availability).
2133    * </pre>
2134    *
2135    * <code>.google.cloud.retail.v2.Product.Availability availability = 19;</code>
2136    *
2137    * @return The enum numeric value on the wire for availability.
2138    */
2139   @java.lang.Override
getAvailabilityValue()2140   public int getAvailabilityValue() {
2141     return availability_;
2142   }
2143   /**
2144    *
2145    *
2146    * <pre>
2147    * The online availability of the [Product][google.cloud.retail.v2.Product].
2148    * Default to
2149    * [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK].
2150    * Corresponding properties: Google Merchant Center property
2151    * [availability](https://support.google.com/merchants/answer/6324448).
2152    * Schema.org property [Offer.availability](https://schema.org/availability).
2153    * </pre>
2154    *
2155    * <code>.google.cloud.retail.v2.Product.Availability availability = 19;</code>
2156    *
2157    * @return The availability.
2158    */
2159   @java.lang.Override
getAvailability()2160   public com.google.cloud.retail.v2.Product.Availability getAvailability() {
2161     com.google.cloud.retail.v2.Product.Availability result =
2162         com.google.cloud.retail.v2.Product.Availability.forNumber(availability_);
2163     return result == null ? com.google.cloud.retail.v2.Product.Availability.UNRECOGNIZED : result;
2164   }
2165 
2166   public static final int AVAILABLE_QUANTITY_FIELD_NUMBER = 20;
2167   private com.google.protobuf.Int32Value availableQuantity_;
2168   /**
2169    *
2170    *
2171    * <pre>
2172    * The available quantity of the item.
2173    * </pre>
2174    *
2175    * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
2176    *
2177    * @return Whether the availableQuantity field is set.
2178    */
2179   @java.lang.Override
hasAvailableQuantity()2180   public boolean hasAvailableQuantity() {
2181     return availableQuantity_ != null;
2182   }
2183   /**
2184    *
2185    *
2186    * <pre>
2187    * The available quantity of the item.
2188    * </pre>
2189    *
2190    * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
2191    *
2192    * @return The availableQuantity.
2193    */
2194   @java.lang.Override
getAvailableQuantity()2195   public com.google.protobuf.Int32Value getAvailableQuantity() {
2196     return availableQuantity_ == null
2197         ? com.google.protobuf.Int32Value.getDefaultInstance()
2198         : availableQuantity_;
2199   }
2200   /**
2201    *
2202    *
2203    * <pre>
2204    * The available quantity of the item.
2205    * </pre>
2206    *
2207    * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
2208    */
2209   @java.lang.Override
getAvailableQuantityOrBuilder()2210   public com.google.protobuf.Int32ValueOrBuilder getAvailableQuantityOrBuilder() {
2211     return availableQuantity_ == null
2212         ? com.google.protobuf.Int32Value.getDefaultInstance()
2213         : availableQuantity_;
2214   }
2215 
2216   public static final int FULFILLMENT_INFO_FIELD_NUMBER = 21;
2217 
2218   @SuppressWarnings("serial")
2219   private java.util.List<com.google.cloud.retail.v2.FulfillmentInfo> fulfillmentInfo_;
2220   /**
2221    *
2222    *
2223    * <pre>
2224    * Fulfillment information, such as the store IDs for in-store pickup or
2225    * region IDs for different shipping methods.
2226    * All the elements must have distinct
2227    * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
2228    * Otherwise, an INVALID_ARGUMENT error is returned.
2229    * </pre>
2230    *
2231    * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
2232    */
2233   @java.lang.Override
getFulfillmentInfoList()2234   public java.util.List<com.google.cloud.retail.v2.FulfillmentInfo> getFulfillmentInfoList() {
2235     return fulfillmentInfo_;
2236   }
2237   /**
2238    *
2239    *
2240    * <pre>
2241    * Fulfillment information, such as the store IDs for in-store pickup or
2242    * region IDs for different shipping methods.
2243    * All the elements must have distinct
2244    * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
2245    * Otherwise, an INVALID_ARGUMENT error is returned.
2246    * </pre>
2247    *
2248    * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
2249    */
2250   @java.lang.Override
2251   public java.util.List<? extends com.google.cloud.retail.v2.FulfillmentInfoOrBuilder>
getFulfillmentInfoOrBuilderList()2252       getFulfillmentInfoOrBuilderList() {
2253     return fulfillmentInfo_;
2254   }
2255   /**
2256    *
2257    *
2258    * <pre>
2259    * Fulfillment information, such as the store IDs for in-store pickup or
2260    * region IDs for different shipping methods.
2261    * All the elements must have distinct
2262    * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
2263    * Otherwise, an INVALID_ARGUMENT error is returned.
2264    * </pre>
2265    *
2266    * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
2267    */
2268   @java.lang.Override
getFulfillmentInfoCount()2269   public int getFulfillmentInfoCount() {
2270     return fulfillmentInfo_.size();
2271   }
2272   /**
2273    *
2274    *
2275    * <pre>
2276    * Fulfillment information, such as the store IDs for in-store pickup or
2277    * region IDs for different shipping methods.
2278    * All the elements must have distinct
2279    * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
2280    * Otherwise, an INVALID_ARGUMENT error is returned.
2281    * </pre>
2282    *
2283    * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
2284    */
2285   @java.lang.Override
getFulfillmentInfo(int index)2286   public com.google.cloud.retail.v2.FulfillmentInfo getFulfillmentInfo(int index) {
2287     return fulfillmentInfo_.get(index);
2288   }
2289   /**
2290    *
2291    *
2292    * <pre>
2293    * Fulfillment information, such as the store IDs for in-store pickup or
2294    * region IDs for different shipping methods.
2295    * All the elements must have distinct
2296    * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
2297    * Otherwise, an INVALID_ARGUMENT error is returned.
2298    * </pre>
2299    *
2300    * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
2301    */
2302   @java.lang.Override
getFulfillmentInfoOrBuilder( int index)2303   public com.google.cloud.retail.v2.FulfillmentInfoOrBuilder getFulfillmentInfoOrBuilder(
2304       int index) {
2305     return fulfillmentInfo_.get(index);
2306   }
2307 
2308   public static final int URI_FIELD_NUMBER = 22;
2309 
2310   @SuppressWarnings("serial")
2311   private volatile java.lang.Object uri_ = "";
2312   /**
2313    *
2314    *
2315    * <pre>
2316    * Canonical URL directly linking to the product detail page.
2317    * It is strongly recommended to provide a valid uri for the product,
2318    * otherwise the service performance could be significantly degraded.
2319    * This field must be a UTF-8 encoded string with a length limit of 5,000
2320    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
2321    * Corresponding properties: Google Merchant Center property
2322    * [link](https://support.google.com/merchants/answer/6324416). Schema.org
2323    * property [Offer.url](https://schema.org/url).
2324    * </pre>
2325    *
2326    * <code>string uri = 22;</code>
2327    *
2328    * @return The uri.
2329    */
2330   @java.lang.Override
getUri()2331   public java.lang.String getUri() {
2332     java.lang.Object ref = uri_;
2333     if (ref instanceof java.lang.String) {
2334       return (java.lang.String) ref;
2335     } else {
2336       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2337       java.lang.String s = bs.toStringUtf8();
2338       uri_ = s;
2339       return s;
2340     }
2341   }
2342   /**
2343    *
2344    *
2345    * <pre>
2346    * Canonical URL directly linking to the product detail page.
2347    * It is strongly recommended to provide a valid uri for the product,
2348    * otherwise the service performance could be significantly degraded.
2349    * This field must be a UTF-8 encoded string with a length limit of 5,000
2350    * characters. Otherwise, an INVALID_ARGUMENT error is returned.
2351    * Corresponding properties: Google Merchant Center property
2352    * [link](https://support.google.com/merchants/answer/6324416). Schema.org
2353    * property [Offer.url](https://schema.org/url).
2354    * </pre>
2355    *
2356    * <code>string uri = 22;</code>
2357    *
2358    * @return The bytes for uri.
2359    */
2360   @java.lang.Override
getUriBytes()2361   public com.google.protobuf.ByteString getUriBytes() {
2362     java.lang.Object ref = uri_;
2363     if (ref instanceof java.lang.String) {
2364       com.google.protobuf.ByteString b =
2365           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2366       uri_ = b;
2367       return b;
2368     } else {
2369       return (com.google.protobuf.ByteString) ref;
2370     }
2371   }
2372 
2373   public static final int IMAGES_FIELD_NUMBER = 23;
2374 
2375   @SuppressWarnings("serial")
2376   private java.util.List<com.google.cloud.retail.v2.Image> images_;
2377   /**
2378    *
2379    *
2380    * <pre>
2381    * Product images for the product. We highly recommend putting the main
2382    * image first.
2383    * A maximum of 300 images are allowed.
2384    * Corresponding properties: Google Merchant Center property
2385    * [image_link](https://support.google.com/merchants/answer/6324350).
2386    * Schema.org property [Product.image](https://schema.org/image).
2387    * </pre>
2388    *
2389    * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
2390    */
2391   @java.lang.Override
getImagesList()2392   public java.util.List<com.google.cloud.retail.v2.Image> getImagesList() {
2393     return images_;
2394   }
2395   /**
2396    *
2397    *
2398    * <pre>
2399    * Product images for the product. We highly recommend putting the main
2400    * image first.
2401    * A maximum of 300 images are allowed.
2402    * Corresponding properties: Google Merchant Center property
2403    * [image_link](https://support.google.com/merchants/answer/6324350).
2404    * Schema.org property [Product.image](https://schema.org/image).
2405    * </pre>
2406    *
2407    * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
2408    */
2409   @java.lang.Override
2410   public java.util.List<? extends com.google.cloud.retail.v2.ImageOrBuilder>
getImagesOrBuilderList()2411       getImagesOrBuilderList() {
2412     return images_;
2413   }
2414   /**
2415    *
2416    *
2417    * <pre>
2418    * Product images for the product. We highly recommend putting the main
2419    * image first.
2420    * A maximum of 300 images are allowed.
2421    * Corresponding properties: Google Merchant Center property
2422    * [image_link](https://support.google.com/merchants/answer/6324350).
2423    * Schema.org property [Product.image](https://schema.org/image).
2424    * </pre>
2425    *
2426    * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
2427    */
2428   @java.lang.Override
getImagesCount()2429   public int getImagesCount() {
2430     return images_.size();
2431   }
2432   /**
2433    *
2434    *
2435    * <pre>
2436    * Product images for the product. We highly recommend putting the main
2437    * image first.
2438    * A maximum of 300 images are allowed.
2439    * Corresponding properties: Google Merchant Center property
2440    * [image_link](https://support.google.com/merchants/answer/6324350).
2441    * Schema.org property [Product.image](https://schema.org/image).
2442    * </pre>
2443    *
2444    * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
2445    */
2446   @java.lang.Override
getImages(int index)2447   public com.google.cloud.retail.v2.Image getImages(int index) {
2448     return images_.get(index);
2449   }
2450   /**
2451    *
2452    *
2453    * <pre>
2454    * Product images for the product. We highly recommend putting the main
2455    * image first.
2456    * A maximum of 300 images are allowed.
2457    * Corresponding properties: Google Merchant Center property
2458    * [image_link](https://support.google.com/merchants/answer/6324350).
2459    * Schema.org property [Product.image](https://schema.org/image).
2460    * </pre>
2461    *
2462    * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
2463    */
2464   @java.lang.Override
getImagesOrBuilder(int index)2465   public com.google.cloud.retail.v2.ImageOrBuilder getImagesOrBuilder(int index) {
2466     return images_.get(index);
2467   }
2468 
2469   public static final int AUDIENCE_FIELD_NUMBER = 24;
2470   private com.google.cloud.retail.v2.Audience audience_;
2471   /**
2472    *
2473    *
2474    * <pre>
2475    * The target group associated with a given audience (e.g. male, veterans,
2476    * car owners, musicians, etc.) of the product.
2477    * </pre>
2478    *
2479    * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
2480    *
2481    * @return Whether the audience field is set.
2482    */
2483   @java.lang.Override
hasAudience()2484   public boolean hasAudience() {
2485     return audience_ != null;
2486   }
2487   /**
2488    *
2489    *
2490    * <pre>
2491    * The target group associated with a given audience (e.g. male, veterans,
2492    * car owners, musicians, etc.) of the product.
2493    * </pre>
2494    *
2495    * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
2496    *
2497    * @return The audience.
2498    */
2499   @java.lang.Override
getAudience()2500   public com.google.cloud.retail.v2.Audience getAudience() {
2501     return audience_ == null ? com.google.cloud.retail.v2.Audience.getDefaultInstance() : audience_;
2502   }
2503   /**
2504    *
2505    *
2506    * <pre>
2507    * The target group associated with a given audience (e.g. male, veterans,
2508    * car owners, musicians, etc.) of the product.
2509    * </pre>
2510    *
2511    * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
2512    */
2513   @java.lang.Override
getAudienceOrBuilder()2514   public com.google.cloud.retail.v2.AudienceOrBuilder getAudienceOrBuilder() {
2515     return audience_ == null ? com.google.cloud.retail.v2.Audience.getDefaultInstance() : audience_;
2516   }
2517 
2518   public static final int COLOR_INFO_FIELD_NUMBER = 25;
2519   private com.google.cloud.retail.v2.ColorInfo colorInfo_;
2520   /**
2521    *
2522    *
2523    * <pre>
2524    * The color of the product.
2525    * Corresponding properties: Google Merchant Center property
2526    * [color](https://support.google.com/merchants/answer/6324487). Schema.org
2527    * property [Product.color](https://schema.org/color).
2528    * </pre>
2529    *
2530    * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
2531    *
2532    * @return Whether the colorInfo field is set.
2533    */
2534   @java.lang.Override
hasColorInfo()2535   public boolean hasColorInfo() {
2536     return colorInfo_ != null;
2537   }
2538   /**
2539    *
2540    *
2541    * <pre>
2542    * The color of the product.
2543    * Corresponding properties: Google Merchant Center property
2544    * [color](https://support.google.com/merchants/answer/6324487). Schema.org
2545    * property [Product.color](https://schema.org/color).
2546    * </pre>
2547    *
2548    * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
2549    *
2550    * @return The colorInfo.
2551    */
2552   @java.lang.Override
getColorInfo()2553   public com.google.cloud.retail.v2.ColorInfo getColorInfo() {
2554     return colorInfo_ == null
2555         ? com.google.cloud.retail.v2.ColorInfo.getDefaultInstance()
2556         : colorInfo_;
2557   }
2558   /**
2559    *
2560    *
2561    * <pre>
2562    * The color of the product.
2563    * Corresponding properties: Google Merchant Center property
2564    * [color](https://support.google.com/merchants/answer/6324487). Schema.org
2565    * property [Product.color](https://schema.org/color).
2566    * </pre>
2567    *
2568    * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
2569    */
2570   @java.lang.Override
getColorInfoOrBuilder()2571   public com.google.cloud.retail.v2.ColorInfoOrBuilder getColorInfoOrBuilder() {
2572     return colorInfo_ == null
2573         ? com.google.cloud.retail.v2.ColorInfo.getDefaultInstance()
2574         : colorInfo_;
2575   }
2576 
2577   public static final int SIZES_FIELD_NUMBER = 26;
2578 
2579   @SuppressWarnings("serial")
2580   private com.google.protobuf.LazyStringList sizes_;
2581   /**
2582    *
2583    *
2584    * <pre>
2585    * The size of the product. To represent different size systems or size types,
2586    * consider using this format: [[[size_system:]size_type:]size_value].
2587    * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
2588    * size type; "M" represents size value. In "GIRLS:27", size system is empty;
2589    * "GIRLS" represents size type; "27" represents size value. In "32 inches",
2590    * both size system and size type are empty, while size value is "32 inches".
2591    * A maximum of 20 values are allowed per
2592    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2593    * encoded string with a length limit of 128 characters. Otherwise, an
2594    * INVALID_ARGUMENT error is returned.
2595    * Corresponding properties: Google Merchant Center property
2596    * [size](https://support.google.com/merchants/answer/6324492),
2597    * [size_type](https://support.google.com/merchants/answer/6324497), and
2598    * [size_system](https://support.google.com/merchants/answer/6324502).
2599    * Schema.org property [Product.size](https://schema.org/size).
2600    * </pre>
2601    *
2602    * <code>repeated string sizes = 26;</code>
2603    *
2604    * @return A list containing the sizes.
2605    */
getSizesList()2606   public com.google.protobuf.ProtocolStringList getSizesList() {
2607     return sizes_;
2608   }
2609   /**
2610    *
2611    *
2612    * <pre>
2613    * The size of the product. To represent different size systems or size types,
2614    * consider using this format: [[[size_system:]size_type:]size_value].
2615    * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
2616    * size type; "M" represents size value. In "GIRLS:27", size system is empty;
2617    * "GIRLS" represents size type; "27" represents size value. In "32 inches",
2618    * both size system and size type are empty, while size value is "32 inches".
2619    * A maximum of 20 values are allowed per
2620    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2621    * encoded string with a length limit of 128 characters. Otherwise, an
2622    * INVALID_ARGUMENT error is returned.
2623    * Corresponding properties: Google Merchant Center property
2624    * [size](https://support.google.com/merchants/answer/6324492),
2625    * [size_type](https://support.google.com/merchants/answer/6324497), and
2626    * [size_system](https://support.google.com/merchants/answer/6324502).
2627    * Schema.org property [Product.size](https://schema.org/size).
2628    * </pre>
2629    *
2630    * <code>repeated string sizes = 26;</code>
2631    *
2632    * @return The count of sizes.
2633    */
getSizesCount()2634   public int getSizesCount() {
2635     return sizes_.size();
2636   }
2637   /**
2638    *
2639    *
2640    * <pre>
2641    * The size of the product. To represent different size systems or size types,
2642    * consider using this format: [[[size_system:]size_type:]size_value].
2643    * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
2644    * size type; "M" represents size value. In "GIRLS:27", size system is empty;
2645    * "GIRLS" represents size type; "27" represents size value. In "32 inches",
2646    * both size system and size type are empty, while size value is "32 inches".
2647    * A maximum of 20 values are allowed per
2648    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2649    * encoded string with a length limit of 128 characters. Otherwise, an
2650    * INVALID_ARGUMENT error is returned.
2651    * Corresponding properties: Google Merchant Center property
2652    * [size](https://support.google.com/merchants/answer/6324492),
2653    * [size_type](https://support.google.com/merchants/answer/6324497), and
2654    * [size_system](https://support.google.com/merchants/answer/6324502).
2655    * Schema.org property [Product.size](https://schema.org/size).
2656    * </pre>
2657    *
2658    * <code>repeated string sizes = 26;</code>
2659    *
2660    * @param index The index of the element to return.
2661    * @return The sizes at the given index.
2662    */
getSizes(int index)2663   public java.lang.String getSizes(int index) {
2664     return sizes_.get(index);
2665   }
2666   /**
2667    *
2668    *
2669    * <pre>
2670    * The size of the product. To represent different size systems or size types,
2671    * consider using this format: [[[size_system:]size_type:]size_value].
2672    * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
2673    * size type; "M" represents size value. In "GIRLS:27", size system is empty;
2674    * "GIRLS" represents size type; "27" represents size value. In "32 inches",
2675    * both size system and size type are empty, while size value is "32 inches".
2676    * A maximum of 20 values are allowed per
2677    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2678    * encoded string with a length limit of 128 characters. Otherwise, an
2679    * INVALID_ARGUMENT error is returned.
2680    * Corresponding properties: Google Merchant Center property
2681    * [size](https://support.google.com/merchants/answer/6324492),
2682    * [size_type](https://support.google.com/merchants/answer/6324497), and
2683    * [size_system](https://support.google.com/merchants/answer/6324502).
2684    * Schema.org property [Product.size](https://schema.org/size).
2685    * </pre>
2686    *
2687    * <code>repeated string sizes = 26;</code>
2688    *
2689    * @param index The index of the value to return.
2690    * @return The bytes of the sizes at the given index.
2691    */
getSizesBytes(int index)2692   public com.google.protobuf.ByteString getSizesBytes(int index) {
2693     return sizes_.getByteString(index);
2694   }
2695 
2696   public static final int MATERIALS_FIELD_NUMBER = 27;
2697 
2698   @SuppressWarnings("serial")
2699   private com.google.protobuf.LazyStringList materials_;
2700   /**
2701    *
2702    *
2703    * <pre>
2704    * The material of the product. For example, "leather", "wooden".
2705    * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
2706    * string with a length limit of 200 characters. Otherwise, an
2707    * INVALID_ARGUMENT error is returned.
2708    * Corresponding properties: Google Merchant Center property
2709    * [material](https://support.google.com/merchants/answer/6324410). Schema.org
2710    * property [Product.material](https://schema.org/material).
2711    * </pre>
2712    *
2713    * <code>repeated string materials = 27;</code>
2714    *
2715    * @return A list containing the materials.
2716    */
getMaterialsList()2717   public com.google.protobuf.ProtocolStringList getMaterialsList() {
2718     return materials_;
2719   }
2720   /**
2721    *
2722    *
2723    * <pre>
2724    * The material of the product. For example, "leather", "wooden".
2725    * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
2726    * string with a length limit of 200 characters. Otherwise, an
2727    * INVALID_ARGUMENT error is returned.
2728    * Corresponding properties: Google Merchant Center property
2729    * [material](https://support.google.com/merchants/answer/6324410). Schema.org
2730    * property [Product.material](https://schema.org/material).
2731    * </pre>
2732    *
2733    * <code>repeated string materials = 27;</code>
2734    *
2735    * @return The count of materials.
2736    */
getMaterialsCount()2737   public int getMaterialsCount() {
2738     return materials_.size();
2739   }
2740   /**
2741    *
2742    *
2743    * <pre>
2744    * The material of the product. For example, "leather", "wooden".
2745    * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
2746    * string with a length limit of 200 characters. Otherwise, an
2747    * INVALID_ARGUMENT error is returned.
2748    * Corresponding properties: Google Merchant Center property
2749    * [material](https://support.google.com/merchants/answer/6324410). Schema.org
2750    * property [Product.material](https://schema.org/material).
2751    * </pre>
2752    *
2753    * <code>repeated string materials = 27;</code>
2754    *
2755    * @param index The index of the element to return.
2756    * @return The materials at the given index.
2757    */
getMaterials(int index)2758   public java.lang.String getMaterials(int index) {
2759     return materials_.get(index);
2760   }
2761   /**
2762    *
2763    *
2764    * <pre>
2765    * The material of the product. For example, "leather", "wooden".
2766    * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
2767    * string with a length limit of 200 characters. Otherwise, an
2768    * INVALID_ARGUMENT error is returned.
2769    * Corresponding properties: Google Merchant Center property
2770    * [material](https://support.google.com/merchants/answer/6324410). Schema.org
2771    * property [Product.material](https://schema.org/material).
2772    * </pre>
2773    *
2774    * <code>repeated string materials = 27;</code>
2775    *
2776    * @param index The index of the value to return.
2777    * @return The bytes of the materials at the given index.
2778    */
getMaterialsBytes(int index)2779   public com.google.protobuf.ByteString getMaterialsBytes(int index) {
2780     return materials_.getByteString(index);
2781   }
2782 
2783   public static final int PATTERNS_FIELD_NUMBER = 28;
2784 
2785   @SuppressWarnings("serial")
2786   private com.google.protobuf.LazyStringList patterns_;
2787   /**
2788    *
2789    *
2790    * <pre>
2791    * The pattern or graphic print of the product. For example, "striped", "polka
2792    * dot", "paisley".
2793    * A maximum of 20 values are allowed per
2794    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2795    * encoded string with a length limit of 128 characters. Otherwise, an
2796    * INVALID_ARGUMENT error is returned.
2797    * Corresponding properties: Google Merchant Center property
2798    * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
2799    * property [Product.pattern](https://schema.org/pattern).
2800    * </pre>
2801    *
2802    * <code>repeated string patterns = 28;</code>
2803    *
2804    * @return A list containing the patterns.
2805    */
getPatternsList()2806   public com.google.protobuf.ProtocolStringList getPatternsList() {
2807     return patterns_;
2808   }
2809   /**
2810    *
2811    *
2812    * <pre>
2813    * The pattern or graphic print of the product. For example, "striped", "polka
2814    * dot", "paisley".
2815    * A maximum of 20 values are allowed per
2816    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2817    * encoded string with a length limit of 128 characters. Otherwise, an
2818    * INVALID_ARGUMENT error is returned.
2819    * Corresponding properties: Google Merchant Center property
2820    * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
2821    * property [Product.pattern](https://schema.org/pattern).
2822    * </pre>
2823    *
2824    * <code>repeated string patterns = 28;</code>
2825    *
2826    * @return The count of patterns.
2827    */
getPatternsCount()2828   public int getPatternsCount() {
2829     return patterns_.size();
2830   }
2831   /**
2832    *
2833    *
2834    * <pre>
2835    * The pattern or graphic print of the product. For example, "striped", "polka
2836    * dot", "paisley".
2837    * A maximum of 20 values are allowed per
2838    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2839    * encoded string with a length limit of 128 characters. Otherwise, an
2840    * INVALID_ARGUMENT error is returned.
2841    * Corresponding properties: Google Merchant Center property
2842    * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
2843    * property [Product.pattern](https://schema.org/pattern).
2844    * </pre>
2845    *
2846    * <code>repeated string patterns = 28;</code>
2847    *
2848    * @param index The index of the element to return.
2849    * @return The patterns at the given index.
2850    */
getPatterns(int index)2851   public java.lang.String getPatterns(int index) {
2852     return patterns_.get(index);
2853   }
2854   /**
2855    *
2856    *
2857    * <pre>
2858    * The pattern or graphic print of the product. For example, "striped", "polka
2859    * dot", "paisley".
2860    * A maximum of 20 values are allowed per
2861    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2862    * encoded string with a length limit of 128 characters. Otherwise, an
2863    * INVALID_ARGUMENT error is returned.
2864    * Corresponding properties: Google Merchant Center property
2865    * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
2866    * property [Product.pattern](https://schema.org/pattern).
2867    * </pre>
2868    *
2869    * <code>repeated string patterns = 28;</code>
2870    *
2871    * @param index The index of the value to return.
2872    * @return The bytes of the patterns at the given index.
2873    */
getPatternsBytes(int index)2874   public com.google.protobuf.ByteString getPatternsBytes(int index) {
2875     return patterns_.getByteString(index);
2876   }
2877 
2878   public static final int CONDITIONS_FIELD_NUMBER = 29;
2879 
2880   @SuppressWarnings("serial")
2881   private com.google.protobuf.LazyStringList conditions_;
2882   /**
2883    *
2884    *
2885    * <pre>
2886    * The condition of the product. Strongly encouraged to use the standard
2887    * values: "new", "refurbished", "used".
2888    * A maximum of 1 value is allowed per
2889    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2890    * encoded string with a length limit of 128 characters. Otherwise, an
2891    * INVALID_ARGUMENT error is returned.
2892    * Corresponding properties: Google Merchant Center property
2893    * [condition](https://support.google.com/merchants/answer/6324469).
2894    * Schema.org property
2895    * [Offer.itemCondition](https://schema.org/itemCondition).
2896    * </pre>
2897    *
2898    * <code>repeated string conditions = 29;</code>
2899    *
2900    * @return A list containing the conditions.
2901    */
getConditionsList()2902   public com.google.protobuf.ProtocolStringList getConditionsList() {
2903     return conditions_;
2904   }
2905   /**
2906    *
2907    *
2908    * <pre>
2909    * The condition of the product. Strongly encouraged to use the standard
2910    * values: "new", "refurbished", "used".
2911    * A maximum of 1 value is allowed per
2912    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2913    * encoded string with a length limit of 128 characters. Otherwise, an
2914    * INVALID_ARGUMENT error is returned.
2915    * Corresponding properties: Google Merchant Center property
2916    * [condition](https://support.google.com/merchants/answer/6324469).
2917    * Schema.org property
2918    * [Offer.itemCondition](https://schema.org/itemCondition).
2919    * </pre>
2920    *
2921    * <code>repeated string conditions = 29;</code>
2922    *
2923    * @return The count of conditions.
2924    */
getConditionsCount()2925   public int getConditionsCount() {
2926     return conditions_.size();
2927   }
2928   /**
2929    *
2930    *
2931    * <pre>
2932    * The condition of the product. Strongly encouraged to use the standard
2933    * values: "new", "refurbished", "used".
2934    * A maximum of 1 value is allowed per
2935    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2936    * encoded string with a length limit of 128 characters. Otherwise, an
2937    * INVALID_ARGUMENT error is returned.
2938    * Corresponding properties: Google Merchant Center property
2939    * [condition](https://support.google.com/merchants/answer/6324469).
2940    * Schema.org property
2941    * [Offer.itemCondition](https://schema.org/itemCondition).
2942    * </pre>
2943    *
2944    * <code>repeated string conditions = 29;</code>
2945    *
2946    * @param index The index of the element to return.
2947    * @return The conditions at the given index.
2948    */
getConditions(int index)2949   public java.lang.String getConditions(int index) {
2950     return conditions_.get(index);
2951   }
2952   /**
2953    *
2954    *
2955    * <pre>
2956    * The condition of the product. Strongly encouraged to use the standard
2957    * values: "new", "refurbished", "used".
2958    * A maximum of 1 value is allowed per
2959    * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
2960    * encoded string with a length limit of 128 characters. Otherwise, an
2961    * INVALID_ARGUMENT error is returned.
2962    * Corresponding properties: Google Merchant Center property
2963    * [condition](https://support.google.com/merchants/answer/6324469).
2964    * Schema.org property
2965    * [Offer.itemCondition](https://schema.org/itemCondition).
2966    * </pre>
2967    *
2968    * <code>repeated string conditions = 29;</code>
2969    *
2970    * @param index The index of the value to return.
2971    * @return The bytes of the conditions at the given index.
2972    */
getConditionsBytes(int index)2973   public com.google.protobuf.ByteString getConditionsBytes(int index) {
2974     return conditions_.getByteString(index);
2975   }
2976 
2977   public static final int PROMOTIONS_FIELD_NUMBER = 34;
2978 
2979   @SuppressWarnings("serial")
2980   private java.util.List<com.google.cloud.retail.v2.Promotion> promotions_;
2981   /**
2982    *
2983    *
2984    * <pre>
2985    * The promotions applied to the product. A maximum of 10 values are allowed
2986    * per [Product][google.cloud.retail.v2.Product]. Only
2987    * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
2988    * will be used, other fields will be ignored if set.
2989    * </pre>
2990    *
2991    * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
2992    */
2993   @java.lang.Override
getPromotionsList()2994   public java.util.List<com.google.cloud.retail.v2.Promotion> getPromotionsList() {
2995     return promotions_;
2996   }
2997   /**
2998    *
2999    *
3000    * <pre>
3001    * The promotions applied to the product. A maximum of 10 values are allowed
3002    * per [Product][google.cloud.retail.v2.Product]. Only
3003    * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
3004    * will be used, other fields will be ignored if set.
3005    * </pre>
3006    *
3007    * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
3008    */
3009   @java.lang.Override
3010   public java.util.List<? extends com.google.cloud.retail.v2.PromotionOrBuilder>
getPromotionsOrBuilderList()3011       getPromotionsOrBuilderList() {
3012     return promotions_;
3013   }
3014   /**
3015    *
3016    *
3017    * <pre>
3018    * The promotions applied to the product. A maximum of 10 values are allowed
3019    * per [Product][google.cloud.retail.v2.Product]. Only
3020    * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
3021    * will be used, other fields will be ignored if set.
3022    * </pre>
3023    *
3024    * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
3025    */
3026   @java.lang.Override
getPromotionsCount()3027   public int getPromotionsCount() {
3028     return promotions_.size();
3029   }
3030   /**
3031    *
3032    *
3033    * <pre>
3034    * The promotions applied to the product. A maximum of 10 values are allowed
3035    * per [Product][google.cloud.retail.v2.Product]. Only
3036    * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
3037    * will be used, other fields will be ignored if set.
3038    * </pre>
3039    *
3040    * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
3041    */
3042   @java.lang.Override
getPromotions(int index)3043   public com.google.cloud.retail.v2.Promotion getPromotions(int index) {
3044     return promotions_.get(index);
3045   }
3046   /**
3047    *
3048    *
3049    * <pre>
3050    * The promotions applied to the product. A maximum of 10 values are allowed
3051    * per [Product][google.cloud.retail.v2.Product]. Only
3052    * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
3053    * will be used, other fields will be ignored if set.
3054    * </pre>
3055    *
3056    * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
3057    */
3058   @java.lang.Override
getPromotionsOrBuilder(int index)3059   public com.google.cloud.retail.v2.PromotionOrBuilder getPromotionsOrBuilder(int index) {
3060     return promotions_.get(index);
3061   }
3062 
3063   public static final int PUBLISH_TIME_FIELD_NUMBER = 33;
3064   private com.google.protobuf.Timestamp publishTime_;
3065   /**
3066    *
3067    *
3068    * <pre>
3069    * The timestamp when the product is published by the retailer for the first
3070    * time, which indicates the freshness of the products. Note that this field
3071    * is different from
3072    * [available_time][google.cloud.retail.v2.Product.available_time], given it
3073    * purely describes product freshness regardless of when it is available on
3074    * search and recommendation.
3075    * </pre>
3076    *
3077    * <code>.google.protobuf.Timestamp publish_time = 33;</code>
3078    *
3079    * @return Whether the publishTime field is set.
3080    */
3081   @java.lang.Override
hasPublishTime()3082   public boolean hasPublishTime() {
3083     return publishTime_ != null;
3084   }
3085   /**
3086    *
3087    *
3088    * <pre>
3089    * The timestamp when the product is published by the retailer for the first
3090    * time, which indicates the freshness of the products. Note that this field
3091    * is different from
3092    * [available_time][google.cloud.retail.v2.Product.available_time], given it
3093    * purely describes product freshness regardless of when it is available on
3094    * search and recommendation.
3095    * </pre>
3096    *
3097    * <code>.google.protobuf.Timestamp publish_time = 33;</code>
3098    *
3099    * @return The publishTime.
3100    */
3101   @java.lang.Override
getPublishTime()3102   public com.google.protobuf.Timestamp getPublishTime() {
3103     return publishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : publishTime_;
3104   }
3105   /**
3106    *
3107    *
3108    * <pre>
3109    * The timestamp when the product is published by the retailer for the first
3110    * time, which indicates the freshness of the products. Note that this field
3111    * is different from
3112    * [available_time][google.cloud.retail.v2.Product.available_time], given it
3113    * purely describes product freshness regardless of when it is available on
3114    * search and recommendation.
3115    * </pre>
3116    *
3117    * <code>.google.protobuf.Timestamp publish_time = 33;</code>
3118    */
3119   @java.lang.Override
getPublishTimeOrBuilder()3120   public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() {
3121     return publishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : publishTime_;
3122   }
3123 
3124   public static final int RETRIEVABLE_FIELDS_FIELD_NUMBER = 30;
3125   private com.google.protobuf.FieldMask retrievableFields_;
3126   /**
3127    *
3128    *
3129    * <pre>
3130    * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
3131    * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
3132    * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
3133    * * [audience][google.cloud.retail.v2.Product.audience]
3134    * * [availability][google.cloud.retail.v2.Product.availability]
3135    * * [brands][google.cloud.retail.v2.Product.brands]
3136    * * [color_info][google.cloud.retail.v2.Product.color_info]
3137    * * [conditions][google.cloud.retail.v2.Product.conditions]
3138    * * [gtin][google.cloud.retail.v2.Product.gtin]
3139    * * [materials][google.cloud.retail.v2.Product.materials]
3140    * * [name][google.cloud.retail.v2.Product.name]
3141    * * [patterns][google.cloud.retail.v2.Product.patterns]
3142    * * [price_info][google.cloud.retail.v2.Product.price_info]
3143    * * [rating][google.cloud.retail.v2.Product.rating]
3144    * * [sizes][google.cloud.retail.v2.Product.sizes]
3145    * * [title][google.cloud.retail.v2.Product.title]
3146    * * [uri][google.cloud.retail.v2.Product.uri]
3147    * Supported fields only for
3148    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
3149    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
3150    * * [categories][google.cloud.retail.v2.Product.categories]
3151    * * [description][google.cloud.retail.v2.Product.description]
3152    * * [images][google.cloud.retail.v2.Product.images]
3153    * Supported fields only for
3154    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
3155    * * Only the first image in [images][google.cloud.retail.v2.Product.images]
3156    * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
3157    * retrievable, include paths of the form "attributes.key" where "key" is the
3158    * key of a custom attribute, as specified in
3159    * [attributes][google.cloud.retail.v2.Product.attributes].
3160    * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
3161    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
3162    * following fields are always returned in
3163    * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
3164    * * [name][google.cloud.retail.v2.Product.name]
3165    * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
3166    * following fields are always returned in by default:
3167    * * [name][google.cloud.retail.v2.Product.name]
3168    * * [color_info][google.cloud.retail.v2.Product.color_info]
3169    * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
3170    * returned.
3171    * Note: Returning more fields in
3172    * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
3173    * response payload size and serving latency.
3174    * This field is deprecated. Use the retrievable site-wide control instead.
3175    * </pre>
3176    *
3177    * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
3178    *
3179    * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
3180    *     google/cloud/retail/v2/product.proto;l=562
3181    * @return Whether the retrievableFields field is set.
3182    */
3183   @java.lang.Override
3184   @java.lang.Deprecated
hasRetrievableFields()3185   public boolean hasRetrievableFields() {
3186     return retrievableFields_ != null;
3187   }
3188   /**
3189    *
3190    *
3191    * <pre>
3192    * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
3193    * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
3194    * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
3195    * * [audience][google.cloud.retail.v2.Product.audience]
3196    * * [availability][google.cloud.retail.v2.Product.availability]
3197    * * [brands][google.cloud.retail.v2.Product.brands]
3198    * * [color_info][google.cloud.retail.v2.Product.color_info]
3199    * * [conditions][google.cloud.retail.v2.Product.conditions]
3200    * * [gtin][google.cloud.retail.v2.Product.gtin]
3201    * * [materials][google.cloud.retail.v2.Product.materials]
3202    * * [name][google.cloud.retail.v2.Product.name]
3203    * * [patterns][google.cloud.retail.v2.Product.patterns]
3204    * * [price_info][google.cloud.retail.v2.Product.price_info]
3205    * * [rating][google.cloud.retail.v2.Product.rating]
3206    * * [sizes][google.cloud.retail.v2.Product.sizes]
3207    * * [title][google.cloud.retail.v2.Product.title]
3208    * * [uri][google.cloud.retail.v2.Product.uri]
3209    * Supported fields only for
3210    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
3211    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
3212    * * [categories][google.cloud.retail.v2.Product.categories]
3213    * * [description][google.cloud.retail.v2.Product.description]
3214    * * [images][google.cloud.retail.v2.Product.images]
3215    * Supported fields only for
3216    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
3217    * * Only the first image in [images][google.cloud.retail.v2.Product.images]
3218    * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
3219    * retrievable, include paths of the form "attributes.key" where "key" is the
3220    * key of a custom attribute, as specified in
3221    * [attributes][google.cloud.retail.v2.Product.attributes].
3222    * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
3223    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
3224    * following fields are always returned in
3225    * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
3226    * * [name][google.cloud.retail.v2.Product.name]
3227    * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
3228    * following fields are always returned in by default:
3229    * * [name][google.cloud.retail.v2.Product.name]
3230    * * [color_info][google.cloud.retail.v2.Product.color_info]
3231    * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
3232    * returned.
3233    * Note: Returning more fields in
3234    * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
3235    * response payload size and serving latency.
3236    * This field is deprecated. Use the retrievable site-wide control instead.
3237    * </pre>
3238    *
3239    * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
3240    *
3241    * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
3242    *     google/cloud/retail/v2/product.proto;l=562
3243    * @return The retrievableFields.
3244    */
3245   @java.lang.Override
3246   @java.lang.Deprecated
getRetrievableFields()3247   public com.google.protobuf.FieldMask getRetrievableFields() {
3248     return retrievableFields_ == null
3249         ? com.google.protobuf.FieldMask.getDefaultInstance()
3250         : retrievableFields_;
3251   }
3252   /**
3253    *
3254    *
3255    * <pre>
3256    * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
3257    * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
3258    * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
3259    * * [audience][google.cloud.retail.v2.Product.audience]
3260    * * [availability][google.cloud.retail.v2.Product.availability]
3261    * * [brands][google.cloud.retail.v2.Product.brands]
3262    * * [color_info][google.cloud.retail.v2.Product.color_info]
3263    * * [conditions][google.cloud.retail.v2.Product.conditions]
3264    * * [gtin][google.cloud.retail.v2.Product.gtin]
3265    * * [materials][google.cloud.retail.v2.Product.materials]
3266    * * [name][google.cloud.retail.v2.Product.name]
3267    * * [patterns][google.cloud.retail.v2.Product.patterns]
3268    * * [price_info][google.cloud.retail.v2.Product.price_info]
3269    * * [rating][google.cloud.retail.v2.Product.rating]
3270    * * [sizes][google.cloud.retail.v2.Product.sizes]
3271    * * [title][google.cloud.retail.v2.Product.title]
3272    * * [uri][google.cloud.retail.v2.Product.uri]
3273    * Supported fields only for
3274    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
3275    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
3276    * * [categories][google.cloud.retail.v2.Product.categories]
3277    * * [description][google.cloud.retail.v2.Product.description]
3278    * * [images][google.cloud.retail.v2.Product.images]
3279    * Supported fields only for
3280    * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
3281    * * Only the first image in [images][google.cloud.retail.v2.Product.images]
3282    * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
3283    * retrievable, include paths of the form "attributes.key" where "key" is the
3284    * key of a custom attribute, as specified in
3285    * [attributes][google.cloud.retail.v2.Product.attributes].
3286    * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
3287    * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
3288    * following fields are always returned in
3289    * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
3290    * * [name][google.cloud.retail.v2.Product.name]
3291    * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
3292    * following fields are always returned in by default:
3293    * * [name][google.cloud.retail.v2.Product.name]
3294    * * [color_info][google.cloud.retail.v2.Product.color_info]
3295    * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
3296    * returned.
3297    * Note: Returning more fields in
3298    * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
3299    * response payload size and serving latency.
3300    * This field is deprecated. Use the retrievable site-wide control instead.
3301    * </pre>
3302    *
3303    * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
3304    */
3305   @java.lang.Override
3306   @java.lang.Deprecated
getRetrievableFieldsOrBuilder()3307   public com.google.protobuf.FieldMaskOrBuilder getRetrievableFieldsOrBuilder() {
3308     return retrievableFields_ == null
3309         ? com.google.protobuf.FieldMask.getDefaultInstance()
3310         : retrievableFields_;
3311   }
3312 
3313   public static final int VARIANTS_FIELD_NUMBER = 31;
3314 
3315   @SuppressWarnings("serial")
3316   private java.util.List<com.google.cloud.retail.v2.Product> variants_;
3317   /**
3318    *
3319    *
3320    * <pre>
3321    * Output only. Product variants grouped together on primary product which
3322    * share similar product attributes. It's automatically grouped by
3323    * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
3324    * all the product variants. Only populated for
3325    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
3326    * [Product][google.cloud.retail.v2.Product]s.
3327    * Note: This field is OUTPUT_ONLY for
3328    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
3329    * Do not set this field in API requests.
3330    * </pre>
3331    *
3332    * <code>
3333    * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
3334    * </code>
3335    */
3336   @java.lang.Override
getVariantsList()3337   public java.util.List<com.google.cloud.retail.v2.Product> getVariantsList() {
3338     return variants_;
3339   }
3340   /**
3341    *
3342    *
3343    * <pre>
3344    * Output only. Product variants grouped together on primary product which
3345    * share similar product attributes. It's automatically grouped by
3346    * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
3347    * all the product variants. Only populated for
3348    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
3349    * [Product][google.cloud.retail.v2.Product]s.
3350    * Note: This field is OUTPUT_ONLY for
3351    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
3352    * Do not set this field in API requests.
3353    * </pre>
3354    *
3355    * <code>
3356    * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
3357    * </code>
3358    */
3359   @java.lang.Override
3360   public java.util.List<? extends com.google.cloud.retail.v2.ProductOrBuilder>
getVariantsOrBuilderList()3361       getVariantsOrBuilderList() {
3362     return variants_;
3363   }
3364   /**
3365    *
3366    *
3367    * <pre>
3368    * Output only. Product variants grouped together on primary product which
3369    * share similar product attributes. It's automatically grouped by
3370    * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
3371    * all the product variants. Only populated for
3372    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
3373    * [Product][google.cloud.retail.v2.Product]s.
3374    * Note: This field is OUTPUT_ONLY for
3375    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
3376    * Do not set this field in API requests.
3377    * </pre>
3378    *
3379    * <code>
3380    * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
3381    * </code>
3382    */
3383   @java.lang.Override
getVariantsCount()3384   public int getVariantsCount() {
3385     return variants_.size();
3386   }
3387   /**
3388    *
3389    *
3390    * <pre>
3391    * Output only. Product variants grouped together on primary product which
3392    * share similar product attributes. It's automatically grouped by
3393    * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
3394    * all the product variants. Only populated for
3395    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
3396    * [Product][google.cloud.retail.v2.Product]s.
3397    * Note: This field is OUTPUT_ONLY for
3398    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
3399    * Do not set this field in API requests.
3400    * </pre>
3401    *
3402    * <code>
3403    * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
3404    * </code>
3405    */
3406   @java.lang.Override
getVariants(int index)3407   public com.google.cloud.retail.v2.Product getVariants(int index) {
3408     return variants_.get(index);
3409   }
3410   /**
3411    *
3412    *
3413    * <pre>
3414    * Output only. Product variants grouped together on primary product which
3415    * share similar product attributes. It's automatically grouped by
3416    * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
3417    * all the product variants. Only populated for
3418    * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
3419    * [Product][google.cloud.retail.v2.Product]s.
3420    * Note: This field is OUTPUT_ONLY for
3421    * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
3422    * Do not set this field in API requests.
3423    * </pre>
3424    *
3425    * <code>
3426    * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
3427    * </code>
3428    */
3429   @java.lang.Override
getVariantsOrBuilder(int index)3430   public com.google.cloud.retail.v2.ProductOrBuilder getVariantsOrBuilder(int index) {
3431     return variants_.get(index);
3432   }
3433 
3434   public static final int LOCAL_INVENTORIES_FIELD_NUMBER = 35;
3435 
3436   @SuppressWarnings("serial")
3437   private java.util.List<com.google.cloud.retail.v2.LocalInventory> localInventories_;
3438   /**
3439    *
3440    *
3441    * <pre>
3442    * Output only. A list of local inventories specific to different places.
3443    * This field can be managed by
3444    * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
3445    * and
3446    * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
3447    * APIs if fine-grained, high-volume updates are necessary.
3448    * </pre>
3449    *
3450    * <code>
3451    * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
3452    * </code>
3453    */
3454   @java.lang.Override
getLocalInventoriesList()3455   public java.util.List<com.google.cloud.retail.v2.LocalInventory> getLocalInventoriesList() {
3456     return localInventories_;
3457   }
3458   /**
3459    *
3460    *
3461    * <pre>
3462    * Output only. A list of local inventories specific to different places.
3463    * This field can be managed by
3464    * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
3465    * and
3466    * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
3467    * APIs if fine-grained, high-volume updates are necessary.
3468    * </pre>
3469    *
3470    * <code>
3471    * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
3472    * </code>
3473    */
3474   @java.lang.Override
3475   public java.util.List<? extends com.google.cloud.retail.v2.LocalInventoryOrBuilder>
getLocalInventoriesOrBuilderList()3476       getLocalInventoriesOrBuilderList() {
3477     return localInventories_;
3478   }
3479   /**
3480    *
3481    *
3482    * <pre>
3483    * Output only. A list of local inventories specific to different places.
3484    * This field can be managed by
3485    * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
3486    * and
3487    * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
3488    * APIs if fine-grained, high-volume updates are necessary.
3489    * </pre>
3490    *
3491    * <code>
3492    * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
3493    * </code>
3494    */
3495   @java.lang.Override
getLocalInventoriesCount()3496   public int getLocalInventoriesCount() {
3497     return localInventories_.size();
3498   }
3499   /**
3500    *
3501    *
3502    * <pre>
3503    * Output only. A list of local inventories specific to different places.
3504    * This field can be managed by
3505    * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
3506    * and
3507    * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
3508    * APIs if fine-grained, high-volume updates are necessary.
3509    * </pre>
3510    *
3511    * <code>
3512    * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
3513    * </code>
3514    */
3515   @java.lang.Override
getLocalInventories(int index)3516   public com.google.cloud.retail.v2.LocalInventory getLocalInventories(int index) {
3517     return localInventories_.get(index);
3518   }
3519   /**
3520    *
3521    *
3522    * <pre>
3523    * Output only. A list of local inventories specific to different places.
3524    * This field can be managed by
3525    * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
3526    * and
3527    * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
3528    * APIs if fine-grained, high-volume updates are necessary.
3529    * </pre>
3530    *
3531    * <code>
3532    * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
3533    * </code>
3534    */
3535   @java.lang.Override
getLocalInventoriesOrBuilder( int index)3536   public com.google.cloud.retail.v2.LocalInventoryOrBuilder getLocalInventoriesOrBuilder(
3537       int index) {
3538     return localInventories_.get(index);
3539   }
3540 
3541   private byte memoizedIsInitialized = -1;
3542 
3543   @java.lang.Override
isInitialized()3544   public final boolean isInitialized() {
3545     byte isInitialized = memoizedIsInitialized;
3546     if (isInitialized == 1) return true;
3547     if (isInitialized == 0) return false;
3548 
3549     memoizedIsInitialized = 1;
3550     return true;
3551   }
3552 
3553   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)3554   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
3555     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
3556       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
3557     }
3558     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
3559       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
3560     }
3561     if (type_ != com.google.cloud.retail.v2.Product.Type.TYPE_UNSPECIFIED.getNumber()) {
3562       output.writeEnum(3, type_);
3563     }
3564     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryProductId_)) {
3565       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, primaryProductId_);
3566     }
3567     for (int i = 0; i < collectionMemberIds_.size(); i++) {
3568       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, collectionMemberIds_.getRaw(i));
3569     }
3570     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gtin_)) {
3571       com.google.protobuf.GeneratedMessageV3.writeString(output, 6, gtin_);
3572     }
3573     for (int i = 0; i < categories_.size(); i++) {
3574       com.google.protobuf.GeneratedMessageV3.writeString(output, 7, categories_.getRaw(i));
3575     }
3576     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
3577       com.google.protobuf.GeneratedMessageV3.writeString(output, 8, title_);
3578     }
3579     for (int i = 0; i < brands_.size(); i++) {
3580       com.google.protobuf.GeneratedMessageV3.writeString(output, 9, brands_.getRaw(i));
3581     }
3582     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
3583       com.google.protobuf.GeneratedMessageV3.writeString(output, 10, description_);
3584     }
3585     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
3586       com.google.protobuf.GeneratedMessageV3.writeString(output, 11, languageCode_);
3587     }
3588     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
3589         output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 12);
3590     for (int i = 0; i < tags_.size(); i++) {
3591       com.google.protobuf.GeneratedMessageV3.writeString(output, 13, tags_.getRaw(i));
3592     }
3593     if (priceInfo_ != null) {
3594       output.writeMessage(14, getPriceInfo());
3595     }
3596     if (rating_ != null) {
3597       output.writeMessage(15, getRating());
3598     }
3599     if (expirationCase_ == 16) {
3600       output.writeMessage(16, (com.google.protobuf.Timestamp) expiration_);
3601     }
3602     if (expirationCase_ == 17) {
3603       output.writeMessage(17, (com.google.protobuf.Duration) expiration_);
3604     }
3605     if (availableTime_ != null) {
3606       output.writeMessage(18, getAvailableTime());
3607     }
3608     if (availability_
3609         != com.google.cloud.retail.v2.Product.Availability.AVAILABILITY_UNSPECIFIED.getNumber()) {
3610       output.writeEnum(19, availability_);
3611     }
3612     if (availableQuantity_ != null) {
3613       output.writeMessage(20, getAvailableQuantity());
3614     }
3615     for (int i = 0; i < fulfillmentInfo_.size(); i++) {
3616       output.writeMessage(21, fulfillmentInfo_.get(i));
3617     }
3618     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
3619       com.google.protobuf.GeneratedMessageV3.writeString(output, 22, uri_);
3620     }
3621     for (int i = 0; i < images_.size(); i++) {
3622       output.writeMessage(23, images_.get(i));
3623     }
3624     if (audience_ != null) {
3625       output.writeMessage(24, getAudience());
3626     }
3627     if (colorInfo_ != null) {
3628       output.writeMessage(25, getColorInfo());
3629     }
3630     for (int i = 0; i < sizes_.size(); i++) {
3631       com.google.protobuf.GeneratedMessageV3.writeString(output, 26, sizes_.getRaw(i));
3632     }
3633     for (int i = 0; i < materials_.size(); i++) {
3634       com.google.protobuf.GeneratedMessageV3.writeString(output, 27, materials_.getRaw(i));
3635     }
3636     for (int i = 0; i < patterns_.size(); i++) {
3637       com.google.protobuf.GeneratedMessageV3.writeString(output, 28, patterns_.getRaw(i));
3638     }
3639     for (int i = 0; i < conditions_.size(); i++) {
3640       com.google.protobuf.GeneratedMessageV3.writeString(output, 29, conditions_.getRaw(i));
3641     }
3642     if (retrievableFields_ != null) {
3643       output.writeMessage(30, getRetrievableFields());
3644     }
3645     for (int i = 0; i < variants_.size(); i++) {
3646       output.writeMessage(31, variants_.get(i));
3647     }
3648     if (publishTime_ != null) {
3649       output.writeMessage(33, getPublishTime());
3650     }
3651     for (int i = 0; i < promotions_.size(); i++) {
3652       output.writeMessage(34, promotions_.get(i));
3653     }
3654     for (int i = 0; i < localInventories_.size(); i++) {
3655       output.writeMessage(35, localInventories_.get(i));
3656     }
3657     getUnknownFields().writeTo(output);
3658   }
3659 
3660   @java.lang.Override
getSerializedSize()3661   public int getSerializedSize() {
3662     int size = memoizedSize;
3663     if (size != -1) return size;
3664 
3665     size = 0;
3666     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
3667       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
3668     }
3669     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
3670       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
3671     }
3672     if (type_ != com.google.cloud.retail.v2.Product.Type.TYPE_UNSPECIFIED.getNumber()) {
3673       size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_);
3674     }
3675     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryProductId_)) {
3676       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, primaryProductId_);
3677     }
3678     {
3679       int dataSize = 0;
3680       for (int i = 0; i < collectionMemberIds_.size(); i++) {
3681         dataSize += computeStringSizeNoTag(collectionMemberIds_.getRaw(i));
3682       }
3683       size += dataSize;
3684       size += 1 * getCollectionMemberIdsList().size();
3685     }
3686     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gtin_)) {
3687       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, gtin_);
3688     }
3689     {
3690       int dataSize = 0;
3691       for (int i = 0; i < categories_.size(); i++) {
3692         dataSize += computeStringSizeNoTag(categories_.getRaw(i));
3693       }
3694       size += dataSize;
3695       size += 1 * getCategoriesList().size();
3696     }
3697     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
3698       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, title_);
3699     }
3700     {
3701       int dataSize = 0;
3702       for (int i = 0; i < brands_.size(); i++) {
3703         dataSize += computeStringSizeNoTag(brands_.getRaw(i));
3704       }
3705       size += dataSize;
3706       size += 1 * getBrandsList().size();
3707     }
3708     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
3709       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, description_);
3710     }
3711     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
3712       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, languageCode_);
3713     }
3714     for (java.util.Map.Entry<java.lang.String, com.google.cloud.retail.v2.CustomAttribute> entry :
3715         internalGetAttributes().getMap().entrySet()) {
3716       com.google.protobuf.MapEntry<java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
3717           attributes__ =
3718               AttributesDefaultEntryHolder.defaultEntry
3719                   .newBuilderForType()
3720                   .setKey(entry.getKey())
3721                   .setValue(entry.getValue())
3722                   .build();
3723       size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, attributes__);
3724     }
3725     {
3726       int dataSize = 0;
3727       for (int i = 0; i < tags_.size(); i++) {
3728         dataSize += computeStringSizeNoTag(tags_.getRaw(i));
3729       }
3730       size += dataSize;
3731       size += 1 * getTagsList().size();
3732     }
3733     if (priceInfo_ != null) {
3734       size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getPriceInfo());
3735     }
3736     if (rating_ != null) {
3737       size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getRating());
3738     }
3739     if (expirationCase_ == 16) {
3740       size +=
3741           com.google.protobuf.CodedOutputStream.computeMessageSize(
3742               16, (com.google.protobuf.Timestamp) expiration_);
3743     }
3744     if (expirationCase_ == 17) {
3745       size +=
3746           com.google.protobuf.CodedOutputStream.computeMessageSize(
3747               17, (com.google.protobuf.Duration) expiration_);
3748     }
3749     if (availableTime_ != null) {
3750       size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getAvailableTime());
3751     }
3752     if (availability_
3753         != com.google.cloud.retail.v2.Product.Availability.AVAILABILITY_UNSPECIFIED.getNumber()) {
3754       size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, availability_);
3755     }
3756     if (availableQuantity_ != null) {
3757       size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getAvailableQuantity());
3758     }
3759     for (int i = 0; i < fulfillmentInfo_.size(); i++) {
3760       size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, fulfillmentInfo_.get(i));
3761     }
3762     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
3763       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, uri_);
3764     }
3765     for (int i = 0; i < images_.size(); i++) {
3766       size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, images_.get(i));
3767     }
3768     if (audience_ != null) {
3769       size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getAudience());
3770     }
3771     if (colorInfo_ != null) {
3772       size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getColorInfo());
3773     }
3774     {
3775       int dataSize = 0;
3776       for (int i = 0; i < sizes_.size(); i++) {
3777         dataSize += computeStringSizeNoTag(sizes_.getRaw(i));
3778       }
3779       size += dataSize;
3780       size += 2 * getSizesList().size();
3781     }
3782     {
3783       int dataSize = 0;
3784       for (int i = 0; i < materials_.size(); i++) {
3785         dataSize += computeStringSizeNoTag(materials_.getRaw(i));
3786       }
3787       size += dataSize;
3788       size += 2 * getMaterialsList().size();
3789     }
3790     {
3791       int dataSize = 0;
3792       for (int i = 0; i < patterns_.size(); i++) {
3793         dataSize += computeStringSizeNoTag(patterns_.getRaw(i));
3794       }
3795       size += dataSize;
3796       size += 2 * getPatternsList().size();
3797     }
3798     {
3799       int dataSize = 0;
3800       for (int i = 0; i < conditions_.size(); i++) {
3801         dataSize += computeStringSizeNoTag(conditions_.getRaw(i));
3802       }
3803       size += dataSize;
3804       size += 2 * getConditionsList().size();
3805     }
3806     if (retrievableFields_ != null) {
3807       size += com.google.protobuf.CodedOutputStream.computeMessageSize(30, getRetrievableFields());
3808     }
3809     for (int i = 0; i < variants_.size(); i++) {
3810       size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, variants_.get(i));
3811     }
3812     if (publishTime_ != null) {
3813       size += com.google.protobuf.CodedOutputStream.computeMessageSize(33, getPublishTime());
3814     }
3815     for (int i = 0; i < promotions_.size(); i++) {
3816       size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, promotions_.get(i));
3817     }
3818     for (int i = 0; i < localInventories_.size(); i++) {
3819       size +=
3820           com.google.protobuf.CodedOutputStream.computeMessageSize(35, localInventories_.get(i));
3821     }
3822     size += getUnknownFields().getSerializedSize();
3823     memoizedSize = size;
3824     return size;
3825   }
3826 
3827   @java.lang.Override
equals(final java.lang.Object obj)3828   public boolean equals(final java.lang.Object obj) {
3829     if (obj == this) {
3830       return true;
3831     }
3832     if (!(obj instanceof com.google.cloud.retail.v2.Product)) {
3833       return super.equals(obj);
3834     }
3835     com.google.cloud.retail.v2.Product other = (com.google.cloud.retail.v2.Product) obj;
3836 
3837     if (!getName().equals(other.getName())) return false;
3838     if (!getId().equals(other.getId())) return false;
3839     if (type_ != other.type_) return false;
3840     if (!getPrimaryProductId().equals(other.getPrimaryProductId())) return false;
3841     if (!getCollectionMemberIdsList().equals(other.getCollectionMemberIdsList())) return false;
3842     if (!getGtin().equals(other.getGtin())) return false;
3843     if (!getCategoriesList().equals(other.getCategoriesList())) return false;
3844     if (!getTitle().equals(other.getTitle())) return false;
3845     if (!getBrandsList().equals(other.getBrandsList())) return false;
3846     if (!getDescription().equals(other.getDescription())) return false;
3847     if (!getLanguageCode().equals(other.getLanguageCode())) return false;
3848     if (!internalGetAttributes().equals(other.internalGetAttributes())) return false;
3849     if (!getTagsList().equals(other.getTagsList())) return false;
3850     if (hasPriceInfo() != other.hasPriceInfo()) return false;
3851     if (hasPriceInfo()) {
3852       if (!getPriceInfo().equals(other.getPriceInfo())) return false;
3853     }
3854     if (hasRating() != other.hasRating()) return false;
3855     if (hasRating()) {
3856       if (!getRating().equals(other.getRating())) return false;
3857     }
3858     if (hasAvailableTime() != other.hasAvailableTime()) return false;
3859     if (hasAvailableTime()) {
3860       if (!getAvailableTime().equals(other.getAvailableTime())) return false;
3861     }
3862     if (availability_ != other.availability_) return false;
3863     if (hasAvailableQuantity() != other.hasAvailableQuantity()) return false;
3864     if (hasAvailableQuantity()) {
3865       if (!getAvailableQuantity().equals(other.getAvailableQuantity())) return false;
3866     }
3867     if (!getFulfillmentInfoList().equals(other.getFulfillmentInfoList())) return false;
3868     if (!getUri().equals(other.getUri())) return false;
3869     if (!getImagesList().equals(other.getImagesList())) return false;
3870     if (hasAudience() != other.hasAudience()) return false;
3871     if (hasAudience()) {
3872       if (!getAudience().equals(other.getAudience())) return false;
3873     }
3874     if (hasColorInfo() != other.hasColorInfo()) return false;
3875     if (hasColorInfo()) {
3876       if (!getColorInfo().equals(other.getColorInfo())) return false;
3877     }
3878     if (!getSizesList().equals(other.getSizesList())) return false;
3879     if (!getMaterialsList().equals(other.getMaterialsList())) return false;
3880     if (!getPatternsList().equals(other.getPatternsList())) return false;
3881     if (!getConditionsList().equals(other.getConditionsList())) return false;
3882     if (!getPromotionsList().equals(other.getPromotionsList())) return false;
3883     if (hasPublishTime() != other.hasPublishTime()) return false;
3884     if (hasPublishTime()) {
3885       if (!getPublishTime().equals(other.getPublishTime())) return false;
3886     }
3887     if (hasRetrievableFields() != other.hasRetrievableFields()) return false;
3888     if (hasRetrievableFields()) {
3889       if (!getRetrievableFields().equals(other.getRetrievableFields())) return false;
3890     }
3891     if (!getVariantsList().equals(other.getVariantsList())) return false;
3892     if (!getLocalInventoriesList().equals(other.getLocalInventoriesList())) return false;
3893     if (!getExpirationCase().equals(other.getExpirationCase())) return false;
3894     switch (expirationCase_) {
3895       case 16:
3896         if (!getExpireTime().equals(other.getExpireTime())) return false;
3897         break;
3898       case 17:
3899         if (!getTtl().equals(other.getTtl())) return false;
3900         break;
3901       case 0:
3902       default:
3903     }
3904     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
3905     return true;
3906   }
3907 
3908   @java.lang.Override
hashCode()3909   public int hashCode() {
3910     if (memoizedHashCode != 0) {
3911       return memoizedHashCode;
3912     }
3913     int hash = 41;
3914     hash = (19 * hash) + getDescriptor().hashCode();
3915     hash = (37 * hash) + NAME_FIELD_NUMBER;
3916     hash = (53 * hash) + getName().hashCode();
3917     hash = (37 * hash) + ID_FIELD_NUMBER;
3918     hash = (53 * hash) + getId().hashCode();
3919     hash = (37 * hash) + TYPE_FIELD_NUMBER;
3920     hash = (53 * hash) + type_;
3921     hash = (37 * hash) + PRIMARY_PRODUCT_ID_FIELD_NUMBER;
3922     hash = (53 * hash) + getPrimaryProductId().hashCode();
3923     if (getCollectionMemberIdsCount() > 0) {
3924       hash = (37 * hash) + COLLECTION_MEMBER_IDS_FIELD_NUMBER;
3925       hash = (53 * hash) + getCollectionMemberIdsList().hashCode();
3926     }
3927     hash = (37 * hash) + GTIN_FIELD_NUMBER;
3928     hash = (53 * hash) + getGtin().hashCode();
3929     if (getCategoriesCount() > 0) {
3930       hash = (37 * hash) + CATEGORIES_FIELD_NUMBER;
3931       hash = (53 * hash) + getCategoriesList().hashCode();
3932     }
3933     hash = (37 * hash) + TITLE_FIELD_NUMBER;
3934     hash = (53 * hash) + getTitle().hashCode();
3935     if (getBrandsCount() > 0) {
3936       hash = (37 * hash) + BRANDS_FIELD_NUMBER;
3937       hash = (53 * hash) + getBrandsList().hashCode();
3938     }
3939     hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
3940     hash = (53 * hash) + getDescription().hashCode();
3941     hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
3942     hash = (53 * hash) + getLanguageCode().hashCode();
3943     if (!internalGetAttributes().getMap().isEmpty()) {
3944       hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER;
3945       hash = (53 * hash) + internalGetAttributes().hashCode();
3946     }
3947     if (getTagsCount() > 0) {
3948       hash = (37 * hash) + TAGS_FIELD_NUMBER;
3949       hash = (53 * hash) + getTagsList().hashCode();
3950     }
3951     if (hasPriceInfo()) {
3952       hash = (37 * hash) + PRICE_INFO_FIELD_NUMBER;
3953       hash = (53 * hash) + getPriceInfo().hashCode();
3954     }
3955     if (hasRating()) {
3956       hash = (37 * hash) + RATING_FIELD_NUMBER;
3957       hash = (53 * hash) + getRating().hashCode();
3958     }
3959     if (hasAvailableTime()) {
3960       hash = (37 * hash) + AVAILABLE_TIME_FIELD_NUMBER;
3961       hash = (53 * hash) + getAvailableTime().hashCode();
3962     }
3963     hash = (37 * hash) + AVAILABILITY_FIELD_NUMBER;
3964     hash = (53 * hash) + availability_;
3965     if (hasAvailableQuantity()) {
3966       hash = (37 * hash) + AVAILABLE_QUANTITY_FIELD_NUMBER;
3967       hash = (53 * hash) + getAvailableQuantity().hashCode();
3968     }
3969     if (getFulfillmentInfoCount() > 0) {
3970       hash = (37 * hash) + FULFILLMENT_INFO_FIELD_NUMBER;
3971       hash = (53 * hash) + getFulfillmentInfoList().hashCode();
3972     }
3973     hash = (37 * hash) + URI_FIELD_NUMBER;
3974     hash = (53 * hash) + getUri().hashCode();
3975     if (getImagesCount() > 0) {
3976       hash = (37 * hash) + IMAGES_FIELD_NUMBER;
3977       hash = (53 * hash) + getImagesList().hashCode();
3978     }
3979     if (hasAudience()) {
3980       hash = (37 * hash) + AUDIENCE_FIELD_NUMBER;
3981       hash = (53 * hash) + getAudience().hashCode();
3982     }
3983     if (hasColorInfo()) {
3984       hash = (37 * hash) + COLOR_INFO_FIELD_NUMBER;
3985       hash = (53 * hash) + getColorInfo().hashCode();
3986     }
3987     if (getSizesCount() > 0) {
3988       hash = (37 * hash) + SIZES_FIELD_NUMBER;
3989       hash = (53 * hash) + getSizesList().hashCode();
3990     }
3991     if (getMaterialsCount() > 0) {
3992       hash = (37 * hash) + MATERIALS_FIELD_NUMBER;
3993       hash = (53 * hash) + getMaterialsList().hashCode();
3994     }
3995     if (getPatternsCount() > 0) {
3996       hash = (37 * hash) + PATTERNS_FIELD_NUMBER;
3997       hash = (53 * hash) + getPatternsList().hashCode();
3998     }
3999     if (getConditionsCount() > 0) {
4000       hash = (37 * hash) + CONDITIONS_FIELD_NUMBER;
4001       hash = (53 * hash) + getConditionsList().hashCode();
4002     }
4003     if (getPromotionsCount() > 0) {
4004       hash = (37 * hash) + PROMOTIONS_FIELD_NUMBER;
4005       hash = (53 * hash) + getPromotionsList().hashCode();
4006     }
4007     if (hasPublishTime()) {
4008       hash = (37 * hash) + PUBLISH_TIME_FIELD_NUMBER;
4009       hash = (53 * hash) + getPublishTime().hashCode();
4010     }
4011     if (hasRetrievableFields()) {
4012       hash = (37 * hash) + RETRIEVABLE_FIELDS_FIELD_NUMBER;
4013       hash = (53 * hash) + getRetrievableFields().hashCode();
4014     }
4015     if (getVariantsCount() > 0) {
4016       hash = (37 * hash) + VARIANTS_FIELD_NUMBER;
4017       hash = (53 * hash) + getVariantsList().hashCode();
4018     }
4019     if (getLocalInventoriesCount() > 0) {
4020       hash = (37 * hash) + LOCAL_INVENTORIES_FIELD_NUMBER;
4021       hash = (53 * hash) + getLocalInventoriesList().hashCode();
4022     }
4023     switch (expirationCase_) {
4024       case 16:
4025         hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER;
4026         hash = (53 * hash) + getExpireTime().hashCode();
4027         break;
4028       case 17:
4029         hash = (37 * hash) + TTL_FIELD_NUMBER;
4030         hash = (53 * hash) + getTtl().hashCode();
4031         break;
4032       case 0:
4033       default:
4034     }
4035     hash = (29 * hash) + getUnknownFields().hashCode();
4036     memoizedHashCode = hash;
4037     return hash;
4038   }
4039 
parseFrom(java.nio.ByteBuffer data)4040   public static com.google.cloud.retail.v2.Product parseFrom(java.nio.ByteBuffer data)
4041       throws com.google.protobuf.InvalidProtocolBufferException {
4042     return PARSER.parseFrom(data);
4043   }
4044 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4045   public static com.google.cloud.retail.v2.Product parseFrom(
4046       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4047       throws com.google.protobuf.InvalidProtocolBufferException {
4048     return PARSER.parseFrom(data, extensionRegistry);
4049   }
4050 
parseFrom(com.google.protobuf.ByteString data)4051   public static com.google.cloud.retail.v2.Product parseFrom(com.google.protobuf.ByteString data)
4052       throws com.google.protobuf.InvalidProtocolBufferException {
4053     return PARSER.parseFrom(data);
4054   }
4055 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4056   public static com.google.cloud.retail.v2.Product parseFrom(
4057       com.google.protobuf.ByteString data,
4058       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4059       throws com.google.protobuf.InvalidProtocolBufferException {
4060     return PARSER.parseFrom(data, extensionRegistry);
4061   }
4062 
parseFrom(byte[] data)4063   public static com.google.cloud.retail.v2.Product parseFrom(byte[] data)
4064       throws com.google.protobuf.InvalidProtocolBufferException {
4065     return PARSER.parseFrom(data);
4066   }
4067 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4068   public static com.google.cloud.retail.v2.Product parseFrom(
4069       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4070       throws com.google.protobuf.InvalidProtocolBufferException {
4071     return PARSER.parseFrom(data, extensionRegistry);
4072   }
4073 
parseFrom(java.io.InputStream input)4074   public static com.google.cloud.retail.v2.Product parseFrom(java.io.InputStream input)
4075       throws java.io.IOException {
4076     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
4077   }
4078 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4079   public static com.google.cloud.retail.v2.Product parseFrom(
4080       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4081       throws java.io.IOException {
4082     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
4083         PARSER, input, extensionRegistry);
4084   }
4085 
parseDelimitedFrom(java.io.InputStream input)4086   public static com.google.cloud.retail.v2.Product parseDelimitedFrom(java.io.InputStream input)
4087       throws java.io.IOException {
4088     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
4089   }
4090 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4091   public static com.google.cloud.retail.v2.Product parseDelimitedFrom(
4092       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4093       throws java.io.IOException {
4094     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
4095         PARSER, input, extensionRegistry);
4096   }
4097 
parseFrom( com.google.protobuf.CodedInputStream input)4098   public static com.google.cloud.retail.v2.Product parseFrom(
4099       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
4100     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
4101   }
4102 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4103   public static com.google.cloud.retail.v2.Product parseFrom(
4104       com.google.protobuf.CodedInputStream input,
4105       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4106       throws java.io.IOException {
4107     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
4108         PARSER, input, extensionRegistry);
4109   }
4110 
4111   @java.lang.Override
newBuilderForType()4112   public Builder newBuilderForType() {
4113     return newBuilder();
4114   }
4115 
newBuilder()4116   public static Builder newBuilder() {
4117     return DEFAULT_INSTANCE.toBuilder();
4118   }
4119 
newBuilder(com.google.cloud.retail.v2.Product prototype)4120   public static Builder newBuilder(com.google.cloud.retail.v2.Product prototype) {
4121     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
4122   }
4123 
4124   @java.lang.Override
toBuilder()4125   public Builder toBuilder() {
4126     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
4127   }
4128 
4129   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4130   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4131     Builder builder = new Builder(parent);
4132     return builder;
4133   }
4134   /**
4135    *
4136    *
4137    * <pre>
4138    * Product captures all metadata information of items to be recommended or
4139    * searched.
4140    * </pre>
4141    *
4142    * Protobuf type {@code google.cloud.retail.v2.Product}
4143    */
4144   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
4145       implements
4146       // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.Product)
4147       com.google.cloud.retail.v2.ProductOrBuilder {
getDescriptor()4148     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
4149       return com.google.cloud.retail.v2.ProductProto
4150           .internal_static_google_cloud_retail_v2_Product_descriptor;
4151     }
4152 
4153     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)4154     protected com.google.protobuf.MapField internalGetMapField(int number) {
4155       switch (number) {
4156         case 12:
4157           return internalGetAttributes();
4158         default:
4159           throw new RuntimeException("Invalid map field number: " + number);
4160       }
4161     }
4162 
4163     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)4164     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
4165       switch (number) {
4166         case 12:
4167           return internalGetMutableAttributes();
4168         default:
4169           throw new RuntimeException("Invalid map field number: " + number);
4170       }
4171     }
4172 
4173     @java.lang.Override
4174     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()4175         internalGetFieldAccessorTable() {
4176       return com.google.cloud.retail.v2.ProductProto
4177           .internal_static_google_cloud_retail_v2_Product_fieldAccessorTable
4178           .ensureFieldAccessorsInitialized(
4179               com.google.cloud.retail.v2.Product.class,
4180               com.google.cloud.retail.v2.Product.Builder.class);
4181     }
4182 
4183     // Construct using com.google.cloud.retail.v2.Product.newBuilder()
Builder()4184     private Builder() {}
4185 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4186     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4187       super(parent);
4188     }
4189 
4190     @java.lang.Override
clear()4191     public Builder clear() {
4192       super.clear();
4193       bitField0_ = 0;
4194       bitField1_ = 0;
4195       if (expireTimeBuilder_ != null) {
4196         expireTimeBuilder_.clear();
4197       }
4198       if (ttlBuilder_ != null) {
4199         ttlBuilder_.clear();
4200       }
4201       name_ = "";
4202       id_ = "";
4203       type_ = 0;
4204       primaryProductId_ = "";
4205       collectionMemberIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4206       bitField0_ = (bitField0_ & ~0x00000040);
4207       gtin_ = "";
4208       categories_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4209       bitField0_ = (bitField0_ & ~0x00000100);
4210       title_ = "";
4211       brands_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4212       bitField0_ = (bitField0_ & ~0x00000400);
4213       description_ = "";
4214       languageCode_ = "";
4215       internalGetMutableAttributes().clear();
4216       tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4217       bitField0_ = (bitField0_ & ~0x00004000);
4218       priceInfo_ = null;
4219       if (priceInfoBuilder_ != null) {
4220         priceInfoBuilder_.dispose();
4221         priceInfoBuilder_ = null;
4222       }
4223       rating_ = null;
4224       if (ratingBuilder_ != null) {
4225         ratingBuilder_.dispose();
4226         ratingBuilder_ = null;
4227       }
4228       availableTime_ = null;
4229       if (availableTimeBuilder_ != null) {
4230         availableTimeBuilder_.dispose();
4231         availableTimeBuilder_ = null;
4232       }
4233       availability_ = 0;
4234       availableQuantity_ = null;
4235       if (availableQuantityBuilder_ != null) {
4236         availableQuantityBuilder_.dispose();
4237         availableQuantityBuilder_ = null;
4238       }
4239       if (fulfillmentInfoBuilder_ == null) {
4240         fulfillmentInfo_ = java.util.Collections.emptyList();
4241       } else {
4242         fulfillmentInfo_ = null;
4243         fulfillmentInfoBuilder_.clear();
4244       }
4245       bitField0_ = (bitField0_ & ~0x00100000);
4246       uri_ = "";
4247       if (imagesBuilder_ == null) {
4248         images_ = java.util.Collections.emptyList();
4249       } else {
4250         images_ = null;
4251         imagesBuilder_.clear();
4252       }
4253       bitField0_ = (bitField0_ & ~0x00400000);
4254       audience_ = null;
4255       if (audienceBuilder_ != null) {
4256         audienceBuilder_.dispose();
4257         audienceBuilder_ = null;
4258       }
4259       colorInfo_ = null;
4260       if (colorInfoBuilder_ != null) {
4261         colorInfoBuilder_.dispose();
4262         colorInfoBuilder_ = null;
4263       }
4264       sizes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4265       bitField0_ = (bitField0_ & ~0x02000000);
4266       materials_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4267       bitField0_ = (bitField0_ & ~0x04000000);
4268       patterns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4269       bitField0_ = (bitField0_ & ~0x08000000);
4270       conditions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4271       bitField0_ = (bitField0_ & ~0x10000000);
4272       if (promotionsBuilder_ == null) {
4273         promotions_ = java.util.Collections.emptyList();
4274       } else {
4275         promotions_ = null;
4276         promotionsBuilder_.clear();
4277       }
4278       bitField0_ = (bitField0_ & ~0x20000000);
4279       publishTime_ = null;
4280       if (publishTimeBuilder_ != null) {
4281         publishTimeBuilder_.dispose();
4282         publishTimeBuilder_ = null;
4283       }
4284       retrievableFields_ = null;
4285       if (retrievableFieldsBuilder_ != null) {
4286         retrievableFieldsBuilder_.dispose();
4287         retrievableFieldsBuilder_ = null;
4288       }
4289       if (variantsBuilder_ == null) {
4290         variants_ = java.util.Collections.emptyList();
4291       } else {
4292         variants_ = null;
4293         variantsBuilder_.clear();
4294       }
4295       bitField1_ = (bitField1_ & ~0x00000001);
4296       if (localInventoriesBuilder_ == null) {
4297         localInventories_ = java.util.Collections.emptyList();
4298       } else {
4299         localInventories_ = null;
4300         localInventoriesBuilder_.clear();
4301       }
4302       bitField1_ = (bitField1_ & ~0x00000002);
4303       expirationCase_ = 0;
4304       expiration_ = null;
4305       return this;
4306     }
4307 
4308     @java.lang.Override
getDescriptorForType()4309     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
4310       return com.google.cloud.retail.v2.ProductProto
4311           .internal_static_google_cloud_retail_v2_Product_descriptor;
4312     }
4313 
4314     @java.lang.Override
getDefaultInstanceForType()4315     public com.google.cloud.retail.v2.Product getDefaultInstanceForType() {
4316       return com.google.cloud.retail.v2.Product.getDefaultInstance();
4317     }
4318 
4319     @java.lang.Override
build()4320     public com.google.cloud.retail.v2.Product build() {
4321       com.google.cloud.retail.v2.Product result = buildPartial();
4322       if (!result.isInitialized()) {
4323         throw newUninitializedMessageException(result);
4324       }
4325       return result;
4326     }
4327 
4328     @java.lang.Override
buildPartial()4329     public com.google.cloud.retail.v2.Product buildPartial() {
4330       com.google.cloud.retail.v2.Product result = new com.google.cloud.retail.v2.Product(this);
4331       buildPartialRepeatedFields(result);
4332       if (bitField0_ != 0) {
4333         buildPartial0(result);
4334       }
4335       if (bitField1_ != 0) {
4336         buildPartial1(result);
4337       }
4338       buildPartialOneofs(result);
4339       onBuilt();
4340       return result;
4341     }
4342 
buildPartialRepeatedFields(com.google.cloud.retail.v2.Product result)4343     private void buildPartialRepeatedFields(com.google.cloud.retail.v2.Product result) {
4344       if (((bitField0_ & 0x00000040) != 0)) {
4345         collectionMemberIds_ = collectionMemberIds_.getUnmodifiableView();
4346         bitField0_ = (bitField0_ & ~0x00000040);
4347       }
4348       result.collectionMemberIds_ = collectionMemberIds_;
4349       if (((bitField0_ & 0x00000100) != 0)) {
4350         categories_ = categories_.getUnmodifiableView();
4351         bitField0_ = (bitField0_ & ~0x00000100);
4352       }
4353       result.categories_ = categories_;
4354       if (((bitField0_ & 0x00000400) != 0)) {
4355         brands_ = brands_.getUnmodifiableView();
4356         bitField0_ = (bitField0_ & ~0x00000400);
4357       }
4358       result.brands_ = brands_;
4359       if (((bitField0_ & 0x00004000) != 0)) {
4360         tags_ = tags_.getUnmodifiableView();
4361         bitField0_ = (bitField0_ & ~0x00004000);
4362       }
4363       result.tags_ = tags_;
4364       if (fulfillmentInfoBuilder_ == null) {
4365         if (((bitField0_ & 0x00100000) != 0)) {
4366           fulfillmentInfo_ = java.util.Collections.unmodifiableList(fulfillmentInfo_);
4367           bitField0_ = (bitField0_ & ~0x00100000);
4368         }
4369         result.fulfillmentInfo_ = fulfillmentInfo_;
4370       } else {
4371         result.fulfillmentInfo_ = fulfillmentInfoBuilder_.build();
4372       }
4373       if (imagesBuilder_ == null) {
4374         if (((bitField0_ & 0x00400000) != 0)) {
4375           images_ = java.util.Collections.unmodifiableList(images_);
4376           bitField0_ = (bitField0_ & ~0x00400000);
4377         }
4378         result.images_ = images_;
4379       } else {
4380         result.images_ = imagesBuilder_.build();
4381       }
4382       if (((bitField0_ & 0x02000000) != 0)) {
4383         sizes_ = sizes_.getUnmodifiableView();
4384         bitField0_ = (bitField0_ & ~0x02000000);
4385       }
4386       result.sizes_ = sizes_;
4387       if (((bitField0_ & 0x04000000) != 0)) {
4388         materials_ = materials_.getUnmodifiableView();
4389         bitField0_ = (bitField0_ & ~0x04000000);
4390       }
4391       result.materials_ = materials_;
4392       if (((bitField0_ & 0x08000000) != 0)) {
4393         patterns_ = patterns_.getUnmodifiableView();
4394         bitField0_ = (bitField0_ & ~0x08000000);
4395       }
4396       result.patterns_ = patterns_;
4397       if (((bitField0_ & 0x10000000) != 0)) {
4398         conditions_ = conditions_.getUnmodifiableView();
4399         bitField0_ = (bitField0_ & ~0x10000000);
4400       }
4401       result.conditions_ = conditions_;
4402       if (promotionsBuilder_ == null) {
4403         if (((bitField0_ & 0x20000000) != 0)) {
4404           promotions_ = java.util.Collections.unmodifiableList(promotions_);
4405           bitField0_ = (bitField0_ & ~0x20000000);
4406         }
4407         result.promotions_ = promotions_;
4408       } else {
4409         result.promotions_ = promotionsBuilder_.build();
4410       }
4411       if (variantsBuilder_ == null) {
4412         if (((bitField1_ & 0x00000001) != 0)) {
4413           variants_ = java.util.Collections.unmodifiableList(variants_);
4414           bitField1_ = (bitField1_ & ~0x00000001);
4415         }
4416         result.variants_ = variants_;
4417       } else {
4418         result.variants_ = variantsBuilder_.build();
4419       }
4420       if (localInventoriesBuilder_ == null) {
4421         if (((bitField1_ & 0x00000002) != 0)) {
4422           localInventories_ = java.util.Collections.unmodifiableList(localInventories_);
4423           bitField1_ = (bitField1_ & ~0x00000002);
4424         }
4425         result.localInventories_ = localInventories_;
4426       } else {
4427         result.localInventories_ = localInventoriesBuilder_.build();
4428       }
4429     }
4430 
buildPartial0(com.google.cloud.retail.v2.Product result)4431     private void buildPartial0(com.google.cloud.retail.v2.Product result) {
4432       int from_bitField0_ = bitField0_;
4433       if (((from_bitField0_ & 0x00000004) != 0)) {
4434         result.name_ = name_;
4435       }
4436       if (((from_bitField0_ & 0x00000008) != 0)) {
4437         result.id_ = id_;
4438       }
4439       if (((from_bitField0_ & 0x00000010) != 0)) {
4440         result.type_ = type_;
4441       }
4442       if (((from_bitField0_ & 0x00000020) != 0)) {
4443         result.primaryProductId_ = primaryProductId_;
4444       }
4445       if (((from_bitField0_ & 0x00000080) != 0)) {
4446         result.gtin_ = gtin_;
4447       }
4448       if (((from_bitField0_ & 0x00000200) != 0)) {
4449         result.title_ = title_;
4450       }
4451       if (((from_bitField0_ & 0x00000800) != 0)) {
4452         result.description_ = description_;
4453       }
4454       if (((from_bitField0_ & 0x00001000) != 0)) {
4455         result.languageCode_ = languageCode_;
4456       }
4457       if (((from_bitField0_ & 0x00002000) != 0)) {
4458         result.attributes_ = internalGetAttributes();
4459         result.attributes_.makeImmutable();
4460       }
4461       if (((from_bitField0_ & 0x00008000) != 0)) {
4462         result.priceInfo_ = priceInfoBuilder_ == null ? priceInfo_ : priceInfoBuilder_.build();
4463       }
4464       if (((from_bitField0_ & 0x00010000) != 0)) {
4465         result.rating_ = ratingBuilder_ == null ? rating_ : ratingBuilder_.build();
4466       }
4467       if (((from_bitField0_ & 0x00020000) != 0)) {
4468         result.availableTime_ =
4469             availableTimeBuilder_ == null ? availableTime_ : availableTimeBuilder_.build();
4470       }
4471       if (((from_bitField0_ & 0x00040000) != 0)) {
4472         result.availability_ = availability_;
4473       }
4474       if (((from_bitField0_ & 0x00080000) != 0)) {
4475         result.availableQuantity_ =
4476             availableQuantityBuilder_ == null
4477                 ? availableQuantity_
4478                 : availableQuantityBuilder_.build();
4479       }
4480       if (((from_bitField0_ & 0x00200000) != 0)) {
4481         result.uri_ = uri_;
4482       }
4483       if (((from_bitField0_ & 0x00800000) != 0)) {
4484         result.audience_ = audienceBuilder_ == null ? audience_ : audienceBuilder_.build();
4485       }
4486       if (((from_bitField0_ & 0x01000000) != 0)) {
4487         result.colorInfo_ = colorInfoBuilder_ == null ? colorInfo_ : colorInfoBuilder_.build();
4488       }
4489       if (((from_bitField0_ & 0x40000000) != 0)) {
4490         result.publishTime_ =
4491             publishTimeBuilder_ == null ? publishTime_ : publishTimeBuilder_.build();
4492       }
4493       if (((from_bitField0_ & 0x80000000) != 0)) {
4494         result.retrievableFields_ =
4495             retrievableFieldsBuilder_ == null
4496                 ? retrievableFields_
4497                 : retrievableFieldsBuilder_.build();
4498       }
4499     }
4500 
buildPartial1(com.google.cloud.retail.v2.Product result)4501     private void buildPartial1(com.google.cloud.retail.v2.Product result) {
4502       int from_bitField1_ = bitField1_;
4503     }
4504 
buildPartialOneofs(com.google.cloud.retail.v2.Product result)4505     private void buildPartialOneofs(com.google.cloud.retail.v2.Product result) {
4506       result.expirationCase_ = expirationCase_;
4507       result.expiration_ = this.expiration_;
4508       if (expirationCase_ == 16 && expireTimeBuilder_ != null) {
4509         result.expiration_ = expireTimeBuilder_.build();
4510       }
4511       if (expirationCase_ == 17 && ttlBuilder_ != null) {
4512         result.expiration_ = ttlBuilder_.build();
4513       }
4514     }
4515 
4516     @java.lang.Override
clone()4517     public Builder clone() {
4518       return super.clone();
4519     }
4520 
4521     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4522     public Builder setField(
4523         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
4524       return super.setField(field, value);
4525     }
4526 
4527     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)4528     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
4529       return super.clearField(field);
4530     }
4531 
4532     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)4533     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
4534       return super.clearOneof(oneof);
4535     }
4536 
4537     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)4538     public Builder setRepeatedField(
4539         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
4540       return super.setRepeatedField(field, index, value);
4541     }
4542 
4543     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4544     public Builder addRepeatedField(
4545         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
4546       return super.addRepeatedField(field, value);
4547     }
4548 
4549     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)4550     public Builder mergeFrom(com.google.protobuf.Message other) {
4551       if (other instanceof com.google.cloud.retail.v2.Product) {
4552         return mergeFrom((com.google.cloud.retail.v2.Product) other);
4553       } else {
4554         super.mergeFrom(other);
4555         return this;
4556       }
4557     }
4558 
mergeFrom(com.google.cloud.retail.v2.Product other)4559     public Builder mergeFrom(com.google.cloud.retail.v2.Product other) {
4560       if (other == com.google.cloud.retail.v2.Product.getDefaultInstance()) return this;
4561       if (!other.getName().isEmpty()) {
4562         name_ = other.name_;
4563         bitField0_ |= 0x00000004;
4564         onChanged();
4565       }
4566       if (!other.getId().isEmpty()) {
4567         id_ = other.id_;
4568         bitField0_ |= 0x00000008;
4569         onChanged();
4570       }
4571       if (other.type_ != 0) {
4572         setTypeValue(other.getTypeValue());
4573       }
4574       if (!other.getPrimaryProductId().isEmpty()) {
4575         primaryProductId_ = other.primaryProductId_;
4576         bitField0_ |= 0x00000020;
4577         onChanged();
4578       }
4579       if (!other.collectionMemberIds_.isEmpty()) {
4580         if (collectionMemberIds_.isEmpty()) {
4581           collectionMemberIds_ = other.collectionMemberIds_;
4582           bitField0_ = (bitField0_ & ~0x00000040);
4583         } else {
4584           ensureCollectionMemberIdsIsMutable();
4585           collectionMemberIds_.addAll(other.collectionMemberIds_);
4586         }
4587         onChanged();
4588       }
4589       if (!other.getGtin().isEmpty()) {
4590         gtin_ = other.gtin_;
4591         bitField0_ |= 0x00000080;
4592         onChanged();
4593       }
4594       if (!other.categories_.isEmpty()) {
4595         if (categories_.isEmpty()) {
4596           categories_ = other.categories_;
4597           bitField0_ = (bitField0_ & ~0x00000100);
4598         } else {
4599           ensureCategoriesIsMutable();
4600           categories_.addAll(other.categories_);
4601         }
4602         onChanged();
4603       }
4604       if (!other.getTitle().isEmpty()) {
4605         title_ = other.title_;
4606         bitField0_ |= 0x00000200;
4607         onChanged();
4608       }
4609       if (!other.brands_.isEmpty()) {
4610         if (brands_.isEmpty()) {
4611           brands_ = other.brands_;
4612           bitField0_ = (bitField0_ & ~0x00000400);
4613         } else {
4614           ensureBrandsIsMutable();
4615           brands_.addAll(other.brands_);
4616         }
4617         onChanged();
4618       }
4619       if (!other.getDescription().isEmpty()) {
4620         description_ = other.description_;
4621         bitField0_ |= 0x00000800;
4622         onChanged();
4623       }
4624       if (!other.getLanguageCode().isEmpty()) {
4625         languageCode_ = other.languageCode_;
4626         bitField0_ |= 0x00001000;
4627         onChanged();
4628       }
4629       internalGetMutableAttributes().mergeFrom(other.internalGetAttributes());
4630       bitField0_ |= 0x00002000;
4631       if (!other.tags_.isEmpty()) {
4632         if (tags_.isEmpty()) {
4633           tags_ = other.tags_;
4634           bitField0_ = (bitField0_ & ~0x00004000);
4635         } else {
4636           ensureTagsIsMutable();
4637           tags_.addAll(other.tags_);
4638         }
4639         onChanged();
4640       }
4641       if (other.hasPriceInfo()) {
4642         mergePriceInfo(other.getPriceInfo());
4643       }
4644       if (other.hasRating()) {
4645         mergeRating(other.getRating());
4646       }
4647       if (other.hasAvailableTime()) {
4648         mergeAvailableTime(other.getAvailableTime());
4649       }
4650       if (other.availability_ != 0) {
4651         setAvailabilityValue(other.getAvailabilityValue());
4652       }
4653       if (other.hasAvailableQuantity()) {
4654         mergeAvailableQuantity(other.getAvailableQuantity());
4655       }
4656       if (fulfillmentInfoBuilder_ == null) {
4657         if (!other.fulfillmentInfo_.isEmpty()) {
4658           if (fulfillmentInfo_.isEmpty()) {
4659             fulfillmentInfo_ = other.fulfillmentInfo_;
4660             bitField0_ = (bitField0_ & ~0x00100000);
4661           } else {
4662             ensureFulfillmentInfoIsMutable();
4663             fulfillmentInfo_.addAll(other.fulfillmentInfo_);
4664           }
4665           onChanged();
4666         }
4667       } else {
4668         if (!other.fulfillmentInfo_.isEmpty()) {
4669           if (fulfillmentInfoBuilder_.isEmpty()) {
4670             fulfillmentInfoBuilder_.dispose();
4671             fulfillmentInfoBuilder_ = null;
4672             fulfillmentInfo_ = other.fulfillmentInfo_;
4673             bitField0_ = (bitField0_ & ~0x00100000);
4674             fulfillmentInfoBuilder_ =
4675                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
4676                     ? getFulfillmentInfoFieldBuilder()
4677                     : null;
4678           } else {
4679             fulfillmentInfoBuilder_.addAllMessages(other.fulfillmentInfo_);
4680           }
4681         }
4682       }
4683       if (!other.getUri().isEmpty()) {
4684         uri_ = other.uri_;
4685         bitField0_ |= 0x00200000;
4686         onChanged();
4687       }
4688       if (imagesBuilder_ == null) {
4689         if (!other.images_.isEmpty()) {
4690           if (images_.isEmpty()) {
4691             images_ = other.images_;
4692             bitField0_ = (bitField0_ & ~0x00400000);
4693           } else {
4694             ensureImagesIsMutable();
4695             images_.addAll(other.images_);
4696           }
4697           onChanged();
4698         }
4699       } else {
4700         if (!other.images_.isEmpty()) {
4701           if (imagesBuilder_.isEmpty()) {
4702             imagesBuilder_.dispose();
4703             imagesBuilder_ = null;
4704             images_ = other.images_;
4705             bitField0_ = (bitField0_ & ~0x00400000);
4706             imagesBuilder_ =
4707                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
4708                     ? getImagesFieldBuilder()
4709                     : null;
4710           } else {
4711             imagesBuilder_.addAllMessages(other.images_);
4712           }
4713         }
4714       }
4715       if (other.hasAudience()) {
4716         mergeAudience(other.getAudience());
4717       }
4718       if (other.hasColorInfo()) {
4719         mergeColorInfo(other.getColorInfo());
4720       }
4721       if (!other.sizes_.isEmpty()) {
4722         if (sizes_.isEmpty()) {
4723           sizes_ = other.sizes_;
4724           bitField0_ = (bitField0_ & ~0x02000000);
4725         } else {
4726           ensureSizesIsMutable();
4727           sizes_.addAll(other.sizes_);
4728         }
4729         onChanged();
4730       }
4731       if (!other.materials_.isEmpty()) {
4732         if (materials_.isEmpty()) {
4733           materials_ = other.materials_;
4734           bitField0_ = (bitField0_ & ~0x04000000);
4735         } else {
4736           ensureMaterialsIsMutable();
4737           materials_.addAll(other.materials_);
4738         }
4739         onChanged();
4740       }
4741       if (!other.patterns_.isEmpty()) {
4742         if (patterns_.isEmpty()) {
4743           patterns_ = other.patterns_;
4744           bitField0_ = (bitField0_ & ~0x08000000);
4745         } else {
4746           ensurePatternsIsMutable();
4747           patterns_.addAll(other.patterns_);
4748         }
4749         onChanged();
4750       }
4751       if (!other.conditions_.isEmpty()) {
4752         if (conditions_.isEmpty()) {
4753           conditions_ = other.conditions_;
4754           bitField0_ = (bitField0_ & ~0x10000000);
4755         } else {
4756           ensureConditionsIsMutable();
4757           conditions_.addAll(other.conditions_);
4758         }
4759         onChanged();
4760       }
4761       if (promotionsBuilder_ == null) {
4762         if (!other.promotions_.isEmpty()) {
4763           if (promotions_.isEmpty()) {
4764             promotions_ = other.promotions_;
4765             bitField0_ = (bitField0_ & ~0x20000000);
4766           } else {
4767             ensurePromotionsIsMutable();
4768             promotions_.addAll(other.promotions_);
4769           }
4770           onChanged();
4771         }
4772       } else {
4773         if (!other.promotions_.isEmpty()) {
4774           if (promotionsBuilder_.isEmpty()) {
4775             promotionsBuilder_.dispose();
4776             promotionsBuilder_ = null;
4777             promotions_ = other.promotions_;
4778             bitField0_ = (bitField0_ & ~0x20000000);
4779             promotionsBuilder_ =
4780                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
4781                     ? getPromotionsFieldBuilder()
4782                     : null;
4783           } else {
4784             promotionsBuilder_.addAllMessages(other.promotions_);
4785           }
4786         }
4787       }
4788       if (other.hasPublishTime()) {
4789         mergePublishTime(other.getPublishTime());
4790       }
4791       if (other.hasRetrievableFields()) {
4792         mergeRetrievableFields(other.getRetrievableFields());
4793       }
4794       if (variantsBuilder_ == null) {
4795         if (!other.variants_.isEmpty()) {
4796           if (variants_.isEmpty()) {
4797             variants_ = other.variants_;
4798             bitField1_ = (bitField1_ & ~0x00000001);
4799           } else {
4800             ensureVariantsIsMutable();
4801             variants_.addAll(other.variants_);
4802           }
4803           onChanged();
4804         }
4805       } else {
4806         if (!other.variants_.isEmpty()) {
4807           if (variantsBuilder_.isEmpty()) {
4808             variantsBuilder_.dispose();
4809             variantsBuilder_ = null;
4810             variants_ = other.variants_;
4811             bitField1_ = (bitField1_ & ~0x00000001);
4812             variantsBuilder_ =
4813                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
4814                     ? getVariantsFieldBuilder()
4815                     : null;
4816           } else {
4817             variantsBuilder_.addAllMessages(other.variants_);
4818           }
4819         }
4820       }
4821       if (localInventoriesBuilder_ == null) {
4822         if (!other.localInventories_.isEmpty()) {
4823           if (localInventories_.isEmpty()) {
4824             localInventories_ = other.localInventories_;
4825             bitField1_ = (bitField1_ & ~0x00000002);
4826           } else {
4827             ensureLocalInventoriesIsMutable();
4828             localInventories_.addAll(other.localInventories_);
4829           }
4830           onChanged();
4831         }
4832       } else {
4833         if (!other.localInventories_.isEmpty()) {
4834           if (localInventoriesBuilder_.isEmpty()) {
4835             localInventoriesBuilder_.dispose();
4836             localInventoriesBuilder_ = null;
4837             localInventories_ = other.localInventories_;
4838             bitField1_ = (bitField1_ & ~0x00000002);
4839             localInventoriesBuilder_ =
4840                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
4841                     ? getLocalInventoriesFieldBuilder()
4842                     : null;
4843           } else {
4844             localInventoriesBuilder_.addAllMessages(other.localInventories_);
4845           }
4846         }
4847       }
4848       switch (other.getExpirationCase()) {
4849         case EXPIRE_TIME:
4850           {
4851             mergeExpireTime(other.getExpireTime());
4852             break;
4853           }
4854         case TTL:
4855           {
4856             mergeTtl(other.getTtl());
4857             break;
4858           }
4859         case EXPIRATION_NOT_SET:
4860           {
4861             break;
4862           }
4863       }
4864       this.mergeUnknownFields(other.getUnknownFields());
4865       onChanged();
4866       return this;
4867     }
4868 
4869     @java.lang.Override
isInitialized()4870     public final boolean isInitialized() {
4871       return true;
4872     }
4873 
4874     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4875     public Builder mergeFrom(
4876         com.google.protobuf.CodedInputStream input,
4877         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4878         throws java.io.IOException {
4879       if (extensionRegistry == null) {
4880         throw new java.lang.NullPointerException();
4881       }
4882       try {
4883         boolean done = false;
4884         while (!done) {
4885           int tag = input.readTag();
4886           switch (tag) {
4887             case 0:
4888               done = true;
4889               break;
4890             case 10:
4891               {
4892                 name_ = input.readStringRequireUtf8();
4893                 bitField0_ |= 0x00000004;
4894                 break;
4895               } // case 10
4896             case 18:
4897               {
4898                 id_ = input.readStringRequireUtf8();
4899                 bitField0_ |= 0x00000008;
4900                 break;
4901               } // case 18
4902             case 24:
4903               {
4904                 type_ = input.readEnum();
4905                 bitField0_ |= 0x00000010;
4906                 break;
4907               } // case 24
4908             case 34:
4909               {
4910                 primaryProductId_ = input.readStringRequireUtf8();
4911                 bitField0_ |= 0x00000020;
4912                 break;
4913               } // case 34
4914             case 42:
4915               {
4916                 java.lang.String s = input.readStringRequireUtf8();
4917                 ensureCollectionMemberIdsIsMutable();
4918                 collectionMemberIds_.add(s);
4919                 break;
4920               } // case 42
4921             case 50:
4922               {
4923                 gtin_ = input.readStringRequireUtf8();
4924                 bitField0_ |= 0x00000080;
4925                 break;
4926               } // case 50
4927             case 58:
4928               {
4929                 java.lang.String s = input.readStringRequireUtf8();
4930                 ensureCategoriesIsMutable();
4931                 categories_.add(s);
4932                 break;
4933               } // case 58
4934             case 66:
4935               {
4936                 title_ = input.readStringRequireUtf8();
4937                 bitField0_ |= 0x00000200;
4938                 break;
4939               } // case 66
4940             case 74:
4941               {
4942                 java.lang.String s = input.readStringRequireUtf8();
4943                 ensureBrandsIsMutable();
4944                 brands_.add(s);
4945                 break;
4946               } // case 74
4947             case 82:
4948               {
4949                 description_ = input.readStringRequireUtf8();
4950                 bitField0_ |= 0x00000800;
4951                 break;
4952               } // case 82
4953             case 90:
4954               {
4955                 languageCode_ = input.readStringRequireUtf8();
4956                 bitField0_ |= 0x00001000;
4957                 break;
4958               } // case 90
4959             case 98:
4960               {
4961                 com.google.protobuf.MapEntry<
4962                         java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
4963                     attributes__ =
4964                         input.readMessage(
4965                             AttributesDefaultEntryHolder.defaultEntry.getParserForType(),
4966                             extensionRegistry);
4967                 internalGetMutableAttributes()
4968                     .getMutableMap()
4969                     .put(attributes__.getKey(), attributes__.getValue());
4970                 bitField0_ |= 0x00002000;
4971                 break;
4972               } // case 98
4973             case 106:
4974               {
4975                 java.lang.String s = input.readStringRequireUtf8();
4976                 ensureTagsIsMutable();
4977                 tags_.add(s);
4978                 break;
4979               } // case 106
4980             case 114:
4981               {
4982                 input.readMessage(getPriceInfoFieldBuilder().getBuilder(), extensionRegistry);
4983                 bitField0_ |= 0x00008000;
4984                 break;
4985               } // case 114
4986             case 122:
4987               {
4988                 input.readMessage(getRatingFieldBuilder().getBuilder(), extensionRegistry);
4989                 bitField0_ |= 0x00010000;
4990                 break;
4991               } // case 122
4992             case 130:
4993               {
4994                 input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry);
4995                 expirationCase_ = 16;
4996                 break;
4997               } // case 130
4998             case 138:
4999               {
5000                 input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry);
5001                 expirationCase_ = 17;
5002                 break;
5003               } // case 138
5004             case 146:
5005               {
5006                 input.readMessage(getAvailableTimeFieldBuilder().getBuilder(), extensionRegistry);
5007                 bitField0_ |= 0x00020000;
5008                 break;
5009               } // case 146
5010             case 152:
5011               {
5012                 availability_ = input.readEnum();
5013                 bitField0_ |= 0x00040000;
5014                 break;
5015               } // case 152
5016             case 162:
5017               {
5018                 input.readMessage(
5019                     getAvailableQuantityFieldBuilder().getBuilder(), extensionRegistry);
5020                 bitField0_ |= 0x00080000;
5021                 break;
5022               } // case 162
5023             case 170:
5024               {
5025                 com.google.cloud.retail.v2.FulfillmentInfo m =
5026                     input.readMessage(
5027                         com.google.cloud.retail.v2.FulfillmentInfo.parser(), extensionRegistry);
5028                 if (fulfillmentInfoBuilder_ == null) {
5029                   ensureFulfillmentInfoIsMutable();
5030                   fulfillmentInfo_.add(m);
5031                 } else {
5032                   fulfillmentInfoBuilder_.addMessage(m);
5033                 }
5034                 break;
5035               } // case 170
5036             case 178:
5037               {
5038                 uri_ = input.readStringRequireUtf8();
5039                 bitField0_ |= 0x00200000;
5040                 break;
5041               } // case 178
5042             case 186:
5043               {
5044                 com.google.cloud.retail.v2.Image m =
5045                     input.readMessage(com.google.cloud.retail.v2.Image.parser(), extensionRegistry);
5046                 if (imagesBuilder_ == null) {
5047                   ensureImagesIsMutable();
5048                   images_.add(m);
5049                 } else {
5050                   imagesBuilder_.addMessage(m);
5051                 }
5052                 break;
5053               } // case 186
5054             case 194:
5055               {
5056                 input.readMessage(getAudienceFieldBuilder().getBuilder(), extensionRegistry);
5057                 bitField0_ |= 0x00800000;
5058                 break;
5059               } // case 194
5060             case 202:
5061               {
5062                 input.readMessage(getColorInfoFieldBuilder().getBuilder(), extensionRegistry);
5063                 bitField0_ |= 0x01000000;
5064                 break;
5065               } // case 202
5066             case 210:
5067               {
5068                 java.lang.String s = input.readStringRequireUtf8();
5069                 ensureSizesIsMutable();
5070                 sizes_.add(s);
5071                 break;
5072               } // case 210
5073             case 218:
5074               {
5075                 java.lang.String s = input.readStringRequireUtf8();
5076                 ensureMaterialsIsMutable();
5077                 materials_.add(s);
5078                 break;
5079               } // case 218
5080             case 226:
5081               {
5082                 java.lang.String s = input.readStringRequireUtf8();
5083                 ensurePatternsIsMutable();
5084                 patterns_.add(s);
5085                 break;
5086               } // case 226
5087             case 234:
5088               {
5089                 java.lang.String s = input.readStringRequireUtf8();
5090                 ensureConditionsIsMutable();
5091                 conditions_.add(s);
5092                 break;
5093               } // case 234
5094             case 242:
5095               {
5096                 input.readMessage(
5097                     getRetrievableFieldsFieldBuilder().getBuilder(), extensionRegistry);
5098                 bitField0_ |= 0x80000000;
5099                 break;
5100               } // case 242
5101             case 250:
5102               {
5103                 com.google.cloud.retail.v2.Product m =
5104                     input.readMessage(
5105                         com.google.cloud.retail.v2.Product.parser(), extensionRegistry);
5106                 if (variantsBuilder_ == null) {
5107                   ensureVariantsIsMutable();
5108                   variants_.add(m);
5109                 } else {
5110                   variantsBuilder_.addMessage(m);
5111                 }
5112                 break;
5113               } // case 250
5114             case 266:
5115               {
5116                 input.readMessage(getPublishTimeFieldBuilder().getBuilder(), extensionRegistry);
5117                 bitField0_ |= 0x40000000;
5118                 break;
5119               } // case 266
5120             case 274:
5121               {
5122                 com.google.cloud.retail.v2.Promotion m =
5123                     input.readMessage(
5124                         com.google.cloud.retail.v2.Promotion.parser(), extensionRegistry);
5125                 if (promotionsBuilder_ == null) {
5126                   ensurePromotionsIsMutable();
5127                   promotions_.add(m);
5128                 } else {
5129                   promotionsBuilder_.addMessage(m);
5130                 }
5131                 break;
5132               } // case 274
5133             case 282:
5134               {
5135                 com.google.cloud.retail.v2.LocalInventory m =
5136                     input.readMessage(
5137                         com.google.cloud.retail.v2.LocalInventory.parser(), extensionRegistry);
5138                 if (localInventoriesBuilder_ == null) {
5139                   ensureLocalInventoriesIsMutable();
5140                   localInventories_.add(m);
5141                 } else {
5142                   localInventoriesBuilder_.addMessage(m);
5143                 }
5144                 break;
5145               } // case 282
5146             default:
5147               {
5148                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
5149                   done = true; // was an endgroup tag
5150                 }
5151                 break;
5152               } // default:
5153           } // switch (tag)
5154         } // while (!done)
5155       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5156         throw e.unwrapIOException();
5157       } finally {
5158         onChanged();
5159       } // finally
5160       return this;
5161     }
5162 
5163     private int expirationCase_ = 0;
5164     private java.lang.Object expiration_;
5165 
getExpirationCase()5166     public ExpirationCase getExpirationCase() {
5167       return ExpirationCase.forNumber(expirationCase_);
5168     }
5169 
clearExpiration()5170     public Builder clearExpiration() {
5171       expirationCase_ = 0;
5172       expiration_ = null;
5173       onChanged();
5174       return this;
5175     }
5176 
5177     private int bitField0_;
5178     private int bitField1_;
5179 
5180     private com.google.protobuf.SingleFieldBuilderV3<
5181             com.google.protobuf.Timestamp,
5182             com.google.protobuf.Timestamp.Builder,
5183             com.google.protobuf.TimestampOrBuilder>
5184         expireTimeBuilder_;
5185     /**
5186      *
5187      *
5188      * <pre>
5189      * The timestamp when this product becomes unavailable for
5190      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
5191      * that this is only applicable to
5192      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
5193      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
5194      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
5195      * In general, we suggest the users to delete the stale products explicitly,
5196      * instead of using this field to determine staleness.
5197      * If it is set, the [Product][google.cloud.retail.v2.Product] is not
5198      * available for
5199      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5200      * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
5201      * product can still be retrieved by
5202      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5203      * and
5204      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5205      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
5206      * than [available_time][google.cloud.retail.v2.Product.available_time] and
5207      * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
5208      * INVALID_ARGUMENT error is thrown.
5209      * Corresponding properties: Google Merchant Center property
5210      * [expiration_date](https://support.google.com/merchants/answer/6324499).
5211      * </pre>
5212      *
5213      * <code>.google.protobuf.Timestamp expire_time = 16;</code>
5214      *
5215      * @return Whether the expireTime field is set.
5216      */
5217     @java.lang.Override
hasExpireTime()5218     public boolean hasExpireTime() {
5219       return expirationCase_ == 16;
5220     }
5221     /**
5222      *
5223      *
5224      * <pre>
5225      * The timestamp when this product becomes unavailable for
5226      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
5227      * that this is only applicable to
5228      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
5229      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
5230      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
5231      * In general, we suggest the users to delete the stale products explicitly,
5232      * instead of using this field to determine staleness.
5233      * If it is set, the [Product][google.cloud.retail.v2.Product] is not
5234      * available for
5235      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5236      * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
5237      * product can still be retrieved by
5238      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5239      * and
5240      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5241      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
5242      * than [available_time][google.cloud.retail.v2.Product.available_time] and
5243      * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
5244      * INVALID_ARGUMENT error is thrown.
5245      * Corresponding properties: Google Merchant Center property
5246      * [expiration_date](https://support.google.com/merchants/answer/6324499).
5247      * </pre>
5248      *
5249      * <code>.google.protobuf.Timestamp expire_time = 16;</code>
5250      *
5251      * @return The expireTime.
5252      */
5253     @java.lang.Override
getExpireTime()5254     public com.google.protobuf.Timestamp getExpireTime() {
5255       if (expireTimeBuilder_ == null) {
5256         if (expirationCase_ == 16) {
5257           return (com.google.protobuf.Timestamp) expiration_;
5258         }
5259         return com.google.protobuf.Timestamp.getDefaultInstance();
5260       } else {
5261         if (expirationCase_ == 16) {
5262           return expireTimeBuilder_.getMessage();
5263         }
5264         return com.google.protobuf.Timestamp.getDefaultInstance();
5265       }
5266     }
5267     /**
5268      *
5269      *
5270      * <pre>
5271      * The timestamp when this product becomes unavailable for
5272      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
5273      * that this is only applicable to
5274      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
5275      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
5276      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
5277      * In general, we suggest the users to delete the stale products explicitly,
5278      * instead of using this field to determine staleness.
5279      * If it is set, the [Product][google.cloud.retail.v2.Product] is not
5280      * available for
5281      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5282      * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
5283      * product can still be retrieved by
5284      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5285      * and
5286      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5287      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
5288      * than [available_time][google.cloud.retail.v2.Product.available_time] and
5289      * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
5290      * INVALID_ARGUMENT error is thrown.
5291      * Corresponding properties: Google Merchant Center property
5292      * [expiration_date](https://support.google.com/merchants/answer/6324499).
5293      * </pre>
5294      *
5295      * <code>.google.protobuf.Timestamp expire_time = 16;</code>
5296      */
setExpireTime(com.google.protobuf.Timestamp value)5297     public Builder setExpireTime(com.google.protobuf.Timestamp value) {
5298       if (expireTimeBuilder_ == null) {
5299         if (value == null) {
5300           throw new NullPointerException();
5301         }
5302         expiration_ = value;
5303         onChanged();
5304       } else {
5305         expireTimeBuilder_.setMessage(value);
5306       }
5307       expirationCase_ = 16;
5308       return this;
5309     }
5310     /**
5311      *
5312      *
5313      * <pre>
5314      * The timestamp when this product becomes unavailable for
5315      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
5316      * that this is only applicable to
5317      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
5318      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
5319      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
5320      * In general, we suggest the users to delete the stale products explicitly,
5321      * instead of using this field to determine staleness.
5322      * If it is set, the [Product][google.cloud.retail.v2.Product] is not
5323      * available for
5324      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5325      * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
5326      * product can still be retrieved by
5327      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5328      * and
5329      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5330      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
5331      * than [available_time][google.cloud.retail.v2.Product.available_time] and
5332      * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
5333      * INVALID_ARGUMENT error is thrown.
5334      * Corresponding properties: Google Merchant Center property
5335      * [expiration_date](https://support.google.com/merchants/answer/6324499).
5336      * </pre>
5337      *
5338      * <code>.google.protobuf.Timestamp expire_time = 16;</code>
5339      */
setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue)5340     public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) {
5341       if (expireTimeBuilder_ == null) {
5342         expiration_ = builderForValue.build();
5343         onChanged();
5344       } else {
5345         expireTimeBuilder_.setMessage(builderForValue.build());
5346       }
5347       expirationCase_ = 16;
5348       return this;
5349     }
5350     /**
5351      *
5352      *
5353      * <pre>
5354      * The timestamp when this product becomes unavailable for
5355      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
5356      * that this is only applicable to
5357      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
5358      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
5359      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
5360      * In general, we suggest the users to delete the stale products explicitly,
5361      * instead of using this field to determine staleness.
5362      * If it is set, the [Product][google.cloud.retail.v2.Product] is not
5363      * available for
5364      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5365      * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
5366      * product can still be retrieved by
5367      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5368      * and
5369      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5370      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
5371      * than [available_time][google.cloud.retail.v2.Product.available_time] and
5372      * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
5373      * INVALID_ARGUMENT error is thrown.
5374      * Corresponding properties: Google Merchant Center property
5375      * [expiration_date](https://support.google.com/merchants/answer/6324499).
5376      * </pre>
5377      *
5378      * <code>.google.protobuf.Timestamp expire_time = 16;</code>
5379      */
mergeExpireTime(com.google.protobuf.Timestamp value)5380     public Builder mergeExpireTime(com.google.protobuf.Timestamp value) {
5381       if (expireTimeBuilder_ == null) {
5382         if (expirationCase_ == 16
5383             && expiration_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
5384           expiration_ =
5385               com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) expiration_)
5386                   .mergeFrom(value)
5387                   .buildPartial();
5388         } else {
5389           expiration_ = value;
5390         }
5391         onChanged();
5392       } else {
5393         if (expirationCase_ == 16) {
5394           expireTimeBuilder_.mergeFrom(value);
5395         } else {
5396           expireTimeBuilder_.setMessage(value);
5397         }
5398       }
5399       expirationCase_ = 16;
5400       return this;
5401     }
5402     /**
5403      *
5404      *
5405      * <pre>
5406      * The timestamp when this product becomes unavailable for
5407      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
5408      * that this is only applicable to
5409      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
5410      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
5411      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
5412      * In general, we suggest the users to delete the stale products explicitly,
5413      * instead of using this field to determine staleness.
5414      * If it is set, the [Product][google.cloud.retail.v2.Product] is not
5415      * available for
5416      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5417      * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
5418      * product can still be retrieved by
5419      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5420      * and
5421      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5422      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
5423      * than [available_time][google.cloud.retail.v2.Product.available_time] and
5424      * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
5425      * INVALID_ARGUMENT error is thrown.
5426      * Corresponding properties: Google Merchant Center property
5427      * [expiration_date](https://support.google.com/merchants/answer/6324499).
5428      * </pre>
5429      *
5430      * <code>.google.protobuf.Timestamp expire_time = 16;</code>
5431      */
clearExpireTime()5432     public Builder clearExpireTime() {
5433       if (expireTimeBuilder_ == null) {
5434         if (expirationCase_ == 16) {
5435           expirationCase_ = 0;
5436           expiration_ = null;
5437           onChanged();
5438         }
5439       } else {
5440         if (expirationCase_ == 16) {
5441           expirationCase_ = 0;
5442           expiration_ = null;
5443         }
5444         expireTimeBuilder_.clear();
5445       }
5446       return this;
5447     }
5448     /**
5449      *
5450      *
5451      * <pre>
5452      * The timestamp when this product becomes unavailable for
5453      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
5454      * that this is only applicable to
5455      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
5456      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
5457      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
5458      * In general, we suggest the users to delete the stale products explicitly,
5459      * instead of using this field to determine staleness.
5460      * If it is set, the [Product][google.cloud.retail.v2.Product] is not
5461      * available for
5462      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5463      * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
5464      * product can still be retrieved by
5465      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5466      * and
5467      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5468      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
5469      * than [available_time][google.cloud.retail.v2.Product.available_time] and
5470      * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
5471      * INVALID_ARGUMENT error is thrown.
5472      * Corresponding properties: Google Merchant Center property
5473      * [expiration_date](https://support.google.com/merchants/answer/6324499).
5474      * </pre>
5475      *
5476      * <code>.google.protobuf.Timestamp expire_time = 16;</code>
5477      */
getExpireTimeBuilder()5478     public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() {
5479       return getExpireTimeFieldBuilder().getBuilder();
5480     }
5481     /**
5482      *
5483      *
5484      * <pre>
5485      * The timestamp when this product becomes unavailable for
5486      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
5487      * that this is only applicable to
5488      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
5489      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
5490      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
5491      * In general, we suggest the users to delete the stale products explicitly,
5492      * instead of using this field to determine staleness.
5493      * If it is set, the [Product][google.cloud.retail.v2.Product] is not
5494      * available for
5495      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5496      * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
5497      * product can still be retrieved by
5498      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5499      * and
5500      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5501      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
5502      * than [available_time][google.cloud.retail.v2.Product.available_time] and
5503      * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
5504      * INVALID_ARGUMENT error is thrown.
5505      * Corresponding properties: Google Merchant Center property
5506      * [expiration_date](https://support.google.com/merchants/answer/6324499).
5507      * </pre>
5508      *
5509      * <code>.google.protobuf.Timestamp expire_time = 16;</code>
5510      */
5511     @java.lang.Override
getExpireTimeOrBuilder()5512     public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() {
5513       if ((expirationCase_ == 16) && (expireTimeBuilder_ != null)) {
5514         return expireTimeBuilder_.getMessageOrBuilder();
5515       } else {
5516         if (expirationCase_ == 16) {
5517           return (com.google.protobuf.Timestamp) expiration_;
5518         }
5519         return com.google.protobuf.Timestamp.getDefaultInstance();
5520       }
5521     }
5522     /**
5523      *
5524      *
5525      * <pre>
5526      * The timestamp when this product becomes unavailable for
5527      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
5528      * that this is only applicable to
5529      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
5530      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
5531      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
5532      * In general, we suggest the users to delete the stale products explicitly,
5533      * instead of using this field to determine staleness.
5534      * If it is set, the [Product][google.cloud.retail.v2.Product] is not
5535      * available for
5536      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5537      * [expire_time][google.cloud.retail.v2.Product.expire_time]. However, the
5538      * product can still be retrieved by
5539      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5540      * and
5541      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5542      * [expire_time][google.cloud.retail.v2.Product.expire_time] must be later
5543      * than [available_time][google.cloud.retail.v2.Product.available_time] and
5544      * [publish_time][google.cloud.retail.v2.Product.publish_time], otherwise an
5545      * INVALID_ARGUMENT error is thrown.
5546      * Corresponding properties: Google Merchant Center property
5547      * [expiration_date](https://support.google.com/merchants/answer/6324499).
5548      * </pre>
5549      *
5550      * <code>.google.protobuf.Timestamp expire_time = 16;</code>
5551      */
5552     private com.google.protobuf.SingleFieldBuilderV3<
5553             com.google.protobuf.Timestamp,
5554             com.google.protobuf.Timestamp.Builder,
5555             com.google.protobuf.TimestampOrBuilder>
getExpireTimeFieldBuilder()5556         getExpireTimeFieldBuilder() {
5557       if (expireTimeBuilder_ == null) {
5558         if (!(expirationCase_ == 16)) {
5559           expiration_ = com.google.protobuf.Timestamp.getDefaultInstance();
5560         }
5561         expireTimeBuilder_ =
5562             new com.google.protobuf.SingleFieldBuilderV3<
5563                 com.google.protobuf.Timestamp,
5564                 com.google.protobuf.Timestamp.Builder,
5565                 com.google.protobuf.TimestampOrBuilder>(
5566                 (com.google.protobuf.Timestamp) expiration_, getParentForChildren(), isClean());
5567         expiration_ = null;
5568       }
5569       expirationCase_ = 16;
5570       onChanged();
5571       return expireTimeBuilder_;
5572     }
5573 
5574     private com.google.protobuf.SingleFieldBuilderV3<
5575             com.google.protobuf.Duration,
5576             com.google.protobuf.Duration.Builder,
5577             com.google.protobuf.DurationOrBuilder>
5578         ttlBuilder_;
5579     /**
5580      *
5581      *
5582      * <pre>
5583      * Input only. The TTL (time to live) of the product. Note that this is only
5584      * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
5585      * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
5586      * and ignored for
5587      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
5588      * we suggest the users to delete the stale products explicitly, instead of
5589      * using this field to determine staleness.
5590      * If it is set, it must be a non-negative value, and
5591      * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
5592      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
5593      * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
5594      * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
5595      * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
5596      * If it is set, the product is not available for
5597      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5598      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
5599      * However, the product can still be retrieved by
5600      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5601      * and
5602      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5603      * </pre>
5604      *
5605      * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
5606      *
5607      * @return Whether the ttl field is set.
5608      */
5609     @java.lang.Override
hasTtl()5610     public boolean hasTtl() {
5611       return expirationCase_ == 17;
5612     }
5613     /**
5614      *
5615      *
5616      * <pre>
5617      * Input only. The TTL (time to live) of the product. Note that this is only
5618      * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
5619      * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
5620      * and ignored for
5621      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
5622      * we suggest the users to delete the stale products explicitly, instead of
5623      * using this field to determine staleness.
5624      * If it is set, it must be a non-negative value, and
5625      * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
5626      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
5627      * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
5628      * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
5629      * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
5630      * If it is set, the product is not available for
5631      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5632      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
5633      * However, the product can still be retrieved by
5634      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5635      * and
5636      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5637      * </pre>
5638      *
5639      * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
5640      *
5641      * @return The ttl.
5642      */
5643     @java.lang.Override
getTtl()5644     public com.google.protobuf.Duration getTtl() {
5645       if (ttlBuilder_ == null) {
5646         if (expirationCase_ == 17) {
5647           return (com.google.protobuf.Duration) expiration_;
5648         }
5649         return com.google.protobuf.Duration.getDefaultInstance();
5650       } else {
5651         if (expirationCase_ == 17) {
5652           return ttlBuilder_.getMessage();
5653         }
5654         return com.google.protobuf.Duration.getDefaultInstance();
5655       }
5656     }
5657     /**
5658      *
5659      *
5660      * <pre>
5661      * Input only. The TTL (time to live) of the product. Note that this is only
5662      * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
5663      * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
5664      * and ignored for
5665      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
5666      * we suggest the users to delete the stale products explicitly, instead of
5667      * using this field to determine staleness.
5668      * If it is set, it must be a non-negative value, and
5669      * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
5670      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
5671      * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
5672      * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
5673      * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
5674      * If it is set, the product is not available for
5675      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5676      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
5677      * However, the product can still be retrieved by
5678      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5679      * and
5680      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5681      * </pre>
5682      *
5683      * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
5684      */
setTtl(com.google.protobuf.Duration value)5685     public Builder setTtl(com.google.protobuf.Duration value) {
5686       if (ttlBuilder_ == null) {
5687         if (value == null) {
5688           throw new NullPointerException();
5689         }
5690         expiration_ = value;
5691         onChanged();
5692       } else {
5693         ttlBuilder_.setMessage(value);
5694       }
5695       expirationCase_ = 17;
5696       return this;
5697     }
5698     /**
5699      *
5700      *
5701      * <pre>
5702      * Input only. The TTL (time to live) of the product. Note that this is only
5703      * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
5704      * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
5705      * and ignored for
5706      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
5707      * we suggest the users to delete the stale products explicitly, instead of
5708      * using this field to determine staleness.
5709      * If it is set, it must be a non-negative value, and
5710      * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
5711      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
5712      * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
5713      * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
5714      * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
5715      * If it is set, the product is not available for
5716      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5717      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
5718      * However, the product can still be retrieved by
5719      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5720      * and
5721      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5722      * </pre>
5723      *
5724      * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
5725      */
setTtl(com.google.protobuf.Duration.Builder builderForValue)5726     public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) {
5727       if (ttlBuilder_ == null) {
5728         expiration_ = builderForValue.build();
5729         onChanged();
5730       } else {
5731         ttlBuilder_.setMessage(builderForValue.build());
5732       }
5733       expirationCase_ = 17;
5734       return this;
5735     }
5736     /**
5737      *
5738      *
5739      * <pre>
5740      * Input only. The TTL (time to live) of the product. Note that this is only
5741      * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
5742      * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
5743      * and ignored for
5744      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
5745      * we suggest the users to delete the stale products explicitly, instead of
5746      * using this field to determine staleness.
5747      * If it is set, it must be a non-negative value, and
5748      * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
5749      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
5750      * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
5751      * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
5752      * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
5753      * If it is set, the product is not available for
5754      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5755      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
5756      * However, the product can still be retrieved by
5757      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5758      * and
5759      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5760      * </pre>
5761      *
5762      * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
5763      */
mergeTtl(com.google.protobuf.Duration value)5764     public Builder mergeTtl(com.google.protobuf.Duration value) {
5765       if (ttlBuilder_ == null) {
5766         if (expirationCase_ == 17
5767             && expiration_ != com.google.protobuf.Duration.getDefaultInstance()) {
5768           expiration_ =
5769               com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) expiration_)
5770                   .mergeFrom(value)
5771                   .buildPartial();
5772         } else {
5773           expiration_ = value;
5774         }
5775         onChanged();
5776       } else {
5777         if (expirationCase_ == 17) {
5778           ttlBuilder_.mergeFrom(value);
5779         } else {
5780           ttlBuilder_.setMessage(value);
5781         }
5782       }
5783       expirationCase_ = 17;
5784       return this;
5785     }
5786     /**
5787      *
5788      *
5789      * <pre>
5790      * Input only. The TTL (time to live) of the product. Note that this is only
5791      * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
5792      * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
5793      * and ignored for
5794      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
5795      * we suggest the users to delete the stale products explicitly, instead of
5796      * using this field to determine staleness.
5797      * If it is set, it must be a non-negative value, and
5798      * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
5799      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
5800      * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
5801      * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
5802      * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
5803      * If it is set, the product is not available for
5804      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5805      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
5806      * However, the product can still be retrieved by
5807      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5808      * and
5809      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5810      * </pre>
5811      *
5812      * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
5813      */
clearTtl()5814     public Builder clearTtl() {
5815       if (ttlBuilder_ == null) {
5816         if (expirationCase_ == 17) {
5817           expirationCase_ = 0;
5818           expiration_ = null;
5819           onChanged();
5820         }
5821       } else {
5822         if (expirationCase_ == 17) {
5823           expirationCase_ = 0;
5824           expiration_ = null;
5825         }
5826         ttlBuilder_.clear();
5827       }
5828       return this;
5829     }
5830     /**
5831      *
5832      *
5833      * <pre>
5834      * Input only. The TTL (time to live) of the product. Note that this is only
5835      * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
5836      * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
5837      * and ignored for
5838      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
5839      * we suggest the users to delete the stale products explicitly, instead of
5840      * using this field to determine staleness.
5841      * If it is set, it must be a non-negative value, and
5842      * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
5843      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
5844      * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
5845      * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
5846      * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
5847      * If it is set, the product is not available for
5848      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5849      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
5850      * However, the product can still be retrieved by
5851      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5852      * and
5853      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5854      * </pre>
5855      *
5856      * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
5857      */
getTtlBuilder()5858     public com.google.protobuf.Duration.Builder getTtlBuilder() {
5859       return getTtlFieldBuilder().getBuilder();
5860     }
5861     /**
5862      *
5863      *
5864      * <pre>
5865      * Input only. The TTL (time to live) of the product. Note that this is only
5866      * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
5867      * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
5868      * and ignored for
5869      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
5870      * we suggest the users to delete the stale products explicitly, instead of
5871      * using this field to determine staleness.
5872      * If it is set, it must be a non-negative value, and
5873      * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
5874      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
5875      * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
5876      * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
5877      * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
5878      * If it is set, the product is not available for
5879      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5880      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
5881      * However, the product can still be retrieved by
5882      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5883      * and
5884      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5885      * </pre>
5886      *
5887      * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
5888      */
5889     @java.lang.Override
getTtlOrBuilder()5890     public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
5891       if ((expirationCase_ == 17) && (ttlBuilder_ != null)) {
5892         return ttlBuilder_.getMessageOrBuilder();
5893       } else {
5894         if (expirationCase_ == 17) {
5895           return (com.google.protobuf.Duration) expiration_;
5896         }
5897         return com.google.protobuf.Duration.getDefaultInstance();
5898       }
5899     }
5900     /**
5901      *
5902      *
5903      * <pre>
5904      * Input only. The TTL (time to live) of the product. Note that this is only
5905      * applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
5906      * and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION],
5907      * and ignored for
5908      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general,
5909      * we suggest the users to delete the stale products explicitly, instead of
5910      * using this field to determine staleness.
5911      * If it is set, it must be a non-negative value, and
5912      * [expire_time][google.cloud.retail.v2.Product.expire_time] is set as
5913      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl]. The
5914      * derived [expire_time][google.cloud.retail.v2.Product.expire_time] is
5915      * returned in the output and [ttl][google.cloud.retail.v2.Product.ttl] is
5916      * left blank when retrieving the [Product][google.cloud.retail.v2.Product].
5917      * If it is set, the product is not available for
5918      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search] after
5919      * current timestamp plus [ttl][google.cloud.retail.v2.Product.ttl].
5920      * However, the product can still be retrieved by
5921      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
5922      * and
5923      * [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
5924      * </pre>
5925      *
5926      * <code>.google.protobuf.Duration ttl = 17 [(.google.api.field_behavior) = INPUT_ONLY];</code>
5927      */
5928     private com.google.protobuf.SingleFieldBuilderV3<
5929             com.google.protobuf.Duration,
5930             com.google.protobuf.Duration.Builder,
5931             com.google.protobuf.DurationOrBuilder>
getTtlFieldBuilder()5932         getTtlFieldBuilder() {
5933       if (ttlBuilder_ == null) {
5934         if (!(expirationCase_ == 17)) {
5935           expiration_ = com.google.protobuf.Duration.getDefaultInstance();
5936         }
5937         ttlBuilder_ =
5938             new com.google.protobuf.SingleFieldBuilderV3<
5939                 com.google.protobuf.Duration,
5940                 com.google.protobuf.Duration.Builder,
5941                 com.google.protobuf.DurationOrBuilder>(
5942                 (com.google.protobuf.Duration) expiration_, getParentForChildren(), isClean());
5943         expiration_ = null;
5944       }
5945       expirationCase_ = 17;
5946       onChanged();
5947       return ttlBuilder_;
5948     }
5949 
5950     private java.lang.Object name_ = "";
5951     /**
5952      *
5953      *
5954      * <pre>
5955      * Immutable. Full resource name of the product, such as
5956      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
5957      * </pre>
5958      *
5959      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
5960      *
5961      * @return The name.
5962      */
getName()5963     public java.lang.String getName() {
5964       java.lang.Object ref = name_;
5965       if (!(ref instanceof java.lang.String)) {
5966         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
5967         java.lang.String s = bs.toStringUtf8();
5968         name_ = s;
5969         return s;
5970       } else {
5971         return (java.lang.String) ref;
5972       }
5973     }
5974     /**
5975      *
5976      *
5977      * <pre>
5978      * Immutable. Full resource name of the product, such as
5979      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
5980      * </pre>
5981      *
5982      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
5983      *
5984      * @return The bytes for name.
5985      */
getNameBytes()5986     public com.google.protobuf.ByteString getNameBytes() {
5987       java.lang.Object ref = name_;
5988       if (ref instanceof String) {
5989         com.google.protobuf.ByteString b =
5990             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
5991         name_ = b;
5992         return b;
5993       } else {
5994         return (com.google.protobuf.ByteString) ref;
5995       }
5996     }
5997     /**
5998      *
5999      *
6000      * <pre>
6001      * Immutable. Full resource name of the product, such as
6002      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
6003      * </pre>
6004      *
6005      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
6006      *
6007      * @param value The name to set.
6008      * @return This builder for chaining.
6009      */
setName(java.lang.String value)6010     public Builder setName(java.lang.String value) {
6011       if (value == null) {
6012         throw new NullPointerException();
6013       }
6014       name_ = value;
6015       bitField0_ |= 0x00000004;
6016       onChanged();
6017       return this;
6018     }
6019     /**
6020      *
6021      *
6022      * <pre>
6023      * Immutable. Full resource name of the product, such as
6024      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
6025      * </pre>
6026      *
6027      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
6028      *
6029      * @return This builder for chaining.
6030      */
clearName()6031     public Builder clearName() {
6032       name_ = getDefaultInstance().getName();
6033       bitField0_ = (bitField0_ & ~0x00000004);
6034       onChanged();
6035       return this;
6036     }
6037     /**
6038      *
6039      *
6040      * <pre>
6041      * Immutable. Full resource name of the product, such as
6042      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
6043      * </pre>
6044      *
6045      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
6046      *
6047      * @param value The bytes for name to set.
6048      * @return This builder for chaining.
6049      */
setNameBytes(com.google.protobuf.ByteString value)6050     public Builder setNameBytes(com.google.protobuf.ByteString value) {
6051       if (value == null) {
6052         throw new NullPointerException();
6053       }
6054       checkByteStringIsUtf8(value);
6055       name_ = value;
6056       bitField0_ |= 0x00000004;
6057       onChanged();
6058       return this;
6059     }
6060 
6061     private java.lang.Object id_ = "";
6062     /**
6063      *
6064      *
6065      * <pre>
6066      * Immutable. [Product][google.cloud.retail.v2.Product] identifier, which is
6067      * the final component of [name][google.cloud.retail.v2.Product.name]. For
6068      * example, this field is "id_1", if
6069      * [name][google.cloud.retail.v2.Product.name] is
6070      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`.
6071      * This field must be a UTF-8 encoded string with a length limit of 128
6072      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6073      * Corresponding properties: Google Merchant Center property
6074      * [id](https://support.google.com/merchants/answer/6324405). Schema.org
6075      * property [Product.sku](https://schema.org/sku).
6076      * </pre>
6077      *
6078      * <code>string id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
6079      *
6080      * @return The id.
6081      */
getId()6082     public java.lang.String getId() {
6083       java.lang.Object ref = id_;
6084       if (!(ref instanceof java.lang.String)) {
6085         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
6086         java.lang.String s = bs.toStringUtf8();
6087         id_ = s;
6088         return s;
6089       } else {
6090         return (java.lang.String) ref;
6091       }
6092     }
6093     /**
6094      *
6095      *
6096      * <pre>
6097      * Immutable. [Product][google.cloud.retail.v2.Product] identifier, which is
6098      * the final component of [name][google.cloud.retail.v2.Product.name]. For
6099      * example, this field is "id_1", if
6100      * [name][google.cloud.retail.v2.Product.name] is
6101      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`.
6102      * This field must be a UTF-8 encoded string with a length limit of 128
6103      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6104      * Corresponding properties: Google Merchant Center property
6105      * [id](https://support.google.com/merchants/answer/6324405). Schema.org
6106      * property [Product.sku](https://schema.org/sku).
6107      * </pre>
6108      *
6109      * <code>string id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
6110      *
6111      * @return The bytes for id.
6112      */
getIdBytes()6113     public com.google.protobuf.ByteString getIdBytes() {
6114       java.lang.Object ref = id_;
6115       if (ref instanceof String) {
6116         com.google.protobuf.ByteString b =
6117             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
6118         id_ = b;
6119         return b;
6120       } else {
6121         return (com.google.protobuf.ByteString) ref;
6122       }
6123     }
6124     /**
6125      *
6126      *
6127      * <pre>
6128      * Immutable. [Product][google.cloud.retail.v2.Product] identifier, which is
6129      * the final component of [name][google.cloud.retail.v2.Product.name]. For
6130      * example, this field is "id_1", if
6131      * [name][google.cloud.retail.v2.Product.name] is
6132      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`.
6133      * This field must be a UTF-8 encoded string with a length limit of 128
6134      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6135      * Corresponding properties: Google Merchant Center property
6136      * [id](https://support.google.com/merchants/answer/6324405). Schema.org
6137      * property [Product.sku](https://schema.org/sku).
6138      * </pre>
6139      *
6140      * <code>string id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
6141      *
6142      * @param value The id to set.
6143      * @return This builder for chaining.
6144      */
setId(java.lang.String value)6145     public Builder setId(java.lang.String value) {
6146       if (value == null) {
6147         throw new NullPointerException();
6148       }
6149       id_ = value;
6150       bitField0_ |= 0x00000008;
6151       onChanged();
6152       return this;
6153     }
6154     /**
6155      *
6156      *
6157      * <pre>
6158      * Immutable. [Product][google.cloud.retail.v2.Product] identifier, which is
6159      * the final component of [name][google.cloud.retail.v2.Product.name]. For
6160      * example, this field is "id_1", if
6161      * [name][google.cloud.retail.v2.Product.name] is
6162      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`.
6163      * This field must be a UTF-8 encoded string with a length limit of 128
6164      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6165      * Corresponding properties: Google Merchant Center property
6166      * [id](https://support.google.com/merchants/answer/6324405). Schema.org
6167      * property [Product.sku](https://schema.org/sku).
6168      * </pre>
6169      *
6170      * <code>string id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
6171      *
6172      * @return This builder for chaining.
6173      */
clearId()6174     public Builder clearId() {
6175       id_ = getDefaultInstance().getId();
6176       bitField0_ = (bitField0_ & ~0x00000008);
6177       onChanged();
6178       return this;
6179     }
6180     /**
6181      *
6182      *
6183      * <pre>
6184      * Immutable. [Product][google.cloud.retail.v2.Product] identifier, which is
6185      * the final component of [name][google.cloud.retail.v2.Product.name]. For
6186      * example, this field is "id_1", if
6187      * [name][google.cloud.retail.v2.Product.name] is
6188      * `projects/&#42;&#47;locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`.
6189      * This field must be a UTF-8 encoded string with a length limit of 128
6190      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6191      * Corresponding properties: Google Merchant Center property
6192      * [id](https://support.google.com/merchants/answer/6324405). Schema.org
6193      * property [Product.sku](https://schema.org/sku).
6194      * </pre>
6195      *
6196      * <code>string id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
6197      *
6198      * @param value The bytes for id to set.
6199      * @return This builder for chaining.
6200      */
setIdBytes(com.google.protobuf.ByteString value)6201     public Builder setIdBytes(com.google.protobuf.ByteString value) {
6202       if (value == null) {
6203         throw new NullPointerException();
6204       }
6205       checkByteStringIsUtf8(value);
6206       id_ = value;
6207       bitField0_ |= 0x00000008;
6208       onChanged();
6209       return this;
6210     }
6211 
6212     private int type_ = 0;
6213     /**
6214      *
6215      *
6216      * <pre>
6217      * Immutable. The type of the product. Default to
6218      * [Catalog.product_level_config.ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
6219      * if unset.
6220      * </pre>
6221      *
6222      * <code>
6223      * .google.cloud.retail.v2.Product.Type type = 3 [(.google.api.field_behavior) = IMMUTABLE];
6224      * </code>
6225      *
6226      * @return The enum numeric value on the wire for type.
6227      */
6228     @java.lang.Override
getTypeValue()6229     public int getTypeValue() {
6230       return type_;
6231     }
6232     /**
6233      *
6234      *
6235      * <pre>
6236      * Immutable. The type of the product. Default to
6237      * [Catalog.product_level_config.ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
6238      * if unset.
6239      * </pre>
6240      *
6241      * <code>
6242      * .google.cloud.retail.v2.Product.Type type = 3 [(.google.api.field_behavior) = IMMUTABLE];
6243      * </code>
6244      *
6245      * @param value The enum numeric value on the wire for type to set.
6246      * @return This builder for chaining.
6247      */
setTypeValue(int value)6248     public Builder setTypeValue(int value) {
6249       type_ = value;
6250       bitField0_ |= 0x00000010;
6251       onChanged();
6252       return this;
6253     }
6254     /**
6255      *
6256      *
6257      * <pre>
6258      * Immutable. The type of the product. Default to
6259      * [Catalog.product_level_config.ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
6260      * if unset.
6261      * </pre>
6262      *
6263      * <code>
6264      * .google.cloud.retail.v2.Product.Type type = 3 [(.google.api.field_behavior) = IMMUTABLE];
6265      * </code>
6266      *
6267      * @return The type.
6268      */
6269     @java.lang.Override
getType()6270     public com.google.cloud.retail.v2.Product.Type getType() {
6271       com.google.cloud.retail.v2.Product.Type result =
6272           com.google.cloud.retail.v2.Product.Type.forNumber(type_);
6273       return result == null ? com.google.cloud.retail.v2.Product.Type.UNRECOGNIZED : result;
6274     }
6275     /**
6276      *
6277      *
6278      * <pre>
6279      * Immutable. The type of the product. Default to
6280      * [Catalog.product_level_config.ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
6281      * if unset.
6282      * </pre>
6283      *
6284      * <code>
6285      * .google.cloud.retail.v2.Product.Type type = 3 [(.google.api.field_behavior) = IMMUTABLE];
6286      * </code>
6287      *
6288      * @param value The type to set.
6289      * @return This builder for chaining.
6290      */
setType(com.google.cloud.retail.v2.Product.Type value)6291     public Builder setType(com.google.cloud.retail.v2.Product.Type value) {
6292       if (value == null) {
6293         throw new NullPointerException();
6294       }
6295       bitField0_ |= 0x00000010;
6296       type_ = value.getNumber();
6297       onChanged();
6298       return this;
6299     }
6300     /**
6301      *
6302      *
6303      * <pre>
6304      * Immutable. The type of the product. Default to
6305      * [Catalog.product_level_config.ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
6306      * if unset.
6307      * </pre>
6308      *
6309      * <code>
6310      * .google.cloud.retail.v2.Product.Type type = 3 [(.google.api.field_behavior) = IMMUTABLE];
6311      * </code>
6312      *
6313      * @return This builder for chaining.
6314      */
clearType()6315     public Builder clearType() {
6316       bitField0_ = (bitField0_ & ~0x00000010);
6317       type_ = 0;
6318       onChanged();
6319       return this;
6320     }
6321 
6322     private java.lang.Object primaryProductId_ = "";
6323     /**
6324      *
6325      *
6326      * <pre>
6327      * Variant group identifier. Must be an
6328      * [id][google.cloud.retail.v2.Product.id], with the same parent branch with
6329      * this product. Otherwise, an error is thrown.
6330      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6331      * [Product][google.cloud.retail.v2.Product]s, this field can only be empty or
6332      * set to the same value as [id][google.cloud.retail.v2.Product.id].
6333      * For VARIANT [Product][google.cloud.retail.v2.Product]s, this field cannot
6334      * be empty. A maximum of 2,000 products are allowed to share the same
6335      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6336      * [Product][google.cloud.retail.v2.Product]. Otherwise, an INVALID_ARGUMENT
6337      * error is returned.
6338      * Corresponding properties: Google Merchant Center property
6339      * [item_group_id](https://support.google.com/merchants/answer/6324507).
6340      * Schema.org property
6341      * [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
6342      * </pre>
6343      *
6344      * <code>string primary_product_id = 4;</code>
6345      *
6346      * @return The primaryProductId.
6347      */
getPrimaryProductId()6348     public java.lang.String getPrimaryProductId() {
6349       java.lang.Object ref = primaryProductId_;
6350       if (!(ref instanceof java.lang.String)) {
6351         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
6352         java.lang.String s = bs.toStringUtf8();
6353         primaryProductId_ = s;
6354         return s;
6355       } else {
6356         return (java.lang.String) ref;
6357       }
6358     }
6359     /**
6360      *
6361      *
6362      * <pre>
6363      * Variant group identifier. Must be an
6364      * [id][google.cloud.retail.v2.Product.id], with the same parent branch with
6365      * this product. Otherwise, an error is thrown.
6366      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6367      * [Product][google.cloud.retail.v2.Product]s, this field can only be empty or
6368      * set to the same value as [id][google.cloud.retail.v2.Product.id].
6369      * For VARIANT [Product][google.cloud.retail.v2.Product]s, this field cannot
6370      * be empty. A maximum of 2,000 products are allowed to share the same
6371      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6372      * [Product][google.cloud.retail.v2.Product]. Otherwise, an INVALID_ARGUMENT
6373      * error is returned.
6374      * Corresponding properties: Google Merchant Center property
6375      * [item_group_id](https://support.google.com/merchants/answer/6324507).
6376      * Schema.org property
6377      * [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
6378      * </pre>
6379      *
6380      * <code>string primary_product_id = 4;</code>
6381      *
6382      * @return The bytes for primaryProductId.
6383      */
getPrimaryProductIdBytes()6384     public com.google.protobuf.ByteString getPrimaryProductIdBytes() {
6385       java.lang.Object ref = primaryProductId_;
6386       if (ref instanceof String) {
6387         com.google.protobuf.ByteString b =
6388             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
6389         primaryProductId_ = b;
6390         return b;
6391       } else {
6392         return (com.google.protobuf.ByteString) ref;
6393       }
6394     }
6395     /**
6396      *
6397      *
6398      * <pre>
6399      * Variant group identifier. Must be an
6400      * [id][google.cloud.retail.v2.Product.id], with the same parent branch with
6401      * this product. Otherwise, an error is thrown.
6402      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6403      * [Product][google.cloud.retail.v2.Product]s, this field can only be empty or
6404      * set to the same value as [id][google.cloud.retail.v2.Product.id].
6405      * For VARIANT [Product][google.cloud.retail.v2.Product]s, this field cannot
6406      * be empty. A maximum of 2,000 products are allowed to share the same
6407      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6408      * [Product][google.cloud.retail.v2.Product]. Otherwise, an INVALID_ARGUMENT
6409      * error is returned.
6410      * Corresponding properties: Google Merchant Center property
6411      * [item_group_id](https://support.google.com/merchants/answer/6324507).
6412      * Schema.org property
6413      * [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
6414      * </pre>
6415      *
6416      * <code>string primary_product_id = 4;</code>
6417      *
6418      * @param value The primaryProductId to set.
6419      * @return This builder for chaining.
6420      */
setPrimaryProductId(java.lang.String value)6421     public Builder setPrimaryProductId(java.lang.String value) {
6422       if (value == null) {
6423         throw new NullPointerException();
6424       }
6425       primaryProductId_ = value;
6426       bitField0_ |= 0x00000020;
6427       onChanged();
6428       return this;
6429     }
6430     /**
6431      *
6432      *
6433      * <pre>
6434      * Variant group identifier. Must be an
6435      * [id][google.cloud.retail.v2.Product.id], with the same parent branch with
6436      * this product. Otherwise, an error is thrown.
6437      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6438      * [Product][google.cloud.retail.v2.Product]s, this field can only be empty or
6439      * set to the same value as [id][google.cloud.retail.v2.Product.id].
6440      * For VARIANT [Product][google.cloud.retail.v2.Product]s, this field cannot
6441      * be empty. A maximum of 2,000 products are allowed to share the same
6442      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6443      * [Product][google.cloud.retail.v2.Product]. Otherwise, an INVALID_ARGUMENT
6444      * error is returned.
6445      * Corresponding properties: Google Merchant Center property
6446      * [item_group_id](https://support.google.com/merchants/answer/6324507).
6447      * Schema.org property
6448      * [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
6449      * </pre>
6450      *
6451      * <code>string primary_product_id = 4;</code>
6452      *
6453      * @return This builder for chaining.
6454      */
clearPrimaryProductId()6455     public Builder clearPrimaryProductId() {
6456       primaryProductId_ = getDefaultInstance().getPrimaryProductId();
6457       bitField0_ = (bitField0_ & ~0x00000020);
6458       onChanged();
6459       return this;
6460     }
6461     /**
6462      *
6463      *
6464      * <pre>
6465      * Variant group identifier. Must be an
6466      * [id][google.cloud.retail.v2.Product.id], with the same parent branch with
6467      * this product. Otherwise, an error is thrown.
6468      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6469      * [Product][google.cloud.retail.v2.Product]s, this field can only be empty or
6470      * set to the same value as [id][google.cloud.retail.v2.Product.id].
6471      * For VARIANT [Product][google.cloud.retail.v2.Product]s, this field cannot
6472      * be empty. A maximum of 2,000 products are allowed to share the same
6473      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6474      * [Product][google.cloud.retail.v2.Product]. Otherwise, an INVALID_ARGUMENT
6475      * error is returned.
6476      * Corresponding properties: Google Merchant Center property
6477      * [item_group_id](https://support.google.com/merchants/answer/6324507).
6478      * Schema.org property
6479      * [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
6480      * </pre>
6481      *
6482      * <code>string primary_product_id = 4;</code>
6483      *
6484      * @param value The bytes for primaryProductId to set.
6485      * @return This builder for chaining.
6486      */
setPrimaryProductIdBytes(com.google.protobuf.ByteString value)6487     public Builder setPrimaryProductIdBytes(com.google.protobuf.ByteString value) {
6488       if (value == null) {
6489         throw new NullPointerException();
6490       }
6491       checkByteStringIsUtf8(value);
6492       primaryProductId_ = value;
6493       bitField0_ |= 0x00000020;
6494       onChanged();
6495       return this;
6496     }
6497 
6498     private com.google.protobuf.LazyStringList collectionMemberIds_ =
6499         com.google.protobuf.LazyStringArrayList.EMPTY;
6500 
ensureCollectionMemberIdsIsMutable()6501     private void ensureCollectionMemberIdsIsMutable() {
6502       if (!((bitField0_ & 0x00000040) != 0)) {
6503         collectionMemberIds_ = new com.google.protobuf.LazyStringArrayList(collectionMemberIds_);
6504         bitField0_ |= 0x00000040;
6505       }
6506     }
6507     /**
6508      *
6509      *
6510      * <pre>
6511      * The [id][google.cloud.retail.v2.Product.id] of the collection members when
6512      * [type][google.cloud.retail.v2.Product.type] is
6513      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
6514      * Non-existent product ids are allowed.
6515      * The [type][google.cloud.retail.v2.Product.type] of the members must be
6516      * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
6517      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
6518      * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
6519      * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
6520      * return.
6521      * </pre>
6522      *
6523      * <code>repeated string collection_member_ids = 5;</code>
6524      *
6525      * @return A list containing the collectionMemberIds.
6526      */
getCollectionMemberIdsList()6527     public com.google.protobuf.ProtocolStringList getCollectionMemberIdsList() {
6528       return collectionMemberIds_.getUnmodifiableView();
6529     }
6530     /**
6531      *
6532      *
6533      * <pre>
6534      * The [id][google.cloud.retail.v2.Product.id] of the collection members when
6535      * [type][google.cloud.retail.v2.Product.type] is
6536      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
6537      * Non-existent product ids are allowed.
6538      * The [type][google.cloud.retail.v2.Product.type] of the members must be
6539      * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
6540      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
6541      * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
6542      * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
6543      * return.
6544      * </pre>
6545      *
6546      * <code>repeated string collection_member_ids = 5;</code>
6547      *
6548      * @return The count of collectionMemberIds.
6549      */
getCollectionMemberIdsCount()6550     public int getCollectionMemberIdsCount() {
6551       return collectionMemberIds_.size();
6552     }
6553     /**
6554      *
6555      *
6556      * <pre>
6557      * The [id][google.cloud.retail.v2.Product.id] of the collection members when
6558      * [type][google.cloud.retail.v2.Product.type] is
6559      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
6560      * Non-existent product ids are allowed.
6561      * The [type][google.cloud.retail.v2.Product.type] of the members must be
6562      * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
6563      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
6564      * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
6565      * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
6566      * return.
6567      * </pre>
6568      *
6569      * <code>repeated string collection_member_ids = 5;</code>
6570      *
6571      * @param index The index of the element to return.
6572      * @return The collectionMemberIds at the given index.
6573      */
getCollectionMemberIds(int index)6574     public java.lang.String getCollectionMemberIds(int index) {
6575       return collectionMemberIds_.get(index);
6576     }
6577     /**
6578      *
6579      *
6580      * <pre>
6581      * The [id][google.cloud.retail.v2.Product.id] of the collection members when
6582      * [type][google.cloud.retail.v2.Product.type] is
6583      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
6584      * Non-existent product ids are allowed.
6585      * The [type][google.cloud.retail.v2.Product.type] of the members must be
6586      * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
6587      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
6588      * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
6589      * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
6590      * return.
6591      * </pre>
6592      *
6593      * <code>repeated string collection_member_ids = 5;</code>
6594      *
6595      * @param index The index of the value to return.
6596      * @return The bytes of the collectionMemberIds at the given index.
6597      */
getCollectionMemberIdsBytes(int index)6598     public com.google.protobuf.ByteString getCollectionMemberIdsBytes(int index) {
6599       return collectionMemberIds_.getByteString(index);
6600     }
6601     /**
6602      *
6603      *
6604      * <pre>
6605      * The [id][google.cloud.retail.v2.Product.id] of the collection members when
6606      * [type][google.cloud.retail.v2.Product.type] is
6607      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
6608      * Non-existent product ids are allowed.
6609      * The [type][google.cloud.retail.v2.Product.type] of the members must be
6610      * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
6611      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
6612      * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
6613      * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
6614      * return.
6615      * </pre>
6616      *
6617      * <code>repeated string collection_member_ids = 5;</code>
6618      *
6619      * @param index The index to set the value at.
6620      * @param value The collectionMemberIds to set.
6621      * @return This builder for chaining.
6622      */
setCollectionMemberIds(int index, java.lang.String value)6623     public Builder setCollectionMemberIds(int index, java.lang.String value) {
6624       if (value == null) {
6625         throw new NullPointerException();
6626       }
6627       ensureCollectionMemberIdsIsMutable();
6628       collectionMemberIds_.set(index, value);
6629       onChanged();
6630       return this;
6631     }
6632     /**
6633      *
6634      *
6635      * <pre>
6636      * The [id][google.cloud.retail.v2.Product.id] of the collection members when
6637      * [type][google.cloud.retail.v2.Product.type] is
6638      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
6639      * Non-existent product ids are allowed.
6640      * The [type][google.cloud.retail.v2.Product.type] of the members must be
6641      * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
6642      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
6643      * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
6644      * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
6645      * return.
6646      * </pre>
6647      *
6648      * <code>repeated string collection_member_ids = 5;</code>
6649      *
6650      * @param value The collectionMemberIds to add.
6651      * @return This builder for chaining.
6652      */
addCollectionMemberIds(java.lang.String value)6653     public Builder addCollectionMemberIds(java.lang.String value) {
6654       if (value == null) {
6655         throw new NullPointerException();
6656       }
6657       ensureCollectionMemberIdsIsMutable();
6658       collectionMemberIds_.add(value);
6659       onChanged();
6660       return this;
6661     }
6662     /**
6663      *
6664      *
6665      * <pre>
6666      * The [id][google.cloud.retail.v2.Product.id] of the collection members when
6667      * [type][google.cloud.retail.v2.Product.type] is
6668      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
6669      * Non-existent product ids are allowed.
6670      * The [type][google.cloud.retail.v2.Product.type] of the members must be
6671      * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
6672      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
6673      * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
6674      * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
6675      * return.
6676      * </pre>
6677      *
6678      * <code>repeated string collection_member_ids = 5;</code>
6679      *
6680      * @param values The collectionMemberIds to add.
6681      * @return This builder for chaining.
6682      */
addAllCollectionMemberIds(java.lang.Iterable<java.lang.String> values)6683     public Builder addAllCollectionMemberIds(java.lang.Iterable<java.lang.String> values) {
6684       ensureCollectionMemberIdsIsMutable();
6685       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, collectionMemberIds_);
6686       onChanged();
6687       return this;
6688     }
6689     /**
6690      *
6691      *
6692      * <pre>
6693      * The [id][google.cloud.retail.v2.Product.id] of the collection members when
6694      * [type][google.cloud.retail.v2.Product.type] is
6695      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
6696      * Non-existent product ids are allowed.
6697      * The [type][google.cloud.retail.v2.Product.type] of the members must be
6698      * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
6699      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
6700      * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
6701      * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
6702      * return.
6703      * </pre>
6704      *
6705      * <code>repeated string collection_member_ids = 5;</code>
6706      *
6707      * @return This builder for chaining.
6708      */
clearCollectionMemberIds()6709     public Builder clearCollectionMemberIds() {
6710       collectionMemberIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
6711       bitField0_ = (bitField0_ & ~0x00000040);
6712       onChanged();
6713       return this;
6714     }
6715     /**
6716      *
6717      *
6718      * <pre>
6719      * The [id][google.cloud.retail.v2.Product.id] of the collection members when
6720      * [type][google.cloud.retail.v2.Product.type] is
6721      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION].
6722      * Non-existent product ids are allowed.
6723      * The [type][google.cloud.retail.v2.Product.type] of the members must be
6724      * either [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] or
6725      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT] otherwise an
6726      * INVALID_ARGUMENT error is thrown. Should not set it for other types. A
6727      * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
6728      * return.
6729      * </pre>
6730      *
6731      * <code>repeated string collection_member_ids = 5;</code>
6732      *
6733      * @param value The bytes of the collectionMemberIds to add.
6734      * @return This builder for chaining.
6735      */
addCollectionMemberIdsBytes(com.google.protobuf.ByteString value)6736     public Builder addCollectionMemberIdsBytes(com.google.protobuf.ByteString value) {
6737       if (value == null) {
6738         throw new NullPointerException();
6739       }
6740       checkByteStringIsUtf8(value);
6741       ensureCollectionMemberIdsIsMutable();
6742       collectionMemberIds_.add(value);
6743       onChanged();
6744       return this;
6745     }
6746 
6747     private java.lang.Object gtin_ = "";
6748     /**
6749      *
6750      *
6751      * <pre>
6752      * The Global Trade Item Number (GTIN) of the product.
6753      * This field must be a UTF-8 encoded string with a length limit of 128
6754      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6755      * This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
6756      * returned.
6757      * Corresponding properties: Google Merchant Center property
6758      * [gtin](https://support.google.com/merchants/answer/6324461).
6759      * Schema.org property
6760      * [Product.isbn](https://schema.org/isbn),
6761      * [Product.gtin8](https://schema.org/gtin8),
6762      * [Product.gtin12](https://schema.org/gtin12),
6763      * [Product.gtin13](https://schema.org/gtin13), or
6764      * [Product.gtin14](https://schema.org/gtin14).
6765      * If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
6766      * </pre>
6767      *
6768      * <code>string gtin = 6;</code>
6769      *
6770      * @return The gtin.
6771      */
getGtin()6772     public java.lang.String getGtin() {
6773       java.lang.Object ref = gtin_;
6774       if (!(ref instanceof java.lang.String)) {
6775         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
6776         java.lang.String s = bs.toStringUtf8();
6777         gtin_ = s;
6778         return s;
6779       } else {
6780         return (java.lang.String) ref;
6781       }
6782     }
6783     /**
6784      *
6785      *
6786      * <pre>
6787      * The Global Trade Item Number (GTIN) of the product.
6788      * This field must be a UTF-8 encoded string with a length limit of 128
6789      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6790      * This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
6791      * returned.
6792      * Corresponding properties: Google Merchant Center property
6793      * [gtin](https://support.google.com/merchants/answer/6324461).
6794      * Schema.org property
6795      * [Product.isbn](https://schema.org/isbn),
6796      * [Product.gtin8](https://schema.org/gtin8),
6797      * [Product.gtin12](https://schema.org/gtin12),
6798      * [Product.gtin13](https://schema.org/gtin13), or
6799      * [Product.gtin14](https://schema.org/gtin14).
6800      * If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
6801      * </pre>
6802      *
6803      * <code>string gtin = 6;</code>
6804      *
6805      * @return The bytes for gtin.
6806      */
getGtinBytes()6807     public com.google.protobuf.ByteString getGtinBytes() {
6808       java.lang.Object ref = gtin_;
6809       if (ref instanceof String) {
6810         com.google.protobuf.ByteString b =
6811             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
6812         gtin_ = b;
6813         return b;
6814       } else {
6815         return (com.google.protobuf.ByteString) ref;
6816       }
6817     }
6818     /**
6819      *
6820      *
6821      * <pre>
6822      * The Global Trade Item Number (GTIN) of the product.
6823      * This field must be a UTF-8 encoded string with a length limit of 128
6824      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6825      * This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
6826      * returned.
6827      * Corresponding properties: Google Merchant Center property
6828      * [gtin](https://support.google.com/merchants/answer/6324461).
6829      * Schema.org property
6830      * [Product.isbn](https://schema.org/isbn),
6831      * [Product.gtin8](https://schema.org/gtin8),
6832      * [Product.gtin12](https://schema.org/gtin12),
6833      * [Product.gtin13](https://schema.org/gtin13), or
6834      * [Product.gtin14](https://schema.org/gtin14).
6835      * If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
6836      * </pre>
6837      *
6838      * <code>string gtin = 6;</code>
6839      *
6840      * @param value The gtin to set.
6841      * @return This builder for chaining.
6842      */
setGtin(java.lang.String value)6843     public Builder setGtin(java.lang.String value) {
6844       if (value == null) {
6845         throw new NullPointerException();
6846       }
6847       gtin_ = value;
6848       bitField0_ |= 0x00000080;
6849       onChanged();
6850       return this;
6851     }
6852     /**
6853      *
6854      *
6855      * <pre>
6856      * The Global Trade Item Number (GTIN) of the product.
6857      * This field must be a UTF-8 encoded string with a length limit of 128
6858      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6859      * This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
6860      * returned.
6861      * Corresponding properties: Google Merchant Center property
6862      * [gtin](https://support.google.com/merchants/answer/6324461).
6863      * Schema.org property
6864      * [Product.isbn](https://schema.org/isbn),
6865      * [Product.gtin8](https://schema.org/gtin8),
6866      * [Product.gtin12](https://schema.org/gtin12),
6867      * [Product.gtin13](https://schema.org/gtin13), or
6868      * [Product.gtin14](https://schema.org/gtin14).
6869      * If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
6870      * </pre>
6871      *
6872      * <code>string gtin = 6;</code>
6873      *
6874      * @return This builder for chaining.
6875      */
clearGtin()6876     public Builder clearGtin() {
6877       gtin_ = getDefaultInstance().getGtin();
6878       bitField0_ = (bitField0_ & ~0x00000080);
6879       onChanged();
6880       return this;
6881     }
6882     /**
6883      *
6884      *
6885      * <pre>
6886      * The Global Trade Item Number (GTIN) of the product.
6887      * This field must be a UTF-8 encoded string with a length limit of 128
6888      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6889      * This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
6890      * returned.
6891      * Corresponding properties: Google Merchant Center property
6892      * [gtin](https://support.google.com/merchants/answer/6324461).
6893      * Schema.org property
6894      * [Product.isbn](https://schema.org/isbn),
6895      * [Product.gtin8](https://schema.org/gtin8),
6896      * [Product.gtin12](https://schema.org/gtin12),
6897      * [Product.gtin13](https://schema.org/gtin13), or
6898      * [Product.gtin14](https://schema.org/gtin14).
6899      * If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
6900      * </pre>
6901      *
6902      * <code>string gtin = 6;</code>
6903      *
6904      * @param value The bytes for gtin to set.
6905      * @return This builder for chaining.
6906      */
setGtinBytes(com.google.protobuf.ByteString value)6907     public Builder setGtinBytes(com.google.protobuf.ByteString value) {
6908       if (value == null) {
6909         throw new NullPointerException();
6910       }
6911       checkByteStringIsUtf8(value);
6912       gtin_ = value;
6913       bitField0_ |= 0x00000080;
6914       onChanged();
6915       return this;
6916     }
6917 
6918     private com.google.protobuf.LazyStringList categories_ =
6919         com.google.protobuf.LazyStringArrayList.EMPTY;
6920 
ensureCategoriesIsMutable()6921     private void ensureCategoriesIsMutable() {
6922       if (!((bitField0_ & 0x00000100) != 0)) {
6923         categories_ = new com.google.protobuf.LazyStringArrayList(categories_);
6924         bitField0_ |= 0x00000100;
6925       }
6926     }
6927     /**
6928      *
6929      *
6930      * <pre>
6931      * Product categories. This field is repeated for supporting one product
6932      * belonging to several parallel categories. Strongly recommended using the
6933      * full path for better search / recommendation quality.
6934      * To represent full path of category, use '&gt;' sign to separate different
6935      * hierarchies. If '&gt;' is part of the category name, replace it with
6936      * other character(s).
6937      * For example, if a shoes product belongs to both
6938      * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
6939      * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
6940      * represented as:
6941      *      "categories": [
6942      *        "Shoes &amp; Accessories &gt; Shoes",
6943      *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
6944      *      ]
6945      * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6946      * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
6947      * error is returned.
6948      * At most 250 values are allowed per
6949      * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
6950      * Each value must be a UTF-8 encoded string with a length limit of 5,000
6951      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6952      * Corresponding properties: Google Merchant Center property
6953      * [google_product_category][mc_google_product_category]. Schema.org property
6954      * [Product.category] (https://schema.org/category).
6955      * [mc_google_product_category]:
6956      * https://support.google.com/merchants/answer/6324436
6957      * </pre>
6958      *
6959      * <code>repeated string categories = 7;</code>
6960      *
6961      * @return A list containing the categories.
6962      */
getCategoriesList()6963     public com.google.protobuf.ProtocolStringList getCategoriesList() {
6964       return categories_.getUnmodifiableView();
6965     }
6966     /**
6967      *
6968      *
6969      * <pre>
6970      * Product categories. This field is repeated for supporting one product
6971      * belonging to several parallel categories. Strongly recommended using the
6972      * full path for better search / recommendation quality.
6973      * To represent full path of category, use '&gt;' sign to separate different
6974      * hierarchies. If '&gt;' is part of the category name, replace it with
6975      * other character(s).
6976      * For example, if a shoes product belongs to both
6977      * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
6978      * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
6979      * represented as:
6980      *      "categories": [
6981      *        "Shoes &amp; Accessories &gt; Shoes",
6982      *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
6983      *      ]
6984      * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
6985      * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
6986      * error is returned.
6987      * At most 250 values are allowed per
6988      * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
6989      * Each value must be a UTF-8 encoded string with a length limit of 5,000
6990      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
6991      * Corresponding properties: Google Merchant Center property
6992      * [google_product_category][mc_google_product_category]. Schema.org property
6993      * [Product.category] (https://schema.org/category).
6994      * [mc_google_product_category]:
6995      * https://support.google.com/merchants/answer/6324436
6996      * </pre>
6997      *
6998      * <code>repeated string categories = 7;</code>
6999      *
7000      * @return The count of categories.
7001      */
getCategoriesCount()7002     public int getCategoriesCount() {
7003       return categories_.size();
7004     }
7005     /**
7006      *
7007      *
7008      * <pre>
7009      * Product categories. This field is repeated for supporting one product
7010      * belonging to several parallel categories. Strongly recommended using the
7011      * full path for better search / recommendation quality.
7012      * To represent full path of category, use '&gt;' sign to separate different
7013      * hierarchies. If '&gt;' is part of the category name, replace it with
7014      * other character(s).
7015      * For example, if a shoes product belongs to both
7016      * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
7017      * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
7018      * represented as:
7019      *      "categories": [
7020      *        "Shoes &amp; Accessories &gt; Shoes",
7021      *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
7022      *      ]
7023      * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
7024      * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
7025      * error is returned.
7026      * At most 250 values are allowed per
7027      * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
7028      * Each value must be a UTF-8 encoded string with a length limit of 5,000
7029      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7030      * Corresponding properties: Google Merchant Center property
7031      * [google_product_category][mc_google_product_category]. Schema.org property
7032      * [Product.category] (https://schema.org/category).
7033      * [mc_google_product_category]:
7034      * https://support.google.com/merchants/answer/6324436
7035      * </pre>
7036      *
7037      * <code>repeated string categories = 7;</code>
7038      *
7039      * @param index The index of the element to return.
7040      * @return The categories at the given index.
7041      */
getCategories(int index)7042     public java.lang.String getCategories(int index) {
7043       return categories_.get(index);
7044     }
7045     /**
7046      *
7047      *
7048      * <pre>
7049      * Product categories. This field is repeated for supporting one product
7050      * belonging to several parallel categories. Strongly recommended using the
7051      * full path for better search / recommendation quality.
7052      * To represent full path of category, use '&gt;' sign to separate different
7053      * hierarchies. If '&gt;' is part of the category name, replace it with
7054      * other character(s).
7055      * For example, if a shoes product belongs to both
7056      * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
7057      * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
7058      * represented as:
7059      *      "categories": [
7060      *        "Shoes &amp; Accessories &gt; Shoes",
7061      *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
7062      *      ]
7063      * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
7064      * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
7065      * error is returned.
7066      * At most 250 values are allowed per
7067      * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
7068      * Each value must be a UTF-8 encoded string with a length limit of 5,000
7069      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7070      * Corresponding properties: Google Merchant Center property
7071      * [google_product_category][mc_google_product_category]. Schema.org property
7072      * [Product.category] (https://schema.org/category).
7073      * [mc_google_product_category]:
7074      * https://support.google.com/merchants/answer/6324436
7075      * </pre>
7076      *
7077      * <code>repeated string categories = 7;</code>
7078      *
7079      * @param index The index of the value to return.
7080      * @return The bytes of the categories at the given index.
7081      */
getCategoriesBytes(int index)7082     public com.google.protobuf.ByteString getCategoriesBytes(int index) {
7083       return categories_.getByteString(index);
7084     }
7085     /**
7086      *
7087      *
7088      * <pre>
7089      * Product categories. This field is repeated for supporting one product
7090      * belonging to several parallel categories. Strongly recommended using the
7091      * full path for better search / recommendation quality.
7092      * To represent full path of category, use '&gt;' sign to separate different
7093      * hierarchies. If '&gt;' is part of the category name, replace it with
7094      * other character(s).
7095      * For example, if a shoes product belongs to both
7096      * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
7097      * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
7098      * represented as:
7099      *      "categories": [
7100      *        "Shoes &amp; Accessories &gt; Shoes",
7101      *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
7102      *      ]
7103      * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
7104      * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
7105      * error is returned.
7106      * At most 250 values are allowed per
7107      * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
7108      * Each value must be a UTF-8 encoded string with a length limit of 5,000
7109      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7110      * Corresponding properties: Google Merchant Center property
7111      * [google_product_category][mc_google_product_category]. Schema.org property
7112      * [Product.category] (https://schema.org/category).
7113      * [mc_google_product_category]:
7114      * https://support.google.com/merchants/answer/6324436
7115      * </pre>
7116      *
7117      * <code>repeated string categories = 7;</code>
7118      *
7119      * @param index The index to set the value at.
7120      * @param value The categories to set.
7121      * @return This builder for chaining.
7122      */
setCategories(int index, java.lang.String value)7123     public Builder setCategories(int index, java.lang.String value) {
7124       if (value == null) {
7125         throw new NullPointerException();
7126       }
7127       ensureCategoriesIsMutable();
7128       categories_.set(index, value);
7129       onChanged();
7130       return this;
7131     }
7132     /**
7133      *
7134      *
7135      * <pre>
7136      * Product categories. This field is repeated for supporting one product
7137      * belonging to several parallel categories. Strongly recommended using the
7138      * full path for better search / recommendation quality.
7139      * To represent full path of category, use '&gt;' sign to separate different
7140      * hierarchies. If '&gt;' is part of the category name, replace it with
7141      * other character(s).
7142      * For example, if a shoes product belongs to both
7143      * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
7144      * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
7145      * represented as:
7146      *      "categories": [
7147      *        "Shoes &amp; Accessories &gt; Shoes",
7148      *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
7149      *      ]
7150      * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
7151      * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
7152      * error is returned.
7153      * At most 250 values are allowed per
7154      * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
7155      * Each value must be a UTF-8 encoded string with a length limit of 5,000
7156      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7157      * Corresponding properties: Google Merchant Center property
7158      * [google_product_category][mc_google_product_category]. Schema.org property
7159      * [Product.category] (https://schema.org/category).
7160      * [mc_google_product_category]:
7161      * https://support.google.com/merchants/answer/6324436
7162      * </pre>
7163      *
7164      * <code>repeated string categories = 7;</code>
7165      *
7166      * @param value The categories to add.
7167      * @return This builder for chaining.
7168      */
addCategories(java.lang.String value)7169     public Builder addCategories(java.lang.String value) {
7170       if (value == null) {
7171         throw new NullPointerException();
7172       }
7173       ensureCategoriesIsMutable();
7174       categories_.add(value);
7175       onChanged();
7176       return this;
7177     }
7178     /**
7179      *
7180      *
7181      * <pre>
7182      * Product categories. This field is repeated for supporting one product
7183      * belonging to several parallel categories. Strongly recommended using the
7184      * full path for better search / recommendation quality.
7185      * To represent full path of category, use '&gt;' sign to separate different
7186      * hierarchies. If '&gt;' is part of the category name, replace it with
7187      * other character(s).
7188      * For example, if a shoes product belongs to both
7189      * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
7190      * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
7191      * represented as:
7192      *      "categories": [
7193      *        "Shoes &amp; Accessories &gt; Shoes",
7194      *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
7195      *      ]
7196      * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
7197      * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
7198      * error is returned.
7199      * At most 250 values are allowed per
7200      * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
7201      * Each value must be a UTF-8 encoded string with a length limit of 5,000
7202      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7203      * Corresponding properties: Google Merchant Center property
7204      * [google_product_category][mc_google_product_category]. Schema.org property
7205      * [Product.category] (https://schema.org/category).
7206      * [mc_google_product_category]:
7207      * https://support.google.com/merchants/answer/6324436
7208      * </pre>
7209      *
7210      * <code>repeated string categories = 7;</code>
7211      *
7212      * @param values The categories to add.
7213      * @return This builder for chaining.
7214      */
addAllCategories(java.lang.Iterable<java.lang.String> values)7215     public Builder addAllCategories(java.lang.Iterable<java.lang.String> values) {
7216       ensureCategoriesIsMutable();
7217       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, categories_);
7218       onChanged();
7219       return this;
7220     }
7221     /**
7222      *
7223      *
7224      * <pre>
7225      * Product categories. This field is repeated for supporting one product
7226      * belonging to several parallel categories. Strongly recommended using the
7227      * full path for better search / recommendation quality.
7228      * To represent full path of category, use '&gt;' sign to separate different
7229      * hierarchies. If '&gt;' is part of the category name, replace it with
7230      * other character(s).
7231      * For example, if a shoes product belongs to both
7232      * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
7233      * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
7234      * represented as:
7235      *      "categories": [
7236      *        "Shoes &amp; Accessories &gt; Shoes",
7237      *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
7238      *      ]
7239      * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
7240      * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
7241      * error is returned.
7242      * At most 250 values are allowed per
7243      * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
7244      * Each value must be a UTF-8 encoded string with a length limit of 5,000
7245      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7246      * Corresponding properties: Google Merchant Center property
7247      * [google_product_category][mc_google_product_category]. Schema.org property
7248      * [Product.category] (https://schema.org/category).
7249      * [mc_google_product_category]:
7250      * https://support.google.com/merchants/answer/6324436
7251      * </pre>
7252      *
7253      * <code>repeated string categories = 7;</code>
7254      *
7255      * @return This builder for chaining.
7256      */
clearCategories()7257     public Builder clearCategories() {
7258       categories_ = com.google.protobuf.LazyStringArrayList.EMPTY;
7259       bitField0_ = (bitField0_ & ~0x00000100);
7260       onChanged();
7261       return this;
7262     }
7263     /**
7264      *
7265      *
7266      * <pre>
7267      * Product categories. This field is repeated for supporting one product
7268      * belonging to several parallel categories. Strongly recommended using the
7269      * full path for better search / recommendation quality.
7270      * To represent full path of category, use '&gt;' sign to separate different
7271      * hierarchies. If '&gt;' is part of the category name, replace it with
7272      * other character(s).
7273      * For example, if a shoes product belongs to both
7274      * ["Shoes &amp; Accessories" -&gt; "Shoes"] and
7275      * ["Sports &amp; Fitness" -&gt; "Athletic Clothing" -&gt; "Shoes"], it could be
7276      * represented as:
7277      *      "categories": [
7278      *        "Shoes &amp; Accessories &gt; Shoes",
7279      *        "Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes"
7280      *      ]
7281      * Must be set for [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
7282      * [Product][google.cloud.retail.v2.Product] otherwise an INVALID_ARGUMENT
7283      * error is returned.
7284      * At most 250 values are allowed per
7285      * [Product][google.cloud.retail.v2.Product]. Empty values are not allowed.
7286      * Each value must be a UTF-8 encoded string with a length limit of 5,000
7287      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7288      * Corresponding properties: Google Merchant Center property
7289      * [google_product_category][mc_google_product_category]. Schema.org property
7290      * [Product.category] (https://schema.org/category).
7291      * [mc_google_product_category]:
7292      * https://support.google.com/merchants/answer/6324436
7293      * </pre>
7294      *
7295      * <code>repeated string categories = 7;</code>
7296      *
7297      * @param value The bytes of the categories to add.
7298      * @return This builder for chaining.
7299      */
addCategoriesBytes(com.google.protobuf.ByteString value)7300     public Builder addCategoriesBytes(com.google.protobuf.ByteString value) {
7301       if (value == null) {
7302         throw new NullPointerException();
7303       }
7304       checkByteStringIsUtf8(value);
7305       ensureCategoriesIsMutable();
7306       categories_.add(value);
7307       onChanged();
7308       return this;
7309     }
7310 
7311     private java.lang.Object title_ = "";
7312     /**
7313      *
7314      *
7315      * <pre>
7316      * Required. Product title.
7317      * This field must be a UTF-8 encoded string with a length limit of 1,000
7318      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7319      * Corresponding properties: Google Merchant Center property
7320      * [title](https://support.google.com/merchants/answer/6324415). Schema.org
7321      * property [Product.name](https://schema.org/name).
7322      * </pre>
7323      *
7324      * <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
7325      *
7326      * @return The title.
7327      */
getTitle()7328     public java.lang.String getTitle() {
7329       java.lang.Object ref = title_;
7330       if (!(ref instanceof java.lang.String)) {
7331         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
7332         java.lang.String s = bs.toStringUtf8();
7333         title_ = s;
7334         return s;
7335       } else {
7336         return (java.lang.String) ref;
7337       }
7338     }
7339     /**
7340      *
7341      *
7342      * <pre>
7343      * Required. Product title.
7344      * This field must be a UTF-8 encoded string with a length limit of 1,000
7345      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7346      * Corresponding properties: Google Merchant Center property
7347      * [title](https://support.google.com/merchants/answer/6324415). Schema.org
7348      * property [Product.name](https://schema.org/name).
7349      * </pre>
7350      *
7351      * <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
7352      *
7353      * @return The bytes for title.
7354      */
getTitleBytes()7355     public com.google.protobuf.ByteString getTitleBytes() {
7356       java.lang.Object ref = title_;
7357       if (ref instanceof String) {
7358         com.google.protobuf.ByteString b =
7359             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
7360         title_ = b;
7361         return b;
7362       } else {
7363         return (com.google.protobuf.ByteString) ref;
7364       }
7365     }
7366     /**
7367      *
7368      *
7369      * <pre>
7370      * Required. Product title.
7371      * This field must be a UTF-8 encoded string with a length limit of 1,000
7372      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7373      * Corresponding properties: Google Merchant Center property
7374      * [title](https://support.google.com/merchants/answer/6324415). Schema.org
7375      * property [Product.name](https://schema.org/name).
7376      * </pre>
7377      *
7378      * <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
7379      *
7380      * @param value The title to set.
7381      * @return This builder for chaining.
7382      */
setTitle(java.lang.String value)7383     public Builder setTitle(java.lang.String value) {
7384       if (value == null) {
7385         throw new NullPointerException();
7386       }
7387       title_ = value;
7388       bitField0_ |= 0x00000200;
7389       onChanged();
7390       return this;
7391     }
7392     /**
7393      *
7394      *
7395      * <pre>
7396      * Required. Product title.
7397      * This field must be a UTF-8 encoded string with a length limit of 1,000
7398      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7399      * Corresponding properties: Google Merchant Center property
7400      * [title](https://support.google.com/merchants/answer/6324415). Schema.org
7401      * property [Product.name](https://schema.org/name).
7402      * </pre>
7403      *
7404      * <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
7405      *
7406      * @return This builder for chaining.
7407      */
clearTitle()7408     public Builder clearTitle() {
7409       title_ = getDefaultInstance().getTitle();
7410       bitField0_ = (bitField0_ & ~0x00000200);
7411       onChanged();
7412       return this;
7413     }
7414     /**
7415      *
7416      *
7417      * <pre>
7418      * Required. Product title.
7419      * This field must be a UTF-8 encoded string with a length limit of 1,000
7420      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7421      * Corresponding properties: Google Merchant Center property
7422      * [title](https://support.google.com/merchants/answer/6324415). Schema.org
7423      * property [Product.name](https://schema.org/name).
7424      * </pre>
7425      *
7426      * <code>string title = 8 [(.google.api.field_behavior) = REQUIRED];</code>
7427      *
7428      * @param value The bytes for title to set.
7429      * @return This builder for chaining.
7430      */
setTitleBytes(com.google.protobuf.ByteString value)7431     public Builder setTitleBytes(com.google.protobuf.ByteString value) {
7432       if (value == null) {
7433         throw new NullPointerException();
7434       }
7435       checkByteStringIsUtf8(value);
7436       title_ = value;
7437       bitField0_ |= 0x00000200;
7438       onChanged();
7439       return this;
7440     }
7441 
7442     private com.google.protobuf.LazyStringList brands_ =
7443         com.google.protobuf.LazyStringArrayList.EMPTY;
7444 
ensureBrandsIsMutable()7445     private void ensureBrandsIsMutable() {
7446       if (!((bitField0_ & 0x00000400) != 0)) {
7447         brands_ = new com.google.protobuf.LazyStringArrayList(brands_);
7448         bitField0_ |= 0x00000400;
7449       }
7450     }
7451     /**
7452      *
7453      *
7454      * <pre>
7455      * The brands of the product.
7456      * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
7457      * string with a length limit of 1,000 characters. Otherwise, an
7458      * INVALID_ARGUMENT error is returned.
7459      * Corresponding properties: Google Merchant Center property
7460      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
7461      * property [Product.brand](https://schema.org/brand).
7462      * </pre>
7463      *
7464      * <code>repeated string brands = 9;</code>
7465      *
7466      * @return A list containing the brands.
7467      */
getBrandsList()7468     public com.google.protobuf.ProtocolStringList getBrandsList() {
7469       return brands_.getUnmodifiableView();
7470     }
7471     /**
7472      *
7473      *
7474      * <pre>
7475      * The brands of the product.
7476      * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
7477      * string with a length limit of 1,000 characters. Otherwise, an
7478      * INVALID_ARGUMENT error is returned.
7479      * Corresponding properties: Google Merchant Center property
7480      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
7481      * property [Product.brand](https://schema.org/brand).
7482      * </pre>
7483      *
7484      * <code>repeated string brands = 9;</code>
7485      *
7486      * @return The count of brands.
7487      */
getBrandsCount()7488     public int getBrandsCount() {
7489       return brands_.size();
7490     }
7491     /**
7492      *
7493      *
7494      * <pre>
7495      * The brands of the product.
7496      * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
7497      * string with a length limit of 1,000 characters. Otherwise, an
7498      * INVALID_ARGUMENT error is returned.
7499      * Corresponding properties: Google Merchant Center property
7500      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
7501      * property [Product.brand](https://schema.org/brand).
7502      * </pre>
7503      *
7504      * <code>repeated string brands = 9;</code>
7505      *
7506      * @param index The index of the element to return.
7507      * @return The brands at the given index.
7508      */
getBrands(int index)7509     public java.lang.String getBrands(int index) {
7510       return brands_.get(index);
7511     }
7512     /**
7513      *
7514      *
7515      * <pre>
7516      * The brands of the product.
7517      * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
7518      * string with a length limit of 1,000 characters. Otherwise, an
7519      * INVALID_ARGUMENT error is returned.
7520      * Corresponding properties: Google Merchant Center property
7521      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
7522      * property [Product.brand](https://schema.org/brand).
7523      * </pre>
7524      *
7525      * <code>repeated string brands = 9;</code>
7526      *
7527      * @param index The index of the value to return.
7528      * @return The bytes of the brands at the given index.
7529      */
getBrandsBytes(int index)7530     public com.google.protobuf.ByteString getBrandsBytes(int index) {
7531       return brands_.getByteString(index);
7532     }
7533     /**
7534      *
7535      *
7536      * <pre>
7537      * The brands of the product.
7538      * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
7539      * string with a length limit of 1,000 characters. Otherwise, an
7540      * INVALID_ARGUMENT error is returned.
7541      * Corresponding properties: Google Merchant Center property
7542      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
7543      * property [Product.brand](https://schema.org/brand).
7544      * </pre>
7545      *
7546      * <code>repeated string brands = 9;</code>
7547      *
7548      * @param index The index to set the value at.
7549      * @param value The brands to set.
7550      * @return This builder for chaining.
7551      */
setBrands(int index, java.lang.String value)7552     public Builder setBrands(int index, java.lang.String value) {
7553       if (value == null) {
7554         throw new NullPointerException();
7555       }
7556       ensureBrandsIsMutable();
7557       brands_.set(index, value);
7558       onChanged();
7559       return this;
7560     }
7561     /**
7562      *
7563      *
7564      * <pre>
7565      * The brands of the product.
7566      * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
7567      * string with a length limit of 1,000 characters. Otherwise, an
7568      * INVALID_ARGUMENT error is returned.
7569      * Corresponding properties: Google Merchant Center property
7570      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
7571      * property [Product.brand](https://schema.org/brand).
7572      * </pre>
7573      *
7574      * <code>repeated string brands = 9;</code>
7575      *
7576      * @param value The brands to add.
7577      * @return This builder for chaining.
7578      */
addBrands(java.lang.String value)7579     public Builder addBrands(java.lang.String value) {
7580       if (value == null) {
7581         throw new NullPointerException();
7582       }
7583       ensureBrandsIsMutable();
7584       brands_.add(value);
7585       onChanged();
7586       return this;
7587     }
7588     /**
7589      *
7590      *
7591      * <pre>
7592      * The brands of the product.
7593      * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
7594      * string with a length limit of 1,000 characters. Otherwise, an
7595      * INVALID_ARGUMENT error is returned.
7596      * Corresponding properties: Google Merchant Center property
7597      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
7598      * property [Product.brand](https://schema.org/brand).
7599      * </pre>
7600      *
7601      * <code>repeated string brands = 9;</code>
7602      *
7603      * @param values The brands to add.
7604      * @return This builder for chaining.
7605      */
addAllBrands(java.lang.Iterable<java.lang.String> values)7606     public Builder addAllBrands(java.lang.Iterable<java.lang.String> values) {
7607       ensureBrandsIsMutable();
7608       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, brands_);
7609       onChanged();
7610       return this;
7611     }
7612     /**
7613      *
7614      *
7615      * <pre>
7616      * The brands of the product.
7617      * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
7618      * string with a length limit of 1,000 characters. Otherwise, an
7619      * INVALID_ARGUMENT error is returned.
7620      * Corresponding properties: Google Merchant Center property
7621      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
7622      * property [Product.brand](https://schema.org/brand).
7623      * </pre>
7624      *
7625      * <code>repeated string brands = 9;</code>
7626      *
7627      * @return This builder for chaining.
7628      */
clearBrands()7629     public Builder clearBrands() {
7630       brands_ = com.google.protobuf.LazyStringArrayList.EMPTY;
7631       bitField0_ = (bitField0_ & ~0x00000400);
7632       onChanged();
7633       return this;
7634     }
7635     /**
7636      *
7637      *
7638      * <pre>
7639      * The brands of the product.
7640      * A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
7641      * string with a length limit of 1,000 characters. Otherwise, an
7642      * INVALID_ARGUMENT error is returned.
7643      * Corresponding properties: Google Merchant Center property
7644      * [brand](https://support.google.com/merchants/answer/6324351). Schema.org
7645      * property [Product.brand](https://schema.org/brand).
7646      * </pre>
7647      *
7648      * <code>repeated string brands = 9;</code>
7649      *
7650      * @param value The bytes of the brands to add.
7651      * @return This builder for chaining.
7652      */
addBrandsBytes(com.google.protobuf.ByteString value)7653     public Builder addBrandsBytes(com.google.protobuf.ByteString value) {
7654       if (value == null) {
7655         throw new NullPointerException();
7656       }
7657       checkByteStringIsUtf8(value);
7658       ensureBrandsIsMutable();
7659       brands_.add(value);
7660       onChanged();
7661       return this;
7662     }
7663 
7664     private java.lang.Object description_ = "";
7665     /**
7666      *
7667      *
7668      * <pre>
7669      * Product description.
7670      * This field must be a UTF-8 encoded string with a length limit of 5,000
7671      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7672      * Corresponding properties: Google Merchant Center property
7673      * [description](https://support.google.com/merchants/answer/6324468).
7674      * Schema.org property [Product.description](https://schema.org/description).
7675      * </pre>
7676      *
7677      * <code>string description = 10;</code>
7678      *
7679      * @return The description.
7680      */
getDescription()7681     public java.lang.String getDescription() {
7682       java.lang.Object ref = description_;
7683       if (!(ref instanceof java.lang.String)) {
7684         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
7685         java.lang.String s = bs.toStringUtf8();
7686         description_ = s;
7687         return s;
7688       } else {
7689         return (java.lang.String) ref;
7690       }
7691     }
7692     /**
7693      *
7694      *
7695      * <pre>
7696      * Product description.
7697      * This field must be a UTF-8 encoded string with a length limit of 5,000
7698      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7699      * Corresponding properties: Google Merchant Center property
7700      * [description](https://support.google.com/merchants/answer/6324468).
7701      * Schema.org property [Product.description](https://schema.org/description).
7702      * </pre>
7703      *
7704      * <code>string description = 10;</code>
7705      *
7706      * @return The bytes for description.
7707      */
getDescriptionBytes()7708     public com.google.protobuf.ByteString getDescriptionBytes() {
7709       java.lang.Object ref = description_;
7710       if (ref instanceof String) {
7711         com.google.protobuf.ByteString b =
7712             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
7713         description_ = b;
7714         return b;
7715       } else {
7716         return (com.google.protobuf.ByteString) ref;
7717       }
7718     }
7719     /**
7720      *
7721      *
7722      * <pre>
7723      * Product description.
7724      * This field must be a UTF-8 encoded string with a length limit of 5,000
7725      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7726      * Corresponding properties: Google Merchant Center property
7727      * [description](https://support.google.com/merchants/answer/6324468).
7728      * Schema.org property [Product.description](https://schema.org/description).
7729      * </pre>
7730      *
7731      * <code>string description = 10;</code>
7732      *
7733      * @param value The description to set.
7734      * @return This builder for chaining.
7735      */
setDescription(java.lang.String value)7736     public Builder setDescription(java.lang.String value) {
7737       if (value == null) {
7738         throw new NullPointerException();
7739       }
7740       description_ = value;
7741       bitField0_ |= 0x00000800;
7742       onChanged();
7743       return this;
7744     }
7745     /**
7746      *
7747      *
7748      * <pre>
7749      * Product description.
7750      * This field must be a UTF-8 encoded string with a length limit of 5,000
7751      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7752      * Corresponding properties: Google Merchant Center property
7753      * [description](https://support.google.com/merchants/answer/6324468).
7754      * Schema.org property [Product.description](https://schema.org/description).
7755      * </pre>
7756      *
7757      * <code>string description = 10;</code>
7758      *
7759      * @return This builder for chaining.
7760      */
clearDescription()7761     public Builder clearDescription() {
7762       description_ = getDefaultInstance().getDescription();
7763       bitField0_ = (bitField0_ & ~0x00000800);
7764       onChanged();
7765       return this;
7766     }
7767     /**
7768      *
7769      *
7770      * <pre>
7771      * Product description.
7772      * This field must be a UTF-8 encoded string with a length limit of 5,000
7773      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
7774      * Corresponding properties: Google Merchant Center property
7775      * [description](https://support.google.com/merchants/answer/6324468).
7776      * Schema.org property [Product.description](https://schema.org/description).
7777      * </pre>
7778      *
7779      * <code>string description = 10;</code>
7780      *
7781      * @param value The bytes for description to set.
7782      * @return This builder for chaining.
7783      */
setDescriptionBytes(com.google.protobuf.ByteString value)7784     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
7785       if (value == null) {
7786         throw new NullPointerException();
7787       }
7788       checkByteStringIsUtf8(value);
7789       description_ = value;
7790       bitField0_ |= 0x00000800;
7791       onChanged();
7792       return this;
7793     }
7794 
7795     private java.lang.Object languageCode_ = "";
7796     /**
7797      *
7798      *
7799      * <pre>
7800      * Language of the title/description and other string attributes. Use language
7801      * tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
7802      * For product prediction, this field is ignored and the model automatically
7803      * detects the text language. The [Product][google.cloud.retail.v2.Product]
7804      * can include text in different languages, but duplicating
7805      * [Product][google.cloud.retail.v2.Product]s to provide text in multiple
7806      * languages can result in degraded model performance.
7807      * For product search this field is in use. It defaults to "en-US" if unset.
7808      * </pre>
7809      *
7810      * <code>string language_code = 11;</code>
7811      *
7812      * @return The languageCode.
7813      */
getLanguageCode()7814     public java.lang.String getLanguageCode() {
7815       java.lang.Object ref = languageCode_;
7816       if (!(ref instanceof java.lang.String)) {
7817         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
7818         java.lang.String s = bs.toStringUtf8();
7819         languageCode_ = s;
7820         return s;
7821       } else {
7822         return (java.lang.String) ref;
7823       }
7824     }
7825     /**
7826      *
7827      *
7828      * <pre>
7829      * Language of the title/description and other string attributes. Use language
7830      * tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
7831      * For product prediction, this field is ignored and the model automatically
7832      * detects the text language. The [Product][google.cloud.retail.v2.Product]
7833      * can include text in different languages, but duplicating
7834      * [Product][google.cloud.retail.v2.Product]s to provide text in multiple
7835      * languages can result in degraded model performance.
7836      * For product search this field is in use. It defaults to "en-US" if unset.
7837      * </pre>
7838      *
7839      * <code>string language_code = 11;</code>
7840      *
7841      * @return The bytes for languageCode.
7842      */
getLanguageCodeBytes()7843     public com.google.protobuf.ByteString getLanguageCodeBytes() {
7844       java.lang.Object ref = languageCode_;
7845       if (ref instanceof String) {
7846         com.google.protobuf.ByteString b =
7847             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
7848         languageCode_ = b;
7849         return b;
7850       } else {
7851         return (com.google.protobuf.ByteString) ref;
7852       }
7853     }
7854     /**
7855      *
7856      *
7857      * <pre>
7858      * Language of the title/description and other string attributes. Use language
7859      * tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
7860      * For product prediction, this field is ignored and the model automatically
7861      * detects the text language. The [Product][google.cloud.retail.v2.Product]
7862      * can include text in different languages, but duplicating
7863      * [Product][google.cloud.retail.v2.Product]s to provide text in multiple
7864      * languages can result in degraded model performance.
7865      * For product search this field is in use. It defaults to "en-US" if unset.
7866      * </pre>
7867      *
7868      * <code>string language_code = 11;</code>
7869      *
7870      * @param value The languageCode to set.
7871      * @return This builder for chaining.
7872      */
setLanguageCode(java.lang.String value)7873     public Builder setLanguageCode(java.lang.String value) {
7874       if (value == null) {
7875         throw new NullPointerException();
7876       }
7877       languageCode_ = value;
7878       bitField0_ |= 0x00001000;
7879       onChanged();
7880       return this;
7881     }
7882     /**
7883      *
7884      *
7885      * <pre>
7886      * Language of the title/description and other string attributes. Use language
7887      * tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
7888      * For product prediction, this field is ignored and the model automatically
7889      * detects the text language. The [Product][google.cloud.retail.v2.Product]
7890      * can include text in different languages, but duplicating
7891      * [Product][google.cloud.retail.v2.Product]s to provide text in multiple
7892      * languages can result in degraded model performance.
7893      * For product search this field is in use. It defaults to "en-US" if unset.
7894      * </pre>
7895      *
7896      * <code>string language_code = 11;</code>
7897      *
7898      * @return This builder for chaining.
7899      */
clearLanguageCode()7900     public Builder clearLanguageCode() {
7901       languageCode_ = getDefaultInstance().getLanguageCode();
7902       bitField0_ = (bitField0_ & ~0x00001000);
7903       onChanged();
7904       return this;
7905     }
7906     /**
7907      *
7908      *
7909      * <pre>
7910      * Language of the title/description and other string attributes. Use language
7911      * tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
7912      * For product prediction, this field is ignored and the model automatically
7913      * detects the text language. The [Product][google.cloud.retail.v2.Product]
7914      * can include text in different languages, but duplicating
7915      * [Product][google.cloud.retail.v2.Product]s to provide text in multiple
7916      * languages can result in degraded model performance.
7917      * For product search this field is in use. It defaults to "en-US" if unset.
7918      * </pre>
7919      *
7920      * <code>string language_code = 11;</code>
7921      *
7922      * @param value The bytes for languageCode to set.
7923      * @return This builder for chaining.
7924      */
setLanguageCodeBytes(com.google.protobuf.ByteString value)7925     public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
7926       if (value == null) {
7927         throw new NullPointerException();
7928       }
7929       checkByteStringIsUtf8(value);
7930       languageCode_ = value;
7931       bitField0_ |= 0x00001000;
7932       onChanged();
7933       return this;
7934     }
7935 
7936     private com.google.protobuf.MapField<
7937             java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
7938         attributes_;
7939 
7940     private com.google.protobuf.MapField<
7941             java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
internalGetAttributes()7942         internalGetAttributes() {
7943       if (attributes_ == null) {
7944         return com.google.protobuf.MapField.emptyMapField(
7945             AttributesDefaultEntryHolder.defaultEntry);
7946       }
7947       return attributes_;
7948     }
7949 
7950     private com.google.protobuf.MapField<
7951             java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
internalGetMutableAttributes()7952         internalGetMutableAttributes() {
7953       if (attributes_ == null) {
7954         attributes_ =
7955             com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry);
7956       }
7957       if (!attributes_.isMutable()) {
7958         attributes_ = attributes_.copy();
7959       }
7960       bitField0_ |= 0x00002000;
7961       onChanged();
7962       return attributes_;
7963     }
7964 
getAttributesCount()7965     public int getAttributesCount() {
7966       return internalGetAttributes().getMap().size();
7967     }
7968     /**
7969      *
7970      *
7971      * <pre>
7972      * Highly encouraged. Extra product attributes to be included. For example,
7973      * for products, this could include the store name, vendor, style, color, etc.
7974      * These are very strong signals for recommendation model, thus we highly
7975      * recommend providing the attributes here.
7976      * Features that can take on one of a limited number of possible values. Two
7977      * types of features can be set are:
7978      * Textual features. some examples would be the brand/maker of a product, or
7979      * country of a customer. Numerical features. Some examples would be the
7980      * height/weight of a product, or age of a customer.
7981      * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
7982      * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
7983      * }`.
7984      * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
7985      * error is returned:
7986      * * Max entries count: 200.
7987      * * The key must be a UTF-8 encoded string with a length limit of 128
7988      *   characters.
7989      * * For indexable attribute, the key must match the pattern:
7990      *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
7991      *   `KEY_1_LIKE_THIS`.
7992      * * For text attributes, at most 400 values are allowed. Empty values are not
7993      *   allowed. Each value must be a non-empty UTF-8 encoded string with a
7994      *   length limit of 256 characters.
7995      * * For number attributes, at most 400 values are allowed.
7996      * </pre>
7997      *
7998      * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
7999      */
8000     @java.lang.Override
containsAttributes(java.lang.String key)8001     public boolean containsAttributes(java.lang.String key) {
8002       if (key == null) {
8003         throw new NullPointerException("map key");
8004       }
8005       return internalGetAttributes().getMap().containsKey(key);
8006     }
8007     /** Use {@link #getAttributesMap()} instead. */
8008     @java.lang.Override
8009     @java.lang.Deprecated
8010     public java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
getAttributes()8011         getAttributes() {
8012       return getAttributesMap();
8013     }
8014     /**
8015      *
8016      *
8017      * <pre>
8018      * Highly encouraged. Extra product attributes to be included. For example,
8019      * for products, this could include the store name, vendor, style, color, etc.
8020      * These are very strong signals for recommendation model, thus we highly
8021      * recommend providing the attributes here.
8022      * Features that can take on one of a limited number of possible values. Two
8023      * types of features can be set are:
8024      * Textual features. some examples would be the brand/maker of a product, or
8025      * country of a customer. Numerical features. Some examples would be the
8026      * height/weight of a product, or age of a customer.
8027      * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
8028      * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
8029      * }`.
8030      * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
8031      * error is returned:
8032      * * Max entries count: 200.
8033      * * The key must be a UTF-8 encoded string with a length limit of 128
8034      *   characters.
8035      * * For indexable attribute, the key must match the pattern:
8036      *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
8037      *   `KEY_1_LIKE_THIS`.
8038      * * For text attributes, at most 400 values are allowed. Empty values are not
8039      *   allowed. Each value must be a non-empty UTF-8 encoded string with a
8040      *   length limit of 256 characters.
8041      * * For number attributes, at most 400 values are allowed.
8042      * </pre>
8043      *
8044      * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
8045      */
8046     @java.lang.Override
8047     public java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
getAttributesMap()8048         getAttributesMap() {
8049       return internalGetAttributes().getMap();
8050     }
8051     /**
8052      *
8053      *
8054      * <pre>
8055      * Highly encouraged. Extra product attributes to be included. For example,
8056      * for products, this could include the store name, vendor, style, color, etc.
8057      * These are very strong signals for recommendation model, thus we highly
8058      * recommend providing the attributes here.
8059      * Features that can take on one of a limited number of possible values. Two
8060      * types of features can be set are:
8061      * Textual features. some examples would be the brand/maker of a product, or
8062      * country of a customer. Numerical features. Some examples would be the
8063      * height/weight of a product, or age of a customer.
8064      * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
8065      * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
8066      * }`.
8067      * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
8068      * error is returned:
8069      * * Max entries count: 200.
8070      * * The key must be a UTF-8 encoded string with a length limit of 128
8071      *   characters.
8072      * * For indexable attribute, the key must match the pattern:
8073      *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
8074      *   `KEY_1_LIKE_THIS`.
8075      * * For text attributes, at most 400 values are allowed. Empty values are not
8076      *   allowed. Each value must be a non-empty UTF-8 encoded string with a
8077      *   length limit of 256 characters.
8078      * * For number attributes, at most 400 values are allowed.
8079      * </pre>
8080      *
8081      * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
8082      */
8083     @java.lang.Override
getAttributesOrDefault( java.lang.String key, com.google.cloud.retail.v2.CustomAttribute defaultValue)8084     public /* nullable */ com.google.cloud.retail.v2.CustomAttribute getAttributesOrDefault(
8085         java.lang.String key,
8086         /* nullable */
8087         com.google.cloud.retail.v2.CustomAttribute defaultValue) {
8088       if (key == null) {
8089         throw new NullPointerException("map key");
8090       }
8091       java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute> map =
8092           internalGetAttributes().getMap();
8093       return map.containsKey(key) ? map.get(key) : defaultValue;
8094     }
8095     /**
8096      *
8097      *
8098      * <pre>
8099      * Highly encouraged. Extra product attributes to be included. For example,
8100      * for products, this could include the store name, vendor, style, color, etc.
8101      * These are very strong signals for recommendation model, thus we highly
8102      * recommend providing the attributes here.
8103      * Features that can take on one of a limited number of possible values. Two
8104      * types of features can be set are:
8105      * Textual features. some examples would be the brand/maker of a product, or
8106      * country of a customer. Numerical features. Some examples would be the
8107      * height/weight of a product, or age of a customer.
8108      * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
8109      * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
8110      * }`.
8111      * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
8112      * error is returned:
8113      * * Max entries count: 200.
8114      * * The key must be a UTF-8 encoded string with a length limit of 128
8115      *   characters.
8116      * * For indexable attribute, the key must match the pattern:
8117      *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
8118      *   `KEY_1_LIKE_THIS`.
8119      * * For text attributes, at most 400 values are allowed. Empty values are not
8120      *   allowed. Each value must be a non-empty UTF-8 encoded string with a
8121      *   length limit of 256 characters.
8122      * * For number attributes, at most 400 values are allowed.
8123      * </pre>
8124      *
8125      * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
8126      */
8127     @java.lang.Override
getAttributesOrThrow(java.lang.String key)8128     public com.google.cloud.retail.v2.CustomAttribute getAttributesOrThrow(java.lang.String key) {
8129       if (key == null) {
8130         throw new NullPointerException("map key");
8131       }
8132       java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute> map =
8133           internalGetAttributes().getMap();
8134       if (!map.containsKey(key)) {
8135         throw new java.lang.IllegalArgumentException();
8136       }
8137       return map.get(key);
8138     }
8139 
clearAttributes()8140     public Builder clearAttributes() {
8141       bitField0_ = (bitField0_ & ~0x00002000);
8142       internalGetMutableAttributes().getMutableMap().clear();
8143       return this;
8144     }
8145     /**
8146      *
8147      *
8148      * <pre>
8149      * Highly encouraged. Extra product attributes to be included. For example,
8150      * for products, this could include the store name, vendor, style, color, etc.
8151      * These are very strong signals for recommendation model, thus we highly
8152      * recommend providing the attributes here.
8153      * Features that can take on one of a limited number of possible values. Two
8154      * types of features can be set are:
8155      * Textual features. some examples would be the brand/maker of a product, or
8156      * country of a customer. Numerical features. Some examples would be the
8157      * height/weight of a product, or age of a customer.
8158      * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
8159      * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
8160      * }`.
8161      * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
8162      * error is returned:
8163      * * Max entries count: 200.
8164      * * The key must be a UTF-8 encoded string with a length limit of 128
8165      *   characters.
8166      * * For indexable attribute, the key must match the pattern:
8167      *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
8168      *   `KEY_1_LIKE_THIS`.
8169      * * For text attributes, at most 400 values are allowed. Empty values are not
8170      *   allowed. Each value must be a non-empty UTF-8 encoded string with a
8171      *   length limit of 256 characters.
8172      * * For number attributes, at most 400 values are allowed.
8173      * </pre>
8174      *
8175      * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
8176      */
removeAttributes(java.lang.String key)8177     public Builder removeAttributes(java.lang.String key) {
8178       if (key == null) {
8179         throw new NullPointerException("map key");
8180       }
8181       internalGetMutableAttributes().getMutableMap().remove(key);
8182       return this;
8183     }
8184     /** Use alternate mutation accessors instead. */
8185     @java.lang.Deprecated
8186     public java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute>
getMutableAttributes()8187         getMutableAttributes() {
8188       bitField0_ |= 0x00002000;
8189       return internalGetMutableAttributes().getMutableMap();
8190     }
8191     /**
8192      *
8193      *
8194      * <pre>
8195      * Highly encouraged. Extra product attributes to be included. For example,
8196      * for products, this could include the store name, vendor, style, color, etc.
8197      * These are very strong signals for recommendation model, thus we highly
8198      * recommend providing the attributes here.
8199      * Features that can take on one of a limited number of possible values. Two
8200      * types of features can be set are:
8201      * Textual features. some examples would be the brand/maker of a product, or
8202      * country of a customer. Numerical features. Some examples would be the
8203      * height/weight of a product, or age of a customer.
8204      * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
8205      * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
8206      * }`.
8207      * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
8208      * error is returned:
8209      * * Max entries count: 200.
8210      * * The key must be a UTF-8 encoded string with a length limit of 128
8211      *   characters.
8212      * * For indexable attribute, the key must match the pattern:
8213      *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
8214      *   `KEY_1_LIKE_THIS`.
8215      * * For text attributes, at most 400 values are allowed. Empty values are not
8216      *   allowed. Each value must be a non-empty UTF-8 encoded string with a
8217      *   length limit of 256 characters.
8218      * * For number attributes, at most 400 values are allowed.
8219      * </pre>
8220      *
8221      * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
8222      */
putAttributes( java.lang.String key, com.google.cloud.retail.v2.CustomAttribute value)8223     public Builder putAttributes(
8224         java.lang.String key, com.google.cloud.retail.v2.CustomAttribute value) {
8225       if (key == null) {
8226         throw new NullPointerException("map key");
8227       }
8228       if (value == null) {
8229         throw new NullPointerException("map value");
8230       }
8231       internalGetMutableAttributes().getMutableMap().put(key, value);
8232       bitField0_ |= 0x00002000;
8233       return this;
8234     }
8235     /**
8236      *
8237      *
8238      * <pre>
8239      * Highly encouraged. Extra product attributes to be included. For example,
8240      * for products, this could include the store name, vendor, style, color, etc.
8241      * These are very strong signals for recommendation model, thus we highly
8242      * recommend providing the attributes here.
8243      * Features that can take on one of a limited number of possible values. Two
8244      * types of features can be set are:
8245      * Textual features. some examples would be the brand/maker of a product, or
8246      * country of a customer. Numerical features. Some examples would be the
8247      * height/weight of a product, or age of a customer.
8248      * For example: `{ "vendor": {"text": ["vendor123", "vendor456"]},
8249      * "lengths_cm": {"numbers":[2.3, 15.4]}, "heights_cm": {"numbers":[8.1, 6.4]}
8250      * }`.
8251      * This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
8252      * error is returned:
8253      * * Max entries count: 200.
8254      * * The key must be a UTF-8 encoded string with a length limit of 128
8255      *   characters.
8256      * * For indexable attribute, the key must match the pattern:
8257      *   `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
8258      *   `KEY_1_LIKE_THIS`.
8259      * * For text attributes, at most 400 values are allowed. Empty values are not
8260      *   allowed. Each value must be a non-empty UTF-8 encoded string with a
8261      *   length limit of 256 characters.
8262      * * For number attributes, at most 400 values are allowed.
8263      * </pre>
8264      *
8265      * <code>map&lt;string, .google.cloud.retail.v2.CustomAttribute&gt; attributes = 12;</code>
8266      */
putAllAttributes( java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute> values)8267     public Builder putAllAttributes(
8268         java.util.Map<java.lang.String, com.google.cloud.retail.v2.CustomAttribute> values) {
8269       internalGetMutableAttributes().getMutableMap().putAll(values);
8270       bitField0_ |= 0x00002000;
8271       return this;
8272     }
8273 
8274     private com.google.protobuf.LazyStringList tags_ =
8275         com.google.protobuf.LazyStringArrayList.EMPTY;
8276 
ensureTagsIsMutable()8277     private void ensureTagsIsMutable() {
8278       if (!((bitField0_ & 0x00004000) != 0)) {
8279         tags_ = new com.google.protobuf.LazyStringArrayList(tags_);
8280         bitField0_ |= 0x00004000;
8281       }
8282     }
8283     /**
8284      *
8285      *
8286      * <pre>
8287      * Custom tags associated with the product.
8288      * At most 250 values are allowed per
8289      * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
8290      * encoded string with a length limit of 1,000 characters. Otherwise, an
8291      * INVALID_ARGUMENT error is returned.
8292      * This tag can be used for filtering recommendation results by passing the
8293      * tag as part of the
8294      * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
8295      * Corresponding properties: Google Merchant Center property
8296      * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
8297      * </pre>
8298      *
8299      * <code>repeated string tags = 13;</code>
8300      *
8301      * @return A list containing the tags.
8302      */
getTagsList()8303     public com.google.protobuf.ProtocolStringList getTagsList() {
8304       return tags_.getUnmodifiableView();
8305     }
8306     /**
8307      *
8308      *
8309      * <pre>
8310      * Custom tags associated with the product.
8311      * At most 250 values are allowed per
8312      * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
8313      * encoded string with a length limit of 1,000 characters. Otherwise, an
8314      * INVALID_ARGUMENT error is returned.
8315      * This tag can be used for filtering recommendation results by passing the
8316      * tag as part of the
8317      * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
8318      * Corresponding properties: Google Merchant Center property
8319      * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
8320      * </pre>
8321      *
8322      * <code>repeated string tags = 13;</code>
8323      *
8324      * @return The count of tags.
8325      */
getTagsCount()8326     public int getTagsCount() {
8327       return tags_.size();
8328     }
8329     /**
8330      *
8331      *
8332      * <pre>
8333      * Custom tags associated with the product.
8334      * At most 250 values are allowed per
8335      * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
8336      * encoded string with a length limit of 1,000 characters. Otherwise, an
8337      * INVALID_ARGUMENT error is returned.
8338      * This tag can be used for filtering recommendation results by passing the
8339      * tag as part of the
8340      * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
8341      * Corresponding properties: Google Merchant Center property
8342      * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
8343      * </pre>
8344      *
8345      * <code>repeated string tags = 13;</code>
8346      *
8347      * @param index The index of the element to return.
8348      * @return The tags at the given index.
8349      */
getTags(int index)8350     public java.lang.String getTags(int index) {
8351       return tags_.get(index);
8352     }
8353     /**
8354      *
8355      *
8356      * <pre>
8357      * Custom tags associated with the product.
8358      * At most 250 values are allowed per
8359      * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
8360      * encoded string with a length limit of 1,000 characters. Otherwise, an
8361      * INVALID_ARGUMENT error is returned.
8362      * This tag can be used for filtering recommendation results by passing the
8363      * tag as part of the
8364      * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
8365      * Corresponding properties: Google Merchant Center property
8366      * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
8367      * </pre>
8368      *
8369      * <code>repeated string tags = 13;</code>
8370      *
8371      * @param index The index of the value to return.
8372      * @return The bytes of the tags at the given index.
8373      */
getTagsBytes(int index)8374     public com.google.protobuf.ByteString getTagsBytes(int index) {
8375       return tags_.getByteString(index);
8376     }
8377     /**
8378      *
8379      *
8380      * <pre>
8381      * Custom tags associated with the product.
8382      * At most 250 values are allowed per
8383      * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
8384      * encoded string with a length limit of 1,000 characters. Otherwise, an
8385      * INVALID_ARGUMENT error is returned.
8386      * This tag can be used for filtering recommendation results by passing the
8387      * tag as part of the
8388      * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
8389      * Corresponding properties: Google Merchant Center property
8390      * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
8391      * </pre>
8392      *
8393      * <code>repeated string tags = 13;</code>
8394      *
8395      * @param index The index to set the value at.
8396      * @param value The tags to set.
8397      * @return This builder for chaining.
8398      */
setTags(int index, java.lang.String value)8399     public Builder setTags(int index, java.lang.String value) {
8400       if (value == null) {
8401         throw new NullPointerException();
8402       }
8403       ensureTagsIsMutable();
8404       tags_.set(index, value);
8405       onChanged();
8406       return this;
8407     }
8408     /**
8409      *
8410      *
8411      * <pre>
8412      * Custom tags associated with the product.
8413      * At most 250 values are allowed per
8414      * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
8415      * encoded string with a length limit of 1,000 characters. Otherwise, an
8416      * INVALID_ARGUMENT error is returned.
8417      * This tag can be used for filtering recommendation results by passing the
8418      * tag as part of the
8419      * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
8420      * Corresponding properties: Google Merchant Center property
8421      * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
8422      * </pre>
8423      *
8424      * <code>repeated string tags = 13;</code>
8425      *
8426      * @param value The tags to add.
8427      * @return This builder for chaining.
8428      */
addTags(java.lang.String value)8429     public Builder addTags(java.lang.String value) {
8430       if (value == null) {
8431         throw new NullPointerException();
8432       }
8433       ensureTagsIsMutable();
8434       tags_.add(value);
8435       onChanged();
8436       return this;
8437     }
8438     /**
8439      *
8440      *
8441      * <pre>
8442      * Custom tags associated with the product.
8443      * At most 250 values are allowed per
8444      * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
8445      * encoded string with a length limit of 1,000 characters. Otherwise, an
8446      * INVALID_ARGUMENT error is returned.
8447      * This tag can be used for filtering recommendation results by passing the
8448      * tag as part of the
8449      * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
8450      * Corresponding properties: Google Merchant Center property
8451      * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
8452      * </pre>
8453      *
8454      * <code>repeated string tags = 13;</code>
8455      *
8456      * @param values The tags to add.
8457      * @return This builder for chaining.
8458      */
addAllTags(java.lang.Iterable<java.lang.String> values)8459     public Builder addAllTags(java.lang.Iterable<java.lang.String> values) {
8460       ensureTagsIsMutable();
8461       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_);
8462       onChanged();
8463       return this;
8464     }
8465     /**
8466      *
8467      *
8468      * <pre>
8469      * Custom tags associated with the product.
8470      * At most 250 values are allowed per
8471      * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
8472      * encoded string with a length limit of 1,000 characters. Otherwise, an
8473      * INVALID_ARGUMENT error is returned.
8474      * This tag can be used for filtering recommendation results by passing the
8475      * tag as part of the
8476      * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
8477      * Corresponding properties: Google Merchant Center property
8478      * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
8479      * </pre>
8480      *
8481      * <code>repeated string tags = 13;</code>
8482      *
8483      * @return This builder for chaining.
8484      */
clearTags()8485     public Builder clearTags() {
8486       tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
8487       bitField0_ = (bitField0_ & ~0x00004000);
8488       onChanged();
8489       return this;
8490     }
8491     /**
8492      *
8493      *
8494      * <pre>
8495      * Custom tags associated with the product.
8496      * At most 250 values are allowed per
8497      * [Product][google.cloud.retail.v2.Product]. This value must be a UTF-8
8498      * encoded string with a length limit of 1,000 characters. Otherwise, an
8499      * INVALID_ARGUMENT error is returned.
8500      * This tag can be used for filtering recommendation results by passing the
8501      * tag as part of the
8502      * [PredictRequest.filter][google.cloud.retail.v2.PredictRequest.filter].
8503      * Corresponding properties: Google Merchant Center property
8504      * [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
8505      * </pre>
8506      *
8507      * <code>repeated string tags = 13;</code>
8508      *
8509      * @param value The bytes of the tags to add.
8510      * @return This builder for chaining.
8511      */
addTagsBytes(com.google.protobuf.ByteString value)8512     public Builder addTagsBytes(com.google.protobuf.ByteString value) {
8513       if (value == null) {
8514         throw new NullPointerException();
8515       }
8516       checkByteStringIsUtf8(value);
8517       ensureTagsIsMutable();
8518       tags_.add(value);
8519       onChanged();
8520       return this;
8521     }
8522 
8523     private com.google.cloud.retail.v2.PriceInfo priceInfo_;
8524     private com.google.protobuf.SingleFieldBuilderV3<
8525             com.google.cloud.retail.v2.PriceInfo,
8526             com.google.cloud.retail.v2.PriceInfo.Builder,
8527             com.google.cloud.retail.v2.PriceInfoOrBuilder>
8528         priceInfoBuilder_;
8529     /**
8530      *
8531      *
8532      * <pre>
8533      * Product price and cost information.
8534      * Corresponding properties: Google Merchant Center property
8535      * [price](https://support.google.com/merchants/answer/6324371).
8536      * </pre>
8537      *
8538      * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
8539      *
8540      * @return Whether the priceInfo field is set.
8541      */
hasPriceInfo()8542     public boolean hasPriceInfo() {
8543       return ((bitField0_ & 0x00008000) != 0);
8544     }
8545     /**
8546      *
8547      *
8548      * <pre>
8549      * Product price and cost information.
8550      * Corresponding properties: Google Merchant Center property
8551      * [price](https://support.google.com/merchants/answer/6324371).
8552      * </pre>
8553      *
8554      * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
8555      *
8556      * @return The priceInfo.
8557      */
getPriceInfo()8558     public com.google.cloud.retail.v2.PriceInfo getPriceInfo() {
8559       if (priceInfoBuilder_ == null) {
8560         return priceInfo_ == null
8561             ? com.google.cloud.retail.v2.PriceInfo.getDefaultInstance()
8562             : priceInfo_;
8563       } else {
8564         return priceInfoBuilder_.getMessage();
8565       }
8566     }
8567     /**
8568      *
8569      *
8570      * <pre>
8571      * Product price and cost information.
8572      * Corresponding properties: Google Merchant Center property
8573      * [price](https://support.google.com/merchants/answer/6324371).
8574      * </pre>
8575      *
8576      * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
8577      */
setPriceInfo(com.google.cloud.retail.v2.PriceInfo value)8578     public Builder setPriceInfo(com.google.cloud.retail.v2.PriceInfo value) {
8579       if (priceInfoBuilder_ == null) {
8580         if (value == null) {
8581           throw new NullPointerException();
8582         }
8583         priceInfo_ = value;
8584       } else {
8585         priceInfoBuilder_.setMessage(value);
8586       }
8587       bitField0_ |= 0x00008000;
8588       onChanged();
8589       return this;
8590     }
8591     /**
8592      *
8593      *
8594      * <pre>
8595      * Product price and cost information.
8596      * Corresponding properties: Google Merchant Center property
8597      * [price](https://support.google.com/merchants/answer/6324371).
8598      * </pre>
8599      *
8600      * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
8601      */
setPriceInfo(com.google.cloud.retail.v2.PriceInfo.Builder builderForValue)8602     public Builder setPriceInfo(com.google.cloud.retail.v2.PriceInfo.Builder builderForValue) {
8603       if (priceInfoBuilder_ == null) {
8604         priceInfo_ = builderForValue.build();
8605       } else {
8606         priceInfoBuilder_.setMessage(builderForValue.build());
8607       }
8608       bitField0_ |= 0x00008000;
8609       onChanged();
8610       return this;
8611     }
8612     /**
8613      *
8614      *
8615      * <pre>
8616      * Product price and cost information.
8617      * Corresponding properties: Google Merchant Center property
8618      * [price](https://support.google.com/merchants/answer/6324371).
8619      * </pre>
8620      *
8621      * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
8622      */
mergePriceInfo(com.google.cloud.retail.v2.PriceInfo value)8623     public Builder mergePriceInfo(com.google.cloud.retail.v2.PriceInfo value) {
8624       if (priceInfoBuilder_ == null) {
8625         if (((bitField0_ & 0x00008000) != 0)
8626             && priceInfo_ != null
8627             && priceInfo_ != com.google.cloud.retail.v2.PriceInfo.getDefaultInstance()) {
8628           getPriceInfoBuilder().mergeFrom(value);
8629         } else {
8630           priceInfo_ = value;
8631         }
8632       } else {
8633         priceInfoBuilder_.mergeFrom(value);
8634       }
8635       bitField0_ |= 0x00008000;
8636       onChanged();
8637       return this;
8638     }
8639     /**
8640      *
8641      *
8642      * <pre>
8643      * Product price and cost information.
8644      * Corresponding properties: Google Merchant Center property
8645      * [price](https://support.google.com/merchants/answer/6324371).
8646      * </pre>
8647      *
8648      * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
8649      */
clearPriceInfo()8650     public Builder clearPriceInfo() {
8651       bitField0_ = (bitField0_ & ~0x00008000);
8652       priceInfo_ = null;
8653       if (priceInfoBuilder_ != null) {
8654         priceInfoBuilder_.dispose();
8655         priceInfoBuilder_ = null;
8656       }
8657       onChanged();
8658       return this;
8659     }
8660     /**
8661      *
8662      *
8663      * <pre>
8664      * Product price and cost information.
8665      * Corresponding properties: Google Merchant Center property
8666      * [price](https://support.google.com/merchants/answer/6324371).
8667      * </pre>
8668      *
8669      * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
8670      */
getPriceInfoBuilder()8671     public com.google.cloud.retail.v2.PriceInfo.Builder getPriceInfoBuilder() {
8672       bitField0_ |= 0x00008000;
8673       onChanged();
8674       return getPriceInfoFieldBuilder().getBuilder();
8675     }
8676     /**
8677      *
8678      *
8679      * <pre>
8680      * Product price and cost information.
8681      * Corresponding properties: Google Merchant Center property
8682      * [price](https://support.google.com/merchants/answer/6324371).
8683      * </pre>
8684      *
8685      * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
8686      */
getPriceInfoOrBuilder()8687     public com.google.cloud.retail.v2.PriceInfoOrBuilder getPriceInfoOrBuilder() {
8688       if (priceInfoBuilder_ != null) {
8689         return priceInfoBuilder_.getMessageOrBuilder();
8690       } else {
8691         return priceInfo_ == null
8692             ? com.google.cloud.retail.v2.PriceInfo.getDefaultInstance()
8693             : priceInfo_;
8694       }
8695     }
8696     /**
8697      *
8698      *
8699      * <pre>
8700      * Product price and cost information.
8701      * Corresponding properties: Google Merchant Center property
8702      * [price](https://support.google.com/merchants/answer/6324371).
8703      * </pre>
8704      *
8705      * <code>.google.cloud.retail.v2.PriceInfo price_info = 14;</code>
8706      */
8707     private com.google.protobuf.SingleFieldBuilderV3<
8708             com.google.cloud.retail.v2.PriceInfo,
8709             com.google.cloud.retail.v2.PriceInfo.Builder,
8710             com.google.cloud.retail.v2.PriceInfoOrBuilder>
getPriceInfoFieldBuilder()8711         getPriceInfoFieldBuilder() {
8712       if (priceInfoBuilder_ == null) {
8713         priceInfoBuilder_ =
8714             new com.google.protobuf.SingleFieldBuilderV3<
8715                 com.google.cloud.retail.v2.PriceInfo,
8716                 com.google.cloud.retail.v2.PriceInfo.Builder,
8717                 com.google.cloud.retail.v2.PriceInfoOrBuilder>(
8718                 getPriceInfo(), getParentForChildren(), isClean());
8719         priceInfo_ = null;
8720       }
8721       return priceInfoBuilder_;
8722     }
8723 
8724     private com.google.cloud.retail.v2.Rating rating_;
8725     private com.google.protobuf.SingleFieldBuilderV3<
8726             com.google.cloud.retail.v2.Rating,
8727             com.google.cloud.retail.v2.Rating.Builder,
8728             com.google.cloud.retail.v2.RatingOrBuilder>
8729         ratingBuilder_;
8730     /**
8731      *
8732      *
8733      * <pre>
8734      * The rating of this product.
8735      * </pre>
8736      *
8737      * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
8738      *
8739      * @return Whether the rating field is set.
8740      */
hasRating()8741     public boolean hasRating() {
8742       return ((bitField0_ & 0x00010000) != 0);
8743     }
8744     /**
8745      *
8746      *
8747      * <pre>
8748      * The rating of this product.
8749      * </pre>
8750      *
8751      * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
8752      *
8753      * @return The rating.
8754      */
getRating()8755     public com.google.cloud.retail.v2.Rating getRating() {
8756       if (ratingBuilder_ == null) {
8757         return rating_ == null ? com.google.cloud.retail.v2.Rating.getDefaultInstance() : rating_;
8758       } else {
8759         return ratingBuilder_.getMessage();
8760       }
8761     }
8762     /**
8763      *
8764      *
8765      * <pre>
8766      * The rating of this product.
8767      * </pre>
8768      *
8769      * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
8770      */
setRating(com.google.cloud.retail.v2.Rating value)8771     public Builder setRating(com.google.cloud.retail.v2.Rating value) {
8772       if (ratingBuilder_ == null) {
8773         if (value == null) {
8774           throw new NullPointerException();
8775         }
8776         rating_ = value;
8777       } else {
8778         ratingBuilder_.setMessage(value);
8779       }
8780       bitField0_ |= 0x00010000;
8781       onChanged();
8782       return this;
8783     }
8784     /**
8785      *
8786      *
8787      * <pre>
8788      * The rating of this product.
8789      * </pre>
8790      *
8791      * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
8792      */
setRating(com.google.cloud.retail.v2.Rating.Builder builderForValue)8793     public Builder setRating(com.google.cloud.retail.v2.Rating.Builder builderForValue) {
8794       if (ratingBuilder_ == null) {
8795         rating_ = builderForValue.build();
8796       } else {
8797         ratingBuilder_.setMessage(builderForValue.build());
8798       }
8799       bitField0_ |= 0x00010000;
8800       onChanged();
8801       return this;
8802     }
8803     /**
8804      *
8805      *
8806      * <pre>
8807      * The rating of this product.
8808      * </pre>
8809      *
8810      * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
8811      */
mergeRating(com.google.cloud.retail.v2.Rating value)8812     public Builder mergeRating(com.google.cloud.retail.v2.Rating value) {
8813       if (ratingBuilder_ == null) {
8814         if (((bitField0_ & 0x00010000) != 0)
8815             && rating_ != null
8816             && rating_ != com.google.cloud.retail.v2.Rating.getDefaultInstance()) {
8817           getRatingBuilder().mergeFrom(value);
8818         } else {
8819           rating_ = value;
8820         }
8821       } else {
8822         ratingBuilder_.mergeFrom(value);
8823       }
8824       bitField0_ |= 0x00010000;
8825       onChanged();
8826       return this;
8827     }
8828     /**
8829      *
8830      *
8831      * <pre>
8832      * The rating of this product.
8833      * </pre>
8834      *
8835      * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
8836      */
clearRating()8837     public Builder clearRating() {
8838       bitField0_ = (bitField0_ & ~0x00010000);
8839       rating_ = null;
8840       if (ratingBuilder_ != null) {
8841         ratingBuilder_.dispose();
8842         ratingBuilder_ = null;
8843       }
8844       onChanged();
8845       return this;
8846     }
8847     /**
8848      *
8849      *
8850      * <pre>
8851      * The rating of this product.
8852      * </pre>
8853      *
8854      * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
8855      */
getRatingBuilder()8856     public com.google.cloud.retail.v2.Rating.Builder getRatingBuilder() {
8857       bitField0_ |= 0x00010000;
8858       onChanged();
8859       return getRatingFieldBuilder().getBuilder();
8860     }
8861     /**
8862      *
8863      *
8864      * <pre>
8865      * The rating of this product.
8866      * </pre>
8867      *
8868      * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
8869      */
getRatingOrBuilder()8870     public com.google.cloud.retail.v2.RatingOrBuilder getRatingOrBuilder() {
8871       if (ratingBuilder_ != null) {
8872         return ratingBuilder_.getMessageOrBuilder();
8873       } else {
8874         return rating_ == null ? com.google.cloud.retail.v2.Rating.getDefaultInstance() : rating_;
8875       }
8876     }
8877     /**
8878      *
8879      *
8880      * <pre>
8881      * The rating of this product.
8882      * </pre>
8883      *
8884      * <code>.google.cloud.retail.v2.Rating rating = 15;</code>
8885      */
8886     private com.google.protobuf.SingleFieldBuilderV3<
8887             com.google.cloud.retail.v2.Rating,
8888             com.google.cloud.retail.v2.Rating.Builder,
8889             com.google.cloud.retail.v2.RatingOrBuilder>
getRatingFieldBuilder()8890         getRatingFieldBuilder() {
8891       if (ratingBuilder_ == null) {
8892         ratingBuilder_ =
8893             new com.google.protobuf.SingleFieldBuilderV3<
8894                 com.google.cloud.retail.v2.Rating,
8895                 com.google.cloud.retail.v2.Rating.Builder,
8896                 com.google.cloud.retail.v2.RatingOrBuilder>(
8897                 getRating(), getParentForChildren(), isClean());
8898         rating_ = null;
8899       }
8900       return ratingBuilder_;
8901     }
8902 
8903     private com.google.protobuf.Timestamp availableTime_;
8904     private com.google.protobuf.SingleFieldBuilderV3<
8905             com.google.protobuf.Timestamp,
8906             com.google.protobuf.Timestamp.Builder,
8907             com.google.protobuf.TimestampOrBuilder>
8908         availableTimeBuilder_;
8909     /**
8910      *
8911      *
8912      * <pre>
8913      * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
8914      * available for
8915      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
8916      * that this is only applicable to
8917      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
8918      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
8919      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
8920      * </pre>
8921      *
8922      * <code>.google.protobuf.Timestamp available_time = 18;</code>
8923      *
8924      * @return Whether the availableTime field is set.
8925      */
hasAvailableTime()8926     public boolean hasAvailableTime() {
8927       return ((bitField0_ & 0x00020000) != 0);
8928     }
8929     /**
8930      *
8931      *
8932      * <pre>
8933      * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
8934      * available for
8935      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
8936      * that this is only applicable to
8937      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
8938      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
8939      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
8940      * </pre>
8941      *
8942      * <code>.google.protobuf.Timestamp available_time = 18;</code>
8943      *
8944      * @return The availableTime.
8945      */
getAvailableTime()8946     public com.google.protobuf.Timestamp getAvailableTime() {
8947       if (availableTimeBuilder_ == null) {
8948         return availableTime_ == null
8949             ? com.google.protobuf.Timestamp.getDefaultInstance()
8950             : availableTime_;
8951       } else {
8952         return availableTimeBuilder_.getMessage();
8953       }
8954     }
8955     /**
8956      *
8957      *
8958      * <pre>
8959      * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
8960      * available for
8961      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
8962      * that this is only applicable to
8963      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
8964      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
8965      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
8966      * </pre>
8967      *
8968      * <code>.google.protobuf.Timestamp available_time = 18;</code>
8969      */
setAvailableTime(com.google.protobuf.Timestamp value)8970     public Builder setAvailableTime(com.google.protobuf.Timestamp value) {
8971       if (availableTimeBuilder_ == null) {
8972         if (value == null) {
8973           throw new NullPointerException();
8974         }
8975         availableTime_ = value;
8976       } else {
8977         availableTimeBuilder_.setMessage(value);
8978       }
8979       bitField0_ |= 0x00020000;
8980       onChanged();
8981       return this;
8982     }
8983     /**
8984      *
8985      *
8986      * <pre>
8987      * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
8988      * available for
8989      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
8990      * that this is only applicable to
8991      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
8992      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
8993      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
8994      * </pre>
8995      *
8996      * <code>.google.protobuf.Timestamp available_time = 18;</code>
8997      */
setAvailableTime(com.google.protobuf.Timestamp.Builder builderForValue)8998     public Builder setAvailableTime(com.google.protobuf.Timestamp.Builder builderForValue) {
8999       if (availableTimeBuilder_ == null) {
9000         availableTime_ = builderForValue.build();
9001       } else {
9002         availableTimeBuilder_.setMessage(builderForValue.build());
9003       }
9004       bitField0_ |= 0x00020000;
9005       onChanged();
9006       return this;
9007     }
9008     /**
9009      *
9010      *
9011      * <pre>
9012      * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
9013      * available for
9014      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
9015      * that this is only applicable to
9016      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
9017      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
9018      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
9019      * </pre>
9020      *
9021      * <code>.google.protobuf.Timestamp available_time = 18;</code>
9022      */
mergeAvailableTime(com.google.protobuf.Timestamp value)9023     public Builder mergeAvailableTime(com.google.protobuf.Timestamp value) {
9024       if (availableTimeBuilder_ == null) {
9025         if (((bitField0_ & 0x00020000) != 0)
9026             && availableTime_ != null
9027             && availableTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
9028           getAvailableTimeBuilder().mergeFrom(value);
9029         } else {
9030           availableTime_ = value;
9031         }
9032       } else {
9033         availableTimeBuilder_.mergeFrom(value);
9034       }
9035       bitField0_ |= 0x00020000;
9036       onChanged();
9037       return this;
9038     }
9039     /**
9040      *
9041      *
9042      * <pre>
9043      * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
9044      * available for
9045      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
9046      * that this is only applicable to
9047      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
9048      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
9049      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
9050      * </pre>
9051      *
9052      * <code>.google.protobuf.Timestamp available_time = 18;</code>
9053      */
clearAvailableTime()9054     public Builder clearAvailableTime() {
9055       bitField0_ = (bitField0_ & ~0x00020000);
9056       availableTime_ = null;
9057       if (availableTimeBuilder_ != null) {
9058         availableTimeBuilder_.dispose();
9059         availableTimeBuilder_ = null;
9060       }
9061       onChanged();
9062       return this;
9063     }
9064     /**
9065      *
9066      *
9067      * <pre>
9068      * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
9069      * available for
9070      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
9071      * that this is only applicable to
9072      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
9073      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
9074      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
9075      * </pre>
9076      *
9077      * <code>.google.protobuf.Timestamp available_time = 18;</code>
9078      */
getAvailableTimeBuilder()9079     public com.google.protobuf.Timestamp.Builder getAvailableTimeBuilder() {
9080       bitField0_ |= 0x00020000;
9081       onChanged();
9082       return getAvailableTimeFieldBuilder().getBuilder();
9083     }
9084     /**
9085      *
9086      *
9087      * <pre>
9088      * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
9089      * available for
9090      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
9091      * that this is only applicable to
9092      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
9093      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
9094      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
9095      * </pre>
9096      *
9097      * <code>.google.protobuf.Timestamp available_time = 18;</code>
9098      */
getAvailableTimeOrBuilder()9099     public com.google.protobuf.TimestampOrBuilder getAvailableTimeOrBuilder() {
9100       if (availableTimeBuilder_ != null) {
9101         return availableTimeBuilder_.getMessageOrBuilder();
9102       } else {
9103         return availableTime_ == null
9104             ? com.google.protobuf.Timestamp.getDefaultInstance()
9105             : availableTime_;
9106       }
9107     }
9108     /**
9109      *
9110      *
9111      * <pre>
9112      * The timestamp when this [Product][google.cloud.retail.v2.Product] becomes
9113      * available for
9114      * [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note
9115      * that this is only applicable to
9116      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
9117      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and
9118      * ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
9119      * </pre>
9120      *
9121      * <code>.google.protobuf.Timestamp available_time = 18;</code>
9122      */
9123     private com.google.protobuf.SingleFieldBuilderV3<
9124             com.google.protobuf.Timestamp,
9125             com.google.protobuf.Timestamp.Builder,
9126             com.google.protobuf.TimestampOrBuilder>
getAvailableTimeFieldBuilder()9127         getAvailableTimeFieldBuilder() {
9128       if (availableTimeBuilder_ == null) {
9129         availableTimeBuilder_ =
9130             new com.google.protobuf.SingleFieldBuilderV3<
9131                 com.google.protobuf.Timestamp,
9132                 com.google.protobuf.Timestamp.Builder,
9133                 com.google.protobuf.TimestampOrBuilder>(
9134                 getAvailableTime(), getParentForChildren(), isClean());
9135         availableTime_ = null;
9136       }
9137       return availableTimeBuilder_;
9138     }
9139 
9140     private int availability_ = 0;
9141     /**
9142      *
9143      *
9144      * <pre>
9145      * The online availability of the [Product][google.cloud.retail.v2.Product].
9146      * Default to
9147      * [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK].
9148      * Corresponding properties: Google Merchant Center property
9149      * [availability](https://support.google.com/merchants/answer/6324448).
9150      * Schema.org property [Offer.availability](https://schema.org/availability).
9151      * </pre>
9152      *
9153      * <code>.google.cloud.retail.v2.Product.Availability availability = 19;</code>
9154      *
9155      * @return The enum numeric value on the wire for availability.
9156      */
9157     @java.lang.Override
getAvailabilityValue()9158     public int getAvailabilityValue() {
9159       return availability_;
9160     }
9161     /**
9162      *
9163      *
9164      * <pre>
9165      * The online availability of the [Product][google.cloud.retail.v2.Product].
9166      * Default to
9167      * [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK].
9168      * Corresponding properties: Google Merchant Center property
9169      * [availability](https://support.google.com/merchants/answer/6324448).
9170      * Schema.org property [Offer.availability](https://schema.org/availability).
9171      * </pre>
9172      *
9173      * <code>.google.cloud.retail.v2.Product.Availability availability = 19;</code>
9174      *
9175      * @param value The enum numeric value on the wire for availability to set.
9176      * @return This builder for chaining.
9177      */
setAvailabilityValue(int value)9178     public Builder setAvailabilityValue(int value) {
9179       availability_ = value;
9180       bitField0_ |= 0x00040000;
9181       onChanged();
9182       return this;
9183     }
9184     /**
9185      *
9186      *
9187      * <pre>
9188      * The online availability of the [Product][google.cloud.retail.v2.Product].
9189      * Default to
9190      * [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK].
9191      * Corresponding properties: Google Merchant Center property
9192      * [availability](https://support.google.com/merchants/answer/6324448).
9193      * Schema.org property [Offer.availability](https://schema.org/availability).
9194      * </pre>
9195      *
9196      * <code>.google.cloud.retail.v2.Product.Availability availability = 19;</code>
9197      *
9198      * @return The availability.
9199      */
9200     @java.lang.Override
getAvailability()9201     public com.google.cloud.retail.v2.Product.Availability getAvailability() {
9202       com.google.cloud.retail.v2.Product.Availability result =
9203           com.google.cloud.retail.v2.Product.Availability.forNumber(availability_);
9204       return result == null ? com.google.cloud.retail.v2.Product.Availability.UNRECOGNIZED : result;
9205     }
9206     /**
9207      *
9208      *
9209      * <pre>
9210      * The online availability of the [Product][google.cloud.retail.v2.Product].
9211      * Default to
9212      * [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK].
9213      * Corresponding properties: Google Merchant Center property
9214      * [availability](https://support.google.com/merchants/answer/6324448).
9215      * Schema.org property [Offer.availability](https://schema.org/availability).
9216      * </pre>
9217      *
9218      * <code>.google.cloud.retail.v2.Product.Availability availability = 19;</code>
9219      *
9220      * @param value The availability to set.
9221      * @return This builder for chaining.
9222      */
setAvailability(com.google.cloud.retail.v2.Product.Availability value)9223     public Builder setAvailability(com.google.cloud.retail.v2.Product.Availability value) {
9224       if (value == null) {
9225         throw new NullPointerException();
9226       }
9227       bitField0_ |= 0x00040000;
9228       availability_ = value.getNumber();
9229       onChanged();
9230       return this;
9231     }
9232     /**
9233      *
9234      *
9235      * <pre>
9236      * The online availability of the [Product][google.cloud.retail.v2.Product].
9237      * Default to
9238      * [Availability.IN_STOCK][google.cloud.retail.v2.Product.Availability.IN_STOCK].
9239      * Corresponding properties: Google Merchant Center property
9240      * [availability](https://support.google.com/merchants/answer/6324448).
9241      * Schema.org property [Offer.availability](https://schema.org/availability).
9242      * </pre>
9243      *
9244      * <code>.google.cloud.retail.v2.Product.Availability availability = 19;</code>
9245      *
9246      * @return This builder for chaining.
9247      */
clearAvailability()9248     public Builder clearAvailability() {
9249       bitField0_ = (bitField0_ & ~0x00040000);
9250       availability_ = 0;
9251       onChanged();
9252       return this;
9253     }
9254 
9255     private com.google.protobuf.Int32Value availableQuantity_;
9256     private com.google.protobuf.SingleFieldBuilderV3<
9257             com.google.protobuf.Int32Value,
9258             com.google.protobuf.Int32Value.Builder,
9259             com.google.protobuf.Int32ValueOrBuilder>
9260         availableQuantityBuilder_;
9261     /**
9262      *
9263      *
9264      * <pre>
9265      * The available quantity of the item.
9266      * </pre>
9267      *
9268      * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
9269      *
9270      * @return Whether the availableQuantity field is set.
9271      */
hasAvailableQuantity()9272     public boolean hasAvailableQuantity() {
9273       return ((bitField0_ & 0x00080000) != 0);
9274     }
9275     /**
9276      *
9277      *
9278      * <pre>
9279      * The available quantity of the item.
9280      * </pre>
9281      *
9282      * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
9283      *
9284      * @return The availableQuantity.
9285      */
getAvailableQuantity()9286     public com.google.protobuf.Int32Value getAvailableQuantity() {
9287       if (availableQuantityBuilder_ == null) {
9288         return availableQuantity_ == null
9289             ? com.google.protobuf.Int32Value.getDefaultInstance()
9290             : availableQuantity_;
9291       } else {
9292         return availableQuantityBuilder_.getMessage();
9293       }
9294     }
9295     /**
9296      *
9297      *
9298      * <pre>
9299      * The available quantity of the item.
9300      * </pre>
9301      *
9302      * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
9303      */
setAvailableQuantity(com.google.protobuf.Int32Value value)9304     public Builder setAvailableQuantity(com.google.protobuf.Int32Value value) {
9305       if (availableQuantityBuilder_ == null) {
9306         if (value == null) {
9307           throw new NullPointerException();
9308         }
9309         availableQuantity_ = value;
9310       } else {
9311         availableQuantityBuilder_.setMessage(value);
9312       }
9313       bitField0_ |= 0x00080000;
9314       onChanged();
9315       return this;
9316     }
9317     /**
9318      *
9319      *
9320      * <pre>
9321      * The available quantity of the item.
9322      * </pre>
9323      *
9324      * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
9325      */
setAvailableQuantity(com.google.protobuf.Int32Value.Builder builderForValue)9326     public Builder setAvailableQuantity(com.google.protobuf.Int32Value.Builder builderForValue) {
9327       if (availableQuantityBuilder_ == null) {
9328         availableQuantity_ = builderForValue.build();
9329       } else {
9330         availableQuantityBuilder_.setMessage(builderForValue.build());
9331       }
9332       bitField0_ |= 0x00080000;
9333       onChanged();
9334       return this;
9335     }
9336     /**
9337      *
9338      *
9339      * <pre>
9340      * The available quantity of the item.
9341      * </pre>
9342      *
9343      * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
9344      */
mergeAvailableQuantity(com.google.protobuf.Int32Value value)9345     public Builder mergeAvailableQuantity(com.google.protobuf.Int32Value value) {
9346       if (availableQuantityBuilder_ == null) {
9347         if (((bitField0_ & 0x00080000) != 0)
9348             && availableQuantity_ != null
9349             && availableQuantity_ != com.google.protobuf.Int32Value.getDefaultInstance()) {
9350           getAvailableQuantityBuilder().mergeFrom(value);
9351         } else {
9352           availableQuantity_ = value;
9353         }
9354       } else {
9355         availableQuantityBuilder_.mergeFrom(value);
9356       }
9357       bitField0_ |= 0x00080000;
9358       onChanged();
9359       return this;
9360     }
9361     /**
9362      *
9363      *
9364      * <pre>
9365      * The available quantity of the item.
9366      * </pre>
9367      *
9368      * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
9369      */
clearAvailableQuantity()9370     public Builder clearAvailableQuantity() {
9371       bitField0_ = (bitField0_ & ~0x00080000);
9372       availableQuantity_ = null;
9373       if (availableQuantityBuilder_ != null) {
9374         availableQuantityBuilder_.dispose();
9375         availableQuantityBuilder_ = null;
9376       }
9377       onChanged();
9378       return this;
9379     }
9380     /**
9381      *
9382      *
9383      * <pre>
9384      * The available quantity of the item.
9385      * </pre>
9386      *
9387      * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
9388      */
getAvailableQuantityBuilder()9389     public com.google.protobuf.Int32Value.Builder getAvailableQuantityBuilder() {
9390       bitField0_ |= 0x00080000;
9391       onChanged();
9392       return getAvailableQuantityFieldBuilder().getBuilder();
9393     }
9394     /**
9395      *
9396      *
9397      * <pre>
9398      * The available quantity of the item.
9399      * </pre>
9400      *
9401      * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
9402      */
getAvailableQuantityOrBuilder()9403     public com.google.protobuf.Int32ValueOrBuilder getAvailableQuantityOrBuilder() {
9404       if (availableQuantityBuilder_ != null) {
9405         return availableQuantityBuilder_.getMessageOrBuilder();
9406       } else {
9407         return availableQuantity_ == null
9408             ? com.google.protobuf.Int32Value.getDefaultInstance()
9409             : availableQuantity_;
9410       }
9411     }
9412     /**
9413      *
9414      *
9415      * <pre>
9416      * The available quantity of the item.
9417      * </pre>
9418      *
9419      * <code>.google.protobuf.Int32Value available_quantity = 20;</code>
9420      */
9421     private com.google.protobuf.SingleFieldBuilderV3<
9422             com.google.protobuf.Int32Value,
9423             com.google.protobuf.Int32Value.Builder,
9424             com.google.protobuf.Int32ValueOrBuilder>
getAvailableQuantityFieldBuilder()9425         getAvailableQuantityFieldBuilder() {
9426       if (availableQuantityBuilder_ == null) {
9427         availableQuantityBuilder_ =
9428             new com.google.protobuf.SingleFieldBuilderV3<
9429                 com.google.protobuf.Int32Value,
9430                 com.google.protobuf.Int32Value.Builder,
9431                 com.google.protobuf.Int32ValueOrBuilder>(
9432                 getAvailableQuantity(), getParentForChildren(), isClean());
9433         availableQuantity_ = null;
9434       }
9435       return availableQuantityBuilder_;
9436     }
9437 
9438     private java.util.List<com.google.cloud.retail.v2.FulfillmentInfo> fulfillmentInfo_ =
9439         java.util.Collections.emptyList();
9440 
ensureFulfillmentInfoIsMutable()9441     private void ensureFulfillmentInfoIsMutable() {
9442       if (!((bitField0_ & 0x00100000) != 0)) {
9443         fulfillmentInfo_ =
9444             new java.util.ArrayList<com.google.cloud.retail.v2.FulfillmentInfo>(fulfillmentInfo_);
9445         bitField0_ |= 0x00100000;
9446       }
9447     }
9448 
9449     private com.google.protobuf.RepeatedFieldBuilderV3<
9450             com.google.cloud.retail.v2.FulfillmentInfo,
9451             com.google.cloud.retail.v2.FulfillmentInfo.Builder,
9452             com.google.cloud.retail.v2.FulfillmentInfoOrBuilder>
9453         fulfillmentInfoBuilder_;
9454 
9455     /**
9456      *
9457      *
9458      * <pre>
9459      * Fulfillment information, such as the store IDs for in-store pickup or
9460      * region IDs for different shipping methods.
9461      * All the elements must have distinct
9462      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9463      * Otherwise, an INVALID_ARGUMENT error is returned.
9464      * </pre>
9465      *
9466      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9467      */
getFulfillmentInfoList()9468     public java.util.List<com.google.cloud.retail.v2.FulfillmentInfo> getFulfillmentInfoList() {
9469       if (fulfillmentInfoBuilder_ == null) {
9470         return java.util.Collections.unmodifiableList(fulfillmentInfo_);
9471       } else {
9472         return fulfillmentInfoBuilder_.getMessageList();
9473       }
9474     }
9475     /**
9476      *
9477      *
9478      * <pre>
9479      * Fulfillment information, such as the store IDs for in-store pickup or
9480      * region IDs for different shipping methods.
9481      * All the elements must have distinct
9482      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9483      * Otherwise, an INVALID_ARGUMENT error is returned.
9484      * </pre>
9485      *
9486      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9487      */
getFulfillmentInfoCount()9488     public int getFulfillmentInfoCount() {
9489       if (fulfillmentInfoBuilder_ == null) {
9490         return fulfillmentInfo_.size();
9491       } else {
9492         return fulfillmentInfoBuilder_.getCount();
9493       }
9494     }
9495     /**
9496      *
9497      *
9498      * <pre>
9499      * Fulfillment information, such as the store IDs for in-store pickup or
9500      * region IDs for different shipping methods.
9501      * All the elements must have distinct
9502      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9503      * Otherwise, an INVALID_ARGUMENT error is returned.
9504      * </pre>
9505      *
9506      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9507      */
getFulfillmentInfo(int index)9508     public com.google.cloud.retail.v2.FulfillmentInfo getFulfillmentInfo(int index) {
9509       if (fulfillmentInfoBuilder_ == null) {
9510         return fulfillmentInfo_.get(index);
9511       } else {
9512         return fulfillmentInfoBuilder_.getMessage(index);
9513       }
9514     }
9515     /**
9516      *
9517      *
9518      * <pre>
9519      * Fulfillment information, such as the store IDs for in-store pickup or
9520      * region IDs for different shipping methods.
9521      * All the elements must have distinct
9522      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9523      * Otherwise, an INVALID_ARGUMENT error is returned.
9524      * </pre>
9525      *
9526      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9527      */
setFulfillmentInfo(int index, com.google.cloud.retail.v2.FulfillmentInfo value)9528     public Builder setFulfillmentInfo(int index, com.google.cloud.retail.v2.FulfillmentInfo value) {
9529       if (fulfillmentInfoBuilder_ == null) {
9530         if (value == null) {
9531           throw new NullPointerException();
9532         }
9533         ensureFulfillmentInfoIsMutable();
9534         fulfillmentInfo_.set(index, value);
9535         onChanged();
9536       } else {
9537         fulfillmentInfoBuilder_.setMessage(index, value);
9538       }
9539       return this;
9540     }
9541     /**
9542      *
9543      *
9544      * <pre>
9545      * Fulfillment information, such as the store IDs for in-store pickup or
9546      * region IDs for different shipping methods.
9547      * All the elements must have distinct
9548      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9549      * Otherwise, an INVALID_ARGUMENT error is returned.
9550      * </pre>
9551      *
9552      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9553      */
setFulfillmentInfo( int index, com.google.cloud.retail.v2.FulfillmentInfo.Builder builderForValue)9554     public Builder setFulfillmentInfo(
9555         int index, com.google.cloud.retail.v2.FulfillmentInfo.Builder builderForValue) {
9556       if (fulfillmentInfoBuilder_ == null) {
9557         ensureFulfillmentInfoIsMutable();
9558         fulfillmentInfo_.set(index, builderForValue.build());
9559         onChanged();
9560       } else {
9561         fulfillmentInfoBuilder_.setMessage(index, builderForValue.build());
9562       }
9563       return this;
9564     }
9565     /**
9566      *
9567      *
9568      * <pre>
9569      * Fulfillment information, such as the store IDs for in-store pickup or
9570      * region IDs for different shipping methods.
9571      * All the elements must have distinct
9572      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9573      * Otherwise, an INVALID_ARGUMENT error is returned.
9574      * </pre>
9575      *
9576      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9577      */
addFulfillmentInfo(com.google.cloud.retail.v2.FulfillmentInfo value)9578     public Builder addFulfillmentInfo(com.google.cloud.retail.v2.FulfillmentInfo value) {
9579       if (fulfillmentInfoBuilder_ == null) {
9580         if (value == null) {
9581           throw new NullPointerException();
9582         }
9583         ensureFulfillmentInfoIsMutable();
9584         fulfillmentInfo_.add(value);
9585         onChanged();
9586       } else {
9587         fulfillmentInfoBuilder_.addMessage(value);
9588       }
9589       return this;
9590     }
9591     /**
9592      *
9593      *
9594      * <pre>
9595      * Fulfillment information, such as the store IDs for in-store pickup or
9596      * region IDs for different shipping methods.
9597      * All the elements must have distinct
9598      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9599      * Otherwise, an INVALID_ARGUMENT error is returned.
9600      * </pre>
9601      *
9602      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9603      */
addFulfillmentInfo(int index, com.google.cloud.retail.v2.FulfillmentInfo value)9604     public Builder addFulfillmentInfo(int index, com.google.cloud.retail.v2.FulfillmentInfo value) {
9605       if (fulfillmentInfoBuilder_ == null) {
9606         if (value == null) {
9607           throw new NullPointerException();
9608         }
9609         ensureFulfillmentInfoIsMutable();
9610         fulfillmentInfo_.add(index, value);
9611         onChanged();
9612       } else {
9613         fulfillmentInfoBuilder_.addMessage(index, value);
9614       }
9615       return this;
9616     }
9617     /**
9618      *
9619      *
9620      * <pre>
9621      * Fulfillment information, such as the store IDs for in-store pickup or
9622      * region IDs for different shipping methods.
9623      * All the elements must have distinct
9624      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9625      * Otherwise, an INVALID_ARGUMENT error is returned.
9626      * </pre>
9627      *
9628      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9629      */
addFulfillmentInfo( com.google.cloud.retail.v2.FulfillmentInfo.Builder builderForValue)9630     public Builder addFulfillmentInfo(
9631         com.google.cloud.retail.v2.FulfillmentInfo.Builder builderForValue) {
9632       if (fulfillmentInfoBuilder_ == null) {
9633         ensureFulfillmentInfoIsMutable();
9634         fulfillmentInfo_.add(builderForValue.build());
9635         onChanged();
9636       } else {
9637         fulfillmentInfoBuilder_.addMessage(builderForValue.build());
9638       }
9639       return this;
9640     }
9641     /**
9642      *
9643      *
9644      * <pre>
9645      * Fulfillment information, such as the store IDs for in-store pickup or
9646      * region IDs for different shipping methods.
9647      * All the elements must have distinct
9648      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9649      * Otherwise, an INVALID_ARGUMENT error is returned.
9650      * </pre>
9651      *
9652      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9653      */
addFulfillmentInfo( int index, com.google.cloud.retail.v2.FulfillmentInfo.Builder builderForValue)9654     public Builder addFulfillmentInfo(
9655         int index, com.google.cloud.retail.v2.FulfillmentInfo.Builder builderForValue) {
9656       if (fulfillmentInfoBuilder_ == null) {
9657         ensureFulfillmentInfoIsMutable();
9658         fulfillmentInfo_.add(index, builderForValue.build());
9659         onChanged();
9660       } else {
9661         fulfillmentInfoBuilder_.addMessage(index, builderForValue.build());
9662       }
9663       return this;
9664     }
9665     /**
9666      *
9667      *
9668      * <pre>
9669      * Fulfillment information, such as the store IDs for in-store pickup or
9670      * region IDs for different shipping methods.
9671      * All the elements must have distinct
9672      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9673      * Otherwise, an INVALID_ARGUMENT error is returned.
9674      * </pre>
9675      *
9676      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9677      */
addAllFulfillmentInfo( java.lang.Iterable<? extends com.google.cloud.retail.v2.FulfillmentInfo> values)9678     public Builder addAllFulfillmentInfo(
9679         java.lang.Iterable<? extends com.google.cloud.retail.v2.FulfillmentInfo> values) {
9680       if (fulfillmentInfoBuilder_ == null) {
9681         ensureFulfillmentInfoIsMutable();
9682         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fulfillmentInfo_);
9683         onChanged();
9684       } else {
9685         fulfillmentInfoBuilder_.addAllMessages(values);
9686       }
9687       return this;
9688     }
9689     /**
9690      *
9691      *
9692      * <pre>
9693      * Fulfillment information, such as the store IDs for in-store pickup or
9694      * region IDs for different shipping methods.
9695      * All the elements must have distinct
9696      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9697      * Otherwise, an INVALID_ARGUMENT error is returned.
9698      * </pre>
9699      *
9700      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9701      */
clearFulfillmentInfo()9702     public Builder clearFulfillmentInfo() {
9703       if (fulfillmentInfoBuilder_ == null) {
9704         fulfillmentInfo_ = java.util.Collections.emptyList();
9705         bitField0_ = (bitField0_ & ~0x00100000);
9706         onChanged();
9707       } else {
9708         fulfillmentInfoBuilder_.clear();
9709       }
9710       return this;
9711     }
9712     /**
9713      *
9714      *
9715      * <pre>
9716      * Fulfillment information, such as the store IDs for in-store pickup or
9717      * region IDs for different shipping methods.
9718      * All the elements must have distinct
9719      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9720      * Otherwise, an INVALID_ARGUMENT error is returned.
9721      * </pre>
9722      *
9723      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9724      */
removeFulfillmentInfo(int index)9725     public Builder removeFulfillmentInfo(int index) {
9726       if (fulfillmentInfoBuilder_ == null) {
9727         ensureFulfillmentInfoIsMutable();
9728         fulfillmentInfo_.remove(index);
9729         onChanged();
9730       } else {
9731         fulfillmentInfoBuilder_.remove(index);
9732       }
9733       return this;
9734     }
9735     /**
9736      *
9737      *
9738      * <pre>
9739      * Fulfillment information, such as the store IDs for in-store pickup or
9740      * region IDs for different shipping methods.
9741      * All the elements must have distinct
9742      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9743      * Otherwise, an INVALID_ARGUMENT error is returned.
9744      * </pre>
9745      *
9746      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9747      */
getFulfillmentInfoBuilder(int index)9748     public com.google.cloud.retail.v2.FulfillmentInfo.Builder getFulfillmentInfoBuilder(int index) {
9749       return getFulfillmentInfoFieldBuilder().getBuilder(index);
9750     }
9751     /**
9752      *
9753      *
9754      * <pre>
9755      * Fulfillment information, such as the store IDs for in-store pickup or
9756      * region IDs for different shipping methods.
9757      * All the elements must have distinct
9758      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9759      * Otherwise, an INVALID_ARGUMENT error is returned.
9760      * </pre>
9761      *
9762      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9763      */
getFulfillmentInfoOrBuilder( int index)9764     public com.google.cloud.retail.v2.FulfillmentInfoOrBuilder getFulfillmentInfoOrBuilder(
9765         int index) {
9766       if (fulfillmentInfoBuilder_ == null) {
9767         return fulfillmentInfo_.get(index);
9768       } else {
9769         return fulfillmentInfoBuilder_.getMessageOrBuilder(index);
9770       }
9771     }
9772     /**
9773      *
9774      *
9775      * <pre>
9776      * Fulfillment information, such as the store IDs for in-store pickup or
9777      * region IDs for different shipping methods.
9778      * All the elements must have distinct
9779      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9780      * Otherwise, an INVALID_ARGUMENT error is returned.
9781      * </pre>
9782      *
9783      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9784      */
9785     public java.util.List<? extends com.google.cloud.retail.v2.FulfillmentInfoOrBuilder>
getFulfillmentInfoOrBuilderList()9786         getFulfillmentInfoOrBuilderList() {
9787       if (fulfillmentInfoBuilder_ != null) {
9788         return fulfillmentInfoBuilder_.getMessageOrBuilderList();
9789       } else {
9790         return java.util.Collections.unmodifiableList(fulfillmentInfo_);
9791       }
9792     }
9793     /**
9794      *
9795      *
9796      * <pre>
9797      * Fulfillment information, such as the store IDs for in-store pickup or
9798      * region IDs for different shipping methods.
9799      * All the elements must have distinct
9800      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9801      * Otherwise, an INVALID_ARGUMENT error is returned.
9802      * </pre>
9803      *
9804      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9805      */
addFulfillmentInfoBuilder()9806     public com.google.cloud.retail.v2.FulfillmentInfo.Builder addFulfillmentInfoBuilder() {
9807       return getFulfillmentInfoFieldBuilder()
9808           .addBuilder(com.google.cloud.retail.v2.FulfillmentInfo.getDefaultInstance());
9809     }
9810     /**
9811      *
9812      *
9813      * <pre>
9814      * Fulfillment information, such as the store IDs for in-store pickup or
9815      * region IDs for different shipping methods.
9816      * All the elements must have distinct
9817      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9818      * Otherwise, an INVALID_ARGUMENT error is returned.
9819      * </pre>
9820      *
9821      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9822      */
addFulfillmentInfoBuilder(int index)9823     public com.google.cloud.retail.v2.FulfillmentInfo.Builder addFulfillmentInfoBuilder(int index) {
9824       return getFulfillmentInfoFieldBuilder()
9825           .addBuilder(index, com.google.cloud.retail.v2.FulfillmentInfo.getDefaultInstance());
9826     }
9827     /**
9828      *
9829      *
9830      * <pre>
9831      * Fulfillment information, such as the store IDs for in-store pickup or
9832      * region IDs for different shipping methods.
9833      * All the elements must have distinct
9834      * [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type].
9835      * Otherwise, an INVALID_ARGUMENT error is returned.
9836      * </pre>
9837      *
9838      * <code>repeated .google.cloud.retail.v2.FulfillmentInfo fulfillment_info = 21;</code>
9839      */
9840     public java.util.List<com.google.cloud.retail.v2.FulfillmentInfo.Builder>
getFulfillmentInfoBuilderList()9841         getFulfillmentInfoBuilderList() {
9842       return getFulfillmentInfoFieldBuilder().getBuilderList();
9843     }
9844 
9845     private com.google.protobuf.RepeatedFieldBuilderV3<
9846             com.google.cloud.retail.v2.FulfillmentInfo,
9847             com.google.cloud.retail.v2.FulfillmentInfo.Builder,
9848             com.google.cloud.retail.v2.FulfillmentInfoOrBuilder>
getFulfillmentInfoFieldBuilder()9849         getFulfillmentInfoFieldBuilder() {
9850       if (fulfillmentInfoBuilder_ == null) {
9851         fulfillmentInfoBuilder_ =
9852             new com.google.protobuf.RepeatedFieldBuilderV3<
9853                 com.google.cloud.retail.v2.FulfillmentInfo,
9854                 com.google.cloud.retail.v2.FulfillmentInfo.Builder,
9855                 com.google.cloud.retail.v2.FulfillmentInfoOrBuilder>(
9856                 fulfillmentInfo_,
9857                 ((bitField0_ & 0x00100000) != 0),
9858                 getParentForChildren(),
9859                 isClean());
9860         fulfillmentInfo_ = null;
9861       }
9862       return fulfillmentInfoBuilder_;
9863     }
9864 
9865     private java.lang.Object uri_ = "";
9866     /**
9867      *
9868      *
9869      * <pre>
9870      * Canonical URL directly linking to the product detail page.
9871      * It is strongly recommended to provide a valid uri for the product,
9872      * otherwise the service performance could be significantly degraded.
9873      * This field must be a UTF-8 encoded string with a length limit of 5,000
9874      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
9875      * Corresponding properties: Google Merchant Center property
9876      * [link](https://support.google.com/merchants/answer/6324416). Schema.org
9877      * property [Offer.url](https://schema.org/url).
9878      * </pre>
9879      *
9880      * <code>string uri = 22;</code>
9881      *
9882      * @return The uri.
9883      */
getUri()9884     public java.lang.String getUri() {
9885       java.lang.Object ref = uri_;
9886       if (!(ref instanceof java.lang.String)) {
9887         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
9888         java.lang.String s = bs.toStringUtf8();
9889         uri_ = s;
9890         return s;
9891       } else {
9892         return (java.lang.String) ref;
9893       }
9894     }
9895     /**
9896      *
9897      *
9898      * <pre>
9899      * Canonical URL directly linking to the product detail page.
9900      * It is strongly recommended to provide a valid uri for the product,
9901      * otherwise the service performance could be significantly degraded.
9902      * This field must be a UTF-8 encoded string with a length limit of 5,000
9903      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
9904      * Corresponding properties: Google Merchant Center property
9905      * [link](https://support.google.com/merchants/answer/6324416). Schema.org
9906      * property [Offer.url](https://schema.org/url).
9907      * </pre>
9908      *
9909      * <code>string uri = 22;</code>
9910      *
9911      * @return The bytes for uri.
9912      */
getUriBytes()9913     public com.google.protobuf.ByteString getUriBytes() {
9914       java.lang.Object ref = uri_;
9915       if (ref instanceof String) {
9916         com.google.protobuf.ByteString b =
9917             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
9918         uri_ = b;
9919         return b;
9920       } else {
9921         return (com.google.protobuf.ByteString) ref;
9922       }
9923     }
9924     /**
9925      *
9926      *
9927      * <pre>
9928      * Canonical URL directly linking to the product detail page.
9929      * It is strongly recommended to provide a valid uri for the product,
9930      * otherwise the service performance could be significantly degraded.
9931      * This field must be a UTF-8 encoded string with a length limit of 5,000
9932      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
9933      * Corresponding properties: Google Merchant Center property
9934      * [link](https://support.google.com/merchants/answer/6324416). Schema.org
9935      * property [Offer.url](https://schema.org/url).
9936      * </pre>
9937      *
9938      * <code>string uri = 22;</code>
9939      *
9940      * @param value The uri to set.
9941      * @return This builder for chaining.
9942      */
setUri(java.lang.String value)9943     public Builder setUri(java.lang.String value) {
9944       if (value == null) {
9945         throw new NullPointerException();
9946       }
9947       uri_ = value;
9948       bitField0_ |= 0x00200000;
9949       onChanged();
9950       return this;
9951     }
9952     /**
9953      *
9954      *
9955      * <pre>
9956      * Canonical URL directly linking to the product detail page.
9957      * It is strongly recommended to provide a valid uri for the product,
9958      * otherwise the service performance could be significantly degraded.
9959      * This field must be a UTF-8 encoded string with a length limit of 5,000
9960      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
9961      * Corresponding properties: Google Merchant Center property
9962      * [link](https://support.google.com/merchants/answer/6324416). Schema.org
9963      * property [Offer.url](https://schema.org/url).
9964      * </pre>
9965      *
9966      * <code>string uri = 22;</code>
9967      *
9968      * @return This builder for chaining.
9969      */
clearUri()9970     public Builder clearUri() {
9971       uri_ = getDefaultInstance().getUri();
9972       bitField0_ = (bitField0_ & ~0x00200000);
9973       onChanged();
9974       return this;
9975     }
9976     /**
9977      *
9978      *
9979      * <pre>
9980      * Canonical URL directly linking to the product detail page.
9981      * It is strongly recommended to provide a valid uri for the product,
9982      * otherwise the service performance could be significantly degraded.
9983      * This field must be a UTF-8 encoded string with a length limit of 5,000
9984      * characters. Otherwise, an INVALID_ARGUMENT error is returned.
9985      * Corresponding properties: Google Merchant Center property
9986      * [link](https://support.google.com/merchants/answer/6324416). Schema.org
9987      * property [Offer.url](https://schema.org/url).
9988      * </pre>
9989      *
9990      * <code>string uri = 22;</code>
9991      *
9992      * @param value The bytes for uri to set.
9993      * @return This builder for chaining.
9994      */
setUriBytes(com.google.protobuf.ByteString value)9995     public Builder setUriBytes(com.google.protobuf.ByteString value) {
9996       if (value == null) {
9997         throw new NullPointerException();
9998       }
9999       checkByteStringIsUtf8(value);
10000       uri_ = value;
10001       bitField0_ |= 0x00200000;
10002       onChanged();
10003       return this;
10004     }
10005 
10006     private java.util.List<com.google.cloud.retail.v2.Image> images_ =
10007         java.util.Collections.emptyList();
10008 
ensureImagesIsMutable()10009     private void ensureImagesIsMutable() {
10010       if (!((bitField0_ & 0x00400000) != 0)) {
10011         images_ = new java.util.ArrayList<com.google.cloud.retail.v2.Image>(images_);
10012         bitField0_ |= 0x00400000;
10013       }
10014     }
10015 
10016     private com.google.protobuf.RepeatedFieldBuilderV3<
10017             com.google.cloud.retail.v2.Image,
10018             com.google.cloud.retail.v2.Image.Builder,
10019             com.google.cloud.retail.v2.ImageOrBuilder>
10020         imagesBuilder_;
10021 
10022     /**
10023      *
10024      *
10025      * <pre>
10026      * Product images for the product. We highly recommend putting the main
10027      * image first.
10028      * A maximum of 300 images are allowed.
10029      * Corresponding properties: Google Merchant Center property
10030      * [image_link](https://support.google.com/merchants/answer/6324350).
10031      * Schema.org property [Product.image](https://schema.org/image).
10032      * </pre>
10033      *
10034      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10035      */
getImagesList()10036     public java.util.List<com.google.cloud.retail.v2.Image> getImagesList() {
10037       if (imagesBuilder_ == null) {
10038         return java.util.Collections.unmodifiableList(images_);
10039       } else {
10040         return imagesBuilder_.getMessageList();
10041       }
10042     }
10043     /**
10044      *
10045      *
10046      * <pre>
10047      * Product images for the product. We highly recommend putting the main
10048      * image first.
10049      * A maximum of 300 images are allowed.
10050      * Corresponding properties: Google Merchant Center property
10051      * [image_link](https://support.google.com/merchants/answer/6324350).
10052      * Schema.org property [Product.image](https://schema.org/image).
10053      * </pre>
10054      *
10055      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10056      */
getImagesCount()10057     public int getImagesCount() {
10058       if (imagesBuilder_ == null) {
10059         return images_.size();
10060       } else {
10061         return imagesBuilder_.getCount();
10062       }
10063     }
10064     /**
10065      *
10066      *
10067      * <pre>
10068      * Product images for the product. We highly recommend putting the main
10069      * image first.
10070      * A maximum of 300 images are allowed.
10071      * Corresponding properties: Google Merchant Center property
10072      * [image_link](https://support.google.com/merchants/answer/6324350).
10073      * Schema.org property [Product.image](https://schema.org/image).
10074      * </pre>
10075      *
10076      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10077      */
getImages(int index)10078     public com.google.cloud.retail.v2.Image getImages(int index) {
10079       if (imagesBuilder_ == null) {
10080         return images_.get(index);
10081       } else {
10082         return imagesBuilder_.getMessage(index);
10083       }
10084     }
10085     /**
10086      *
10087      *
10088      * <pre>
10089      * Product images for the product. We highly recommend putting the main
10090      * image first.
10091      * A maximum of 300 images are allowed.
10092      * Corresponding properties: Google Merchant Center property
10093      * [image_link](https://support.google.com/merchants/answer/6324350).
10094      * Schema.org property [Product.image](https://schema.org/image).
10095      * </pre>
10096      *
10097      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10098      */
setImages(int index, com.google.cloud.retail.v2.Image value)10099     public Builder setImages(int index, com.google.cloud.retail.v2.Image value) {
10100       if (imagesBuilder_ == null) {
10101         if (value == null) {
10102           throw new NullPointerException();
10103         }
10104         ensureImagesIsMutable();
10105         images_.set(index, value);
10106         onChanged();
10107       } else {
10108         imagesBuilder_.setMessage(index, value);
10109       }
10110       return this;
10111     }
10112     /**
10113      *
10114      *
10115      * <pre>
10116      * Product images for the product. We highly recommend putting the main
10117      * image first.
10118      * A maximum of 300 images are allowed.
10119      * Corresponding properties: Google Merchant Center property
10120      * [image_link](https://support.google.com/merchants/answer/6324350).
10121      * Schema.org property [Product.image](https://schema.org/image).
10122      * </pre>
10123      *
10124      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10125      */
setImages(int index, com.google.cloud.retail.v2.Image.Builder builderForValue)10126     public Builder setImages(int index, com.google.cloud.retail.v2.Image.Builder builderForValue) {
10127       if (imagesBuilder_ == null) {
10128         ensureImagesIsMutable();
10129         images_.set(index, builderForValue.build());
10130         onChanged();
10131       } else {
10132         imagesBuilder_.setMessage(index, builderForValue.build());
10133       }
10134       return this;
10135     }
10136     /**
10137      *
10138      *
10139      * <pre>
10140      * Product images for the product. We highly recommend putting the main
10141      * image first.
10142      * A maximum of 300 images are allowed.
10143      * Corresponding properties: Google Merchant Center property
10144      * [image_link](https://support.google.com/merchants/answer/6324350).
10145      * Schema.org property [Product.image](https://schema.org/image).
10146      * </pre>
10147      *
10148      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10149      */
addImages(com.google.cloud.retail.v2.Image value)10150     public Builder addImages(com.google.cloud.retail.v2.Image value) {
10151       if (imagesBuilder_ == null) {
10152         if (value == null) {
10153           throw new NullPointerException();
10154         }
10155         ensureImagesIsMutable();
10156         images_.add(value);
10157         onChanged();
10158       } else {
10159         imagesBuilder_.addMessage(value);
10160       }
10161       return this;
10162     }
10163     /**
10164      *
10165      *
10166      * <pre>
10167      * Product images for the product. We highly recommend putting the main
10168      * image first.
10169      * A maximum of 300 images are allowed.
10170      * Corresponding properties: Google Merchant Center property
10171      * [image_link](https://support.google.com/merchants/answer/6324350).
10172      * Schema.org property [Product.image](https://schema.org/image).
10173      * </pre>
10174      *
10175      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10176      */
addImages(int index, com.google.cloud.retail.v2.Image value)10177     public Builder addImages(int index, com.google.cloud.retail.v2.Image value) {
10178       if (imagesBuilder_ == null) {
10179         if (value == null) {
10180           throw new NullPointerException();
10181         }
10182         ensureImagesIsMutable();
10183         images_.add(index, value);
10184         onChanged();
10185       } else {
10186         imagesBuilder_.addMessage(index, value);
10187       }
10188       return this;
10189     }
10190     /**
10191      *
10192      *
10193      * <pre>
10194      * Product images for the product. We highly recommend putting the main
10195      * image first.
10196      * A maximum of 300 images are allowed.
10197      * Corresponding properties: Google Merchant Center property
10198      * [image_link](https://support.google.com/merchants/answer/6324350).
10199      * Schema.org property [Product.image](https://schema.org/image).
10200      * </pre>
10201      *
10202      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10203      */
addImages(com.google.cloud.retail.v2.Image.Builder builderForValue)10204     public Builder addImages(com.google.cloud.retail.v2.Image.Builder builderForValue) {
10205       if (imagesBuilder_ == null) {
10206         ensureImagesIsMutable();
10207         images_.add(builderForValue.build());
10208         onChanged();
10209       } else {
10210         imagesBuilder_.addMessage(builderForValue.build());
10211       }
10212       return this;
10213     }
10214     /**
10215      *
10216      *
10217      * <pre>
10218      * Product images for the product. We highly recommend putting the main
10219      * image first.
10220      * A maximum of 300 images are allowed.
10221      * Corresponding properties: Google Merchant Center property
10222      * [image_link](https://support.google.com/merchants/answer/6324350).
10223      * Schema.org property [Product.image](https://schema.org/image).
10224      * </pre>
10225      *
10226      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10227      */
addImages(int index, com.google.cloud.retail.v2.Image.Builder builderForValue)10228     public Builder addImages(int index, com.google.cloud.retail.v2.Image.Builder builderForValue) {
10229       if (imagesBuilder_ == null) {
10230         ensureImagesIsMutable();
10231         images_.add(index, builderForValue.build());
10232         onChanged();
10233       } else {
10234         imagesBuilder_.addMessage(index, builderForValue.build());
10235       }
10236       return this;
10237     }
10238     /**
10239      *
10240      *
10241      * <pre>
10242      * Product images for the product. We highly recommend putting the main
10243      * image first.
10244      * A maximum of 300 images are allowed.
10245      * Corresponding properties: Google Merchant Center property
10246      * [image_link](https://support.google.com/merchants/answer/6324350).
10247      * Schema.org property [Product.image](https://schema.org/image).
10248      * </pre>
10249      *
10250      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10251      */
addAllImages( java.lang.Iterable<? extends com.google.cloud.retail.v2.Image> values)10252     public Builder addAllImages(
10253         java.lang.Iterable<? extends com.google.cloud.retail.v2.Image> values) {
10254       if (imagesBuilder_ == null) {
10255         ensureImagesIsMutable();
10256         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, images_);
10257         onChanged();
10258       } else {
10259         imagesBuilder_.addAllMessages(values);
10260       }
10261       return this;
10262     }
10263     /**
10264      *
10265      *
10266      * <pre>
10267      * Product images for the product. We highly recommend putting the main
10268      * image first.
10269      * A maximum of 300 images are allowed.
10270      * Corresponding properties: Google Merchant Center property
10271      * [image_link](https://support.google.com/merchants/answer/6324350).
10272      * Schema.org property [Product.image](https://schema.org/image).
10273      * </pre>
10274      *
10275      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10276      */
clearImages()10277     public Builder clearImages() {
10278       if (imagesBuilder_ == null) {
10279         images_ = java.util.Collections.emptyList();
10280         bitField0_ = (bitField0_ & ~0x00400000);
10281         onChanged();
10282       } else {
10283         imagesBuilder_.clear();
10284       }
10285       return this;
10286     }
10287     /**
10288      *
10289      *
10290      * <pre>
10291      * Product images for the product. We highly recommend putting the main
10292      * image first.
10293      * A maximum of 300 images are allowed.
10294      * Corresponding properties: Google Merchant Center property
10295      * [image_link](https://support.google.com/merchants/answer/6324350).
10296      * Schema.org property [Product.image](https://schema.org/image).
10297      * </pre>
10298      *
10299      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10300      */
removeImages(int index)10301     public Builder removeImages(int index) {
10302       if (imagesBuilder_ == null) {
10303         ensureImagesIsMutable();
10304         images_.remove(index);
10305         onChanged();
10306       } else {
10307         imagesBuilder_.remove(index);
10308       }
10309       return this;
10310     }
10311     /**
10312      *
10313      *
10314      * <pre>
10315      * Product images for the product. We highly recommend putting the main
10316      * image first.
10317      * A maximum of 300 images are allowed.
10318      * Corresponding properties: Google Merchant Center property
10319      * [image_link](https://support.google.com/merchants/answer/6324350).
10320      * Schema.org property [Product.image](https://schema.org/image).
10321      * </pre>
10322      *
10323      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10324      */
getImagesBuilder(int index)10325     public com.google.cloud.retail.v2.Image.Builder getImagesBuilder(int index) {
10326       return getImagesFieldBuilder().getBuilder(index);
10327     }
10328     /**
10329      *
10330      *
10331      * <pre>
10332      * Product images for the product. We highly recommend putting the main
10333      * image first.
10334      * A maximum of 300 images are allowed.
10335      * Corresponding properties: Google Merchant Center property
10336      * [image_link](https://support.google.com/merchants/answer/6324350).
10337      * Schema.org property [Product.image](https://schema.org/image).
10338      * </pre>
10339      *
10340      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10341      */
getImagesOrBuilder(int index)10342     public com.google.cloud.retail.v2.ImageOrBuilder getImagesOrBuilder(int index) {
10343       if (imagesBuilder_ == null) {
10344         return images_.get(index);
10345       } else {
10346         return imagesBuilder_.getMessageOrBuilder(index);
10347       }
10348     }
10349     /**
10350      *
10351      *
10352      * <pre>
10353      * Product images for the product. We highly recommend putting the main
10354      * image first.
10355      * A maximum of 300 images are allowed.
10356      * Corresponding properties: Google Merchant Center property
10357      * [image_link](https://support.google.com/merchants/answer/6324350).
10358      * Schema.org property [Product.image](https://schema.org/image).
10359      * </pre>
10360      *
10361      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10362      */
10363     public java.util.List<? extends com.google.cloud.retail.v2.ImageOrBuilder>
getImagesOrBuilderList()10364         getImagesOrBuilderList() {
10365       if (imagesBuilder_ != null) {
10366         return imagesBuilder_.getMessageOrBuilderList();
10367       } else {
10368         return java.util.Collections.unmodifiableList(images_);
10369       }
10370     }
10371     /**
10372      *
10373      *
10374      * <pre>
10375      * Product images for the product. We highly recommend putting the main
10376      * image first.
10377      * A maximum of 300 images are allowed.
10378      * Corresponding properties: Google Merchant Center property
10379      * [image_link](https://support.google.com/merchants/answer/6324350).
10380      * Schema.org property [Product.image](https://schema.org/image).
10381      * </pre>
10382      *
10383      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10384      */
addImagesBuilder()10385     public com.google.cloud.retail.v2.Image.Builder addImagesBuilder() {
10386       return getImagesFieldBuilder()
10387           .addBuilder(com.google.cloud.retail.v2.Image.getDefaultInstance());
10388     }
10389     /**
10390      *
10391      *
10392      * <pre>
10393      * Product images for the product. We highly recommend putting the main
10394      * image first.
10395      * A maximum of 300 images are allowed.
10396      * Corresponding properties: Google Merchant Center property
10397      * [image_link](https://support.google.com/merchants/answer/6324350).
10398      * Schema.org property [Product.image](https://schema.org/image).
10399      * </pre>
10400      *
10401      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10402      */
addImagesBuilder(int index)10403     public com.google.cloud.retail.v2.Image.Builder addImagesBuilder(int index) {
10404       return getImagesFieldBuilder()
10405           .addBuilder(index, com.google.cloud.retail.v2.Image.getDefaultInstance());
10406     }
10407     /**
10408      *
10409      *
10410      * <pre>
10411      * Product images for the product. We highly recommend putting the main
10412      * image first.
10413      * A maximum of 300 images are allowed.
10414      * Corresponding properties: Google Merchant Center property
10415      * [image_link](https://support.google.com/merchants/answer/6324350).
10416      * Schema.org property [Product.image](https://schema.org/image).
10417      * </pre>
10418      *
10419      * <code>repeated .google.cloud.retail.v2.Image images = 23;</code>
10420      */
getImagesBuilderList()10421     public java.util.List<com.google.cloud.retail.v2.Image.Builder> getImagesBuilderList() {
10422       return getImagesFieldBuilder().getBuilderList();
10423     }
10424 
10425     private com.google.protobuf.RepeatedFieldBuilderV3<
10426             com.google.cloud.retail.v2.Image,
10427             com.google.cloud.retail.v2.Image.Builder,
10428             com.google.cloud.retail.v2.ImageOrBuilder>
getImagesFieldBuilder()10429         getImagesFieldBuilder() {
10430       if (imagesBuilder_ == null) {
10431         imagesBuilder_ =
10432             new com.google.protobuf.RepeatedFieldBuilderV3<
10433                 com.google.cloud.retail.v2.Image,
10434                 com.google.cloud.retail.v2.Image.Builder,
10435                 com.google.cloud.retail.v2.ImageOrBuilder>(
10436                 images_, ((bitField0_ & 0x00400000) != 0), getParentForChildren(), isClean());
10437         images_ = null;
10438       }
10439       return imagesBuilder_;
10440     }
10441 
10442     private com.google.cloud.retail.v2.Audience audience_;
10443     private com.google.protobuf.SingleFieldBuilderV3<
10444             com.google.cloud.retail.v2.Audience,
10445             com.google.cloud.retail.v2.Audience.Builder,
10446             com.google.cloud.retail.v2.AudienceOrBuilder>
10447         audienceBuilder_;
10448     /**
10449      *
10450      *
10451      * <pre>
10452      * The target group associated with a given audience (e.g. male, veterans,
10453      * car owners, musicians, etc.) of the product.
10454      * </pre>
10455      *
10456      * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
10457      *
10458      * @return Whether the audience field is set.
10459      */
hasAudience()10460     public boolean hasAudience() {
10461       return ((bitField0_ & 0x00800000) != 0);
10462     }
10463     /**
10464      *
10465      *
10466      * <pre>
10467      * The target group associated with a given audience (e.g. male, veterans,
10468      * car owners, musicians, etc.) of the product.
10469      * </pre>
10470      *
10471      * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
10472      *
10473      * @return The audience.
10474      */
getAudience()10475     public com.google.cloud.retail.v2.Audience getAudience() {
10476       if (audienceBuilder_ == null) {
10477         return audience_ == null
10478             ? com.google.cloud.retail.v2.Audience.getDefaultInstance()
10479             : audience_;
10480       } else {
10481         return audienceBuilder_.getMessage();
10482       }
10483     }
10484     /**
10485      *
10486      *
10487      * <pre>
10488      * The target group associated with a given audience (e.g. male, veterans,
10489      * car owners, musicians, etc.) of the product.
10490      * </pre>
10491      *
10492      * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
10493      */
setAudience(com.google.cloud.retail.v2.Audience value)10494     public Builder setAudience(com.google.cloud.retail.v2.Audience value) {
10495       if (audienceBuilder_ == null) {
10496         if (value == null) {
10497           throw new NullPointerException();
10498         }
10499         audience_ = value;
10500       } else {
10501         audienceBuilder_.setMessage(value);
10502       }
10503       bitField0_ |= 0x00800000;
10504       onChanged();
10505       return this;
10506     }
10507     /**
10508      *
10509      *
10510      * <pre>
10511      * The target group associated with a given audience (e.g. male, veterans,
10512      * car owners, musicians, etc.) of the product.
10513      * </pre>
10514      *
10515      * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
10516      */
setAudience(com.google.cloud.retail.v2.Audience.Builder builderForValue)10517     public Builder setAudience(com.google.cloud.retail.v2.Audience.Builder builderForValue) {
10518       if (audienceBuilder_ == null) {
10519         audience_ = builderForValue.build();
10520       } else {
10521         audienceBuilder_.setMessage(builderForValue.build());
10522       }
10523       bitField0_ |= 0x00800000;
10524       onChanged();
10525       return this;
10526     }
10527     /**
10528      *
10529      *
10530      * <pre>
10531      * The target group associated with a given audience (e.g. male, veterans,
10532      * car owners, musicians, etc.) of the product.
10533      * </pre>
10534      *
10535      * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
10536      */
mergeAudience(com.google.cloud.retail.v2.Audience value)10537     public Builder mergeAudience(com.google.cloud.retail.v2.Audience value) {
10538       if (audienceBuilder_ == null) {
10539         if (((bitField0_ & 0x00800000) != 0)
10540             && audience_ != null
10541             && audience_ != com.google.cloud.retail.v2.Audience.getDefaultInstance()) {
10542           getAudienceBuilder().mergeFrom(value);
10543         } else {
10544           audience_ = value;
10545         }
10546       } else {
10547         audienceBuilder_.mergeFrom(value);
10548       }
10549       bitField0_ |= 0x00800000;
10550       onChanged();
10551       return this;
10552     }
10553     /**
10554      *
10555      *
10556      * <pre>
10557      * The target group associated with a given audience (e.g. male, veterans,
10558      * car owners, musicians, etc.) of the product.
10559      * </pre>
10560      *
10561      * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
10562      */
clearAudience()10563     public Builder clearAudience() {
10564       bitField0_ = (bitField0_ & ~0x00800000);
10565       audience_ = null;
10566       if (audienceBuilder_ != null) {
10567         audienceBuilder_.dispose();
10568         audienceBuilder_ = null;
10569       }
10570       onChanged();
10571       return this;
10572     }
10573     /**
10574      *
10575      *
10576      * <pre>
10577      * The target group associated with a given audience (e.g. male, veterans,
10578      * car owners, musicians, etc.) of the product.
10579      * </pre>
10580      *
10581      * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
10582      */
getAudienceBuilder()10583     public com.google.cloud.retail.v2.Audience.Builder getAudienceBuilder() {
10584       bitField0_ |= 0x00800000;
10585       onChanged();
10586       return getAudienceFieldBuilder().getBuilder();
10587     }
10588     /**
10589      *
10590      *
10591      * <pre>
10592      * The target group associated with a given audience (e.g. male, veterans,
10593      * car owners, musicians, etc.) of the product.
10594      * </pre>
10595      *
10596      * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
10597      */
getAudienceOrBuilder()10598     public com.google.cloud.retail.v2.AudienceOrBuilder getAudienceOrBuilder() {
10599       if (audienceBuilder_ != null) {
10600         return audienceBuilder_.getMessageOrBuilder();
10601       } else {
10602         return audience_ == null
10603             ? com.google.cloud.retail.v2.Audience.getDefaultInstance()
10604             : audience_;
10605       }
10606     }
10607     /**
10608      *
10609      *
10610      * <pre>
10611      * The target group associated with a given audience (e.g. male, veterans,
10612      * car owners, musicians, etc.) of the product.
10613      * </pre>
10614      *
10615      * <code>.google.cloud.retail.v2.Audience audience = 24;</code>
10616      */
10617     private com.google.protobuf.SingleFieldBuilderV3<
10618             com.google.cloud.retail.v2.Audience,
10619             com.google.cloud.retail.v2.Audience.Builder,
10620             com.google.cloud.retail.v2.AudienceOrBuilder>
getAudienceFieldBuilder()10621         getAudienceFieldBuilder() {
10622       if (audienceBuilder_ == null) {
10623         audienceBuilder_ =
10624             new com.google.protobuf.SingleFieldBuilderV3<
10625                 com.google.cloud.retail.v2.Audience,
10626                 com.google.cloud.retail.v2.Audience.Builder,
10627                 com.google.cloud.retail.v2.AudienceOrBuilder>(
10628                 getAudience(), getParentForChildren(), isClean());
10629         audience_ = null;
10630       }
10631       return audienceBuilder_;
10632     }
10633 
10634     private com.google.cloud.retail.v2.ColorInfo colorInfo_;
10635     private com.google.protobuf.SingleFieldBuilderV3<
10636             com.google.cloud.retail.v2.ColorInfo,
10637             com.google.cloud.retail.v2.ColorInfo.Builder,
10638             com.google.cloud.retail.v2.ColorInfoOrBuilder>
10639         colorInfoBuilder_;
10640     /**
10641      *
10642      *
10643      * <pre>
10644      * The color of the product.
10645      * Corresponding properties: Google Merchant Center property
10646      * [color](https://support.google.com/merchants/answer/6324487). Schema.org
10647      * property [Product.color](https://schema.org/color).
10648      * </pre>
10649      *
10650      * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
10651      *
10652      * @return Whether the colorInfo field is set.
10653      */
hasColorInfo()10654     public boolean hasColorInfo() {
10655       return ((bitField0_ & 0x01000000) != 0);
10656     }
10657     /**
10658      *
10659      *
10660      * <pre>
10661      * The color of the product.
10662      * Corresponding properties: Google Merchant Center property
10663      * [color](https://support.google.com/merchants/answer/6324487). Schema.org
10664      * property [Product.color](https://schema.org/color).
10665      * </pre>
10666      *
10667      * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
10668      *
10669      * @return The colorInfo.
10670      */
getColorInfo()10671     public com.google.cloud.retail.v2.ColorInfo getColorInfo() {
10672       if (colorInfoBuilder_ == null) {
10673         return colorInfo_ == null
10674             ? com.google.cloud.retail.v2.ColorInfo.getDefaultInstance()
10675             : colorInfo_;
10676       } else {
10677         return colorInfoBuilder_.getMessage();
10678       }
10679     }
10680     /**
10681      *
10682      *
10683      * <pre>
10684      * The color of the product.
10685      * Corresponding properties: Google Merchant Center property
10686      * [color](https://support.google.com/merchants/answer/6324487). Schema.org
10687      * property [Product.color](https://schema.org/color).
10688      * </pre>
10689      *
10690      * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
10691      */
setColorInfo(com.google.cloud.retail.v2.ColorInfo value)10692     public Builder setColorInfo(com.google.cloud.retail.v2.ColorInfo value) {
10693       if (colorInfoBuilder_ == null) {
10694         if (value == null) {
10695           throw new NullPointerException();
10696         }
10697         colorInfo_ = value;
10698       } else {
10699         colorInfoBuilder_.setMessage(value);
10700       }
10701       bitField0_ |= 0x01000000;
10702       onChanged();
10703       return this;
10704     }
10705     /**
10706      *
10707      *
10708      * <pre>
10709      * The color of the product.
10710      * Corresponding properties: Google Merchant Center property
10711      * [color](https://support.google.com/merchants/answer/6324487). Schema.org
10712      * property [Product.color](https://schema.org/color).
10713      * </pre>
10714      *
10715      * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
10716      */
setColorInfo(com.google.cloud.retail.v2.ColorInfo.Builder builderForValue)10717     public Builder setColorInfo(com.google.cloud.retail.v2.ColorInfo.Builder builderForValue) {
10718       if (colorInfoBuilder_ == null) {
10719         colorInfo_ = builderForValue.build();
10720       } else {
10721         colorInfoBuilder_.setMessage(builderForValue.build());
10722       }
10723       bitField0_ |= 0x01000000;
10724       onChanged();
10725       return this;
10726     }
10727     /**
10728      *
10729      *
10730      * <pre>
10731      * The color of the product.
10732      * Corresponding properties: Google Merchant Center property
10733      * [color](https://support.google.com/merchants/answer/6324487). Schema.org
10734      * property [Product.color](https://schema.org/color).
10735      * </pre>
10736      *
10737      * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
10738      */
mergeColorInfo(com.google.cloud.retail.v2.ColorInfo value)10739     public Builder mergeColorInfo(com.google.cloud.retail.v2.ColorInfo value) {
10740       if (colorInfoBuilder_ == null) {
10741         if (((bitField0_ & 0x01000000) != 0)
10742             && colorInfo_ != null
10743             && colorInfo_ != com.google.cloud.retail.v2.ColorInfo.getDefaultInstance()) {
10744           getColorInfoBuilder().mergeFrom(value);
10745         } else {
10746           colorInfo_ = value;
10747         }
10748       } else {
10749         colorInfoBuilder_.mergeFrom(value);
10750       }
10751       bitField0_ |= 0x01000000;
10752       onChanged();
10753       return this;
10754     }
10755     /**
10756      *
10757      *
10758      * <pre>
10759      * The color of the product.
10760      * Corresponding properties: Google Merchant Center property
10761      * [color](https://support.google.com/merchants/answer/6324487). Schema.org
10762      * property [Product.color](https://schema.org/color).
10763      * </pre>
10764      *
10765      * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
10766      */
clearColorInfo()10767     public Builder clearColorInfo() {
10768       bitField0_ = (bitField0_ & ~0x01000000);
10769       colorInfo_ = null;
10770       if (colorInfoBuilder_ != null) {
10771         colorInfoBuilder_.dispose();
10772         colorInfoBuilder_ = null;
10773       }
10774       onChanged();
10775       return this;
10776     }
10777     /**
10778      *
10779      *
10780      * <pre>
10781      * The color of the product.
10782      * Corresponding properties: Google Merchant Center property
10783      * [color](https://support.google.com/merchants/answer/6324487). Schema.org
10784      * property [Product.color](https://schema.org/color).
10785      * </pre>
10786      *
10787      * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
10788      */
getColorInfoBuilder()10789     public com.google.cloud.retail.v2.ColorInfo.Builder getColorInfoBuilder() {
10790       bitField0_ |= 0x01000000;
10791       onChanged();
10792       return getColorInfoFieldBuilder().getBuilder();
10793     }
10794     /**
10795      *
10796      *
10797      * <pre>
10798      * The color of the product.
10799      * Corresponding properties: Google Merchant Center property
10800      * [color](https://support.google.com/merchants/answer/6324487). Schema.org
10801      * property [Product.color](https://schema.org/color).
10802      * </pre>
10803      *
10804      * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
10805      */
getColorInfoOrBuilder()10806     public com.google.cloud.retail.v2.ColorInfoOrBuilder getColorInfoOrBuilder() {
10807       if (colorInfoBuilder_ != null) {
10808         return colorInfoBuilder_.getMessageOrBuilder();
10809       } else {
10810         return colorInfo_ == null
10811             ? com.google.cloud.retail.v2.ColorInfo.getDefaultInstance()
10812             : colorInfo_;
10813       }
10814     }
10815     /**
10816      *
10817      *
10818      * <pre>
10819      * The color of the product.
10820      * Corresponding properties: Google Merchant Center property
10821      * [color](https://support.google.com/merchants/answer/6324487). Schema.org
10822      * property [Product.color](https://schema.org/color).
10823      * </pre>
10824      *
10825      * <code>.google.cloud.retail.v2.ColorInfo color_info = 25;</code>
10826      */
10827     private com.google.protobuf.SingleFieldBuilderV3<
10828             com.google.cloud.retail.v2.ColorInfo,
10829             com.google.cloud.retail.v2.ColorInfo.Builder,
10830             com.google.cloud.retail.v2.ColorInfoOrBuilder>
getColorInfoFieldBuilder()10831         getColorInfoFieldBuilder() {
10832       if (colorInfoBuilder_ == null) {
10833         colorInfoBuilder_ =
10834             new com.google.protobuf.SingleFieldBuilderV3<
10835                 com.google.cloud.retail.v2.ColorInfo,
10836                 com.google.cloud.retail.v2.ColorInfo.Builder,
10837                 com.google.cloud.retail.v2.ColorInfoOrBuilder>(
10838                 getColorInfo(), getParentForChildren(), isClean());
10839         colorInfo_ = null;
10840       }
10841       return colorInfoBuilder_;
10842     }
10843 
10844     private com.google.protobuf.LazyStringList sizes_ =
10845         com.google.protobuf.LazyStringArrayList.EMPTY;
10846 
ensureSizesIsMutable()10847     private void ensureSizesIsMutable() {
10848       if (!((bitField0_ & 0x02000000) != 0)) {
10849         sizes_ = new com.google.protobuf.LazyStringArrayList(sizes_);
10850         bitField0_ |= 0x02000000;
10851       }
10852     }
10853     /**
10854      *
10855      *
10856      * <pre>
10857      * The size of the product. To represent different size systems or size types,
10858      * consider using this format: [[[size_system:]size_type:]size_value].
10859      * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
10860      * size type; "M" represents size value. In "GIRLS:27", size system is empty;
10861      * "GIRLS" represents size type; "27" represents size value. In "32 inches",
10862      * both size system and size type are empty, while size value is "32 inches".
10863      * A maximum of 20 values are allowed per
10864      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
10865      * encoded string with a length limit of 128 characters. Otherwise, an
10866      * INVALID_ARGUMENT error is returned.
10867      * Corresponding properties: Google Merchant Center property
10868      * [size](https://support.google.com/merchants/answer/6324492),
10869      * [size_type](https://support.google.com/merchants/answer/6324497), and
10870      * [size_system](https://support.google.com/merchants/answer/6324502).
10871      * Schema.org property [Product.size](https://schema.org/size).
10872      * </pre>
10873      *
10874      * <code>repeated string sizes = 26;</code>
10875      *
10876      * @return A list containing the sizes.
10877      */
getSizesList()10878     public com.google.protobuf.ProtocolStringList getSizesList() {
10879       return sizes_.getUnmodifiableView();
10880     }
10881     /**
10882      *
10883      *
10884      * <pre>
10885      * The size of the product. To represent different size systems or size types,
10886      * consider using this format: [[[size_system:]size_type:]size_value].
10887      * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
10888      * size type; "M" represents size value. In "GIRLS:27", size system is empty;
10889      * "GIRLS" represents size type; "27" represents size value. In "32 inches",
10890      * both size system and size type are empty, while size value is "32 inches".
10891      * A maximum of 20 values are allowed per
10892      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
10893      * encoded string with a length limit of 128 characters. Otherwise, an
10894      * INVALID_ARGUMENT error is returned.
10895      * Corresponding properties: Google Merchant Center property
10896      * [size](https://support.google.com/merchants/answer/6324492),
10897      * [size_type](https://support.google.com/merchants/answer/6324497), and
10898      * [size_system](https://support.google.com/merchants/answer/6324502).
10899      * Schema.org property [Product.size](https://schema.org/size).
10900      * </pre>
10901      *
10902      * <code>repeated string sizes = 26;</code>
10903      *
10904      * @return The count of sizes.
10905      */
getSizesCount()10906     public int getSizesCount() {
10907       return sizes_.size();
10908     }
10909     /**
10910      *
10911      *
10912      * <pre>
10913      * The size of the product. To represent different size systems or size types,
10914      * consider using this format: [[[size_system:]size_type:]size_value].
10915      * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
10916      * size type; "M" represents size value. In "GIRLS:27", size system is empty;
10917      * "GIRLS" represents size type; "27" represents size value. In "32 inches",
10918      * both size system and size type are empty, while size value is "32 inches".
10919      * A maximum of 20 values are allowed per
10920      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
10921      * encoded string with a length limit of 128 characters. Otherwise, an
10922      * INVALID_ARGUMENT error is returned.
10923      * Corresponding properties: Google Merchant Center property
10924      * [size](https://support.google.com/merchants/answer/6324492),
10925      * [size_type](https://support.google.com/merchants/answer/6324497), and
10926      * [size_system](https://support.google.com/merchants/answer/6324502).
10927      * Schema.org property [Product.size](https://schema.org/size).
10928      * </pre>
10929      *
10930      * <code>repeated string sizes = 26;</code>
10931      *
10932      * @param index The index of the element to return.
10933      * @return The sizes at the given index.
10934      */
getSizes(int index)10935     public java.lang.String getSizes(int index) {
10936       return sizes_.get(index);
10937     }
10938     /**
10939      *
10940      *
10941      * <pre>
10942      * The size of the product. To represent different size systems or size types,
10943      * consider using this format: [[[size_system:]size_type:]size_value].
10944      * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
10945      * size type; "M" represents size value. In "GIRLS:27", size system is empty;
10946      * "GIRLS" represents size type; "27" represents size value. In "32 inches",
10947      * both size system and size type are empty, while size value is "32 inches".
10948      * A maximum of 20 values are allowed per
10949      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
10950      * encoded string with a length limit of 128 characters. Otherwise, an
10951      * INVALID_ARGUMENT error is returned.
10952      * Corresponding properties: Google Merchant Center property
10953      * [size](https://support.google.com/merchants/answer/6324492),
10954      * [size_type](https://support.google.com/merchants/answer/6324497), and
10955      * [size_system](https://support.google.com/merchants/answer/6324502).
10956      * Schema.org property [Product.size](https://schema.org/size).
10957      * </pre>
10958      *
10959      * <code>repeated string sizes = 26;</code>
10960      *
10961      * @param index The index of the value to return.
10962      * @return The bytes of the sizes at the given index.
10963      */
getSizesBytes(int index)10964     public com.google.protobuf.ByteString getSizesBytes(int index) {
10965       return sizes_.getByteString(index);
10966     }
10967     /**
10968      *
10969      *
10970      * <pre>
10971      * The size of the product. To represent different size systems or size types,
10972      * consider using this format: [[[size_system:]size_type:]size_value].
10973      * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
10974      * size type; "M" represents size value. In "GIRLS:27", size system is empty;
10975      * "GIRLS" represents size type; "27" represents size value. In "32 inches",
10976      * both size system and size type are empty, while size value is "32 inches".
10977      * A maximum of 20 values are allowed per
10978      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
10979      * encoded string with a length limit of 128 characters. Otherwise, an
10980      * INVALID_ARGUMENT error is returned.
10981      * Corresponding properties: Google Merchant Center property
10982      * [size](https://support.google.com/merchants/answer/6324492),
10983      * [size_type](https://support.google.com/merchants/answer/6324497), and
10984      * [size_system](https://support.google.com/merchants/answer/6324502).
10985      * Schema.org property [Product.size](https://schema.org/size).
10986      * </pre>
10987      *
10988      * <code>repeated string sizes = 26;</code>
10989      *
10990      * @param index The index to set the value at.
10991      * @param value The sizes to set.
10992      * @return This builder for chaining.
10993      */
setSizes(int index, java.lang.String value)10994     public Builder setSizes(int index, java.lang.String value) {
10995       if (value == null) {
10996         throw new NullPointerException();
10997       }
10998       ensureSizesIsMutable();
10999       sizes_.set(index, value);
11000       onChanged();
11001       return this;
11002     }
11003     /**
11004      *
11005      *
11006      * <pre>
11007      * The size of the product. To represent different size systems or size types,
11008      * consider using this format: [[[size_system:]size_type:]size_value].
11009      * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
11010      * size type; "M" represents size value. In "GIRLS:27", size system is empty;
11011      * "GIRLS" represents size type; "27" represents size value. In "32 inches",
11012      * both size system and size type are empty, while size value is "32 inches".
11013      * A maximum of 20 values are allowed per
11014      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11015      * encoded string with a length limit of 128 characters. Otherwise, an
11016      * INVALID_ARGUMENT error is returned.
11017      * Corresponding properties: Google Merchant Center property
11018      * [size](https://support.google.com/merchants/answer/6324492),
11019      * [size_type](https://support.google.com/merchants/answer/6324497), and
11020      * [size_system](https://support.google.com/merchants/answer/6324502).
11021      * Schema.org property [Product.size](https://schema.org/size).
11022      * </pre>
11023      *
11024      * <code>repeated string sizes = 26;</code>
11025      *
11026      * @param value The sizes to add.
11027      * @return This builder for chaining.
11028      */
addSizes(java.lang.String value)11029     public Builder addSizes(java.lang.String value) {
11030       if (value == null) {
11031         throw new NullPointerException();
11032       }
11033       ensureSizesIsMutable();
11034       sizes_.add(value);
11035       onChanged();
11036       return this;
11037     }
11038     /**
11039      *
11040      *
11041      * <pre>
11042      * The size of the product. To represent different size systems or size types,
11043      * consider using this format: [[[size_system:]size_type:]size_value].
11044      * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
11045      * size type; "M" represents size value. In "GIRLS:27", size system is empty;
11046      * "GIRLS" represents size type; "27" represents size value. In "32 inches",
11047      * both size system and size type are empty, while size value is "32 inches".
11048      * A maximum of 20 values are allowed per
11049      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11050      * encoded string with a length limit of 128 characters. Otherwise, an
11051      * INVALID_ARGUMENT error is returned.
11052      * Corresponding properties: Google Merchant Center property
11053      * [size](https://support.google.com/merchants/answer/6324492),
11054      * [size_type](https://support.google.com/merchants/answer/6324497), and
11055      * [size_system](https://support.google.com/merchants/answer/6324502).
11056      * Schema.org property [Product.size](https://schema.org/size).
11057      * </pre>
11058      *
11059      * <code>repeated string sizes = 26;</code>
11060      *
11061      * @param values The sizes to add.
11062      * @return This builder for chaining.
11063      */
addAllSizes(java.lang.Iterable<java.lang.String> values)11064     public Builder addAllSizes(java.lang.Iterable<java.lang.String> values) {
11065       ensureSizesIsMutable();
11066       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sizes_);
11067       onChanged();
11068       return this;
11069     }
11070     /**
11071      *
11072      *
11073      * <pre>
11074      * The size of the product. To represent different size systems or size types,
11075      * consider using this format: [[[size_system:]size_type:]size_value].
11076      * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
11077      * size type; "M" represents size value. In "GIRLS:27", size system is empty;
11078      * "GIRLS" represents size type; "27" represents size value. In "32 inches",
11079      * both size system and size type are empty, while size value is "32 inches".
11080      * A maximum of 20 values are allowed per
11081      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11082      * encoded string with a length limit of 128 characters. Otherwise, an
11083      * INVALID_ARGUMENT error is returned.
11084      * Corresponding properties: Google Merchant Center property
11085      * [size](https://support.google.com/merchants/answer/6324492),
11086      * [size_type](https://support.google.com/merchants/answer/6324497), and
11087      * [size_system](https://support.google.com/merchants/answer/6324502).
11088      * Schema.org property [Product.size](https://schema.org/size).
11089      * </pre>
11090      *
11091      * <code>repeated string sizes = 26;</code>
11092      *
11093      * @return This builder for chaining.
11094      */
clearSizes()11095     public Builder clearSizes() {
11096       sizes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
11097       bitField0_ = (bitField0_ & ~0x02000000);
11098       onChanged();
11099       return this;
11100     }
11101     /**
11102      *
11103      *
11104      * <pre>
11105      * The size of the product. To represent different size systems or size types,
11106      * consider using this format: [[[size_system:]size_type:]size_value].
11107      * For example, in "US:MENS:M", "US" represents size system; "MENS" represents
11108      * size type; "M" represents size value. In "GIRLS:27", size system is empty;
11109      * "GIRLS" represents size type; "27" represents size value. In "32 inches",
11110      * both size system and size type are empty, while size value is "32 inches".
11111      * A maximum of 20 values are allowed per
11112      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11113      * encoded string with a length limit of 128 characters. Otherwise, an
11114      * INVALID_ARGUMENT error is returned.
11115      * Corresponding properties: Google Merchant Center property
11116      * [size](https://support.google.com/merchants/answer/6324492),
11117      * [size_type](https://support.google.com/merchants/answer/6324497), and
11118      * [size_system](https://support.google.com/merchants/answer/6324502).
11119      * Schema.org property [Product.size](https://schema.org/size).
11120      * </pre>
11121      *
11122      * <code>repeated string sizes = 26;</code>
11123      *
11124      * @param value The bytes of the sizes to add.
11125      * @return This builder for chaining.
11126      */
addSizesBytes(com.google.protobuf.ByteString value)11127     public Builder addSizesBytes(com.google.protobuf.ByteString value) {
11128       if (value == null) {
11129         throw new NullPointerException();
11130       }
11131       checkByteStringIsUtf8(value);
11132       ensureSizesIsMutable();
11133       sizes_.add(value);
11134       onChanged();
11135       return this;
11136     }
11137 
11138     private com.google.protobuf.LazyStringList materials_ =
11139         com.google.protobuf.LazyStringArrayList.EMPTY;
11140 
ensureMaterialsIsMutable()11141     private void ensureMaterialsIsMutable() {
11142       if (!((bitField0_ & 0x04000000) != 0)) {
11143         materials_ = new com.google.protobuf.LazyStringArrayList(materials_);
11144         bitField0_ |= 0x04000000;
11145       }
11146     }
11147     /**
11148      *
11149      *
11150      * <pre>
11151      * The material of the product. For example, "leather", "wooden".
11152      * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
11153      * string with a length limit of 200 characters. Otherwise, an
11154      * INVALID_ARGUMENT error is returned.
11155      * Corresponding properties: Google Merchant Center property
11156      * [material](https://support.google.com/merchants/answer/6324410). Schema.org
11157      * property [Product.material](https://schema.org/material).
11158      * </pre>
11159      *
11160      * <code>repeated string materials = 27;</code>
11161      *
11162      * @return A list containing the materials.
11163      */
getMaterialsList()11164     public com.google.protobuf.ProtocolStringList getMaterialsList() {
11165       return materials_.getUnmodifiableView();
11166     }
11167     /**
11168      *
11169      *
11170      * <pre>
11171      * The material of the product. For example, "leather", "wooden".
11172      * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
11173      * string with a length limit of 200 characters. Otherwise, an
11174      * INVALID_ARGUMENT error is returned.
11175      * Corresponding properties: Google Merchant Center property
11176      * [material](https://support.google.com/merchants/answer/6324410). Schema.org
11177      * property [Product.material](https://schema.org/material).
11178      * </pre>
11179      *
11180      * <code>repeated string materials = 27;</code>
11181      *
11182      * @return The count of materials.
11183      */
getMaterialsCount()11184     public int getMaterialsCount() {
11185       return materials_.size();
11186     }
11187     /**
11188      *
11189      *
11190      * <pre>
11191      * The material of the product. For example, "leather", "wooden".
11192      * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
11193      * string with a length limit of 200 characters. Otherwise, an
11194      * INVALID_ARGUMENT error is returned.
11195      * Corresponding properties: Google Merchant Center property
11196      * [material](https://support.google.com/merchants/answer/6324410). Schema.org
11197      * property [Product.material](https://schema.org/material).
11198      * </pre>
11199      *
11200      * <code>repeated string materials = 27;</code>
11201      *
11202      * @param index The index of the element to return.
11203      * @return The materials at the given index.
11204      */
getMaterials(int index)11205     public java.lang.String getMaterials(int index) {
11206       return materials_.get(index);
11207     }
11208     /**
11209      *
11210      *
11211      * <pre>
11212      * The material of the product. For example, "leather", "wooden".
11213      * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
11214      * string with a length limit of 200 characters. Otherwise, an
11215      * INVALID_ARGUMENT error is returned.
11216      * Corresponding properties: Google Merchant Center property
11217      * [material](https://support.google.com/merchants/answer/6324410). Schema.org
11218      * property [Product.material](https://schema.org/material).
11219      * </pre>
11220      *
11221      * <code>repeated string materials = 27;</code>
11222      *
11223      * @param index The index of the value to return.
11224      * @return The bytes of the materials at the given index.
11225      */
getMaterialsBytes(int index)11226     public com.google.protobuf.ByteString getMaterialsBytes(int index) {
11227       return materials_.getByteString(index);
11228     }
11229     /**
11230      *
11231      *
11232      * <pre>
11233      * The material of the product. For example, "leather", "wooden".
11234      * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
11235      * string with a length limit of 200 characters. Otherwise, an
11236      * INVALID_ARGUMENT error is returned.
11237      * Corresponding properties: Google Merchant Center property
11238      * [material](https://support.google.com/merchants/answer/6324410). Schema.org
11239      * property [Product.material](https://schema.org/material).
11240      * </pre>
11241      *
11242      * <code>repeated string materials = 27;</code>
11243      *
11244      * @param index The index to set the value at.
11245      * @param value The materials to set.
11246      * @return This builder for chaining.
11247      */
setMaterials(int index, java.lang.String value)11248     public Builder setMaterials(int index, java.lang.String value) {
11249       if (value == null) {
11250         throw new NullPointerException();
11251       }
11252       ensureMaterialsIsMutable();
11253       materials_.set(index, value);
11254       onChanged();
11255       return this;
11256     }
11257     /**
11258      *
11259      *
11260      * <pre>
11261      * The material of the product. For example, "leather", "wooden".
11262      * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
11263      * string with a length limit of 200 characters. Otherwise, an
11264      * INVALID_ARGUMENT error is returned.
11265      * Corresponding properties: Google Merchant Center property
11266      * [material](https://support.google.com/merchants/answer/6324410). Schema.org
11267      * property [Product.material](https://schema.org/material).
11268      * </pre>
11269      *
11270      * <code>repeated string materials = 27;</code>
11271      *
11272      * @param value The materials to add.
11273      * @return This builder for chaining.
11274      */
addMaterials(java.lang.String value)11275     public Builder addMaterials(java.lang.String value) {
11276       if (value == null) {
11277         throw new NullPointerException();
11278       }
11279       ensureMaterialsIsMutable();
11280       materials_.add(value);
11281       onChanged();
11282       return this;
11283     }
11284     /**
11285      *
11286      *
11287      * <pre>
11288      * The material of the product. For example, "leather", "wooden".
11289      * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
11290      * string with a length limit of 200 characters. Otherwise, an
11291      * INVALID_ARGUMENT error is returned.
11292      * Corresponding properties: Google Merchant Center property
11293      * [material](https://support.google.com/merchants/answer/6324410). Schema.org
11294      * property [Product.material](https://schema.org/material).
11295      * </pre>
11296      *
11297      * <code>repeated string materials = 27;</code>
11298      *
11299      * @param values The materials to add.
11300      * @return This builder for chaining.
11301      */
addAllMaterials(java.lang.Iterable<java.lang.String> values)11302     public Builder addAllMaterials(java.lang.Iterable<java.lang.String> values) {
11303       ensureMaterialsIsMutable();
11304       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, materials_);
11305       onChanged();
11306       return this;
11307     }
11308     /**
11309      *
11310      *
11311      * <pre>
11312      * The material of the product. For example, "leather", "wooden".
11313      * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
11314      * string with a length limit of 200 characters. Otherwise, an
11315      * INVALID_ARGUMENT error is returned.
11316      * Corresponding properties: Google Merchant Center property
11317      * [material](https://support.google.com/merchants/answer/6324410). Schema.org
11318      * property [Product.material](https://schema.org/material).
11319      * </pre>
11320      *
11321      * <code>repeated string materials = 27;</code>
11322      *
11323      * @return This builder for chaining.
11324      */
clearMaterials()11325     public Builder clearMaterials() {
11326       materials_ = com.google.protobuf.LazyStringArrayList.EMPTY;
11327       bitField0_ = (bitField0_ & ~0x04000000);
11328       onChanged();
11329       return this;
11330     }
11331     /**
11332      *
11333      *
11334      * <pre>
11335      * The material of the product. For example, "leather", "wooden".
11336      * A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
11337      * string with a length limit of 200 characters. Otherwise, an
11338      * INVALID_ARGUMENT error is returned.
11339      * Corresponding properties: Google Merchant Center property
11340      * [material](https://support.google.com/merchants/answer/6324410). Schema.org
11341      * property [Product.material](https://schema.org/material).
11342      * </pre>
11343      *
11344      * <code>repeated string materials = 27;</code>
11345      *
11346      * @param value The bytes of the materials to add.
11347      * @return This builder for chaining.
11348      */
addMaterialsBytes(com.google.protobuf.ByteString value)11349     public Builder addMaterialsBytes(com.google.protobuf.ByteString value) {
11350       if (value == null) {
11351         throw new NullPointerException();
11352       }
11353       checkByteStringIsUtf8(value);
11354       ensureMaterialsIsMutable();
11355       materials_.add(value);
11356       onChanged();
11357       return this;
11358     }
11359 
11360     private com.google.protobuf.LazyStringList patterns_ =
11361         com.google.protobuf.LazyStringArrayList.EMPTY;
11362 
ensurePatternsIsMutable()11363     private void ensurePatternsIsMutable() {
11364       if (!((bitField0_ & 0x08000000) != 0)) {
11365         patterns_ = new com.google.protobuf.LazyStringArrayList(patterns_);
11366         bitField0_ |= 0x08000000;
11367       }
11368     }
11369     /**
11370      *
11371      *
11372      * <pre>
11373      * The pattern or graphic print of the product. For example, "striped", "polka
11374      * dot", "paisley".
11375      * A maximum of 20 values are allowed per
11376      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11377      * encoded string with a length limit of 128 characters. Otherwise, an
11378      * INVALID_ARGUMENT error is returned.
11379      * Corresponding properties: Google Merchant Center property
11380      * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
11381      * property [Product.pattern](https://schema.org/pattern).
11382      * </pre>
11383      *
11384      * <code>repeated string patterns = 28;</code>
11385      *
11386      * @return A list containing the patterns.
11387      */
getPatternsList()11388     public com.google.protobuf.ProtocolStringList getPatternsList() {
11389       return patterns_.getUnmodifiableView();
11390     }
11391     /**
11392      *
11393      *
11394      * <pre>
11395      * The pattern or graphic print of the product. For example, "striped", "polka
11396      * dot", "paisley".
11397      * A maximum of 20 values are allowed per
11398      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11399      * encoded string with a length limit of 128 characters. Otherwise, an
11400      * INVALID_ARGUMENT error is returned.
11401      * Corresponding properties: Google Merchant Center property
11402      * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
11403      * property [Product.pattern](https://schema.org/pattern).
11404      * </pre>
11405      *
11406      * <code>repeated string patterns = 28;</code>
11407      *
11408      * @return The count of patterns.
11409      */
getPatternsCount()11410     public int getPatternsCount() {
11411       return patterns_.size();
11412     }
11413     /**
11414      *
11415      *
11416      * <pre>
11417      * The pattern or graphic print of the product. For example, "striped", "polka
11418      * dot", "paisley".
11419      * A maximum of 20 values are allowed per
11420      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11421      * encoded string with a length limit of 128 characters. Otherwise, an
11422      * INVALID_ARGUMENT error is returned.
11423      * Corresponding properties: Google Merchant Center property
11424      * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
11425      * property [Product.pattern](https://schema.org/pattern).
11426      * </pre>
11427      *
11428      * <code>repeated string patterns = 28;</code>
11429      *
11430      * @param index The index of the element to return.
11431      * @return The patterns at the given index.
11432      */
getPatterns(int index)11433     public java.lang.String getPatterns(int index) {
11434       return patterns_.get(index);
11435     }
11436     /**
11437      *
11438      *
11439      * <pre>
11440      * The pattern or graphic print of the product. For example, "striped", "polka
11441      * dot", "paisley".
11442      * A maximum of 20 values are allowed per
11443      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11444      * encoded string with a length limit of 128 characters. Otherwise, an
11445      * INVALID_ARGUMENT error is returned.
11446      * Corresponding properties: Google Merchant Center property
11447      * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
11448      * property [Product.pattern](https://schema.org/pattern).
11449      * </pre>
11450      *
11451      * <code>repeated string patterns = 28;</code>
11452      *
11453      * @param index The index of the value to return.
11454      * @return The bytes of the patterns at the given index.
11455      */
getPatternsBytes(int index)11456     public com.google.protobuf.ByteString getPatternsBytes(int index) {
11457       return patterns_.getByteString(index);
11458     }
11459     /**
11460      *
11461      *
11462      * <pre>
11463      * The pattern or graphic print of the product. For example, "striped", "polka
11464      * dot", "paisley".
11465      * A maximum of 20 values are allowed per
11466      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11467      * encoded string with a length limit of 128 characters. Otherwise, an
11468      * INVALID_ARGUMENT error is returned.
11469      * Corresponding properties: Google Merchant Center property
11470      * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
11471      * property [Product.pattern](https://schema.org/pattern).
11472      * </pre>
11473      *
11474      * <code>repeated string patterns = 28;</code>
11475      *
11476      * @param index The index to set the value at.
11477      * @param value The patterns to set.
11478      * @return This builder for chaining.
11479      */
setPatterns(int index, java.lang.String value)11480     public Builder setPatterns(int index, java.lang.String value) {
11481       if (value == null) {
11482         throw new NullPointerException();
11483       }
11484       ensurePatternsIsMutable();
11485       patterns_.set(index, value);
11486       onChanged();
11487       return this;
11488     }
11489     /**
11490      *
11491      *
11492      * <pre>
11493      * The pattern or graphic print of the product. For example, "striped", "polka
11494      * dot", "paisley".
11495      * A maximum of 20 values are allowed per
11496      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11497      * encoded string with a length limit of 128 characters. Otherwise, an
11498      * INVALID_ARGUMENT error is returned.
11499      * Corresponding properties: Google Merchant Center property
11500      * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
11501      * property [Product.pattern](https://schema.org/pattern).
11502      * </pre>
11503      *
11504      * <code>repeated string patterns = 28;</code>
11505      *
11506      * @param value The patterns to add.
11507      * @return This builder for chaining.
11508      */
addPatterns(java.lang.String value)11509     public Builder addPatterns(java.lang.String value) {
11510       if (value == null) {
11511         throw new NullPointerException();
11512       }
11513       ensurePatternsIsMutable();
11514       patterns_.add(value);
11515       onChanged();
11516       return this;
11517     }
11518     /**
11519      *
11520      *
11521      * <pre>
11522      * The pattern or graphic print of the product. For example, "striped", "polka
11523      * dot", "paisley".
11524      * A maximum of 20 values are allowed per
11525      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11526      * encoded string with a length limit of 128 characters. Otherwise, an
11527      * INVALID_ARGUMENT error is returned.
11528      * Corresponding properties: Google Merchant Center property
11529      * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
11530      * property [Product.pattern](https://schema.org/pattern).
11531      * </pre>
11532      *
11533      * <code>repeated string patterns = 28;</code>
11534      *
11535      * @param values The patterns to add.
11536      * @return This builder for chaining.
11537      */
addAllPatterns(java.lang.Iterable<java.lang.String> values)11538     public Builder addAllPatterns(java.lang.Iterable<java.lang.String> values) {
11539       ensurePatternsIsMutable();
11540       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, patterns_);
11541       onChanged();
11542       return this;
11543     }
11544     /**
11545      *
11546      *
11547      * <pre>
11548      * The pattern or graphic print of the product. For example, "striped", "polka
11549      * dot", "paisley".
11550      * A maximum of 20 values are allowed per
11551      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11552      * encoded string with a length limit of 128 characters. Otherwise, an
11553      * INVALID_ARGUMENT error is returned.
11554      * Corresponding properties: Google Merchant Center property
11555      * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
11556      * property [Product.pattern](https://schema.org/pattern).
11557      * </pre>
11558      *
11559      * <code>repeated string patterns = 28;</code>
11560      *
11561      * @return This builder for chaining.
11562      */
clearPatterns()11563     public Builder clearPatterns() {
11564       patterns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
11565       bitField0_ = (bitField0_ & ~0x08000000);
11566       onChanged();
11567       return this;
11568     }
11569     /**
11570      *
11571      *
11572      * <pre>
11573      * The pattern or graphic print of the product. For example, "striped", "polka
11574      * dot", "paisley".
11575      * A maximum of 20 values are allowed per
11576      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11577      * encoded string with a length limit of 128 characters. Otherwise, an
11578      * INVALID_ARGUMENT error is returned.
11579      * Corresponding properties: Google Merchant Center property
11580      * [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
11581      * property [Product.pattern](https://schema.org/pattern).
11582      * </pre>
11583      *
11584      * <code>repeated string patterns = 28;</code>
11585      *
11586      * @param value The bytes of the patterns to add.
11587      * @return This builder for chaining.
11588      */
addPatternsBytes(com.google.protobuf.ByteString value)11589     public Builder addPatternsBytes(com.google.protobuf.ByteString value) {
11590       if (value == null) {
11591         throw new NullPointerException();
11592       }
11593       checkByteStringIsUtf8(value);
11594       ensurePatternsIsMutable();
11595       patterns_.add(value);
11596       onChanged();
11597       return this;
11598     }
11599 
11600     private com.google.protobuf.LazyStringList conditions_ =
11601         com.google.protobuf.LazyStringArrayList.EMPTY;
11602 
ensureConditionsIsMutable()11603     private void ensureConditionsIsMutable() {
11604       if (!((bitField0_ & 0x10000000) != 0)) {
11605         conditions_ = new com.google.protobuf.LazyStringArrayList(conditions_);
11606         bitField0_ |= 0x10000000;
11607       }
11608     }
11609     /**
11610      *
11611      *
11612      * <pre>
11613      * The condition of the product. Strongly encouraged to use the standard
11614      * values: "new", "refurbished", "used".
11615      * A maximum of 1 value is allowed per
11616      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11617      * encoded string with a length limit of 128 characters. Otherwise, an
11618      * INVALID_ARGUMENT error is returned.
11619      * Corresponding properties: Google Merchant Center property
11620      * [condition](https://support.google.com/merchants/answer/6324469).
11621      * Schema.org property
11622      * [Offer.itemCondition](https://schema.org/itemCondition).
11623      * </pre>
11624      *
11625      * <code>repeated string conditions = 29;</code>
11626      *
11627      * @return A list containing the conditions.
11628      */
getConditionsList()11629     public com.google.protobuf.ProtocolStringList getConditionsList() {
11630       return conditions_.getUnmodifiableView();
11631     }
11632     /**
11633      *
11634      *
11635      * <pre>
11636      * The condition of the product. Strongly encouraged to use the standard
11637      * values: "new", "refurbished", "used".
11638      * A maximum of 1 value is allowed per
11639      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11640      * encoded string with a length limit of 128 characters. Otherwise, an
11641      * INVALID_ARGUMENT error is returned.
11642      * Corresponding properties: Google Merchant Center property
11643      * [condition](https://support.google.com/merchants/answer/6324469).
11644      * Schema.org property
11645      * [Offer.itemCondition](https://schema.org/itemCondition).
11646      * </pre>
11647      *
11648      * <code>repeated string conditions = 29;</code>
11649      *
11650      * @return The count of conditions.
11651      */
getConditionsCount()11652     public int getConditionsCount() {
11653       return conditions_.size();
11654     }
11655     /**
11656      *
11657      *
11658      * <pre>
11659      * The condition of the product. Strongly encouraged to use the standard
11660      * values: "new", "refurbished", "used".
11661      * A maximum of 1 value is allowed per
11662      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11663      * encoded string with a length limit of 128 characters. Otherwise, an
11664      * INVALID_ARGUMENT error is returned.
11665      * Corresponding properties: Google Merchant Center property
11666      * [condition](https://support.google.com/merchants/answer/6324469).
11667      * Schema.org property
11668      * [Offer.itemCondition](https://schema.org/itemCondition).
11669      * </pre>
11670      *
11671      * <code>repeated string conditions = 29;</code>
11672      *
11673      * @param index The index of the element to return.
11674      * @return The conditions at the given index.
11675      */
getConditions(int index)11676     public java.lang.String getConditions(int index) {
11677       return conditions_.get(index);
11678     }
11679     /**
11680      *
11681      *
11682      * <pre>
11683      * The condition of the product. Strongly encouraged to use the standard
11684      * values: "new", "refurbished", "used".
11685      * A maximum of 1 value is allowed per
11686      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11687      * encoded string with a length limit of 128 characters. Otherwise, an
11688      * INVALID_ARGUMENT error is returned.
11689      * Corresponding properties: Google Merchant Center property
11690      * [condition](https://support.google.com/merchants/answer/6324469).
11691      * Schema.org property
11692      * [Offer.itemCondition](https://schema.org/itemCondition).
11693      * </pre>
11694      *
11695      * <code>repeated string conditions = 29;</code>
11696      *
11697      * @param index The index of the value to return.
11698      * @return The bytes of the conditions at the given index.
11699      */
getConditionsBytes(int index)11700     public com.google.protobuf.ByteString getConditionsBytes(int index) {
11701       return conditions_.getByteString(index);
11702     }
11703     /**
11704      *
11705      *
11706      * <pre>
11707      * The condition of the product. Strongly encouraged to use the standard
11708      * values: "new", "refurbished", "used".
11709      * A maximum of 1 value is allowed per
11710      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11711      * encoded string with a length limit of 128 characters. Otherwise, an
11712      * INVALID_ARGUMENT error is returned.
11713      * Corresponding properties: Google Merchant Center property
11714      * [condition](https://support.google.com/merchants/answer/6324469).
11715      * Schema.org property
11716      * [Offer.itemCondition](https://schema.org/itemCondition).
11717      * </pre>
11718      *
11719      * <code>repeated string conditions = 29;</code>
11720      *
11721      * @param index The index to set the value at.
11722      * @param value The conditions to set.
11723      * @return This builder for chaining.
11724      */
setConditions(int index, java.lang.String value)11725     public Builder setConditions(int index, java.lang.String value) {
11726       if (value == null) {
11727         throw new NullPointerException();
11728       }
11729       ensureConditionsIsMutable();
11730       conditions_.set(index, value);
11731       onChanged();
11732       return this;
11733     }
11734     /**
11735      *
11736      *
11737      * <pre>
11738      * The condition of the product. Strongly encouraged to use the standard
11739      * values: "new", "refurbished", "used".
11740      * A maximum of 1 value is allowed per
11741      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11742      * encoded string with a length limit of 128 characters. Otherwise, an
11743      * INVALID_ARGUMENT error is returned.
11744      * Corresponding properties: Google Merchant Center property
11745      * [condition](https://support.google.com/merchants/answer/6324469).
11746      * Schema.org property
11747      * [Offer.itemCondition](https://schema.org/itemCondition).
11748      * </pre>
11749      *
11750      * <code>repeated string conditions = 29;</code>
11751      *
11752      * @param value The conditions to add.
11753      * @return This builder for chaining.
11754      */
addConditions(java.lang.String value)11755     public Builder addConditions(java.lang.String value) {
11756       if (value == null) {
11757         throw new NullPointerException();
11758       }
11759       ensureConditionsIsMutable();
11760       conditions_.add(value);
11761       onChanged();
11762       return this;
11763     }
11764     /**
11765      *
11766      *
11767      * <pre>
11768      * The condition of the product. Strongly encouraged to use the standard
11769      * values: "new", "refurbished", "used".
11770      * A maximum of 1 value is allowed per
11771      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11772      * encoded string with a length limit of 128 characters. Otherwise, an
11773      * INVALID_ARGUMENT error is returned.
11774      * Corresponding properties: Google Merchant Center property
11775      * [condition](https://support.google.com/merchants/answer/6324469).
11776      * Schema.org property
11777      * [Offer.itemCondition](https://schema.org/itemCondition).
11778      * </pre>
11779      *
11780      * <code>repeated string conditions = 29;</code>
11781      *
11782      * @param values The conditions to add.
11783      * @return This builder for chaining.
11784      */
addAllConditions(java.lang.Iterable<java.lang.String> values)11785     public Builder addAllConditions(java.lang.Iterable<java.lang.String> values) {
11786       ensureConditionsIsMutable();
11787       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conditions_);
11788       onChanged();
11789       return this;
11790     }
11791     /**
11792      *
11793      *
11794      * <pre>
11795      * The condition of the product. Strongly encouraged to use the standard
11796      * values: "new", "refurbished", "used".
11797      * A maximum of 1 value is allowed per
11798      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11799      * encoded string with a length limit of 128 characters. Otherwise, an
11800      * INVALID_ARGUMENT error is returned.
11801      * Corresponding properties: Google Merchant Center property
11802      * [condition](https://support.google.com/merchants/answer/6324469).
11803      * Schema.org property
11804      * [Offer.itemCondition](https://schema.org/itemCondition).
11805      * </pre>
11806      *
11807      * <code>repeated string conditions = 29;</code>
11808      *
11809      * @return This builder for chaining.
11810      */
clearConditions()11811     public Builder clearConditions() {
11812       conditions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
11813       bitField0_ = (bitField0_ & ~0x10000000);
11814       onChanged();
11815       return this;
11816     }
11817     /**
11818      *
11819      *
11820      * <pre>
11821      * The condition of the product. Strongly encouraged to use the standard
11822      * values: "new", "refurbished", "used".
11823      * A maximum of 1 value is allowed per
11824      * [Product][google.cloud.retail.v2.Product]. Each value must be a UTF-8
11825      * encoded string with a length limit of 128 characters. Otherwise, an
11826      * INVALID_ARGUMENT error is returned.
11827      * Corresponding properties: Google Merchant Center property
11828      * [condition](https://support.google.com/merchants/answer/6324469).
11829      * Schema.org property
11830      * [Offer.itemCondition](https://schema.org/itemCondition).
11831      * </pre>
11832      *
11833      * <code>repeated string conditions = 29;</code>
11834      *
11835      * @param value The bytes of the conditions to add.
11836      * @return This builder for chaining.
11837      */
addConditionsBytes(com.google.protobuf.ByteString value)11838     public Builder addConditionsBytes(com.google.protobuf.ByteString value) {
11839       if (value == null) {
11840         throw new NullPointerException();
11841       }
11842       checkByteStringIsUtf8(value);
11843       ensureConditionsIsMutable();
11844       conditions_.add(value);
11845       onChanged();
11846       return this;
11847     }
11848 
11849     private java.util.List<com.google.cloud.retail.v2.Promotion> promotions_ =
11850         java.util.Collections.emptyList();
11851 
ensurePromotionsIsMutable()11852     private void ensurePromotionsIsMutable() {
11853       if (!((bitField0_ & 0x20000000) != 0)) {
11854         promotions_ = new java.util.ArrayList<com.google.cloud.retail.v2.Promotion>(promotions_);
11855         bitField0_ |= 0x20000000;
11856       }
11857     }
11858 
11859     private com.google.protobuf.RepeatedFieldBuilderV3<
11860             com.google.cloud.retail.v2.Promotion,
11861             com.google.cloud.retail.v2.Promotion.Builder,
11862             com.google.cloud.retail.v2.PromotionOrBuilder>
11863         promotionsBuilder_;
11864 
11865     /**
11866      *
11867      *
11868      * <pre>
11869      * The promotions applied to the product. A maximum of 10 values are allowed
11870      * per [Product][google.cloud.retail.v2.Product]. Only
11871      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
11872      * will be used, other fields will be ignored if set.
11873      * </pre>
11874      *
11875      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
11876      */
getPromotionsList()11877     public java.util.List<com.google.cloud.retail.v2.Promotion> getPromotionsList() {
11878       if (promotionsBuilder_ == null) {
11879         return java.util.Collections.unmodifiableList(promotions_);
11880       } else {
11881         return promotionsBuilder_.getMessageList();
11882       }
11883     }
11884     /**
11885      *
11886      *
11887      * <pre>
11888      * The promotions applied to the product. A maximum of 10 values are allowed
11889      * per [Product][google.cloud.retail.v2.Product]. Only
11890      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
11891      * will be used, other fields will be ignored if set.
11892      * </pre>
11893      *
11894      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
11895      */
getPromotionsCount()11896     public int getPromotionsCount() {
11897       if (promotionsBuilder_ == null) {
11898         return promotions_.size();
11899       } else {
11900         return promotionsBuilder_.getCount();
11901       }
11902     }
11903     /**
11904      *
11905      *
11906      * <pre>
11907      * The promotions applied to the product. A maximum of 10 values are allowed
11908      * per [Product][google.cloud.retail.v2.Product]. Only
11909      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
11910      * will be used, other fields will be ignored if set.
11911      * </pre>
11912      *
11913      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
11914      */
getPromotions(int index)11915     public com.google.cloud.retail.v2.Promotion getPromotions(int index) {
11916       if (promotionsBuilder_ == null) {
11917         return promotions_.get(index);
11918       } else {
11919         return promotionsBuilder_.getMessage(index);
11920       }
11921     }
11922     /**
11923      *
11924      *
11925      * <pre>
11926      * The promotions applied to the product. A maximum of 10 values are allowed
11927      * per [Product][google.cloud.retail.v2.Product]. Only
11928      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
11929      * will be used, other fields will be ignored if set.
11930      * </pre>
11931      *
11932      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
11933      */
setPromotions(int index, com.google.cloud.retail.v2.Promotion value)11934     public Builder setPromotions(int index, com.google.cloud.retail.v2.Promotion value) {
11935       if (promotionsBuilder_ == null) {
11936         if (value == null) {
11937           throw new NullPointerException();
11938         }
11939         ensurePromotionsIsMutable();
11940         promotions_.set(index, value);
11941         onChanged();
11942       } else {
11943         promotionsBuilder_.setMessage(index, value);
11944       }
11945       return this;
11946     }
11947     /**
11948      *
11949      *
11950      * <pre>
11951      * The promotions applied to the product. A maximum of 10 values are allowed
11952      * per [Product][google.cloud.retail.v2.Product]. Only
11953      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
11954      * will be used, other fields will be ignored if set.
11955      * </pre>
11956      *
11957      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
11958      */
setPromotions( int index, com.google.cloud.retail.v2.Promotion.Builder builderForValue)11959     public Builder setPromotions(
11960         int index, com.google.cloud.retail.v2.Promotion.Builder builderForValue) {
11961       if (promotionsBuilder_ == null) {
11962         ensurePromotionsIsMutable();
11963         promotions_.set(index, builderForValue.build());
11964         onChanged();
11965       } else {
11966         promotionsBuilder_.setMessage(index, builderForValue.build());
11967       }
11968       return this;
11969     }
11970     /**
11971      *
11972      *
11973      * <pre>
11974      * The promotions applied to the product. A maximum of 10 values are allowed
11975      * per [Product][google.cloud.retail.v2.Product]. Only
11976      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
11977      * will be used, other fields will be ignored if set.
11978      * </pre>
11979      *
11980      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
11981      */
addPromotions(com.google.cloud.retail.v2.Promotion value)11982     public Builder addPromotions(com.google.cloud.retail.v2.Promotion value) {
11983       if (promotionsBuilder_ == null) {
11984         if (value == null) {
11985           throw new NullPointerException();
11986         }
11987         ensurePromotionsIsMutable();
11988         promotions_.add(value);
11989         onChanged();
11990       } else {
11991         promotionsBuilder_.addMessage(value);
11992       }
11993       return this;
11994     }
11995     /**
11996      *
11997      *
11998      * <pre>
11999      * The promotions applied to the product. A maximum of 10 values are allowed
12000      * per [Product][google.cloud.retail.v2.Product]. Only
12001      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12002      * will be used, other fields will be ignored if set.
12003      * </pre>
12004      *
12005      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12006      */
addPromotions(int index, com.google.cloud.retail.v2.Promotion value)12007     public Builder addPromotions(int index, com.google.cloud.retail.v2.Promotion value) {
12008       if (promotionsBuilder_ == null) {
12009         if (value == null) {
12010           throw new NullPointerException();
12011         }
12012         ensurePromotionsIsMutable();
12013         promotions_.add(index, value);
12014         onChanged();
12015       } else {
12016         promotionsBuilder_.addMessage(index, value);
12017       }
12018       return this;
12019     }
12020     /**
12021      *
12022      *
12023      * <pre>
12024      * The promotions applied to the product. A maximum of 10 values are allowed
12025      * per [Product][google.cloud.retail.v2.Product]. Only
12026      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12027      * will be used, other fields will be ignored if set.
12028      * </pre>
12029      *
12030      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12031      */
addPromotions(com.google.cloud.retail.v2.Promotion.Builder builderForValue)12032     public Builder addPromotions(com.google.cloud.retail.v2.Promotion.Builder builderForValue) {
12033       if (promotionsBuilder_ == null) {
12034         ensurePromotionsIsMutable();
12035         promotions_.add(builderForValue.build());
12036         onChanged();
12037       } else {
12038         promotionsBuilder_.addMessage(builderForValue.build());
12039       }
12040       return this;
12041     }
12042     /**
12043      *
12044      *
12045      * <pre>
12046      * The promotions applied to the product. A maximum of 10 values are allowed
12047      * per [Product][google.cloud.retail.v2.Product]. Only
12048      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12049      * will be used, other fields will be ignored if set.
12050      * </pre>
12051      *
12052      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12053      */
addPromotions( int index, com.google.cloud.retail.v2.Promotion.Builder builderForValue)12054     public Builder addPromotions(
12055         int index, com.google.cloud.retail.v2.Promotion.Builder builderForValue) {
12056       if (promotionsBuilder_ == null) {
12057         ensurePromotionsIsMutable();
12058         promotions_.add(index, builderForValue.build());
12059         onChanged();
12060       } else {
12061         promotionsBuilder_.addMessage(index, builderForValue.build());
12062       }
12063       return this;
12064     }
12065     /**
12066      *
12067      *
12068      * <pre>
12069      * The promotions applied to the product. A maximum of 10 values are allowed
12070      * per [Product][google.cloud.retail.v2.Product]. Only
12071      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12072      * will be used, other fields will be ignored if set.
12073      * </pre>
12074      *
12075      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12076      */
addAllPromotions( java.lang.Iterable<? extends com.google.cloud.retail.v2.Promotion> values)12077     public Builder addAllPromotions(
12078         java.lang.Iterable<? extends com.google.cloud.retail.v2.Promotion> values) {
12079       if (promotionsBuilder_ == null) {
12080         ensurePromotionsIsMutable();
12081         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promotions_);
12082         onChanged();
12083       } else {
12084         promotionsBuilder_.addAllMessages(values);
12085       }
12086       return this;
12087     }
12088     /**
12089      *
12090      *
12091      * <pre>
12092      * The promotions applied to the product. A maximum of 10 values are allowed
12093      * per [Product][google.cloud.retail.v2.Product]. Only
12094      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12095      * will be used, other fields will be ignored if set.
12096      * </pre>
12097      *
12098      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12099      */
clearPromotions()12100     public Builder clearPromotions() {
12101       if (promotionsBuilder_ == null) {
12102         promotions_ = java.util.Collections.emptyList();
12103         bitField0_ = (bitField0_ & ~0x20000000);
12104         onChanged();
12105       } else {
12106         promotionsBuilder_.clear();
12107       }
12108       return this;
12109     }
12110     /**
12111      *
12112      *
12113      * <pre>
12114      * The promotions applied to the product. A maximum of 10 values are allowed
12115      * per [Product][google.cloud.retail.v2.Product]. Only
12116      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12117      * will be used, other fields will be ignored if set.
12118      * </pre>
12119      *
12120      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12121      */
removePromotions(int index)12122     public Builder removePromotions(int index) {
12123       if (promotionsBuilder_ == null) {
12124         ensurePromotionsIsMutable();
12125         promotions_.remove(index);
12126         onChanged();
12127       } else {
12128         promotionsBuilder_.remove(index);
12129       }
12130       return this;
12131     }
12132     /**
12133      *
12134      *
12135      * <pre>
12136      * The promotions applied to the product. A maximum of 10 values are allowed
12137      * per [Product][google.cloud.retail.v2.Product]. Only
12138      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12139      * will be used, other fields will be ignored if set.
12140      * </pre>
12141      *
12142      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12143      */
getPromotionsBuilder(int index)12144     public com.google.cloud.retail.v2.Promotion.Builder getPromotionsBuilder(int index) {
12145       return getPromotionsFieldBuilder().getBuilder(index);
12146     }
12147     /**
12148      *
12149      *
12150      * <pre>
12151      * The promotions applied to the product. A maximum of 10 values are allowed
12152      * per [Product][google.cloud.retail.v2.Product]. Only
12153      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12154      * will be used, other fields will be ignored if set.
12155      * </pre>
12156      *
12157      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12158      */
getPromotionsOrBuilder(int index)12159     public com.google.cloud.retail.v2.PromotionOrBuilder getPromotionsOrBuilder(int index) {
12160       if (promotionsBuilder_ == null) {
12161         return promotions_.get(index);
12162       } else {
12163         return promotionsBuilder_.getMessageOrBuilder(index);
12164       }
12165     }
12166     /**
12167      *
12168      *
12169      * <pre>
12170      * The promotions applied to the product. A maximum of 10 values are allowed
12171      * per [Product][google.cloud.retail.v2.Product]. Only
12172      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12173      * will be used, other fields will be ignored if set.
12174      * </pre>
12175      *
12176      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12177      */
12178     public java.util.List<? extends com.google.cloud.retail.v2.PromotionOrBuilder>
getPromotionsOrBuilderList()12179         getPromotionsOrBuilderList() {
12180       if (promotionsBuilder_ != null) {
12181         return promotionsBuilder_.getMessageOrBuilderList();
12182       } else {
12183         return java.util.Collections.unmodifiableList(promotions_);
12184       }
12185     }
12186     /**
12187      *
12188      *
12189      * <pre>
12190      * The promotions applied to the product. A maximum of 10 values are allowed
12191      * per [Product][google.cloud.retail.v2.Product]. Only
12192      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12193      * will be used, other fields will be ignored if set.
12194      * </pre>
12195      *
12196      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12197      */
addPromotionsBuilder()12198     public com.google.cloud.retail.v2.Promotion.Builder addPromotionsBuilder() {
12199       return getPromotionsFieldBuilder()
12200           .addBuilder(com.google.cloud.retail.v2.Promotion.getDefaultInstance());
12201     }
12202     /**
12203      *
12204      *
12205      * <pre>
12206      * The promotions applied to the product. A maximum of 10 values are allowed
12207      * per [Product][google.cloud.retail.v2.Product]. Only
12208      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12209      * will be used, other fields will be ignored if set.
12210      * </pre>
12211      *
12212      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12213      */
addPromotionsBuilder(int index)12214     public com.google.cloud.retail.v2.Promotion.Builder addPromotionsBuilder(int index) {
12215       return getPromotionsFieldBuilder()
12216           .addBuilder(index, com.google.cloud.retail.v2.Promotion.getDefaultInstance());
12217     }
12218     /**
12219      *
12220      *
12221      * <pre>
12222      * The promotions applied to the product. A maximum of 10 values are allowed
12223      * per [Product][google.cloud.retail.v2.Product]. Only
12224      * [Promotion.promotion_id][google.cloud.retail.v2.Promotion.promotion_id]
12225      * will be used, other fields will be ignored if set.
12226      * </pre>
12227      *
12228      * <code>repeated .google.cloud.retail.v2.Promotion promotions = 34;</code>
12229      */
getPromotionsBuilderList()12230     public java.util.List<com.google.cloud.retail.v2.Promotion.Builder> getPromotionsBuilderList() {
12231       return getPromotionsFieldBuilder().getBuilderList();
12232     }
12233 
12234     private com.google.protobuf.RepeatedFieldBuilderV3<
12235             com.google.cloud.retail.v2.Promotion,
12236             com.google.cloud.retail.v2.Promotion.Builder,
12237             com.google.cloud.retail.v2.PromotionOrBuilder>
getPromotionsFieldBuilder()12238         getPromotionsFieldBuilder() {
12239       if (promotionsBuilder_ == null) {
12240         promotionsBuilder_ =
12241             new com.google.protobuf.RepeatedFieldBuilderV3<
12242                 com.google.cloud.retail.v2.Promotion,
12243                 com.google.cloud.retail.v2.Promotion.Builder,
12244                 com.google.cloud.retail.v2.PromotionOrBuilder>(
12245                 promotions_, ((bitField0_ & 0x20000000) != 0), getParentForChildren(), isClean());
12246         promotions_ = null;
12247       }
12248       return promotionsBuilder_;
12249     }
12250 
12251     private com.google.protobuf.Timestamp publishTime_;
12252     private com.google.protobuf.SingleFieldBuilderV3<
12253             com.google.protobuf.Timestamp,
12254             com.google.protobuf.Timestamp.Builder,
12255             com.google.protobuf.TimestampOrBuilder>
12256         publishTimeBuilder_;
12257     /**
12258      *
12259      *
12260      * <pre>
12261      * The timestamp when the product is published by the retailer for the first
12262      * time, which indicates the freshness of the products. Note that this field
12263      * is different from
12264      * [available_time][google.cloud.retail.v2.Product.available_time], given it
12265      * purely describes product freshness regardless of when it is available on
12266      * search and recommendation.
12267      * </pre>
12268      *
12269      * <code>.google.protobuf.Timestamp publish_time = 33;</code>
12270      *
12271      * @return Whether the publishTime field is set.
12272      */
hasPublishTime()12273     public boolean hasPublishTime() {
12274       return ((bitField0_ & 0x40000000) != 0);
12275     }
12276     /**
12277      *
12278      *
12279      * <pre>
12280      * The timestamp when the product is published by the retailer for the first
12281      * time, which indicates the freshness of the products. Note that this field
12282      * is different from
12283      * [available_time][google.cloud.retail.v2.Product.available_time], given it
12284      * purely describes product freshness regardless of when it is available on
12285      * search and recommendation.
12286      * </pre>
12287      *
12288      * <code>.google.protobuf.Timestamp publish_time = 33;</code>
12289      *
12290      * @return The publishTime.
12291      */
getPublishTime()12292     public com.google.protobuf.Timestamp getPublishTime() {
12293       if (publishTimeBuilder_ == null) {
12294         return publishTime_ == null
12295             ? com.google.protobuf.Timestamp.getDefaultInstance()
12296             : publishTime_;
12297       } else {
12298         return publishTimeBuilder_.getMessage();
12299       }
12300     }
12301     /**
12302      *
12303      *
12304      * <pre>
12305      * The timestamp when the product is published by the retailer for the first
12306      * time, which indicates the freshness of the products. Note that this field
12307      * is different from
12308      * [available_time][google.cloud.retail.v2.Product.available_time], given it
12309      * purely describes product freshness regardless of when it is available on
12310      * search and recommendation.
12311      * </pre>
12312      *
12313      * <code>.google.protobuf.Timestamp publish_time = 33;</code>
12314      */
setPublishTime(com.google.protobuf.Timestamp value)12315     public Builder setPublishTime(com.google.protobuf.Timestamp value) {
12316       if (publishTimeBuilder_ == null) {
12317         if (value == null) {
12318           throw new NullPointerException();
12319         }
12320         publishTime_ = value;
12321       } else {
12322         publishTimeBuilder_.setMessage(value);
12323       }
12324       bitField0_ |= 0x40000000;
12325       onChanged();
12326       return this;
12327     }
12328     /**
12329      *
12330      *
12331      * <pre>
12332      * The timestamp when the product is published by the retailer for the first
12333      * time, which indicates the freshness of the products. Note that this field
12334      * is different from
12335      * [available_time][google.cloud.retail.v2.Product.available_time], given it
12336      * purely describes product freshness regardless of when it is available on
12337      * search and recommendation.
12338      * </pre>
12339      *
12340      * <code>.google.protobuf.Timestamp publish_time = 33;</code>
12341      */
setPublishTime(com.google.protobuf.Timestamp.Builder builderForValue)12342     public Builder setPublishTime(com.google.protobuf.Timestamp.Builder builderForValue) {
12343       if (publishTimeBuilder_ == null) {
12344         publishTime_ = builderForValue.build();
12345       } else {
12346         publishTimeBuilder_.setMessage(builderForValue.build());
12347       }
12348       bitField0_ |= 0x40000000;
12349       onChanged();
12350       return this;
12351     }
12352     /**
12353      *
12354      *
12355      * <pre>
12356      * The timestamp when the product is published by the retailer for the first
12357      * time, which indicates the freshness of the products. Note that this field
12358      * is different from
12359      * [available_time][google.cloud.retail.v2.Product.available_time], given it
12360      * purely describes product freshness regardless of when it is available on
12361      * search and recommendation.
12362      * </pre>
12363      *
12364      * <code>.google.protobuf.Timestamp publish_time = 33;</code>
12365      */
mergePublishTime(com.google.protobuf.Timestamp value)12366     public Builder mergePublishTime(com.google.protobuf.Timestamp value) {
12367       if (publishTimeBuilder_ == null) {
12368         if (((bitField0_ & 0x40000000) != 0)
12369             && publishTime_ != null
12370             && publishTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
12371           getPublishTimeBuilder().mergeFrom(value);
12372         } else {
12373           publishTime_ = value;
12374         }
12375       } else {
12376         publishTimeBuilder_.mergeFrom(value);
12377       }
12378       bitField0_ |= 0x40000000;
12379       onChanged();
12380       return this;
12381     }
12382     /**
12383      *
12384      *
12385      * <pre>
12386      * The timestamp when the product is published by the retailer for the first
12387      * time, which indicates the freshness of the products. Note that this field
12388      * is different from
12389      * [available_time][google.cloud.retail.v2.Product.available_time], given it
12390      * purely describes product freshness regardless of when it is available on
12391      * search and recommendation.
12392      * </pre>
12393      *
12394      * <code>.google.protobuf.Timestamp publish_time = 33;</code>
12395      */
clearPublishTime()12396     public Builder clearPublishTime() {
12397       bitField0_ = (bitField0_ & ~0x40000000);
12398       publishTime_ = null;
12399       if (publishTimeBuilder_ != null) {
12400         publishTimeBuilder_.dispose();
12401         publishTimeBuilder_ = null;
12402       }
12403       onChanged();
12404       return this;
12405     }
12406     /**
12407      *
12408      *
12409      * <pre>
12410      * The timestamp when the product is published by the retailer for the first
12411      * time, which indicates the freshness of the products. Note that this field
12412      * is different from
12413      * [available_time][google.cloud.retail.v2.Product.available_time], given it
12414      * purely describes product freshness regardless of when it is available on
12415      * search and recommendation.
12416      * </pre>
12417      *
12418      * <code>.google.protobuf.Timestamp publish_time = 33;</code>
12419      */
getPublishTimeBuilder()12420     public com.google.protobuf.Timestamp.Builder getPublishTimeBuilder() {
12421       bitField0_ |= 0x40000000;
12422       onChanged();
12423       return getPublishTimeFieldBuilder().getBuilder();
12424     }
12425     /**
12426      *
12427      *
12428      * <pre>
12429      * The timestamp when the product is published by the retailer for the first
12430      * time, which indicates the freshness of the products. Note that this field
12431      * is different from
12432      * [available_time][google.cloud.retail.v2.Product.available_time], given it
12433      * purely describes product freshness regardless of when it is available on
12434      * search and recommendation.
12435      * </pre>
12436      *
12437      * <code>.google.protobuf.Timestamp publish_time = 33;</code>
12438      */
getPublishTimeOrBuilder()12439     public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() {
12440       if (publishTimeBuilder_ != null) {
12441         return publishTimeBuilder_.getMessageOrBuilder();
12442       } else {
12443         return publishTime_ == null
12444             ? com.google.protobuf.Timestamp.getDefaultInstance()
12445             : publishTime_;
12446       }
12447     }
12448     /**
12449      *
12450      *
12451      * <pre>
12452      * The timestamp when the product is published by the retailer for the first
12453      * time, which indicates the freshness of the products. Note that this field
12454      * is different from
12455      * [available_time][google.cloud.retail.v2.Product.available_time], given it
12456      * purely describes product freshness regardless of when it is available on
12457      * search and recommendation.
12458      * </pre>
12459      *
12460      * <code>.google.protobuf.Timestamp publish_time = 33;</code>
12461      */
12462     private com.google.protobuf.SingleFieldBuilderV3<
12463             com.google.protobuf.Timestamp,
12464             com.google.protobuf.Timestamp.Builder,
12465             com.google.protobuf.TimestampOrBuilder>
getPublishTimeFieldBuilder()12466         getPublishTimeFieldBuilder() {
12467       if (publishTimeBuilder_ == null) {
12468         publishTimeBuilder_ =
12469             new com.google.protobuf.SingleFieldBuilderV3<
12470                 com.google.protobuf.Timestamp,
12471                 com.google.protobuf.Timestamp.Builder,
12472                 com.google.protobuf.TimestampOrBuilder>(
12473                 getPublishTime(), getParentForChildren(), isClean());
12474         publishTime_ = null;
12475       }
12476       return publishTimeBuilder_;
12477     }
12478 
12479     private com.google.protobuf.FieldMask retrievableFields_;
12480     private com.google.protobuf.SingleFieldBuilderV3<
12481             com.google.protobuf.FieldMask,
12482             com.google.protobuf.FieldMask.Builder,
12483             com.google.protobuf.FieldMaskOrBuilder>
12484         retrievableFieldsBuilder_;
12485     /**
12486      *
12487      *
12488      * <pre>
12489      * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
12490      * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
12491      * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
12492      * * [audience][google.cloud.retail.v2.Product.audience]
12493      * * [availability][google.cloud.retail.v2.Product.availability]
12494      * * [brands][google.cloud.retail.v2.Product.brands]
12495      * * [color_info][google.cloud.retail.v2.Product.color_info]
12496      * * [conditions][google.cloud.retail.v2.Product.conditions]
12497      * * [gtin][google.cloud.retail.v2.Product.gtin]
12498      * * [materials][google.cloud.retail.v2.Product.materials]
12499      * * [name][google.cloud.retail.v2.Product.name]
12500      * * [patterns][google.cloud.retail.v2.Product.patterns]
12501      * * [price_info][google.cloud.retail.v2.Product.price_info]
12502      * * [rating][google.cloud.retail.v2.Product.rating]
12503      * * [sizes][google.cloud.retail.v2.Product.sizes]
12504      * * [title][google.cloud.retail.v2.Product.title]
12505      * * [uri][google.cloud.retail.v2.Product.uri]
12506      * Supported fields only for
12507      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12508      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
12509      * * [categories][google.cloud.retail.v2.Product.categories]
12510      * * [description][google.cloud.retail.v2.Product.description]
12511      * * [images][google.cloud.retail.v2.Product.images]
12512      * Supported fields only for
12513      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
12514      * * Only the first image in [images][google.cloud.retail.v2.Product.images]
12515      * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
12516      * retrievable, include paths of the form "attributes.key" where "key" is the
12517      * key of a custom attribute, as specified in
12518      * [attributes][google.cloud.retail.v2.Product.attributes].
12519      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12520      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
12521      * following fields are always returned in
12522      * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
12523      * * [name][google.cloud.retail.v2.Product.name]
12524      * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
12525      * following fields are always returned in by default:
12526      * * [name][google.cloud.retail.v2.Product.name]
12527      * * [color_info][google.cloud.retail.v2.Product.color_info]
12528      * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
12529      * returned.
12530      * Note: Returning more fields in
12531      * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
12532      * response payload size and serving latency.
12533      * This field is deprecated. Use the retrievable site-wide control instead.
12534      * </pre>
12535      *
12536      * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
12537      *
12538      * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
12539      *     google/cloud/retail/v2/product.proto;l=562
12540      * @return Whether the retrievableFields field is set.
12541      */
12542     @java.lang.Deprecated
hasRetrievableFields()12543     public boolean hasRetrievableFields() {
12544       return ((bitField0_ & 0x80000000) != 0);
12545     }
12546     /**
12547      *
12548      *
12549      * <pre>
12550      * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
12551      * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
12552      * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
12553      * * [audience][google.cloud.retail.v2.Product.audience]
12554      * * [availability][google.cloud.retail.v2.Product.availability]
12555      * * [brands][google.cloud.retail.v2.Product.brands]
12556      * * [color_info][google.cloud.retail.v2.Product.color_info]
12557      * * [conditions][google.cloud.retail.v2.Product.conditions]
12558      * * [gtin][google.cloud.retail.v2.Product.gtin]
12559      * * [materials][google.cloud.retail.v2.Product.materials]
12560      * * [name][google.cloud.retail.v2.Product.name]
12561      * * [patterns][google.cloud.retail.v2.Product.patterns]
12562      * * [price_info][google.cloud.retail.v2.Product.price_info]
12563      * * [rating][google.cloud.retail.v2.Product.rating]
12564      * * [sizes][google.cloud.retail.v2.Product.sizes]
12565      * * [title][google.cloud.retail.v2.Product.title]
12566      * * [uri][google.cloud.retail.v2.Product.uri]
12567      * Supported fields only for
12568      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12569      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
12570      * * [categories][google.cloud.retail.v2.Product.categories]
12571      * * [description][google.cloud.retail.v2.Product.description]
12572      * * [images][google.cloud.retail.v2.Product.images]
12573      * Supported fields only for
12574      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
12575      * * Only the first image in [images][google.cloud.retail.v2.Product.images]
12576      * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
12577      * retrievable, include paths of the form "attributes.key" where "key" is the
12578      * key of a custom attribute, as specified in
12579      * [attributes][google.cloud.retail.v2.Product.attributes].
12580      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12581      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
12582      * following fields are always returned in
12583      * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
12584      * * [name][google.cloud.retail.v2.Product.name]
12585      * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
12586      * following fields are always returned in by default:
12587      * * [name][google.cloud.retail.v2.Product.name]
12588      * * [color_info][google.cloud.retail.v2.Product.color_info]
12589      * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
12590      * returned.
12591      * Note: Returning more fields in
12592      * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
12593      * response payload size and serving latency.
12594      * This field is deprecated. Use the retrievable site-wide control instead.
12595      * </pre>
12596      *
12597      * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
12598      *
12599      * @deprecated google.cloud.retail.v2.Product.retrievable_fields is deprecated. See
12600      *     google/cloud/retail/v2/product.proto;l=562
12601      * @return The retrievableFields.
12602      */
12603     @java.lang.Deprecated
getRetrievableFields()12604     public com.google.protobuf.FieldMask getRetrievableFields() {
12605       if (retrievableFieldsBuilder_ == null) {
12606         return retrievableFields_ == null
12607             ? com.google.protobuf.FieldMask.getDefaultInstance()
12608             : retrievableFields_;
12609       } else {
12610         return retrievableFieldsBuilder_.getMessage();
12611       }
12612     }
12613     /**
12614      *
12615      *
12616      * <pre>
12617      * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
12618      * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
12619      * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
12620      * * [audience][google.cloud.retail.v2.Product.audience]
12621      * * [availability][google.cloud.retail.v2.Product.availability]
12622      * * [brands][google.cloud.retail.v2.Product.brands]
12623      * * [color_info][google.cloud.retail.v2.Product.color_info]
12624      * * [conditions][google.cloud.retail.v2.Product.conditions]
12625      * * [gtin][google.cloud.retail.v2.Product.gtin]
12626      * * [materials][google.cloud.retail.v2.Product.materials]
12627      * * [name][google.cloud.retail.v2.Product.name]
12628      * * [patterns][google.cloud.retail.v2.Product.patterns]
12629      * * [price_info][google.cloud.retail.v2.Product.price_info]
12630      * * [rating][google.cloud.retail.v2.Product.rating]
12631      * * [sizes][google.cloud.retail.v2.Product.sizes]
12632      * * [title][google.cloud.retail.v2.Product.title]
12633      * * [uri][google.cloud.retail.v2.Product.uri]
12634      * Supported fields only for
12635      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12636      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
12637      * * [categories][google.cloud.retail.v2.Product.categories]
12638      * * [description][google.cloud.retail.v2.Product.description]
12639      * * [images][google.cloud.retail.v2.Product.images]
12640      * Supported fields only for
12641      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
12642      * * Only the first image in [images][google.cloud.retail.v2.Product.images]
12643      * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
12644      * retrievable, include paths of the form "attributes.key" where "key" is the
12645      * key of a custom attribute, as specified in
12646      * [attributes][google.cloud.retail.v2.Product.attributes].
12647      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12648      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
12649      * following fields are always returned in
12650      * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
12651      * * [name][google.cloud.retail.v2.Product.name]
12652      * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
12653      * following fields are always returned in by default:
12654      * * [name][google.cloud.retail.v2.Product.name]
12655      * * [color_info][google.cloud.retail.v2.Product.color_info]
12656      * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
12657      * returned.
12658      * Note: Returning more fields in
12659      * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
12660      * response payload size and serving latency.
12661      * This field is deprecated. Use the retrievable site-wide control instead.
12662      * </pre>
12663      *
12664      * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
12665      */
12666     @java.lang.Deprecated
setRetrievableFields(com.google.protobuf.FieldMask value)12667     public Builder setRetrievableFields(com.google.protobuf.FieldMask value) {
12668       if (retrievableFieldsBuilder_ == null) {
12669         if (value == null) {
12670           throw new NullPointerException();
12671         }
12672         retrievableFields_ = value;
12673       } else {
12674         retrievableFieldsBuilder_.setMessage(value);
12675       }
12676       bitField0_ |= 0x80000000;
12677       onChanged();
12678       return this;
12679     }
12680     /**
12681      *
12682      *
12683      * <pre>
12684      * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
12685      * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
12686      * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
12687      * * [audience][google.cloud.retail.v2.Product.audience]
12688      * * [availability][google.cloud.retail.v2.Product.availability]
12689      * * [brands][google.cloud.retail.v2.Product.brands]
12690      * * [color_info][google.cloud.retail.v2.Product.color_info]
12691      * * [conditions][google.cloud.retail.v2.Product.conditions]
12692      * * [gtin][google.cloud.retail.v2.Product.gtin]
12693      * * [materials][google.cloud.retail.v2.Product.materials]
12694      * * [name][google.cloud.retail.v2.Product.name]
12695      * * [patterns][google.cloud.retail.v2.Product.patterns]
12696      * * [price_info][google.cloud.retail.v2.Product.price_info]
12697      * * [rating][google.cloud.retail.v2.Product.rating]
12698      * * [sizes][google.cloud.retail.v2.Product.sizes]
12699      * * [title][google.cloud.retail.v2.Product.title]
12700      * * [uri][google.cloud.retail.v2.Product.uri]
12701      * Supported fields only for
12702      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12703      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
12704      * * [categories][google.cloud.retail.v2.Product.categories]
12705      * * [description][google.cloud.retail.v2.Product.description]
12706      * * [images][google.cloud.retail.v2.Product.images]
12707      * Supported fields only for
12708      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
12709      * * Only the first image in [images][google.cloud.retail.v2.Product.images]
12710      * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
12711      * retrievable, include paths of the form "attributes.key" where "key" is the
12712      * key of a custom attribute, as specified in
12713      * [attributes][google.cloud.retail.v2.Product.attributes].
12714      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12715      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
12716      * following fields are always returned in
12717      * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
12718      * * [name][google.cloud.retail.v2.Product.name]
12719      * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
12720      * following fields are always returned in by default:
12721      * * [name][google.cloud.retail.v2.Product.name]
12722      * * [color_info][google.cloud.retail.v2.Product.color_info]
12723      * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
12724      * returned.
12725      * Note: Returning more fields in
12726      * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
12727      * response payload size and serving latency.
12728      * This field is deprecated. Use the retrievable site-wide control instead.
12729      * </pre>
12730      *
12731      * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
12732      */
12733     @java.lang.Deprecated
setRetrievableFields(com.google.protobuf.FieldMask.Builder builderForValue)12734     public Builder setRetrievableFields(com.google.protobuf.FieldMask.Builder builderForValue) {
12735       if (retrievableFieldsBuilder_ == null) {
12736         retrievableFields_ = builderForValue.build();
12737       } else {
12738         retrievableFieldsBuilder_.setMessage(builderForValue.build());
12739       }
12740       bitField0_ |= 0x80000000;
12741       onChanged();
12742       return this;
12743     }
12744     /**
12745      *
12746      *
12747      * <pre>
12748      * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
12749      * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
12750      * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
12751      * * [audience][google.cloud.retail.v2.Product.audience]
12752      * * [availability][google.cloud.retail.v2.Product.availability]
12753      * * [brands][google.cloud.retail.v2.Product.brands]
12754      * * [color_info][google.cloud.retail.v2.Product.color_info]
12755      * * [conditions][google.cloud.retail.v2.Product.conditions]
12756      * * [gtin][google.cloud.retail.v2.Product.gtin]
12757      * * [materials][google.cloud.retail.v2.Product.materials]
12758      * * [name][google.cloud.retail.v2.Product.name]
12759      * * [patterns][google.cloud.retail.v2.Product.patterns]
12760      * * [price_info][google.cloud.retail.v2.Product.price_info]
12761      * * [rating][google.cloud.retail.v2.Product.rating]
12762      * * [sizes][google.cloud.retail.v2.Product.sizes]
12763      * * [title][google.cloud.retail.v2.Product.title]
12764      * * [uri][google.cloud.retail.v2.Product.uri]
12765      * Supported fields only for
12766      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12767      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
12768      * * [categories][google.cloud.retail.v2.Product.categories]
12769      * * [description][google.cloud.retail.v2.Product.description]
12770      * * [images][google.cloud.retail.v2.Product.images]
12771      * Supported fields only for
12772      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
12773      * * Only the first image in [images][google.cloud.retail.v2.Product.images]
12774      * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
12775      * retrievable, include paths of the form "attributes.key" where "key" is the
12776      * key of a custom attribute, as specified in
12777      * [attributes][google.cloud.retail.v2.Product.attributes].
12778      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12779      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
12780      * following fields are always returned in
12781      * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
12782      * * [name][google.cloud.retail.v2.Product.name]
12783      * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
12784      * following fields are always returned in by default:
12785      * * [name][google.cloud.retail.v2.Product.name]
12786      * * [color_info][google.cloud.retail.v2.Product.color_info]
12787      * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
12788      * returned.
12789      * Note: Returning more fields in
12790      * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
12791      * response payload size and serving latency.
12792      * This field is deprecated. Use the retrievable site-wide control instead.
12793      * </pre>
12794      *
12795      * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
12796      */
12797     @java.lang.Deprecated
mergeRetrievableFields(com.google.protobuf.FieldMask value)12798     public Builder mergeRetrievableFields(com.google.protobuf.FieldMask value) {
12799       if (retrievableFieldsBuilder_ == null) {
12800         if (((bitField0_ & 0x80000000) != 0)
12801             && retrievableFields_ != null
12802             && retrievableFields_ != com.google.protobuf.FieldMask.getDefaultInstance()) {
12803           getRetrievableFieldsBuilder().mergeFrom(value);
12804         } else {
12805           retrievableFields_ = value;
12806         }
12807       } else {
12808         retrievableFieldsBuilder_.mergeFrom(value);
12809       }
12810       bitField0_ |= 0x80000000;
12811       onChanged();
12812       return this;
12813     }
12814     /**
12815      *
12816      *
12817      * <pre>
12818      * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
12819      * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
12820      * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
12821      * * [audience][google.cloud.retail.v2.Product.audience]
12822      * * [availability][google.cloud.retail.v2.Product.availability]
12823      * * [brands][google.cloud.retail.v2.Product.brands]
12824      * * [color_info][google.cloud.retail.v2.Product.color_info]
12825      * * [conditions][google.cloud.retail.v2.Product.conditions]
12826      * * [gtin][google.cloud.retail.v2.Product.gtin]
12827      * * [materials][google.cloud.retail.v2.Product.materials]
12828      * * [name][google.cloud.retail.v2.Product.name]
12829      * * [patterns][google.cloud.retail.v2.Product.patterns]
12830      * * [price_info][google.cloud.retail.v2.Product.price_info]
12831      * * [rating][google.cloud.retail.v2.Product.rating]
12832      * * [sizes][google.cloud.retail.v2.Product.sizes]
12833      * * [title][google.cloud.retail.v2.Product.title]
12834      * * [uri][google.cloud.retail.v2.Product.uri]
12835      * Supported fields only for
12836      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12837      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
12838      * * [categories][google.cloud.retail.v2.Product.categories]
12839      * * [description][google.cloud.retail.v2.Product.description]
12840      * * [images][google.cloud.retail.v2.Product.images]
12841      * Supported fields only for
12842      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
12843      * * Only the first image in [images][google.cloud.retail.v2.Product.images]
12844      * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
12845      * retrievable, include paths of the form "attributes.key" where "key" is the
12846      * key of a custom attribute, as specified in
12847      * [attributes][google.cloud.retail.v2.Product.attributes].
12848      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12849      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
12850      * following fields are always returned in
12851      * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
12852      * * [name][google.cloud.retail.v2.Product.name]
12853      * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
12854      * following fields are always returned in by default:
12855      * * [name][google.cloud.retail.v2.Product.name]
12856      * * [color_info][google.cloud.retail.v2.Product.color_info]
12857      * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
12858      * returned.
12859      * Note: Returning more fields in
12860      * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
12861      * response payload size and serving latency.
12862      * This field is deprecated. Use the retrievable site-wide control instead.
12863      * </pre>
12864      *
12865      * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
12866      */
12867     @java.lang.Deprecated
clearRetrievableFields()12868     public Builder clearRetrievableFields() {
12869       bitField0_ = (bitField0_ & ~0x80000000);
12870       retrievableFields_ = null;
12871       if (retrievableFieldsBuilder_ != null) {
12872         retrievableFieldsBuilder_.dispose();
12873         retrievableFieldsBuilder_ = null;
12874       }
12875       onChanged();
12876       return this;
12877     }
12878     /**
12879      *
12880      *
12881      * <pre>
12882      * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
12883      * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
12884      * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
12885      * * [audience][google.cloud.retail.v2.Product.audience]
12886      * * [availability][google.cloud.retail.v2.Product.availability]
12887      * * [brands][google.cloud.retail.v2.Product.brands]
12888      * * [color_info][google.cloud.retail.v2.Product.color_info]
12889      * * [conditions][google.cloud.retail.v2.Product.conditions]
12890      * * [gtin][google.cloud.retail.v2.Product.gtin]
12891      * * [materials][google.cloud.retail.v2.Product.materials]
12892      * * [name][google.cloud.retail.v2.Product.name]
12893      * * [patterns][google.cloud.retail.v2.Product.patterns]
12894      * * [price_info][google.cloud.retail.v2.Product.price_info]
12895      * * [rating][google.cloud.retail.v2.Product.rating]
12896      * * [sizes][google.cloud.retail.v2.Product.sizes]
12897      * * [title][google.cloud.retail.v2.Product.title]
12898      * * [uri][google.cloud.retail.v2.Product.uri]
12899      * Supported fields only for
12900      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12901      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
12902      * * [categories][google.cloud.retail.v2.Product.categories]
12903      * * [description][google.cloud.retail.v2.Product.description]
12904      * * [images][google.cloud.retail.v2.Product.images]
12905      * Supported fields only for
12906      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
12907      * * Only the first image in [images][google.cloud.retail.v2.Product.images]
12908      * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
12909      * retrievable, include paths of the form "attributes.key" where "key" is the
12910      * key of a custom attribute, as specified in
12911      * [attributes][google.cloud.retail.v2.Product.attributes].
12912      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12913      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
12914      * following fields are always returned in
12915      * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
12916      * * [name][google.cloud.retail.v2.Product.name]
12917      * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
12918      * following fields are always returned in by default:
12919      * * [name][google.cloud.retail.v2.Product.name]
12920      * * [color_info][google.cloud.retail.v2.Product.color_info]
12921      * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
12922      * returned.
12923      * Note: Returning more fields in
12924      * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
12925      * response payload size and serving latency.
12926      * This field is deprecated. Use the retrievable site-wide control instead.
12927      * </pre>
12928      *
12929      * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
12930      */
12931     @java.lang.Deprecated
getRetrievableFieldsBuilder()12932     public com.google.protobuf.FieldMask.Builder getRetrievableFieldsBuilder() {
12933       bitField0_ |= 0x80000000;
12934       onChanged();
12935       return getRetrievableFieldsFieldBuilder().getBuilder();
12936     }
12937     /**
12938      *
12939      *
12940      * <pre>
12941      * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
12942      * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
12943      * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
12944      * * [audience][google.cloud.retail.v2.Product.audience]
12945      * * [availability][google.cloud.retail.v2.Product.availability]
12946      * * [brands][google.cloud.retail.v2.Product.brands]
12947      * * [color_info][google.cloud.retail.v2.Product.color_info]
12948      * * [conditions][google.cloud.retail.v2.Product.conditions]
12949      * * [gtin][google.cloud.retail.v2.Product.gtin]
12950      * * [materials][google.cloud.retail.v2.Product.materials]
12951      * * [name][google.cloud.retail.v2.Product.name]
12952      * * [patterns][google.cloud.retail.v2.Product.patterns]
12953      * * [price_info][google.cloud.retail.v2.Product.price_info]
12954      * * [rating][google.cloud.retail.v2.Product.rating]
12955      * * [sizes][google.cloud.retail.v2.Product.sizes]
12956      * * [title][google.cloud.retail.v2.Product.title]
12957      * * [uri][google.cloud.retail.v2.Product.uri]
12958      * Supported fields only for
12959      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12960      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
12961      * * [categories][google.cloud.retail.v2.Product.categories]
12962      * * [description][google.cloud.retail.v2.Product.description]
12963      * * [images][google.cloud.retail.v2.Product.images]
12964      * Supported fields only for
12965      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
12966      * * Only the first image in [images][google.cloud.retail.v2.Product.images]
12967      * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
12968      * retrievable, include paths of the form "attributes.key" where "key" is the
12969      * key of a custom attribute, as specified in
12970      * [attributes][google.cloud.retail.v2.Product.attributes].
12971      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
12972      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
12973      * following fields are always returned in
12974      * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
12975      * * [name][google.cloud.retail.v2.Product.name]
12976      * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
12977      * following fields are always returned in by default:
12978      * * [name][google.cloud.retail.v2.Product.name]
12979      * * [color_info][google.cloud.retail.v2.Product.color_info]
12980      * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
12981      * returned.
12982      * Note: Returning more fields in
12983      * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
12984      * response payload size and serving latency.
12985      * This field is deprecated. Use the retrievable site-wide control instead.
12986      * </pre>
12987      *
12988      * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
12989      */
12990     @java.lang.Deprecated
getRetrievableFieldsOrBuilder()12991     public com.google.protobuf.FieldMaskOrBuilder getRetrievableFieldsOrBuilder() {
12992       if (retrievableFieldsBuilder_ != null) {
12993         return retrievableFieldsBuilder_.getMessageOrBuilder();
12994       } else {
12995         return retrievableFields_ == null
12996             ? com.google.protobuf.FieldMask.getDefaultInstance()
12997             : retrievableFields_;
12998       }
12999     }
13000     /**
13001      *
13002      *
13003      * <pre>
13004      * Indicates which fields in the [Product][google.cloud.retail.v2.Product]s
13005      * are returned in [SearchResponse][google.cloud.retail.v2.SearchResponse].
13006      * Supported fields for all [type][google.cloud.retail.v2.Product.type]s:
13007      * * [audience][google.cloud.retail.v2.Product.audience]
13008      * * [availability][google.cloud.retail.v2.Product.availability]
13009      * * [brands][google.cloud.retail.v2.Product.brands]
13010      * * [color_info][google.cloud.retail.v2.Product.color_info]
13011      * * [conditions][google.cloud.retail.v2.Product.conditions]
13012      * * [gtin][google.cloud.retail.v2.Product.gtin]
13013      * * [materials][google.cloud.retail.v2.Product.materials]
13014      * * [name][google.cloud.retail.v2.Product.name]
13015      * * [patterns][google.cloud.retail.v2.Product.patterns]
13016      * * [price_info][google.cloud.retail.v2.Product.price_info]
13017      * * [rating][google.cloud.retail.v2.Product.rating]
13018      * * [sizes][google.cloud.retail.v2.Product.sizes]
13019      * * [title][google.cloud.retail.v2.Product.title]
13020      * * [uri][google.cloud.retail.v2.Product.uri]
13021      * Supported fields only for
13022      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
13023      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION]:
13024      * * [categories][google.cloud.retail.v2.Product.categories]
13025      * * [description][google.cloud.retail.v2.Product.description]
13026      * * [images][google.cloud.retail.v2.Product.images]
13027      * Supported fields only for
13028      * [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]:
13029      * * Only the first image in [images][google.cloud.retail.v2.Product.images]
13030      * To mark [attributes][google.cloud.retail.v2.Product.attributes] as
13031      * retrievable, include paths of the form "attributes.key" where "key" is the
13032      * key of a custom attribute, as specified in
13033      * [attributes][google.cloud.retail.v2.Product.attributes].
13034      * For [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and
13035      * [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], the
13036      * following fields are always returned in
13037      * [SearchResponse][google.cloud.retail.v2.SearchResponse] by default:
13038      * * [name][google.cloud.retail.v2.Product.name]
13039      * For [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT], the
13040      * following fields are always returned in by default:
13041      * * [name][google.cloud.retail.v2.Product.name]
13042      * * [color_info][google.cloud.retail.v2.Product.color_info]
13043      * The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
13044      * returned.
13045      * Note: Returning more fields in
13046      * [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase
13047      * response payload size and serving latency.
13048      * This field is deprecated. Use the retrievable site-wide control instead.
13049      * </pre>
13050      *
13051      * <code>.google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];</code>
13052      */
13053     private com.google.protobuf.SingleFieldBuilderV3<
13054             com.google.protobuf.FieldMask,
13055             com.google.protobuf.FieldMask.Builder,
13056             com.google.protobuf.FieldMaskOrBuilder>
getRetrievableFieldsFieldBuilder()13057         getRetrievableFieldsFieldBuilder() {
13058       if (retrievableFieldsBuilder_ == null) {
13059         retrievableFieldsBuilder_ =
13060             new com.google.protobuf.SingleFieldBuilderV3<
13061                 com.google.protobuf.FieldMask,
13062                 com.google.protobuf.FieldMask.Builder,
13063                 com.google.protobuf.FieldMaskOrBuilder>(
13064                 getRetrievableFields(), getParentForChildren(), isClean());
13065         retrievableFields_ = null;
13066       }
13067       return retrievableFieldsBuilder_;
13068     }
13069 
13070     private java.util.List<com.google.cloud.retail.v2.Product> variants_ =
13071         java.util.Collections.emptyList();
13072 
ensureVariantsIsMutable()13073     private void ensureVariantsIsMutable() {
13074       if (!((bitField1_ & 0x00000001) != 0)) {
13075         variants_ = new java.util.ArrayList<com.google.cloud.retail.v2.Product>(variants_);
13076         bitField1_ |= 0x00000001;
13077       }
13078     }
13079 
13080     private com.google.protobuf.RepeatedFieldBuilderV3<
13081             com.google.cloud.retail.v2.Product,
13082             com.google.cloud.retail.v2.Product.Builder,
13083             com.google.cloud.retail.v2.ProductOrBuilder>
13084         variantsBuilder_;
13085 
13086     /**
13087      *
13088      *
13089      * <pre>
13090      * Output only. Product variants grouped together on primary product which
13091      * share similar product attributes. It's automatically grouped by
13092      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13093      * all the product variants. Only populated for
13094      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13095      * [Product][google.cloud.retail.v2.Product]s.
13096      * Note: This field is OUTPUT_ONLY for
13097      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13098      * Do not set this field in API requests.
13099      * </pre>
13100      *
13101      * <code>
13102      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13103      * </code>
13104      */
getVariantsList()13105     public java.util.List<com.google.cloud.retail.v2.Product> getVariantsList() {
13106       if (variantsBuilder_ == null) {
13107         return java.util.Collections.unmodifiableList(variants_);
13108       } else {
13109         return variantsBuilder_.getMessageList();
13110       }
13111     }
13112     /**
13113      *
13114      *
13115      * <pre>
13116      * Output only. Product variants grouped together on primary product which
13117      * share similar product attributes. It's automatically grouped by
13118      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13119      * all the product variants. Only populated for
13120      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13121      * [Product][google.cloud.retail.v2.Product]s.
13122      * Note: This field is OUTPUT_ONLY for
13123      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13124      * Do not set this field in API requests.
13125      * </pre>
13126      *
13127      * <code>
13128      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13129      * </code>
13130      */
getVariantsCount()13131     public int getVariantsCount() {
13132       if (variantsBuilder_ == null) {
13133         return variants_.size();
13134       } else {
13135         return variantsBuilder_.getCount();
13136       }
13137     }
13138     /**
13139      *
13140      *
13141      * <pre>
13142      * Output only. Product variants grouped together on primary product which
13143      * share similar product attributes. It's automatically grouped by
13144      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13145      * all the product variants. Only populated for
13146      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13147      * [Product][google.cloud.retail.v2.Product]s.
13148      * Note: This field is OUTPUT_ONLY for
13149      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13150      * Do not set this field in API requests.
13151      * </pre>
13152      *
13153      * <code>
13154      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13155      * </code>
13156      */
getVariants(int index)13157     public com.google.cloud.retail.v2.Product getVariants(int index) {
13158       if (variantsBuilder_ == null) {
13159         return variants_.get(index);
13160       } else {
13161         return variantsBuilder_.getMessage(index);
13162       }
13163     }
13164     /**
13165      *
13166      *
13167      * <pre>
13168      * Output only. Product variants grouped together on primary product which
13169      * share similar product attributes. It's automatically grouped by
13170      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13171      * all the product variants. Only populated for
13172      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13173      * [Product][google.cloud.retail.v2.Product]s.
13174      * Note: This field is OUTPUT_ONLY for
13175      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13176      * Do not set this field in API requests.
13177      * </pre>
13178      *
13179      * <code>
13180      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13181      * </code>
13182      */
setVariants(int index, com.google.cloud.retail.v2.Product value)13183     public Builder setVariants(int index, com.google.cloud.retail.v2.Product value) {
13184       if (variantsBuilder_ == null) {
13185         if (value == null) {
13186           throw new NullPointerException();
13187         }
13188         ensureVariantsIsMutable();
13189         variants_.set(index, value);
13190         onChanged();
13191       } else {
13192         variantsBuilder_.setMessage(index, value);
13193       }
13194       return this;
13195     }
13196     /**
13197      *
13198      *
13199      * <pre>
13200      * Output only. Product variants grouped together on primary product which
13201      * share similar product attributes. It's automatically grouped by
13202      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13203      * all the product variants. Only populated for
13204      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13205      * [Product][google.cloud.retail.v2.Product]s.
13206      * Note: This field is OUTPUT_ONLY for
13207      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13208      * Do not set this field in API requests.
13209      * </pre>
13210      *
13211      * <code>
13212      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13213      * </code>
13214      */
setVariants( int index, com.google.cloud.retail.v2.Product.Builder builderForValue)13215     public Builder setVariants(
13216         int index, com.google.cloud.retail.v2.Product.Builder builderForValue) {
13217       if (variantsBuilder_ == null) {
13218         ensureVariantsIsMutable();
13219         variants_.set(index, builderForValue.build());
13220         onChanged();
13221       } else {
13222         variantsBuilder_.setMessage(index, builderForValue.build());
13223       }
13224       return this;
13225     }
13226     /**
13227      *
13228      *
13229      * <pre>
13230      * Output only. Product variants grouped together on primary product which
13231      * share similar product attributes. It's automatically grouped by
13232      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13233      * all the product variants. Only populated for
13234      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13235      * [Product][google.cloud.retail.v2.Product]s.
13236      * Note: This field is OUTPUT_ONLY for
13237      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13238      * Do not set this field in API requests.
13239      * </pre>
13240      *
13241      * <code>
13242      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13243      * </code>
13244      */
addVariants(com.google.cloud.retail.v2.Product value)13245     public Builder addVariants(com.google.cloud.retail.v2.Product value) {
13246       if (variantsBuilder_ == null) {
13247         if (value == null) {
13248           throw new NullPointerException();
13249         }
13250         ensureVariantsIsMutable();
13251         variants_.add(value);
13252         onChanged();
13253       } else {
13254         variantsBuilder_.addMessage(value);
13255       }
13256       return this;
13257     }
13258     /**
13259      *
13260      *
13261      * <pre>
13262      * Output only. Product variants grouped together on primary product which
13263      * share similar product attributes. It's automatically grouped by
13264      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13265      * all the product variants. Only populated for
13266      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13267      * [Product][google.cloud.retail.v2.Product]s.
13268      * Note: This field is OUTPUT_ONLY for
13269      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13270      * Do not set this field in API requests.
13271      * </pre>
13272      *
13273      * <code>
13274      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13275      * </code>
13276      */
addVariants(int index, com.google.cloud.retail.v2.Product value)13277     public Builder addVariants(int index, com.google.cloud.retail.v2.Product value) {
13278       if (variantsBuilder_ == null) {
13279         if (value == null) {
13280           throw new NullPointerException();
13281         }
13282         ensureVariantsIsMutable();
13283         variants_.add(index, value);
13284         onChanged();
13285       } else {
13286         variantsBuilder_.addMessage(index, value);
13287       }
13288       return this;
13289     }
13290     /**
13291      *
13292      *
13293      * <pre>
13294      * Output only. Product variants grouped together on primary product which
13295      * share similar product attributes. It's automatically grouped by
13296      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13297      * all the product variants. Only populated for
13298      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13299      * [Product][google.cloud.retail.v2.Product]s.
13300      * Note: This field is OUTPUT_ONLY for
13301      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13302      * Do not set this field in API requests.
13303      * </pre>
13304      *
13305      * <code>
13306      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13307      * </code>
13308      */
addVariants(com.google.cloud.retail.v2.Product.Builder builderForValue)13309     public Builder addVariants(com.google.cloud.retail.v2.Product.Builder builderForValue) {
13310       if (variantsBuilder_ == null) {
13311         ensureVariantsIsMutable();
13312         variants_.add(builderForValue.build());
13313         onChanged();
13314       } else {
13315         variantsBuilder_.addMessage(builderForValue.build());
13316       }
13317       return this;
13318     }
13319     /**
13320      *
13321      *
13322      * <pre>
13323      * Output only. Product variants grouped together on primary product which
13324      * share similar product attributes. It's automatically grouped by
13325      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13326      * all the product variants. Only populated for
13327      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13328      * [Product][google.cloud.retail.v2.Product]s.
13329      * Note: This field is OUTPUT_ONLY for
13330      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13331      * Do not set this field in API requests.
13332      * </pre>
13333      *
13334      * <code>
13335      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13336      * </code>
13337      */
addVariants( int index, com.google.cloud.retail.v2.Product.Builder builderForValue)13338     public Builder addVariants(
13339         int index, com.google.cloud.retail.v2.Product.Builder builderForValue) {
13340       if (variantsBuilder_ == null) {
13341         ensureVariantsIsMutable();
13342         variants_.add(index, builderForValue.build());
13343         onChanged();
13344       } else {
13345         variantsBuilder_.addMessage(index, builderForValue.build());
13346       }
13347       return this;
13348     }
13349     /**
13350      *
13351      *
13352      * <pre>
13353      * Output only. Product variants grouped together on primary product which
13354      * share similar product attributes. It's automatically grouped by
13355      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13356      * all the product variants. Only populated for
13357      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13358      * [Product][google.cloud.retail.v2.Product]s.
13359      * Note: This field is OUTPUT_ONLY for
13360      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13361      * Do not set this field in API requests.
13362      * </pre>
13363      *
13364      * <code>
13365      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13366      * </code>
13367      */
addAllVariants( java.lang.Iterable<? extends com.google.cloud.retail.v2.Product> values)13368     public Builder addAllVariants(
13369         java.lang.Iterable<? extends com.google.cloud.retail.v2.Product> values) {
13370       if (variantsBuilder_ == null) {
13371         ensureVariantsIsMutable();
13372         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variants_);
13373         onChanged();
13374       } else {
13375         variantsBuilder_.addAllMessages(values);
13376       }
13377       return this;
13378     }
13379     /**
13380      *
13381      *
13382      * <pre>
13383      * Output only. Product variants grouped together on primary product which
13384      * share similar product attributes. It's automatically grouped by
13385      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13386      * all the product variants. Only populated for
13387      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13388      * [Product][google.cloud.retail.v2.Product]s.
13389      * Note: This field is OUTPUT_ONLY for
13390      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13391      * Do not set this field in API requests.
13392      * </pre>
13393      *
13394      * <code>
13395      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13396      * </code>
13397      */
clearVariants()13398     public Builder clearVariants() {
13399       if (variantsBuilder_ == null) {
13400         variants_ = java.util.Collections.emptyList();
13401         bitField1_ = (bitField1_ & ~0x00000001);
13402         onChanged();
13403       } else {
13404         variantsBuilder_.clear();
13405       }
13406       return this;
13407     }
13408     /**
13409      *
13410      *
13411      * <pre>
13412      * Output only. Product variants grouped together on primary product which
13413      * share similar product attributes. It's automatically grouped by
13414      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13415      * all the product variants. Only populated for
13416      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13417      * [Product][google.cloud.retail.v2.Product]s.
13418      * Note: This field is OUTPUT_ONLY for
13419      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13420      * Do not set this field in API requests.
13421      * </pre>
13422      *
13423      * <code>
13424      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13425      * </code>
13426      */
removeVariants(int index)13427     public Builder removeVariants(int index) {
13428       if (variantsBuilder_ == null) {
13429         ensureVariantsIsMutable();
13430         variants_.remove(index);
13431         onChanged();
13432       } else {
13433         variantsBuilder_.remove(index);
13434       }
13435       return this;
13436     }
13437     /**
13438      *
13439      *
13440      * <pre>
13441      * Output only. Product variants grouped together on primary product which
13442      * share similar product attributes. It's automatically grouped by
13443      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13444      * all the product variants. Only populated for
13445      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13446      * [Product][google.cloud.retail.v2.Product]s.
13447      * Note: This field is OUTPUT_ONLY for
13448      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13449      * Do not set this field in API requests.
13450      * </pre>
13451      *
13452      * <code>
13453      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13454      * </code>
13455      */
getVariantsBuilder(int index)13456     public com.google.cloud.retail.v2.Product.Builder getVariantsBuilder(int index) {
13457       return getVariantsFieldBuilder().getBuilder(index);
13458     }
13459     /**
13460      *
13461      *
13462      * <pre>
13463      * Output only. Product variants grouped together on primary product which
13464      * share similar product attributes. It's automatically grouped by
13465      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13466      * all the product variants. Only populated for
13467      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13468      * [Product][google.cloud.retail.v2.Product]s.
13469      * Note: This field is OUTPUT_ONLY for
13470      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13471      * Do not set this field in API requests.
13472      * </pre>
13473      *
13474      * <code>
13475      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13476      * </code>
13477      */
getVariantsOrBuilder(int index)13478     public com.google.cloud.retail.v2.ProductOrBuilder getVariantsOrBuilder(int index) {
13479       if (variantsBuilder_ == null) {
13480         return variants_.get(index);
13481       } else {
13482         return variantsBuilder_.getMessageOrBuilder(index);
13483       }
13484     }
13485     /**
13486      *
13487      *
13488      * <pre>
13489      * Output only. Product variants grouped together on primary product which
13490      * share similar product attributes. It's automatically grouped by
13491      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13492      * all the product variants. Only populated for
13493      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13494      * [Product][google.cloud.retail.v2.Product]s.
13495      * Note: This field is OUTPUT_ONLY for
13496      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13497      * Do not set this field in API requests.
13498      * </pre>
13499      *
13500      * <code>
13501      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13502      * </code>
13503      */
13504     public java.util.List<? extends com.google.cloud.retail.v2.ProductOrBuilder>
getVariantsOrBuilderList()13505         getVariantsOrBuilderList() {
13506       if (variantsBuilder_ != null) {
13507         return variantsBuilder_.getMessageOrBuilderList();
13508       } else {
13509         return java.util.Collections.unmodifiableList(variants_);
13510       }
13511     }
13512     /**
13513      *
13514      *
13515      * <pre>
13516      * Output only. Product variants grouped together on primary product which
13517      * share similar product attributes. It's automatically grouped by
13518      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13519      * all the product variants. Only populated for
13520      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13521      * [Product][google.cloud.retail.v2.Product]s.
13522      * Note: This field is OUTPUT_ONLY for
13523      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13524      * Do not set this field in API requests.
13525      * </pre>
13526      *
13527      * <code>
13528      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13529      * </code>
13530      */
addVariantsBuilder()13531     public com.google.cloud.retail.v2.Product.Builder addVariantsBuilder() {
13532       return getVariantsFieldBuilder()
13533           .addBuilder(com.google.cloud.retail.v2.Product.getDefaultInstance());
13534     }
13535     /**
13536      *
13537      *
13538      * <pre>
13539      * Output only. Product variants grouped together on primary product which
13540      * share similar product attributes. It's automatically grouped by
13541      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13542      * all the product variants. Only populated for
13543      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13544      * [Product][google.cloud.retail.v2.Product]s.
13545      * Note: This field is OUTPUT_ONLY for
13546      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13547      * Do not set this field in API requests.
13548      * </pre>
13549      *
13550      * <code>
13551      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13552      * </code>
13553      */
addVariantsBuilder(int index)13554     public com.google.cloud.retail.v2.Product.Builder addVariantsBuilder(int index) {
13555       return getVariantsFieldBuilder()
13556           .addBuilder(index, com.google.cloud.retail.v2.Product.getDefaultInstance());
13557     }
13558     /**
13559      *
13560      *
13561      * <pre>
13562      * Output only. Product variants grouped together on primary product which
13563      * share similar product attributes. It's automatically grouped by
13564      * [primary_product_id][google.cloud.retail.v2.Product.primary_product_id] for
13565      * all the product variants. Only populated for
13566      * [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY]
13567      * [Product][google.cloud.retail.v2.Product]s.
13568      * Note: This field is OUTPUT_ONLY for
13569      * [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct].
13570      * Do not set this field in API requests.
13571      * </pre>
13572      *
13573      * <code>
13574      * repeated .google.cloud.retail.v2.Product variants = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];
13575      * </code>
13576      */
getVariantsBuilderList()13577     public java.util.List<com.google.cloud.retail.v2.Product.Builder> getVariantsBuilderList() {
13578       return getVariantsFieldBuilder().getBuilderList();
13579     }
13580 
13581     private com.google.protobuf.RepeatedFieldBuilderV3<
13582             com.google.cloud.retail.v2.Product,
13583             com.google.cloud.retail.v2.Product.Builder,
13584             com.google.cloud.retail.v2.ProductOrBuilder>
getVariantsFieldBuilder()13585         getVariantsFieldBuilder() {
13586       if (variantsBuilder_ == null) {
13587         variantsBuilder_ =
13588             new com.google.protobuf.RepeatedFieldBuilderV3<
13589                 com.google.cloud.retail.v2.Product,
13590                 com.google.cloud.retail.v2.Product.Builder,
13591                 com.google.cloud.retail.v2.ProductOrBuilder>(
13592                 variants_, ((bitField1_ & 0x00000001) != 0), getParentForChildren(), isClean());
13593         variants_ = null;
13594       }
13595       return variantsBuilder_;
13596     }
13597 
13598     private java.util.List<com.google.cloud.retail.v2.LocalInventory> localInventories_ =
13599         java.util.Collections.emptyList();
13600 
ensureLocalInventoriesIsMutable()13601     private void ensureLocalInventoriesIsMutable() {
13602       if (!((bitField1_ & 0x00000002) != 0)) {
13603         localInventories_ =
13604             new java.util.ArrayList<com.google.cloud.retail.v2.LocalInventory>(localInventories_);
13605         bitField1_ |= 0x00000002;
13606       }
13607     }
13608 
13609     private com.google.protobuf.RepeatedFieldBuilderV3<
13610             com.google.cloud.retail.v2.LocalInventory,
13611             com.google.cloud.retail.v2.LocalInventory.Builder,
13612             com.google.cloud.retail.v2.LocalInventoryOrBuilder>
13613         localInventoriesBuilder_;
13614 
13615     /**
13616      *
13617      *
13618      * <pre>
13619      * Output only. A list of local inventories specific to different places.
13620      * This field can be managed by
13621      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13622      * and
13623      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13624      * APIs if fine-grained, high-volume updates are necessary.
13625      * </pre>
13626      *
13627      * <code>
13628      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13629      * </code>
13630      */
getLocalInventoriesList()13631     public java.util.List<com.google.cloud.retail.v2.LocalInventory> getLocalInventoriesList() {
13632       if (localInventoriesBuilder_ == null) {
13633         return java.util.Collections.unmodifiableList(localInventories_);
13634       } else {
13635         return localInventoriesBuilder_.getMessageList();
13636       }
13637     }
13638     /**
13639      *
13640      *
13641      * <pre>
13642      * Output only. A list of local inventories specific to different places.
13643      * This field can be managed by
13644      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13645      * and
13646      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13647      * APIs if fine-grained, high-volume updates are necessary.
13648      * </pre>
13649      *
13650      * <code>
13651      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13652      * </code>
13653      */
getLocalInventoriesCount()13654     public int getLocalInventoriesCount() {
13655       if (localInventoriesBuilder_ == null) {
13656         return localInventories_.size();
13657       } else {
13658         return localInventoriesBuilder_.getCount();
13659       }
13660     }
13661     /**
13662      *
13663      *
13664      * <pre>
13665      * Output only. A list of local inventories specific to different places.
13666      * This field can be managed by
13667      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13668      * and
13669      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13670      * APIs if fine-grained, high-volume updates are necessary.
13671      * </pre>
13672      *
13673      * <code>
13674      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13675      * </code>
13676      */
getLocalInventories(int index)13677     public com.google.cloud.retail.v2.LocalInventory getLocalInventories(int index) {
13678       if (localInventoriesBuilder_ == null) {
13679         return localInventories_.get(index);
13680       } else {
13681         return localInventoriesBuilder_.getMessage(index);
13682       }
13683     }
13684     /**
13685      *
13686      *
13687      * <pre>
13688      * Output only. A list of local inventories specific to different places.
13689      * This field can be managed by
13690      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13691      * and
13692      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13693      * APIs if fine-grained, high-volume updates are necessary.
13694      * </pre>
13695      *
13696      * <code>
13697      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13698      * </code>
13699      */
setLocalInventories(int index, com.google.cloud.retail.v2.LocalInventory value)13700     public Builder setLocalInventories(int index, com.google.cloud.retail.v2.LocalInventory value) {
13701       if (localInventoriesBuilder_ == null) {
13702         if (value == null) {
13703           throw new NullPointerException();
13704         }
13705         ensureLocalInventoriesIsMutable();
13706         localInventories_.set(index, value);
13707         onChanged();
13708       } else {
13709         localInventoriesBuilder_.setMessage(index, value);
13710       }
13711       return this;
13712     }
13713     /**
13714      *
13715      *
13716      * <pre>
13717      * Output only. A list of local inventories specific to different places.
13718      * This field can be managed by
13719      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13720      * and
13721      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13722      * APIs if fine-grained, high-volume updates are necessary.
13723      * </pre>
13724      *
13725      * <code>
13726      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13727      * </code>
13728      */
setLocalInventories( int index, com.google.cloud.retail.v2.LocalInventory.Builder builderForValue)13729     public Builder setLocalInventories(
13730         int index, com.google.cloud.retail.v2.LocalInventory.Builder builderForValue) {
13731       if (localInventoriesBuilder_ == null) {
13732         ensureLocalInventoriesIsMutable();
13733         localInventories_.set(index, builderForValue.build());
13734         onChanged();
13735       } else {
13736         localInventoriesBuilder_.setMessage(index, builderForValue.build());
13737       }
13738       return this;
13739     }
13740     /**
13741      *
13742      *
13743      * <pre>
13744      * Output only. A list of local inventories specific to different places.
13745      * This field can be managed by
13746      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13747      * and
13748      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13749      * APIs if fine-grained, high-volume updates are necessary.
13750      * </pre>
13751      *
13752      * <code>
13753      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13754      * </code>
13755      */
addLocalInventories(com.google.cloud.retail.v2.LocalInventory value)13756     public Builder addLocalInventories(com.google.cloud.retail.v2.LocalInventory value) {
13757       if (localInventoriesBuilder_ == null) {
13758         if (value == null) {
13759           throw new NullPointerException();
13760         }
13761         ensureLocalInventoriesIsMutable();
13762         localInventories_.add(value);
13763         onChanged();
13764       } else {
13765         localInventoriesBuilder_.addMessage(value);
13766       }
13767       return this;
13768     }
13769     /**
13770      *
13771      *
13772      * <pre>
13773      * Output only. A list of local inventories specific to different places.
13774      * This field can be managed by
13775      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13776      * and
13777      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13778      * APIs if fine-grained, high-volume updates are necessary.
13779      * </pre>
13780      *
13781      * <code>
13782      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13783      * </code>
13784      */
addLocalInventories(int index, com.google.cloud.retail.v2.LocalInventory value)13785     public Builder addLocalInventories(int index, com.google.cloud.retail.v2.LocalInventory value) {
13786       if (localInventoriesBuilder_ == null) {
13787         if (value == null) {
13788           throw new NullPointerException();
13789         }
13790         ensureLocalInventoriesIsMutable();
13791         localInventories_.add(index, value);
13792         onChanged();
13793       } else {
13794         localInventoriesBuilder_.addMessage(index, value);
13795       }
13796       return this;
13797     }
13798     /**
13799      *
13800      *
13801      * <pre>
13802      * Output only. A list of local inventories specific to different places.
13803      * This field can be managed by
13804      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13805      * and
13806      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13807      * APIs if fine-grained, high-volume updates are necessary.
13808      * </pre>
13809      *
13810      * <code>
13811      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13812      * </code>
13813      */
addLocalInventories( com.google.cloud.retail.v2.LocalInventory.Builder builderForValue)13814     public Builder addLocalInventories(
13815         com.google.cloud.retail.v2.LocalInventory.Builder builderForValue) {
13816       if (localInventoriesBuilder_ == null) {
13817         ensureLocalInventoriesIsMutable();
13818         localInventories_.add(builderForValue.build());
13819         onChanged();
13820       } else {
13821         localInventoriesBuilder_.addMessage(builderForValue.build());
13822       }
13823       return this;
13824     }
13825     /**
13826      *
13827      *
13828      * <pre>
13829      * Output only. A list of local inventories specific to different places.
13830      * This field can be managed by
13831      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13832      * and
13833      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13834      * APIs if fine-grained, high-volume updates are necessary.
13835      * </pre>
13836      *
13837      * <code>
13838      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13839      * </code>
13840      */
addLocalInventories( int index, com.google.cloud.retail.v2.LocalInventory.Builder builderForValue)13841     public Builder addLocalInventories(
13842         int index, com.google.cloud.retail.v2.LocalInventory.Builder builderForValue) {
13843       if (localInventoriesBuilder_ == null) {
13844         ensureLocalInventoriesIsMutable();
13845         localInventories_.add(index, builderForValue.build());
13846         onChanged();
13847       } else {
13848         localInventoriesBuilder_.addMessage(index, builderForValue.build());
13849       }
13850       return this;
13851     }
13852     /**
13853      *
13854      *
13855      * <pre>
13856      * Output only. A list of local inventories specific to different places.
13857      * This field can be managed by
13858      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13859      * and
13860      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13861      * APIs if fine-grained, high-volume updates are necessary.
13862      * </pre>
13863      *
13864      * <code>
13865      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13866      * </code>
13867      */
addAllLocalInventories( java.lang.Iterable<? extends com.google.cloud.retail.v2.LocalInventory> values)13868     public Builder addAllLocalInventories(
13869         java.lang.Iterable<? extends com.google.cloud.retail.v2.LocalInventory> values) {
13870       if (localInventoriesBuilder_ == null) {
13871         ensureLocalInventoriesIsMutable();
13872         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, localInventories_);
13873         onChanged();
13874       } else {
13875         localInventoriesBuilder_.addAllMessages(values);
13876       }
13877       return this;
13878     }
13879     /**
13880      *
13881      *
13882      * <pre>
13883      * Output only. A list of local inventories specific to different places.
13884      * This field can be managed by
13885      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13886      * and
13887      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13888      * APIs if fine-grained, high-volume updates are necessary.
13889      * </pre>
13890      *
13891      * <code>
13892      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13893      * </code>
13894      */
clearLocalInventories()13895     public Builder clearLocalInventories() {
13896       if (localInventoriesBuilder_ == null) {
13897         localInventories_ = java.util.Collections.emptyList();
13898         bitField1_ = (bitField1_ & ~0x00000002);
13899         onChanged();
13900       } else {
13901         localInventoriesBuilder_.clear();
13902       }
13903       return this;
13904     }
13905     /**
13906      *
13907      *
13908      * <pre>
13909      * Output only. A list of local inventories specific to different places.
13910      * This field can be managed by
13911      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13912      * and
13913      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13914      * APIs if fine-grained, high-volume updates are necessary.
13915      * </pre>
13916      *
13917      * <code>
13918      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13919      * </code>
13920      */
removeLocalInventories(int index)13921     public Builder removeLocalInventories(int index) {
13922       if (localInventoriesBuilder_ == null) {
13923         ensureLocalInventoriesIsMutable();
13924         localInventories_.remove(index);
13925         onChanged();
13926       } else {
13927         localInventoriesBuilder_.remove(index);
13928       }
13929       return this;
13930     }
13931     /**
13932      *
13933      *
13934      * <pre>
13935      * Output only. A list of local inventories specific to different places.
13936      * This field can be managed by
13937      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13938      * and
13939      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13940      * APIs if fine-grained, high-volume updates are necessary.
13941      * </pre>
13942      *
13943      * <code>
13944      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13945      * </code>
13946      */
getLocalInventoriesBuilder(int index)13947     public com.google.cloud.retail.v2.LocalInventory.Builder getLocalInventoriesBuilder(int index) {
13948       return getLocalInventoriesFieldBuilder().getBuilder(index);
13949     }
13950     /**
13951      *
13952      *
13953      * <pre>
13954      * Output only. A list of local inventories specific to different places.
13955      * This field can be managed by
13956      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13957      * and
13958      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13959      * APIs if fine-grained, high-volume updates are necessary.
13960      * </pre>
13961      *
13962      * <code>
13963      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13964      * </code>
13965      */
getLocalInventoriesOrBuilder( int index)13966     public com.google.cloud.retail.v2.LocalInventoryOrBuilder getLocalInventoriesOrBuilder(
13967         int index) {
13968       if (localInventoriesBuilder_ == null) {
13969         return localInventories_.get(index);
13970       } else {
13971         return localInventoriesBuilder_.getMessageOrBuilder(index);
13972       }
13973     }
13974     /**
13975      *
13976      *
13977      * <pre>
13978      * Output only. A list of local inventories specific to different places.
13979      * This field can be managed by
13980      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
13981      * and
13982      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
13983      * APIs if fine-grained, high-volume updates are necessary.
13984      * </pre>
13985      *
13986      * <code>
13987      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
13988      * </code>
13989      */
13990     public java.util.List<? extends com.google.cloud.retail.v2.LocalInventoryOrBuilder>
getLocalInventoriesOrBuilderList()13991         getLocalInventoriesOrBuilderList() {
13992       if (localInventoriesBuilder_ != null) {
13993         return localInventoriesBuilder_.getMessageOrBuilderList();
13994       } else {
13995         return java.util.Collections.unmodifiableList(localInventories_);
13996       }
13997     }
13998     /**
13999      *
14000      *
14001      * <pre>
14002      * Output only. A list of local inventories specific to different places.
14003      * This field can be managed by
14004      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
14005      * and
14006      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
14007      * APIs if fine-grained, high-volume updates are necessary.
14008      * </pre>
14009      *
14010      * <code>
14011      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
14012      * </code>
14013      */
addLocalInventoriesBuilder()14014     public com.google.cloud.retail.v2.LocalInventory.Builder addLocalInventoriesBuilder() {
14015       return getLocalInventoriesFieldBuilder()
14016           .addBuilder(com.google.cloud.retail.v2.LocalInventory.getDefaultInstance());
14017     }
14018     /**
14019      *
14020      *
14021      * <pre>
14022      * Output only. A list of local inventories specific to different places.
14023      * This field can be managed by
14024      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
14025      * and
14026      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
14027      * APIs if fine-grained, high-volume updates are necessary.
14028      * </pre>
14029      *
14030      * <code>
14031      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
14032      * </code>
14033      */
addLocalInventoriesBuilder(int index)14034     public com.google.cloud.retail.v2.LocalInventory.Builder addLocalInventoriesBuilder(int index) {
14035       return getLocalInventoriesFieldBuilder()
14036           .addBuilder(index, com.google.cloud.retail.v2.LocalInventory.getDefaultInstance());
14037     }
14038     /**
14039      *
14040      *
14041      * <pre>
14042      * Output only. A list of local inventories specific to different places.
14043      * This field can be managed by
14044      * [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
14045      * and
14046      * [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
14047      * APIs if fine-grained, high-volume updates are necessary.
14048      * </pre>
14049      *
14050      * <code>
14051      * repeated .google.cloud.retail.v2.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];
14052      * </code>
14053      */
14054     public java.util.List<com.google.cloud.retail.v2.LocalInventory.Builder>
getLocalInventoriesBuilderList()14055         getLocalInventoriesBuilderList() {
14056       return getLocalInventoriesFieldBuilder().getBuilderList();
14057     }
14058 
14059     private com.google.protobuf.RepeatedFieldBuilderV3<
14060             com.google.cloud.retail.v2.LocalInventory,
14061             com.google.cloud.retail.v2.LocalInventory.Builder,
14062             com.google.cloud.retail.v2.LocalInventoryOrBuilder>
getLocalInventoriesFieldBuilder()14063         getLocalInventoriesFieldBuilder() {
14064       if (localInventoriesBuilder_ == null) {
14065         localInventoriesBuilder_ =
14066             new com.google.protobuf.RepeatedFieldBuilderV3<
14067                 com.google.cloud.retail.v2.LocalInventory,
14068                 com.google.cloud.retail.v2.LocalInventory.Builder,
14069                 com.google.cloud.retail.v2.LocalInventoryOrBuilder>(
14070                 localInventories_,
14071                 ((bitField1_ & 0x00000002) != 0),
14072                 getParentForChildren(),
14073                 isClean());
14074         localInventories_ = null;
14075       }
14076       return localInventoriesBuilder_;
14077     }
14078 
14079     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)14080     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
14081       return super.setUnknownFields(unknownFields);
14082     }
14083 
14084     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)14085     public final Builder mergeUnknownFields(
14086         final com.google.protobuf.UnknownFieldSet unknownFields) {
14087       return super.mergeUnknownFields(unknownFields);
14088     }
14089 
14090     // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.Product)
14091   }
14092 
14093   // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.Product)
14094   private static final com.google.cloud.retail.v2.Product DEFAULT_INSTANCE;
14095 
14096   static {
14097     DEFAULT_INSTANCE = new com.google.cloud.retail.v2.Product();
14098   }
14099 
getDefaultInstance()14100   public static com.google.cloud.retail.v2.Product getDefaultInstance() {
14101     return DEFAULT_INSTANCE;
14102   }
14103 
14104   private static final com.google.protobuf.Parser<Product> PARSER =
14105       new com.google.protobuf.AbstractParser<Product>() {
14106         @java.lang.Override
14107         public Product parsePartialFrom(
14108             com.google.protobuf.CodedInputStream input,
14109             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14110             throws com.google.protobuf.InvalidProtocolBufferException {
14111           Builder builder = newBuilder();
14112           try {
14113             builder.mergeFrom(input, extensionRegistry);
14114           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
14115             throw e.setUnfinishedMessage(builder.buildPartial());
14116           } catch (com.google.protobuf.UninitializedMessageException e) {
14117             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
14118           } catch (java.io.IOException e) {
14119             throw new com.google.protobuf.InvalidProtocolBufferException(e)
14120                 .setUnfinishedMessage(builder.buildPartial());
14121           }
14122           return builder.buildPartial();
14123         }
14124       };
14125 
parser()14126   public static com.google.protobuf.Parser<Product> parser() {
14127     return PARSER;
14128   }
14129 
14130   @java.lang.Override
getParserForType()14131   public com.google.protobuf.Parser<Product> getParserForType() {
14132     return PARSER;
14133   }
14134 
14135   @java.lang.Override
getDefaultInstanceForType()14136   public com.google.cloud.retail.v2.Product getDefaultInstanceForType() {
14137     return DEFAULT_INSTANCE;
14138   }
14139 }
14140