• 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/monitoring/v3/notification.proto
18 
19 package com.google.monitoring.v3;
20 
21 /**
22  *
23  *
24  * <pre>
25  * A `NotificationChannel` is a medium through which an alert is
26  * delivered when a policy violation is detected. Examples of channels
27  * include email, SMS, and third-party messaging applications. Fields
28  * containing sensitive information like authentication tokens or
29  * contact info are only partially populated on retrieval.
30  * </pre>
31  *
32  * Protobuf type {@code google.monitoring.v3.NotificationChannel}
33  */
34 public final class NotificationChannel extends com.google.protobuf.GeneratedMessageV3
35     implements
36     // @@protoc_insertion_point(message_implements:google.monitoring.v3.NotificationChannel)
37     NotificationChannelOrBuilder {
38   private static final long serialVersionUID = 0L;
39   // Use NotificationChannel.newBuilder() to construct.
NotificationChannel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)40   private NotificationChannel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
41     super(builder);
42   }
43 
NotificationChannel()44   private NotificationChannel() {
45     type_ = "";
46     name_ = "";
47     displayName_ = "";
48     description_ = "";
49     verificationStatus_ = 0;
50     mutationRecords_ = java.util.Collections.emptyList();
51   }
52 
53   @java.lang.Override
54   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)55   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
56     return new NotificationChannel();
57   }
58 
59   @java.lang.Override
getUnknownFields()60   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
61     return this.unknownFields;
62   }
63 
getDescriptor()64   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
65     return com.google.monitoring.v3.NotificationProto
66         .internal_static_google_monitoring_v3_NotificationChannel_descriptor;
67   }
68 
69   @SuppressWarnings({"rawtypes"})
70   @java.lang.Override
internalGetMapField(int number)71   protected com.google.protobuf.MapField internalGetMapField(int number) {
72     switch (number) {
73       case 5:
74         return internalGetLabels();
75       case 8:
76         return internalGetUserLabels();
77       default:
78         throw new RuntimeException("Invalid map field number: " + number);
79     }
80   }
81 
82   @java.lang.Override
83   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()84       internalGetFieldAccessorTable() {
85     return com.google.monitoring.v3.NotificationProto
86         .internal_static_google_monitoring_v3_NotificationChannel_fieldAccessorTable
87         .ensureFieldAccessorsInitialized(
88             com.google.monitoring.v3.NotificationChannel.class,
89             com.google.monitoring.v3.NotificationChannel.Builder.class);
90   }
91 
92   /**
93    *
94    *
95    * <pre>
96    * Indicates whether the channel has been verified or not. It is illegal
97    * to specify this field in a
98    * [`CreateNotificationChannel`][google.monitoring.v3.NotificationChannelService.CreateNotificationChannel]
99    * or an
100    * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
101    * operation.
102    * </pre>
103    *
104    * Protobuf enum {@code google.monitoring.v3.NotificationChannel.VerificationStatus}
105    */
106   public enum VerificationStatus implements com.google.protobuf.ProtocolMessageEnum {
107     /**
108      *
109      *
110      * <pre>
111      * Sentinel value used to indicate that the state is unknown, omitted, or
112      * is not applicable (as in the case of channels that neither support
113      * nor require verification in order to function).
114      * </pre>
115      *
116      * <code>VERIFICATION_STATUS_UNSPECIFIED = 0;</code>
117      */
118     VERIFICATION_STATUS_UNSPECIFIED(0),
119     /**
120      *
121      *
122      * <pre>
123      * The channel has yet to be verified and requires verification to function.
124      * Note that this state also applies to the case where the verification
125      * process has been initiated by sending a verification code but where
126      * the verification code has not been submitted to complete the process.
127      * </pre>
128      *
129      * <code>UNVERIFIED = 1;</code>
130      */
131     UNVERIFIED(1),
132     /**
133      *
134      *
135      * <pre>
136      * It has been proven that notifications can be received on this
137      * notification channel and that someone on the project has access
138      * to messages that are delivered to that channel.
139      * </pre>
140      *
141      * <code>VERIFIED = 2;</code>
142      */
143     VERIFIED(2),
144     UNRECOGNIZED(-1),
145     ;
146 
147     /**
148      *
149      *
150      * <pre>
151      * Sentinel value used to indicate that the state is unknown, omitted, or
152      * is not applicable (as in the case of channels that neither support
153      * nor require verification in order to function).
154      * </pre>
155      *
156      * <code>VERIFICATION_STATUS_UNSPECIFIED = 0;</code>
157      */
158     public static final int VERIFICATION_STATUS_UNSPECIFIED_VALUE = 0;
159     /**
160      *
161      *
162      * <pre>
163      * The channel has yet to be verified and requires verification to function.
164      * Note that this state also applies to the case where the verification
165      * process has been initiated by sending a verification code but where
166      * the verification code has not been submitted to complete the process.
167      * </pre>
168      *
169      * <code>UNVERIFIED = 1;</code>
170      */
171     public static final int UNVERIFIED_VALUE = 1;
172     /**
173      *
174      *
175      * <pre>
176      * It has been proven that notifications can be received on this
177      * notification channel and that someone on the project has access
178      * to messages that are delivered to that channel.
179      * </pre>
180      *
181      * <code>VERIFIED = 2;</code>
182      */
183     public static final int VERIFIED_VALUE = 2;
184 
getNumber()185     public final int getNumber() {
186       if (this == UNRECOGNIZED) {
187         throw new java.lang.IllegalArgumentException(
188             "Can't get the number of an unknown enum value.");
189       }
190       return value;
191     }
192 
193     /**
194      * @param value The numeric wire value of the corresponding enum entry.
195      * @return The enum associated with the given numeric wire value.
196      * @deprecated Use {@link #forNumber(int)} instead.
197      */
198     @java.lang.Deprecated
valueOf(int value)199     public static VerificationStatus valueOf(int value) {
200       return forNumber(value);
201     }
202 
203     /**
204      * @param value The numeric wire value of the corresponding enum entry.
205      * @return The enum associated with the given numeric wire value.
206      */
forNumber(int value)207     public static VerificationStatus forNumber(int value) {
208       switch (value) {
209         case 0:
210           return VERIFICATION_STATUS_UNSPECIFIED;
211         case 1:
212           return UNVERIFIED;
213         case 2:
214           return VERIFIED;
215         default:
216           return null;
217       }
218     }
219 
220     public static com.google.protobuf.Internal.EnumLiteMap<VerificationStatus>
internalGetValueMap()221         internalGetValueMap() {
222       return internalValueMap;
223     }
224 
225     private static final com.google.protobuf.Internal.EnumLiteMap<VerificationStatus>
226         internalValueMap =
227             new com.google.protobuf.Internal.EnumLiteMap<VerificationStatus>() {
228               public VerificationStatus findValueByNumber(int number) {
229                 return VerificationStatus.forNumber(number);
230               }
231             };
232 
getValueDescriptor()233     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
234       if (this == UNRECOGNIZED) {
235         throw new java.lang.IllegalStateException(
236             "Can't get the descriptor of an unrecognized enum value.");
237       }
238       return getDescriptor().getValues().get(ordinal());
239     }
240 
getDescriptorForType()241     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
242       return getDescriptor();
243     }
244 
getDescriptor()245     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
246       return com.google.monitoring.v3.NotificationChannel.getDescriptor().getEnumTypes().get(0);
247     }
248 
249     private static final VerificationStatus[] VALUES = values();
250 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)251     public static VerificationStatus valueOf(
252         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
253       if (desc.getType() != getDescriptor()) {
254         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
255       }
256       if (desc.getIndex() == -1) {
257         return UNRECOGNIZED;
258       }
259       return VALUES[desc.getIndex()];
260     }
261 
262     private final int value;
263 
VerificationStatus(int value)264     private VerificationStatus(int value) {
265       this.value = value;
266     }
267 
268     // @@protoc_insertion_point(enum_scope:google.monitoring.v3.NotificationChannel.VerificationStatus)
269   }
270 
271   public static final int TYPE_FIELD_NUMBER = 1;
272 
273   @SuppressWarnings("serial")
274   private volatile java.lang.Object type_ = "";
275   /**
276    *
277    *
278    * <pre>
279    * The type of the notification channel. This field matches the
280    * value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field.
281    * </pre>
282    *
283    * <code>string type = 1;</code>
284    *
285    * @return The type.
286    */
287   @java.lang.Override
getType()288   public java.lang.String getType() {
289     java.lang.Object ref = type_;
290     if (ref instanceof java.lang.String) {
291       return (java.lang.String) ref;
292     } else {
293       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
294       java.lang.String s = bs.toStringUtf8();
295       type_ = s;
296       return s;
297     }
298   }
299   /**
300    *
301    *
302    * <pre>
303    * The type of the notification channel. This field matches the
304    * value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field.
305    * </pre>
306    *
307    * <code>string type = 1;</code>
308    *
309    * @return The bytes for type.
310    */
311   @java.lang.Override
getTypeBytes()312   public com.google.protobuf.ByteString getTypeBytes() {
313     java.lang.Object ref = type_;
314     if (ref instanceof java.lang.String) {
315       com.google.protobuf.ByteString b =
316           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
317       type_ = b;
318       return b;
319     } else {
320       return (com.google.protobuf.ByteString) ref;
321     }
322   }
323 
324   public static final int NAME_FIELD_NUMBER = 6;
325 
326   @SuppressWarnings("serial")
327   private volatile java.lang.Object name_ = "";
328   /**
329    *
330    *
331    * <pre>
332    * The full REST resource name for this channel. The format is:
333    *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
334    * The `[CHANNEL_ID]` is automatically assigned by the server on creation.
335    * </pre>
336    *
337    * <code>string name = 6;</code>
338    *
339    * @return The name.
340    */
341   @java.lang.Override
getName()342   public java.lang.String getName() {
343     java.lang.Object ref = name_;
344     if (ref instanceof java.lang.String) {
345       return (java.lang.String) ref;
346     } else {
347       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
348       java.lang.String s = bs.toStringUtf8();
349       name_ = s;
350       return s;
351     }
352   }
353   /**
354    *
355    *
356    * <pre>
357    * The full REST resource name for this channel. The format is:
358    *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
359    * The `[CHANNEL_ID]` is automatically assigned by the server on creation.
360    * </pre>
361    *
362    * <code>string name = 6;</code>
363    *
364    * @return The bytes for name.
365    */
366   @java.lang.Override
getNameBytes()367   public com.google.protobuf.ByteString getNameBytes() {
368     java.lang.Object ref = name_;
369     if (ref instanceof java.lang.String) {
370       com.google.protobuf.ByteString b =
371           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
372       name_ = b;
373       return b;
374     } else {
375       return (com.google.protobuf.ByteString) ref;
376     }
377   }
378 
379   public static final int DISPLAY_NAME_FIELD_NUMBER = 3;
380 
381   @SuppressWarnings("serial")
382   private volatile java.lang.Object displayName_ = "";
383   /**
384    *
385    *
386    * <pre>
387    * An optional human-readable name for this notification channel. It is
388    * recommended that you specify a non-empty and unique name in order to
389    * make it easier to identify the channels in your project, though this is
390    * not enforced. The display name is limited to 512 Unicode characters.
391    * </pre>
392    *
393    * <code>string display_name = 3;</code>
394    *
395    * @return The displayName.
396    */
397   @java.lang.Override
getDisplayName()398   public java.lang.String getDisplayName() {
399     java.lang.Object ref = displayName_;
400     if (ref instanceof java.lang.String) {
401       return (java.lang.String) ref;
402     } else {
403       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
404       java.lang.String s = bs.toStringUtf8();
405       displayName_ = s;
406       return s;
407     }
408   }
409   /**
410    *
411    *
412    * <pre>
413    * An optional human-readable name for this notification channel. It is
414    * recommended that you specify a non-empty and unique name in order to
415    * make it easier to identify the channels in your project, though this is
416    * not enforced. The display name is limited to 512 Unicode characters.
417    * </pre>
418    *
419    * <code>string display_name = 3;</code>
420    *
421    * @return The bytes for displayName.
422    */
423   @java.lang.Override
getDisplayNameBytes()424   public com.google.protobuf.ByteString getDisplayNameBytes() {
425     java.lang.Object ref = displayName_;
426     if (ref instanceof java.lang.String) {
427       com.google.protobuf.ByteString b =
428           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
429       displayName_ = b;
430       return b;
431     } else {
432       return (com.google.protobuf.ByteString) ref;
433     }
434   }
435 
436   public static final int DESCRIPTION_FIELD_NUMBER = 4;
437 
438   @SuppressWarnings("serial")
439   private volatile java.lang.Object description_ = "";
440   /**
441    *
442    *
443    * <pre>
444    * An optional human-readable description of this notification channel. This
445    * description may provide additional details, beyond the display
446    * name, for the channel. This may not exceed 1024 Unicode characters.
447    * </pre>
448    *
449    * <code>string description = 4;</code>
450    *
451    * @return The description.
452    */
453   @java.lang.Override
getDescription()454   public java.lang.String getDescription() {
455     java.lang.Object ref = description_;
456     if (ref instanceof java.lang.String) {
457       return (java.lang.String) ref;
458     } else {
459       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
460       java.lang.String s = bs.toStringUtf8();
461       description_ = s;
462       return s;
463     }
464   }
465   /**
466    *
467    *
468    * <pre>
469    * An optional human-readable description of this notification channel. This
470    * description may provide additional details, beyond the display
471    * name, for the channel. This may not exceed 1024 Unicode characters.
472    * </pre>
473    *
474    * <code>string description = 4;</code>
475    *
476    * @return The bytes for description.
477    */
478   @java.lang.Override
getDescriptionBytes()479   public com.google.protobuf.ByteString getDescriptionBytes() {
480     java.lang.Object ref = description_;
481     if (ref instanceof java.lang.String) {
482       com.google.protobuf.ByteString b =
483           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
484       description_ = b;
485       return b;
486     } else {
487       return (com.google.protobuf.ByteString) ref;
488     }
489   }
490 
491   public static final int LABELS_FIELD_NUMBER = 5;
492 
493   private static final class LabelsDefaultEntryHolder {
494     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
495         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
496             com.google.monitoring.v3.NotificationProto
497                 .internal_static_google_monitoring_v3_NotificationChannel_LabelsEntry_descriptor,
498             com.google.protobuf.WireFormat.FieldType.STRING,
499             "",
500             com.google.protobuf.WireFormat.FieldType.STRING,
501             "");
502   }
503 
504   @SuppressWarnings("serial")
505   private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;
506 
internalGetLabels()507   private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
508     if (labels_ == null) {
509       return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
510     }
511     return labels_;
512   }
513 
getLabelsCount()514   public int getLabelsCount() {
515     return internalGetLabels().getMap().size();
516   }
517   /**
518    *
519    *
520    * <pre>
521    * Configuration fields that define the channel and its behavior. The
522    * permissible and required labels are specified in the
523    * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
524    * `NotificationChannelDescriptor` corresponding to the `type` field.
525    * </pre>
526    *
527    * <code>map&lt;string, string&gt; labels = 5;</code>
528    */
529   @java.lang.Override
containsLabels(java.lang.String key)530   public boolean containsLabels(java.lang.String key) {
531     if (key == null) {
532       throw new NullPointerException("map key");
533     }
534     return internalGetLabels().getMap().containsKey(key);
535   }
536   /** Use {@link #getLabelsMap()} instead. */
537   @java.lang.Override
538   @java.lang.Deprecated
getLabels()539   public java.util.Map<java.lang.String, java.lang.String> getLabels() {
540     return getLabelsMap();
541   }
542   /**
543    *
544    *
545    * <pre>
546    * Configuration fields that define the channel and its behavior. The
547    * permissible and required labels are specified in the
548    * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
549    * `NotificationChannelDescriptor` corresponding to the `type` field.
550    * </pre>
551    *
552    * <code>map&lt;string, string&gt; labels = 5;</code>
553    */
554   @java.lang.Override
getLabelsMap()555   public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
556     return internalGetLabels().getMap();
557   }
558   /**
559    *
560    *
561    * <pre>
562    * Configuration fields that define the channel and its behavior. The
563    * permissible and required labels are specified in the
564    * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
565    * `NotificationChannelDescriptor` corresponding to the `type` field.
566    * </pre>
567    *
568    * <code>map&lt;string, string&gt; labels = 5;</code>
569    */
570   @java.lang.Override
getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)571   public /* nullable */ java.lang.String getLabelsOrDefault(
572       java.lang.String key,
573       /* nullable */
574       java.lang.String defaultValue) {
575     if (key == null) {
576       throw new NullPointerException("map key");
577     }
578     java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
579     return map.containsKey(key) ? map.get(key) : defaultValue;
580   }
581   /**
582    *
583    *
584    * <pre>
585    * Configuration fields that define the channel and its behavior. The
586    * permissible and required labels are specified in the
587    * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
588    * `NotificationChannelDescriptor` corresponding to the `type` field.
589    * </pre>
590    *
591    * <code>map&lt;string, string&gt; labels = 5;</code>
592    */
593   @java.lang.Override
getLabelsOrThrow(java.lang.String key)594   public java.lang.String getLabelsOrThrow(java.lang.String key) {
595     if (key == null) {
596       throw new NullPointerException("map key");
597     }
598     java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
599     if (!map.containsKey(key)) {
600       throw new java.lang.IllegalArgumentException();
601     }
602     return map.get(key);
603   }
604 
605   public static final int USER_LABELS_FIELD_NUMBER = 8;
606 
607   private static final class UserLabelsDefaultEntryHolder {
608     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
609         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
610             com.google.monitoring.v3.NotificationProto
611                 .internal_static_google_monitoring_v3_NotificationChannel_UserLabelsEntry_descriptor,
612             com.google.protobuf.WireFormat.FieldType.STRING,
613             "",
614             com.google.protobuf.WireFormat.FieldType.STRING,
615             "");
616   }
617 
618   @SuppressWarnings("serial")
619   private com.google.protobuf.MapField<java.lang.String, java.lang.String> userLabels_;
620 
internalGetUserLabels()621   private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetUserLabels() {
622     if (userLabels_ == null) {
623       return com.google.protobuf.MapField.emptyMapField(UserLabelsDefaultEntryHolder.defaultEntry);
624     }
625     return userLabels_;
626   }
627 
getUserLabelsCount()628   public int getUserLabelsCount() {
629     return internalGetUserLabels().getMap().size();
630   }
631   /**
632    *
633    *
634    * <pre>
635    * User-supplied key/value data that does not need to conform to
636    * the corresponding `NotificationChannelDescriptor`'s schema, unlike
637    * the `labels` field. This field is intended to be used for organizing
638    * and identifying the `NotificationChannel` objects.
639    * The field can contain up to 64 entries. Each key and value is limited to
640    * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
641    * values can contain only lowercase letters, numerals, underscores, and
642    * dashes. Keys must begin with a letter.
643    * </pre>
644    *
645    * <code>map&lt;string, string&gt; user_labels = 8;</code>
646    */
647   @java.lang.Override
containsUserLabels(java.lang.String key)648   public boolean containsUserLabels(java.lang.String key) {
649     if (key == null) {
650       throw new NullPointerException("map key");
651     }
652     return internalGetUserLabels().getMap().containsKey(key);
653   }
654   /** Use {@link #getUserLabelsMap()} instead. */
655   @java.lang.Override
656   @java.lang.Deprecated
getUserLabels()657   public java.util.Map<java.lang.String, java.lang.String> getUserLabels() {
658     return getUserLabelsMap();
659   }
660   /**
661    *
662    *
663    * <pre>
664    * User-supplied key/value data that does not need to conform to
665    * the corresponding `NotificationChannelDescriptor`'s schema, unlike
666    * the `labels` field. This field is intended to be used for organizing
667    * and identifying the `NotificationChannel` objects.
668    * The field can contain up to 64 entries. Each key and value is limited to
669    * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
670    * values can contain only lowercase letters, numerals, underscores, and
671    * dashes. Keys must begin with a letter.
672    * </pre>
673    *
674    * <code>map&lt;string, string&gt; user_labels = 8;</code>
675    */
676   @java.lang.Override
getUserLabelsMap()677   public java.util.Map<java.lang.String, java.lang.String> getUserLabelsMap() {
678     return internalGetUserLabels().getMap();
679   }
680   /**
681    *
682    *
683    * <pre>
684    * User-supplied key/value data that does not need to conform to
685    * the corresponding `NotificationChannelDescriptor`'s schema, unlike
686    * the `labels` field. This field is intended to be used for organizing
687    * and identifying the `NotificationChannel` objects.
688    * The field can contain up to 64 entries. Each key and value is limited to
689    * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
690    * values can contain only lowercase letters, numerals, underscores, and
691    * dashes. Keys must begin with a letter.
692    * </pre>
693    *
694    * <code>map&lt;string, string&gt; user_labels = 8;</code>
695    */
696   @java.lang.Override
getUserLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)697   public /* nullable */ java.lang.String getUserLabelsOrDefault(
698       java.lang.String key,
699       /* nullable */
700       java.lang.String defaultValue) {
701     if (key == null) {
702       throw new NullPointerException("map key");
703     }
704     java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
705     return map.containsKey(key) ? map.get(key) : defaultValue;
706   }
707   /**
708    *
709    *
710    * <pre>
711    * User-supplied key/value data that does not need to conform to
712    * the corresponding `NotificationChannelDescriptor`'s schema, unlike
713    * the `labels` field. This field is intended to be used for organizing
714    * and identifying the `NotificationChannel` objects.
715    * The field can contain up to 64 entries. Each key and value is limited to
716    * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
717    * values can contain only lowercase letters, numerals, underscores, and
718    * dashes. Keys must begin with a letter.
719    * </pre>
720    *
721    * <code>map&lt;string, string&gt; user_labels = 8;</code>
722    */
723   @java.lang.Override
getUserLabelsOrThrow(java.lang.String key)724   public java.lang.String getUserLabelsOrThrow(java.lang.String key) {
725     if (key == null) {
726       throw new NullPointerException("map key");
727     }
728     java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
729     if (!map.containsKey(key)) {
730       throw new java.lang.IllegalArgumentException();
731     }
732     return map.get(key);
733   }
734 
735   public static final int VERIFICATION_STATUS_FIELD_NUMBER = 9;
736   private int verificationStatus_ = 0;
737   /**
738    *
739    *
740    * <pre>
741    * Indicates whether this channel has been verified or not. On a
742    * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
743    * or
744    * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
745    * operation, this field is expected to be populated.
746    * If the value is `UNVERIFIED`, then it indicates that the channel is
747    * non-functioning (it both requires verification and lacks verification);
748    * otherwise, it is assumed that the channel works.
749    * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
750    * the channel is of a type that does not require verification or that
751    * this specific channel has been exempted from verification because it was
752    * created prior to verification being required for channels of this type.
753    * This field cannot be modified using a standard
754    * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
755    * operation. To change the value of this field, you must call
756    * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
757    * </pre>
758    *
759    * <code>.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;
760    * </code>
761    *
762    * @return The enum numeric value on the wire for verificationStatus.
763    */
764   @java.lang.Override
getVerificationStatusValue()765   public int getVerificationStatusValue() {
766     return verificationStatus_;
767   }
768   /**
769    *
770    *
771    * <pre>
772    * Indicates whether this channel has been verified or not. On a
773    * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
774    * or
775    * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
776    * operation, this field is expected to be populated.
777    * If the value is `UNVERIFIED`, then it indicates that the channel is
778    * non-functioning (it both requires verification and lacks verification);
779    * otherwise, it is assumed that the channel works.
780    * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
781    * the channel is of a type that does not require verification or that
782    * this specific channel has been exempted from verification because it was
783    * created prior to verification being required for channels of this type.
784    * This field cannot be modified using a standard
785    * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
786    * operation. To change the value of this field, you must call
787    * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
788    * </pre>
789    *
790    * <code>.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;
791    * </code>
792    *
793    * @return The verificationStatus.
794    */
795   @java.lang.Override
getVerificationStatus()796   public com.google.monitoring.v3.NotificationChannel.VerificationStatus getVerificationStatus() {
797     com.google.monitoring.v3.NotificationChannel.VerificationStatus result =
798         com.google.monitoring.v3.NotificationChannel.VerificationStatus.forNumber(
799             verificationStatus_);
800     return result == null
801         ? com.google.monitoring.v3.NotificationChannel.VerificationStatus.UNRECOGNIZED
802         : result;
803   }
804 
805   public static final int ENABLED_FIELD_NUMBER = 11;
806   private com.google.protobuf.BoolValue enabled_;
807   /**
808    *
809    *
810    * <pre>
811    * Whether notifications are forwarded to the described channel. This makes
812    * it possible to disable delivery of notifications to a particular channel
813    * without removing the channel from all alerting policies that reference
814    * the channel. This is a more convenient approach when the change is
815    * temporary and you want to receive notifications from the same set
816    * of alerting policies on the channel at some point in the future.
817    * </pre>
818    *
819    * <code>.google.protobuf.BoolValue enabled = 11;</code>
820    *
821    * @return Whether the enabled field is set.
822    */
823   @java.lang.Override
hasEnabled()824   public boolean hasEnabled() {
825     return enabled_ != null;
826   }
827   /**
828    *
829    *
830    * <pre>
831    * Whether notifications are forwarded to the described channel. This makes
832    * it possible to disable delivery of notifications to a particular channel
833    * without removing the channel from all alerting policies that reference
834    * the channel. This is a more convenient approach when the change is
835    * temporary and you want to receive notifications from the same set
836    * of alerting policies on the channel at some point in the future.
837    * </pre>
838    *
839    * <code>.google.protobuf.BoolValue enabled = 11;</code>
840    *
841    * @return The enabled.
842    */
843   @java.lang.Override
getEnabled()844   public com.google.protobuf.BoolValue getEnabled() {
845     return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
846   }
847   /**
848    *
849    *
850    * <pre>
851    * Whether notifications are forwarded to the described channel. This makes
852    * it possible to disable delivery of notifications to a particular channel
853    * without removing the channel from all alerting policies that reference
854    * the channel. This is a more convenient approach when the change is
855    * temporary and you want to receive notifications from the same set
856    * of alerting policies on the channel at some point in the future.
857    * </pre>
858    *
859    * <code>.google.protobuf.BoolValue enabled = 11;</code>
860    */
861   @java.lang.Override
getEnabledOrBuilder()862   public com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder() {
863     return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
864   }
865 
866   public static final int CREATION_RECORD_FIELD_NUMBER = 12;
867   private com.google.monitoring.v3.MutationRecord creationRecord_;
868   /**
869    *
870    *
871    * <pre>
872    * Record of the creation of this channel.
873    * </pre>
874    *
875    * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
876    *
877    * @return Whether the creationRecord field is set.
878    */
879   @java.lang.Override
hasCreationRecord()880   public boolean hasCreationRecord() {
881     return creationRecord_ != null;
882   }
883   /**
884    *
885    *
886    * <pre>
887    * Record of the creation of this channel.
888    * </pre>
889    *
890    * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
891    *
892    * @return The creationRecord.
893    */
894   @java.lang.Override
getCreationRecord()895   public com.google.monitoring.v3.MutationRecord getCreationRecord() {
896     return creationRecord_ == null
897         ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
898         : creationRecord_;
899   }
900   /**
901    *
902    *
903    * <pre>
904    * Record of the creation of this channel.
905    * </pre>
906    *
907    * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
908    */
909   @java.lang.Override
getCreationRecordOrBuilder()910   public com.google.monitoring.v3.MutationRecordOrBuilder getCreationRecordOrBuilder() {
911     return creationRecord_ == null
912         ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
913         : creationRecord_;
914   }
915 
916   public static final int MUTATION_RECORDS_FIELD_NUMBER = 13;
917 
918   @SuppressWarnings("serial")
919   private java.util.List<com.google.monitoring.v3.MutationRecord> mutationRecords_;
920   /**
921    *
922    *
923    * <pre>
924    * Records of the modification of this channel.
925    * </pre>
926    *
927    * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
928    */
929   @java.lang.Override
getMutationRecordsList()930   public java.util.List<com.google.monitoring.v3.MutationRecord> getMutationRecordsList() {
931     return mutationRecords_;
932   }
933   /**
934    *
935    *
936    * <pre>
937    * Records of the modification of this channel.
938    * </pre>
939    *
940    * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
941    */
942   @java.lang.Override
943   public java.util.List<? extends com.google.monitoring.v3.MutationRecordOrBuilder>
getMutationRecordsOrBuilderList()944       getMutationRecordsOrBuilderList() {
945     return mutationRecords_;
946   }
947   /**
948    *
949    *
950    * <pre>
951    * Records of the modification of this channel.
952    * </pre>
953    *
954    * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
955    */
956   @java.lang.Override
getMutationRecordsCount()957   public int getMutationRecordsCount() {
958     return mutationRecords_.size();
959   }
960   /**
961    *
962    *
963    * <pre>
964    * Records of the modification of this channel.
965    * </pre>
966    *
967    * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
968    */
969   @java.lang.Override
getMutationRecords(int index)970   public com.google.monitoring.v3.MutationRecord getMutationRecords(int index) {
971     return mutationRecords_.get(index);
972   }
973   /**
974    *
975    *
976    * <pre>
977    * Records of the modification of this channel.
978    * </pre>
979    *
980    * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
981    */
982   @java.lang.Override
getMutationRecordsOrBuilder(int index)983   public com.google.monitoring.v3.MutationRecordOrBuilder getMutationRecordsOrBuilder(int index) {
984     return mutationRecords_.get(index);
985   }
986 
987   private byte memoizedIsInitialized = -1;
988 
989   @java.lang.Override
isInitialized()990   public final boolean isInitialized() {
991     byte isInitialized = memoizedIsInitialized;
992     if (isInitialized == 1) return true;
993     if (isInitialized == 0) return false;
994 
995     memoizedIsInitialized = 1;
996     return true;
997   }
998 
999   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1000   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1001     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
1002       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
1003     }
1004     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
1005       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_);
1006     }
1007     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
1008       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_);
1009     }
1010     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
1011         output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5);
1012     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
1013       com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_);
1014     }
1015     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
1016         output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 8);
1017     if (verificationStatus_
1018         != com.google.monitoring.v3.NotificationChannel.VerificationStatus
1019             .VERIFICATION_STATUS_UNSPECIFIED
1020             .getNumber()) {
1021       output.writeEnum(9, verificationStatus_);
1022     }
1023     if (enabled_ != null) {
1024       output.writeMessage(11, getEnabled());
1025     }
1026     if (creationRecord_ != null) {
1027       output.writeMessage(12, getCreationRecord());
1028     }
1029     for (int i = 0; i < mutationRecords_.size(); i++) {
1030       output.writeMessage(13, mutationRecords_.get(i));
1031     }
1032     getUnknownFields().writeTo(output);
1033   }
1034 
1035   @java.lang.Override
getSerializedSize()1036   public int getSerializedSize() {
1037     int size = memoizedSize;
1038     if (size != -1) return size;
1039 
1040     size = 0;
1041     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
1042       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
1043     }
1044     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
1045       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_);
1046     }
1047     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
1048       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_);
1049     }
1050     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
1051         internalGetLabels().getMap().entrySet()) {
1052       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
1053           LabelsDefaultEntryHolder.defaultEntry
1054               .newBuilderForType()
1055               .setKey(entry.getKey())
1056               .setValue(entry.getValue())
1057               .build();
1058       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, labels__);
1059     }
1060     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
1061       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_);
1062     }
1063     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
1064         internalGetUserLabels().getMap().entrySet()) {
1065       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> userLabels__ =
1066           UserLabelsDefaultEntryHolder.defaultEntry
1067               .newBuilderForType()
1068               .setKey(entry.getKey())
1069               .setValue(entry.getValue())
1070               .build();
1071       size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, userLabels__);
1072     }
1073     if (verificationStatus_
1074         != com.google.monitoring.v3.NotificationChannel.VerificationStatus
1075             .VERIFICATION_STATUS_UNSPECIFIED
1076             .getNumber()) {
1077       size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, verificationStatus_);
1078     }
1079     if (enabled_ != null) {
1080       size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getEnabled());
1081     }
1082     if (creationRecord_ != null) {
1083       size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCreationRecord());
1084     }
1085     for (int i = 0; i < mutationRecords_.size(); i++) {
1086       size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, mutationRecords_.get(i));
1087     }
1088     size += getUnknownFields().getSerializedSize();
1089     memoizedSize = size;
1090     return size;
1091   }
1092 
1093   @java.lang.Override
equals(final java.lang.Object obj)1094   public boolean equals(final java.lang.Object obj) {
1095     if (obj == this) {
1096       return true;
1097     }
1098     if (!(obj instanceof com.google.monitoring.v3.NotificationChannel)) {
1099       return super.equals(obj);
1100     }
1101     com.google.monitoring.v3.NotificationChannel other =
1102         (com.google.monitoring.v3.NotificationChannel) obj;
1103 
1104     if (!getType().equals(other.getType())) return false;
1105     if (!getName().equals(other.getName())) return false;
1106     if (!getDisplayName().equals(other.getDisplayName())) return false;
1107     if (!getDescription().equals(other.getDescription())) return false;
1108     if (!internalGetLabels().equals(other.internalGetLabels())) return false;
1109     if (!internalGetUserLabels().equals(other.internalGetUserLabels())) return false;
1110     if (verificationStatus_ != other.verificationStatus_) return false;
1111     if (hasEnabled() != other.hasEnabled()) return false;
1112     if (hasEnabled()) {
1113       if (!getEnabled().equals(other.getEnabled())) return false;
1114     }
1115     if (hasCreationRecord() != other.hasCreationRecord()) return false;
1116     if (hasCreationRecord()) {
1117       if (!getCreationRecord().equals(other.getCreationRecord())) return false;
1118     }
1119     if (!getMutationRecordsList().equals(other.getMutationRecordsList())) return false;
1120     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1121     return true;
1122   }
1123 
1124   @java.lang.Override
hashCode()1125   public int hashCode() {
1126     if (memoizedHashCode != 0) {
1127       return memoizedHashCode;
1128     }
1129     int hash = 41;
1130     hash = (19 * hash) + getDescriptor().hashCode();
1131     hash = (37 * hash) + TYPE_FIELD_NUMBER;
1132     hash = (53 * hash) + getType().hashCode();
1133     hash = (37 * hash) + NAME_FIELD_NUMBER;
1134     hash = (53 * hash) + getName().hashCode();
1135     hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
1136     hash = (53 * hash) + getDisplayName().hashCode();
1137     hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
1138     hash = (53 * hash) + getDescription().hashCode();
1139     if (!internalGetLabels().getMap().isEmpty()) {
1140       hash = (37 * hash) + LABELS_FIELD_NUMBER;
1141       hash = (53 * hash) + internalGetLabels().hashCode();
1142     }
1143     if (!internalGetUserLabels().getMap().isEmpty()) {
1144       hash = (37 * hash) + USER_LABELS_FIELD_NUMBER;
1145       hash = (53 * hash) + internalGetUserLabels().hashCode();
1146     }
1147     hash = (37 * hash) + VERIFICATION_STATUS_FIELD_NUMBER;
1148     hash = (53 * hash) + verificationStatus_;
1149     if (hasEnabled()) {
1150       hash = (37 * hash) + ENABLED_FIELD_NUMBER;
1151       hash = (53 * hash) + getEnabled().hashCode();
1152     }
1153     if (hasCreationRecord()) {
1154       hash = (37 * hash) + CREATION_RECORD_FIELD_NUMBER;
1155       hash = (53 * hash) + getCreationRecord().hashCode();
1156     }
1157     if (getMutationRecordsCount() > 0) {
1158       hash = (37 * hash) + MUTATION_RECORDS_FIELD_NUMBER;
1159       hash = (53 * hash) + getMutationRecordsList().hashCode();
1160     }
1161     hash = (29 * hash) + getUnknownFields().hashCode();
1162     memoizedHashCode = hash;
1163     return hash;
1164   }
1165 
parseFrom(java.nio.ByteBuffer data)1166   public static com.google.monitoring.v3.NotificationChannel parseFrom(java.nio.ByteBuffer data)
1167       throws com.google.protobuf.InvalidProtocolBufferException {
1168     return PARSER.parseFrom(data);
1169   }
1170 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1171   public static com.google.monitoring.v3.NotificationChannel parseFrom(
1172       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1173       throws com.google.protobuf.InvalidProtocolBufferException {
1174     return PARSER.parseFrom(data, extensionRegistry);
1175   }
1176 
parseFrom( com.google.protobuf.ByteString data)1177   public static com.google.monitoring.v3.NotificationChannel parseFrom(
1178       com.google.protobuf.ByteString data)
1179       throws com.google.protobuf.InvalidProtocolBufferException {
1180     return PARSER.parseFrom(data);
1181   }
1182 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1183   public static com.google.monitoring.v3.NotificationChannel parseFrom(
1184       com.google.protobuf.ByteString data,
1185       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1186       throws com.google.protobuf.InvalidProtocolBufferException {
1187     return PARSER.parseFrom(data, extensionRegistry);
1188   }
1189 
parseFrom(byte[] data)1190   public static com.google.monitoring.v3.NotificationChannel parseFrom(byte[] data)
1191       throws com.google.protobuf.InvalidProtocolBufferException {
1192     return PARSER.parseFrom(data);
1193   }
1194 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1195   public static com.google.monitoring.v3.NotificationChannel parseFrom(
1196       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1197       throws com.google.protobuf.InvalidProtocolBufferException {
1198     return PARSER.parseFrom(data, extensionRegistry);
1199   }
1200 
parseFrom(java.io.InputStream input)1201   public static com.google.monitoring.v3.NotificationChannel parseFrom(java.io.InputStream input)
1202       throws java.io.IOException {
1203     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1204   }
1205 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1206   public static com.google.monitoring.v3.NotificationChannel parseFrom(
1207       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1208       throws java.io.IOException {
1209     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1210         PARSER, input, extensionRegistry);
1211   }
1212 
parseDelimitedFrom( java.io.InputStream input)1213   public static com.google.monitoring.v3.NotificationChannel parseDelimitedFrom(
1214       java.io.InputStream input) throws java.io.IOException {
1215     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1216   }
1217 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1218   public static com.google.monitoring.v3.NotificationChannel parseDelimitedFrom(
1219       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1220       throws java.io.IOException {
1221     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1222         PARSER, input, extensionRegistry);
1223   }
1224 
parseFrom( com.google.protobuf.CodedInputStream input)1225   public static com.google.monitoring.v3.NotificationChannel parseFrom(
1226       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1227     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1228   }
1229 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1230   public static com.google.monitoring.v3.NotificationChannel parseFrom(
1231       com.google.protobuf.CodedInputStream input,
1232       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1233       throws java.io.IOException {
1234     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1235         PARSER, input, extensionRegistry);
1236   }
1237 
1238   @java.lang.Override
newBuilderForType()1239   public Builder newBuilderForType() {
1240     return newBuilder();
1241   }
1242 
newBuilder()1243   public static Builder newBuilder() {
1244     return DEFAULT_INSTANCE.toBuilder();
1245   }
1246 
newBuilder(com.google.monitoring.v3.NotificationChannel prototype)1247   public static Builder newBuilder(com.google.monitoring.v3.NotificationChannel prototype) {
1248     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1249   }
1250 
1251   @java.lang.Override
toBuilder()1252   public Builder toBuilder() {
1253     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1254   }
1255 
1256   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1257   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1258     Builder builder = new Builder(parent);
1259     return builder;
1260   }
1261   /**
1262    *
1263    *
1264    * <pre>
1265    * A `NotificationChannel` is a medium through which an alert is
1266    * delivered when a policy violation is detected. Examples of channels
1267    * include email, SMS, and third-party messaging applications. Fields
1268    * containing sensitive information like authentication tokens or
1269    * contact info are only partially populated on retrieval.
1270    * </pre>
1271    *
1272    * Protobuf type {@code google.monitoring.v3.NotificationChannel}
1273    */
1274   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1275       implements
1276       // @@protoc_insertion_point(builder_implements:google.monitoring.v3.NotificationChannel)
1277       com.google.monitoring.v3.NotificationChannelOrBuilder {
getDescriptor()1278     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1279       return com.google.monitoring.v3.NotificationProto
1280           .internal_static_google_monitoring_v3_NotificationChannel_descriptor;
1281     }
1282 
1283     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)1284     protected com.google.protobuf.MapField internalGetMapField(int number) {
1285       switch (number) {
1286         case 5:
1287           return internalGetLabels();
1288         case 8:
1289           return internalGetUserLabels();
1290         default:
1291           throw new RuntimeException("Invalid map field number: " + number);
1292       }
1293     }
1294 
1295     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)1296     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
1297       switch (number) {
1298         case 5:
1299           return internalGetMutableLabels();
1300         case 8:
1301           return internalGetMutableUserLabels();
1302         default:
1303           throw new RuntimeException("Invalid map field number: " + number);
1304       }
1305     }
1306 
1307     @java.lang.Override
1308     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1309         internalGetFieldAccessorTable() {
1310       return com.google.monitoring.v3.NotificationProto
1311           .internal_static_google_monitoring_v3_NotificationChannel_fieldAccessorTable
1312           .ensureFieldAccessorsInitialized(
1313               com.google.monitoring.v3.NotificationChannel.class,
1314               com.google.monitoring.v3.NotificationChannel.Builder.class);
1315     }
1316 
1317     // Construct using com.google.monitoring.v3.NotificationChannel.newBuilder()
Builder()1318     private Builder() {}
1319 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1320     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1321       super(parent);
1322     }
1323 
1324     @java.lang.Override
clear()1325     public Builder clear() {
1326       super.clear();
1327       bitField0_ = 0;
1328       type_ = "";
1329       name_ = "";
1330       displayName_ = "";
1331       description_ = "";
1332       internalGetMutableLabels().clear();
1333       internalGetMutableUserLabels().clear();
1334       verificationStatus_ = 0;
1335       enabled_ = null;
1336       if (enabledBuilder_ != null) {
1337         enabledBuilder_.dispose();
1338         enabledBuilder_ = null;
1339       }
1340       creationRecord_ = null;
1341       if (creationRecordBuilder_ != null) {
1342         creationRecordBuilder_.dispose();
1343         creationRecordBuilder_ = null;
1344       }
1345       if (mutationRecordsBuilder_ == null) {
1346         mutationRecords_ = java.util.Collections.emptyList();
1347       } else {
1348         mutationRecords_ = null;
1349         mutationRecordsBuilder_.clear();
1350       }
1351       bitField0_ = (bitField0_ & ~0x00000200);
1352       return this;
1353     }
1354 
1355     @java.lang.Override
getDescriptorForType()1356     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1357       return com.google.monitoring.v3.NotificationProto
1358           .internal_static_google_monitoring_v3_NotificationChannel_descriptor;
1359     }
1360 
1361     @java.lang.Override
getDefaultInstanceForType()1362     public com.google.monitoring.v3.NotificationChannel getDefaultInstanceForType() {
1363       return com.google.monitoring.v3.NotificationChannel.getDefaultInstance();
1364     }
1365 
1366     @java.lang.Override
build()1367     public com.google.monitoring.v3.NotificationChannel build() {
1368       com.google.monitoring.v3.NotificationChannel result = buildPartial();
1369       if (!result.isInitialized()) {
1370         throw newUninitializedMessageException(result);
1371       }
1372       return result;
1373     }
1374 
1375     @java.lang.Override
buildPartial()1376     public com.google.monitoring.v3.NotificationChannel buildPartial() {
1377       com.google.monitoring.v3.NotificationChannel result =
1378           new com.google.monitoring.v3.NotificationChannel(this);
1379       buildPartialRepeatedFields(result);
1380       if (bitField0_ != 0) {
1381         buildPartial0(result);
1382       }
1383       onBuilt();
1384       return result;
1385     }
1386 
buildPartialRepeatedFields(com.google.monitoring.v3.NotificationChannel result)1387     private void buildPartialRepeatedFields(com.google.monitoring.v3.NotificationChannel result) {
1388       if (mutationRecordsBuilder_ == null) {
1389         if (((bitField0_ & 0x00000200) != 0)) {
1390           mutationRecords_ = java.util.Collections.unmodifiableList(mutationRecords_);
1391           bitField0_ = (bitField0_ & ~0x00000200);
1392         }
1393         result.mutationRecords_ = mutationRecords_;
1394       } else {
1395         result.mutationRecords_ = mutationRecordsBuilder_.build();
1396       }
1397     }
1398 
buildPartial0(com.google.monitoring.v3.NotificationChannel result)1399     private void buildPartial0(com.google.monitoring.v3.NotificationChannel result) {
1400       int from_bitField0_ = bitField0_;
1401       if (((from_bitField0_ & 0x00000001) != 0)) {
1402         result.type_ = type_;
1403       }
1404       if (((from_bitField0_ & 0x00000002) != 0)) {
1405         result.name_ = name_;
1406       }
1407       if (((from_bitField0_ & 0x00000004) != 0)) {
1408         result.displayName_ = displayName_;
1409       }
1410       if (((from_bitField0_ & 0x00000008) != 0)) {
1411         result.description_ = description_;
1412       }
1413       if (((from_bitField0_ & 0x00000010) != 0)) {
1414         result.labels_ = internalGetLabels();
1415         result.labels_.makeImmutable();
1416       }
1417       if (((from_bitField0_ & 0x00000020) != 0)) {
1418         result.userLabels_ = internalGetUserLabels();
1419         result.userLabels_.makeImmutable();
1420       }
1421       if (((from_bitField0_ & 0x00000040) != 0)) {
1422         result.verificationStatus_ = verificationStatus_;
1423       }
1424       if (((from_bitField0_ & 0x00000080) != 0)) {
1425         result.enabled_ = enabledBuilder_ == null ? enabled_ : enabledBuilder_.build();
1426       }
1427       if (((from_bitField0_ & 0x00000100) != 0)) {
1428         result.creationRecord_ =
1429             creationRecordBuilder_ == null ? creationRecord_ : creationRecordBuilder_.build();
1430       }
1431     }
1432 
1433     @java.lang.Override
clone()1434     public Builder clone() {
1435       return super.clone();
1436     }
1437 
1438     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1439     public Builder setField(
1440         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1441       return super.setField(field, value);
1442     }
1443 
1444     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1445     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1446       return super.clearField(field);
1447     }
1448 
1449     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1450     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1451       return super.clearOneof(oneof);
1452     }
1453 
1454     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1455     public Builder setRepeatedField(
1456         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1457       return super.setRepeatedField(field, index, value);
1458     }
1459 
1460     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1461     public Builder addRepeatedField(
1462         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1463       return super.addRepeatedField(field, value);
1464     }
1465 
1466     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1467     public Builder mergeFrom(com.google.protobuf.Message other) {
1468       if (other instanceof com.google.monitoring.v3.NotificationChannel) {
1469         return mergeFrom((com.google.monitoring.v3.NotificationChannel) other);
1470       } else {
1471         super.mergeFrom(other);
1472         return this;
1473       }
1474     }
1475 
mergeFrom(com.google.monitoring.v3.NotificationChannel other)1476     public Builder mergeFrom(com.google.monitoring.v3.NotificationChannel other) {
1477       if (other == com.google.monitoring.v3.NotificationChannel.getDefaultInstance()) return this;
1478       if (!other.getType().isEmpty()) {
1479         type_ = other.type_;
1480         bitField0_ |= 0x00000001;
1481         onChanged();
1482       }
1483       if (!other.getName().isEmpty()) {
1484         name_ = other.name_;
1485         bitField0_ |= 0x00000002;
1486         onChanged();
1487       }
1488       if (!other.getDisplayName().isEmpty()) {
1489         displayName_ = other.displayName_;
1490         bitField0_ |= 0x00000004;
1491         onChanged();
1492       }
1493       if (!other.getDescription().isEmpty()) {
1494         description_ = other.description_;
1495         bitField0_ |= 0x00000008;
1496         onChanged();
1497       }
1498       internalGetMutableLabels().mergeFrom(other.internalGetLabels());
1499       bitField0_ |= 0x00000010;
1500       internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels());
1501       bitField0_ |= 0x00000020;
1502       if (other.verificationStatus_ != 0) {
1503         setVerificationStatusValue(other.getVerificationStatusValue());
1504       }
1505       if (other.hasEnabled()) {
1506         mergeEnabled(other.getEnabled());
1507       }
1508       if (other.hasCreationRecord()) {
1509         mergeCreationRecord(other.getCreationRecord());
1510       }
1511       if (mutationRecordsBuilder_ == null) {
1512         if (!other.mutationRecords_.isEmpty()) {
1513           if (mutationRecords_.isEmpty()) {
1514             mutationRecords_ = other.mutationRecords_;
1515             bitField0_ = (bitField0_ & ~0x00000200);
1516           } else {
1517             ensureMutationRecordsIsMutable();
1518             mutationRecords_.addAll(other.mutationRecords_);
1519           }
1520           onChanged();
1521         }
1522       } else {
1523         if (!other.mutationRecords_.isEmpty()) {
1524           if (mutationRecordsBuilder_.isEmpty()) {
1525             mutationRecordsBuilder_.dispose();
1526             mutationRecordsBuilder_ = null;
1527             mutationRecords_ = other.mutationRecords_;
1528             bitField0_ = (bitField0_ & ~0x00000200);
1529             mutationRecordsBuilder_ =
1530                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1531                     ? getMutationRecordsFieldBuilder()
1532                     : null;
1533           } else {
1534             mutationRecordsBuilder_.addAllMessages(other.mutationRecords_);
1535           }
1536         }
1537       }
1538       this.mergeUnknownFields(other.getUnknownFields());
1539       onChanged();
1540       return this;
1541     }
1542 
1543     @java.lang.Override
isInitialized()1544     public final boolean isInitialized() {
1545       return true;
1546     }
1547 
1548     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1549     public Builder mergeFrom(
1550         com.google.protobuf.CodedInputStream input,
1551         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1552         throws java.io.IOException {
1553       if (extensionRegistry == null) {
1554         throw new java.lang.NullPointerException();
1555       }
1556       try {
1557         boolean done = false;
1558         while (!done) {
1559           int tag = input.readTag();
1560           switch (tag) {
1561             case 0:
1562               done = true;
1563               break;
1564             case 10:
1565               {
1566                 type_ = input.readStringRequireUtf8();
1567                 bitField0_ |= 0x00000001;
1568                 break;
1569               } // case 10
1570             case 26:
1571               {
1572                 displayName_ = input.readStringRequireUtf8();
1573                 bitField0_ |= 0x00000004;
1574                 break;
1575               } // case 26
1576             case 34:
1577               {
1578                 description_ = input.readStringRequireUtf8();
1579                 bitField0_ |= 0x00000008;
1580                 break;
1581               } // case 34
1582             case 42:
1583               {
1584                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
1585                     input.readMessage(
1586                         LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
1587                         extensionRegistry);
1588                 internalGetMutableLabels()
1589                     .getMutableMap()
1590                     .put(labels__.getKey(), labels__.getValue());
1591                 bitField0_ |= 0x00000010;
1592                 break;
1593               } // case 42
1594             case 50:
1595               {
1596                 name_ = input.readStringRequireUtf8();
1597                 bitField0_ |= 0x00000002;
1598                 break;
1599               } // case 50
1600             case 66:
1601               {
1602                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> userLabels__ =
1603                     input.readMessage(
1604                         UserLabelsDefaultEntryHolder.defaultEntry.getParserForType(),
1605                         extensionRegistry);
1606                 internalGetMutableUserLabels()
1607                     .getMutableMap()
1608                     .put(userLabels__.getKey(), userLabels__.getValue());
1609                 bitField0_ |= 0x00000020;
1610                 break;
1611               } // case 66
1612             case 72:
1613               {
1614                 verificationStatus_ = input.readEnum();
1615                 bitField0_ |= 0x00000040;
1616                 break;
1617               } // case 72
1618             case 90:
1619               {
1620                 input.readMessage(getEnabledFieldBuilder().getBuilder(), extensionRegistry);
1621                 bitField0_ |= 0x00000080;
1622                 break;
1623               } // case 90
1624             case 98:
1625               {
1626                 input.readMessage(getCreationRecordFieldBuilder().getBuilder(), extensionRegistry);
1627                 bitField0_ |= 0x00000100;
1628                 break;
1629               } // case 98
1630             case 106:
1631               {
1632                 com.google.monitoring.v3.MutationRecord m =
1633                     input.readMessage(
1634                         com.google.monitoring.v3.MutationRecord.parser(), extensionRegistry);
1635                 if (mutationRecordsBuilder_ == null) {
1636                   ensureMutationRecordsIsMutable();
1637                   mutationRecords_.add(m);
1638                 } else {
1639                   mutationRecordsBuilder_.addMessage(m);
1640                 }
1641                 break;
1642               } // case 106
1643             default:
1644               {
1645                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1646                   done = true; // was an endgroup tag
1647                 }
1648                 break;
1649               } // default:
1650           } // switch (tag)
1651         } // while (!done)
1652       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1653         throw e.unwrapIOException();
1654       } finally {
1655         onChanged();
1656       } // finally
1657       return this;
1658     }
1659 
1660     private int bitField0_;
1661 
1662     private java.lang.Object type_ = "";
1663     /**
1664      *
1665      *
1666      * <pre>
1667      * The type of the notification channel. This field matches the
1668      * value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field.
1669      * </pre>
1670      *
1671      * <code>string type = 1;</code>
1672      *
1673      * @return The type.
1674      */
getType()1675     public java.lang.String getType() {
1676       java.lang.Object ref = type_;
1677       if (!(ref instanceof java.lang.String)) {
1678         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1679         java.lang.String s = bs.toStringUtf8();
1680         type_ = s;
1681         return s;
1682       } else {
1683         return (java.lang.String) ref;
1684       }
1685     }
1686     /**
1687      *
1688      *
1689      * <pre>
1690      * The type of the notification channel. This field matches the
1691      * value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field.
1692      * </pre>
1693      *
1694      * <code>string type = 1;</code>
1695      *
1696      * @return The bytes for type.
1697      */
getTypeBytes()1698     public com.google.protobuf.ByteString getTypeBytes() {
1699       java.lang.Object ref = type_;
1700       if (ref instanceof String) {
1701         com.google.protobuf.ByteString b =
1702             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1703         type_ = b;
1704         return b;
1705       } else {
1706         return (com.google.protobuf.ByteString) ref;
1707       }
1708     }
1709     /**
1710      *
1711      *
1712      * <pre>
1713      * The type of the notification channel. This field matches the
1714      * value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field.
1715      * </pre>
1716      *
1717      * <code>string type = 1;</code>
1718      *
1719      * @param value The type to set.
1720      * @return This builder for chaining.
1721      */
setType(java.lang.String value)1722     public Builder setType(java.lang.String value) {
1723       if (value == null) {
1724         throw new NullPointerException();
1725       }
1726       type_ = value;
1727       bitField0_ |= 0x00000001;
1728       onChanged();
1729       return this;
1730     }
1731     /**
1732      *
1733      *
1734      * <pre>
1735      * The type of the notification channel. This field matches the
1736      * value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field.
1737      * </pre>
1738      *
1739      * <code>string type = 1;</code>
1740      *
1741      * @return This builder for chaining.
1742      */
clearType()1743     public Builder clearType() {
1744       type_ = getDefaultInstance().getType();
1745       bitField0_ = (bitField0_ & ~0x00000001);
1746       onChanged();
1747       return this;
1748     }
1749     /**
1750      *
1751      *
1752      * <pre>
1753      * The type of the notification channel. This field matches the
1754      * value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field.
1755      * </pre>
1756      *
1757      * <code>string type = 1;</code>
1758      *
1759      * @param value The bytes for type to set.
1760      * @return This builder for chaining.
1761      */
setTypeBytes(com.google.protobuf.ByteString value)1762     public Builder setTypeBytes(com.google.protobuf.ByteString value) {
1763       if (value == null) {
1764         throw new NullPointerException();
1765       }
1766       checkByteStringIsUtf8(value);
1767       type_ = value;
1768       bitField0_ |= 0x00000001;
1769       onChanged();
1770       return this;
1771     }
1772 
1773     private java.lang.Object name_ = "";
1774     /**
1775      *
1776      *
1777      * <pre>
1778      * The full REST resource name for this channel. The format is:
1779      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
1780      * The `[CHANNEL_ID]` is automatically assigned by the server on creation.
1781      * </pre>
1782      *
1783      * <code>string name = 6;</code>
1784      *
1785      * @return The name.
1786      */
getName()1787     public java.lang.String getName() {
1788       java.lang.Object ref = name_;
1789       if (!(ref instanceof java.lang.String)) {
1790         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1791         java.lang.String s = bs.toStringUtf8();
1792         name_ = s;
1793         return s;
1794       } else {
1795         return (java.lang.String) ref;
1796       }
1797     }
1798     /**
1799      *
1800      *
1801      * <pre>
1802      * The full REST resource name for this channel. The format is:
1803      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
1804      * The `[CHANNEL_ID]` is automatically assigned by the server on creation.
1805      * </pre>
1806      *
1807      * <code>string name = 6;</code>
1808      *
1809      * @return The bytes for name.
1810      */
getNameBytes()1811     public com.google.protobuf.ByteString getNameBytes() {
1812       java.lang.Object ref = name_;
1813       if (ref instanceof String) {
1814         com.google.protobuf.ByteString b =
1815             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1816         name_ = b;
1817         return b;
1818       } else {
1819         return (com.google.protobuf.ByteString) ref;
1820       }
1821     }
1822     /**
1823      *
1824      *
1825      * <pre>
1826      * The full REST resource name for this channel. The format is:
1827      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
1828      * The `[CHANNEL_ID]` is automatically assigned by the server on creation.
1829      * </pre>
1830      *
1831      * <code>string name = 6;</code>
1832      *
1833      * @param value The name to set.
1834      * @return This builder for chaining.
1835      */
setName(java.lang.String value)1836     public Builder setName(java.lang.String value) {
1837       if (value == null) {
1838         throw new NullPointerException();
1839       }
1840       name_ = value;
1841       bitField0_ |= 0x00000002;
1842       onChanged();
1843       return this;
1844     }
1845     /**
1846      *
1847      *
1848      * <pre>
1849      * The full REST resource name for this channel. The format is:
1850      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
1851      * The `[CHANNEL_ID]` is automatically assigned by the server on creation.
1852      * </pre>
1853      *
1854      * <code>string name = 6;</code>
1855      *
1856      * @return This builder for chaining.
1857      */
clearName()1858     public Builder clearName() {
1859       name_ = getDefaultInstance().getName();
1860       bitField0_ = (bitField0_ & ~0x00000002);
1861       onChanged();
1862       return this;
1863     }
1864     /**
1865      *
1866      *
1867      * <pre>
1868      * The full REST resource name for this channel. The format is:
1869      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
1870      * The `[CHANNEL_ID]` is automatically assigned by the server on creation.
1871      * </pre>
1872      *
1873      * <code>string name = 6;</code>
1874      *
1875      * @param value The bytes for name to set.
1876      * @return This builder for chaining.
1877      */
setNameBytes(com.google.protobuf.ByteString value)1878     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1879       if (value == null) {
1880         throw new NullPointerException();
1881       }
1882       checkByteStringIsUtf8(value);
1883       name_ = value;
1884       bitField0_ |= 0x00000002;
1885       onChanged();
1886       return this;
1887     }
1888 
1889     private java.lang.Object displayName_ = "";
1890     /**
1891      *
1892      *
1893      * <pre>
1894      * An optional human-readable name for this notification channel. It is
1895      * recommended that you specify a non-empty and unique name in order to
1896      * make it easier to identify the channels in your project, though this is
1897      * not enforced. The display name is limited to 512 Unicode characters.
1898      * </pre>
1899      *
1900      * <code>string display_name = 3;</code>
1901      *
1902      * @return The displayName.
1903      */
getDisplayName()1904     public java.lang.String getDisplayName() {
1905       java.lang.Object ref = displayName_;
1906       if (!(ref instanceof java.lang.String)) {
1907         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1908         java.lang.String s = bs.toStringUtf8();
1909         displayName_ = s;
1910         return s;
1911       } else {
1912         return (java.lang.String) ref;
1913       }
1914     }
1915     /**
1916      *
1917      *
1918      * <pre>
1919      * An optional human-readable name for this notification channel. It is
1920      * recommended that you specify a non-empty and unique name in order to
1921      * make it easier to identify the channels in your project, though this is
1922      * not enforced. The display name is limited to 512 Unicode characters.
1923      * </pre>
1924      *
1925      * <code>string display_name = 3;</code>
1926      *
1927      * @return The bytes for displayName.
1928      */
getDisplayNameBytes()1929     public com.google.protobuf.ByteString getDisplayNameBytes() {
1930       java.lang.Object ref = displayName_;
1931       if (ref instanceof String) {
1932         com.google.protobuf.ByteString b =
1933             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1934         displayName_ = b;
1935         return b;
1936       } else {
1937         return (com.google.protobuf.ByteString) ref;
1938       }
1939     }
1940     /**
1941      *
1942      *
1943      * <pre>
1944      * An optional human-readable name for this notification channel. It is
1945      * recommended that you specify a non-empty and unique name in order to
1946      * make it easier to identify the channels in your project, though this is
1947      * not enforced. The display name is limited to 512 Unicode characters.
1948      * </pre>
1949      *
1950      * <code>string display_name = 3;</code>
1951      *
1952      * @param value The displayName to set.
1953      * @return This builder for chaining.
1954      */
setDisplayName(java.lang.String value)1955     public Builder setDisplayName(java.lang.String value) {
1956       if (value == null) {
1957         throw new NullPointerException();
1958       }
1959       displayName_ = value;
1960       bitField0_ |= 0x00000004;
1961       onChanged();
1962       return this;
1963     }
1964     /**
1965      *
1966      *
1967      * <pre>
1968      * An optional human-readable name for this notification channel. It is
1969      * recommended that you specify a non-empty and unique name in order to
1970      * make it easier to identify the channels in your project, though this is
1971      * not enforced. The display name is limited to 512 Unicode characters.
1972      * </pre>
1973      *
1974      * <code>string display_name = 3;</code>
1975      *
1976      * @return This builder for chaining.
1977      */
clearDisplayName()1978     public Builder clearDisplayName() {
1979       displayName_ = getDefaultInstance().getDisplayName();
1980       bitField0_ = (bitField0_ & ~0x00000004);
1981       onChanged();
1982       return this;
1983     }
1984     /**
1985      *
1986      *
1987      * <pre>
1988      * An optional human-readable name for this notification channel. It is
1989      * recommended that you specify a non-empty and unique name in order to
1990      * make it easier to identify the channels in your project, though this is
1991      * not enforced. The display name is limited to 512 Unicode characters.
1992      * </pre>
1993      *
1994      * <code>string display_name = 3;</code>
1995      *
1996      * @param value The bytes for displayName to set.
1997      * @return This builder for chaining.
1998      */
setDisplayNameBytes(com.google.protobuf.ByteString value)1999     public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
2000       if (value == null) {
2001         throw new NullPointerException();
2002       }
2003       checkByteStringIsUtf8(value);
2004       displayName_ = value;
2005       bitField0_ |= 0x00000004;
2006       onChanged();
2007       return this;
2008     }
2009 
2010     private java.lang.Object description_ = "";
2011     /**
2012      *
2013      *
2014      * <pre>
2015      * An optional human-readable description of this notification channel. This
2016      * description may provide additional details, beyond the display
2017      * name, for the channel. This may not exceed 1024 Unicode characters.
2018      * </pre>
2019      *
2020      * <code>string description = 4;</code>
2021      *
2022      * @return The description.
2023      */
getDescription()2024     public java.lang.String getDescription() {
2025       java.lang.Object ref = description_;
2026       if (!(ref instanceof java.lang.String)) {
2027         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2028         java.lang.String s = bs.toStringUtf8();
2029         description_ = s;
2030         return s;
2031       } else {
2032         return (java.lang.String) ref;
2033       }
2034     }
2035     /**
2036      *
2037      *
2038      * <pre>
2039      * An optional human-readable description of this notification channel. This
2040      * description may provide additional details, beyond the display
2041      * name, for the channel. This may not exceed 1024 Unicode characters.
2042      * </pre>
2043      *
2044      * <code>string description = 4;</code>
2045      *
2046      * @return The bytes for description.
2047      */
getDescriptionBytes()2048     public com.google.protobuf.ByteString getDescriptionBytes() {
2049       java.lang.Object ref = description_;
2050       if (ref instanceof String) {
2051         com.google.protobuf.ByteString b =
2052             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2053         description_ = b;
2054         return b;
2055       } else {
2056         return (com.google.protobuf.ByteString) ref;
2057       }
2058     }
2059     /**
2060      *
2061      *
2062      * <pre>
2063      * An optional human-readable description of this notification channel. This
2064      * description may provide additional details, beyond the display
2065      * name, for the channel. This may not exceed 1024 Unicode characters.
2066      * </pre>
2067      *
2068      * <code>string description = 4;</code>
2069      *
2070      * @param value The description to set.
2071      * @return This builder for chaining.
2072      */
setDescription(java.lang.String value)2073     public Builder setDescription(java.lang.String value) {
2074       if (value == null) {
2075         throw new NullPointerException();
2076       }
2077       description_ = value;
2078       bitField0_ |= 0x00000008;
2079       onChanged();
2080       return this;
2081     }
2082     /**
2083      *
2084      *
2085      * <pre>
2086      * An optional human-readable description of this notification channel. This
2087      * description may provide additional details, beyond the display
2088      * name, for the channel. This may not exceed 1024 Unicode characters.
2089      * </pre>
2090      *
2091      * <code>string description = 4;</code>
2092      *
2093      * @return This builder for chaining.
2094      */
clearDescription()2095     public Builder clearDescription() {
2096       description_ = getDefaultInstance().getDescription();
2097       bitField0_ = (bitField0_ & ~0x00000008);
2098       onChanged();
2099       return this;
2100     }
2101     /**
2102      *
2103      *
2104      * <pre>
2105      * An optional human-readable description of this notification channel. This
2106      * description may provide additional details, beyond the display
2107      * name, for the channel. This may not exceed 1024 Unicode characters.
2108      * </pre>
2109      *
2110      * <code>string description = 4;</code>
2111      *
2112      * @param value The bytes for description to set.
2113      * @return This builder for chaining.
2114      */
setDescriptionBytes(com.google.protobuf.ByteString value)2115     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
2116       if (value == null) {
2117         throw new NullPointerException();
2118       }
2119       checkByteStringIsUtf8(value);
2120       description_ = value;
2121       bitField0_ |= 0x00000008;
2122       onChanged();
2123       return this;
2124     }
2125 
2126     private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;
2127 
internalGetLabels()2128     private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
2129       if (labels_ == null) {
2130         return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
2131       }
2132       return labels_;
2133     }
2134 
2135     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableLabels()2136         internalGetMutableLabels() {
2137       if (labels_ == null) {
2138         labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
2139       }
2140       if (!labels_.isMutable()) {
2141         labels_ = labels_.copy();
2142       }
2143       bitField0_ |= 0x00000010;
2144       onChanged();
2145       return labels_;
2146     }
2147 
getLabelsCount()2148     public int getLabelsCount() {
2149       return internalGetLabels().getMap().size();
2150     }
2151     /**
2152      *
2153      *
2154      * <pre>
2155      * Configuration fields that define the channel and its behavior. The
2156      * permissible and required labels are specified in the
2157      * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
2158      * `NotificationChannelDescriptor` corresponding to the `type` field.
2159      * </pre>
2160      *
2161      * <code>map&lt;string, string&gt; labels = 5;</code>
2162      */
2163     @java.lang.Override
containsLabels(java.lang.String key)2164     public boolean containsLabels(java.lang.String key) {
2165       if (key == null) {
2166         throw new NullPointerException("map key");
2167       }
2168       return internalGetLabels().getMap().containsKey(key);
2169     }
2170     /** Use {@link #getLabelsMap()} instead. */
2171     @java.lang.Override
2172     @java.lang.Deprecated
getLabels()2173     public java.util.Map<java.lang.String, java.lang.String> getLabels() {
2174       return getLabelsMap();
2175     }
2176     /**
2177      *
2178      *
2179      * <pre>
2180      * Configuration fields that define the channel and its behavior. The
2181      * permissible and required labels are specified in the
2182      * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
2183      * `NotificationChannelDescriptor` corresponding to the `type` field.
2184      * </pre>
2185      *
2186      * <code>map&lt;string, string&gt; labels = 5;</code>
2187      */
2188     @java.lang.Override
getLabelsMap()2189     public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
2190       return internalGetLabels().getMap();
2191     }
2192     /**
2193      *
2194      *
2195      * <pre>
2196      * Configuration fields that define the channel and its behavior. The
2197      * permissible and required labels are specified in the
2198      * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
2199      * `NotificationChannelDescriptor` corresponding to the `type` field.
2200      * </pre>
2201      *
2202      * <code>map&lt;string, string&gt; labels = 5;</code>
2203      */
2204     @java.lang.Override
getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)2205     public /* nullable */ java.lang.String getLabelsOrDefault(
2206         java.lang.String key,
2207         /* nullable */
2208         java.lang.String defaultValue) {
2209       if (key == null) {
2210         throw new NullPointerException("map key");
2211       }
2212       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
2213       return map.containsKey(key) ? map.get(key) : defaultValue;
2214     }
2215     /**
2216      *
2217      *
2218      * <pre>
2219      * Configuration fields that define the channel and its behavior. The
2220      * permissible and required labels are specified in the
2221      * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
2222      * `NotificationChannelDescriptor` corresponding to the `type` field.
2223      * </pre>
2224      *
2225      * <code>map&lt;string, string&gt; labels = 5;</code>
2226      */
2227     @java.lang.Override
getLabelsOrThrow(java.lang.String key)2228     public java.lang.String getLabelsOrThrow(java.lang.String key) {
2229       if (key == null) {
2230         throw new NullPointerException("map key");
2231       }
2232       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
2233       if (!map.containsKey(key)) {
2234         throw new java.lang.IllegalArgumentException();
2235       }
2236       return map.get(key);
2237     }
2238 
clearLabels()2239     public Builder clearLabels() {
2240       bitField0_ = (bitField0_ & ~0x00000010);
2241       internalGetMutableLabels().getMutableMap().clear();
2242       return this;
2243     }
2244     /**
2245      *
2246      *
2247      * <pre>
2248      * Configuration fields that define the channel and its behavior. The
2249      * permissible and required labels are specified in the
2250      * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
2251      * `NotificationChannelDescriptor` corresponding to the `type` field.
2252      * </pre>
2253      *
2254      * <code>map&lt;string, string&gt; labels = 5;</code>
2255      */
removeLabels(java.lang.String key)2256     public Builder removeLabels(java.lang.String key) {
2257       if (key == null) {
2258         throw new NullPointerException("map key");
2259       }
2260       internalGetMutableLabels().getMutableMap().remove(key);
2261       return this;
2262     }
2263     /** Use alternate mutation accessors instead. */
2264     @java.lang.Deprecated
getMutableLabels()2265     public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
2266       bitField0_ |= 0x00000010;
2267       return internalGetMutableLabels().getMutableMap();
2268     }
2269     /**
2270      *
2271      *
2272      * <pre>
2273      * Configuration fields that define the channel and its behavior. The
2274      * permissible and required labels are specified in the
2275      * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
2276      * `NotificationChannelDescriptor` corresponding to the `type` field.
2277      * </pre>
2278      *
2279      * <code>map&lt;string, string&gt; labels = 5;</code>
2280      */
putLabels(java.lang.String key, java.lang.String value)2281     public Builder putLabels(java.lang.String key, java.lang.String value) {
2282       if (key == null) {
2283         throw new NullPointerException("map key");
2284       }
2285       if (value == null) {
2286         throw new NullPointerException("map value");
2287       }
2288       internalGetMutableLabels().getMutableMap().put(key, value);
2289       bitField0_ |= 0x00000010;
2290       return this;
2291     }
2292     /**
2293      *
2294      *
2295      * <pre>
2296      * Configuration fields that define the channel and its behavior. The
2297      * permissible and required labels are specified in the
2298      * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the
2299      * `NotificationChannelDescriptor` corresponding to the `type` field.
2300      * </pre>
2301      *
2302      * <code>map&lt;string, string&gt; labels = 5;</code>
2303      */
putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)2304     public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
2305       internalGetMutableLabels().getMutableMap().putAll(values);
2306       bitField0_ |= 0x00000010;
2307       return this;
2308     }
2309 
2310     private com.google.protobuf.MapField<java.lang.String, java.lang.String> userLabels_;
2311 
2312     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetUserLabels()2313         internalGetUserLabels() {
2314       if (userLabels_ == null) {
2315         return com.google.protobuf.MapField.emptyMapField(
2316             UserLabelsDefaultEntryHolder.defaultEntry);
2317       }
2318       return userLabels_;
2319     }
2320 
2321     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableUserLabels()2322         internalGetMutableUserLabels() {
2323       if (userLabels_ == null) {
2324         userLabels_ =
2325             com.google.protobuf.MapField.newMapField(UserLabelsDefaultEntryHolder.defaultEntry);
2326       }
2327       if (!userLabels_.isMutable()) {
2328         userLabels_ = userLabels_.copy();
2329       }
2330       bitField0_ |= 0x00000020;
2331       onChanged();
2332       return userLabels_;
2333     }
2334 
getUserLabelsCount()2335     public int getUserLabelsCount() {
2336       return internalGetUserLabels().getMap().size();
2337     }
2338     /**
2339      *
2340      *
2341      * <pre>
2342      * User-supplied key/value data that does not need to conform to
2343      * the corresponding `NotificationChannelDescriptor`'s schema, unlike
2344      * the `labels` field. This field is intended to be used for organizing
2345      * and identifying the `NotificationChannel` objects.
2346      * The field can contain up to 64 entries. Each key and value is limited to
2347      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
2348      * values can contain only lowercase letters, numerals, underscores, and
2349      * dashes. Keys must begin with a letter.
2350      * </pre>
2351      *
2352      * <code>map&lt;string, string&gt; user_labels = 8;</code>
2353      */
2354     @java.lang.Override
containsUserLabels(java.lang.String key)2355     public boolean containsUserLabels(java.lang.String key) {
2356       if (key == null) {
2357         throw new NullPointerException("map key");
2358       }
2359       return internalGetUserLabels().getMap().containsKey(key);
2360     }
2361     /** Use {@link #getUserLabelsMap()} instead. */
2362     @java.lang.Override
2363     @java.lang.Deprecated
getUserLabels()2364     public java.util.Map<java.lang.String, java.lang.String> getUserLabels() {
2365       return getUserLabelsMap();
2366     }
2367     /**
2368      *
2369      *
2370      * <pre>
2371      * User-supplied key/value data that does not need to conform to
2372      * the corresponding `NotificationChannelDescriptor`'s schema, unlike
2373      * the `labels` field. This field is intended to be used for organizing
2374      * and identifying the `NotificationChannel` objects.
2375      * The field can contain up to 64 entries. Each key and value is limited to
2376      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
2377      * values can contain only lowercase letters, numerals, underscores, and
2378      * dashes. Keys must begin with a letter.
2379      * </pre>
2380      *
2381      * <code>map&lt;string, string&gt; user_labels = 8;</code>
2382      */
2383     @java.lang.Override
getUserLabelsMap()2384     public java.util.Map<java.lang.String, java.lang.String> getUserLabelsMap() {
2385       return internalGetUserLabels().getMap();
2386     }
2387     /**
2388      *
2389      *
2390      * <pre>
2391      * User-supplied key/value data that does not need to conform to
2392      * the corresponding `NotificationChannelDescriptor`'s schema, unlike
2393      * the `labels` field. This field is intended to be used for organizing
2394      * and identifying the `NotificationChannel` objects.
2395      * The field can contain up to 64 entries. Each key and value is limited to
2396      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
2397      * values can contain only lowercase letters, numerals, underscores, and
2398      * dashes. Keys must begin with a letter.
2399      * </pre>
2400      *
2401      * <code>map&lt;string, string&gt; user_labels = 8;</code>
2402      */
2403     @java.lang.Override
getUserLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)2404     public /* nullable */ java.lang.String getUserLabelsOrDefault(
2405         java.lang.String key,
2406         /* nullable */
2407         java.lang.String defaultValue) {
2408       if (key == null) {
2409         throw new NullPointerException("map key");
2410       }
2411       java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
2412       return map.containsKey(key) ? map.get(key) : defaultValue;
2413     }
2414     /**
2415      *
2416      *
2417      * <pre>
2418      * User-supplied key/value data that does not need to conform to
2419      * the corresponding `NotificationChannelDescriptor`'s schema, unlike
2420      * the `labels` field. This field is intended to be used for organizing
2421      * and identifying the `NotificationChannel` objects.
2422      * The field can contain up to 64 entries. Each key and value is limited to
2423      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
2424      * values can contain only lowercase letters, numerals, underscores, and
2425      * dashes. Keys must begin with a letter.
2426      * </pre>
2427      *
2428      * <code>map&lt;string, string&gt; user_labels = 8;</code>
2429      */
2430     @java.lang.Override
getUserLabelsOrThrow(java.lang.String key)2431     public java.lang.String getUserLabelsOrThrow(java.lang.String key) {
2432       if (key == null) {
2433         throw new NullPointerException("map key");
2434       }
2435       java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
2436       if (!map.containsKey(key)) {
2437         throw new java.lang.IllegalArgumentException();
2438       }
2439       return map.get(key);
2440     }
2441 
clearUserLabels()2442     public Builder clearUserLabels() {
2443       bitField0_ = (bitField0_ & ~0x00000020);
2444       internalGetMutableUserLabels().getMutableMap().clear();
2445       return this;
2446     }
2447     /**
2448      *
2449      *
2450      * <pre>
2451      * User-supplied key/value data that does not need to conform to
2452      * the corresponding `NotificationChannelDescriptor`'s schema, unlike
2453      * the `labels` field. This field is intended to be used for organizing
2454      * and identifying the `NotificationChannel` objects.
2455      * The field can contain up to 64 entries. Each key and value is limited to
2456      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
2457      * values can contain only lowercase letters, numerals, underscores, and
2458      * dashes. Keys must begin with a letter.
2459      * </pre>
2460      *
2461      * <code>map&lt;string, string&gt; user_labels = 8;</code>
2462      */
removeUserLabels(java.lang.String key)2463     public Builder removeUserLabels(java.lang.String key) {
2464       if (key == null) {
2465         throw new NullPointerException("map key");
2466       }
2467       internalGetMutableUserLabels().getMutableMap().remove(key);
2468       return this;
2469     }
2470     /** Use alternate mutation accessors instead. */
2471     @java.lang.Deprecated
getMutableUserLabels()2472     public java.util.Map<java.lang.String, java.lang.String> getMutableUserLabels() {
2473       bitField0_ |= 0x00000020;
2474       return internalGetMutableUserLabels().getMutableMap();
2475     }
2476     /**
2477      *
2478      *
2479      * <pre>
2480      * User-supplied key/value data that does not need to conform to
2481      * the corresponding `NotificationChannelDescriptor`'s schema, unlike
2482      * the `labels` field. This field is intended to be used for organizing
2483      * and identifying the `NotificationChannel` objects.
2484      * The field can contain up to 64 entries. Each key and value is limited to
2485      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
2486      * values can contain only lowercase letters, numerals, underscores, and
2487      * dashes. Keys must begin with a letter.
2488      * </pre>
2489      *
2490      * <code>map&lt;string, string&gt; user_labels = 8;</code>
2491      */
putUserLabels(java.lang.String key, java.lang.String value)2492     public Builder putUserLabels(java.lang.String key, java.lang.String value) {
2493       if (key == null) {
2494         throw new NullPointerException("map key");
2495       }
2496       if (value == null) {
2497         throw new NullPointerException("map value");
2498       }
2499       internalGetMutableUserLabels().getMutableMap().put(key, value);
2500       bitField0_ |= 0x00000020;
2501       return this;
2502     }
2503     /**
2504      *
2505      *
2506      * <pre>
2507      * User-supplied key/value data that does not need to conform to
2508      * the corresponding `NotificationChannelDescriptor`'s schema, unlike
2509      * the `labels` field. This field is intended to be used for organizing
2510      * and identifying the `NotificationChannel` objects.
2511      * The field can contain up to 64 entries. Each key and value is limited to
2512      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
2513      * values can contain only lowercase letters, numerals, underscores, and
2514      * dashes. Keys must begin with a letter.
2515      * </pre>
2516      *
2517      * <code>map&lt;string, string&gt; user_labels = 8;</code>
2518      */
putAllUserLabels(java.util.Map<java.lang.String, java.lang.String> values)2519     public Builder putAllUserLabels(java.util.Map<java.lang.String, java.lang.String> values) {
2520       internalGetMutableUserLabels().getMutableMap().putAll(values);
2521       bitField0_ |= 0x00000020;
2522       return this;
2523     }
2524 
2525     private int verificationStatus_ = 0;
2526     /**
2527      *
2528      *
2529      * <pre>
2530      * Indicates whether this channel has been verified or not. On a
2531      * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
2532      * or
2533      * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
2534      * operation, this field is expected to be populated.
2535      * If the value is `UNVERIFIED`, then it indicates that the channel is
2536      * non-functioning (it both requires verification and lacks verification);
2537      * otherwise, it is assumed that the channel works.
2538      * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
2539      * the channel is of a type that does not require verification or that
2540      * this specific channel has been exempted from verification because it was
2541      * created prior to verification being required for channels of this type.
2542      * This field cannot be modified using a standard
2543      * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
2544      * operation. To change the value of this field, you must call
2545      * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
2546      * </pre>
2547      *
2548      * <code>.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;
2549      * </code>
2550      *
2551      * @return The enum numeric value on the wire for verificationStatus.
2552      */
2553     @java.lang.Override
getVerificationStatusValue()2554     public int getVerificationStatusValue() {
2555       return verificationStatus_;
2556     }
2557     /**
2558      *
2559      *
2560      * <pre>
2561      * Indicates whether this channel has been verified or not. On a
2562      * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
2563      * or
2564      * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
2565      * operation, this field is expected to be populated.
2566      * If the value is `UNVERIFIED`, then it indicates that the channel is
2567      * non-functioning (it both requires verification and lacks verification);
2568      * otherwise, it is assumed that the channel works.
2569      * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
2570      * the channel is of a type that does not require verification or that
2571      * this specific channel has been exempted from verification because it was
2572      * created prior to verification being required for channels of this type.
2573      * This field cannot be modified using a standard
2574      * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
2575      * operation. To change the value of this field, you must call
2576      * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
2577      * </pre>
2578      *
2579      * <code>.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;
2580      * </code>
2581      *
2582      * @param value The enum numeric value on the wire for verificationStatus to set.
2583      * @return This builder for chaining.
2584      */
setVerificationStatusValue(int value)2585     public Builder setVerificationStatusValue(int value) {
2586       verificationStatus_ = value;
2587       bitField0_ |= 0x00000040;
2588       onChanged();
2589       return this;
2590     }
2591     /**
2592      *
2593      *
2594      * <pre>
2595      * Indicates whether this channel has been verified or not. On a
2596      * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
2597      * or
2598      * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
2599      * operation, this field is expected to be populated.
2600      * If the value is `UNVERIFIED`, then it indicates that the channel is
2601      * non-functioning (it both requires verification and lacks verification);
2602      * otherwise, it is assumed that the channel works.
2603      * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
2604      * the channel is of a type that does not require verification or that
2605      * this specific channel has been exempted from verification because it was
2606      * created prior to verification being required for channels of this type.
2607      * This field cannot be modified using a standard
2608      * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
2609      * operation. To change the value of this field, you must call
2610      * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
2611      * </pre>
2612      *
2613      * <code>.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;
2614      * </code>
2615      *
2616      * @return The verificationStatus.
2617      */
2618     @java.lang.Override
getVerificationStatus()2619     public com.google.monitoring.v3.NotificationChannel.VerificationStatus getVerificationStatus() {
2620       com.google.monitoring.v3.NotificationChannel.VerificationStatus result =
2621           com.google.monitoring.v3.NotificationChannel.VerificationStatus.forNumber(
2622               verificationStatus_);
2623       return result == null
2624           ? com.google.monitoring.v3.NotificationChannel.VerificationStatus.UNRECOGNIZED
2625           : result;
2626     }
2627     /**
2628      *
2629      *
2630      * <pre>
2631      * Indicates whether this channel has been verified or not. On a
2632      * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
2633      * or
2634      * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
2635      * operation, this field is expected to be populated.
2636      * If the value is `UNVERIFIED`, then it indicates that the channel is
2637      * non-functioning (it both requires verification and lacks verification);
2638      * otherwise, it is assumed that the channel works.
2639      * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
2640      * the channel is of a type that does not require verification or that
2641      * this specific channel has been exempted from verification because it was
2642      * created prior to verification being required for channels of this type.
2643      * This field cannot be modified using a standard
2644      * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
2645      * operation. To change the value of this field, you must call
2646      * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
2647      * </pre>
2648      *
2649      * <code>.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;
2650      * </code>
2651      *
2652      * @param value The verificationStatus to set.
2653      * @return This builder for chaining.
2654      */
setVerificationStatus( com.google.monitoring.v3.NotificationChannel.VerificationStatus value)2655     public Builder setVerificationStatus(
2656         com.google.monitoring.v3.NotificationChannel.VerificationStatus value) {
2657       if (value == null) {
2658         throw new NullPointerException();
2659       }
2660       bitField0_ |= 0x00000040;
2661       verificationStatus_ = value.getNumber();
2662       onChanged();
2663       return this;
2664     }
2665     /**
2666      *
2667      *
2668      * <pre>
2669      * Indicates whether this channel has been verified or not. On a
2670      * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
2671      * or
2672      * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel]
2673      * operation, this field is expected to be populated.
2674      * If the value is `UNVERIFIED`, then it indicates that the channel is
2675      * non-functioning (it both requires verification and lacks verification);
2676      * otherwise, it is assumed that the channel works.
2677      * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that
2678      * the channel is of a type that does not require verification or that
2679      * this specific channel has been exempted from verification because it was
2680      * created prior to verification being required for channels of this type.
2681      * This field cannot be modified using a standard
2682      * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel]
2683      * operation. To change the value of this field, you must call
2684      * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel].
2685      * </pre>
2686      *
2687      * <code>.google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9;
2688      * </code>
2689      *
2690      * @return This builder for chaining.
2691      */
clearVerificationStatus()2692     public Builder clearVerificationStatus() {
2693       bitField0_ = (bitField0_ & ~0x00000040);
2694       verificationStatus_ = 0;
2695       onChanged();
2696       return this;
2697     }
2698 
2699     private com.google.protobuf.BoolValue enabled_;
2700     private com.google.protobuf.SingleFieldBuilderV3<
2701             com.google.protobuf.BoolValue,
2702             com.google.protobuf.BoolValue.Builder,
2703             com.google.protobuf.BoolValueOrBuilder>
2704         enabledBuilder_;
2705     /**
2706      *
2707      *
2708      * <pre>
2709      * Whether notifications are forwarded to the described channel. This makes
2710      * it possible to disable delivery of notifications to a particular channel
2711      * without removing the channel from all alerting policies that reference
2712      * the channel. This is a more convenient approach when the change is
2713      * temporary and you want to receive notifications from the same set
2714      * of alerting policies on the channel at some point in the future.
2715      * </pre>
2716      *
2717      * <code>.google.protobuf.BoolValue enabled = 11;</code>
2718      *
2719      * @return Whether the enabled field is set.
2720      */
hasEnabled()2721     public boolean hasEnabled() {
2722       return ((bitField0_ & 0x00000080) != 0);
2723     }
2724     /**
2725      *
2726      *
2727      * <pre>
2728      * Whether notifications are forwarded to the described channel. This makes
2729      * it possible to disable delivery of notifications to a particular channel
2730      * without removing the channel from all alerting policies that reference
2731      * the channel. This is a more convenient approach when the change is
2732      * temporary and you want to receive notifications from the same set
2733      * of alerting policies on the channel at some point in the future.
2734      * </pre>
2735      *
2736      * <code>.google.protobuf.BoolValue enabled = 11;</code>
2737      *
2738      * @return The enabled.
2739      */
getEnabled()2740     public com.google.protobuf.BoolValue getEnabled() {
2741       if (enabledBuilder_ == null) {
2742         return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
2743       } else {
2744         return enabledBuilder_.getMessage();
2745       }
2746     }
2747     /**
2748      *
2749      *
2750      * <pre>
2751      * Whether notifications are forwarded to the described channel. This makes
2752      * it possible to disable delivery of notifications to a particular channel
2753      * without removing the channel from all alerting policies that reference
2754      * the channel. This is a more convenient approach when the change is
2755      * temporary and you want to receive notifications from the same set
2756      * of alerting policies on the channel at some point in the future.
2757      * </pre>
2758      *
2759      * <code>.google.protobuf.BoolValue enabled = 11;</code>
2760      */
setEnabled(com.google.protobuf.BoolValue value)2761     public Builder setEnabled(com.google.protobuf.BoolValue value) {
2762       if (enabledBuilder_ == null) {
2763         if (value == null) {
2764           throw new NullPointerException();
2765         }
2766         enabled_ = value;
2767       } else {
2768         enabledBuilder_.setMessage(value);
2769       }
2770       bitField0_ |= 0x00000080;
2771       onChanged();
2772       return this;
2773     }
2774     /**
2775      *
2776      *
2777      * <pre>
2778      * Whether notifications are forwarded to the described channel. This makes
2779      * it possible to disable delivery of notifications to a particular channel
2780      * without removing the channel from all alerting policies that reference
2781      * the channel. This is a more convenient approach when the change is
2782      * temporary and you want to receive notifications from the same set
2783      * of alerting policies on the channel at some point in the future.
2784      * </pre>
2785      *
2786      * <code>.google.protobuf.BoolValue enabled = 11;</code>
2787      */
setEnabled(com.google.protobuf.BoolValue.Builder builderForValue)2788     public Builder setEnabled(com.google.protobuf.BoolValue.Builder builderForValue) {
2789       if (enabledBuilder_ == null) {
2790         enabled_ = builderForValue.build();
2791       } else {
2792         enabledBuilder_.setMessage(builderForValue.build());
2793       }
2794       bitField0_ |= 0x00000080;
2795       onChanged();
2796       return this;
2797     }
2798     /**
2799      *
2800      *
2801      * <pre>
2802      * Whether notifications are forwarded to the described channel. This makes
2803      * it possible to disable delivery of notifications to a particular channel
2804      * without removing the channel from all alerting policies that reference
2805      * the channel. This is a more convenient approach when the change is
2806      * temporary and you want to receive notifications from the same set
2807      * of alerting policies on the channel at some point in the future.
2808      * </pre>
2809      *
2810      * <code>.google.protobuf.BoolValue enabled = 11;</code>
2811      */
mergeEnabled(com.google.protobuf.BoolValue value)2812     public Builder mergeEnabled(com.google.protobuf.BoolValue value) {
2813       if (enabledBuilder_ == null) {
2814         if (((bitField0_ & 0x00000080) != 0)
2815             && enabled_ != null
2816             && enabled_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
2817           getEnabledBuilder().mergeFrom(value);
2818         } else {
2819           enabled_ = value;
2820         }
2821       } else {
2822         enabledBuilder_.mergeFrom(value);
2823       }
2824       bitField0_ |= 0x00000080;
2825       onChanged();
2826       return this;
2827     }
2828     /**
2829      *
2830      *
2831      * <pre>
2832      * Whether notifications are forwarded to the described channel. This makes
2833      * it possible to disable delivery of notifications to a particular channel
2834      * without removing the channel from all alerting policies that reference
2835      * the channel. This is a more convenient approach when the change is
2836      * temporary and you want to receive notifications from the same set
2837      * of alerting policies on the channel at some point in the future.
2838      * </pre>
2839      *
2840      * <code>.google.protobuf.BoolValue enabled = 11;</code>
2841      */
clearEnabled()2842     public Builder clearEnabled() {
2843       bitField0_ = (bitField0_ & ~0x00000080);
2844       enabled_ = null;
2845       if (enabledBuilder_ != null) {
2846         enabledBuilder_.dispose();
2847         enabledBuilder_ = null;
2848       }
2849       onChanged();
2850       return this;
2851     }
2852     /**
2853      *
2854      *
2855      * <pre>
2856      * Whether notifications are forwarded to the described channel. This makes
2857      * it possible to disable delivery of notifications to a particular channel
2858      * without removing the channel from all alerting policies that reference
2859      * the channel. This is a more convenient approach when the change is
2860      * temporary and you want to receive notifications from the same set
2861      * of alerting policies on the channel at some point in the future.
2862      * </pre>
2863      *
2864      * <code>.google.protobuf.BoolValue enabled = 11;</code>
2865      */
getEnabledBuilder()2866     public com.google.protobuf.BoolValue.Builder getEnabledBuilder() {
2867       bitField0_ |= 0x00000080;
2868       onChanged();
2869       return getEnabledFieldBuilder().getBuilder();
2870     }
2871     /**
2872      *
2873      *
2874      * <pre>
2875      * Whether notifications are forwarded to the described channel. This makes
2876      * it possible to disable delivery of notifications to a particular channel
2877      * without removing the channel from all alerting policies that reference
2878      * the channel. This is a more convenient approach when the change is
2879      * temporary and you want to receive notifications from the same set
2880      * of alerting policies on the channel at some point in the future.
2881      * </pre>
2882      *
2883      * <code>.google.protobuf.BoolValue enabled = 11;</code>
2884      */
getEnabledOrBuilder()2885     public com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder() {
2886       if (enabledBuilder_ != null) {
2887         return enabledBuilder_.getMessageOrBuilder();
2888       } else {
2889         return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
2890       }
2891     }
2892     /**
2893      *
2894      *
2895      * <pre>
2896      * Whether notifications are forwarded to the described channel. This makes
2897      * it possible to disable delivery of notifications to a particular channel
2898      * without removing the channel from all alerting policies that reference
2899      * the channel. This is a more convenient approach when the change is
2900      * temporary and you want to receive notifications from the same set
2901      * of alerting policies on the channel at some point in the future.
2902      * </pre>
2903      *
2904      * <code>.google.protobuf.BoolValue enabled = 11;</code>
2905      */
2906     private com.google.protobuf.SingleFieldBuilderV3<
2907             com.google.protobuf.BoolValue,
2908             com.google.protobuf.BoolValue.Builder,
2909             com.google.protobuf.BoolValueOrBuilder>
getEnabledFieldBuilder()2910         getEnabledFieldBuilder() {
2911       if (enabledBuilder_ == null) {
2912         enabledBuilder_ =
2913             new com.google.protobuf.SingleFieldBuilderV3<
2914                 com.google.protobuf.BoolValue,
2915                 com.google.protobuf.BoolValue.Builder,
2916                 com.google.protobuf.BoolValueOrBuilder>(
2917                 getEnabled(), getParentForChildren(), isClean());
2918         enabled_ = null;
2919       }
2920       return enabledBuilder_;
2921     }
2922 
2923     private com.google.monitoring.v3.MutationRecord creationRecord_;
2924     private com.google.protobuf.SingleFieldBuilderV3<
2925             com.google.monitoring.v3.MutationRecord,
2926             com.google.monitoring.v3.MutationRecord.Builder,
2927             com.google.monitoring.v3.MutationRecordOrBuilder>
2928         creationRecordBuilder_;
2929     /**
2930      *
2931      *
2932      * <pre>
2933      * Record of the creation of this channel.
2934      * </pre>
2935      *
2936      * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
2937      *
2938      * @return Whether the creationRecord field is set.
2939      */
hasCreationRecord()2940     public boolean hasCreationRecord() {
2941       return ((bitField0_ & 0x00000100) != 0);
2942     }
2943     /**
2944      *
2945      *
2946      * <pre>
2947      * Record of the creation of this channel.
2948      * </pre>
2949      *
2950      * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
2951      *
2952      * @return The creationRecord.
2953      */
getCreationRecord()2954     public com.google.monitoring.v3.MutationRecord getCreationRecord() {
2955       if (creationRecordBuilder_ == null) {
2956         return creationRecord_ == null
2957             ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
2958             : creationRecord_;
2959       } else {
2960         return creationRecordBuilder_.getMessage();
2961       }
2962     }
2963     /**
2964      *
2965      *
2966      * <pre>
2967      * Record of the creation of this channel.
2968      * </pre>
2969      *
2970      * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
2971      */
setCreationRecord(com.google.monitoring.v3.MutationRecord value)2972     public Builder setCreationRecord(com.google.monitoring.v3.MutationRecord value) {
2973       if (creationRecordBuilder_ == null) {
2974         if (value == null) {
2975           throw new NullPointerException();
2976         }
2977         creationRecord_ = value;
2978       } else {
2979         creationRecordBuilder_.setMessage(value);
2980       }
2981       bitField0_ |= 0x00000100;
2982       onChanged();
2983       return this;
2984     }
2985     /**
2986      *
2987      *
2988      * <pre>
2989      * Record of the creation of this channel.
2990      * </pre>
2991      *
2992      * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
2993      */
setCreationRecord( com.google.monitoring.v3.MutationRecord.Builder builderForValue)2994     public Builder setCreationRecord(
2995         com.google.monitoring.v3.MutationRecord.Builder builderForValue) {
2996       if (creationRecordBuilder_ == null) {
2997         creationRecord_ = builderForValue.build();
2998       } else {
2999         creationRecordBuilder_.setMessage(builderForValue.build());
3000       }
3001       bitField0_ |= 0x00000100;
3002       onChanged();
3003       return this;
3004     }
3005     /**
3006      *
3007      *
3008      * <pre>
3009      * Record of the creation of this channel.
3010      * </pre>
3011      *
3012      * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
3013      */
mergeCreationRecord(com.google.monitoring.v3.MutationRecord value)3014     public Builder mergeCreationRecord(com.google.monitoring.v3.MutationRecord value) {
3015       if (creationRecordBuilder_ == null) {
3016         if (((bitField0_ & 0x00000100) != 0)
3017             && creationRecord_ != null
3018             && creationRecord_ != com.google.monitoring.v3.MutationRecord.getDefaultInstance()) {
3019           getCreationRecordBuilder().mergeFrom(value);
3020         } else {
3021           creationRecord_ = value;
3022         }
3023       } else {
3024         creationRecordBuilder_.mergeFrom(value);
3025       }
3026       bitField0_ |= 0x00000100;
3027       onChanged();
3028       return this;
3029     }
3030     /**
3031      *
3032      *
3033      * <pre>
3034      * Record of the creation of this channel.
3035      * </pre>
3036      *
3037      * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
3038      */
clearCreationRecord()3039     public Builder clearCreationRecord() {
3040       bitField0_ = (bitField0_ & ~0x00000100);
3041       creationRecord_ = null;
3042       if (creationRecordBuilder_ != null) {
3043         creationRecordBuilder_.dispose();
3044         creationRecordBuilder_ = null;
3045       }
3046       onChanged();
3047       return this;
3048     }
3049     /**
3050      *
3051      *
3052      * <pre>
3053      * Record of the creation of this channel.
3054      * </pre>
3055      *
3056      * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
3057      */
getCreationRecordBuilder()3058     public com.google.monitoring.v3.MutationRecord.Builder getCreationRecordBuilder() {
3059       bitField0_ |= 0x00000100;
3060       onChanged();
3061       return getCreationRecordFieldBuilder().getBuilder();
3062     }
3063     /**
3064      *
3065      *
3066      * <pre>
3067      * Record of the creation of this channel.
3068      * </pre>
3069      *
3070      * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
3071      */
getCreationRecordOrBuilder()3072     public com.google.monitoring.v3.MutationRecordOrBuilder getCreationRecordOrBuilder() {
3073       if (creationRecordBuilder_ != null) {
3074         return creationRecordBuilder_.getMessageOrBuilder();
3075       } else {
3076         return creationRecord_ == null
3077             ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
3078             : creationRecord_;
3079       }
3080     }
3081     /**
3082      *
3083      *
3084      * <pre>
3085      * Record of the creation of this channel.
3086      * </pre>
3087      *
3088      * <code>.google.monitoring.v3.MutationRecord creation_record = 12;</code>
3089      */
3090     private com.google.protobuf.SingleFieldBuilderV3<
3091             com.google.monitoring.v3.MutationRecord,
3092             com.google.monitoring.v3.MutationRecord.Builder,
3093             com.google.monitoring.v3.MutationRecordOrBuilder>
getCreationRecordFieldBuilder()3094         getCreationRecordFieldBuilder() {
3095       if (creationRecordBuilder_ == null) {
3096         creationRecordBuilder_ =
3097             new com.google.protobuf.SingleFieldBuilderV3<
3098                 com.google.monitoring.v3.MutationRecord,
3099                 com.google.monitoring.v3.MutationRecord.Builder,
3100                 com.google.monitoring.v3.MutationRecordOrBuilder>(
3101                 getCreationRecord(), getParentForChildren(), isClean());
3102         creationRecord_ = null;
3103       }
3104       return creationRecordBuilder_;
3105     }
3106 
3107     private java.util.List<com.google.monitoring.v3.MutationRecord> mutationRecords_ =
3108         java.util.Collections.emptyList();
3109 
ensureMutationRecordsIsMutable()3110     private void ensureMutationRecordsIsMutable() {
3111       if (!((bitField0_ & 0x00000200) != 0)) {
3112         mutationRecords_ =
3113             new java.util.ArrayList<com.google.monitoring.v3.MutationRecord>(mutationRecords_);
3114         bitField0_ |= 0x00000200;
3115       }
3116     }
3117 
3118     private com.google.protobuf.RepeatedFieldBuilderV3<
3119             com.google.monitoring.v3.MutationRecord,
3120             com.google.monitoring.v3.MutationRecord.Builder,
3121             com.google.monitoring.v3.MutationRecordOrBuilder>
3122         mutationRecordsBuilder_;
3123 
3124     /**
3125      *
3126      *
3127      * <pre>
3128      * Records of the modification of this channel.
3129      * </pre>
3130      *
3131      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3132      */
getMutationRecordsList()3133     public java.util.List<com.google.monitoring.v3.MutationRecord> getMutationRecordsList() {
3134       if (mutationRecordsBuilder_ == null) {
3135         return java.util.Collections.unmodifiableList(mutationRecords_);
3136       } else {
3137         return mutationRecordsBuilder_.getMessageList();
3138       }
3139     }
3140     /**
3141      *
3142      *
3143      * <pre>
3144      * Records of the modification of this channel.
3145      * </pre>
3146      *
3147      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3148      */
getMutationRecordsCount()3149     public int getMutationRecordsCount() {
3150       if (mutationRecordsBuilder_ == null) {
3151         return mutationRecords_.size();
3152       } else {
3153         return mutationRecordsBuilder_.getCount();
3154       }
3155     }
3156     /**
3157      *
3158      *
3159      * <pre>
3160      * Records of the modification of this channel.
3161      * </pre>
3162      *
3163      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3164      */
getMutationRecords(int index)3165     public com.google.monitoring.v3.MutationRecord getMutationRecords(int index) {
3166       if (mutationRecordsBuilder_ == null) {
3167         return mutationRecords_.get(index);
3168       } else {
3169         return mutationRecordsBuilder_.getMessage(index);
3170       }
3171     }
3172     /**
3173      *
3174      *
3175      * <pre>
3176      * Records of the modification of this channel.
3177      * </pre>
3178      *
3179      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3180      */
setMutationRecords(int index, com.google.monitoring.v3.MutationRecord value)3181     public Builder setMutationRecords(int index, com.google.monitoring.v3.MutationRecord value) {
3182       if (mutationRecordsBuilder_ == null) {
3183         if (value == null) {
3184           throw new NullPointerException();
3185         }
3186         ensureMutationRecordsIsMutable();
3187         mutationRecords_.set(index, value);
3188         onChanged();
3189       } else {
3190         mutationRecordsBuilder_.setMessage(index, value);
3191       }
3192       return this;
3193     }
3194     /**
3195      *
3196      *
3197      * <pre>
3198      * Records of the modification of this channel.
3199      * </pre>
3200      *
3201      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3202      */
setMutationRecords( int index, com.google.monitoring.v3.MutationRecord.Builder builderForValue)3203     public Builder setMutationRecords(
3204         int index, com.google.monitoring.v3.MutationRecord.Builder builderForValue) {
3205       if (mutationRecordsBuilder_ == null) {
3206         ensureMutationRecordsIsMutable();
3207         mutationRecords_.set(index, builderForValue.build());
3208         onChanged();
3209       } else {
3210         mutationRecordsBuilder_.setMessage(index, builderForValue.build());
3211       }
3212       return this;
3213     }
3214     /**
3215      *
3216      *
3217      * <pre>
3218      * Records of the modification of this channel.
3219      * </pre>
3220      *
3221      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3222      */
addMutationRecords(com.google.monitoring.v3.MutationRecord value)3223     public Builder addMutationRecords(com.google.monitoring.v3.MutationRecord value) {
3224       if (mutationRecordsBuilder_ == null) {
3225         if (value == null) {
3226           throw new NullPointerException();
3227         }
3228         ensureMutationRecordsIsMutable();
3229         mutationRecords_.add(value);
3230         onChanged();
3231       } else {
3232         mutationRecordsBuilder_.addMessage(value);
3233       }
3234       return this;
3235     }
3236     /**
3237      *
3238      *
3239      * <pre>
3240      * Records of the modification of this channel.
3241      * </pre>
3242      *
3243      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3244      */
addMutationRecords(int index, com.google.monitoring.v3.MutationRecord value)3245     public Builder addMutationRecords(int index, com.google.monitoring.v3.MutationRecord value) {
3246       if (mutationRecordsBuilder_ == null) {
3247         if (value == null) {
3248           throw new NullPointerException();
3249         }
3250         ensureMutationRecordsIsMutable();
3251         mutationRecords_.add(index, value);
3252         onChanged();
3253       } else {
3254         mutationRecordsBuilder_.addMessage(index, value);
3255       }
3256       return this;
3257     }
3258     /**
3259      *
3260      *
3261      * <pre>
3262      * Records of the modification of this channel.
3263      * </pre>
3264      *
3265      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3266      */
addMutationRecords( com.google.monitoring.v3.MutationRecord.Builder builderForValue)3267     public Builder addMutationRecords(
3268         com.google.monitoring.v3.MutationRecord.Builder builderForValue) {
3269       if (mutationRecordsBuilder_ == null) {
3270         ensureMutationRecordsIsMutable();
3271         mutationRecords_.add(builderForValue.build());
3272         onChanged();
3273       } else {
3274         mutationRecordsBuilder_.addMessage(builderForValue.build());
3275       }
3276       return this;
3277     }
3278     /**
3279      *
3280      *
3281      * <pre>
3282      * Records of the modification of this channel.
3283      * </pre>
3284      *
3285      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3286      */
addMutationRecords( int index, com.google.monitoring.v3.MutationRecord.Builder builderForValue)3287     public Builder addMutationRecords(
3288         int index, com.google.monitoring.v3.MutationRecord.Builder builderForValue) {
3289       if (mutationRecordsBuilder_ == null) {
3290         ensureMutationRecordsIsMutable();
3291         mutationRecords_.add(index, builderForValue.build());
3292         onChanged();
3293       } else {
3294         mutationRecordsBuilder_.addMessage(index, builderForValue.build());
3295       }
3296       return this;
3297     }
3298     /**
3299      *
3300      *
3301      * <pre>
3302      * Records of the modification of this channel.
3303      * </pre>
3304      *
3305      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3306      */
addAllMutationRecords( java.lang.Iterable<? extends com.google.monitoring.v3.MutationRecord> values)3307     public Builder addAllMutationRecords(
3308         java.lang.Iterable<? extends com.google.monitoring.v3.MutationRecord> values) {
3309       if (mutationRecordsBuilder_ == null) {
3310         ensureMutationRecordsIsMutable();
3311         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mutationRecords_);
3312         onChanged();
3313       } else {
3314         mutationRecordsBuilder_.addAllMessages(values);
3315       }
3316       return this;
3317     }
3318     /**
3319      *
3320      *
3321      * <pre>
3322      * Records of the modification of this channel.
3323      * </pre>
3324      *
3325      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3326      */
clearMutationRecords()3327     public Builder clearMutationRecords() {
3328       if (mutationRecordsBuilder_ == null) {
3329         mutationRecords_ = java.util.Collections.emptyList();
3330         bitField0_ = (bitField0_ & ~0x00000200);
3331         onChanged();
3332       } else {
3333         mutationRecordsBuilder_.clear();
3334       }
3335       return this;
3336     }
3337     /**
3338      *
3339      *
3340      * <pre>
3341      * Records of the modification of this channel.
3342      * </pre>
3343      *
3344      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3345      */
removeMutationRecords(int index)3346     public Builder removeMutationRecords(int index) {
3347       if (mutationRecordsBuilder_ == null) {
3348         ensureMutationRecordsIsMutable();
3349         mutationRecords_.remove(index);
3350         onChanged();
3351       } else {
3352         mutationRecordsBuilder_.remove(index);
3353       }
3354       return this;
3355     }
3356     /**
3357      *
3358      *
3359      * <pre>
3360      * Records of the modification of this channel.
3361      * </pre>
3362      *
3363      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3364      */
getMutationRecordsBuilder(int index)3365     public com.google.monitoring.v3.MutationRecord.Builder getMutationRecordsBuilder(int index) {
3366       return getMutationRecordsFieldBuilder().getBuilder(index);
3367     }
3368     /**
3369      *
3370      *
3371      * <pre>
3372      * Records of the modification of this channel.
3373      * </pre>
3374      *
3375      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3376      */
getMutationRecordsOrBuilder(int index)3377     public com.google.monitoring.v3.MutationRecordOrBuilder getMutationRecordsOrBuilder(int index) {
3378       if (mutationRecordsBuilder_ == null) {
3379         return mutationRecords_.get(index);
3380       } else {
3381         return mutationRecordsBuilder_.getMessageOrBuilder(index);
3382       }
3383     }
3384     /**
3385      *
3386      *
3387      * <pre>
3388      * Records of the modification of this channel.
3389      * </pre>
3390      *
3391      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3392      */
3393     public java.util.List<? extends com.google.monitoring.v3.MutationRecordOrBuilder>
getMutationRecordsOrBuilderList()3394         getMutationRecordsOrBuilderList() {
3395       if (mutationRecordsBuilder_ != null) {
3396         return mutationRecordsBuilder_.getMessageOrBuilderList();
3397       } else {
3398         return java.util.Collections.unmodifiableList(mutationRecords_);
3399       }
3400     }
3401     /**
3402      *
3403      *
3404      * <pre>
3405      * Records of the modification of this channel.
3406      * </pre>
3407      *
3408      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3409      */
addMutationRecordsBuilder()3410     public com.google.monitoring.v3.MutationRecord.Builder addMutationRecordsBuilder() {
3411       return getMutationRecordsFieldBuilder()
3412           .addBuilder(com.google.monitoring.v3.MutationRecord.getDefaultInstance());
3413     }
3414     /**
3415      *
3416      *
3417      * <pre>
3418      * Records of the modification of this channel.
3419      * </pre>
3420      *
3421      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3422      */
addMutationRecordsBuilder(int index)3423     public com.google.monitoring.v3.MutationRecord.Builder addMutationRecordsBuilder(int index) {
3424       return getMutationRecordsFieldBuilder()
3425           .addBuilder(index, com.google.monitoring.v3.MutationRecord.getDefaultInstance());
3426     }
3427     /**
3428      *
3429      *
3430      * <pre>
3431      * Records of the modification of this channel.
3432      * </pre>
3433      *
3434      * <code>repeated .google.monitoring.v3.MutationRecord mutation_records = 13;</code>
3435      */
3436     public java.util.List<com.google.monitoring.v3.MutationRecord.Builder>
getMutationRecordsBuilderList()3437         getMutationRecordsBuilderList() {
3438       return getMutationRecordsFieldBuilder().getBuilderList();
3439     }
3440 
3441     private com.google.protobuf.RepeatedFieldBuilderV3<
3442             com.google.monitoring.v3.MutationRecord,
3443             com.google.monitoring.v3.MutationRecord.Builder,
3444             com.google.monitoring.v3.MutationRecordOrBuilder>
getMutationRecordsFieldBuilder()3445         getMutationRecordsFieldBuilder() {
3446       if (mutationRecordsBuilder_ == null) {
3447         mutationRecordsBuilder_ =
3448             new com.google.protobuf.RepeatedFieldBuilderV3<
3449                 com.google.monitoring.v3.MutationRecord,
3450                 com.google.monitoring.v3.MutationRecord.Builder,
3451                 com.google.monitoring.v3.MutationRecordOrBuilder>(
3452                 mutationRecords_,
3453                 ((bitField0_ & 0x00000200) != 0),
3454                 getParentForChildren(),
3455                 isClean());
3456         mutationRecords_ = null;
3457       }
3458       return mutationRecordsBuilder_;
3459     }
3460 
3461     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3462     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3463       return super.setUnknownFields(unknownFields);
3464     }
3465 
3466     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3467     public final Builder mergeUnknownFields(
3468         final com.google.protobuf.UnknownFieldSet unknownFields) {
3469       return super.mergeUnknownFields(unknownFields);
3470     }
3471 
3472     // @@protoc_insertion_point(builder_scope:google.monitoring.v3.NotificationChannel)
3473   }
3474 
3475   // @@protoc_insertion_point(class_scope:google.monitoring.v3.NotificationChannel)
3476   private static final com.google.monitoring.v3.NotificationChannel DEFAULT_INSTANCE;
3477 
3478   static {
3479     DEFAULT_INSTANCE = new com.google.monitoring.v3.NotificationChannel();
3480   }
3481 
getDefaultInstance()3482   public static com.google.monitoring.v3.NotificationChannel getDefaultInstance() {
3483     return DEFAULT_INSTANCE;
3484   }
3485 
3486   private static final com.google.protobuf.Parser<NotificationChannel> PARSER =
3487       new com.google.protobuf.AbstractParser<NotificationChannel>() {
3488         @java.lang.Override
3489         public NotificationChannel parsePartialFrom(
3490             com.google.protobuf.CodedInputStream input,
3491             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3492             throws com.google.protobuf.InvalidProtocolBufferException {
3493           Builder builder = newBuilder();
3494           try {
3495             builder.mergeFrom(input, extensionRegistry);
3496           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3497             throw e.setUnfinishedMessage(builder.buildPartial());
3498           } catch (com.google.protobuf.UninitializedMessageException e) {
3499             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3500           } catch (java.io.IOException e) {
3501             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3502                 .setUnfinishedMessage(builder.buildPartial());
3503           }
3504           return builder.buildPartial();
3505         }
3506       };
3507 
parser()3508   public static com.google.protobuf.Parser<NotificationChannel> parser() {
3509     return PARSER;
3510   }
3511 
3512   @java.lang.Override
getParserForType()3513   public com.google.protobuf.Parser<NotificationChannel> getParserForType() {
3514     return PARSER;
3515   }
3516 
3517   @java.lang.Override
getDefaultInstanceForType()3518   public com.google.monitoring.v3.NotificationChannel getDefaultInstanceForType() {
3519     return DEFAULT_INSTANCE;
3520   }
3521 }
3522