• 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/user_event_service.proto
18 
19 package com.google.cloud.retail.v2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Request message for RejoinUserEvents method.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.retail.v2.RejoinUserEventsRequest}
29  */
30 public final class RejoinUserEventsRequest extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.retail.v2.RejoinUserEventsRequest)
33     RejoinUserEventsRequestOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use RejoinUserEventsRequest.newBuilder() to construct.
RejoinUserEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private RejoinUserEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
RejoinUserEventsRequest()40   private RejoinUserEventsRequest() {
41     parent_ = "";
42     userEventRejoinScope_ = 0;
43   }
44 
45   @java.lang.Override
46   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)47   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
48     return new RejoinUserEventsRequest();
49   }
50 
51   @java.lang.Override
getUnknownFields()52   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53     return this.unknownFields;
54   }
55 
getDescriptor()56   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
57     return com.google.cloud.retail.v2.UserEventServiceProto
58         .internal_static_google_cloud_retail_v2_RejoinUserEventsRequest_descriptor;
59   }
60 
61   @java.lang.Override
62   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()63       internalGetFieldAccessorTable() {
64     return com.google.cloud.retail.v2.UserEventServiceProto
65         .internal_static_google_cloud_retail_v2_RejoinUserEventsRequest_fieldAccessorTable
66         .ensureFieldAccessorsInitialized(
67             com.google.cloud.retail.v2.RejoinUserEventsRequest.class,
68             com.google.cloud.retail.v2.RejoinUserEventsRequest.Builder.class);
69   }
70 
71   /**
72    *
73    *
74    * <pre>
75    * The scope of user events to be rejoined with the latest product catalog.
76    * If the rejoining aims at reducing number of unjoined events, set
77    * `UserEventRejoinScope` to `UNJOINED_EVENTS`.
78    * If the rejoining aims at correcting product catalog information in joined
79    * events, set `UserEventRejoinScope` to `JOINED_EVENTS`.
80    * If all events needs to be rejoined, set `UserEventRejoinScope` to
81    * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED`.
82    * </pre>
83    *
84    * Protobuf enum {@code google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope}
85    */
86   public enum UserEventRejoinScope implements com.google.protobuf.ProtocolMessageEnum {
87     /**
88      *
89      *
90      * <pre>
91      * Rejoin all events with the latest product catalog, including both joined
92      * events and unjoined events.
93      * </pre>
94      *
95      * <code>USER_EVENT_REJOIN_SCOPE_UNSPECIFIED = 0;</code>
96      */
97     USER_EVENT_REJOIN_SCOPE_UNSPECIFIED(0),
98     /**
99      *
100      *
101      * <pre>
102      * Only rejoin joined events with the latest product catalog.
103      * </pre>
104      *
105      * <code>JOINED_EVENTS = 1;</code>
106      */
107     JOINED_EVENTS(1),
108     /**
109      *
110      *
111      * <pre>
112      * Only rejoin unjoined events with the latest product catalog.
113      * </pre>
114      *
115      * <code>UNJOINED_EVENTS = 2;</code>
116      */
117     UNJOINED_EVENTS(2),
118     UNRECOGNIZED(-1),
119     ;
120 
121     /**
122      *
123      *
124      * <pre>
125      * Rejoin all events with the latest product catalog, including both joined
126      * events and unjoined events.
127      * </pre>
128      *
129      * <code>USER_EVENT_REJOIN_SCOPE_UNSPECIFIED = 0;</code>
130      */
131     public static final int USER_EVENT_REJOIN_SCOPE_UNSPECIFIED_VALUE = 0;
132     /**
133      *
134      *
135      * <pre>
136      * Only rejoin joined events with the latest product catalog.
137      * </pre>
138      *
139      * <code>JOINED_EVENTS = 1;</code>
140      */
141     public static final int JOINED_EVENTS_VALUE = 1;
142     /**
143      *
144      *
145      * <pre>
146      * Only rejoin unjoined events with the latest product catalog.
147      * </pre>
148      *
149      * <code>UNJOINED_EVENTS = 2;</code>
150      */
151     public static final int UNJOINED_EVENTS_VALUE = 2;
152 
getNumber()153     public final int getNumber() {
154       if (this == UNRECOGNIZED) {
155         throw new java.lang.IllegalArgumentException(
156             "Can't get the number of an unknown enum value.");
157       }
158       return value;
159     }
160 
161     /**
162      * @param value The numeric wire value of the corresponding enum entry.
163      * @return The enum associated with the given numeric wire value.
164      * @deprecated Use {@link #forNumber(int)} instead.
165      */
166     @java.lang.Deprecated
valueOf(int value)167     public static UserEventRejoinScope valueOf(int value) {
168       return forNumber(value);
169     }
170 
171     /**
172      * @param value The numeric wire value of the corresponding enum entry.
173      * @return The enum associated with the given numeric wire value.
174      */
forNumber(int value)175     public static UserEventRejoinScope forNumber(int value) {
176       switch (value) {
177         case 0:
178           return USER_EVENT_REJOIN_SCOPE_UNSPECIFIED;
179         case 1:
180           return JOINED_EVENTS;
181         case 2:
182           return UNJOINED_EVENTS;
183         default:
184           return null;
185       }
186     }
187 
188     public static com.google.protobuf.Internal.EnumLiteMap<UserEventRejoinScope>
internalGetValueMap()189         internalGetValueMap() {
190       return internalValueMap;
191     }
192 
193     private static final com.google.protobuf.Internal.EnumLiteMap<UserEventRejoinScope>
194         internalValueMap =
195             new com.google.protobuf.Internal.EnumLiteMap<UserEventRejoinScope>() {
196               public UserEventRejoinScope findValueByNumber(int number) {
197                 return UserEventRejoinScope.forNumber(number);
198               }
199             };
200 
getValueDescriptor()201     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
202       if (this == UNRECOGNIZED) {
203         throw new java.lang.IllegalStateException(
204             "Can't get the descriptor of an unrecognized enum value.");
205       }
206       return getDescriptor().getValues().get(ordinal());
207     }
208 
getDescriptorForType()209     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
210       return getDescriptor();
211     }
212 
getDescriptor()213     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
214       return com.google.cloud.retail.v2.RejoinUserEventsRequest.getDescriptor()
215           .getEnumTypes()
216           .get(0);
217     }
218 
219     private static final UserEventRejoinScope[] VALUES = values();
220 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)221     public static UserEventRejoinScope valueOf(
222         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
223       if (desc.getType() != getDescriptor()) {
224         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
225       }
226       if (desc.getIndex() == -1) {
227         return UNRECOGNIZED;
228       }
229       return VALUES[desc.getIndex()];
230     }
231 
232     private final int value;
233 
UserEventRejoinScope(int value)234     private UserEventRejoinScope(int value) {
235       this.value = value;
236     }
237 
238     // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope)
239   }
240 
241   public static final int PARENT_FIELD_NUMBER = 1;
242 
243   @SuppressWarnings("serial")
244   private volatile java.lang.Object parent_ = "";
245   /**
246    *
247    *
248    * <pre>
249    * Required. The parent catalog resource name, such as
250    * `projects/1234/locations/global/catalogs/default_catalog`.
251    * </pre>
252    *
253    * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
254    *
255    * @return The parent.
256    */
257   @java.lang.Override
getParent()258   public java.lang.String getParent() {
259     java.lang.Object ref = parent_;
260     if (ref instanceof java.lang.String) {
261       return (java.lang.String) ref;
262     } else {
263       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
264       java.lang.String s = bs.toStringUtf8();
265       parent_ = s;
266       return s;
267     }
268   }
269   /**
270    *
271    *
272    * <pre>
273    * Required. The parent catalog resource name, such as
274    * `projects/1234/locations/global/catalogs/default_catalog`.
275    * </pre>
276    *
277    * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
278    *
279    * @return The bytes for parent.
280    */
281   @java.lang.Override
getParentBytes()282   public com.google.protobuf.ByteString getParentBytes() {
283     java.lang.Object ref = parent_;
284     if (ref instanceof java.lang.String) {
285       com.google.protobuf.ByteString b =
286           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
287       parent_ = b;
288       return b;
289     } else {
290       return (com.google.protobuf.ByteString) ref;
291     }
292   }
293 
294   public static final int USER_EVENT_REJOIN_SCOPE_FIELD_NUMBER = 2;
295   private int userEventRejoinScope_ = 0;
296   /**
297    *
298    *
299    * <pre>
300    * The type of the user event rejoin to define the scope and range of the user
301    * events to be rejoined with the latest product catalog. Defaults to
302    * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
303    * an invalid integer value.
304    * </pre>
305    *
306    * <code>
307    * .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
308    * </code>
309    *
310    * @return The enum numeric value on the wire for userEventRejoinScope.
311    */
312   @java.lang.Override
getUserEventRejoinScopeValue()313   public int getUserEventRejoinScopeValue() {
314     return userEventRejoinScope_;
315   }
316   /**
317    *
318    *
319    * <pre>
320    * The type of the user event rejoin to define the scope and range of the user
321    * events to be rejoined with the latest product catalog. Defaults to
322    * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
323    * an invalid integer value.
324    * </pre>
325    *
326    * <code>
327    * .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
328    * </code>
329    *
330    * @return The userEventRejoinScope.
331    */
332   @java.lang.Override
333   public com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope
getUserEventRejoinScope()334       getUserEventRejoinScope() {
335     com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope result =
336         com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope.forNumber(
337             userEventRejoinScope_);
338     return result == null
339         ? com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope.UNRECOGNIZED
340         : result;
341   }
342 
343   private byte memoizedIsInitialized = -1;
344 
345   @java.lang.Override
isInitialized()346   public final boolean isInitialized() {
347     byte isInitialized = memoizedIsInitialized;
348     if (isInitialized == 1) return true;
349     if (isInitialized == 0) return false;
350 
351     memoizedIsInitialized = 1;
352     return true;
353   }
354 
355   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)356   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
357     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
358       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
359     }
360     if (userEventRejoinScope_
361         != com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope
362             .USER_EVENT_REJOIN_SCOPE_UNSPECIFIED
363             .getNumber()) {
364       output.writeEnum(2, userEventRejoinScope_);
365     }
366     getUnknownFields().writeTo(output);
367   }
368 
369   @java.lang.Override
getSerializedSize()370   public int getSerializedSize() {
371     int size = memoizedSize;
372     if (size != -1) return size;
373 
374     size = 0;
375     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
376       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
377     }
378     if (userEventRejoinScope_
379         != com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope
380             .USER_EVENT_REJOIN_SCOPE_UNSPECIFIED
381             .getNumber()) {
382       size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, userEventRejoinScope_);
383     }
384     size += getUnknownFields().getSerializedSize();
385     memoizedSize = size;
386     return size;
387   }
388 
389   @java.lang.Override
equals(final java.lang.Object obj)390   public boolean equals(final java.lang.Object obj) {
391     if (obj == this) {
392       return true;
393     }
394     if (!(obj instanceof com.google.cloud.retail.v2.RejoinUserEventsRequest)) {
395       return super.equals(obj);
396     }
397     com.google.cloud.retail.v2.RejoinUserEventsRequest other =
398         (com.google.cloud.retail.v2.RejoinUserEventsRequest) obj;
399 
400     if (!getParent().equals(other.getParent())) return false;
401     if (userEventRejoinScope_ != other.userEventRejoinScope_) return false;
402     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
403     return true;
404   }
405 
406   @java.lang.Override
hashCode()407   public int hashCode() {
408     if (memoizedHashCode != 0) {
409       return memoizedHashCode;
410     }
411     int hash = 41;
412     hash = (19 * hash) + getDescriptor().hashCode();
413     hash = (37 * hash) + PARENT_FIELD_NUMBER;
414     hash = (53 * hash) + getParent().hashCode();
415     hash = (37 * hash) + USER_EVENT_REJOIN_SCOPE_FIELD_NUMBER;
416     hash = (53 * hash) + userEventRejoinScope_;
417     hash = (29 * hash) + getUnknownFields().hashCode();
418     memoizedHashCode = hash;
419     return hash;
420   }
421 
parseFrom( java.nio.ByteBuffer data)422   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(
423       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
424     return PARSER.parseFrom(data);
425   }
426 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)427   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(
428       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
429       throws com.google.protobuf.InvalidProtocolBufferException {
430     return PARSER.parseFrom(data, extensionRegistry);
431   }
432 
parseFrom( com.google.protobuf.ByteString data)433   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(
434       com.google.protobuf.ByteString data)
435       throws com.google.protobuf.InvalidProtocolBufferException {
436     return PARSER.parseFrom(data);
437   }
438 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)439   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(
440       com.google.protobuf.ByteString data,
441       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
442       throws com.google.protobuf.InvalidProtocolBufferException {
443     return PARSER.parseFrom(data, extensionRegistry);
444   }
445 
parseFrom(byte[] data)446   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(byte[] data)
447       throws com.google.protobuf.InvalidProtocolBufferException {
448     return PARSER.parseFrom(data);
449   }
450 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)451   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(
452       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
453       throws com.google.protobuf.InvalidProtocolBufferException {
454     return PARSER.parseFrom(data, extensionRegistry);
455   }
456 
parseFrom( java.io.InputStream input)457   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(
458       java.io.InputStream input) throws java.io.IOException {
459     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
460   }
461 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)462   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(
463       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
464       throws java.io.IOException {
465     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
466         PARSER, input, extensionRegistry);
467   }
468 
parseDelimitedFrom( java.io.InputStream input)469   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseDelimitedFrom(
470       java.io.InputStream input) throws java.io.IOException {
471     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
472   }
473 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)474   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseDelimitedFrom(
475       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
476       throws java.io.IOException {
477     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
478         PARSER, input, extensionRegistry);
479   }
480 
parseFrom( com.google.protobuf.CodedInputStream input)481   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(
482       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
483     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
484   }
485 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)486   public static com.google.cloud.retail.v2.RejoinUserEventsRequest parseFrom(
487       com.google.protobuf.CodedInputStream input,
488       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
489       throws java.io.IOException {
490     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
491         PARSER, input, extensionRegistry);
492   }
493 
494   @java.lang.Override
newBuilderForType()495   public Builder newBuilderForType() {
496     return newBuilder();
497   }
498 
newBuilder()499   public static Builder newBuilder() {
500     return DEFAULT_INSTANCE.toBuilder();
501   }
502 
newBuilder(com.google.cloud.retail.v2.RejoinUserEventsRequest prototype)503   public static Builder newBuilder(com.google.cloud.retail.v2.RejoinUserEventsRequest prototype) {
504     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
505   }
506 
507   @java.lang.Override
toBuilder()508   public Builder toBuilder() {
509     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
510   }
511 
512   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)513   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
514     Builder builder = new Builder(parent);
515     return builder;
516   }
517   /**
518    *
519    *
520    * <pre>
521    * Request message for RejoinUserEvents method.
522    * </pre>
523    *
524    * Protobuf type {@code google.cloud.retail.v2.RejoinUserEventsRequest}
525    */
526   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
527       implements
528       // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2.RejoinUserEventsRequest)
529       com.google.cloud.retail.v2.RejoinUserEventsRequestOrBuilder {
getDescriptor()530     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
531       return com.google.cloud.retail.v2.UserEventServiceProto
532           .internal_static_google_cloud_retail_v2_RejoinUserEventsRequest_descriptor;
533     }
534 
535     @java.lang.Override
536     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()537         internalGetFieldAccessorTable() {
538       return com.google.cloud.retail.v2.UserEventServiceProto
539           .internal_static_google_cloud_retail_v2_RejoinUserEventsRequest_fieldAccessorTable
540           .ensureFieldAccessorsInitialized(
541               com.google.cloud.retail.v2.RejoinUserEventsRequest.class,
542               com.google.cloud.retail.v2.RejoinUserEventsRequest.Builder.class);
543     }
544 
545     // Construct using com.google.cloud.retail.v2.RejoinUserEventsRequest.newBuilder()
Builder()546     private Builder() {}
547 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)548     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
549       super(parent);
550     }
551 
552     @java.lang.Override
clear()553     public Builder clear() {
554       super.clear();
555       bitField0_ = 0;
556       parent_ = "";
557       userEventRejoinScope_ = 0;
558       return this;
559     }
560 
561     @java.lang.Override
getDescriptorForType()562     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
563       return com.google.cloud.retail.v2.UserEventServiceProto
564           .internal_static_google_cloud_retail_v2_RejoinUserEventsRequest_descriptor;
565     }
566 
567     @java.lang.Override
getDefaultInstanceForType()568     public com.google.cloud.retail.v2.RejoinUserEventsRequest getDefaultInstanceForType() {
569       return com.google.cloud.retail.v2.RejoinUserEventsRequest.getDefaultInstance();
570     }
571 
572     @java.lang.Override
build()573     public com.google.cloud.retail.v2.RejoinUserEventsRequest build() {
574       com.google.cloud.retail.v2.RejoinUserEventsRequest result = buildPartial();
575       if (!result.isInitialized()) {
576         throw newUninitializedMessageException(result);
577       }
578       return result;
579     }
580 
581     @java.lang.Override
buildPartial()582     public com.google.cloud.retail.v2.RejoinUserEventsRequest buildPartial() {
583       com.google.cloud.retail.v2.RejoinUserEventsRequest result =
584           new com.google.cloud.retail.v2.RejoinUserEventsRequest(this);
585       if (bitField0_ != 0) {
586         buildPartial0(result);
587       }
588       onBuilt();
589       return result;
590     }
591 
buildPartial0(com.google.cloud.retail.v2.RejoinUserEventsRequest result)592     private void buildPartial0(com.google.cloud.retail.v2.RejoinUserEventsRequest result) {
593       int from_bitField0_ = bitField0_;
594       if (((from_bitField0_ & 0x00000001) != 0)) {
595         result.parent_ = parent_;
596       }
597       if (((from_bitField0_ & 0x00000002) != 0)) {
598         result.userEventRejoinScope_ = userEventRejoinScope_;
599       }
600     }
601 
602     @java.lang.Override
clone()603     public Builder clone() {
604       return super.clone();
605     }
606 
607     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)608     public Builder setField(
609         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
610       return super.setField(field, value);
611     }
612 
613     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)614     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
615       return super.clearField(field);
616     }
617 
618     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)619     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
620       return super.clearOneof(oneof);
621     }
622 
623     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)624     public Builder setRepeatedField(
625         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
626       return super.setRepeatedField(field, index, value);
627     }
628 
629     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)630     public Builder addRepeatedField(
631         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
632       return super.addRepeatedField(field, value);
633     }
634 
635     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)636     public Builder mergeFrom(com.google.protobuf.Message other) {
637       if (other instanceof com.google.cloud.retail.v2.RejoinUserEventsRequest) {
638         return mergeFrom((com.google.cloud.retail.v2.RejoinUserEventsRequest) other);
639       } else {
640         super.mergeFrom(other);
641         return this;
642       }
643     }
644 
mergeFrom(com.google.cloud.retail.v2.RejoinUserEventsRequest other)645     public Builder mergeFrom(com.google.cloud.retail.v2.RejoinUserEventsRequest other) {
646       if (other == com.google.cloud.retail.v2.RejoinUserEventsRequest.getDefaultInstance())
647         return this;
648       if (!other.getParent().isEmpty()) {
649         parent_ = other.parent_;
650         bitField0_ |= 0x00000001;
651         onChanged();
652       }
653       if (other.userEventRejoinScope_ != 0) {
654         setUserEventRejoinScopeValue(other.getUserEventRejoinScopeValue());
655       }
656       this.mergeUnknownFields(other.getUnknownFields());
657       onChanged();
658       return this;
659     }
660 
661     @java.lang.Override
isInitialized()662     public final boolean isInitialized() {
663       return true;
664     }
665 
666     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)667     public Builder mergeFrom(
668         com.google.protobuf.CodedInputStream input,
669         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
670         throws java.io.IOException {
671       if (extensionRegistry == null) {
672         throw new java.lang.NullPointerException();
673       }
674       try {
675         boolean done = false;
676         while (!done) {
677           int tag = input.readTag();
678           switch (tag) {
679             case 0:
680               done = true;
681               break;
682             case 10:
683               {
684                 parent_ = input.readStringRequireUtf8();
685                 bitField0_ |= 0x00000001;
686                 break;
687               } // case 10
688             case 16:
689               {
690                 userEventRejoinScope_ = input.readEnum();
691                 bitField0_ |= 0x00000002;
692                 break;
693               } // case 16
694             default:
695               {
696                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
697                   done = true; // was an endgroup tag
698                 }
699                 break;
700               } // default:
701           } // switch (tag)
702         } // while (!done)
703       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
704         throw e.unwrapIOException();
705       } finally {
706         onChanged();
707       } // finally
708       return this;
709     }
710 
711     private int bitField0_;
712 
713     private java.lang.Object parent_ = "";
714     /**
715      *
716      *
717      * <pre>
718      * Required. The parent catalog resource name, such as
719      * `projects/1234/locations/global/catalogs/default_catalog`.
720      * </pre>
721      *
722      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
723      *
724      * @return The parent.
725      */
getParent()726     public java.lang.String getParent() {
727       java.lang.Object ref = parent_;
728       if (!(ref instanceof java.lang.String)) {
729         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
730         java.lang.String s = bs.toStringUtf8();
731         parent_ = s;
732         return s;
733       } else {
734         return (java.lang.String) ref;
735       }
736     }
737     /**
738      *
739      *
740      * <pre>
741      * Required. The parent catalog resource name, such as
742      * `projects/1234/locations/global/catalogs/default_catalog`.
743      * </pre>
744      *
745      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
746      *
747      * @return The bytes for parent.
748      */
getParentBytes()749     public com.google.protobuf.ByteString getParentBytes() {
750       java.lang.Object ref = parent_;
751       if (ref instanceof String) {
752         com.google.protobuf.ByteString b =
753             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
754         parent_ = b;
755         return b;
756       } else {
757         return (com.google.protobuf.ByteString) ref;
758       }
759     }
760     /**
761      *
762      *
763      * <pre>
764      * Required. The parent catalog resource name, such as
765      * `projects/1234/locations/global/catalogs/default_catalog`.
766      * </pre>
767      *
768      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
769      *
770      * @param value The parent to set.
771      * @return This builder for chaining.
772      */
setParent(java.lang.String value)773     public Builder setParent(java.lang.String value) {
774       if (value == null) {
775         throw new NullPointerException();
776       }
777       parent_ = value;
778       bitField0_ |= 0x00000001;
779       onChanged();
780       return this;
781     }
782     /**
783      *
784      *
785      * <pre>
786      * Required. The parent catalog resource name, such as
787      * `projects/1234/locations/global/catalogs/default_catalog`.
788      * </pre>
789      *
790      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
791      *
792      * @return This builder for chaining.
793      */
clearParent()794     public Builder clearParent() {
795       parent_ = getDefaultInstance().getParent();
796       bitField0_ = (bitField0_ & ~0x00000001);
797       onChanged();
798       return this;
799     }
800     /**
801      *
802      *
803      * <pre>
804      * Required. The parent catalog resource name, such as
805      * `projects/1234/locations/global/catalogs/default_catalog`.
806      * </pre>
807      *
808      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
809      *
810      * @param value The bytes for parent to set.
811      * @return This builder for chaining.
812      */
setParentBytes(com.google.protobuf.ByteString value)813     public Builder setParentBytes(com.google.protobuf.ByteString value) {
814       if (value == null) {
815         throw new NullPointerException();
816       }
817       checkByteStringIsUtf8(value);
818       parent_ = value;
819       bitField0_ |= 0x00000001;
820       onChanged();
821       return this;
822     }
823 
824     private int userEventRejoinScope_ = 0;
825     /**
826      *
827      *
828      * <pre>
829      * The type of the user event rejoin to define the scope and range of the user
830      * events to be rejoined with the latest product catalog. Defaults to
831      * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
832      * an invalid integer value.
833      * </pre>
834      *
835      * <code>
836      * .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
837      * </code>
838      *
839      * @return The enum numeric value on the wire for userEventRejoinScope.
840      */
841     @java.lang.Override
getUserEventRejoinScopeValue()842     public int getUserEventRejoinScopeValue() {
843       return userEventRejoinScope_;
844     }
845     /**
846      *
847      *
848      * <pre>
849      * The type of the user event rejoin to define the scope and range of the user
850      * events to be rejoined with the latest product catalog. Defaults to
851      * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
852      * an invalid integer value.
853      * </pre>
854      *
855      * <code>
856      * .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
857      * </code>
858      *
859      * @param value The enum numeric value on the wire for userEventRejoinScope to set.
860      * @return This builder for chaining.
861      */
setUserEventRejoinScopeValue(int value)862     public Builder setUserEventRejoinScopeValue(int value) {
863       userEventRejoinScope_ = value;
864       bitField0_ |= 0x00000002;
865       onChanged();
866       return this;
867     }
868     /**
869      *
870      *
871      * <pre>
872      * The type of the user event rejoin to define the scope and range of the user
873      * events to be rejoined with the latest product catalog. Defaults to
874      * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
875      * an invalid integer value.
876      * </pre>
877      *
878      * <code>
879      * .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
880      * </code>
881      *
882      * @return The userEventRejoinScope.
883      */
884     @java.lang.Override
885     public com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope
getUserEventRejoinScope()886         getUserEventRejoinScope() {
887       com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope result =
888           com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope.forNumber(
889               userEventRejoinScope_);
890       return result == null
891           ? com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope.UNRECOGNIZED
892           : result;
893     }
894     /**
895      *
896      *
897      * <pre>
898      * The type of the user event rejoin to define the scope and range of the user
899      * events to be rejoined with the latest product catalog. Defaults to
900      * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
901      * an invalid integer value.
902      * </pre>
903      *
904      * <code>
905      * .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
906      * </code>
907      *
908      * @param value The userEventRejoinScope to set.
909      * @return This builder for chaining.
910      */
setUserEventRejoinScope( com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope value)911     public Builder setUserEventRejoinScope(
912         com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope value) {
913       if (value == null) {
914         throw new NullPointerException();
915       }
916       bitField0_ |= 0x00000002;
917       userEventRejoinScope_ = value.getNumber();
918       onChanged();
919       return this;
920     }
921     /**
922      *
923      *
924      * <pre>
925      * The type of the user event rejoin to define the scope and range of the user
926      * events to be rejoined with the latest product catalog. Defaults to
927      * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
928      * an invalid integer value.
929      * </pre>
930      *
931      * <code>
932      * .google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;
933      * </code>
934      *
935      * @return This builder for chaining.
936      */
clearUserEventRejoinScope()937     public Builder clearUserEventRejoinScope() {
938       bitField0_ = (bitField0_ & ~0x00000002);
939       userEventRejoinScope_ = 0;
940       onChanged();
941       return this;
942     }
943 
944     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)945     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
946       return super.setUnknownFields(unknownFields);
947     }
948 
949     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)950     public final Builder mergeUnknownFields(
951         final com.google.protobuf.UnknownFieldSet unknownFields) {
952       return super.mergeUnknownFields(unknownFields);
953     }
954 
955     // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2.RejoinUserEventsRequest)
956   }
957 
958   // @@protoc_insertion_point(class_scope:google.cloud.retail.v2.RejoinUserEventsRequest)
959   private static final com.google.cloud.retail.v2.RejoinUserEventsRequest DEFAULT_INSTANCE;
960 
961   static {
962     DEFAULT_INSTANCE = new com.google.cloud.retail.v2.RejoinUserEventsRequest();
963   }
964 
getDefaultInstance()965   public static com.google.cloud.retail.v2.RejoinUserEventsRequest getDefaultInstance() {
966     return DEFAULT_INSTANCE;
967   }
968 
969   private static final com.google.protobuf.Parser<RejoinUserEventsRequest> PARSER =
970       new com.google.protobuf.AbstractParser<RejoinUserEventsRequest>() {
971         @java.lang.Override
972         public RejoinUserEventsRequest parsePartialFrom(
973             com.google.protobuf.CodedInputStream input,
974             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
975             throws com.google.protobuf.InvalidProtocolBufferException {
976           Builder builder = newBuilder();
977           try {
978             builder.mergeFrom(input, extensionRegistry);
979           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
980             throw e.setUnfinishedMessage(builder.buildPartial());
981           } catch (com.google.protobuf.UninitializedMessageException e) {
982             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
983           } catch (java.io.IOException e) {
984             throw new com.google.protobuf.InvalidProtocolBufferException(e)
985                 .setUnfinishedMessage(builder.buildPartial());
986           }
987           return builder.buildPartial();
988         }
989       };
990 
parser()991   public static com.google.protobuf.Parser<RejoinUserEventsRequest> parser() {
992     return PARSER;
993   }
994 
995   @java.lang.Override
getParserForType()996   public com.google.protobuf.Parser<RejoinUserEventsRequest> getParserForType() {
997     return PARSER;
998   }
999 
1000   @java.lang.Override
getDefaultInstanceForType()1001   public com.google.cloud.retail.v2.RejoinUserEventsRequest getDefaultInstanceForType() {
1002     return DEFAULT_INSTANCE;
1003   }
1004 }
1005