• 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/advisorynotifications/v1/service.proto
18 
19 package com.google.cloud.advisorynotifications.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * A notification object for notifying customers about security and privacy
26  * issues.
27  * </pre>
28  *
29  * Protobuf type {@code google.cloud.advisorynotifications.v1.Notification}
30  */
31 public final class Notification extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.cloud.advisorynotifications.v1.Notification)
34     NotificationOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use Notification.newBuilder() to construct.
Notification(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private Notification(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
Notification()41   private Notification() {
42     name_ = "";
43     messages_ = java.util.Collections.emptyList();
44     notificationType_ = 0;
45   }
46 
47   @java.lang.Override
48   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)49   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
50     return new Notification();
51   }
52 
53   @java.lang.Override
getUnknownFields()54   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
55     return this.unknownFields;
56   }
57 
getDescriptor()58   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
59     return com.google.cloud.advisorynotifications.v1.ServiceProto
60         .internal_static_google_cloud_advisorynotifications_v1_Notification_descriptor;
61   }
62 
63   @java.lang.Override
64   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()65       internalGetFieldAccessorTable() {
66     return com.google.cloud.advisorynotifications.v1.ServiceProto
67         .internal_static_google_cloud_advisorynotifications_v1_Notification_fieldAccessorTable
68         .ensureFieldAccessorsInitialized(
69             com.google.cloud.advisorynotifications.v1.Notification.class,
70             com.google.cloud.advisorynotifications.v1.Notification.Builder.class);
71   }
72 
73   public static final int NAME_FIELD_NUMBER = 1;
74 
75   @SuppressWarnings("serial")
76   private volatile java.lang.Object name_ = "";
77   /**
78    *
79    *
80    * <pre>
81    * The resource name of the notification.
82    * Format:
83    * organizations/{organization}/locations/{location}/notifications/{notification}.
84    * </pre>
85    *
86    * <code>string name = 1;</code>
87    *
88    * @return The name.
89    */
90   @java.lang.Override
getName()91   public java.lang.String getName() {
92     java.lang.Object ref = name_;
93     if (ref instanceof java.lang.String) {
94       return (java.lang.String) ref;
95     } else {
96       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
97       java.lang.String s = bs.toStringUtf8();
98       name_ = s;
99       return s;
100     }
101   }
102   /**
103    *
104    *
105    * <pre>
106    * The resource name of the notification.
107    * Format:
108    * organizations/{organization}/locations/{location}/notifications/{notification}.
109    * </pre>
110    *
111    * <code>string name = 1;</code>
112    *
113    * @return The bytes for name.
114    */
115   @java.lang.Override
getNameBytes()116   public com.google.protobuf.ByteString getNameBytes() {
117     java.lang.Object ref = name_;
118     if (ref instanceof java.lang.String) {
119       com.google.protobuf.ByteString b =
120           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
121       name_ = b;
122       return b;
123     } else {
124       return (com.google.protobuf.ByteString) ref;
125     }
126   }
127 
128   public static final int SUBJECT_FIELD_NUMBER = 2;
129   private com.google.cloud.advisorynotifications.v1.Subject subject_;
130   /**
131    *
132    *
133    * <pre>
134    * The subject line of the notification.
135    * </pre>
136    *
137    * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
138    *
139    * @return Whether the subject field is set.
140    */
141   @java.lang.Override
hasSubject()142   public boolean hasSubject() {
143     return subject_ != null;
144   }
145   /**
146    *
147    *
148    * <pre>
149    * The subject line of the notification.
150    * </pre>
151    *
152    * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
153    *
154    * @return The subject.
155    */
156   @java.lang.Override
getSubject()157   public com.google.cloud.advisorynotifications.v1.Subject getSubject() {
158     return subject_ == null
159         ? com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()
160         : subject_;
161   }
162   /**
163    *
164    *
165    * <pre>
166    * The subject line of the notification.
167    * </pre>
168    *
169    * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
170    */
171   @java.lang.Override
getSubjectOrBuilder()172   public com.google.cloud.advisorynotifications.v1.SubjectOrBuilder getSubjectOrBuilder() {
173     return subject_ == null
174         ? com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()
175         : subject_;
176   }
177 
178   public static final int MESSAGES_FIELD_NUMBER = 3;
179 
180   @SuppressWarnings("serial")
181   private java.util.List<com.google.cloud.advisorynotifications.v1.Message> messages_;
182   /**
183    *
184    *
185    * <pre>
186    * A list of messages in the notification.
187    * </pre>
188    *
189    * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
190    */
191   @java.lang.Override
getMessagesList()192   public java.util.List<com.google.cloud.advisorynotifications.v1.Message> getMessagesList() {
193     return messages_;
194   }
195   /**
196    *
197    *
198    * <pre>
199    * A list of messages in the notification.
200    * </pre>
201    *
202    * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
203    */
204   @java.lang.Override
205   public java.util.List<? extends com.google.cloud.advisorynotifications.v1.MessageOrBuilder>
getMessagesOrBuilderList()206       getMessagesOrBuilderList() {
207     return messages_;
208   }
209   /**
210    *
211    *
212    * <pre>
213    * A list of messages in the notification.
214    * </pre>
215    *
216    * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
217    */
218   @java.lang.Override
getMessagesCount()219   public int getMessagesCount() {
220     return messages_.size();
221   }
222   /**
223    *
224    *
225    * <pre>
226    * A list of messages in the notification.
227    * </pre>
228    *
229    * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
230    */
231   @java.lang.Override
getMessages(int index)232   public com.google.cloud.advisorynotifications.v1.Message getMessages(int index) {
233     return messages_.get(index);
234   }
235   /**
236    *
237    *
238    * <pre>
239    * A list of messages in the notification.
240    * </pre>
241    *
242    * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
243    */
244   @java.lang.Override
getMessagesOrBuilder( int index)245   public com.google.cloud.advisorynotifications.v1.MessageOrBuilder getMessagesOrBuilder(
246       int index) {
247     return messages_.get(index);
248   }
249 
250   public static final int CREATE_TIME_FIELD_NUMBER = 4;
251   private com.google.protobuf.Timestamp createTime_;
252   /**
253    *
254    *
255    * <pre>
256    * Output only. Time the notification was created.
257    * </pre>
258    *
259    * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
260    * </code>
261    *
262    * @return Whether the createTime field is set.
263    */
264   @java.lang.Override
hasCreateTime()265   public boolean hasCreateTime() {
266     return createTime_ != null;
267   }
268   /**
269    *
270    *
271    * <pre>
272    * Output only. Time the notification was created.
273    * </pre>
274    *
275    * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
276    * </code>
277    *
278    * @return The createTime.
279    */
280   @java.lang.Override
getCreateTime()281   public com.google.protobuf.Timestamp getCreateTime() {
282     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
283   }
284   /**
285    *
286    *
287    * <pre>
288    * Output only. Time the notification was created.
289    * </pre>
290    *
291    * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
292    * </code>
293    */
294   @java.lang.Override
getCreateTimeOrBuilder()295   public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
296     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
297   }
298 
299   public static final int NOTIFICATION_TYPE_FIELD_NUMBER = 12;
300   private int notificationType_ = 0;
301   /**
302    *
303    *
304    * <pre>
305    * Type of notification
306    * </pre>
307    *
308    * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
309    *
310    * @return The enum numeric value on the wire for notificationType.
311    */
312   @java.lang.Override
getNotificationTypeValue()313   public int getNotificationTypeValue() {
314     return notificationType_;
315   }
316   /**
317    *
318    *
319    * <pre>
320    * Type of notification
321    * </pre>
322    *
323    * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
324    *
325    * @return The notificationType.
326    */
327   @java.lang.Override
getNotificationType()328   public com.google.cloud.advisorynotifications.v1.NotificationType getNotificationType() {
329     com.google.cloud.advisorynotifications.v1.NotificationType result =
330         com.google.cloud.advisorynotifications.v1.NotificationType.forNumber(notificationType_);
331     return result == null
332         ? com.google.cloud.advisorynotifications.v1.NotificationType.UNRECOGNIZED
333         : result;
334   }
335 
336   private byte memoizedIsInitialized = -1;
337 
338   @java.lang.Override
isInitialized()339   public final boolean isInitialized() {
340     byte isInitialized = memoizedIsInitialized;
341     if (isInitialized == 1) return true;
342     if (isInitialized == 0) return false;
343 
344     memoizedIsInitialized = 1;
345     return true;
346   }
347 
348   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)349   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
350     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
351       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
352     }
353     if (subject_ != null) {
354       output.writeMessage(2, getSubject());
355     }
356     for (int i = 0; i < messages_.size(); i++) {
357       output.writeMessage(3, messages_.get(i));
358     }
359     if (createTime_ != null) {
360       output.writeMessage(4, getCreateTime());
361     }
362     if (notificationType_
363         != com.google.cloud.advisorynotifications.v1.NotificationType.NOTIFICATION_TYPE_UNSPECIFIED
364             .getNumber()) {
365       output.writeEnum(12, notificationType_);
366     }
367     getUnknownFields().writeTo(output);
368   }
369 
370   @java.lang.Override
getSerializedSize()371   public int getSerializedSize() {
372     int size = memoizedSize;
373     if (size != -1) return size;
374 
375     size = 0;
376     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
377       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
378     }
379     if (subject_ != null) {
380       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSubject());
381     }
382     for (int i = 0; i < messages_.size(); i++) {
383       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, messages_.get(i));
384     }
385     if (createTime_ != null) {
386       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime());
387     }
388     if (notificationType_
389         != com.google.cloud.advisorynotifications.v1.NotificationType.NOTIFICATION_TYPE_UNSPECIFIED
390             .getNumber()) {
391       size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, notificationType_);
392     }
393     size += getUnknownFields().getSerializedSize();
394     memoizedSize = size;
395     return size;
396   }
397 
398   @java.lang.Override
equals(final java.lang.Object obj)399   public boolean equals(final java.lang.Object obj) {
400     if (obj == this) {
401       return true;
402     }
403     if (!(obj instanceof com.google.cloud.advisorynotifications.v1.Notification)) {
404       return super.equals(obj);
405     }
406     com.google.cloud.advisorynotifications.v1.Notification other =
407         (com.google.cloud.advisorynotifications.v1.Notification) obj;
408 
409     if (!getName().equals(other.getName())) return false;
410     if (hasSubject() != other.hasSubject()) return false;
411     if (hasSubject()) {
412       if (!getSubject().equals(other.getSubject())) return false;
413     }
414     if (!getMessagesList().equals(other.getMessagesList())) return false;
415     if (hasCreateTime() != other.hasCreateTime()) return false;
416     if (hasCreateTime()) {
417       if (!getCreateTime().equals(other.getCreateTime())) return false;
418     }
419     if (notificationType_ != other.notificationType_) return false;
420     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
421     return true;
422   }
423 
424   @java.lang.Override
hashCode()425   public int hashCode() {
426     if (memoizedHashCode != 0) {
427       return memoizedHashCode;
428     }
429     int hash = 41;
430     hash = (19 * hash) + getDescriptor().hashCode();
431     hash = (37 * hash) + NAME_FIELD_NUMBER;
432     hash = (53 * hash) + getName().hashCode();
433     if (hasSubject()) {
434       hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
435       hash = (53 * hash) + getSubject().hashCode();
436     }
437     if (getMessagesCount() > 0) {
438       hash = (37 * hash) + MESSAGES_FIELD_NUMBER;
439       hash = (53 * hash) + getMessagesList().hashCode();
440     }
441     if (hasCreateTime()) {
442       hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
443       hash = (53 * hash) + getCreateTime().hashCode();
444     }
445     hash = (37 * hash) + NOTIFICATION_TYPE_FIELD_NUMBER;
446     hash = (53 * hash) + notificationType_;
447     hash = (29 * hash) + getUnknownFields().hashCode();
448     memoizedHashCode = hash;
449     return hash;
450   }
451 
parseFrom( java.nio.ByteBuffer data)452   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
453       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
454     return PARSER.parseFrom(data);
455   }
456 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)457   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
458       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
459       throws com.google.protobuf.InvalidProtocolBufferException {
460     return PARSER.parseFrom(data, extensionRegistry);
461   }
462 
parseFrom( com.google.protobuf.ByteString data)463   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
464       com.google.protobuf.ByteString data)
465       throws com.google.protobuf.InvalidProtocolBufferException {
466     return PARSER.parseFrom(data);
467   }
468 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)469   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
470       com.google.protobuf.ByteString data,
471       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
472       throws com.google.protobuf.InvalidProtocolBufferException {
473     return PARSER.parseFrom(data, extensionRegistry);
474   }
475 
parseFrom(byte[] data)476   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(byte[] data)
477       throws com.google.protobuf.InvalidProtocolBufferException {
478     return PARSER.parseFrom(data);
479   }
480 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)481   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
482       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
483       throws com.google.protobuf.InvalidProtocolBufferException {
484     return PARSER.parseFrom(data, extensionRegistry);
485   }
486 
parseFrom( java.io.InputStream input)487   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
488       java.io.InputStream input) throws java.io.IOException {
489     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
490   }
491 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)492   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
493       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
494       throws java.io.IOException {
495     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
496         PARSER, input, extensionRegistry);
497   }
498 
parseDelimitedFrom( java.io.InputStream input)499   public static com.google.cloud.advisorynotifications.v1.Notification parseDelimitedFrom(
500       java.io.InputStream input) throws java.io.IOException {
501     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
502   }
503 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)504   public static com.google.cloud.advisorynotifications.v1.Notification parseDelimitedFrom(
505       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
506       throws java.io.IOException {
507     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
508         PARSER, input, extensionRegistry);
509   }
510 
parseFrom( com.google.protobuf.CodedInputStream input)511   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
512       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
513     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
514   }
515 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)516   public static com.google.cloud.advisorynotifications.v1.Notification parseFrom(
517       com.google.protobuf.CodedInputStream input,
518       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
519       throws java.io.IOException {
520     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
521         PARSER, input, extensionRegistry);
522   }
523 
524   @java.lang.Override
newBuilderForType()525   public Builder newBuilderForType() {
526     return newBuilder();
527   }
528 
newBuilder()529   public static Builder newBuilder() {
530     return DEFAULT_INSTANCE.toBuilder();
531   }
532 
newBuilder( com.google.cloud.advisorynotifications.v1.Notification prototype)533   public static Builder newBuilder(
534       com.google.cloud.advisorynotifications.v1.Notification prototype) {
535     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
536   }
537 
538   @java.lang.Override
toBuilder()539   public Builder toBuilder() {
540     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
541   }
542 
543   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)544   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
545     Builder builder = new Builder(parent);
546     return builder;
547   }
548   /**
549    *
550    *
551    * <pre>
552    * A notification object for notifying customers about security and privacy
553    * issues.
554    * </pre>
555    *
556    * Protobuf type {@code google.cloud.advisorynotifications.v1.Notification}
557    */
558   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
559       implements
560       // @@protoc_insertion_point(builder_implements:google.cloud.advisorynotifications.v1.Notification)
561       com.google.cloud.advisorynotifications.v1.NotificationOrBuilder {
getDescriptor()562     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
563       return com.google.cloud.advisorynotifications.v1.ServiceProto
564           .internal_static_google_cloud_advisorynotifications_v1_Notification_descriptor;
565     }
566 
567     @java.lang.Override
568     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()569         internalGetFieldAccessorTable() {
570       return com.google.cloud.advisorynotifications.v1.ServiceProto
571           .internal_static_google_cloud_advisorynotifications_v1_Notification_fieldAccessorTable
572           .ensureFieldAccessorsInitialized(
573               com.google.cloud.advisorynotifications.v1.Notification.class,
574               com.google.cloud.advisorynotifications.v1.Notification.Builder.class);
575     }
576 
577     // Construct using com.google.cloud.advisorynotifications.v1.Notification.newBuilder()
Builder()578     private Builder() {}
579 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)580     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
581       super(parent);
582     }
583 
584     @java.lang.Override
clear()585     public Builder clear() {
586       super.clear();
587       bitField0_ = 0;
588       name_ = "";
589       subject_ = null;
590       if (subjectBuilder_ != null) {
591         subjectBuilder_.dispose();
592         subjectBuilder_ = null;
593       }
594       if (messagesBuilder_ == null) {
595         messages_ = java.util.Collections.emptyList();
596       } else {
597         messages_ = null;
598         messagesBuilder_.clear();
599       }
600       bitField0_ = (bitField0_ & ~0x00000004);
601       createTime_ = null;
602       if (createTimeBuilder_ != null) {
603         createTimeBuilder_.dispose();
604         createTimeBuilder_ = null;
605       }
606       notificationType_ = 0;
607       return this;
608     }
609 
610     @java.lang.Override
getDescriptorForType()611     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
612       return com.google.cloud.advisorynotifications.v1.ServiceProto
613           .internal_static_google_cloud_advisorynotifications_v1_Notification_descriptor;
614     }
615 
616     @java.lang.Override
getDefaultInstanceForType()617     public com.google.cloud.advisorynotifications.v1.Notification getDefaultInstanceForType() {
618       return com.google.cloud.advisorynotifications.v1.Notification.getDefaultInstance();
619     }
620 
621     @java.lang.Override
build()622     public com.google.cloud.advisorynotifications.v1.Notification build() {
623       com.google.cloud.advisorynotifications.v1.Notification result = buildPartial();
624       if (!result.isInitialized()) {
625         throw newUninitializedMessageException(result);
626       }
627       return result;
628     }
629 
630     @java.lang.Override
buildPartial()631     public com.google.cloud.advisorynotifications.v1.Notification buildPartial() {
632       com.google.cloud.advisorynotifications.v1.Notification result =
633           new com.google.cloud.advisorynotifications.v1.Notification(this);
634       buildPartialRepeatedFields(result);
635       if (bitField0_ != 0) {
636         buildPartial0(result);
637       }
638       onBuilt();
639       return result;
640     }
641 
buildPartialRepeatedFields( com.google.cloud.advisorynotifications.v1.Notification result)642     private void buildPartialRepeatedFields(
643         com.google.cloud.advisorynotifications.v1.Notification result) {
644       if (messagesBuilder_ == null) {
645         if (((bitField0_ & 0x00000004) != 0)) {
646           messages_ = java.util.Collections.unmodifiableList(messages_);
647           bitField0_ = (bitField0_ & ~0x00000004);
648         }
649         result.messages_ = messages_;
650       } else {
651         result.messages_ = messagesBuilder_.build();
652       }
653     }
654 
buildPartial0(com.google.cloud.advisorynotifications.v1.Notification result)655     private void buildPartial0(com.google.cloud.advisorynotifications.v1.Notification result) {
656       int from_bitField0_ = bitField0_;
657       if (((from_bitField0_ & 0x00000001) != 0)) {
658         result.name_ = name_;
659       }
660       if (((from_bitField0_ & 0x00000002) != 0)) {
661         result.subject_ = subjectBuilder_ == null ? subject_ : subjectBuilder_.build();
662       }
663       if (((from_bitField0_ & 0x00000008) != 0)) {
664         result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
665       }
666       if (((from_bitField0_ & 0x00000010) != 0)) {
667         result.notificationType_ = notificationType_;
668       }
669     }
670 
671     @java.lang.Override
clone()672     public Builder clone() {
673       return super.clone();
674     }
675 
676     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)677     public Builder setField(
678         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
679       return super.setField(field, value);
680     }
681 
682     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)683     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
684       return super.clearField(field);
685     }
686 
687     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)688     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
689       return super.clearOneof(oneof);
690     }
691 
692     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)693     public Builder setRepeatedField(
694         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
695       return super.setRepeatedField(field, index, value);
696     }
697 
698     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)699     public Builder addRepeatedField(
700         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
701       return super.addRepeatedField(field, value);
702     }
703 
704     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)705     public Builder mergeFrom(com.google.protobuf.Message other) {
706       if (other instanceof com.google.cloud.advisorynotifications.v1.Notification) {
707         return mergeFrom((com.google.cloud.advisorynotifications.v1.Notification) other);
708       } else {
709         super.mergeFrom(other);
710         return this;
711       }
712     }
713 
mergeFrom(com.google.cloud.advisorynotifications.v1.Notification other)714     public Builder mergeFrom(com.google.cloud.advisorynotifications.v1.Notification other) {
715       if (other == com.google.cloud.advisorynotifications.v1.Notification.getDefaultInstance())
716         return this;
717       if (!other.getName().isEmpty()) {
718         name_ = other.name_;
719         bitField0_ |= 0x00000001;
720         onChanged();
721       }
722       if (other.hasSubject()) {
723         mergeSubject(other.getSubject());
724       }
725       if (messagesBuilder_ == null) {
726         if (!other.messages_.isEmpty()) {
727           if (messages_.isEmpty()) {
728             messages_ = other.messages_;
729             bitField0_ = (bitField0_ & ~0x00000004);
730           } else {
731             ensureMessagesIsMutable();
732             messages_.addAll(other.messages_);
733           }
734           onChanged();
735         }
736       } else {
737         if (!other.messages_.isEmpty()) {
738           if (messagesBuilder_.isEmpty()) {
739             messagesBuilder_.dispose();
740             messagesBuilder_ = null;
741             messages_ = other.messages_;
742             bitField0_ = (bitField0_ & ~0x00000004);
743             messagesBuilder_ =
744                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
745                     ? getMessagesFieldBuilder()
746                     : null;
747           } else {
748             messagesBuilder_.addAllMessages(other.messages_);
749           }
750         }
751       }
752       if (other.hasCreateTime()) {
753         mergeCreateTime(other.getCreateTime());
754       }
755       if (other.notificationType_ != 0) {
756         setNotificationTypeValue(other.getNotificationTypeValue());
757       }
758       this.mergeUnknownFields(other.getUnknownFields());
759       onChanged();
760       return this;
761     }
762 
763     @java.lang.Override
isInitialized()764     public final boolean isInitialized() {
765       return true;
766     }
767 
768     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)769     public Builder mergeFrom(
770         com.google.protobuf.CodedInputStream input,
771         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
772         throws java.io.IOException {
773       if (extensionRegistry == null) {
774         throw new java.lang.NullPointerException();
775       }
776       try {
777         boolean done = false;
778         while (!done) {
779           int tag = input.readTag();
780           switch (tag) {
781             case 0:
782               done = true;
783               break;
784             case 10:
785               {
786                 name_ = input.readStringRequireUtf8();
787                 bitField0_ |= 0x00000001;
788                 break;
789               } // case 10
790             case 18:
791               {
792                 input.readMessage(getSubjectFieldBuilder().getBuilder(), extensionRegistry);
793                 bitField0_ |= 0x00000002;
794                 break;
795               } // case 18
796             case 26:
797               {
798                 com.google.cloud.advisorynotifications.v1.Message m =
799                     input.readMessage(
800                         com.google.cloud.advisorynotifications.v1.Message.parser(),
801                         extensionRegistry);
802                 if (messagesBuilder_ == null) {
803                   ensureMessagesIsMutable();
804                   messages_.add(m);
805                 } else {
806                   messagesBuilder_.addMessage(m);
807                 }
808                 break;
809               } // case 26
810             case 34:
811               {
812                 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
813                 bitField0_ |= 0x00000008;
814                 break;
815               } // case 34
816             case 96:
817               {
818                 notificationType_ = input.readEnum();
819                 bitField0_ |= 0x00000010;
820                 break;
821               } // case 96
822             default:
823               {
824                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
825                   done = true; // was an endgroup tag
826                 }
827                 break;
828               } // default:
829           } // switch (tag)
830         } // while (!done)
831       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
832         throw e.unwrapIOException();
833       } finally {
834         onChanged();
835       } // finally
836       return this;
837     }
838 
839     private int bitField0_;
840 
841     private java.lang.Object name_ = "";
842     /**
843      *
844      *
845      * <pre>
846      * The resource name of the notification.
847      * Format:
848      * organizations/{organization}/locations/{location}/notifications/{notification}.
849      * </pre>
850      *
851      * <code>string name = 1;</code>
852      *
853      * @return The name.
854      */
getName()855     public java.lang.String getName() {
856       java.lang.Object ref = name_;
857       if (!(ref instanceof java.lang.String)) {
858         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
859         java.lang.String s = bs.toStringUtf8();
860         name_ = s;
861         return s;
862       } else {
863         return (java.lang.String) ref;
864       }
865     }
866     /**
867      *
868      *
869      * <pre>
870      * The resource name of the notification.
871      * Format:
872      * organizations/{organization}/locations/{location}/notifications/{notification}.
873      * </pre>
874      *
875      * <code>string name = 1;</code>
876      *
877      * @return The bytes for name.
878      */
getNameBytes()879     public com.google.protobuf.ByteString getNameBytes() {
880       java.lang.Object ref = name_;
881       if (ref instanceof String) {
882         com.google.protobuf.ByteString b =
883             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
884         name_ = b;
885         return b;
886       } else {
887         return (com.google.protobuf.ByteString) ref;
888       }
889     }
890     /**
891      *
892      *
893      * <pre>
894      * The resource name of the notification.
895      * Format:
896      * organizations/{organization}/locations/{location}/notifications/{notification}.
897      * </pre>
898      *
899      * <code>string name = 1;</code>
900      *
901      * @param value The name to set.
902      * @return This builder for chaining.
903      */
setName(java.lang.String value)904     public Builder setName(java.lang.String value) {
905       if (value == null) {
906         throw new NullPointerException();
907       }
908       name_ = value;
909       bitField0_ |= 0x00000001;
910       onChanged();
911       return this;
912     }
913     /**
914      *
915      *
916      * <pre>
917      * The resource name of the notification.
918      * Format:
919      * organizations/{organization}/locations/{location}/notifications/{notification}.
920      * </pre>
921      *
922      * <code>string name = 1;</code>
923      *
924      * @return This builder for chaining.
925      */
clearName()926     public Builder clearName() {
927       name_ = getDefaultInstance().getName();
928       bitField0_ = (bitField0_ & ~0x00000001);
929       onChanged();
930       return this;
931     }
932     /**
933      *
934      *
935      * <pre>
936      * The resource name of the notification.
937      * Format:
938      * organizations/{organization}/locations/{location}/notifications/{notification}.
939      * </pre>
940      *
941      * <code>string name = 1;</code>
942      *
943      * @param value The bytes for name to set.
944      * @return This builder for chaining.
945      */
setNameBytes(com.google.protobuf.ByteString value)946     public Builder setNameBytes(com.google.protobuf.ByteString value) {
947       if (value == null) {
948         throw new NullPointerException();
949       }
950       checkByteStringIsUtf8(value);
951       name_ = value;
952       bitField0_ |= 0x00000001;
953       onChanged();
954       return this;
955     }
956 
957     private com.google.cloud.advisorynotifications.v1.Subject subject_;
958     private com.google.protobuf.SingleFieldBuilderV3<
959             com.google.cloud.advisorynotifications.v1.Subject,
960             com.google.cloud.advisorynotifications.v1.Subject.Builder,
961             com.google.cloud.advisorynotifications.v1.SubjectOrBuilder>
962         subjectBuilder_;
963     /**
964      *
965      *
966      * <pre>
967      * The subject line of the notification.
968      * </pre>
969      *
970      * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
971      *
972      * @return Whether the subject field is set.
973      */
hasSubject()974     public boolean hasSubject() {
975       return ((bitField0_ & 0x00000002) != 0);
976     }
977     /**
978      *
979      *
980      * <pre>
981      * The subject line of the notification.
982      * </pre>
983      *
984      * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
985      *
986      * @return The subject.
987      */
getSubject()988     public com.google.cloud.advisorynotifications.v1.Subject getSubject() {
989       if (subjectBuilder_ == null) {
990         return subject_ == null
991             ? com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()
992             : subject_;
993       } else {
994         return subjectBuilder_.getMessage();
995       }
996     }
997     /**
998      *
999      *
1000      * <pre>
1001      * The subject line of the notification.
1002      * </pre>
1003      *
1004      * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
1005      */
setSubject(com.google.cloud.advisorynotifications.v1.Subject value)1006     public Builder setSubject(com.google.cloud.advisorynotifications.v1.Subject value) {
1007       if (subjectBuilder_ == null) {
1008         if (value == null) {
1009           throw new NullPointerException();
1010         }
1011         subject_ = value;
1012       } else {
1013         subjectBuilder_.setMessage(value);
1014       }
1015       bitField0_ |= 0x00000002;
1016       onChanged();
1017       return this;
1018     }
1019     /**
1020      *
1021      *
1022      * <pre>
1023      * The subject line of the notification.
1024      * </pre>
1025      *
1026      * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
1027      */
setSubject( com.google.cloud.advisorynotifications.v1.Subject.Builder builderForValue)1028     public Builder setSubject(
1029         com.google.cloud.advisorynotifications.v1.Subject.Builder builderForValue) {
1030       if (subjectBuilder_ == null) {
1031         subject_ = builderForValue.build();
1032       } else {
1033         subjectBuilder_.setMessage(builderForValue.build());
1034       }
1035       bitField0_ |= 0x00000002;
1036       onChanged();
1037       return this;
1038     }
1039     /**
1040      *
1041      *
1042      * <pre>
1043      * The subject line of the notification.
1044      * </pre>
1045      *
1046      * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
1047      */
mergeSubject(com.google.cloud.advisorynotifications.v1.Subject value)1048     public Builder mergeSubject(com.google.cloud.advisorynotifications.v1.Subject value) {
1049       if (subjectBuilder_ == null) {
1050         if (((bitField0_ & 0x00000002) != 0)
1051             && subject_ != null
1052             && subject_ != com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()) {
1053           getSubjectBuilder().mergeFrom(value);
1054         } else {
1055           subject_ = value;
1056         }
1057       } else {
1058         subjectBuilder_.mergeFrom(value);
1059       }
1060       bitField0_ |= 0x00000002;
1061       onChanged();
1062       return this;
1063     }
1064     /**
1065      *
1066      *
1067      * <pre>
1068      * The subject line of the notification.
1069      * </pre>
1070      *
1071      * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
1072      */
clearSubject()1073     public Builder clearSubject() {
1074       bitField0_ = (bitField0_ & ~0x00000002);
1075       subject_ = null;
1076       if (subjectBuilder_ != null) {
1077         subjectBuilder_.dispose();
1078         subjectBuilder_ = null;
1079       }
1080       onChanged();
1081       return this;
1082     }
1083     /**
1084      *
1085      *
1086      * <pre>
1087      * The subject line of the notification.
1088      * </pre>
1089      *
1090      * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
1091      */
getSubjectBuilder()1092     public com.google.cloud.advisorynotifications.v1.Subject.Builder getSubjectBuilder() {
1093       bitField0_ |= 0x00000002;
1094       onChanged();
1095       return getSubjectFieldBuilder().getBuilder();
1096     }
1097     /**
1098      *
1099      *
1100      * <pre>
1101      * The subject line of the notification.
1102      * </pre>
1103      *
1104      * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
1105      */
getSubjectOrBuilder()1106     public com.google.cloud.advisorynotifications.v1.SubjectOrBuilder getSubjectOrBuilder() {
1107       if (subjectBuilder_ != null) {
1108         return subjectBuilder_.getMessageOrBuilder();
1109       } else {
1110         return subject_ == null
1111             ? com.google.cloud.advisorynotifications.v1.Subject.getDefaultInstance()
1112             : subject_;
1113       }
1114     }
1115     /**
1116      *
1117      *
1118      * <pre>
1119      * The subject line of the notification.
1120      * </pre>
1121      *
1122      * <code>.google.cloud.advisorynotifications.v1.Subject subject = 2;</code>
1123      */
1124     private com.google.protobuf.SingleFieldBuilderV3<
1125             com.google.cloud.advisorynotifications.v1.Subject,
1126             com.google.cloud.advisorynotifications.v1.Subject.Builder,
1127             com.google.cloud.advisorynotifications.v1.SubjectOrBuilder>
getSubjectFieldBuilder()1128         getSubjectFieldBuilder() {
1129       if (subjectBuilder_ == null) {
1130         subjectBuilder_ =
1131             new com.google.protobuf.SingleFieldBuilderV3<
1132                 com.google.cloud.advisorynotifications.v1.Subject,
1133                 com.google.cloud.advisorynotifications.v1.Subject.Builder,
1134                 com.google.cloud.advisorynotifications.v1.SubjectOrBuilder>(
1135                 getSubject(), getParentForChildren(), isClean());
1136         subject_ = null;
1137       }
1138       return subjectBuilder_;
1139     }
1140 
1141     private java.util.List<com.google.cloud.advisorynotifications.v1.Message> messages_ =
1142         java.util.Collections.emptyList();
1143 
ensureMessagesIsMutable()1144     private void ensureMessagesIsMutable() {
1145       if (!((bitField0_ & 0x00000004) != 0)) {
1146         messages_ =
1147             new java.util.ArrayList<com.google.cloud.advisorynotifications.v1.Message>(messages_);
1148         bitField0_ |= 0x00000004;
1149       }
1150     }
1151 
1152     private com.google.protobuf.RepeatedFieldBuilderV3<
1153             com.google.cloud.advisorynotifications.v1.Message,
1154             com.google.cloud.advisorynotifications.v1.Message.Builder,
1155             com.google.cloud.advisorynotifications.v1.MessageOrBuilder>
1156         messagesBuilder_;
1157 
1158     /**
1159      *
1160      *
1161      * <pre>
1162      * A list of messages in the notification.
1163      * </pre>
1164      *
1165      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1166      */
getMessagesList()1167     public java.util.List<com.google.cloud.advisorynotifications.v1.Message> getMessagesList() {
1168       if (messagesBuilder_ == null) {
1169         return java.util.Collections.unmodifiableList(messages_);
1170       } else {
1171         return messagesBuilder_.getMessageList();
1172       }
1173     }
1174     /**
1175      *
1176      *
1177      * <pre>
1178      * A list of messages in the notification.
1179      * </pre>
1180      *
1181      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1182      */
getMessagesCount()1183     public int getMessagesCount() {
1184       if (messagesBuilder_ == null) {
1185         return messages_.size();
1186       } else {
1187         return messagesBuilder_.getCount();
1188       }
1189     }
1190     /**
1191      *
1192      *
1193      * <pre>
1194      * A list of messages in the notification.
1195      * </pre>
1196      *
1197      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1198      */
getMessages(int index)1199     public com.google.cloud.advisorynotifications.v1.Message getMessages(int index) {
1200       if (messagesBuilder_ == null) {
1201         return messages_.get(index);
1202       } else {
1203         return messagesBuilder_.getMessage(index);
1204       }
1205     }
1206     /**
1207      *
1208      *
1209      * <pre>
1210      * A list of messages in the notification.
1211      * </pre>
1212      *
1213      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1214      */
setMessages(int index, com.google.cloud.advisorynotifications.v1.Message value)1215     public Builder setMessages(int index, com.google.cloud.advisorynotifications.v1.Message value) {
1216       if (messagesBuilder_ == null) {
1217         if (value == null) {
1218           throw new NullPointerException();
1219         }
1220         ensureMessagesIsMutable();
1221         messages_.set(index, value);
1222         onChanged();
1223       } else {
1224         messagesBuilder_.setMessage(index, value);
1225       }
1226       return this;
1227     }
1228     /**
1229      *
1230      *
1231      * <pre>
1232      * A list of messages in the notification.
1233      * </pre>
1234      *
1235      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1236      */
setMessages( int index, com.google.cloud.advisorynotifications.v1.Message.Builder builderForValue)1237     public Builder setMessages(
1238         int index, com.google.cloud.advisorynotifications.v1.Message.Builder builderForValue) {
1239       if (messagesBuilder_ == null) {
1240         ensureMessagesIsMutable();
1241         messages_.set(index, builderForValue.build());
1242         onChanged();
1243       } else {
1244         messagesBuilder_.setMessage(index, builderForValue.build());
1245       }
1246       return this;
1247     }
1248     /**
1249      *
1250      *
1251      * <pre>
1252      * A list of messages in the notification.
1253      * </pre>
1254      *
1255      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1256      */
addMessages(com.google.cloud.advisorynotifications.v1.Message value)1257     public Builder addMessages(com.google.cloud.advisorynotifications.v1.Message value) {
1258       if (messagesBuilder_ == null) {
1259         if (value == null) {
1260           throw new NullPointerException();
1261         }
1262         ensureMessagesIsMutable();
1263         messages_.add(value);
1264         onChanged();
1265       } else {
1266         messagesBuilder_.addMessage(value);
1267       }
1268       return this;
1269     }
1270     /**
1271      *
1272      *
1273      * <pre>
1274      * A list of messages in the notification.
1275      * </pre>
1276      *
1277      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1278      */
addMessages(int index, com.google.cloud.advisorynotifications.v1.Message value)1279     public Builder addMessages(int index, com.google.cloud.advisorynotifications.v1.Message value) {
1280       if (messagesBuilder_ == null) {
1281         if (value == null) {
1282           throw new NullPointerException();
1283         }
1284         ensureMessagesIsMutable();
1285         messages_.add(index, value);
1286         onChanged();
1287       } else {
1288         messagesBuilder_.addMessage(index, value);
1289       }
1290       return this;
1291     }
1292     /**
1293      *
1294      *
1295      * <pre>
1296      * A list of messages in the notification.
1297      * </pre>
1298      *
1299      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1300      */
addMessages( com.google.cloud.advisorynotifications.v1.Message.Builder builderForValue)1301     public Builder addMessages(
1302         com.google.cloud.advisorynotifications.v1.Message.Builder builderForValue) {
1303       if (messagesBuilder_ == null) {
1304         ensureMessagesIsMutable();
1305         messages_.add(builderForValue.build());
1306         onChanged();
1307       } else {
1308         messagesBuilder_.addMessage(builderForValue.build());
1309       }
1310       return this;
1311     }
1312     /**
1313      *
1314      *
1315      * <pre>
1316      * A list of messages in the notification.
1317      * </pre>
1318      *
1319      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1320      */
addMessages( int index, com.google.cloud.advisorynotifications.v1.Message.Builder builderForValue)1321     public Builder addMessages(
1322         int index, com.google.cloud.advisorynotifications.v1.Message.Builder builderForValue) {
1323       if (messagesBuilder_ == null) {
1324         ensureMessagesIsMutable();
1325         messages_.add(index, builderForValue.build());
1326         onChanged();
1327       } else {
1328         messagesBuilder_.addMessage(index, builderForValue.build());
1329       }
1330       return this;
1331     }
1332     /**
1333      *
1334      *
1335      * <pre>
1336      * A list of messages in the notification.
1337      * </pre>
1338      *
1339      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1340      */
addAllMessages( java.lang.Iterable<? extends com.google.cloud.advisorynotifications.v1.Message> values)1341     public Builder addAllMessages(
1342         java.lang.Iterable<? extends com.google.cloud.advisorynotifications.v1.Message> values) {
1343       if (messagesBuilder_ == null) {
1344         ensureMessagesIsMutable();
1345         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messages_);
1346         onChanged();
1347       } else {
1348         messagesBuilder_.addAllMessages(values);
1349       }
1350       return this;
1351     }
1352     /**
1353      *
1354      *
1355      * <pre>
1356      * A list of messages in the notification.
1357      * </pre>
1358      *
1359      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1360      */
clearMessages()1361     public Builder clearMessages() {
1362       if (messagesBuilder_ == null) {
1363         messages_ = java.util.Collections.emptyList();
1364         bitField0_ = (bitField0_ & ~0x00000004);
1365         onChanged();
1366       } else {
1367         messagesBuilder_.clear();
1368       }
1369       return this;
1370     }
1371     /**
1372      *
1373      *
1374      * <pre>
1375      * A list of messages in the notification.
1376      * </pre>
1377      *
1378      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1379      */
removeMessages(int index)1380     public Builder removeMessages(int index) {
1381       if (messagesBuilder_ == null) {
1382         ensureMessagesIsMutable();
1383         messages_.remove(index);
1384         onChanged();
1385       } else {
1386         messagesBuilder_.remove(index);
1387       }
1388       return this;
1389     }
1390     /**
1391      *
1392      *
1393      * <pre>
1394      * A list of messages in the notification.
1395      * </pre>
1396      *
1397      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1398      */
getMessagesBuilder(int index)1399     public com.google.cloud.advisorynotifications.v1.Message.Builder getMessagesBuilder(int index) {
1400       return getMessagesFieldBuilder().getBuilder(index);
1401     }
1402     /**
1403      *
1404      *
1405      * <pre>
1406      * A list of messages in the notification.
1407      * </pre>
1408      *
1409      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1410      */
getMessagesOrBuilder( int index)1411     public com.google.cloud.advisorynotifications.v1.MessageOrBuilder getMessagesOrBuilder(
1412         int index) {
1413       if (messagesBuilder_ == null) {
1414         return messages_.get(index);
1415       } else {
1416         return messagesBuilder_.getMessageOrBuilder(index);
1417       }
1418     }
1419     /**
1420      *
1421      *
1422      * <pre>
1423      * A list of messages in the notification.
1424      * </pre>
1425      *
1426      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1427      */
1428     public java.util.List<? extends com.google.cloud.advisorynotifications.v1.MessageOrBuilder>
getMessagesOrBuilderList()1429         getMessagesOrBuilderList() {
1430       if (messagesBuilder_ != null) {
1431         return messagesBuilder_.getMessageOrBuilderList();
1432       } else {
1433         return java.util.Collections.unmodifiableList(messages_);
1434       }
1435     }
1436     /**
1437      *
1438      *
1439      * <pre>
1440      * A list of messages in the notification.
1441      * </pre>
1442      *
1443      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1444      */
addMessagesBuilder()1445     public com.google.cloud.advisorynotifications.v1.Message.Builder addMessagesBuilder() {
1446       return getMessagesFieldBuilder()
1447           .addBuilder(com.google.cloud.advisorynotifications.v1.Message.getDefaultInstance());
1448     }
1449     /**
1450      *
1451      *
1452      * <pre>
1453      * A list of messages in the notification.
1454      * </pre>
1455      *
1456      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1457      */
addMessagesBuilder(int index)1458     public com.google.cloud.advisorynotifications.v1.Message.Builder addMessagesBuilder(int index) {
1459       return getMessagesFieldBuilder()
1460           .addBuilder(
1461               index, com.google.cloud.advisorynotifications.v1.Message.getDefaultInstance());
1462     }
1463     /**
1464      *
1465      *
1466      * <pre>
1467      * A list of messages in the notification.
1468      * </pre>
1469      *
1470      * <code>repeated .google.cloud.advisorynotifications.v1.Message messages = 3;</code>
1471      */
1472     public java.util.List<com.google.cloud.advisorynotifications.v1.Message.Builder>
getMessagesBuilderList()1473         getMessagesBuilderList() {
1474       return getMessagesFieldBuilder().getBuilderList();
1475     }
1476 
1477     private com.google.protobuf.RepeatedFieldBuilderV3<
1478             com.google.cloud.advisorynotifications.v1.Message,
1479             com.google.cloud.advisorynotifications.v1.Message.Builder,
1480             com.google.cloud.advisorynotifications.v1.MessageOrBuilder>
getMessagesFieldBuilder()1481         getMessagesFieldBuilder() {
1482       if (messagesBuilder_ == null) {
1483         messagesBuilder_ =
1484             new com.google.protobuf.RepeatedFieldBuilderV3<
1485                 com.google.cloud.advisorynotifications.v1.Message,
1486                 com.google.cloud.advisorynotifications.v1.Message.Builder,
1487                 com.google.cloud.advisorynotifications.v1.MessageOrBuilder>(
1488                 messages_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
1489         messages_ = null;
1490       }
1491       return messagesBuilder_;
1492     }
1493 
1494     private com.google.protobuf.Timestamp createTime_;
1495     private com.google.protobuf.SingleFieldBuilderV3<
1496             com.google.protobuf.Timestamp,
1497             com.google.protobuf.Timestamp.Builder,
1498             com.google.protobuf.TimestampOrBuilder>
1499         createTimeBuilder_;
1500     /**
1501      *
1502      *
1503      * <pre>
1504      * Output only. Time the notification was created.
1505      * </pre>
1506      *
1507      * <code>
1508      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1509      * </code>
1510      *
1511      * @return Whether the createTime field is set.
1512      */
hasCreateTime()1513     public boolean hasCreateTime() {
1514       return ((bitField0_ & 0x00000008) != 0);
1515     }
1516     /**
1517      *
1518      *
1519      * <pre>
1520      * Output only. Time the notification was created.
1521      * </pre>
1522      *
1523      * <code>
1524      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1525      * </code>
1526      *
1527      * @return The createTime.
1528      */
getCreateTime()1529     public com.google.protobuf.Timestamp getCreateTime() {
1530       if (createTimeBuilder_ == null) {
1531         return createTime_ == null
1532             ? com.google.protobuf.Timestamp.getDefaultInstance()
1533             : createTime_;
1534       } else {
1535         return createTimeBuilder_.getMessage();
1536       }
1537     }
1538     /**
1539      *
1540      *
1541      * <pre>
1542      * Output only. Time the notification was created.
1543      * </pre>
1544      *
1545      * <code>
1546      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1547      * </code>
1548      */
setCreateTime(com.google.protobuf.Timestamp value)1549     public Builder setCreateTime(com.google.protobuf.Timestamp value) {
1550       if (createTimeBuilder_ == null) {
1551         if (value == null) {
1552           throw new NullPointerException();
1553         }
1554         createTime_ = value;
1555       } else {
1556         createTimeBuilder_.setMessage(value);
1557       }
1558       bitField0_ |= 0x00000008;
1559       onChanged();
1560       return this;
1561     }
1562     /**
1563      *
1564      *
1565      * <pre>
1566      * Output only. Time the notification was created.
1567      * </pre>
1568      *
1569      * <code>
1570      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1571      * </code>
1572      */
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)1573     public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
1574       if (createTimeBuilder_ == null) {
1575         createTime_ = builderForValue.build();
1576       } else {
1577         createTimeBuilder_.setMessage(builderForValue.build());
1578       }
1579       bitField0_ |= 0x00000008;
1580       onChanged();
1581       return this;
1582     }
1583     /**
1584      *
1585      *
1586      * <pre>
1587      * Output only. Time the notification was created.
1588      * </pre>
1589      *
1590      * <code>
1591      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1592      * </code>
1593      */
mergeCreateTime(com.google.protobuf.Timestamp value)1594     public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
1595       if (createTimeBuilder_ == null) {
1596         if (((bitField0_ & 0x00000008) != 0)
1597             && createTime_ != null
1598             && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
1599           getCreateTimeBuilder().mergeFrom(value);
1600         } else {
1601           createTime_ = value;
1602         }
1603       } else {
1604         createTimeBuilder_.mergeFrom(value);
1605       }
1606       bitField0_ |= 0x00000008;
1607       onChanged();
1608       return this;
1609     }
1610     /**
1611      *
1612      *
1613      * <pre>
1614      * Output only. Time the notification was created.
1615      * </pre>
1616      *
1617      * <code>
1618      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1619      * </code>
1620      */
clearCreateTime()1621     public Builder clearCreateTime() {
1622       bitField0_ = (bitField0_ & ~0x00000008);
1623       createTime_ = null;
1624       if (createTimeBuilder_ != null) {
1625         createTimeBuilder_.dispose();
1626         createTimeBuilder_ = null;
1627       }
1628       onChanged();
1629       return this;
1630     }
1631     /**
1632      *
1633      *
1634      * <pre>
1635      * Output only. Time the notification was created.
1636      * </pre>
1637      *
1638      * <code>
1639      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1640      * </code>
1641      */
getCreateTimeBuilder()1642     public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
1643       bitField0_ |= 0x00000008;
1644       onChanged();
1645       return getCreateTimeFieldBuilder().getBuilder();
1646     }
1647     /**
1648      *
1649      *
1650      * <pre>
1651      * Output only. Time the notification was created.
1652      * </pre>
1653      *
1654      * <code>
1655      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1656      * </code>
1657      */
getCreateTimeOrBuilder()1658     public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
1659       if (createTimeBuilder_ != null) {
1660         return createTimeBuilder_.getMessageOrBuilder();
1661       } else {
1662         return createTime_ == null
1663             ? com.google.protobuf.Timestamp.getDefaultInstance()
1664             : createTime_;
1665       }
1666     }
1667     /**
1668      *
1669      *
1670      * <pre>
1671      * Output only. Time the notification was created.
1672      * </pre>
1673      *
1674      * <code>
1675      * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1676      * </code>
1677      */
1678     private com.google.protobuf.SingleFieldBuilderV3<
1679             com.google.protobuf.Timestamp,
1680             com.google.protobuf.Timestamp.Builder,
1681             com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder()1682         getCreateTimeFieldBuilder() {
1683       if (createTimeBuilder_ == null) {
1684         createTimeBuilder_ =
1685             new com.google.protobuf.SingleFieldBuilderV3<
1686                 com.google.protobuf.Timestamp,
1687                 com.google.protobuf.Timestamp.Builder,
1688                 com.google.protobuf.TimestampOrBuilder>(
1689                 getCreateTime(), getParentForChildren(), isClean());
1690         createTime_ = null;
1691       }
1692       return createTimeBuilder_;
1693     }
1694 
1695     private int notificationType_ = 0;
1696     /**
1697      *
1698      *
1699      * <pre>
1700      * Type of notification
1701      * </pre>
1702      *
1703      * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
1704      *
1705      * @return The enum numeric value on the wire for notificationType.
1706      */
1707     @java.lang.Override
getNotificationTypeValue()1708     public int getNotificationTypeValue() {
1709       return notificationType_;
1710     }
1711     /**
1712      *
1713      *
1714      * <pre>
1715      * Type of notification
1716      * </pre>
1717      *
1718      * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
1719      *
1720      * @param value The enum numeric value on the wire for notificationType to set.
1721      * @return This builder for chaining.
1722      */
setNotificationTypeValue(int value)1723     public Builder setNotificationTypeValue(int value) {
1724       notificationType_ = value;
1725       bitField0_ |= 0x00000010;
1726       onChanged();
1727       return this;
1728     }
1729     /**
1730      *
1731      *
1732      * <pre>
1733      * Type of notification
1734      * </pre>
1735      *
1736      * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
1737      *
1738      * @return The notificationType.
1739      */
1740     @java.lang.Override
getNotificationType()1741     public com.google.cloud.advisorynotifications.v1.NotificationType getNotificationType() {
1742       com.google.cloud.advisorynotifications.v1.NotificationType result =
1743           com.google.cloud.advisorynotifications.v1.NotificationType.forNumber(notificationType_);
1744       return result == null
1745           ? com.google.cloud.advisorynotifications.v1.NotificationType.UNRECOGNIZED
1746           : result;
1747     }
1748     /**
1749      *
1750      *
1751      * <pre>
1752      * Type of notification
1753      * </pre>
1754      *
1755      * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
1756      *
1757      * @param value The notificationType to set.
1758      * @return This builder for chaining.
1759      */
setNotificationType( com.google.cloud.advisorynotifications.v1.NotificationType value)1760     public Builder setNotificationType(
1761         com.google.cloud.advisorynotifications.v1.NotificationType value) {
1762       if (value == null) {
1763         throw new NullPointerException();
1764       }
1765       bitField0_ |= 0x00000010;
1766       notificationType_ = value.getNumber();
1767       onChanged();
1768       return this;
1769     }
1770     /**
1771      *
1772      *
1773      * <pre>
1774      * Type of notification
1775      * </pre>
1776      *
1777      * <code>.google.cloud.advisorynotifications.v1.NotificationType notification_type = 12;</code>
1778      *
1779      * @return This builder for chaining.
1780      */
clearNotificationType()1781     public Builder clearNotificationType() {
1782       bitField0_ = (bitField0_ & ~0x00000010);
1783       notificationType_ = 0;
1784       onChanged();
1785       return this;
1786     }
1787 
1788     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1789     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1790       return super.setUnknownFields(unknownFields);
1791     }
1792 
1793     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1794     public final Builder mergeUnknownFields(
1795         final com.google.protobuf.UnknownFieldSet unknownFields) {
1796       return super.mergeUnknownFields(unknownFields);
1797     }
1798 
1799     // @@protoc_insertion_point(builder_scope:google.cloud.advisorynotifications.v1.Notification)
1800   }
1801 
1802   // @@protoc_insertion_point(class_scope:google.cloud.advisorynotifications.v1.Notification)
1803   private static final com.google.cloud.advisorynotifications.v1.Notification DEFAULT_INSTANCE;
1804 
1805   static {
1806     DEFAULT_INSTANCE = new com.google.cloud.advisorynotifications.v1.Notification();
1807   }
1808 
getDefaultInstance()1809   public static com.google.cloud.advisorynotifications.v1.Notification getDefaultInstance() {
1810     return DEFAULT_INSTANCE;
1811   }
1812 
1813   private static final com.google.protobuf.Parser<Notification> PARSER =
1814       new com.google.protobuf.AbstractParser<Notification>() {
1815         @java.lang.Override
1816         public Notification parsePartialFrom(
1817             com.google.protobuf.CodedInputStream input,
1818             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1819             throws com.google.protobuf.InvalidProtocolBufferException {
1820           Builder builder = newBuilder();
1821           try {
1822             builder.mergeFrom(input, extensionRegistry);
1823           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1824             throw e.setUnfinishedMessage(builder.buildPartial());
1825           } catch (com.google.protobuf.UninitializedMessageException e) {
1826             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1827           } catch (java.io.IOException e) {
1828             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1829                 .setUnfinishedMessage(builder.buildPartial());
1830           }
1831           return builder.buildPartial();
1832         }
1833       };
1834 
parser()1835   public static com.google.protobuf.Parser<Notification> parser() {
1836     return PARSER;
1837   }
1838 
1839   @java.lang.Override
getParserForType()1840   public com.google.protobuf.Parser<Notification> getParserForType() {
1841     return PARSER;
1842   }
1843 
1844   @java.lang.Override
getDefaultInstanceForType()1845   public com.google.cloud.advisorynotifications.v1.Notification getDefaultInstanceForType() {
1846     return DEFAULT_INSTANCE;
1847   }
1848 }
1849