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