• 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/alert.proto
18 
19 package com.google.monitoring.v3;
20 
21 /**
22  *
23  *
24  * <pre>
25  * A description of the conditions under which some aspect of your system is
26  * considered to be "unhealthy" and the ways to notify people or services about
27  * this state. For an overview of alert policies, see
28  * [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/).
29  * </pre>
30  *
31  * Protobuf type {@code google.monitoring.v3.AlertPolicy}
32  */
33 public final class AlertPolicy extends com.google.protobuf.GeneratedMessageV3
34     implements
35     // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy)
36     AlertPolicyOrBuilder {
37   private static final long serialVersionUID = 0L;
38   // Use AlertPolicy.newBuilder() to construct.
AlertPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)39   private AlertPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
40     super(builder);
41   }
42 
AlertPolicy()43   private AlertPolicy() {
44     name_ = "";
45     displayName_ = "";
46     conditions_ = java.util.Collections.emptyList();
47     combiner_ = 0;
48     notificationChannels_ = com.google.protobuf.LazyStringArrayList.EMPTY;
49   }
50 
51   @java.lang.Override
52   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)53   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
54     return new AlertPolicy();
55   }
56 
57   @java.lang.Override
getUnknownFields()58   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
59     return this.unknownFields;
60   }
61 
getDescriptor()62   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
63     return com.google.monitoring.v3.AlertProto
64         .internal_static_google_monitoring_v3_AlertPolicy_descriptor;
65   }
66 
67   @SuppressWarnings({"rawtypes"})
68   @java.lang.Override
internalGetMapField(int number)69   protected com.google.protobuf.MapField internalGetMapField(int number) {
70     switch (number) {
71       case 16:
72         return internalGetUserLabels();
73       default:
74         throw new RuntimeException("Invalid map field number: " + number);
75     }
76   }
77 
78   @java.lang.Override
79   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()80       internalGetFieldAccessorTable() {
81     return com.google.monitoring.v3.AlertProto
82         .internal_static_google_monitoring_v3_AlertPolicy_fieldAccessorTable
83         .ensureFieldAccessorsInitialized(
84             com.google.monitoring.v3.AlertPolicy.class,
85             com.google.monitoring.v3.AlertPolicy.Builder.class);
86   }
87 
88   /**
89    *
90    *
91    * <pre>
92    * Operators for combining conditions.
93    * </pre>
94    *
95    * Protobuf enum {@code google.monitoring.v3.AlertPolicy.ConditionCombinerType}
96    */
97   public enum ConditionCombinerType implements com.google.protobuf.ProtocolMessageEnum {
98     /**
99      *
100      *
101      * <pre>
102      * An unspecified combiner.
103      * </pre>
104      *
105      * <code>COMBINE_UNSPECIFIED = 0;</code>
106      */
107     COMBINE_UNSPECIFIED(0),
108     /**
109      *
110      *
111      * <pre>
112      * Combine conditions using the logical `AND` operator. An
113      * incident is created only if all the conditions are met
114      * simultaneously. This combiner is satisfied if all conditions are
115      * met, even if they are met on completely different resources.
116      * </pre>
117      *
118      * <code>AND = 1;</code>
119      */
120     AND(1),
121     /**
122      *
123      *
124      * <pre>
125      * Combine conditions using the logical `OR` operator. An incident
126      * is created if any of the listed conditions is met.
127      * </pre>
128      *
129      * <code>OR = 2;</code>
130      */
131     OR(2),
132     /**
133      *
134      *
135      * <pre>
136      * Combine conditions using logical `AND` operator, but unlike the regular
137      * `AND` option, an incident is created only if all conditions are met
138      * simultaneously on at least one resource.
139      * </pre>
140      *
141      * <code>AND_WITH_MATCHING_RESOURCE = 3;</code>
142      */
143     AND_WITH_MATCHING_RESOURCE(3),
144     UNRECOGNIZED(-1),
145     ;
146 
147     /**
148      *
149      *
150      * <pre>
151      * An unspecified combiner.
152      * </pre>
153      *
154      * <code>COMBINE_UNSPECIFIED = 0;</code>
155      */
156     public static final int COMBINE_UNSPECIFIED_VALUE = 0;
157     /**
158      *
159      *
160      * <pre>
161      * Combine conditions using the logical `AND` operator. An
162      * incident is created only if all the conditions are met
163      * simultaneously. This combiner is satisfied if all conditions are
164      * met, even if they are met on completely different resources.
165      * </pre>
166      *
167      * <code>AND = 1;</code>
168      */
169     public static final int AND_VALUE = 1;
170     /**
171      *
172      *
173      * <pre>
174      * Combine conditions using the logical `OR` operator. An incident
175      * is created if any of the listed conditions is met.
176      * </pre>
177      *
178      * <code>OR = 2;</code>
179      */
180     public static final int OR_VALUE = 2;
181     /**
182      *
183      *
184      * <pre>
185      * Combine conditions using logical `AND` operator, but unlike the regular
186      * `AND` option, an incident is created only if all conditions are met
187      * simultaneously on at least one resource.
188      * </pre>
189      *
190      * <code>AND_WITH_MATCHING_RESOURCE = 3;</code>
191      */
192     public static final int AND_WITH_MATCHING_RESOURCE_VALUE = 3;
193 
getNumber()194     public final int getNumber() {
195       if (this == UNRECOGNIZED) {
196         throw new java.lang.IllegalArgumentException(
197             "Can't get the number of an unknown enum value.");
198       }
199       return value;
200     }
201 
202     /**
203      * @param value The numeric wire value of the corresponding enum entry.
204      * @return The enum associated with the given numeric wire value.
205      * @deprecated Use {@link #forNumber(int)} instead.
206      */
207     @java.lang.Deprecated
valueOf(int value)208     public static ConditionCombinerType valueOf(int value) {
209       return forNumber(value);
210     }
211 
212     /**
213      * @param value The numeric wire value of the corresponding enum entry.
214      * @return The enum associated with the given numeric wire value.
215      */
forNumber(int value)216     public static ConditionCombinerType forNumber(int value) {
217       switch (value) {
218         case 0:
219           return COMBINE_UNSPECIFIED;
220         case 1:
221           return AND;
222         case 2:
223           return OR;
224         case 3:
225           return AND_WITH_MATCHING_RESOURCE;
226         default:
227           return null;
228       }
229     }
230 
231     public static com.google.protobuf.Internal.EnumLiteMap<ConditionCombinerType>
internalGetValueMap()232         internalGetValueMap() {
233       return internalValueMap;
234     }
235 
236     private static final com.google.protobuf.Internal.EnumLiteMap<ConditionCombinerType>
237         internalValueMap =
238             new com.google.protobuf.Internal.EnumLiteMap<ConditionCombinerType>() {
239               public ConditionCombinerType findValueByNumber(int number) {
240                 return ConditionCombinerType.forNumber(number);
241               }
242             };
243 
getValueDescriptor()244     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
245       if (this == UNRECOGNIZED) {
246         throw new java.lang.IllegalStateException(
247             "Can't get the descriptor of an unrecognized enum value.");
248       }
249       return getDescriptor().getValues().get(ordinal());
250     }
251 
getDescriptorForType()252     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
253       return getDescriptor();
254     }
255 
getDescriptor()256     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
257       return com.google.monitoring.v3.AlertPolicy.getDescriptor().getEnumTypes().get(0);
258     }
259 
260     private static final ConditionCombinerType[] VALUES = values();
261 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)262     public static ConditionCombinerType valueOf(
263         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
264       if (desc.getType() != getDescriptor()) {
265         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
266       }
267       if (desc.getIndex() == -1) {
268         return UNRECOGNIZED;
269       }
270       return VALUES[desc.getIndex()];
271     }
272 
273     private final int value;
274 
ConditionCombinerType(int value)275     private ConditionCombinerType(int value) {
276       this.value = value;
277     }
278 
279     // @@protoc_insertion_point(enum_scope:google.monitoring.v3.AlertPolicy.ConditionCombinerType)
280   }
281 
282   public interface DocumentationOrBuilder
283       extends
284       // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy.Documentation)
285       com.google.protobuf.MessageOrBuilder {
286 
287     /**
288      *
289      *
290      * <pre>
291      * The text of the documentation, interpreted according to `mime_type`.
292      * The content may not exceed 8,192 Unicode characters and may not exceed
293      * more than 10,240 bytes when encoded in UTF-8 format, whichever is
294      * smaller. This text can be [templatized by using
295      * variables](https://cloud.google.com/monitoring/alerts/doc-variables).
296      * </pre>
297      *
298      * <code>string content = 1;</code>
299      *
300      * @return The content.
301      */
getContent()302     java.lang.String getContent();
303     /**
304      *
305      *
306      * <pre>
307      * The text of the documentation, interpreted according to `mime_type`.
308      * The content may not exceed 8,192 Unicode characters and may not exceed
309      * more than 10,240 bytes when encoded in UTF-8 format, whichever is
310      * smaller. This text can be [templatized by using
311      * variables](https://cloud.google.com/monitoring/alerts/doc-variables).
312      * </pre>
313      *
314      * <code>string content = 1;</code>
315      *
316      * @return The bytes for content.
317      */
getContentBytes()318     com.google.protobuf.ByteString getContentBytes();
319 
320     /**
321      *
322      *
323      * <pre>
324      * The format of the `content` field. Presently, only the value
325      * `"text/markdown"` is supported. See
326      * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
327      * </pre>
328      *
329      * <code>string mime_type = 2;</code>
330      *
331      * @return The mimeType.
332      */
getMimeType()333     java.lang.String getMimeType();
334     /**
335      *
336      *
337      * <pre>
338      * The format of the `content` field. Presently, only the value
339      * `"text/markdown"` is supported. See
340      * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
341      * </pre>
342      *
343      * <code>string mime_type = 2;</code>
344      *
345      * @return The bytes for mimeType.
346      */
getMimeTypeBytes()347     com.google.protobuf.ByteString getMimeTypeBytes();
348   }
349   /**
350    *
351    *
352    * <pre>
353    * A content string and a MIME type that describes the content string's
354    * format.
355    * </pre>
356    *
357    * Protobuf type {@code google.monitoring.v3.AlertPolicy.Documentation}
358    */
359   public static final class Documentation extends com.google.protobuf.GeneratedMessageV3
360       implements
361       // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy.Documentation)
362       DocumentationOrBuilder {
363     private static final long serialVersionUID = 0L;
364     // Use Documentation.newBuilder() to construct.
Documentation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)365     private Documentation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
366       super(builder);
367     }
368 
Documentation()369     private Documentation() {
370       content_ = "";
371       mimeType_ = "";
372     }
373 
374     @java.lang.Override
375     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)376     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
377       return new Documentation();
378     }
379 
380     @java.lang.Override
getUnknownFields()381     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
382       return this.unknownFields;
383     }
384 
getDescriptor()385     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
386       return com.google.monitoring.v3.AlertProto
387           .internal_static_google_monitoring_v3_AlertPolicy_Documentation_descriptor;
388     }
389 
390     @java.lang.Override
391     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()392         internalGetFieldAccessorTable() {
393       return com.google.monitoring.v3.AlertProto
394           .internal_static_google_monitoring_v3_AlertPolicy_Documentation_fieldAccessorTable
395           .ensureFieldAccessorsInitialized(
396               com.google.monitoring.v3.AlertPolicy.Documentation.class,
397               com.google.monitoring.v3.AlertPolicy.Documentation.Builder.class);
398     }
399 
400     public static final int CONTENT_FIELD_NUMBER = 1;
401 
402     @SuppressWarnings("serial")
403     private volatile java.lang.Object content_ = "";
404     /**
405      *
406      *
407      * <pre>
408      * The text of the documentation, interpreted according to `mime_type`.
409      * The content may not exceed 8,192 Unicode characters and may not exceed
410      * more than 10,240 bytes when encoded in UTF-8 format, whichever is
411      * smaller. This text can be [templatized by using
412      * variables](https://cloud.google.com/monitoring/alerts/doc-variables).
413      * </pre>
414      *
415      * <code>string content = 1;</code>
416      *
417      * @return The content.
418      */
419     @java.lang.Override
getContent()420     public java.lang.String getContent() {
421       java.lang.Object ref = content_;
422       if (ref instanceof java.lang.String) {
423         return (java.lang.String) ref;
424       } else {
425         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
426         java.lang.String s = bs.toStringUtf8();
427         content_ = s;
428         return s;
429       }
430     }
431     /**
432      *
433      *
434      * <pre>
435      * The text of the documentation, interpreted according to `mime_type`.
436      * The content may not exceed 8,192 Unicode characters and may not exceed
437      * more than 10,240 bytes when encoded in UTF-8 format, whichever is
438      * smaller. This text can be [templatized by using
439      * variables](https://cloud.google.com/monitoring/alerts/doc-variables).
440      * </pre>
441      *
442      * <code>string content = 1;</code>
443      *
444      * @return The bytes for content.
445      */
446     @java.lang.Override
getContentBytes()447     public com.google.protobuf.ByteString getContentBytes() {
448       java.lang.Object ref = content_;
449       if (ref instanceof java.lang.String) {
450         com.google.protobuf.ByteString b =
451             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
452         content_ = b;
453         return b;
454       } else {
455         return (com.google.protobuf.ByteString) ref;
456       }
457     }
458 
459     public static final int MIME_TYPE_FIELD_NUMBER = 2;
460 
461     @SuppressWarnings("serial")
462     private volatile java.lang.Object mimeType_ = "";
463     /**
464      *
465      *
466      * <pre>
467      * The format of the `content` field. Presently, only the value
468      * `"text/markdown"` is supported. See
469      * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
470      * </pre>
471      *
472      * <code>string mime_type = 2;</code>
473      *
474      * @return The mimeType.
475      */
476     @java.lang.Override
getMimeType()477     public java.lang.String getMimeType() {
478       java.lang.Object ref = mimeType_;
479       if (ref instanceof java.lang.String) {
480         return (java.lang.String) ref;
481       } else {
482         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
483         java.lang.String s = bs.toStringUtf8();
484         mimeType_ = s;
485         return s;
486       }
487     }
488     /**
489      *
490      *
491      * <pre>
492      * The format of the `content` field. Presently, only the value
493      * `"text/markdown"` is supported. See
494      * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
495      * </pre>
496      *
497      * <code>string mime_type = 2;</code>
498      *
499      * @return The bytes for mimeType.
500      */
501     @java.lang.Override
getMimeTypeBytes()502     public com.google.protobuf.ByteString getMimeTypeBytes() {
503       java.lang.Object ref = mimeType_;
504       if (ref instanceof java.lang.String) {
505         com.google.protobuf.ByteString b =
506             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
507         mimeType_ = b;
508         return b;
509       } else {
510         return (com.google.protobuf.ByteString) ref;
511       }
512     }
513 
514     private byte memoizedIsInitialized = -1;
515 
516     @java.lang.Override
isInitialized()517     public final boolean isInitialized() {
518       byte isInitialized = memoizedIsInitialized;
519       if (isInitialized == 1) return true;
520       if (isInitialized == 0) return false;
521 
522       memoizedIsInitialized = 1;
523       return true;
524     }
525 
526     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)527     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
528       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
529         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_);
530       }
531       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) {
532         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_);
533       }
534       getUnknownFields().writeTo(output);
535     }
536 
537     @java.lang.Override
getSerializedSize()538     public int getSerializedSize() {
539       int size = memoizedSize;
540       if (size != -1) return size;
541 
542       size = 0;
543       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
544         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_);
545       }
546       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) {
547         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_);
548       }
549       size += getUnknownFields().getSerializedSize();
550       memoizedSize = size;
551       return size;
552     }
553 
554     @java.lang.Override
equals(final java.lang.Object obj)555     public boolean equals(final java.lang.Object obj) {
556       if (obj == this) {
557         return true;
558       }
559       if (!(obj instanceof com.google.monitoring.v3.AlertPolicy.Documentation)) {
560         return super.equals(obj);
561       }
562       com.google.monitoring.v3.AlertPolicy.Documentation other =
563           (com.google.monitoring.v3.AlertPolicy.Documentation) obj;
564 
565       if (!getContent().equals(other.getContent())) return false;
566       if (!getMimeType().equals(other.getMimeType())) return false;
567       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
568       return true;
569     }
570 
571     @java.lang.Override
hashCode()572     public int hashCode() {
573       if (memoizedHashCode != 0) {
574         return memoizedHashCode;
575       }
576       int hash = 41;
577       hash = (19 * hash) + getDescriptor().hashCode();
578       hash = (37 * hash) + CONTENT_FIELD_NUMBER;
579       hash = (53 * hash) + getContent().hashCode();
580       hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
581       hash = (53 * hash) + getMimeType().hashCode();
582       hash = (29 * hash) + getUnknownFields().hashCode();
583       memoizedHashCode = hash;
584       return hash;
585     }
586 
parseFrom( java.nio.ByteBuffer data)587     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(
588         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
589       return PARSER.parseFrom(data);
590     }
591 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)592     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(
593         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
594         throws com.google.protobuf.InvalidProtocolBufferException {
595       return PARSER.parseFrom(data, extensionRegistry);
596     }
597 
parseFrom( com.google.protobuf.ByteString data)598     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(
599         com.google.protobuf.ByteString data)
600         throws com.google.protobuf.InvalidProtocolBufferException {
601       return PARSER.parseFrom(data);
602     }
603 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)604     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(
605         com.google.protobuf.ByteString data,
606         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
607         throws com.google.protobuf.InvalidProtocolBufferException {
608       return PARSER.parseFrom(data, extensionRegistry);
609     }
610 
parseFrom(byte[] data)611     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(byte[] data)
612         throws com.google.protobuf.InvalidProtocolBufferException {
613       return PARSER.parseFrom(data);
614     }
615 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)616     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(
617         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
618         throws com.google.protobuf.InvalidProtocolBufferException {
619       return PARSER.parseFrom(data, extensionRegistry);
620     }
621 
parseFrom( java.io.InputStream input)622     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(
623         java.io.InputStream input) throws java.io.IOException {
624       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
625     }
626 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)627     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(
628         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
629         throws java.io.IOException {
630       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
631           PARSER, input, extensionRegistry);
632     }
633 
parseDelimitedFrom( java.io.InputStream input)634     public static com.google.monitoring.v3.AlertPolicy.Documentation parseDelimitedFrom(
635         java.io.InputStream input) throws java.io.IOException {
636       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
637     }
638 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)639     public static com.google.monitoring.v3.AlertPolicy.Documentation parseDelimitedFrom(
640         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
641         throws java.io.IOException {
642       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
643           PARSER, input, extensionRegistry);
644     }
645 
parseFrom( com.google.protobuf.CodedInputStream input)646     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(
647         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
648       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
649     }
650 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)651     public static com.google.monitoring.v3.AlertPolicy.Documentation parseFrom(
652         com.google.protobuf.CodedInputStream input,
653         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
654         throws java.io.IOException {
655       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
656           PARSER, input, extensionRegistry);
657     }
658 
659     @java.lang.Override
newBuilderForType()660     public Builder newBuilderForType() {
661       return newBuilder();
662     }
663 
newBuilder()664     public static Builder newBuilder() {
665       return DEFAULT_INSTANCE.toBuilder();
666     }
667 
newBuilder(com.google.monitoring.v3.AlertPolicy.Documentation prototype)668     public static Builder newBuilder(com.google.monitoring.v3.AlertPolicy.Documentation prototype) {
669       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
670     }
671 
672     @java.lang.Override
toBuilder()673     public Builder toBuilder() {
674       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
675     }
676 
677     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)678     protected Builder newBuilderForType(
679         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
680       Builder builder = new Builder(parent);
681       return builder;
682     }
683     /**
684      *
685      *
686      * <pre>
687      * A content string and a MIME type that describes the content string's
688      * format.
689      * </pre>
690      *
691      * Protobuf type {@code google.monitoring.v3.AlertPolicy.Documentation}
692      */
693     public static final class Builder
694         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
695         implements
696         // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy.Documentation)
697         com.google.monitoring.v3.AlertPolicy.DocumentationOrBuilder {
getDescriptor()698       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
699         return com.google.monitoring.v3.AlertProto
700             .internal_static_google_monitoring_v3_AlertPolicy_Documentation_descriptor;
701       }
702 
703       @java.lang.Override
704       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()705           internalGetFieldAccessorTable() {
706         return com.google.monitoring.v3.AlertProto
707             .internal_static_google_monitoring_v3_AlertPolicy_Documentation_fieldAccessorTable
708             .ensureFieldAccessorsInitialized(
709                 com.google.monitoring.v3.AlertPolicy.Documentation.class,
710                 com.google.monitoring.v3.AlertPolicy.Documentation.Builder.class);
711       }
712 
713       // Construct using com.google.monitoring.v3.AlertPolicy.Documentation.newBuilder()
Builder()714       private Builder() {}
715 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)716       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
717         super(parent);
718       }
719 
720       @java.lang.Override
clear()721       public Builder clear() {
722         super.clear();
723         bitField0_ = 0;
724         content_ = "";
725         mimeType_ = "";
726         return this;
727       }
728 
729       @java.lang.Override
getDescriptorForType()730       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
731         return com.google.monitoring.v3.AlertProto
732             .internal_static_google_monitoring_v3_AlertPolicy_Documentation_descriptor;
733       }
734 
735       @java.lang.Override
getDefaultInstanceForType()736       public com.google.monitoring.v3.AlertPolicy.Documentation getDefaultInstanceForType() {
737         return com.google.monitoring.v3.AlertPolicy.Documentation.getDefaultInstance();
738       }
739 
740       @java.lang.Override
build()741       public com.google.monitoring.v3.AlertPolicy.Documentation build() {
742         com.google.monitoring.v3.AlertPolicy.Documentation result = buildPartial();
743         if (!result.isInitialized()) {
744           throw newUninitializedMessageException(result);
745         }
746         return result;
747       }
748 
749       @java.lang.Override
buildPartial()750       public com.google.monitoring.v3.AlertPolicy.Documentation buildPartial() {
751         com.google.monitoring.v3.AlertPolicy.Documentation result =
752             new com.google.monitoring.v3.AlertPolicy.Documentation(this);
753         if (bitField0_ != 0) {
754           buildPartial0(result);
755         }
756         onBuilt();
757         return result;
758       }
759 
buildPartial0(com.google.monitoring.v3.AlertPolicy.Documentation result)760       private void buildPartial0(com.google.monitoring.v3.AlertPolicy.Documentation result) {
761         int from_bitField0_ = bitField0_;
762         if (((from_bitField0_ & 0x00000001) != 0)) {
763           result.content_ = content_;
764         }
765         if (((from_bitField0_ & 0x00000002) != 0)) {
766           result.mimeType_ = mimeType_;
767         }
768       }
769 
770       @java.lang.Override
clone()771       public Builder clone() {
772         return super.clone();
773       }
774 
775       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)776       public Builder setField(
777           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
778         return super.setField(field, value);
779       }
780 
781       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)782       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
783         return super.clearField(field);
784       }
785 
786       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)787       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
788         return super.clearOneof(oneof);
789       }
790 
791       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)792       public Builder setRepeatedField(
793           com.google.protobuf.Descriptors.FieldDescriptor field,
794           int index,
795           java.lang.Object value) {
796         return super.setRepeatedField(field, index, value);
797       }
798 
799       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)800       public Builder addRepeatedField(
801           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
802         return super.addRepeatedField(field, value);
803       }
804 
805       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)806       public Builder mergeFrom(com.google.protobuf.Message other) {
807         if (other instanceof com.google.monitoring.v3.AlertPolicy.Documentation) {
808           return mergeFrom((com.google.monitoring.v3.AlertPolicy.Documentation) other);
809         } else {
810           super.mergeFrom(other);
811           return this;
812         }
813       }
814 
mergeFrom(com.google.monitoring.v3.AlertPolicy.Documentation other)815       public Builder mergeFrom(com.google.monitoring.v3.AlertPolicy.Documentation other) {
816         if (other == com.google.monitoring.v3.AlertPolicy.Documentation.getDefaultInstance())
817           return this;
818         if (!other.getContent().isEmpty()) {
819           content_ = other.content_;
820           bitField0_ |= 0x00000001;
821           onChanged();
822         }
823         if (!other.getMimeType().isEmpty()) {
824           mimeType_ = other.mimeType_;
825           bitField0_ |= 0x00000002;
826           onChanged();
827         }
828         this.mergeUnknownFields(other.getUnknownFields());
829         onChanged();
830         return this;
831       }
832 
833       @java.lang.Override
isInitialized()834       public final boolean isInitialized() {
835         return true;
836       }
837 
838       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)839       public Builder mergeFrom(
840           com.google.protobuf.CodedInputStream input,
841           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
842           throws java.io.IOException {
843         if (extensionRegistry == null) {
844           throw new java.lang.NullPointerException();
845         }
846         try {
847           boolean done = false;
848           while (!done) {
849             int tag = input.readTag();
850             switch (tag) {
851               case 0:
852                 done = true;
853                 break;
854               case 10:
855                 {
856                   content_ = input.readStringRequireUtf8();
857                   bitField0_ |= 0x00000001;
858                   break;
859                 } // case 10
860               case 18:
861                 {
862                   mimeType_ = input.readStringRequireUtf8();
863                   bitField0_ |= 0x00000002;
864                   break;
865                 } // case 18
866               default:
867                 {
868                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
869                     done = true; // was an endgroup tag
870                   }
871                   break;
872                 } // default:
873             } // switch (tag)
874           } // while (!done)
875         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
876           throw e.unwrapIOException();
877         } finally {
878           onChanged();
879         } // finally
880         return this;
881       }
882 
883       private int bitField0_;
884 
885       private java.lang.Object content_ = "";
886       /**
887        *
888        *
889        * <pre>
890        * The text of the documentation, interpreted according to `mime_type`.
891        * The content may not exceed 8,192 Unicode characters and may not exceed
892        * more than 10,240 bytes when encoded in UTF-8 format, whichever is
893        * smaller. This text can be [templatized by using
894        * variables](https://cloud.google.com/monitoring/alerts/doc-variables).
895        * </pre>
896        *
897        * <code>string content = 1;</code>
898        *
899        * @return The content.
900        */
getContent()901       public java.lang.String getContent() {
902         java.lang.Object ref = content_;
903         if (!(ref instanceof java.lang.String)) {
904           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
905           java.lang.String s = bs.toStringUtf8();
906           content_ = s;
907           return s;
908         } else {
909           return (java.lang.String) ref;
910         }
911       }
912       /**
913        *
914        *
915        * <pre>
916        * The text of the documentation, interpreted according to `mime_type`.
917        * The content may not exceed 8,192 Unicode characters and may not exceed
918        * more than 10,240 bytes when encoded in UTF-8 format, whichever is
919        * smaller. This text can be [templatized by using
920        * variables](https://cloud.google.com/monitoring/alerts/doc-variables).
921        * </pre>
922        *
923        * <code>string content = 1;</code>
924        *
925        * @return The bytes for content.
926        */
getContentBytes()927       public com.google.protobuf.ByteString getContentBytes() {
928         java.lang.Object ref = content_;
929         if (ref instanceof String) {
930           com.google.protobuf.ByteString b =
931               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
932           content_ = b;
933           return b;
934         } else {
935           return (com.google.protobuf.ByteString) ref;
936         }
937       }
938       /**
939        *
940        *
941        * <pre>
942        * The text of the documentation, interpreted according to `mime_type`.
943        * The content may not exceed 8,192 Unicode characters and may not exceed
944        * more than 10,240 bytes when encoded in UTF-8 format, whichever is
945        * smaller. This text can be [templatized by using
946        * variables](https://cloud.google.com/monitoring/alerts/doc-variables).
947        * </pre>
948        *
949        * <code>string content = 1;</code>
950        *
951        * @param value The content to set.
952        * @return This builder for chaining.
953        */
setContent(java.lang.String value)954       public Builder setContent(java.lang.String value) {
955         if (value == null) {
956           throw new NullPointerException();
957         }
958         content_ = value;
959         bitField0_ |= 0x00000001;
960         onChanged();
961         return this;
962       }
963       /**
964        *
965        *
966        * <pre>
967        * The text of the documentation, interpreted according to `mime_type`.
968        * The content may not exceed 8,192 Unicode characters and may not exceed
969        * more than 10,240 bytes when encoded in UTF-8 format, whichever is
970        * smaller. This text can be [templatized by using
971        * variables](https://cloud.google.com/monitoring/alerts/doc-variables).
972        * </pre>
973        *
974        * <code>string content = 1;</code>
975        *
976        * @return This builder for chaining.
977        */
clearContent()978       public Builder clearContent() {
979         content_ = getDefaultInstance().getContent();
980         bitField0_ = (bitField0_ & ~0x00000001);
981         onChanged();
982         return this;
983       }
984       /**
985        *
986        *
987        * <pre>
988        * The text of the documentation, interpreted according to `mime_type`.
989        * The content may not exceed 8,192 Unicode characters and may not exceed
990        * more than 10,240 bytes when encoded in UTF-8 format, whichever is
991        * smaller. This text can be [templatized by using
992        * variables](https://cloud.google.com/monitoring/alerts/doc-variables).
993        * </pre>
994        *
995        * <code>string content = 1;</code>
996        *
997        * @param value The bytes for content to set.
998        * @return This builder for chaining.
999        */
setContentBytes(com.google.protobuf.ByteString value)1000       public Builder setContentBytes(com.google.protobuf.ByteString value) {
1001         if (value == null) {
1002           throw new NullPointerException();
1003         }
1004         checkByteStringIsUtf8(value);
1005         content_ = value;
1006         bitField0_ |= 0x00000001;
1007         onChanged();
1008         return this;
1009       }
1010 
1011       private java.lang.Object mimeType_ = "";
1012       /**
1013        *
1014        *
1015        * <pre>
1016        * The format of the `content` field. Presently, only the value
1017        * `"text/markdown"` is supported. See
1018        * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
1019        * </pre>
1020        *
1021        * <code>string mime_type = 2;</code>
1022        *
1023        * @return The mimeType.
1024        */
getMimeType()1025       public java.lang.String getMimeType() {
1026         java.lang.Object ref = mimeType_;
1027         if (!(ref instanceof java.lang.String)) {
1028           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1029           java.lang.String s = bs.toStringUtf8();
1030           mimeType_ = s;
1031           return s;
1032         } else {
1033           return (java.lang.String) ref;
1034         }
1035       }
1036       /**
1037        *
1038        *
1039        * <pre>
1040        * The format of the `content` field. Presently, only the value
1041        * `"text/markdown"` is supported. See
1042        * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
1043        * </pre>
1044        *
1045        * <code>string mime_type = 2;</code>
1046        *
1047        * @return The bytes for mimeType.
1048        */
getMimeTypeBytes()1049       public com.google.protobuf.ByteString getMimeTypeBytes() {
1050         java.lang.Object ref = mimeType_;
1051         if (ref instanceof String) {
1052           com.google.protobuf.ByteString b =
1053               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1054           mimeType_ = b;
1055           return b;
1056         } else {
1057           return (com.google.protobuf.ByteString) ref;
1058         }
1059       }
1060       /**
1061        *
1062        *
1063        * <pre>
1064        * The format of the `content` field. Presently, only the value
1065        * `"text/markdown"` is supported. See
1066        * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
1067        * </pre>
1068        *
1069        * <code>string mime_type = 2;</code>
1070        *
1071        * @param value The mimeType to set.
1072        * @return This builder for chaining.
1073        */
setMimeType(java.lang.String value)1074       public Builder setMimeType(java.lang.String value) {
1075         if (value == null) {
1076           throw new NullPointerException();
1077         }
1078         mimeType_ = value;
1079         bitField0_ |= 0x00000002;
1080         onChanged();
1081         return this;
1082       }
1083       /**
1084        *
1085        *
1086        * <pre>
1087        * The format of the `content` field. Presently, only the value
1088        * `"text/markdown"` is supported. See
1089        * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
1090        * </pre>
1091        *
1092        * <code>string mime_type = 2;</code>
1093        *
1094        * @return This builder for chaining.
1095        */
clearMimeType()1096       public Builder clearMimeType() {
1097         mimeType_ = getDefaultInstance().getMimeType();
1098         bitField0_ = (bitField0_ & ~0x00000002);
1099         onChanged();
1100         return this;
1101       }
1102       /**
1103        *
1104        *
1105        * <pre>
1106        * The format of the `content` field. Presently, only the value
1107        * `"text/markdown"` is supported. See
1108        * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
1109        * </pre>
1110        *
1111        * <code>string mime_type = 2;</code>
1112        *
1113        * @param value The bytes for mimeType to set.
1114        * @return This builder for chaining.
1115        */
setMimeTypeBytes(com.google.protobuf.ByteString value)1116       public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) {
1117         if (value == null) {
1118           throw new NullPointerException();
1119         }
1120         checkByteStringIsUtf8(value);
1121         mimeType_ = value;
1122         bitField0_ |= 0x00000002;
1123         onChanged();
1124         return this;
1125       }
1126 
1127       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1128       public final Builder setUnknownFields(
1129           final com.google.protobuf.UnknownFieldSet unknownFields) {
1130         return super.setUnknownFields(unknownFields);
1131       }
1132 
1133       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1134       public final Builder mergeUnknownFields(
1135           final com.google.protobuf.UnknownFieldSet unknownFields) {
1136         return super.mergeUnknownFields(unknownFields);
1137       }
1138 
1139       // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy.Documentation)
1140     }
1141 
1142     // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Documentation)
1143     private static final com.google.monitoring.v3.AlertPolicy.Documentation DEFAULT_INSTANCE;
1144 
1145     static {
1146       DEFAULT_INSTANCE = new com.google.monitoring.v3.AlertPolicy.Documentation();
1147     }
1148 
getDefaultInstance()1149     public static com.google.monitoring.v3.AlertPolicy.Documentation getDefaultInstance() {
1150       return DEFAULT_INSTANCE;
1151     }
1152 
1153     private static final com.google.protobuf.Parser<Documentation> PARSER =
1154         new com.google.protobuf.AbstractParser<Documentation>() {
1155           @java.lang.Override
1156           public Documentation parsePartialFrom(
1157               com.google.protobuf.CodedInputStream input,
1158               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1159               throws com.google.protobuf.InvalidProtocolBufferException {
1160             Builder builder = newBuilder();
1161             try {
1162               builder.mergeFrom(input, extensionRegistry);
1163             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1164               throw e.setUnfinishedMessage(builder.buildPartial());
1165             } catch (com.google.protobuf.UninitializedMessageException e) {
1166               throw e.asInvalidProtocolBufferException()
1167                   .setUnfinishedMessage(builder.buildPartial());
1168             } catch (java.io.IOException e) {
1169               throw new com.google.protobuf.InvalidProtocolBufferException(e)
1170                   .setUnfinishedMessage(builder.buildPartial());
1171             }
1172             return builder.buildPartial();
1173           }
1174         };
1175 
parser()1176     public static com.google.protobuf.Parser<Documentation> parser() {
1177       return PARSER;
1178     }
1179 
1180     @java.lang.Override
getParserForType()1181     public com.google.protobuf.Parser<Documentation> getParserForType() {
1182       return PARSER;
1183     }
1184 
1185     @java.lang.Override
getDefaultInstanceForType()1186     public com.google.monitoring.v3.AlertPolicy.Documentation getDefaultInstanceForType() {
1187       return DEFAULT_INSTANCE;
1188     }
1189   }
1190 
1191   public interface ConditionOrBuilder
1192       extends
1193       // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy.Condition)
1194       com.google.protobuf.MessageOrBuilder {
1195 
1196     /**
1197      *
1198      *
1199      * <pre>
1200      * Required if the condition exists. The unique resource name for this
1201      * condition. Its format is:
1202      *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
1203      * `[CONDITION_ID]` is assigned by Cloud Monitoring when the
1204      * condition is created as part of a new or updated alerting policy.
1205      * When calling the
1206      * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
1207      * method, do not include the `name` field in the conditions of the
1208      * requested alerting policy. Cloud Monitoring creates the
1209      * condition identifiers and includes them in the new policy.
1210      * When calling the
1211      * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
1212      * method to update a policy, including a condition `name` causes the
1213      * existing condition to be updated. Conditions without names are added to
1214      * the updated policy. Existing conditions are deleted if they are not
1215      * updated.
1216      * Best practice is to preserve `[CONDITION_ID]` if you make only small
1217      * changes, such as those to condition thresholds, durations, or trigger
1218      * values.  Otherwise, treat the change as a new condition and let the
1219      * existing condition be deleted.
1220      * </pre>
1221      *
1222      * <code>string name = 12;</code>
1223      *
1224      * @return The name.
1225      */
getName()1226     java.lang.String getName();
1227     /**
1228      *
1229      *
1230      * <pre>
1231      * Required if the condition exists. The unique resource name for this
1232      * condition. Its format is:
1233      *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
1234      * `[CONDITION_ID]` is assigned by Cloud Monitoring when the
1235      * condition is created as part of a new or updated alerting policy.
1236      * When calling the
1237      * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
1238      * method, do not include the `name` field in the conditions of the
1239      * requested alerting policy. Cloud Monitoring creates the
1240      * condition identifiers and includes them in the new policy.
1241      * When calling the
1242      * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
1243      * method to update a policy, including a condition `name` causes the
1244      * existing condition to be updated. Conditions without names are added to
1245      * the updated policy. Existing conditions are deleted if they are not
1246      * updated.
1247      * Best practice is to preserve `[CONDITION_ID]` if you make only small
1248      * changes, such as those to condition thresholds, durations, or trigger
1249      * values.  Otherwise, treat the change as a new condition and let the
1250      * existing condition be deleted.
1251      * </pre>
1252      *
1253      * <code>string name = 12;</code>
1254      *
1255      * @return The bytes for name.
1256      */
getNameBytes()1257     com.google.protobuf.ByteString getNameBytes();
1258 
1259     /**
1260      *
1261      *
1262      * <pre>
1263      * A short name or phrase used to identify the condition in dashboards,
1264      * notifications, and incidents. To avoid confusion, don't use the same
1265      * display name for multiple conditions in the same policy.
1266      * </pre>
1267      *
1268      * <code>string display_name = 6;</code>
1269      *
1270      * @return The displayName.
1271      */
getDisplayName()1272     java.lang.String getDisplayName();
1273     /**
1274      *
1275      *
1276      * <pre>
1277      * A short name or phrase used to identify the condition in dashboards,
1278      * notifications, and incidents. To avoid confusion, don't use the same
1279      * display name for multiple conditions in the same policy.
1280      * </pre>
1281      *
1282      * <code>string display_name = 6;</code>
1283      *
1284      * @return The bytes for displayName.
1285      */
getDisplayNameBytes()1286     com.google.protobuf.ByteString getDisplayNameBytes();
1287 
1288     /**
1289      *
1290      *
1291      * <pre>
1292      * A condition that compares a time series against a threshold.
1293      * </pre>
1294      *
1295      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
1296      * </code>
1297      *
1298      * @return Whether the conditionThreshold field is set.
1299      */
hasConditionThreshold()1300     boolean hasConditionThreshold();
1301     /**
1302      *
1303      *
1304      * <pre>
1305      * A condition that compares a time series against a threshold.
1306      * </pre>
1307      *
1308      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
1309      * </code>
1310      *
1311      * @return The conditionThreshold.
1312      */
getConditionThreshold()1313     com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold getConditionThreshold();
1314     /**
1315      *
1316      *
1317      * <pre>
1318      * A condition that compares a time series against a threshold.
1319      * </pre>
1320      *
1321      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
1322      * </code>
1323      */
1324     com.google.monitoring.v3.AlertPolicy.Condition.MetricThresholdOrBuilder
getConditionThresholdOrBuilder()1325         getConditionThresholdOrBuilder();
1326 
1327     /**
1328      *
1329      *
1330      * <pre>
1331      * A condition that checks that a time series continues to
1332      * receive new data points.
1333      * </pre>
1334      *
1335      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;</code>
1336      *
1337      * @return Whether the conditionAbsent field is set.
1338      */
hasConditionAbsent()1339     boolean hasConditionAbsent();
1340     /**
1341      *
1342      *
1343      * <pre>
1344      * A condition that checks that a time series continues to
1345      * receive new data points.
1346      * </pre>
1347      *
1348      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;</code>
1349      *
1350      * @return The conditionAbsent.
1351      */
getConditionAbsent()1352     com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence getConditionAbsent();
1353     /**
1354      *
1355      *
1356      * <pre>
1357      * A condition that checks that a time series continues to
1358      * receive new data points.
1359      * </pre>
1360      *
1361      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;</code>
1362      */
1363     com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsenceOrBuilder
getConditionAbsentOrBuilder()1364         getConditionAbsentOrBuilder();
1365 
1366     /**
1367      *
1368      *
1369      * <pre>
1370      * A condition that checks for log messages matching given constraints. If
1371      * set, no other conditions can be present.
1372      * </pre>
1373      *
1374      * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;</code>
1375      *
1376      * @return Whether the conditionMatchedLog field is set.
1377      */
hasConditionMatchedLog()1378     boolean hasConditionMatchedLog();
1379     /**
1380      *
1381      *
1382      * <pre>
1383      * A condition that checks for log messages matching given constraints. If
1384      * set, no other conditions can be present.
1385      * </pre>
1386      *
1387      * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;</code>
1388      *
1389      * @return The conditionMatchedLog.
1390      */
getConditionMatchedLog()1391     com.google.monitoring.v3.AlertPolicy.Condition.LogMatch getConditionMatchedLog();
1392     /**
1393      *
1394      *
1395      * <pre>
1396      * A condition that checks for log messages matching given constraints. If
1397      * set, no other conditions can be present.
1398      * </pre>
1399      *
1400      * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;</code>
1401      */
1402     com.google.monitoring.v3.AlertPolicy.Condition.LogMatchOrBuilder
getConditionMatchedLogOrBuilder()1403         getConditionMatchedLogOrBuilder();
1404 
1405     /**
1406      *
1407      *
1408      * <pre>
1409      * A condition that uses the Monitoring Query Language to define
1410      * alerts.
1411      * </pre>
1412      *
1413      * <code>
1414      * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
1415      * </code>
1416      *
1417      * @return Whether the conditionMonitoringQueryLanguage field is set.
1418      */
hasConditionMonitoringQueryLanguage()1419     boolean hasConditionMonitoringQueryLanguage();
1420     /**
1421      *
1422      *
1423      * <pre>
1424      * A condition that uses the Monitoring Query Language to define
1425      * alerts.
1426      * </pre>
1427      *
1428      * <code>
1429      * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
1430      * </code>
1431      *
1432      * @return The conditionMonitoringQueryLanguage.
1433      */
1434     com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
getConditionMonitoringQueryLanguage()1435         getConditionMonitoringQueryLanguage();
1436     /**
1437      *
1438      *
1439      * <pre>
1440      * A condition that uses the Monitoring Query Language to define
1441      * alerts.
1442      * </pre>
1443      *
1444      * <code>
1445      * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
1446      * </code>
1447      */
1448     com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
getConditionMonitoringQueryLanguageOrBuilder()1449         getConditionMonitoringQueryLanguageOrBuilder();
1450 
getConditionCase()1451     public com.google.monitoring.v3.AlertPolicy.Condition.ConditionCase getConditionCase();
1452   }
1453   /**
1454    *
1455    *
1456    * <pre>
1457    * A condition is a true/false test that determines when an alerting policy
1458    * should open an incident. If a condition evaluates to true, it signifies
1459    * that something is wrong.
1460    * </pre>
1461    *
1462    * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition}
1463    */
1464   public static final class Condition extends com.google.protobuf.GeneratedMessageV3
1465       implements
1466       // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy.Condition)
1467       ConditionOrBuilder {
1468     private static final long serialVersionUID = 0L;
1469     // Use Condition.newBuilder() to construct.
Condition(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)1470     private Condition(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
1471       super(builder);
1472     }
1473 
Condition()1474     private Condition() {
1475       name_ = "";
1476       displayName_ = "";
1477     }
1478 
1479     @java.lang.Override
1480     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)1481     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
1482       return new Condition();
1483     }
1484 
1485     @java.lang.Override
getUnknownFields()1486     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
1487       return this.unknownFields;
1488     }
1489 
getDescriptor()1490     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1491       return com.google.monitoring.v3.AlertProto
1492           .internal_static_google_monitoring_v3_AlertPolicy_Condition_descriptor;
1493     }
1494 
1495     @java.lang.Override
1496     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1497         internalGetFieldAccessorTable() {
1498       return com.google.monitoring.v3.AlertProto
1499           .internal_static_google_monitoring_v3_AlertPolicy_Condition_fieldAccessorTable
1500           .ensureFieldAccessorsInitialized(
1501               com.google.monitoring.v3.AlertPolicy.Condition.class,
1502               com.google.monitoring.v3.AlertPolicy.Condition.Builder.class);
1503     }
1504 
1505     /**
1506      *
1507      *
1508      * <pre>
1509      * A condition control that determines how metric-threshold conditions
1510      * are evaluated when data stops arriving.
1511      * This control doesn't affect metric-absence policies.
1512      * </pre>
1513      *
1514      * Protobuf enum {@code google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData}
1515      */
1516     public enum EvaluationMissingData implements com.google.protobuf.ProtocolMessageEnum {
1517       /**
1518        *
1519        *
1520        * <pre>
1521        * An unspecified evaluation missing data option.  Equivalent to
1522        * EVALUATION_MISSING_DATA_NO_OP.
1523        * </pre>
1524        *
1525        * <code>EVALUATION_MISSING_DATA_UNSPECIFIED = 0;</code>
1526        */
1527       EVALUATION_MISSING_DATA_UNSPECIFIED(0),
1528       /**
1529        *
1530        *
1531        * <pre>
1532        * If there is no data to evaluate the condition, then evaluate the
1533        * condition as false.
1534        * </pre>
1535        *
1536        * <code>EVALUATION_MISSING_DATA_INACTIVE = 1;</code>
1537        */
1538       EVALUATION_MISSING_DATA_INACTIVE(1),
1539       /**
1540        *
1541        *
1542        * <pre>
1543        * If there is no data to evaluate the condition, then evaluate the
1544        * condition as true.
1545        * </pre>
1546        *
1547        * <code>EVALUATION_MISSING_DATA_ACTIVE = 2;</code>
1548        */
1549       EVALUATION_MISSING_DATA_ACTIVE(2),
1550       /**
1551        *
1552        *
1553        * <pre>
1554        * Do not evaluate the condition to any value if there is no data.
1555        * </pre>
1556        *
1557        * <code>EVALUATION_MISSING_DATA_NO_OP = 3;</code>
1558        */
1559       EVALUATION_MISSING_DATA_NO_OP(3),
1560       UNRECOGNIZED(-1),
1561       ;
1562 
1563       /**
1564        *
1565        *
1566        * <pre>
1567        * An unspecified evaluation missing data option.  Equivalent to
1568        * EVALUATION_MISSING_DATA_NO_OP.
1569        * </pre>
1570        *
1571        * <code>EVALUATION_MISSING_DATA_UNSPECIFIED = 0;</code>
1572        */
1573       public static final int EVALUATION_MISSING_DATA_UNSPECIFIED_VALUE = 0;
1574       /**
1575        *
1576        *
1577        * <pre>
1578        * If there is no data to evaluate the condition, then evaluate the
1579        * condition as false.
1580        * </pre>
1581        *
1582        * <code>EVALUATION_MISSING_DATA_INACTIVE = 1;</code>
1583        */
1584       public static final int EVALUATION_MISSING_DATA_INACTIVE_VALUE = 1;
1585       /**
1586        *
1587        *
1588        * <pre>
1589        * If there is no data to evaluate the condition, then evaluate the
1590        * condition as true.
1591        * </pre>
1592        *
1593        * <code>EVALUATION_MISSING_DATA_ACTIVE = 2;</code>
1594        */
1595       public static final int EVALUATION_MISSING_DATA_ACTIVE_VALUE = 2;
1596       /**
1597        *
1598        *
1599        * <pre>
1600        * Do not evaluate the condition to any value if there is no data.
1601        * </pre>
1602        *
1603        * <code>EVALUATION_MISSING_DATA_NO_OP = 3;</code>
1604        */
1605       public static final int EVALUATION_MISSING_DATA_NO_OP_VALUE = 3;
1606 
getNumber()1607       public final int getNumber() {
1608         if (this == UNRECOGNIZED) {
1609           throw new java.lang.IllegalArgumentException(
1610               "Can't get the number of an unknown enum value.");
1611         }
1612         return value;
1613       }
1614 
1615       /**
1616        * @param value The numeric wire value of the corresponding enum entry.
1617        * @return The enum associated with the given numeric wire value.
1618        * @deprecated Use {@link #forNumber(int)} instead.
1619        */
1620       @java.lang.Deprecated
valueOf(int value)1621       public static EvaluationMissingData valueOf(int value) {
1622         return forNumber(value);
1623       }
1624 
1625       /**
1626        * @param value The numeric wire value of the corresponding enum entry.
1627        * @return The enum associated with the given numeric wire value.
1628        */
forNumber(int value)1629       public static EvaluationMissingData forNumber(int value) {
1630         switch (value) {
1631           case 0:
1632             return EVALUATION_MISSING_DATA_UNSPECIFIED;
1633           case 1:
1634             return EVALUATION_MISSING_DATA_INACTIVE;
1635           case 2:
1636             return EVALUATION_MISSING_DATA_ACTIVE;
1637           case 3:
1638             return EVALUATION_MISSING_DATA_NO_OP;
1639           default:
1640             return null;
1641         }
1642       }
1643 
1644       public static com.google.protobuf.Internal.EnumLiteMap<EvaluationMissingData>
internalGetValueMap()1645           internalGetValueMap() {
1646         return internalValueMap;
1647       }
1648 
1649       private static final com.google.protobuf.Internal.EnumLiteMap<EvaluationMissingData>
1650           internalValueMap =
1651               new com.google.protobuf.Internal.EnumLiteMap<EvaluationMissingData>() {
1652                 public EvaluationMissingData findValueByNumber(int number) {
1653                   return EvaluationMissingData.forNumber(number);
1654                 }
1655               };
1656 
getValueDescriptor()1657       public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
1658         if (this == UNRECOGNIZED) {
1659           throw new java.lang.IllegalStateException(
1660               "Can't get the descriptor of an unrecognized enum value.");
1661         }
1662         return getDescriptor().getValues().get(ordinal());
1663       }
1664 
getDescriptorForType()1665       public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
1666         return getDescriptor();
1667       }
1668 
getDescriptor()1669       public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
1670         return com.google.monitoring.v3.AlertPolicy.Condition.getDescriptor().getEnumTypes().get(0);
1671       }
1672 
1673       private static final EvaluationMissingData[] VALUES = values();
1674 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)1675       public static EvaluationMissingData valueOf(
1676           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
1677         if (desc.getType() != getDescriptor()) {
1678           throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
1679         }
1680         if (desc.getIndex() == -1) {
1681           return UNRECOGNIZED;
1682         }
1683         return VALUES[desc.getIndex()];
1684       }
1685 
1686       private final int value;
1687 
EvaluationMissingData(int value)1688       private EvaluationMissingData(int value) {
1689         this.value = value;
1690       }
1691 
1692       // @@protoc_insertion_point(enum_scope:google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData)
1693     }
1694 
1695     public interface TriggerOrBuilder
1696         extends
1697         // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy.Condition.Trigger)
1698         com.google.protobuf.MessageOrBuilder {
1699 
1700       /**
1701        *
1702        *
1703        * <pre>
1704        * The absolute number of time series that must fail
1705        * the predicate for the condition to be triggered.
1706        * </pre>
1707        *
1708        * <code>int32 count = 1;</code>
1709        *
1710        * @return Whether the count field is set.
1711        */
hasCount()1712       boolean hasCount();
1713       /**
1714        *
1715        *
1716        * <pre>
1717        * The absolute number of time series that must fail
1718        * the predicate for the condition to be triggered.
1719        * </pre>
1720        *
1721        * <code>int32 count = 1;</code>
1722        *
1723        * @return The count.
1724        */
getCount()1725       int getCount();
1726 
1727       /**
1728        *
1729        *
1730        * <pre>
1731        * The percentage of time series that must fail the
1732        * predicate for the condition to be triggered.
1733        * </pre>
1734        *
1735        * <code>double percent = 2;</code>
1736        *
1737        * @return Whether the percent field is set.
1738        */
hasPercent()1739       boolean hasPercent();
1740       /**
1741        *
1742        *
1743        * <pre>
1744        * The percentage of time series that must fail the
1745        * predicate for the condition to be triggered.
1746        * </pre>
1747        *
1748        * <code>double percent = 2;</code>
1749        *
1750        * @return The percent.
1751        */
getPercent()1752       double getPercent();
1753 
getTypeCase()1754       public com.google.monitoring.v3.AlertPolicy.Condition.Trigger.TypeCase getTypeCase();
1755     }
1756     /**
1757      *
1758      *
1759      * <pre>
1760      * Specifies how many time series must fail a predicate to trigger a
1761      * condition. If not specified, then a `{count: 1}` trigger is used.
1762      * </pre>
1763      *
1764      * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition.Trigger}
1765      */
1766     public static final class Trigger extends com.google.protobuf.GeneratedMessageV3
1767         implements
1768         // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy.Condition.Trigger)
1769         TriggerOrBuilder {
1770       private static final long serialVersionUID = 0L;
1771       // Use Trigger.newBuilder() to construct.
Trigger(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)1772       private Trigger(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
1773         super(builder);
1774       }
1775 
Trigger()1776       private Trigger() {}
1777 
1778       @java.lang.Override
1779       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)1780       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
1781         return new Trigger();
1782       }
1783 
1784       @java.lang.Override
getUnknownFields()1785       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
1786         return this.unknownFields;
1787       }
1788 
getDescriptor()1789       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1790         return com.google.monitoring.v3.AlertProto
1791             .internal_static_google_monitoring_v3_AlertPolicy_Condition_Trigger_descriptor;
1792       }
1793 
1794       @java.lang.Override
1795       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1796           internalGetFieldAccessorTable() {
1797         return com.google.monitoring.v3.AlertProto
1798             .internal_static_google_monitoring_v3_AlertPolicy_Condition_Trigger_fieldAccessorTable
1799             .ensureFieldAccessorsInitialized(
1800                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger.class,
1801                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder.class);
1802       }
1803 
1804       private int typeCase_ = 0;
1805       private java.lang.Object type_;
1806 
1807       public enum TypeCase
1808           implements
1809               com.google.protobuf.Internal.EnumLite,
1810               com.google.protobuf.AbstractMessage.InternalOneOfEnum {
1811         COUNT(1),
1812         PERCENT(2),
1813         TYPE_NOT_SET(0);
1814         private final int value;
1815 
TypeCase(int value)1816         private TypeCase(int value) {
1817           this.value = value;
1818         }
1819         /**
1820          * @param value The number of the enum to look for.
1821          * @return The enum associated with the given number.
1822          * @deprecated Use {@link #forNumber(int)} instead.
1823          */
1824         @java.lang.Deprecated
valueOf(int value)1825         public static TypeCase valueOf(int value) {
1826           return forNumber(value);
1827         }
1828 
forNumber(int value)1829         public static TypeCase forNumber(int value) {
1830           switch (value) {
1831             case 1:
1832               return COUNT;
1833             case 2:
1834               return PERCENT;
1835             case 0:
1836               return TYPE_NOT_SET;
1837             default:
1838               return null;
1839           }
1840         }
1841 
getNumber()1842         public int getNumber() {
1843           return this.value;
1844         }
1845       };
1846 
getTypeCase()1847       public TypeCase getTypeCase() {
1848         return TypeCase.forNumber(typeCase_);
1849       }
1850 
1851       public static final int COUNT_FIELD_NUMBER = 1;
1852       /**
1853        *
1854        *
1855        * <pre>
1856        * The absolute number of time series that must fail
1857        * the predicate for the condition to be triggered.
1858        * </pre>
1859        *
1860        * <code>int32 count = 1;</code>
1861        *
1862        * @return Whether the count field is set.
1863        */
1864       @java.lang.Override
hasCount()1865       public boolean hasCount() {
1866         return typeCase_ == 1;
1867       }
1868       /**
1869        *
1870        *
1871        * <pre>
1872        * The absolute number of time series that must fail
1873        * the predicate for the condition to be triggered.
1874        * </pre>
1875        *
1876        * <code>int32 count = 1;</code>
1877        *
1878        * @return The count.
1879        */
1880       @java.lang.Override
getCount()1881       public int getCount() {
1882         if (typeCase_ == 1) {
1883           return (java.lang.Integer) type_;
1884         }
1885         return 0;
1886       }
1887 
1888       public static final int PERCENT_FIELD_NUMBER = 2;
1889       /**
1890        *
1891        *
1892        * <pre>
1893        * The percentage of time series that must fail the
1894        * predicate for the condition to be triggered.
1895        * </pre>
1896        *
1897        * <code>double percent = 2;</code>
1898        *
1899        * @return Whether the percent field is set.
1900        */
1901       @java.lang.Override
hasPercent()1902       public boolean hasPercent() {
1903         return typeCase_ == 2;
1904       }
1905       /**
1906        *
1907        *
1908        * <pre>
1909        * The percentage of time series that must fail the
1910        * predicate for the condition to be triggered.
1911        * </pre>
1912        *
1913        * <code>double percent = 2;</code>
1914        *
1915        * @return The percent.
1916        */
1917       @java.lang.Override
getPercent()1918       public double getPercent() {
1919         if (typeCase_ == 2) {
1920           return (java.lang.Double) type_;
1921         }
1922         return 0D;
1923       }
1924 
1925       private byte memoizedIsInitialized = -1;
1926 
1927       @java.lang.Override
isInitialized()1928       public final boolean isInitialized() {
1929         byte isInitialized = memoizedIsInitialized;
1930         if (isInitialized == 1) return true;
1931         if (isInitialized == 0) return false;
1932 
1933         memoizedIsInitialized = 1;
1934         return true;
1935       }
1936 
1937       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1938       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1939         if (typeCase_ == 1) {
1940           output.writeInt32(1, (int) ((java.lang.Integer) type_));
1941         }
1942         if (typeCase_ == 2) {
1943           output.writeDouble(2, (double) ((java.lang.Double) type_));
1944         }
1945         getUnknownFields().writeTo(output);
1946       }
1947 
1948       @java.lang.Override
getSerializedSize()1949       public int getSerializedSize() {
1950         int size = memoizedSize;
1951         if (size != -1) return size;
1952 
1953         size = 0;
1954         if (typeCase_ == 1) {
1955           size +=
1956               com.google.protobuf.CodedOutputStream.computeInt32Size(
1957                   1, (int) ((java.lang.Integer) type_));
1958         }
1959         if (typeCase_ == 2) {
1960           size +=
1961               com.google.protobuf.CodedOutputStream.computeDoubleSize(
1962                   2, (double) ((java.lang.Double) type_));
1963         }
1964         size += getUnknownFields().getSerializedSize();
1965         memoizedSize = size;
1966         return size;
1967       }
1968 
1969       @java.lang.Override
equals(final java.lang.Object obj)1970       public boolean equals(final java.lang.Object obj) {
1971         if (obj == this) {
1972           return true;
1973         }
1974         if (!(obj instanceof com.google.monitoring.v3.AlertPolicy.Condition.Trigger)) {
1975           return super.equals(obj);
1976         }
1977         com.google.monitoring.v3.AlertPolicy.Condition.Trigger other =
1978             (com.google.monitoring.v3.AlertPolicy.Condition.Trigger) obj;
1979 
1980         if (!getTypeCase().equals(other.getTypeCase())) return false;
1981         switch (typeCase_) {
1982           case 1:
1983             if (getCount() != other.getCount()) return false;
1984             break;
1985           case 2:
1986             if (java.lang.Double.doubleToLongBits(getPercent())
1987                 != java.lang.Double.doubleToLongBits(other.getPercent())) return false;
1988             break;
1989           case 0:
1990           default:
1991         }
1992         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1993         return true;
1994       }
1995 
1996       @java.lang.Override
hashCode()1997       public int hashCode() {
1998         if (memoizedHashCode != 0) {
1999           return memoizedHashCode;
2000         }
2001         int hash = 41;
2002         hash = (19 * hash) + getDescriptor().hashCode();
2003         switch (typeCase_) {
2004           case 1:
2005             hash = (37 * hash) + COUNT_FIELD_NUMBER;
2006             hash = (53 * hash) + getCount();
2007             break;
2008           case 2:
2009             hash = (37 * hash) + PERCENT_FIELD_NUMBER;
2010             hash =
2011                 (53 * hash)
2012                     + com.google.protobuf.Internal.hashLong(
2013                         java.lang.Double.doubleToLongBits(getPercent()));
2014             break;
2015           case 0:
2016           default:
2017         }
2018         hash = (29 * hash) + getUnknownFields().hashCode();
2019         memoizedHashCode = hash;
2020         return hash;
2021       }
2022 
parseFrom( java.nio.ByteBuffer data)2023       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(
2024           java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
2025         return PARSER.parseFrom(data);
2026       }
2027 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2028       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(
2029           java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2030           throws com.google.protobuf.InvalidProtocolBufferException {
2031         return PARSER.parseFrom(data, extensionRegistry);
2032       }
2033 
parseFrom( com.google.protobuf.ByteString data)2034       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(
2035           com.google.protobuf.ByteString data)
2036           throws com.google.protobuf.InvalidProtocolBufferException {
2037         return PARSER.parseFrom(data);
2038       }
2039 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2040       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(
2041           com.google.protobuf.ByteString data,
2042           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2043           throws com.google.protobuf.InvalidProtocolBufferException {
2044         return PARSER.parseFrom(data, extensionRegistry);
2045       }
2046 
parseFrom(byte[] data)2047       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(byte[] data)
2048           throws com.google.protobuf.InvalidProtocolBufferException {
2049         return PARSER.parseFrom(data);
2050       }
2051 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2052       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(
2053           byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2054           throws com.google.protobuf.InvalidProtocolBufferException {
2055         return PARSER.parseFrom(data, extensionRegistry);
2056       }
2057 
parseFrom( java.io.InputStream input)2058       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(
2059           java.io.InputStream input) throws java.io.IOException {
2060         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2061       }
2062 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2063       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(
2064           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2065           throws java.io.IOException {
2066         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2067             PARSER, input, extensionRegistry);
2068       }
2069 
parseDelimitedFrom( java.io.InputStream input)2070       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseDelimitedFrom(
2071           java.io.InputStream input) throws java.io.IOException {
2072         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
2073       }
2074 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2075       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseDelimitedFrom(
2076           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2077           throws java.io.IOException {
2078         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
2079             PARSER, input, extensionRegistry);
2080       }
2081 
parseFrom( com.google.protobuf.CodedInputStream input)2082       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(
2083           com.google.protobuf.CodedInputStream input) throws java.io.IOException {
2084         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2085       }
2086 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2087       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger parseFrom(
2088           com.google.protobuf.CodedInputStream input,
2089           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2090           throws java.io.IOException {
2091         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2092             PARSER, input, extensionRegistry);
2093       }
2094 
2095       @java.lang.Override
newBuilderForType()2096       public Builder newBuilderForType() {
2097         return newBuilder();
2098       }
2099 
newBuilder()2100       public static Builder newBuilder() {
2101         return DEFAULT_INSTANCE.toBuilder();
2102       }
2103 
newBuilder( com.google.monitoring.v3.AlertPolicy.Condition.Trigger prototype)2104       public static Builder newBuilder(
2105           com.google.monitoring.v3.AlertPolicy.Condition.Trigger prototype) {
2106         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2107       }
2108 
2109       @java.lang.Override
toBuilder()2110       public Builder toBuilder() {
2111         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
2112       }
2113 
2114       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2115       protected Builder newBuilderForType(
2116           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2117         Builder builder = new Builder(parent);
2118         return builder;
2119       }
2120       /**
2121        *
2122        *
2123        * <pre>
2124        * Specifies how many time series must fail a predicate to trigger a
2125        * condition. If not specified, then a `{count: 1}` trigger is used.
2126        * </pre>
2127        *
2128        * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition.Trigger}
2129        */
2130       public static final class Builder
2131           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
2132           implements
2133           // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy.Condition.Trigger)
2134           com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder {
getDescriptor()2135         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2136           return com.google.monitoring.v3.AlertProto
2137               .internal_static_google_monitoring_v3_AlertPolicy_Condition_Trigger_descriptor;
2138         }
2139 
2140         @java.lang.Override
2141         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2142             internalGetFieldAccessorTable() {
2143           return com.google.monitoring.v3.AlertProto
2144               .internal_static_google_monitoring_v3_AlertPolicy_Condition_Trigger_fieldAccessorTable
2145               .ensureFieldAccessorsInitialized(
2146                   com.google.monitoring.v3.AlertPolicy.Condition.Trigger.class,
2147                   com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder.class);
2148         }
2149 
2150         // Construct using com.google.monitoring.v3.AlertPolicy.Condition.Trigger.newBuilder()
Builder()2151         private Builder() {}
2152 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2153         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2154           super(parent);
2155         }
2156 
2157         @java.lang.Override
clear()2158         public Builder clear() {
2159           super.clear();
2160           bitField0_ = 0;
2161           typeCase_ = 0;
2162           type_ = null;
2163           return this;
2164         }
2165 
2166         @java.lang.Override
getDescriptorForType()2167         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
2168           return com.google.monitoring.v3.AlertProto
2169               .internal_static_google_monitoring_v3_AlertPolicy_Condition_Trigger_descriptor;
2170         }
2171 
2172         @java.lang.Override
getDefaultInstanceForType()2173         public com.google.monitoring.v3.AlertPolicy.Condition.Trigger getDefaultInstanceForType() {
2174           return com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance();
2175         }
2176 
2177         @java.lang.Override
build()2178         public com.google.monitoring.v3.AlertPolicy.Condition.Trigger build() {
2179           com.google.monitoring.v3.AlertPolicy.Condition.Trigger result = buildPartial();
2180           if (!result.isInitialized()) {
2181             throw newUninitializedMessageException(result);
2182           }
2183           return result;
2184         }
2185 
2186         @java.lang.Override
buildPartial()2187         public com.google.monitoring.v3.AlertPolicy.Condition.Trigger buildPartial() {
2188           com.google.monitoring.v3.AlertPolicy.Condition.Trigger result =
2189               new com.google.monitoring.v3.AlertPolicy.Condition.Trigger(this);
2190           if (bitField0_ != 0) {
2191             buildPartial0(result);
2192           }
2193           buildPartialOneofs(result);
2194           onBuilt();
2195           return result;
2196         }
2197 
buildPartial0(com.google.monitoring.v3.AlertPolicy.Condition.Trigger result)2198         private void buildPartial0(com.google.monitoring.v3.AlertPolicy.Condition.Trigger result) {
2199           int from_bitField0_ = bitField0_;
2200         }
2201 
buildPartialOneofs( com.google.monitoring.v3.AlertPolicy.Condition.Trigger result)2202         private void buildPartialOneofs(
2203             com.google.monitoring.v3.AlertPolicy.Condition.Trigger result) {
2204           result.typeCase_ = typeCase_;
2205           result.type_ = this.type_;
2206         }
2207 
2208         @java.lang.Override
clone()2209         public Builder clone() {
2210           return super.clone();
2211         }
2212 
2213         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2214         public Builder setField(
2215             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2216           return super.setField(field, value);
2217         }
2218 
2219         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2220         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2221           return super.clearField(field);
2222         }
2223 
2224         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2225         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2226           return super.clearOneof(oneof);
2227         }
2228 
2229         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2230         public Builder setRepeatedField(
2231             com.google.protobuf.Descriptors.FieldDescriptor field,
2232             int index,
2233             java.lang.Object value) {
2234           return super.setRepeatedField(field, index, value);
2235         }
2236 
2237         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2238         public Builder addRepeatedField(
2239             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2240           return super.addRepeatedField(field, value);
2241         }
2242 
2243         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2244         public Builder mergeFrom(com.google.protobuf.Message other) {
2245           if (other instanceof com.google.monitoring.v3.AlertPolicy.Condition.Trigger) {
2246             return mergeFrom((com.google.monitoring.v3.AlertPolicy.Condition.Trigger) other);
2247           } else {
2248             super.mergeFrom(other);
2249             return this;
2250           }
2251         }
2252 
mergeFrom(com.google.monitoring.v3.AlertPolicy.Condition.Trigger other)2253         public Builder mergeFrom(com.google.monitoring.v3.AlertPolicy.Condition.Trigger other) {
2254           if (other == com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance())
2255             return this;
2256           switch (other.getTypeCase()) {
2257             case COUNT:
2258               {
2259                 setCount(other.getCount());
2260                 break;
2261               }
2262             case PERCENT:
2263               {
2264                 setPercent(other.getPercent());
2265                 break;
2266               }
2267             case TYPE_NOT_SET:
2268               {
2269                 break;
2270               }
2271           }
2272           this.mergeUnknownFields(other.getUnknownFields());
2273           onChanged();
2274           return this;
2275         }
2276 
2277         @java.lang.Override
isInitialized()2278         public final boolean isInitialized() {
2279           return true;
2280         }
2281 
2282         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2283         public Builder mergeFrom(
2284             com.google.protobuf.CodedInputStream input,
2285             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2286             throws java.io.IOException {
2287           if (extensionRegistry == null) {
2288             throw new java.lang.NullPointerException();
2289           }
2290           try {
2291             boolean done = false;
2292             while (!done) {
2293               int tag = input.readTag();
2294               switch (tag) {
2295                 case 0:
2296                   done = true;
2297                   break;
2298                 case 8:
2299                   {
2300                     type_ = input.readInt32();
2301                     typeCase_ = 1;
2302                     break;
2303                   } // case 8
2304                 case 17:
2305                   {
2306                     type_ = input.readDouble();
2307                     typeCase_ = 2;
2308                     break;
2309                   } // case 17
2310                 default:
2311                   {
2312                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2313                       done = true; // was an endgroup tag
2314                     }
2315                     break;
2316                   } // default:
2317               } // switch (tag)
2318             } // while (!done)
2319           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2320             throw e.unwrapIOException();
2321           } finally {
2322             onChanged();
2323           } // finally
2324           return this;
2325         }
2326 
2327         private int typeCase_ = 0;
2328         private java.lang.Object type_;
2329 
getTypeCase()2330         public TypeCase getTypeCase() {
2331           return TypeCase.forNumber(typeCase_);
2332         }
2333 
clearType()2334         public Builder clearType() {
2335           typeCase_ = 0;
2336           type_ = null;
2337           onChanged();
2338           return this;
2339         }
2340 
2341         private int bitField0_;
2342 
2343         /**
2344          *
2345          *
2346          * <pre>
2347          * The absolute number of time series that must fail
2348          * the predicate for the condition to be triggered.
2349          * </pre>
2350          *
2351          * <code>int32 count = 1;</code>
2352          *
2353          * @return Whether the count field is set.
2354          */
hasCount()2355         public boolean hasCount() {
2356           return typeCase_ == 1;
2357         }
2358         /**
2359          *
2360          *
2361          * <pre>
2362          * The absolute number of time series that must fail
2363          * the predicate for the condition to be triggered.
2364          * </pre>
2365          *
2366          * <code>int32 count = 1;</code>
2367          *
2368          * @return The count.
2369          */
getCount()2370         public int getCount() {
2371           if (typeCase_ == 1) {
2372             return (java.lang.Integer) type_;
2373           }
2374           return 0;
2375         }
2376         /**
2377          *
2378          *
2379          * <pre>
2380          * The absolute number of time series that must fail
2381          * the predicate for the condition to be triggered.
2382          * </pre>
2383          *
2384          * <code>int32 count = 1;</code>
2385          *
2386          * @param value The count to set.
2387          * @return This builder for chaining.
2388          */
setCount(int value)2389         public Builder setCount(int value) {
2390 
2391           typeCase_ = 1;
2392           type_ = value;
2393           onChanged();
2394           return this;
2395         }
2396         /**
2397          *
2398          *
2399          * <pre>
2400          * The absolute number of time series that must fail
2401          * the predicate for the condition to be triggered.
2402          * </pre>
2403          *
2404          * <code>int32 count = 1;</code>
2405          *
2406          * @return This builder for chaining.
2407          */
clearCount()2408         public Builder clearCount() {
2409           if (typeCase_ == 1) {
2410             typeCase_ = 0;
2411             type_ = null;
2412             onChanged();
2413           }
2414           return this;
2415         }
2416 
2417         /**
2418          *
2419          *
2420          * <pre>
2421          * The percentage of time series that must fail the
2422          * predicate for the condition to be triggered.
2423          * </pre>
2424          *
2425          * <code>double percent = 2;</code>
2426          *
2427          * @return Whether the percent field is set.
2428          */
hasPercent()2429         public boolean hasPercent() {
2430           return typeCase_ == 2;
2431         }
2432         /**
2433          *
2434          *
2435          * <pre>
2436          * The percentage of time series that must fail the
2437          * predicate for the condition to be triggered.
2438          * </pre>
2439          *
2440          * <code>double percent = 2;</code>
2441          *
2442          * @return The percent.
2443          */
getPercent()2444         public double getPercent() {
2445           if (typeCase_ == 2) {
2446             return (java.lang.Double) type_;
2447           }
2448           return 0D;
2449         }
2450         /**
2451          *
2452          *
2453          * <pre>
2454          * The percentage of time series that must fail the
2455          * predicate for the condition to be triggered.
2456          * </pre>
2457          *
2458          * <code>double percent = 2;</code>
2459          *
2460          * @param value The percent to set.
2461          * @return This builder for chaining.
2462          */
setPercent(double value)2463         public Builder setPercent(double value) {
2464 
2465           typeCase_ = 2;
2466           type_ = value;
2467           onChanged();
2468           return this;
2469         }
2470         /**
2471          *
2472          *
2473          * <pre>
2474          * The percentage of time series that must fail the
2475          * predicate for the condition to be triggered.
2476          * </pre>
2477          *
2478          * <code>double percent = 2;</code>
2479          *
2480          * @return This builder for chaining.
2481          */
clearPercent()2482         public Builder clearPercent() {
2483           if (typeCase_ == 2) {
2484             typeCase_ = 0;
2485             type_ = null;
2486             onChanged();
2487           }
2488           return this;
2489         }
2490 
2491         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2492         public final Builder setUnknownFields(
2493             final com.google.protobuf.UnknownFieldSet unknownFields) {
2494           return super.setUnknownFields(unknownFields);
2495         }
2496 
2497         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2498         public final Builder mergeUnknownFields(
2499             final com.google.protobuf.UnknownFieldSet unknownFields) {
2500           return super.mergeUnknownFields(unknownFields);
2501         }
2502 
2503         // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy.Condition.Trigger)
2504       }
2505 
2506       // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Condition.Trigger)
2507       private static final com.google.monitoring.v3.AlertPolicy.Condition.Trigger DEFAULT_INSTANCE;
2508 
2509       static {
2510         DEFAULT_INSTANCE = new com.google.monitoring.v3.AlertPolicy.Condition.Trigger();
2511       }
2512 
getDefaultInstance()2513       public static com.google.monitoring.v3.AlertPolicy.Condition.Trigger getDefaultInstance() {
2514         return DEFAULT_INSTANCE;
2515       }
2516 
2517       private static final com.google.protobuf.Parser<Trigger> PARSER =
2518           new com.google.protobuf.AbstractParser<Trigger>() {
2519             @java.lang.Override
2520             public Trigger parsePartialFrom(
2521                 com.google.protobuf.CodedInputStream input,
2522                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2523                 throws com.google.protobuf.InvalidProtocolBufferException {
2524               Builder builder = newBuilder();
2525               try {
2526                 builder.mergeFrom(input, extensionRegistry);
2527               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2528                 throw e.setUnfinishedMessage(builder.buildPartial());
2529               } catch (com.google.protobuf.UninitializedMessageException e) {
2530                 throw e.asInvalidProtocolBufferException()
2531                     .setUnfinishedMessage(builder.buildPartial());
2532               } catch (java.io.IOException e) {
2533                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
2534                     .setUnfinishedMessage(builder.buildPartial());
2535               }
2536               return builder.buildPartial();
2537             }
2538           };
2539 
parser()2540       public static com.google.protobuf.Parser<Trigger> parser() {
2541         return PARSER;
2542       }
2543 
2544       @java.lang.Override
getParserForType()2545       public com.google.protobuf.Parser<Trigger> getParserForType() {
2546         return PARSER;
2547       }
2548 
2549       @java.lang.Override
getDefaultInstanceForType()2550       public com.google.monitoring.v3.AlertPolicy.Condition.Trigger getDefaultInstanceForType() {
2551         return DEFAULT_INSTANCE;
2552       }
2553     }
2554 
2555     public interface MetricThresholdOrBuilder
2556         extends
2557         // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy.Condition.MetricThreshold)
2558         com.google.protobuf.MessageOrBuilder {
2559 
2560       /**
2561        *
2562        *
2563        * <pre>
2564        * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
2565        * identifies which time series should be compared with the threshold.
2566        * The filter is similar to the one that is specified in the
2567        * [`ListTimeSeries`
2568        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
2569        * (that call is useful to verify the time series that will be retrieved /
2570        * processed). The filter must specify the metric type and the resource
2571        * type. Optionally, it can specify resource labels and metric labels.
2572        * This field must not exceed 2048 Unicode characters in length.
2573        * </pre>
2574        *
2575        * <code>string filter = 2 [(.google.api.field_behavior) = REQUIRED];</code>
2576        *
2577        * @return The filter.
2578        */
getFilter()2579       java.lang.String getFilter();
2580       /**
2581        *
2582        *
2583        * <pre>
2584        * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
2585        * identifies which time series should be compared with the threshold.
2586        * The filter is similar to the one that is specified in the
2587        * [`ListTimeSeries`
2588        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
2589        * (that call is useful to verify the time series that will be retrieved /
2590        * processed). The filter must specify the metric type and the resource
2591        * type. Optionally, it can specify resource labels and metric labels.
2592        * This field must not exceed 2048 Unicode characters in length.
2593        * </pre>
2594        *
2595        * <code>string filter = 2 [(.google.api.field_behavior) = REQUIRED];</code>
2596        *
2597        * @return The bytes for filter.
2598        */
getFilterBytes()2599       com.google.protobuf.ByteString getFilterBytes();
2600 
2601       /**
2602        *
2603        *
2604        * <pre>
2605        * Specifies the alignment of data points in individual time series as
2606        * well as how to combine the retrieved time series together (such as
2607        * when aggregating multiple streams on each resource to a single
2608        * stream for each resource or when aggregating streams across all
2609        * members of a group of resources). Multiple aggregations
2610        * are applied in the order specified.
2611        * This field is similar to the one in the [`ListTimeSeries`
2612        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
2613        * It is advisable to use the `ListTimeSeries` method when debugging this
2614        * field.
2615        * </pre>
2616        *
2617        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
2618        */
getAggregationsList()2619       java.util.List<com.google.monitoring.v3.Aggregation> getAggregationsList();
2620       /**
2621        *
2622        *
2623        * <pre>
2624        * Specifies the alignment of data points in individual time series as
2625        * well as how to combine the retrieved time series together (such as
2626        * when aggregating multiple streams on each resource to a single
2627        * stream for each resource or when aggregating streams across all
2628        * members of a group of resources). Multiple aggregations
2629        * are applied in the order specified.
2630        * This field is similar to the one in the [`ListTimeSeries`
2631        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
2632        * It is advisable to use the `ListTimeSeries` method when debugging this
2633        * field.
2634        * </pre>
2635        *
2636        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
2637        */
getAggregations(int index)2638       com.google.monitoring.v3.Aggregation getAggregations(int index);
2639       /**
2640        *
2641        *
2642        * <pre>
2643        * Specifies the alignment of data points in individual time series as
2644        * well as how to combine the retrieved time series together (such as
2645        * when aggregating multiple streams on each resource to a single
2646        * stream for each resource or when aggregating streams across all
2647        * members of a group of resources). Multiple aggregations
2648        * are applied in the order specified.
2649        * This field is similar to the one in the [`ListTimeSeries`
2650        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
2651        * It is advisable to use the `ListTimeSeries` method when debugging this
2652        * field.
2653        * </pre>
2654        *
2655        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
2656        */
getAggregationsCount()2657       int getAggregationsCount();
2658       /**
2659        *
2660        *
2661        * <pre>
2662        * Specifies the alignment of data points in individual time series as
2663        * well as how to combine the retrieved time series together (such as
2664        * when aggregating multiple streams on each resource to a single
2665        * stream for each resource or when aggregating streams across all
2666        * members of a group of resources). Multiple aggregations
2667        * are applied in the order specified.
2668        * This field is similar to the one in the [`ListTimeSeries`
2669        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
2670        * It is advisable to use the `ListTimeSeries` method when debugging this
2671        * field.
2672        * </pre>
2673        *
2674        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
2675        */
2676       java.util.List<? extends com.google.monitoring.v3.AggregationOrBuilder>
getAggregationsOrBuilderList()2677           getAggregationsOrBuilderList();
2678       /**
2679        *
2680        *
2681        * <pre>
2682        * Specifies the alignment of data points in individual time series as
2683        * well as how to combine the retrieved time series together (such as
2684        * when aggregating multiple streams on each resource to a single
2685        * stream for each resource or when aggregating streams across all
2686        * members of a group of resources). Multiple aggregations
2687        * are applied in the order specified.
2688        * This field is similar to the one in the [`ListTimeSeries`
2689        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
2690        * It is advisable to use the `ListTimeSeries` method when debugging this
2691        * field.
2692        * </pre>
2693        *
2694        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
2695        */
getAggregationsOrBuilder(int index)2696       com.google.monitoring.v3.AggregationOrBuilder getAggregationsOrBuilder(int index);
2697 
2698       /**
2699        *
2700        *
2701        * <pre>
2702        * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
2703        * identifies a time series that should be used as the denominator of a
2704        * ratio that will be compared with the threshold. If a
2705        * `denominator_filter` is specified, the time series specified by the
2706        * `filter` field will be used as the numerator.
2707        * The filter must specify the metric type and optionally may contain
2708        * restrictions on resource type, resource labels, and metric labels.
2709        * This field may not exceed 2048 Unicode characters in length.
2710        * </pre>
2711        *
2712        * <code>string denominator_filter = 9;</code>
2713        *
2714        * @return The denominatorFilter.
2715        */
getDenominatorFilter()2716       java.lang.String getDenominatorFilter();
2717       /**
2718        *
2719        *
2720        * <pre>
2721        * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
2722        * identifies a time series that should be used as the denominator of a
2723        * ratio that will be compared with the threshold. If a
2724        * `denominator_filter` is specified, the time series specified by the
2725        * `filter` field will be used as the numerator.
2726        * The filter must specify the metric type and optionally may contain
2727        * restrictions on resource type, resource labels, and metric labels.
2728        * This field may not exceed 2048 Unicode characters in length.
2729        * </pre>
2730        *
2731        * <code>string denominator_filter = 9;</code>
2732        *
2733        * @return The bytes for denominatorFilter.
2734        */
getDenominatorFilterBytes()2735       com.google.protobuf.ByteString getDenominatorFilterBytes();
2736 
2737       /**
2738        *
2739        *
2740        * <pre>
2741        * Specifies the alignment of data points in individual time series
2742        * selected by `denominatorFilter` as
2743        * well as how to combine the retrieved time series together (such as
2744        * when aggregating multiple streams on each resource to a single
2745        * stream for each resource or when aggregating streams across all
2746        * members of a group of resources).
2747        * When computing ratios, the `aggregations` and
2748        * `denominator_aggregations` fields must use the same alignment period
2749        * and produce time series that have the same periodicity and labels.
2750        * </pre>
2751        *
2752        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
2753        */
getDenominatorAggregationsList()2754       java.util.List<com.google.monitoring.v3.Aggregation> getDenominatorAggregationsList();
2755       /**
2756        *
2757        *
2758        * <pre>
2759        * Specifies the alignment of data points in individual time series
2760        * selected by `denominatorFilter` as
2761        * well as how to combine the retrieved time series together (such as
2762        * when aggregating multiple streams on each resource to a single
2763        * stream for each resource or when aggregating streams across all
2764        * members of a group of resources).
2765        * When computing ratios, the `aggregations` and
2766        * `denominator_aggregations` fields must use the same alignment period
2767        * and produce time series that have the same periodicity and labels.
2768        * </pre>
2769        *
2770        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
2771        */
getDenominatorAggregations(int index)2772       com.google.monitoring.v3.Aggregation getDenominatorAggregations(int index);
2773       /**
2774        *
2775        *
2776        * <pre>
2777        * Specifies the alignment of data points in individual time series
2778        * selected by `denominatorFilter` as
2779        * well as how to combine the retrieved time series together (such as
2780        * when aggregating multiple streams on each resource to a single
2781        * stream for each resource or when aggregating streams across all
2782        * members of a group of resources).
2783        * When computing ratios, the `aggregations` and
2784        * `denominator_aggregations` fields must use the same alignment period
2785        * and produce time series that have the same periodicity and labels.
2786        * </pre>
2787        *
2788        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
2789        */
getDenominatorAggregationsCount()2790       int getDenominatorAggregationsCount();
2791       /**
2792        *
2793        *
2794        * <pre>
2795        * Specifies the alignment of data points in individual time series
2796        * selected by `denominatorFilter` as
2797        * well as how to combine the retrieved time series together (such as
2798        * when aggregating multiple streams on each resource to a single
2799        * stream for each resource or when aggregating streams across all
2800        * members of a group of resources).
2801        * When computing ratios, the `aggregations` and
2802        * `denominator_aggregations` fields must use the same alignment period
2803        * and produce time series that have the same periodicity and labels.
2804        * </pre>
2805        *
2806        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
2807        */
2808       java.util.List<? extends com.google.monitoring.v3.AggregationOrBuilder>
getDenominatorAggregationsOrBuilderList()2809           getDenominatorAggregationsOrBuilderList();
2810       /**
2811        *
2812        *
2813        * <pre>
2814        * Specifies the alignment of data points in individual time series
2815        * selected by `denominatorFilter` as
2816        * well as how to combine the retrieved time series together (such as
2817        * when aggregating multiple streams on each resource to a single
2818        * stream for each resource or when aggregating streams across all
2819        * members of a group of resources).
2820        * When computing ratios, the `aggregations` and
2821        * `denominator_aggregations` fields must use the same alignment period
2822        * and produce time series that have the same periodicity and labels.
2823        * </pre>
2824        *
2825        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
2826        */
getDenominatorAggregationsOrBuilder(int index)2827       com.google.monitoring.v3.AggregationOrBuilder getDenominatorAggregationsOrBuilder(int index);
2828 
2829       /**
2830        *
2831        *
2832        * <pre>
2833        * The comparison to apply between the time series (indicated by `filter`
2834        * and `aggregation`) and the threshold (indicated by `threshold_value`).
2835        * The comparison is applied on each time series, with the time series
2836        * on the left-hand side and the threshold on the right-hand side.
2837        * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
2838        * </pre>
2839        *
2840        * <code>.google.monitoring.v3.ComparisonType comparison = 4;</code>
2841        *
2842        * @return The enum numeric value on the wire for comparison.
2843        */
getComparisonValue()2844       int getComparisonValue();
2845       /**
2846        *
2847        *
2848        * <pre>
2849        * The comparison to apply between the time series (indicated by `filter`
2850        * and `aggregation`) and the threshold (indicated by `threshold_value`).
2851        * The comparison is applied on each time series, with the time series
2852        * on the left-hand side and the threshold on the right-hand side.
2853        * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
2854        * </pre>
2855        *
2856        * <code>.google.monitoring.v3.ComparisonType comparison = 4;</code>
2857        *
2858        * @return The comparison.
2859        */
getComparison()2860       com.google.monitoring.v3.ComparisonType getComparison();
2861 
2862       /**
2863        *
2864        *
2865        * <pre>
2866        * A value against which to compare the time series.
2867        * </pre>
2868        *
2869        * <code>double threshold_value = 5;</code>
2870        *
2871        * @return The thresholdValue.
2872        */
getThresholdValue()2873       double getThresholdValue();
2874 
2875       /**
2876        *
2877        *
2878        * <pre>
2879        * The amount of time that a time series must violate the
2880        * threshold to be considered failing. Currently, only values
2881        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
2882        * seconds--are supported. If an invalid value is given, an
2883        * error will be returned. When choosing a duration, it is useful to
2884        * keep in mind the frequency of the underlying time series data
2885        * (which may also be affected by any alignments specified in the
2886        * `aggregations` field); a good duration is long enough so that a single
2887        * outlier does not generate spurious alerts, but short enough that
2888        * unhealthy states are detected and alerted on quickly.
2889        * </pre>
2890        *
2891        * <code>.google.protobuf.Duration duration = 6;</code>
2892        *
2893        * @return Whether the duration field is set.
2894        */
hasDuration()2895       boolean hasDuration();
2896       /**
2897        *
2898        *
2899        * <pre>
2900        * The amount of time that a time series must violate the
2901        * threshold to be considered failing. Currently, only values
2902        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
2903        * seconds--are supported. If an invalid value is given, an
2904        * error will be returned. When choosing a duration, it is useful to
2905        * keep in mind the frequency of the underlying time series data
2906        * (which may also be affected by any alignments specified in the
2907        * `aggregations` field); a good duration is long enough so that a single
2908        * outlier does not generate spurious alerts, but short enough that
2909        * unhealthy states are detected and alerted on quickly.
2910        * </pre>
2911        *
2912        * <code>.google.protobuf.Duration duration = 6;</code>
2913        *
2914        * @return The duration.
2915        */
getDuration()2916       com.google.protobuf.Duration getDuration();
2917       /**
2918        *
2919        *
2920        * <pre>
2921        * The amount of time that a time series must violate the
2922        * threshold to be considered failing. Currently, only values
2923        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
2924        * seconds--are supported. If an invalid value is given, an
2925        * error will be returned. When choosing a duration, it is useful to
2926        * keep in mind the frequency of the underlying time series data
2927        * (which may also be affected by any alignments specified in the
2928        * `aggregations` field); a good duration is long enough so that a single
2929        * outlier does not generate spurious alerts, but short enough that
2930        * unhealthy states are detected and alerted on quickly.
2931        * </pre>
2932        *
2933        * <code>.google.protobuf.Duration duration = 6;</code>
2934        */
getDurationOrBuilder()2935       com.google.protobuf.DurationOrBuilder getDurationOrBuilder();
2936 
2937       /**
2938        *
2939        *
2940        * <pre>
2941        * The number/percent of time series for which the comparison must hold
2942        * in order for the condition to trigger. If unspecified, then the
2943        * condition will trigger if the comparison is true for any of the
2944        * time series that have been identified by `filter` and `aggregations`,
2945        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
2946        * are specified.
2947        * </pre>
2948        *
2949        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
2950        *
2951        * @return Whether the trigger field is set.
2952        */
hasTrigger()2953       boolean hasTrigger();
2954       /**
2955        *
2956        *
2957        * <pre>
2958        * The number/percent of time series for which the comparison must hold
2959        * in order for the condition to trigger. If unspecified, then the
2960        * condition will trigger if the comparison is true for any of the
2961        * time series that have been identified by `filter` and `aggregations`,
2962        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
2963        * are specified.
2964        * </pre>
2965        *
2966        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
2967        *
2968        * @return The trigger.
2969        */
getTrigger()2970       com.google.monitoring.v3.AlertPolicy.Condition.Trigger getTrigger();
2971       /**
2972        *
2973        *
2974        * <pre>
2975        * The number/percent of time series for which the comparison must hold
2976        * in order for the condition to trigger. If unspecified, then the
2977        * condition will trigger if the comparison is true for any of the
2978        * time series that have been identified by `filter` and `aggregations`,
2979        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
2980        * are specified.
2981        * </pre>
2982        *
2983        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
2984        */
getTriggerOrBuilder()2985       com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder getTriggerOrBuilder();
2986 
2987       /**
2988        *
2989        *
2990        * <pre>
2991        * A condition control that determines how metric-threshold conditions
2992        * are evaluated when data stops arriving.
2993        * </pre>
2994        *
2995        * <code>
2996        * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11;
2997        * </code>
2998        *
2999        * @return The enum numeric value on the wire for evaluationMissingData.
3000        */
getEvaluationMissingDataValue()3001       int getEvaluationMissingDataValue();
3002       /**
3003        *
3004        *
3005        * <pre>
3006        * A condition control that determines how metric-threshold conditions
3007        * are evaluated when data stops arriving.
3008        * </pre>
3009        *
3010        * <code>
3011        * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11;
3012        * </code>
3013        *
3014        * @return The evaluationMissingData.
3015        */
3016       com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
getEvaluationMissingData()3017           getEvaluationMissingData();
3018     }
3019     /**
3020      *
3021      *
3022      * <pre>
3023      * A condition type that compares a collection of time series
3024      * against a threshold.
3025      * </pre>
3026      *
3027      * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition.MetricThreshold}
3028      */
3029     public static final class MetricThreshold extends com.google.protobuf.GeneratedMessageV3
3030         implements
3031         // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy.Condition.MetricThreshold)
3032         MetricThresholdOrBuilder {
3033       private static final long serialVersionUID = 0L;
3034       // Use MetricThreshold.newBuilder() to construct.
MetricThreshold(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)3035       private MetricThreshold(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
3036         super(builder);
3037       }
3038 
MetricThreshold()3039       private MetricThreshold() {
3040         filter_ = "";
3041         aggregations_ = java.util.Collections.emptyList();
3042         denominatorFilter_ = "";
3043         denominatorAggregations_ = java.util.Collections.emptyList();
3044         comparison_ = 0;
3045         evaluationMissingData_ = 0;
3046       }
3047 
3048       @java.lang.Override
3049       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)3050       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
3051         return new MetricThreshold();
3052       }
3053 
3054       @java.lang.Override
getUnknownFields()3055       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
3056         return this.unknownFields;
3057       }
3058 
getDescriptor()3059       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
3060         return com.google.monitoring.v3.AlertProto
3061             .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricThreshold_descriptor;
3062       }
3063 
3064       @java.lang.Override
3065       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()3066           internalGetFieldAccessorTable() {
3067         return com.google.monitoring.v3.AlertProto
3068             .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricThreshold_fieldAccessorTable
3069             .ensureFieldAccessorsInitialized(
3070                 com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.class,
3071                 com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.Builder.class);
3072       }
3073 
3074       public static final int FILTER_FIELD_NUMBER = 2;
3075 
3076       @SuppressWarnings("serial")
3077       private volatile java.lang.Object filter_ = "";
3078       /**
3079        *
3080        *
3081        * <pre>
3082        * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
3083        * identifies which time series should be compared with the threshold.
3084        * The filter is similar to the one that is specified in the
3085        * [`ListTimeSeries`
3086        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
3087        * (that call is useful to verify the time series that will be retrieved /
3088        * processed). The filter must specify the metric type and the resource
3089        * type. Optionally, it can specify resource labels and metric labels.
3090        * This field must not exceed 2048 Unicode characters in length.
3091        * </pre>
3092        *
3093        * <code>string filter = 2 [(.google.api.field_behavior) = REQUIRED];</code>
3094        *
3095        * @return The filter.
3096        */
3097       @java.lang.Override
getFilter()3098       public java.lang.String getFilter() {
3099         java.lang.Object ref = filter_;
3100         if (ref instanceof java.lang.String) {
3101           return (java.lang.String) ref;
3102         } else {
3103           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3104           java.lang.String s = bs.toStringUtf8();
3105           filter_ = s;
3106           return s;
3107         }
3108       }
3109       /**
3110        *
3111        *
3112        * <pre>
3113        * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
3114        * identifies which time series should be compared with the threshold.
3115        * The filter is similar to the one that is specified in the
3116        * [`ListTimeSeries`
3117        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
3118        * (that call is useful to verify the time series that will be retrieved /
3119        * processed). The filter must specify the metric type and the resource
3120        * type. Optionally, it can specify resource labels and metric labels.
3121        * This field must not exceed 2048 Unicode characters in length.
3122        * </pre>
3123        *
3124        * <code>string filter = 2 [(.google.api.field_behavior) = REQUIRED];</code>
3125        *
3126        * @return The bytes for filter.
3127        */
3128       @java.lang.Override
getFilterBytes()3129       public com.google.protobuf.ByteString getFilterBytes() {
3130         java.lang.Object ref = filter_;
3131         if (ref instanceof java.lang.String) {
3132           com.google.protobuf.ByteString b =
3133               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3134           filter_ = b;
3135           return b;
3136         } else {
3137           return (com.google.protobuf.ByteString) ref;
3138         }
3139       }
3140 
3141       public static final int AGGREGATIONS_FIELD_NUMBER = 8;
3142 
3143       @SuppressWarnings("serial")
3144       private java.util.List<com.google.monitoring.v3.Aggregation> aggregations_;
3145       /**
3146        *
3147        *
3148        * <pre>
3149        * Specifies the alignment of data points in individual time series as
3150        * well as how to combine the retrieved time series together (such as
3151        * when aggregating multiple streams on each resource to a single
3152        * stream for each resource or when aggregating streams across all
3153        * members of a group of resources). Multiple aggregations
3154        * are applied in the order specified.
3155        * This field is similar to the one in the [`ListTimeSeries`
3156        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
3157        * It is advisable to use the `ListTimeSeries` method when debugging this
3158        * field.
3159        * </pre>
3160        *
3161        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
3162        */
3163       @java.lang.Override
getAggregationsList()3164       public java.util.List<com.google.monitoring.v3.Aggregation> getAggregationsList() {
3165         return aggregations_;
3166       }
3167       /**
3168        *
3169        *
3170        * <pre>
3171        * Specifies the alignment of data points in individual time series as
3172        * well as how to combine the retrieved time series together (such as
3173        * when aggregating multiple streams on each resource to a single
3174        * stream for each resource or when aggregating streams across all
3175        * members of a group of resources). Multiple aggregations
3176        * are applied in the order specified.
3177        * This field is similar to the one in the [`ListTimeSeries`
3178        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
3179        * It is advisable to use the `ListTimeSeries` method when debugging this
3180        * field.
3181        * </pre>
3182        *
3183        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
3184        */
3185       @java.lang.Override
3186       public java.util.List<? extends com.google.monitoring.v3.AggregationOrBuilder>
getAggregationsOrBuilderList()3187           getAggregationsOrBuilderList() {
3188         return aggregations_;
3189       }
3190       /**
3191        *
3192        *
3193        * <pre>
3194        * Specifies the alignment of data points in individual time series as
3195        * well as how to combine the retrieved time series together (such as
3196        * when aggregating multiple streams on each resource to a single
3197        * stream for each resource or when aggregating streams across all
3198        * members of a group of resources). Multiple aggregations
3199        * are applied in the order specified.
3200        * This field is similar to the one in the [`ListTimeSeries`
3201        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
3202        * It is advisable to use the `ListTimeSeries` method when debugging this
3203        * field.
3204        * </pre>
3205        *
3206        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
3207        */
3208       @java.lang.Override
getAggregationsCount()3209       public int getAggregationsCount() {
3210         return aggregations_.size();
3211       }
3212       /**
3213        *
3214        *
3215        * <pre>
3216        * Specifies the alignment of data points in individual time series as
3217        * well as how to combine the retrieved time series together (such as
3218        * when aggregating multiple streams on each resource to a single
3219        * stream for each resource or when aggregating streams across all
3220        * members of a group of resources). Multiple aggregations
3221        * are applied in the order specified.
3222        * This field is similar to the one in the [`ListTimeSeries`
3223        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
3224        * It is advisable to use the `ListTimeSeries` method when debugging this
3225        * field.
3226        * </pre>
3227        *
3228        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
3229        */
3230       @java.lang.Override
getAggregations(int index)3231       public com.google.monitoring.v3.Aggregation getAggregations(int index) {
3232         return aggregations_.get(index);
3233       }
3234       /**
3235        *
3236        *
3237        * <pre>
3238        * Specifies the alignment of data points in individual time series as
3239        * well as how to combine the retrieved time series together (such as
3240        * when aggregating multiple streams on each resource to a single
3241        * stream for each resource or when aggregating streams across all
3242        * members of a group of resources). Multiple aggregations
3243        * are applied in the order specified.
3244        * This field is similar to the one in the [`ListTimeSeries`
3245        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
3246        * It is advisable to use the `ListTimeSeries` method when debugging this
3247        * field.
3248        * </pre>
3249        *
3250        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
3251        */
3252       @java.lang.Override
getAggregationsOrBuilder(int index)3253       public com.google.monitoring.v3.AggregationOrBuilder getAggregationsOrBuilder(int index) {
3254         return aggregations_.get(index);
3255       }
3256 
3257       public static final int DENOMINATOR_FILTER_FIELD_NUMBER = 9;
3258 
3259       @SuppressWarnings("serial")
3260       private volatile java.lang.Object denominatorFilter_ = "";
3261       /**
3262        *
3263        *
3264        * <pre>
3265        * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
3266        * identifies a time series that should be used as the denominator of a
3267        * ratio that will be compared with the threshold. If a
3268        * `denominator_filter` is specified, the time series specified by the
3269        * `filter` field will be used as the numerator.
3270        * The filter must specify the metric type and optionally may contain
3271        * restrictions on resource type, resource labels, and metric labels.
3272        * This field may not exceed 2048 Unicode characters in length.
3273        * </pre>
3274        *
3275        * <code>string denominator_filter = 9;</code>
3276        *
3277        * @return The denominatorFilter.
3278        */
3279       @java.lang.Override
getDenominatorFilter()3280       public java.lang.String getDenominatorFilter() {
3281         java.lang.Object ref = denominatorFilter_;
3282         if (ref instanceof java.lang.String) {
3283           return (java.lang.String) ref;
3284         } else {
3285           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3286           java.lang.String s = bs.toStringUtf8();
3287           denominatorFilter_ = s;
3288           return s;
3289         }
3290       }
3291       /**
3292        *
3293        *
3294        * <pre>
3295        * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
3296        * identifies a time series that should be used as the denominator of a
3297        * ratio that will be compared with the threshold. If a
3298        * `denominator_filter` is specified, the time series specified by the
3299        * `filter` field will be used as the numerator.
3300        * The filter must specify the metric type and optionally may contain
3301        * restrictions on resource type, resource labels, and metric labels.
3302        * This field may not exceed 2048 Unicode characters in length.
3303        * </pre>
3304        *
3305        * <code>string denominator_filter = 9;</code>
3306        *
3307        * @return The bytes for denominatorFilter.
3308        */
3309       @java.lang.Override
getDenominatorFilterBytes()3310       public com.google.protobuf.ByteString getDenominatorFilterBytes() {
3311         java.lang.Object ref = denominatorFilter_;
3312         if (ref instanceof java.lang.String) {
3313           com.google.protobuf.ByteString b =
3314               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3315           denominatorFilter_ = b;
3316           return b;
3317         } else {
3318           return (com.google.protobuf.ByteString) ref;
3319         }
3320       }
3321 
3322       public static final int DENOMINATOR_AGGREGATIONS_FIELD_NUMBER = 10;
3323 
3324       @SuppressWarnings("serial")
3325       private java.util.List<com.google.monitoring.v3.Aggregation> denominatorAggregations_;
3326       /**
3327        *
3328        *
3329        * <pre>
3330        * Specifies the alignment of data points in individual time series
3331        * selected by `denominatorFilter` as
3332        * well as how to combine the retrieved time series together (such as
3333        * when aggregating multiple streams on each resource to a single
3334        * stream for each resource or when aggregating streams across all
3335        * members of a group of resources).
3336        * When computing ratios, the `aggregations` and
3337        * `denominator_aggregations` fields must use the same alignment period
3338        * and produce time series that have the same periodicity and labels.
3339        * </pre>
3340        *
3341        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
3342        */
3343       @java.lang.Override
getDenominatorAggregationsList()3344       public java.util.List<com.google.monitoring.v3.Aggregation> getDenominatorAggregationsList() {
3345         return denominatorAggregations_;
3346       }
3347       /**
3348        *
3349        *
3350        * <pre>
3351        * Specifies the alignment of data points in individual time series
3352        * selected by `denominatorFilter` as
3353        * well as how to combine the retrieved time series together (such as
3354        * when aggregating multiple streams on each resource to a single
3355        * stream for each resource or when aggregating streams across all
3356        * members of a group of resources).
3357        * When computing ratios, the `aggregations` and
3358        * `denominator_aggregations` fields must use the same alignment period
3359        * and produce time series that have the same periodicity and labels.
3360        * </pre>
3361        *
3362        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
3363        */
3364       @java.lang.Override
3365       public java.util.List<? extends com.google.monitoring.v3.AggregationOrBuilder>
getDenominatorAggregationsOrBuilderList()3366           getDenominatorAggregationsOrBuilderList() {
3367         return denominatorAggregations_;
3368       }
3369       /**
3370        *
3371        *
3372        * <pre>
3373        * Specifies the alignment of data points in individual time series
3374        * selected by `denominatorFilter` as
3375        * well as how to combine the retrieved time series together (such as
3376        * when aggregating multiple streams on each resource to a single
3377        * stream for each resource or when aggregating streams across all
3378        * members of a group of resources).
3379        * When computing ratios, the `aggregations` and
3380        * `denominator_aggregations` fields must use the same alignment period
3381        * and produce time series that have the same periodicity and labels.
3382        * </pre>
3383        *
3384        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
3385        */
3386       @java.lang.Override
getDenominatorAggregationsCount()3387       public int getDenominatorAggregationsCount() {
3388         return denominatorAggregations_.size();
3389       }
3390       /**
3391        *
3392        *
3393        * <pre>
3394        * Specifies the alignment of data points in individual time series
3395        * selected by `denominatorFilter` as
3396        * well as how to combine the retrieved time series together (such as
3397        * when aggregating multiple streams on each resource to a single
3398        * stream for each resource or when aggregating streams across all
3399        * members of a group of resources).
3400        * When computing ratios, the `aggregations` and
3401        * `denominator_aggregations` fields must use the same alignment period
3402        * and produce time series that have the same periodicity and labels.
3403        * </pre>
3404        *
3405        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
3406        */
3407       @java.lang.Override
getDenominatorAggregations(int index)3408       public com.google.monitoring.v3.Aggregation getDenominatorAggregations(int index) {
3409         return denominatorAggregations_.get(index);
3410       }
3411       /**
3412        *
3413        *
3414        * <pre>
3415        * Specifies the alignment of data points in individual time series
3416        * selected by `denominatorFilter` as
3417        * well as how to combine the retrieved time series together (such as
3418        * when aggregating multiple streams on each resource to a single
3419        * stream for each resource or when aggregating streams across all
3420        * members of a group of resources).
3421        * When computing ratios, the `aggregations` and
3422        * `denominator_aggregations` fields must use the same alignment period
3423        * and produce time series that have the same periodicity and labels.
3424        * </pre>
3425        *
3426        * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
3427        */
3428       @java.lang.Override
getDenominatorAggregationsOrBuilder( int index)3429       public com.google.monitoring.v3.AggregationOrBuilder getDenominatorAggregationsOrBuilder(
3430           int index) {
3431         return denominatorAggregations_.get(index);
3432       }
3433 
3434       public static final int COMPARISON_FIELD_NUMBER = 4;
3435       private int comparison_ = 0;
3436       /**
3437        *
3438        *
3439        * <pre>
3440        * The comparison to apply between the time series (indicated by `filter`
3441        * and `aggregation`) and the threshold (indicated by `threshold_value`).
3442        * The comparison is applied on each time series, with the time series
3443        * on the left-hand side and the threshold on the right-hand side.
3444        * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
3445        * </pre>
3446        *
3447        * <code>.google.monitoring.v3.ComparisonType comparison = 4;</code>
3448        *
3449        * @return The enum numeric value on the wire for comparison.
3450        */
3451       @java.lang.Override
getComparisonValue()3452       public int getComparisonValue() {
3453         return comparison_;
3454       }
3455       /**
3456        *
3457        *
3458        * <pre>
3459        * The comparison to apply between the time series (indicated by `filter`
3460        * and `aggregation`) and the threshold (indicated by `threshold_value`).
3461        * The comparison is applied on each time series, with the time series
3462        * on the left-hand side and the threshold on the right-hand side.
3463        * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
3464        * </pre>
3465        *
3466        * <code>.google.monitoring.v3.ComparisonType comparison = 4;</code>
3467        *
3468        * @return The comparison.
3469        */
3470       @java.lang.Override
getComparison()3471       public com.google.monitoring.v3.ComparisonType getComparison() {
3472         com.google.monitoring.v3.ComparisonType result =
3473             com.google.monitoring.v3.ComparisonType.forNumber(comparison_);
3474         return result == null ? com.google.monitoring.v3.ComparisonType.UNRECOGNIZED : result;
3475       }
3476 
3477       public static final int THRESHOLD_VALUE_FIELD_NUMBER = 5;
3478       private double thresholdValue_ = 0D;
3479       /**
3480        *
3481        *
3482        * <pre>
3483        * A value against which to compare the time series.
3484        * </pre>
3485        *
3486        * <code>double threshold_value = 5;</code>
3487        *
3488        * @return The thresholdValue.
3489        */
3490       @java.lang.Override
getThresholdValue()3491       public double getThresholdValue() {
3492         return thresholdValue_;
3493       }
3494 
3495       public static final int DURATION_FIELD_NUMBER = 6;
3496       private com.google.protobuf.Duration duration_;
3497       /**
3498        *
3499        *
3500        * <pre>
3501        * The amount of time that a time series must violate the
3502        * threshold to be considered failing. Currently, only values
3503        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
3504        * seconds--are supported. If an invalid value is given, an
3505        * error will be returned. When choosing a duration, it is useful to
3506        * keep in mind the frequency of the underlying time series data
3507        * (which may also be affected by any alignments specified in the
3508        * `aggregations` field); a good duration is long enough so that a single
3509        * outlier does not generate spurious alerts, but short enough that
3510        * unhealthy states are detected and alerted on quickly.
3511        * </pre>
3512        *
3513        * <code>.google.protobuf.Duration duration = 6;</code>
3514        *
3515        * @return Whether the duration field is set.
3516        */
3517       @java.lang.Override
hasDuration()3518       public boolean hasDuration() {
3519         return duration_ != null;
3520       }
3521       /**
3522        *
3523        *
3524        * <pre>
3525        * The amount of time that a time series must violate the
3526        * threshold to be considered failing. Currently, only values
3527        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
3528        * seconds--are supported. If an invalid value is given, an
3529        * error will be returned. When choosing a duration, it is useful to
3530        * keep in mind the frequency of the underlying time series data
3531        * (which may also be affected by any alignments specified in the
3532        * `aggregations` field); a good duration is long enough so that a single
3533        * outlier does not generate spurious alerts, but short enough that
3534        * unhealthy states are detected and alerted on quickly.
3535        * </pre>
3536        *
3537        * <code>.google.protobuf.Duration duration = 6;</code>
3538        *
3539        * @return The duration.
3540        */
3541       @java.lang.Override
getDuration()3542       public com.google.protobuf.Duration getDuration() {
3543         return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
3544       }
3545       /**
3546        *
3547        *
3548        * <pre>
3549        * The amount of time that a time series must violate the
3550        * threshold to be considered failing. Currently, only values
3551        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
3552        * seconds--are supported. If an invalid value is given, an
3553        * error will be returned. When choosing a duration, it is useful to
3554        * keep in mind the frequency of the underlying time series data
3555        * (which may also be affected by any alignments specified in the
3556        * `aggregations` field); a good duration is long enough so that a single
3557        * outlier does not generate spurious alerts, but short enough that
3558        * unhealthy states are detected and alerted on quickly.
3559        * </pre>
3560        *
3561        * <code>.google.protobuf.Duration duration = 6;</code>
3562        */
3563       @java.lang.Override
getDurationOrBuilder()3564       public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
3565         return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
3566       }
3567 
3568       public static final int TRIGGER_FIELD_NUMBER = 7;
3569       private com.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger_;
3570       /**
3571        *
3572        *
3573        * <pre>
3574        * The number/percent of time series for which the comparison must hold
3575        * in order for the condition to trigger. If unspecified, then the
3576        * condition will trigger if the comparison is true for any of the
3577        * time series that have been identified by `filter` and `aggregations`,
3578        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
3579        * are specified.
3580        * </pre>
3581        *
3582        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
3583        *
3584        * @return Whether the trigger field is set.
3585        */
3586       @java.lang.Override
hasTrigger()3587       public boolean hasTrigger() {
3588         return trigger_ != null;
3589       }
3590       /**
3591        *
3592        *
3593        * <pre>
3594        * The number/percent of time series for which the comparison must hold
3595        * in order for the condition to trigger. If unspecified, then the
3596        * condition will trigger if the comparison is true for any of the
3597        * time series that have been identified by `filter` and `aggregations`,
3598        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
3599        * are specified.
3600        * </pre>
3601        *
3602        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
3603        *
3604        * @return The trigger.
3605        */
3606       @java.lang.Override
getTrigger()3607       public com.google.monitoring.v3.AlertPolicy.Condition.Trigger getTrigger() {
3608         return trigger_ == null
3609             ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
3610             : trigger_;
3611       }
3612       /**
3613        *
3614        *
3615        * <pre>
3616        * The number/percent of time series for which the comparison must hold
3617        * in order for the condition to trigger. If unspecified, then the
3618        * condition will trigger if the comparison is true for any of the
3619        * time series that have been identified by `filter` and `aggregations`,
3620        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
3621        * are specified.
3622        * </pre>
3623        *
3624        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
3625        */
3626       @java.lang.Override
getTriggerOrBuilder()3627       public com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder getTriggerOrBuilder() {
3628         return trigger_ == null
3629             ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
3630             : trigger_;
3631       }
3632 
3633       public static final int EVALUATION_MISSING_DATA_FIELD_NUMBER = 11;
3634       private int evaluationMissingData_ = 0;
3635       /**
3636        *
3637        *
3638        * <pre>
3639        * A condition control that determines how metric-threshold conditions
3640        * are evaluated when data stops arriving.
3641        * </pre>
3642        *
3643        * <code>
3644        * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11;
3645        * </code>
3646        *
3647        * @return The enum numeric value on the wire for evaluationMissingData.
3648        */
3649       @java.lang.Override
getEvaluationMissingDataValue()3650       public int getEvaluationMissingDataValue() {
3651         return evaluationMissingData_;
3652       }
3653       /**
3654        *
3655        *
3656        * <pre>
3657        * A condition control that determines how metric-threshold conditions
3658        * are evaluated when data stops arriving.
3659        * </pre>
3660        *
3661        * <code>
3662        * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11;
3663        * </code>
3664        *
3665        * @return The evaluationMissingData.
3666        */
3667       @java.lang.Override
3668       public com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
getEvaluationMissingData()3669           getEvaluationMissingData() {
3670         com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData result =
3671             com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData.forNumber(
3672                 evaluationMissingData_);
3673         return result == null
3674             ? com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData.UNRECOGNIZED
3675             : result;
3676       }
3677 
3678       private byte memoizedIsInitialized = -1;
3679 
3680       @java.lang.Override
isInitialized()3681       public final boolean isInitialized() {
3682         byte isInitialized = memoizedIsInitialized;
3683         if (isInitialized == 1) return true;
3684         if (isInitialized == 0) return false;
3685 
3686         memoizedIsInitialized = 1;
3687         return true;
3688       }
3689 
3690       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)3691       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
3692         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
3693           com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_);
3694         }
3695         if (comparison_
3696             != com.google.monitoring.v3.ComparisonType.COMPARISON_UNSPECIFIED.getNumber()) {
3697           output.writeEnum(4, comparison_);
3698         }
3699         if (java.lang.Double.doubleToRawLongBits(thresholdValue_) != 0) {
3700           output.writeDouble(5, thresholdValue_);
3701         }
3702         if (duration_ != null) {
3703           output.writeMessage(6, getDuration());
3704         }
3705         if (trigger_ != null) {
3706           output.writeMessage(7, getTrigger());
3707         }
3708         for (int i = 0; i < aggregations_.size(); i++) {
3709           output.writeMessage(8, aggregations_.get(i));
3710         }
3711         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denominatorFilter_)) {
3712           com.google.protobuf.GeneratedMessageV3.writeString(output, 9, denominatorFilter_);
3713         }
3714         for (int i = 0; i < denominatorAggregations_.size(); i++) {
3715           output.writeMessage(10, denominatorAggregations_.get(i));
3716         }
3717         if (evaluationMissingData_
3718             != com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
3719                 .EVALUATION_MISSING_DATA_UNSPECIFIED
3720                 .getNumber()) {
3721           output.writeEnum(11, evaluationMissingData_);
3722         }
3723         getUnknownFields().writeTo(output);
3724       }
3725 
3726       @java.lang.Override
getSerializedSize()3727       public int getSerializedSize() {
3728         int size = memoizedSize;
3729         if (size != -1) return size;
3730 
3731         size = 0;
3732         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
3733           size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_);
3734         }
3735         if (comparison_
3736             != com.google.monitoring.v3.ComparisonType.COMPARISON_UNSPECIFIED.getNumber()) {
3737           size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, comparison_);
3738         }
3739         if (java.lang.Double.doubleToRawLongBits(thresholdValue_) != 0) {
3740           size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, thresholdValue_);
3741         }
3742         if (duration_ != null) {
3743           size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDuration());
3744         }
3745         if (trigger_ != null) {
3746           size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTrigger());
3747         }
3748         for (int i = 0; i < aggregations_.size(); i++) {
3749           size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, aggregations_.get(i));
3750         }
3751         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denominatorFilter_)) {
3752           size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, denominatorFilter_);
3753         }
3754         for (int i = 0; i < denominatorAggregations_.size(); i++) {
3755           size +=
3756               com.google.protobuf.CodedOutputStream.computeMessageSize(
3757                   10, denominatorAggregations_.get(i));
3758         }
3759         if (evaluationMissingData_
3760             != com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
3761                 .EVALUATION_MISSING_DATA_UNSPECIFIED
3762                 .getNumber()) {
3763           size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, evaluationMissingData_);
3764         }
3765         size += getUnknownFields().getSerializedSize();
3766         memoizedSize = size;
3767         return size;
3768       }
3769 
3770       @java.lang.Override
equals(final java.lang.Object obj)3771       public boolean equals(final java.lang.Object obj) {
3772         if (obj == this) {
3773           return true;
3774         }
3775         if (!(obj instanceof com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold)) {
3776           return super.equals(obj);
3777         }
3778         com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold other =
3779             (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) obj;
3780 
3781         if (!getFilter().equals(other.getFilter())) return false;
3782         if (!getAggregationsList().equals(other.getAggregationsList())) return false;
3783         if (!getDenominatorFilter().equals(other.getDenominatorFilter())) return false;
3784         if (!getDenominatorAggregationsList().equals(other.getDenominatorAggregationsList()))
3785           return false;
3786         if (comparison_ != other.comparison_) return false;
3787         if (java.lang.Double.doubleToLongBits(getThresholdValue())
3788             != java.lang.Double.doubleToLongBits(other.getThresholdValue())) return false;
3789         if (hasDuration() != other.hasDuration()) return false;
3790         if (hasDuration()) {
3791           if (!getDuration().equals(other.getDuration())) return false;
3792         }
3793         if (hasTrigger() != other.hasTrigger()) return false;
3794         if (hasTrigger()) {
3795           if (!getTrigger().equals(other.getTrigger())) return false;
3796         }
3797         if (evaluationMissingData_ != other.evaluationMissingData_) return false;
3798         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
3799         return true;
3800       }
3801 
3802       @java.lang.Override
hashCode()3803       public int hashCode() {
3804         if (memoizedHashCode != 0) {
3805           return memoizedHashCode;
3806         }
3807         int hash = 41;
3808         hash = (19 * hash) + getDescriptor().hashCode();
3809         hash = (37 * hash) + FILTER_FIELD_NUMBER;
3810         hash = (53 * hash) + getFilter().hashCode();
3811         if (getAggregationsCount() > 0) {
3812           hash = (37 * hash) + AGGREGATIONS_FIELD_NUMBER;
3813           hash = (53 * hash) + getAggregationsList().hashCode();
3814         }
3815         hash = (37 * hash) + DENOMINATOR_FILTER_FIELD_NUMBER;
3816         hash = (53 * hash) + getDenominatorFilter().hashCode();
3817         if (getDenominatorAggregationsCount() > 0) {
3818           hash = (37 * hash) + DENOMINATOR_AGGREGATIONS_FIELD_NUMBER;
3819           hash = (53 * hash) + getDenominatorAggregationsList().hashCode();
3820         }
3821         hash = (37 * hash) + COMPARISON_FIELD_NUMBER;
3822         hash = (53 * hash) + comparison_;
3823         hash = (37 * hash) + THRESHOLD_VALUE_FIELD_NUMBER;
3824         hash =
3825             (53 * hash)
3826                 + com.google.protobuf.Internal.hashLong(
3827                     java.lang.Double.doubleToLongBits(getThresholdValue()));
3828         if (hasDuration()) {
3829           hash = (37 * hash) + DURATION_FIELD_NUMBER;
3830           hash = (53 * hash) + getDuration().hashCode();
3831         }
3832         if (hasTrigger()) {
3833           hash = (37 * hash) + TRIGGER_FIELD_NUMBER;
3834           hash = (53 * hash) + getTrigger().hashCode();
3835         }
3836         hash = (37 * hash) + EVALUATION_MISSING_DATA_FIELD_NUMBER;
3837         hash = (53 * hash) + evaluationMissingData_;
3838         hash = (29 * hash) + getUnknownFields().hashCode();
3839         memoizedHashCode = hash;
3840         return hash;
3841       }
3842 
parseFrom( java.nio.ByteBuffer data)3843       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3844           java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
3845         return PARSER.parseFrom(data);
3846       }
3847 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3848       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3849           java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3850           throws com.google.protobuf.InvalidProtocolBufferException {
3851         return PARSER.parseFrom(data, extensionRegistry);
3852       }
3853 
parseFrom( com.google.protobuf.ByteString data)3854       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3855           com.google.protobuf.ByteString data)
3856           throws com.google.protobuf.InvalidProtocolBufferException {
3857         return PARSER.parseFrom(data);
3858       }
3859 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3860       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3861           com.google.protobuf.ByteString data,
3862           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3863           throws com.google.protobuf.InvalidProtocolBufferException {
3864         return PARSER.parseFrom(data, extensionRegistry);
3865       }
3866 
parseFrom( byte[] data)3867       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3868           byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
3869         return PARSER.parseFrom(data);
3870       }
3871 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3872       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3873           byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3874           throws com.google.protobuf.InvalidProtocolBufferException {
3875         return PARSER.parseFrom(data, extensionRegistry);
3876       }
3877 
parseFrom( java.io.InputStream input)3878       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3879           java.io.InputStream input) throws java.io.IOException {
3880         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
3881       }
3882 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3883       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3884           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3885           throws java.io.IOException {
3886         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
3887             PARSER, input, extensionRegistry);
3888       }
3889 
3890       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
parseDelimitedFrom(java.io.InputStream input)3891           parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
3892         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
3893       }
3894 
3895       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3896           parseDelimitedFrom(
3897               java.io.InputStream input,
3898               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3899               throws java.io.IOException {
3900         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
3901             PARSER, input, extensionRegistry);
3902       }
3903 
parseFrom( com.google.protobuf.CodedInputStream input)3904       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3905           com.google.protobuf.CodedInputStream input) throws java.io.IOException {
3906         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
3907       }
3908 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3909       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold parseFrom(
3910           com.google.protobuf.CodedInputStream input,
3911           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3912           throws java.io.IOException {
3913         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
3914             PARSER, input, extensionRegistry);
3915       }
3916 
3917       @java.lang.Override
newBuilderForType()3918       public Builder newBuilderForType() {
3919         return newBuilder();
3920       }
3921 
newBuilder()3922       public static Builder newBuilder() {
3923         return DEFAULT_INSTANCE.toBuilder();
3924       }
3925 
newBuilder( com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold prototype)3926       public static Builder newBuilder(
3927           com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold prototype) {
3928         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
3929       }
3930 
3931       @java.lang.Override
toBuilder()3932       public Builder toBuilder() {
3933         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
3934       }
3935 
3936       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3937       protected Builder newBuilderForType(
3938           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
3939         Builder builder = new Builder(parent);
3940         return builder;
3941       }
3942       /**
3943        *
3944        *
3945        * <pre>
3946        * A condition type that compares a collection of time series
3947        * against a threshold.
3948        * </pre>
3949        *
3950        * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition.MetricThreshold}
3951        */
3952       public static final class Builder
3953           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
3954           implements
3955           // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy.Condition.MetricThreshold)
3956           com.google.monitoring.v3.AlertPolicy.Condition.MetricThresholdOrBuilder {
getDescriptor()3957         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
3958           return com.google.monitoring.v3.AlertProto
3959               .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricThreshold_descriptor;
3960         }
3961 
3962         @java.lang.Override
3963         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()3964             internalGetFieldAccessorTable() {
3965           return com.google.monitoring.v3.AlertProto
3966               .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricThreshold_fieldAccessorTable
3967               .ensureFieldAccessorsInitialized(
3968                   com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.class,
3969                   com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.Builder.class);
3970         }
3971 
3972         // Construct using
3973         // com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.newBuilder()
Builder()3974         private Builder() {}
3975 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3976         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
3977           super(parent);
3978         }
3979 
3980         @java.lang.Override
clear()3981         public Builder clear() {
3982           super.clear();
3983           bitField0_ = 0;
3984           filter_ = "";
3985           if (aggregationsBuilder_ == null) {
3986             aggregations_ = java.util.Collections.emptyList();
3987           } else {
3988             aggregations_ = null;
3989             aggregationsBuilder_.clear();
3990           }
3991           bitField0_ = (bitField0_ & ~0x00000002);
3992           denominatorFilter_ = "";
3993           if (denominatorAggregationsBuilder_ == null) {
3994             denominatorAggregations_ = java.util.Collections.emptyList();
3995           } else {
3996             denominatorAggregations_ = null;
3997             denominatorAggregationsBuilder_.clear();
3998           }
3999           bitField0_ = (bitField0_ & ~0x00000008);
4000           comparison_ = 0;
4001           thresholdValue_ = 0D;
4002           duration_ = null;
4003           if (durationBuilder_ != null) {
4004             durationBuilder_.dispose();
4005             durationBuilder_ = null;
4006           }
4007           trigger_ = null;
4008           if (triggerBuilder_ != null) {
4009             triggerBuilder_.dispose();
4010             triggerBuilder_ = null;
4011           }
4012           evaluationMissingData_ = 0;
4013           return this;
4014         }
4015 
4016         @java.lang.Override
getDescriptorForType()4017         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
4018           return com.google.monitoring.v3.AlertProto
4019               .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricThreshold_descriptor;
4020         }
4021 
4022         @java.lang.Override
4023         public com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
getDefaultInstanceForType()4024             getDefaultInstanceForType() {
4025           return com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
4026               .getDefaultInstance();
4027         }
4028 
4029         @java.lang.Override
build()4030         public com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold build() {
4031           com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold result = buildPartial();
4032           if (!result.isInitialized()) {
4033             throw newUninitializedMessageException(result);
4034           }
4035           return result;
4036         }
4037 
4038         @java.lang.Override
buildPartial()4039         public com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold buildPartial() {
4040           com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold result =
4041               new com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold(this);
4042           buildPartialRepeatedFields(result);
4043           if (bitField0_ != 0) {
4044             buildPartial0(result);
4045           }
4046           onBuilt();
4047           return result;
4048         }
4049 
buildPartialRepeatedFields( com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold result)4050         private void buildPartialRepeatedFields(
4051             com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold result) {
4052           if (aggregationsBuilder_ == null) {
4053             if (((bitField0_ & 0x00000002) != 0)) {
4054               aggregations_ = java.util.Collections.unmodifiableList(aggregations_);
4055               bitField0_ = (bitField0_ & ~0x00000002);
4056             }
4057             result.aggregations_ = aggregations_;
4058           } else {
4059             result.aggregations_ = aggregationsBuilder_.build();
4060           }
4061           if (denominatorAggregationsBuilder_ == null) {
4062             if (((bitField0_ & 0x00000008) != 0)) {
4063               denominatorAggregations_ =
4064                   java.util.Collections.unmodifiableList(denominatorAggregations_);
4065               bitField0_ = (bitField0_ & ~0x00000008);
4066             }
4067             result.denominatorAggregations_ = denominatorAggregations_;
4068           } else {
4069             result.denominatorAggregations_ = denominatorAggregationsBuilder_.build();
4070           }
4071         }
4072 
buildPartial0( com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold result)4073         private void buildPartial0(
4074             com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold result) {
4075           int from_bitField0_ = bitField0_;
4076           if (((from_bitField0_ & 0x00000001) != 0)) {
4077             result.filter_ = filter_;
4078           }
4079           if (((from_bitField0_ & 0x00000004) != 0)) {
4080             result.denominatorFilter_ = denominatorFilter_;
4081           }
4082           if (((from_bitField0_ & 0x00000010) != 0)) {
4083             result.comparison_ = comparison_;
4084           }
4085           if (((from_bitField0_ & 0x00000020) != 0)) {
4086             result.thresholdValue_ = thresholdValue_;
4087           }
4088           if (((from_bitField0_ & 0x00000040) != 0)) {
4089             result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build();
4090           }
4091           if (((from_bitField0_ & 0x00000080) != 0)) {
4092             result.trigger_ = triggerBuilder_ == null ? trigger_ : triggerBuilder_.build();
4093           }
4094           if (((from_bitField0_ & 0x00000100) != 0)) {
4095             result.evaluationMissingData_ = evaluationMissingData_;
4096           }
4097         }
4098 
4099         @java.lang.Override
clone()4100         public Builder clone() {
4101           return super.clone();
4102         }
4103 
4104         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4105         public Builder setField(
4106             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
4107           return super.setField(field, value);
4108         }
4109 
4110         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)4111         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
4112           return super.clearField(field);
4113         }
4114 
4115         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)4116         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
4117           return super.clearOneof(oneof);
4118         }
4119 
4120         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)4121         public Builder setRepeatedField(
4122             com.google.protobuf.Descriptors.FieldDescriptor field,
4123             int index,
4124             java.lang.Object value) {
4125           return super.setRepeatedField(field, index, value);
4126         }
4127 
4128         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4129         public Builder addRepeatedField(
4130             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
4131           return super.addRepeatedField(field, value);
4132         }
4133 
4134         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)4135         public Builder mergeFrom(com.google.protobuf.Message other) {
4136           if (other instanceof com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) {
4137             return mergeFrom(
4138                 (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) other);
4139           } else {
4140             super.mergeFrom(other);
4141             return this;
4142           }
4143         }
4144 
mergeFrom( com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold other)4145         public Builder mergeFrom(
4146             com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold other) {
4147           if (other
4148               == com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
4149                   .getDefaultInstance()) return this;
4150           if (!other.getFilter().isEmpty()) {
4151             filter_ = other.filter_;
4152             bitField0_ |= 0x00000001;
4153             onChanged();
4154           }
4155           if (aggregationsBuilder_ == null) {
4156             if (!other.aggregations_.isEmpty()) {
4157               if (aggregations_.isEmpty()) {
4158                 aggregations_ = other.aggregations_;
4159                 bitField0_ = (bitField0_ & ~0x00000002);
4160               } else {
4161                 ensureAggregationsIsMutable();
4162                 aggregations_.addAll(other.aggregations_);
4163               }
4164               onChanged();
4165             }
4166           } else {
4167             if (!other.aggregations_.isEmpty()) {
4168               if (aggregationsBuilder_.isEmpty()) {
4169                 aggregationsBuilder_.dispose();
4170                 aggregationsBuilder_ = null;
4171                 aggregations_ = other.aggregations_;
4172                 bitField0_ = (bitField0_ & ~0x00000002);
4173                 aggregationsBuilder_ =
4174                     com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
4175                         ? getAggregationsFieldBuilder()
4176                         : null;
4177               } else {
4178                 aggregationsBuilder_.addAllMessages(other.aggregations_);
4179               }
4180             }
4181           }
4182           if (!other.getDenominatorFilter().isEmpty()) {
4183             denominatorFilter_ = other.denominatorFilter_;
4184             bitField0_ |= 0x00000004;
4185             onChanged();
4186           }
4187           if (denominatorAggregationsBuilder_ == null) {
4188             if (!other.denominatorAggregations_.isEmpty()) {
4189               if (denominatorAggregations_.isEmpty()) {
4190                 denominatorAggregations_ = other.denominatorAggregations_;
4191                 bitField0_ = (bitField0_ & ~0x00000008);
4192               } else {
4193                 ensureDenominatorAggregationsIsMutable();
4194                 denominatorAggregations_.addAll(other.denominatorAggregations_);
4195               }
4196               onChanged();
4197             }
4198           } else {
4199             if (!other.denominatorAggregations_.isEmpty()) {
4200               if (denominatorAggregationsBuilder_.isEmpty()) {
4201                 denominatorAggregationsBuilder_.dispose();
4202                 denominatorAggregationsBuilder_ = null;
4203                 denominatorAggregations_ = other.denominatorAggregations_;
4204                 bitField0_ = (bitField0_ & ~0x00000008);
4205                 denominatorAggregationsBuilder_ =
4206                     com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
4207                         ? getDenominatorAggregationsFieldBuilder()
4208                         : null;
4209               } else {
4210                 denominatorAggregationsBuilder_.addAllMessages(other.denominatorAggregations_);
4211               }
4212             }
4213           }
4214           if (other.comparison_ != 0) {
4215             setComparisonValue(other.getComparisonValue());
4216           }
4217           if (other.getThresholdValue() != 0D) {
4218             setThresholdValue(other.getThresholdValue());
4219           }
4220           if (other.hasDuration()) {
4221             mergeDuration(other.getDuration());
4222           }
4223           if (other.hasTrigger()) {
4224             mergeTrigger(other.getTrigger());
4225           }
4226           if (other.evaluationMissingData_ != 0) {
4227             setEvaluationMissingDataValue(other.getEvaluationMissingDataValue());
4228           }
4229           this.mergeUnknownFields(other.getUnknownFields());
4230           onChanged();
4231           return this;
4232         }
4233 
4234         @java.lang.Override
isInitialized()4235         public final boolean isInitialized() {
4236           return true;
4237         }
4238 
4239         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4240         public Builder mergeFrom(
4241             com.google.protobuf.CodedInputStream input,
4242             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4243             throws java.io.IOException {
4244           if (extensionRegistry == null) {
4245             throw new java.lang.NullPointerException();
4246           }
4247           try {
4248             boolean done = false;
4249             while (!done) {
4250               int tag = input.readTag();
4251               switch (tag) {
4252                 case 0:
4253                   done = true;
4254                   break;
4255                 case 18:
4256                   {
4257                     filter_ = input.readStringRequireUtf8();
4258                     bitField0_ |= 0x00000001;
4259                     break;
4260                   } // case 18
4261                 case 32:
4262                   {
4263                     comparison_ = input.readEnum();
4264                     bitField0_ |= 0x00000010;
4265                     break;
4266                   } // case 32
4267                 case 41:
4268                   {
4269                     thresholdValue_ = input.readDouble();
4270                     bitField0_ |= 0x00000020;
4271                     break;
4272                   } // case 41
4273                 case 50:
4274                   {
4275                     input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry);
4276                     bitField0_ |= 0x00000040;
4277                     break;
4278                   } // case 50
4279                 case 58:
4280                   {
4281                     input.readMessage(getTriggerFieldBuilder().getBuilder(), extensionRegistry);
4282                     bitField0_ |= 0x00000080;
4283                     break;
4284                   } // case 58
4285                 case 66:
4286                   {
4287                     com.google.monitoring.v3.Aggregation m =
4288                         input.readMessage(
4289                             com.google.monitoring.v3.Aggregation.parser(), extensionRegistry);
4290                     if (aggregationsBuilder_ == null) {
4291                       ensureAggregationsIsMutable();
4292                       aggregations_.add(m);
4293                     } else {
4294                       aggregationsBuilder_.addMessage(m);
4295                     }
4296                     break;
4297                   } // case 66
4298                 case 74:
4299                   {
4300                     denominatorFilter_ = input.readStringRequireUtf8();
4301                     bitField0_ |= 0x00000004;
4302                     break;
4303                   } // case 74
4304                 case 82:
4305                   {
4306                     com.google.monitoring.v3.Aggregation m =
4307                         input.readMessage(
4308                             com.google.monitoring.v3.Aggregation.parser(), extensionRegistry);
4309                     if (denominatorAggregationsBuilder_ == null) {
4310                       ensureDenominatorAggregationsIsMutable();
4311                       denominatorAggregations_.add(m);
4312                     } else {
4313                       denominatorAggregationsBuilder_.addMessage(m);
4314                     }
4315                     break;
4316                   } // case 82
4317                 case 88:
4318                   {
4319                     evaluationMissingData_ = input.readEnum();
4320                     bitField0_ |= 0x00000100;
4321                     break;
4322                   } // case 88
4323                 default:
4324                   {
4325                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
4326                       done = true; // was an endgroup tag
4327                     }
4328                     break;
4329                   } // default:
4330               } // switch (tag)
4331             } // while (!done)
4332           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4333             throw e.unwrapIOException();
4334           } finally {
4335             onChanged();
4336           } // finally
4337           return this;
4338         }
4339 
4340         private int bitField0_;
4341 
4342         private java.lang.Object filter_ = "";
4343         /**
4344          *
4345          *
4346          * <pre>
4347          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
4348          * identifies which time series should be compared with the threshold.
4349          * The filter is similar to the one that is specified in the
4350          * [`ListTimeSeries`
4351          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
4352          * (that call is useful to verify the time series that will be retrieved /
4353          * processed). The filter must specify the metric type and the resource
4354          * type. Optionally, it can specify resource labels and metric labels.
4355          * This field must not exceed 2048 Unicode characters in length.
4356          * </pre>
4357          *
4358          * <code>string filter = 2 [(.google.api.field_behavior) = REQUIRED];</code>
4359          *
4360          * @return The filter.
4361          */
getFilter()4362         public java.lang.String getFilter() {
4363           java.lang.Object ref = filter_;
4364           if (!(ref instanceof java.lang.String)) {
4365             com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4366             java.lang.String s = bs.toStringUtf8();
4367             filter_ = s;
4368             return s;
4369           } else {
4370             return (java.lang.String) ref;
4371           }
4372         }
4373         /**
4374          *
4375          *
4376          * <pre>
4377          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
4378          * identifies which time series should be compared with the threshold.
4379          * The filter is similar to the one that is specified in the
4380          * [`ListTimeSeries`
4381          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
4382          * (that call is useful to verify the time series that will be retrieved /
4383          * processed). The filter must specify the metric type and the resource
4384          * type. Optionally, it can specify resource labels and metric labels.
4385          * This field must not exceed 2048 Unicode characters in length.
4386          * </pre>
4387          *
4388          * <code>string filter = 2 [(.google.api.field_behavior) = REQUIRED];</code>
4389          *
4390          * @return The bytes for filter.
4391          */
getFilterBytes()4392         public com.google.protobuf.ByteString getFilterBytes() {
4393           java.lang.Object ref = filter_;
4394           if (ref instanceof String) {
4395             com.google.protobuf.ByteString b =
4396                 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4397             filter_ = b;
4398             return b;
4399           } else {
4400             return (com.google.protobuf.ByteString) ref;
4401           }
4402         }
4403         /**
4404          *
4405          *
4406          * <pre>
4407          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
4408          * identifies which time series should be compared with the threshold.
4409          * The filter is similar to the one that is specified in the
4410          * [`ListTimeSeries`
4411          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
4412          * (that call is useful to verify the time series that will be retrieved /
4413          * processed). The filter must specify the metric type and the resource
4414          * type. Optionally, it can specify resource labels and metric labels.
4415          * This field must not exceed 2048 Unicode characters in length.
4416          * </pre>
4417          *
4418          * <code>string filter = 2 [(.google.api.field_behavior) = REQUIRED];</code>
4419          *
4420          * @param value The filter to set.
4421          * @return This builder for chaining.
4422          */
setFilter(java.lang.String value)4423         public Builder setFilter(java.lang.String value) {
4424           if (value == null) {
4425             throw new NullPointerException();
4426           }
4427           filter_ = value;
4428           bitField0_ |= 0x00000001;
4429           onChanged();
4430           return this;
4431         }
4432         /**
4433          *
4434          *
4435          * <pre>
4436          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
4437          * identifies which time series should be compared with the threshold.
4438          * The filter is similar to the one that is specified in the
4439          * [`ListTimeSeries`
4440          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
4441          * (that call is useful to verify the time series that will be retrieved /
4442          * processed). The filter must specify the metric type and the resource
4443          * type. Optionally, it can specify resource labels and metric labels.
4444          * This field must not exceed 2048 Unicode characters in length.
4445          * </pre>
4446          *
4447          * <code>string filter = 2 [(.google.api.field_behavior) = REQUIRED];</code>
4448          *
4449          * @return This builder for chaining.
4450          */
clearFilter()4451         public Builder clearFilter() {
4452           filter_ = getDefaultInstance().getFilter();
4453           bitField0_ = (bitField0_ & ~0x00000001);
4454           onChanged();
4455           return this;
4456         }
4457         /**
4458          *
4459          *
4460          * <pre>
4461          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
4462          * identifies which time series should be compared with the threshold.
4463          * The filter is similar to the one that is specified in the
4464          * [`ListTimeSeries`
4465          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
4466          * (that call is useful to verify the time series that will be retrieved /
4467          * processed). The filter must specify the metric type and the resource
4468          * type. Optionally, it can specify resource labels and metric labels.
4469          * This field must not exceed 2048 Unicode characters in length.
4470          * </pre>
4471          *
4472          * <code>string filter = 2 [(.google.api.field_behavior) = REQUIRED];</code>
4473          *
4474          * @param value The bytes for filter to set.
4475          * @return This builder for chaining.
4476          */
setFilterBytes(com.google.protobuf.ByteString value)4477         public Builder setFilterBytes(com.google.protobuf.ByteString value) {
4478           if (value == null) {
4479             throw new NullPointerException();
4480           }
4481           checkByteStringIsUtf8(value);
4482           filter_ = value;
4483           bitField0_ |= 0x00000001;
4484           onChanged();
4485           return this;
4486         }
4487 
4488         private java.util.List<com.google.monitoring.v3.Aggregation> aggregations_ =
4489             java.util.Collections.emptyList();
4490 
ensureAggregationsIsMutable()4491         private void ensureAggregationsIsMutable() {
4492           if (!((bitField0_ & 0x00000002) != 0)) {
4493             aggregations_ =
4494                 new java.util.ArrayList<com.google.monitoring.v3.Aggregation>(aggregations_);
4495             bitField0_ |= 0x00000002;
4496           }
4497         }
4498 
4499         private com.google.protobuf.RepeatedFieldBuilderV3<
4500                 com.google.monitoring.v3.Aggregation,
4501                 com.google.monitoring.v3.Aggregation.Builder,
4502                 com.google.monitoring.v3.AggregationOrBuilder>
4503             aggregationsBuilder_;
4504 
4505         /**
4506          *
4507          *
4508          * <pre>
4509          * Specifies the alignment of data points in individual time series as
4510          * well as how to combine the retrieved time series together (such as
4511          * when aggregating multiple streams on each resource to a single
4512          * stream for each resource or when aggregating streams across all
4513          * members of a group of resources). Multiple aggregations
4514          * are applied in the order specified.
4515          * This field is similar to the one in the [`ListTimeSeries`
4516          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4517          * It is advisable to use the `ListTimeSeries` method when debugging this
4518          * field.
4519          * </pre>
4520          *
4521          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4522          */
getAggregationsList()4523         public java.util.List<com.google.monitoring.v3.Aggregation> getAggregationsList() {
4524           if (aggregationsBuilder_ == null) {
4525             return java.util.Collections.unmodifiableList(aggregations_);
4526           } else {
4527             return aggregationsBuilder_.getMessageList();
4528           }
4529         }
4530         /**
4531          *
4532          *
4533          * <pre>
4534          * Specifies the alignment of data points in individual time series as
4535          * well as how to combine the retrieved time series together (such as
4536          * when aggregating multiple streams on each resource to a single
4537          * stream for each resource or when aggregating streams across all
4538          * members of a group of resources). Multiple aggregations
4539          * are applied in the order specified.
4540          * This field is similar to the one in the [`ListTimeSeries`
4541          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4542          * It is advisable to use the `ListTimeSeries` method when debugging this
4543          * field.
4544          * </pre>
4545          *
4546          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4547          */
getAggregationsCount()4548         public int getAggregationsCount() {
4549           if (aggregationsBuilder_ == null) {
4550             return aggregations_.size();
4551           } else {
4552             return aggregationsBuilder_.getCount();
4553           }
4554         }
4555         /**
4556          *
4557          *
4558          * <pre>
4559          * Specifies the alignment of data points in individual time series as
4560          * well as how to combine the retrieved time series together (such as
4561          * when aggregating multiple streams on each resource to a single
4562          * stream for each resource or when aggregating streams across all
4563          * members of a group of resources). Multiple aggregations
4564          * are applied in the order specified.
4565          * This field is similar to the one in the [`ListTimeSeries`
4566          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4567          * It is advisable to use the `ListTimeSeries` method when debugging this
4568          * field.
4569          * </pre>
4570          *
4571          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4572          */
getAggregations(int index)4573         public com.google.monitoring.v3.Aggregation getAggregations(int index) {
4574           if (aggregationsBuilder_ == null) {
4575             return aggregations_.get(index);
4576           } else {
4577             return aggregationsBuilder_.getMessage(index);
4578           }
4579         }
4580         /**
4581          *
4582          *
4583          * <pre>
4584          * Specifies the alignment of data points in individual time series as
4585          * well as how to combine the retrieved time series together (such as
4586          * when aggregating multiple streams on each resource to a single
4587          * stream for each resource or when aggregating streams across all
4588          * members of a group of resources). Multiple aggregations
4589          * are applied in the order specified.
4590          * This field is similar to the one in the [`ListTimeSeries`
4591          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4592          * It is advisable to use the `ListTimeSeries` method when debugging this
4593          * field.
4594          * </pre>
4595          *
4596          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4597          */
setAggregations(int index, com.google.monitoring.v3.Aggregation value)4598         public Builder setAggregations(int index, com.google.monitoring.v3.Aggregation value) {
4599           if (aggregationsBuilder_ == null) {
4600             if (value == null) {
4601               throw new NullPointerException();
4602             }
4603             ensureAggregationsIsMutable();
4604             aggregations_.set(index, value);
4605             onChanged();
4606           } else {
4607             aggregationsBuilder_.setMessage(index, value);
4608           }
4609           return this;
4610         }
4611         /**
4612          *
4613          *
4614          * <pre>
4615          * Specifies the alignment of data points in individual time series as
4616          * well as how to combine the retrieved time series together (such as
4617          * when aggregating multiple streams on each resource to a single
4618          * stream for each resource or when aggregating streams across all
4619          * members of a group of resources). Multiple aggregations
4620          * are applied in the order specified.
4621          * This field is similar to the one in the [`ListTimeSeries`
4622          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4623          * It is advisable to use the `ListTimeSeries` method when debugging this
4624          * field.
4625          * </pre>
4626          *
4627          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4628          */
setAggregations( int index, com.google.monitoring.v3.Aggregation.Builder builderForValue)4629         public Builder setAggregations(
4630             int index, com.google.monitoring.v3.Aggregation.Builder builderForValue) {
4631           if (aggregationsBuilder_ == null) {
4632             ensureAggregationsIsMutable();
4633             aggregations_.set(index, builderForValue.build());
4634             onChanged();
4635           } else {
4636             aggregationsBuilder_.setMessage(index, builderForValue.build());
4637           }
4638           return this;
4639         }
4640         /**
4641          *
4642          *
4643          * <pre>
4644          * Specifies the alignment of data points in individual time series as
4645          * well as how to combine the retrieved time series together (such as
4646          * when aggregating multiple streams on each resource to a single
4647          * stream for each resource or when aggregating streams across all
4648          * members of a group of resources). Multiple aggregations
4649          * are applied in the order specified.
4650          * This field is similar to the one in the [`ListTimeSeries`
4651          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4652          * It is advisable to use the `ListTimeSeries` method when debugging this
4653          * field.
4654          * </pre>
4655          *
4656          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4657          */
addAggregations(com.google.monitoring.v3.Aggregation value)4658         public Builder addAggregations(com.google.monitoring.v3.Aggregation value) {
4659           if (aggregationsBuilder_ == null) {
4660             if (value == null) {
4661               throw new NullPointerException();
4662             }
4663             ensureAggregationsIsMutable();
4664             aggregations_.add(value);
4665             onChanged();
4666           } else {
4667             aggregationsBuilder_.addMessage(value);
4668           }
4669           return this;
4670         }
4671         /**
4672          *
4673          *
4674          * <pre>
4675          * Specifies the alignment of data points in individual time series as
4676          * well as how to combine the retrieved time series together (such as
4677          * when aggregating multiple streams on each resource to a single
4678          * stream for each resource or when aggregating streams across all
4679          * members of a group of resources). Multiple aggregations
4680          * are applied in the order specified.
4681          * This field is similar to the one in the [`ListTimeSeries`
4682          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4683          * It is advisable to use the `ListTimeSeries` method when debugging this
4684          * field.
4685          * </pre>
4686          *
4687          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4688          */
addAggregations(int index, com.google.monitoring.v3.Aggregation value)4689         public Builder addAggregations(int index, com.google.monitoring.v3.Aggregation value) {
4690           if (aggregationsBuilder_ == null) {
4691             if (value == null) {
4692               throw new NullPointerException();
4693             }
4694             ensureAggregationsIsMutable();
4695             aggregations_.add(index, value);
4696             onChanged();
4697           } else {
4698             aggregationsBuilder_.addMessage(index, value);
4699           }
4700           return this;
4701         }
4702         /**
4703          *
4704          *
4705          * <pre>
4706          * Specifies the alignment of data points in individual time series as
4707          * well as how to combine the retrieved time series together (such as
4708          * when aggregating multiple streams on each resource to a single
4709          * stream for each resource or when aggregating streams across all
4710          * members of a group of resources). Multiple aggregations
4711          * are applied in the order specified.
4712          * This field is similar to the one in the [`ListTimeSeries`
4713          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4714          * It is advisable to use the `ListTimeSeries` method when debugging this
4715          * field.
4716          * </pre>
4717          *
4718          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4719          */
addAggregations( com.google.monitoring.v3.Aggregation.Builder builderForValue)4720         public Builder addAggregations(
4721             com.google.monitoring.v3.Aggregation.Builder builderForValue) {
4722           if (aggregationsBuilder_ == null) {
4723             ensureAggregationsIsMutable();
4724             aggregations_.add(builderForValue.build());
4725             onChanged();
4726           } else {
4727             aggregationsBuilder_.addMessage(builderForValue.build());
4728           }
4729           return this;
4730         }
4731         /**
4732          *
4733          *
4734          * <pre>
4735          * Specifies the alignment of data points in individual time series as
4736          * well as how to combine the retrieved time series together (such as
4737          * when aggregating multiple streams on each resource to a single
4738          * stream for each resource or when aggregating streams across all
4739          * members of a group of resources). Multiple aggregations
4740          * are applied in the order specified.
4741          * This field is similar to the one in the [`ListTimeSeries`
4742          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4743          * It is advisable to use the `ListTimeSeries` method when debugging this
4744          * field.
4745          * </pre>
4746          *
4747          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4748          */
addAggregations( int index, com.google.monitoring.v3.Aggregation.Builder builderForValue)4749         public Builder addAggregations(
4750             int index, com.google.monitoring.v3.Aggregation.Builder builderForValue) {
4751           if (aggregationsBuilder_ == null) {
4752             ensureAggregationsIsMutable();
4753             aggregations_.add(index, builderForValue.build());
4754             onChanged();
4755           } else {
4756             aggregationsBuilder_.addMessage(index, builderForValue.build());
4757           }
4758           return this;
4759         }
4760         /**
4761          *
4762          *
4763          * <pre>
4764          * Specifies the alignment of data points in individual time series as
4765          * well as how to combine the retrieved time series together (such as
4766          * when aggregating multiple streams on each resource to a single
4767          * stream for each resource or when aggregating streams across all
4768          * members of a group of resources). Multiple aggregations
4769          * are applied in the order specified.
4770          * This field is similar to the one in the [`ListTimeSeries`
4771          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4772          * It is advisable to use the `ListTimeSeries` method when debugging this
4773          * field.
4774          * </pre>
4775          *
4776          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4777          */
addAllAggregations( java.lang.Iterable<? extends com.google.monitoring.v3.Aggregation> values)4778         public Builder addAllAggregations(
4779             java.lang.Iterable<? extends com.google.monitoring.v3.Aggregation> values) {
4780           if (aggregationsBuilder_ == null) {
4781             ensureAggregationsIsMutable();
4782             com.google.protobuf.AbstractMessageLite.Builder.addAll(values, aggregations_);
4783             onChanged();
4784           } else {
4785             aggregationsBuilder_.addAllMessages(values);
4786           }
4787           return this;
4788         }
4789         /**
4790          *
4791          *
4792          * <pre>
4793          * Specifies the alignment of data points in individual time series as
4794          * well as how to combine the retrieved time series together (such as
4795          * when aggregating multiple streams on each resource to a single
4796          * stream for each resource or when aggregating streams across all
4797          * members of a group of resources). Multiple aggregations
4798          * are applied in the order specified.
4799          * This field is similar to the one in the [`ListTimeSeries`
4800          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4801          * It is advisable to use the `ListTimeSeries` method when debugging this
4802          * field.
4803          * </pre>
4804          *
4805          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4806          */
clearAggregations()4807         public Builder clearAggregations() {
4808           if (aggregationsBuilder_ == null) {
4809             aggregations_ = java.util.Collections.emptyList();
4810             bitField0_ = (bitField0_ & ~0x00000002);
4811             onChanged();
4812           } else {
4813             aggregationsBuilder_.clear();
4814           }
4815           return this;
4816         }
4817         /**
4818          *
4819          *
4820          * <pre>
4821          * Specifies the alignment of data points in individual time series as
4822          * well as how to combine the retrieved time series together (such as
4823          * when aggregating multiple streams on each resource to a single
4824          * stream for each resource or when aggregating streams across all
4825          * members of a group of resources). Multiple aggregations
4826          * are applied in the order specified.
4827          * This field is similar to the one in the [`ListTimeSeries`
4828          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4829          * It is advisable to use the `ListTimeSeries` method when debugging this
4830          * field.
4831          * </pre>
4832          *
4833          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4834          */
removeAggregations(int index)4835         public Builder removeAggregations(int index) {
4836           if (aggregationsBuilder_ == null) {
4837             ensureAggregationsIsMutable();
4838             aggregations_.remove(index);
4839             onChanged();
4840           } else {
4841             aggregationsBuilder_.remove(index);
4842           }
4843           return this;
4844         }
4845         /**
4846          *
4847          *
4848          * <pre>
4849          * Specifies the alignment of data points in individual time series as
4850          * well as how to combine the retrieved time series together (such as
4851          * when aggregating multiple streams on each resource to a single
4852          * stream for each resource or when aggregating streams across all
4853          * members of a group of resources). Multiple aggregations
4854          * are applied in the order specified.
4855          * This field is similar to the one in the [`ListTimeSeries`
4856          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4857          * It is advisable to use the `ListTimeSeries` method when debugging this
4858          * field.
4859          * </pre>
4860          *
4861          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4862          */
getAggregationsBuilder(int index)4863         public com.google.monitoring.v3.Aggregation.Builder getAggregationsBuilder(int index) {
4864           return getAggregationsFieldBuilder().getBuilder(index);
4865         }
4866         /**
4867          *
4868          *
4869          * <pre>
4870          * Specifies the alignment of data points in individual time series as
4871          * well as how to combine the retrieved time series together (such as
4872          * when aggregating multiple streams on each resource to a single
4873          * stream for each resource or when aggregating streams across all
4874          * members of a group of resources). Multiple aggregations
4875          * are applied in the order specified.
4876          * This field is similar to the one in the [`ListTimeSeries`
4877          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4878          * It is advisable to use the `ListTimeSeries` method when debugging this
4879          * field.
4880          * </pre>
4881          *
4882          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4883          */
getAggregationsOrBuilder(int index)4884         public com.google.monitoring.v3.AggregationOrBuilder getAggregationsOrBuilder(int index) {
4885           if (aggregationsBuilder_ == null) {
4886             return aggregations_.get(index);
4887           } else {
4888             return aggregationsBuilder_.getMessageOrBuilder(index);
4889           }
4890         }
4891         /**
4892          *
4893          *
4894          * <pre>
4895          * Specifies the alignment of data points in individual time series as
4896          * well as how to combine the retrieved time series together (such as
4897          * when aggregating multiple streams on each resource to a single
4898          * stream for each resource or when aggregating streams across all
4899          * members of a group of resources). Multiple aggregations
4900          * are applied in the order specified.
4901          * This field is similar to the one in the [`ListTimeSeries`
4902          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4903          * It is advisable to use the `ListTimeSeries` method when debugging this
4904          * field.
4905          * </pre>
4906          *
4907          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4908          */
4909         public java.util.List<? extends com.google.monitoring.v3.AggregationOrBuilder>
getAggregationsOrBuilderList()4910             getAggregationsOrBuilderList() {
4911           if (aggregationsBuilder_ != null) {
4912             return aggregationsBuilder_.getMessageOrBuilderList();
4913           } else {
4914             return java.util.Collections.unmodifiableList(aggregations_);
4915           }
4916         }
4917         /**
4918          *
4919          *
4920          * <pre>
4921          * Specifies the alignment of data points in individual time series as
4922          * well as how to combine the retrieved time series together (such as
4923          * when aggregating multiple streams on each resource to a single
4924          * stream for each resource or when aggregating streams across all
4925          * members of a group of resources). Multiple aggregations
4926          * are applied in the order specified.
4927          * This field is similar to the one in the [`ListTimeSeries`
4928          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4929          * It is advisable to use the `ListTimeSeries` method when debugging this
4930          * field.
4931          * </pre>
4932          *
4933          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4934          */
addAggregationsBuilder()4935         public com.google.monitoring.v3.Aggregation.Builder addAggregationsBuilder() {
4936           return getAggregationsFieldBuilder()
4937               .addBuilder(com.google.monitoring.v3.Aggregation.getDefaultInstance());
4938         }
4939         /**
4940          *
4941          *
4942          * <pre>
4943          * Specifies the alignment of data points in individual time series as
4944          * well as how to combine the retrieved time series together (such as
4945          * when aggregating multiple streams on each resource to a single
4946          * stream for each resource or when aggregating streams across all
4947          * members of a group of resources). Multiple aggregations
4948          * are applied in the order specified.
4949          * This field is similar to the one in the [`ListTimeSeries`
4950          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4951          * It is advisable to use the `ListTimeSeries` method when debugging this
4952          * field.
4953          * </pre>
4954          *
4955          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4956          */
addAggregationsBuilder(int index)4957         public com.google.monitoring.v3.Aggregation.Builder addAggregationsBuilder(int index) {
4958           return getAggregationsFieldBuilder()
4959               .addBuilder(index, com.google.monitoring.v3.Aggregation.getDefaultInstance());
4960         }
4961         /**
4962          *
4963          *
4964          * <pre>
4965          * Specifies the alignment of data points in individual time series as
4966          * well as how to combine the retrieved time series together (such as
4967          * when aggregating multiple streams on each resource to a single
4968          * stream for each resource or when aggregating streams across all
4969          * members of a group of resources). Multiple aggregations
4970          * are applied in the order specified.
4971          * This field is similar to the one in the [`ListTimeSeries`
4972          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
4973          * It is advisable to use the `ListTimeSeries` method when debugging this
4974          * field.
4975          * </pre>
4976          *
4977          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 8;</code>
4978          */
4979         public java.util.List<com.google.monitoring.v3.Aggregation.Builder>
getAggregationsBuilderList()4980             getAggregationsBuilderList() {
4981           return getAggregationsFieldBuilder().getBuilderList();
4982         }
4983 
4984         private com.google.protobuf.RepeatedFieldBuilderV3<
4985                 com.google.monitoring.v3.Aggregation,
4986                 com.google.monitoring.v3.Aggregation.Builder,
4987                 com.google.monitoring.v3.AggregationOrBuilder>
getAggregationsFieldBuilder()4988             getAggregationsFieldBuilder() {
4989           if (aggregationsBuilder_ == null) {
4990             aggregationsBuilder_ =
4991                 new com.google.protobuf.RepeatedFieldBuilderV3<
4992                     com.google.monitoring.v3.Aggregation,
4993                     com.google.monitoring.v3.Aggregation.Builder,
4994                     com.google.monitoring.v3.AggregationOrBuilder>(
4995                     aggregations_,
4996                     ((bitField0_ & 0x00000002) != 0),
4997                     getParentForChildren(),
4998                     isClean());
4999             aggregations_ = null;
5000           }
5001           return aggregationsBuilder_;
5002         }
5003 
5004         private java.lang.Object denominatorFilter_ = "";
5005         /**
5006          *
5007          *
5008          * <pre>
5009          * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
5010          * identifies a time series that should be used as the denominator of a
5011          * ratio that will be compared with the threshold. If a
5012          * `denominator_filter` is specified, the time series specified by the
5013          * `filter` field will be used as the numerator.
5014          * The filter must specify the metric type and optionally may contain
5015          * restrictions on resource type, resource labels, and metric labels.
5016          * This field may not exceed 2048 Unicode characters in length.
5017          * </pre>
5018          *
5019          * <code>string denominator_filter = 9;</code>
5020          *
5021          * @return The denominatorFilter.
5022          */
getDenominatorFilter()5023         public java.lang.String getDenominatorFilter() {
5024           java.lang.Object ref = denominatorFilter_;
5025           if (!(ref instanceof java.lang.String)) {
5026             com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
5027             java.lang.String s = bs.toStringUtf8();
5028             denominatorFilter_ = s;
5029             return s;
5030           } else {
5031             return (java.lang.String) ref;
5032           }
5033         }
5034         /**
5035          *
5036          *
5037          * <pre>
5038          * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
5039          * identifies a time series that should be used as the denominator of a
5040          * ratio that will be compared with the threshold. If a
5041          * `denominator_filter` is specified, the time series specified by the
5042          * `filter` field will be used as the numerator.
5043          * The filter must specify the metric type and optionally may contain
5044          * restrictions on resource type, resource labels, and metric labels.
5045          * This field may not exceed 2048 Unicode characters in length.
5046          * </pre>
5047          *
5048          * <code>string denominator_filter = 9;</code>
5049          *
5050          * @return The bytes for denominatorFilter.
5051          */
getDenominatorFilterBytes()5052         public com.google.protobuf.ByteString getDenominatorFilterBytes() {
5053           java.lang.Object ref = denominatorFilter_;
5054           if (ref instanceof String) {
5055             com.google.protobuf.ByteString b =
5056                 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
5057             denominatorFilter_ = b;
5058             return b;
5059           } else {
5060             return (com.google.protobuf.ByteString) ref;
5061           }
5062         }
5063         /**
5064          *
5065          *
5066          * <pre>
5067          * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
5068          * identifies a time series that should be used as the denominator of a
5069          * ratio that will be compared with the threshold. If a
5070          * `denominator_filter` is specified, the time series specified by the
5071          * `filter` field will be used as the numerator.
5072          * The filter must specify the metric type and optionally may contain
5073          * restrictions on resource type, resource labels, and metric labels.
5074          * This field may not exceed 2048 Unicode characters in length.
5075          * </pre>
5076          *
5077          * <code>string denominator_filter = 9;</code>
5078          *
5079          * @param value The denominatorFilter to set.
5080          * @return This builder for chaining.
5081          */
setDenominatorFilter(java.lang.String value)5082         public Builder setDenominatorFilter(java.lang.String value) {
5083           if (value == null) {
5084             throw new NullPointerException();
5085           }
5086           denominatorFilter_ = value;
5087           bitField0_ |= 0x00000004;
5088           onChanged();
5089           return this;
5090         }
5091         /**
5092          *
5093          *
5094          * <pre>
5095          * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
5096          * identifies a time series that should be used as the denominator of a
5097          * ratio that will be compared with the threshold. If a
5098          * `denominator_filter` is specified, the time series specified by the
5099          * `filter` field will be used as the numerator.
5100          * The filter must specify the metric type and optionally may contain
5101          * restrictions on resource type, resource labels, and metric labels.
5102          * This field may not exceed 2048 Unicode characters in length.
5103          * </pre>
5104          *
5105          * <code>string denominator_filter = 9;</code>
5106          *
5107          * @return This builder for chaining.
5108          */
clearDenominatorFilter()5109         public Builder clearDenominatorFilter() {
5110           denominatorFilter_ = getDefaultInstance().getDenominatorFilter();
5111           bitField0_ = (bitField0_ & ~0x00000004);
5112           onChanged();
5113           return this;
5114         }
5115         /**
5116          *
5117          *
5118          * <pre>
5119          * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
5120          * identifies a time series that should be used as the denominator of a
5121          * ratio that will be compared with the threshold. If a
5122          * `denominator_filter` is specified, the time series specified by the
5123          * `filter` field will be used as the numerator.
5124          * The filter must specify the metric type and optionally may contain
5125          * restrictions on resource type, resource labels, and metric labels.
5126          * This field may not exceed 2048 Unicode characters in length.
5127          * </pre>
5128          *
5129          * <code>string denominator_filter = 9;</code>
5130          *
5131          * @param value The bytes for denominatorFilter to set.
5132          * @return This builder for chaining.
5133          */
setDenominatorFilterBytes(com.google.protobuf.ByteString value)5134         public Builder setDenominatorFilterBytes(com.google.protobuf.ByteString value) {
5135           if (value == null) {
5136             throw new NullPointerException();
5137           }
5138           checkByteStringIsUtf8(value);
5139           denominatorFilter_ = value;
5140           bitField0_ |= 0x00000004;
5141           onChanged();
5142           return this;
5143         }
5144 
5145         private java.util.List<com.google.monitoring.v3.Aggregation> denominatorAggregations_ =
5146             java.util.Collections.emptyList();
5147 
ensureDenominatorAggregationsIsMutable()5148         private void ensureDenominatorAggregationsIsMutable() {
5149           if (!((bitField0_ & 0x00000008) != 0)) {
5150             denominatorAggregations_ =
5151                 new java.util.ArrayList<com.google.monitoring.v3.Aggregation>(
5152                     denominatorAggregations_);
5153             bitField0_ |= 0x00000008;
5154           }
5155         }
5156 
5157         private com.google.protobuf.RepeatedFieldBuilderV3<
5158                 com.google.monitoring.v3.Aggregation,
5159                 com.google.monitoring.v3.Aggregation.Builder,
5160                 com.google.monitoring.v3.AggregationOrBuilder>
5161             denominatorAggregationsBuilder_;
5162 
5163         /**
5164          *
5165          *
5166          * <pre>
5167          * Specifies the alignment of data points in individual time series
5168          * selected by `denominatorFilter` as
5169          * well as how to combine the retrieved time series together (such as
5170          * when aggregating multiple streams on each resource to a single
5171          * stream for each resource or when aggregating streams across all
5172          * members of a group of resources).
5173          * When computing ratios, the `aggregations` and
5174          * `denominator_aggregations` fields must use the same alignment period
5175          * and produce time series that have the same periodicity and labels.
5176          * </pre>
5177          *
5178          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5179          */
5180         public java.util.List<com.google.monitoring.v3.Aggregation>
getDenominatorAggregationsList()5181             getDenominatorAggregationsList() {
5182           if (denominatorAggregationsBuilder_ == null) {
5183             return java.util.Collections.unmodifiableList(denominatorAggregations_);
5184           } else {
5185             return denominatorAggregationsBuilder_.getMessageList();
5186           }
5187         }
5188         /**
5189          *
5190          *
5191          * <pre>
5192          * Specifies the alignment of data points in individual time series
5193          * selected by `denominatorFilter` as
5194          * well as how to combine the retrieved time series together (such as
5195          * when aggregating multiple streams on each resource to a single
5196          * stream for each resource or when aggregating streams across all
5197          * members of a group of resources).
5198          * When computing ratios, the `aggregations` and
5199          * `denominator_aggregations` fields must use the same alignment period
5200          * and produce time series that have the same periodicity and labels.
5201          * </pre>
5202          *
5203          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5204          */
getDenominatorAggregationsCount()5205         public int getDenominatorAggregationsCount() {
5206           if (denominatorAggregationsBuilder_ == null) {
5207             return denominatorAggregations_.size();
5208           } else {
5209             return denominatorAggregationsBuilder_.getCount();
5210           }
5211         }
5212         /**
5213          *
5214          *
5215          * <pre>
5216          * Specifies the alignment of data points in individual time series
5217          * selected by `denominatorFilter` as
5218          * well as how to combine the retrieved time series together (such as
5219          * when aggregating multiple streams on each resource to a single
5220          * stream for each resource or when aggregating streams across all
5221          * members of a group of resources).
5222          * When computing ratios, the `aggregations` and
5223          * `denominator_aggregations` fields must use the same alignment period
5224          * and produce time series that have the same periodicity and labels.
5225          * </pre>
5226          *
5227          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5228          */
getDenominatorAggregations(int index)5229         public com.google.monitoring.v3.Aggregation getDenominatorAggregations(int index) {
5230           if (denominatorAggregationsBuilder_ == null) {
5231             return denominatorAggregations_.get(index);
5232           } else {
5233             return denominatorAggregationsBuilder_.getMessage(index);
5234           }
5235         }
5236         /**
5237          *
5238          *
5239          * <pre>
5240          * Specifies the alignment of data points in individual time series
5241          * selected by `denominatorFilter` as
5242          * well as how to combine the retrieved time series together (such as
5243          * when aggregating multiple streams on each resource to a single
5244          * stream for each resource or when aggregating streams across all
5245          * members of a group of resources).
5246          * When computing ratios, the `aggregations` and
5247          * `denominator_aggregations` fields must use the same alignment period
5248          * and produce time series that have the same periodicity and labels.
5249          * </pre>
5250          *
5251          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5252          */
setDenominatorAggregations( int index, com.google.monitoring.v3.Aggregation value)5253         public Builder setDenominatorAggregations(
5254             int index, com.google.monitoring.v3.Aggregation value) {
5255           if (denominatorAggregationsBuilder_ == null) {
5256             if (value == null) {
5257               throw new NullPointerException();
5258             }
5259             ensureDenominatorAggregationsIsMutable();
5260             denominatorAggregations_.set(index, value);
5261             onChanged();
5262           } else {
5263             denominatorAggregationsBuilder_.setMessage(index, value);
5264           }
5265           return this;
5266         }
5267         /**
5268          *
5269          *
5270          * <pre>
5271          * Specifies the alignment of data points in individual time series
5272          * selected by `denominatorFilter` as
5273          * well as how to combine the retrieved time series together (such as
5274          * when aggregating multiple streams on each resource to a single
5275          * stream for each resource or when aggregating streams across all
5276          * members of a group of resources).
5277          * When computing ratios, the `aggregations` and
5278          * `denominator_aggregations` fields must use the same alignment period
5279          * and produce time series that have the same periodicity and labels.
5280          * </pre>
5281          *
5282          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5283          */
setDenominatorAggregations( int index, com.google.monitoring.v3.Aggregation.Builder builderForValue)5284         public Builder setDenominatorAggregations(
5285             int index, com.google.monitoring.v3.Aggregation.Builder builderForValue) {
5286           if (denominatorAggregationsBuilder_ == null) {
5287             ensureDenominatorAggregationsIsMutable();
5288             denominatorAggregations_.set(index, builderForValue.build());
5289             onChanged();
5290           } else {
5291             denominatorAggregationsBuilder_.setMessage(index, builderForValue.build());
5292           }
5293           return this;
5294         }
5295         /**
5296          *
5297          *
5298          * <pre>
5299          * Specifies the alignment of data points in individual time series
5300          * selected by `denominatorFilter` as
5301          * well as how to combine the retrieved time series together (such as
5302          * when aggregating multiple streams on each resource to a single
5303          * stream for each resource or when aggregating streams across all
5304          * members of a group of resources).
5305          * When computing ratios, the `aggregations` and
5306          * `denominator_aggregations` fields must use the same alignment period
5307          * and produce time series that have the same periodicity and labels.
5308          * </pre>
5309          *
5310          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5311          */
addDenominatorAggregations(com.google.monitoring.v3.Aggregation value)5312         public Builder addDenominatorAggregations(com.google.monitoring.v3.Aggregation value) {
5313           if (denominatorAggregationsBuilder_ == null) {
5314             if (value == null) {
5315               throw new NullPointerException();
5316             }
5317             ensureDenominatorAggregationsIsMutable();
5318             denominatorAggregations_.add(value);
5319             onChanged();
5320           } else {
5321             denominatorAggregationsBuilder_.addMessage(value);
5322           }
5323           return this;
5324         }
5325         /**
5326          *
5327          *
5328          * <pre>
5329          * Specifies the alignment of data points in individual time series
5330          * selected by `denominatorFilter` as
5331          * well as how to combine the retrieved time series together (such as
5332          * when aggregating multiple streams on each resource to a single
5333          * stream for each resource or when aggregating streams across all
5334          * members of a group of resources).
5335          * When computing ratios, the `aggregations` and
5336          * `denominator_aggregations` fields must use the same alignment period
5337          * and produce time series that have the same periodicity and labels.
5338          * </pre>
5339          *
5340          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5341          */
addDenominatorAggregations( int index, com.google.monitoring.v3.Aggregation value)5342         public Builder addDenominatorAggregations(
5343             int index, com.google.monitoring.v3.Aggregation value) {
5344           if (denominatorAggregationsBuilder_ == null) {
5345             if (value == null) {
5346               throw new NullPointerException();
5347             }
5348             ensureDenominatorAggregationsIsMutable();
5349             denominatorAggregations_.add(index, value);
5350             onChanged();
5351           } else {
5352             denominatorAggregationsBuilder_.addMessage(index, value);
5353           }
5354           return this;
5355         }
5356         /**
5357          *
5358          *
5359          * <pre>
5360          * Specifies the alignment of data points in individual time series
5361          * selected by `denominatorFilter` as
5362          * well as how to combine the retrieved time series together (such as
5363          * when aggregating multiple streams on each resource to a single
5364          * stream for each resource or when aggregating streams across all
5365          * members of a group of resources).
5366          * When computing ratios, the `aggregations` and
5367          * `denominator_aggregations` fields must use the same alignment period
5368          * and produce time series that have the same periodicity and labels.
5369          * </pre>
5370          *
5371          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5372          */
addDenominatorAggregations( com.google.monitoring.v3.Aggregation.Builder builderForValue)5373         public Builder addDenominatorAggregations(
5374             com.google.monitoring.v3.Aggregation.Builder builderForValue) {
5375           if (denominatorAggregationsBuilder_ == null) {
5376             ensureDenominatorAggregationsIsMutable();
5377             denominatorAggregations_.add(builderForValue.build());
5378             onChanged();
5379           } else {
5380             denominatorAggregationsBuilder_.addMessage(builderForValue.build());
5381           }
5382           return this;
5383         }
5384         /**
5385          *
5386          *
5387          * <pre>
5388          * Specifies the alignment of data points in individual time series
5389          * selected by `denominatorFilter` as
5390          * well as how to combine the retrieved time series together (such as
5391          * when aggregating multiple streams on each resource to a single
5392          * stream for each resource or when aggregating streams across all
5393          * members of a group of resources).
5394          * When computing ratios, the `aggregations` and
5395          * `denominator_aggregations` fields must use the same alignment period
5396          * and produce time series that have the same periodicity and labels.
5397          * </pre>
5398          *
5399          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5400          */
addDenominatorAggregations( int index, com.google.monitoring.v3.Aggregation.Builder builderForValue)5401         public Builder addDenominatorAggregations(
5402             int index, com.google.monitoring.v3.Aggregation.Builder builderForValue) {
5403           if (denominatorAggregationsBuilder_ == null) {
5404             ensureDenominatorAggregationsIsMutable();
5405             denominatorAggregations_.add(index, builderForValue.build());
5406             onChanged();
5407           } else {
5408             denominatorAggregationsBuilder_.addMessage(index, builderForValue.build());
5409           }
5410           return this;
5411         }
5412         /**
5413          *
5414          *
5415          * <pre>
5416          * Specifies the alignment of data points in individual time series
5417          * selected by `denominatorFilter` as
5418          * well as how to combine the retrieved time series together (such as
5419          * when aggregating multiple streams on each resource to a single
5420          * stream for each resource or when aggregating streams across all
5421          * members of a group of resources).
5422          * When computing ratios, the `aggregations` and
5423          * `denominator_aggregations` fields must use the same alignment period
5424          * and produce time series that have the same periodicity and labels.
5425          * </pre>
5426          *
5427          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5428          */
addAllDenominatorAggregations( java.lang.Iterable<? extends com.google.monitoring.v3.Aggregation> values)5429         public Builder addAllDenominatorAggregations(
5430             java.lang.Iterable<? extends com.google.monitoring.v3.Aggregation> values) {
5431           if (denominatorAggregationsBuilder_ == null) {
5432             ensureDenominatorAggregationsIsMutable();
5433             com.google.protobuf.AbstractMessageLite.Builder.addAll(
5434                 values, denominatorAggregations_);
5435             onChanged();
5436           } else {
5437             denominatorAggregationsBuilder_.addAllMessages(values);
5438           }
5439           return this;
5440         }
5441         /**
5442          *
5443          *
5444          * <pre>
5445          * Specifies the alignment of data points in individual time series
5446          * selected by `denominatorFilter` as
5447          * well as how to combine the retrieved time series together (such as
5448          * when aggregating multiple streams on each resource to a single
5449          * stream for each resource or when aggregating streams across all
5450          * members of a group of resources).
5451          * When computing ratios, the `aggregations` and
5452          * `denominator_aggregations` fields must use the same alignment period
5453          * and produce time series that have the same periodicity and labels.
5454          * </pre>
5455          *
5456          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5457          */
clearDenominatorAggregations()5458         public Builder clearDenominatorAggregations() {
5459           if (denominatorAggregationsBuilder_ == null) {
5460             denominatorAggregations_ = java.util.Collections.emptyList();
5461             bitField0_ = (bitField0_ & ~0x00000008);
5462             onChanged();
5463           } else {
5464             denominatorAggregationsBuilder_.clear();
5465           }
5466           return this;
5467         }
5468         /**
5469          *
5470          *
5471          * <pre>
5472          * Specifies the alignment of data points in individual time series
5473          * selected by `denominatorFilter` as
5474          * well as how to combine the retrieved time series together (such as
5475          * when aggregating multiple streams on each resource to a single
5476          * stream for each resource or when aggregating streams across all
5477          * members of a group of resources).
5478          * When computing ratios, the `aggregations` and
5479          * `denominator_aggregations` fields must use the same alignment period
5480          * and produce time series that have the same periodicity and labels.
5481          * </pre>
5482          *
5483          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5484          */
removeDenominatorAggregations(int index)5485         public Builder removeDenominatorAggregations(int index) {
5486           if (denominatorAggregationsBuilder_ == null) {
5487             ensureDenominatorAggregationsIsMutable();
5488             denominatorAggregations_.remove(index);
5489             onChanged();
5490           } else {
5491             denominatorAggregationsBuilder_.remove(index);
5492           }
5493           return this;
5494         }
5495         /**
5496          *
5497          *
5498          * <pre>
5499          * Specifies the alignment of data points in individual time series
5500          * selected by `denominatorFilter` as
5501          * well as how to combine the retrieved time series together (such as
5502          * when aggregating multiple streams on each resource to a single
5503          * stream for each resource or when aggregating streams across all
5504          * members of a group of resources).
5505          * When computing ratios, the `aggregations` and
5506          * `denominator_aggregations` fields must use the same alignment period
5507          * and produce time series that have the same periodicity and labels.
5508          * </pre>
5509          *
5510          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5511          */
getDenominatorAggregationsBuilder( int index)5512         public com.google.monitoring.v3.Aggregation.Builder getDenominatorAggregationsBuilder(
5513             int index) {
5514           return getDenominatorAggregationsFieldBuilder().getBuilder(index);
5515         }
5516         /**
5517          *
5518          *
5519          * <pre>
5520          * Specifies the alignment of data points in individual time series
5521          * selected by `denominatorFilter` as
5522          * well as how to combine the retrieved time series together (such as
5523          * when aggregating multiple streams on each resource to a single
5524          * stream for each resource or when aggregating streams across all
5525          * members of a group of resources).
5526          * When computing ratios, the `aggregations` and
5527          * `denominator_aggregations` fields must use the same alignment period
5528          * and produce time series that have the same periodicity and labels.
5529          * </pre>
5530          *
5531          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5532          */
getDenominatorAggregationsOrBuilder( int index)5533         public com.google.monitoring.v3.AggregationOrBuilder getDenominatorAggregationsOrBuilder(
5534             int index) {
5535           if (denominatorAggregationsBuilder_ == null) {
5536             return denominatorAggregations_.get(index);
5537           } else {
5538             return denominatorAggregationsBuilder_.getMessageOrBuilder(index);
5539           }
5540         }
5541         /**
5542          *
5543          *
5544          * <pre>
5545          * Specifies the alignment of data points in individual time series
5546          * selected by `denominatorFilter` as
5547          * well as how to combine the retrieved time series together (such as
5548          * when aggregating multiple streams on each resource to a single
5549          * stream for each resource or when aggregating streams across all
5550          * members of a group of resources).
5551          * When computing ratios, the `aggregations` and
5552          * `denominator_aggregations` fields must use the same alignment period
5553          * and produce time series that have the same periodicity and labels.
5554          * </pre>
5555          *
5556          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5557          */
5558         public java.util.List<? extends com.google.monitoring.v3.AggregationOrBuilder>
getDenominatorAggregationsOrBuilderList()5559             getDenominatorAggregationsOrBuilderList() {
5560           if (denominatorAggregationsBuilder_ != null) {
5561             return denominatorAggregationsBuilder_.getMessageOrBuilderList();
5562           } else {
5563             return java.util.Collections.unmodifiableList(denominatorAggregations_);
5564           }
5565         }
5566         /**
5567          *
5568          *
5569          * <pre>
5570          * Specifies the alignment of data points in individual time series
5571          * selected by `denominatorFilter` as
5572          * well as how to combine the retrieved time series together (such as
5573          * when aggregating multiple streams on each resource to a single
5574          * stream for each resource or when aggregating streams across all
5575          * members of a group of resources).
5576          * When computing ratios, the `aggregations` and
5577          * `denominator_aggregations` fields must use the same alignment period
5578          * and produce time series that have the same periodicity and labels.
5579          * </pre>
5580          *
5581          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5582          */
addDenominatorAggregationsBuilder()5583         public com.google.monitoring.v3.Aggregation.Builder addDenominatorAggregationsBuilder() {
5584           return getDenominatorAggregationsFieldBuilder()
5585               .addBuilder(com.google.monitoring.v3.Aggregation.getDefaultInstance());
5586         }
5587         /**
5588          *
5589          *
5590          * <pre>
5591          * Specifies the alignment of data points in individual time series
5592          * selected by `denominatorFilter` as
5593          * well as how to combine the retrieved time series together (such as
5594          * when aggregating multiple streams on each resource to a single
5595          * stream for each resource or when aggregating streams across all
5596          * members of a group of resources).
5597          * When computing ratios, the `aggregations` and
5598          * `denominator_aggregations` fields must use the same alignment period
5599          * and produce time series that have the same periodicity and labels.
5600          * </pre>
5601          *
5602          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5603          */
addDenominatorAggregationsBuilder( int index)5604         public com.google.monitoring.v3.Aggregation.Builder addDenominatorAggregationsBuilder(
5605             int index) {
5606           return getDenominatorAggregationsFieldBuilder()
5607               .addBuilder(index, com.google.monitoring.v3.Aggregation.getDefaultInstance());
5608         }
5609         /**
5610          *
5611          *
5612          * <pre>
5613          * Specifies the alignment of data points in individual time series
5614          * selected by `denominatorFilter` as
5615          * well as how to combine the retrieved time series together (such as
5616          * when aggregating multiple streams on each resource to a single
5617          * stream for each resource or when aggregating streams across all
5618          * members of a group of resources).
5619          * When computing ratios, the `aggregations` and
5620          * `denominator_aggregations` fields must use the same alignment period
5621          * and produce time series that have the same periodicity and labels.
5622          * </pre>
5623          *
5624          * <code>repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10;</code>
5625          */
5626         public java.util.List<com.google.monitoring.v3.Aggregation.Builder>
getDenominatorAggregationsBuilderList()5627             getDenominatorAggregationsBuilderList() {
5628           return getDenominatorAggregationsFieldBuilder().getBuilderList();
5629         }
5630 
5631         private com.google.protobuf.RepeatedFieldBuilderV3<
5632                 com.google.monitoring.v3.Aggregation,
5633                 com.google.monitoring.v3.Aggregation.Builder,
5634                 com.google.monitoring.v3.AggregationOrBuilder>
getDenominatorAggregationsFieldBuilder()5635             getDenominatorAggregationsFieldBuilder() {
5636           if (denominatorAggregationsBuilder_ == null) {
5637             denominatorAggregationsBuilder_ =
5638                 new com.google.protobuf.RepeatedFieldBuilderV3<
5639                     com.google.monitoring.v3.Aggregation,
5640                     com.google.monitoring.v3.Aggregation.Builder,
5641                     com.google.monitoring.v3.AggregationOrBuilder>(
5642                     denominatorAggregations_,
5643                     ((bitField0_ & 0x00000008) != 0),
5644                     getParentForChildren(),
5645                     isClean());
5646             denominatorAggregations_ = null;
5647           }
5648           return denominatorAggregationsBuilder_;
5649         }
5650 
5651         private int comparison_ = 0;
5652         /**
5653          *
5654          *
5655          * <pre>
5656          * The comparison to apply between the time series (indicated by `filter`
5657          * and `aggregation`) and the threshold (indicated by `threshold_value`).
5658          * The comparison is applied on each time series, with the time series
5659          * on the left-hand side and the threshold on the right-hand side.
5660          * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
5661          * </pre>
5662          *
5663          * <code>.google.monitoring.v3.ComparisonType comparison = 4;</code>
5664          *
5665          * @return The enum numeric value on the wire for comparison.
5666          */
5667         @java.lang.Override
getComparisonValue()5668         public int getComparisonValue() {
5669           return comparison_;
5670         }
5671         /**
5672          *
5673          *
5674          * <pre>
5675          * The comparison to apply between the time series (indicated by `filter`
5676          * and `aggregation`) and the threshold (indicated by `threshold_value`).
5677          * The comparison is applied on each time series, with the time series
5678          * on the left-hand side and the threshold on the right-hand side.
5679          * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
5680          * </pre>
5681          *
5682          * <code>.google.monitoring.v3.ComparisonType comparison = 4;</code>
5683          *
5684          * @param value The enum numeric value on the wire for comparison to set.
5685          * @return This builder for chaining.
5686          */
setComparisonValue(int value)5687         public Builder setComparisonValue(int value) {
5688           comparison_ = value;
5689           bitField0_ |= 0x00000010;
5690           onChanged();
5691           return this;
5692         }
5693         /**
5694          *
5695          *
5696          * <pre>
5697          * The comparison to apply between the time series (indicated by `filter`
5698          * and `aggregation`) and the threshold (indicated by `threshold_value`).
5699          * The comparison is applied on each time series, with the time series
5700          * on the left-hand side and the threshold on the right-hand side.
5701          * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
5702          * </pre>
5703          *
5704          * <code>.google.monitoring.v3.ComparisonType comparison = 4;</code>
5705          *
5706          * @return The comparison.
5707          */
5708         @java.lang.Override
getComparison()5709         public com.google.monitoring.v3.ComparisonType getComparison() {
5710           com.google.monitoring.v3.ComparisonType result =
5711               com.google.monitoring.v3.ComparisonType.forNumber(comparison_);
5712           return result == null ? com.google.monitoring.v3.ComparisonType.UNRECOGNIZED : result;
5713         }
5714         /**
5715          *
5716          *
5717          * <pre>
5718          * The comparison to apply between the time series (indicated by `filter`
5719          * and `aggregation`) and the threshold (indicated by `threshold_value`).
5720          * The comparison is applied on each time series, with the time series
5721          * on the left-hand side and the threshold on the right-hand side.
5722          * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
5723          * </pre>
5724          *
5725          * <code>.google.monitoring.v3.ComparisonType comparison = 4;</code>
5726          *
5727          * @param value The comparison to set.
5728          * @return This builder for chaining.
5729          */
setComparison(com.google.monitoring.v3.ComparisonType value)5730         public Builder setComparison(com.google.monitoring.v3.ComparisonType value) {
5731           if (value == null) {
5732             throw new NullPointerException();
5733           }
5734           bitField0_ |= 0x00000010;
5735           comparison_ = value.getNumber();
5736           onChanged();
5737           return this;
5738         }
5739         /**
5740          *
5741          *
5742          * <pre>
5743          * The comparison to apply between the time series (indicated by `filter`
5744          * and `aggregation`) and the threshold (indicated by `threshold_value`).
5745          * The comparison is applied on each time series, with the time series
5746          * on the left-hand side and the threshold on the right-hand side.
5747          * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
5748          * </pre>
5749          *
5750          * <code>.google.monitoring.v3.ComparisonType comparison = 4;</code>
5751          *
5752          * @return This builder for chaining.
5753          */
clearComparison()5754         public Builder clearComparison() {
5755           bitField0_ = (bitField0_ & ~0x00000010);
5756           comparison_ = 0;
5757           onChanged();
5758           return this;
5759         }
5760 
5761         private double thresholdValue_;
5762         /**
5763          *
5764          *
5765          * <pre>
5766          * A value against which to compare the time series.
5767          * </pre>
5768          *
5769          * <code>double threshold_value = 5;</code>
5770          *
5771          * @return The thresholdValue.
5772          */
5773         @java.lang.Override
getThresholdValue()5774         public double getThresholdValue() {
5775           return thresholdValue_;
5776         }
5777         /**
5778          *
5779          *
5780          * <pre>
5781          * A value against which to compare the time series.
5782          * </pre>
5783          *
5784          * <code>double threshold_value = 5;</code>
5785          *
5786          * @param value The thresholdValue to set.
5787          * @return This builder for chaining.
5788          */
setThresholdValue(double value)5789         public Builder setThresholdValue(double value) {
5790 
5791           thresholdValue_ = value;
5792           bitField0_ |= 0x00000020;
5793           onChanged();
5794           return this;
5795         }
5796         /**
5797          *
5798          *
5799          * <pre>
5800          * A value against which to compare the time series.
5801          * </pre>
5802          *
5803          * <code>double threshold_value = 5;</code>
5804          *
5805          * @return This builder for chaining.
5806          */
clearThresholdValue()5807         public Builder clearThresholdValue() {
5808           bitField0_ = (bitField0_ & ~0x00000020);
5809           thresholdValue_ = 0D;
5810           onChanged();
5811           return this;
5812         }
5813 
5814         private com.google.protobuf.Duration duration_;
5815         private com.google.protobuf.SingleFieldBuilderV3<
5816                 com.google.protobuf.Duration,
5817                 com.google.protobuf.Duration.Builder,
5818                 com.google.protobuf.DurationOrBuilder>
5819             durationBuilder_;
5820         /**
5821          *
5822          *
5823          * <pre>
5824          * The amount of time that a time series must violate the
5825          * threshold to be considered failing. Currently, only values
5826          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
5827          * seconds--are supported. If an invalid value is given, an
5828          * error will be returned. When choosing a duration, it is useful to
5829          * keep in mind the frequency of the underlying time series data
5830          * (which may also be affected by any alignments specified in the
5831          * `aggregations` field); a good duration is long enough so that a single
5832          * outlier does not generate spurious alerts, but short enough that
5833          * unhealthy states are detected and alerted on quickly.
5834          * </pre>
5835          *
5836          * <code>.google.protobuf.Duration duration = 6;</code>
5837          *
5838          * @return Whether the duration field is set.
5839          */
hasDuration()5840         public boolean hasDuration() {
5841           return ((bitField0_ & 0x00000040) != 0);
5842         }
5843         /**
5844          *
5845          *
5846          * <pre>
5847          * The amount of time that a time series must violate the
5848          * threshold to be considered failing. Currently, only values
5849          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
5850          * seconds--are supported. If an invalid value is given, an
5851          * error will be returned. When choosing a duration, it is useful to
5852          * keep in mind the frequency of the underlying time series data
5853          * (which may also be affected by any alignments specified in the
5854          * `aggregations` field); a good duration is long enough so that a single
5855          * outlier does not generate spurious alerts, but short enough that
5856          * unhealthy states are detected and alerted on quickly.
5857          * </pre>
5858          *
5859          * <code>.google.protobuf.Duration duration = 6;</code>
5860          *
5861          * @return The duration.
5862          */
getDuration()5863         public com.google.protobuf.Duration getDuration() {
5864           if (durationBuilder_ == null) {
5865             return duration_ == null
5866                 ? com.google.protobuf.Duration.getDefaultInstance()
5867                 : duration_;
5868           } else {
5869             return durationBuilder_.getMessage();
5870           }
5871         }
5872         /**
5873          *
5874          *
5875          * <pre>
5876          * The amount of time that a time series must violate the
5877          * threshold to be considered failing. Currently, only values
5878          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
5879          * seconds--are supported. If an invalid value is given, an
5880          * error will be returned. When choosing a duration, it is useful to
5881          * keep in mind the frequency of the underlying time series data
5882          * (which may also be affected by any alignments specified in the
5883          * `aggregations` field); a good duration is long enough so that a single
5884          * outlier does not generate spurious alerts, but short enough that
5885          * unhealthy states are detected and alerted on quickly.
5886          * </pre>
5887          *
5888          * <code>.google.protobuf.Duration duration = 6;</code>
5889          */
setDuration(com.google.protobuf.Duration value)5890         public Builder setDuration(com.google.protobuf.Duration value) {
5891           if (durationBuilder_ == null) {
5892             if (value == null) {
5893               throw new NullPointerException();
5894             }
5895             duration_ = value;
5896           } else {
5897             durationBuilder_.setMessage(value);
5898           }
5899           bitField0_ |= 0x00000040;
5900           onChanged();
5901           return this;
5902         }
5903         /**
5904          *
5905          *
5906          * <pre>
5907          * The amount of time that a time series must violate the
5908          * threshold to be considered failing. Currently, only values
5909          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
5910          * seconds--are supported. If an invalid value is given, an
5911          * error will be returned. When choosing a duration, it is useful to
5912          * keep in mind the frequency of the underlying time series data
5913          * (which may also be affected by any alignments specified in the
5914          * `aggregations` field); a good duration is long enough so that a single
5915          * outlier does not generate spurious alerts, but short enough that
5916          * unhealthy states are detected and alerted on quickly.
5917          * </pre>
5918          *
5919          * <code>.google.protobuf.Duration duration = 6;</code>
5920          */
setDuration(com.google.protobuf.Duration.Builder builderForValue)5921         public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) {
5922           if (durationBuilder_ == null) {
5923             duration_ = builderForValue.build();
5924           } else {
5925             durationBuilder_.setMessage(builderForValue.build());
5926           }
5927           bitField0_ |= 0x00000040;
5928           onChanged();
5929           return this;
5930         }
5931         /**
5932          *
5933          *
5934          * <pre>
5935          * The amount of time that a time series must violate the
5936          * threshold to be considered failing. Currently, only values
5937          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
5938          * seconds--are supported. If an invalid value is given, an
5939          * error will be returned. When choosing a duration, it is useful to
5940          * keep in mind the frequency of the underlying time series data
5941          * (which may also be affected by any alignments specified in the
5942          * `aggregations` field); a good duration is long enough so that a single
5943          * outlier does not generate spurious alerts, but short enough that
5944          * unhealthy states are detected and alerted on quickly.
5945          * </pre>
5946          *
5947          * <code>.google.protobuf.Duration duration = 6;</code>
5948          */
mergeDuration(com.google.protobuf.Duration value)5949         public Builder mergeDuration(com.google.protobuf.Duration value) {
5950           if (durationBuilder_ == null) {
5951             if (((bitField0_ & 0x00000040) != 0)
5952                 && duration_ != null
5953                 && duration_ != com.google.protobuf.Duration.getDefaultInstance()) {
5954               getDurationBuilder().mergeFrom(value);
5955             } else {
5956               duration_ = value;
5957             }
5958           } else {
5959             durationBuilder_.mergeFrom(value);
5960           }
5961           bitField0_ |= 0x00000040;
5962           onChanged();
5963           return this;
5964         }
5965         /**
5966          *
5967          *
5968          * <pre>
5969          * The amount of time that a time series must violate the
5970          * threshold to be considered failing. Currently, only values
5971          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
5972          * seconds--are supported. If an invalid value is given, an
5973          * error will be returned. When choosing a duration, it is useful to
5974          * keep in mind the frequency of the underlying time series data
5975          * (which may also be affected by any alignments specified in the
5976          * `aggregations` field); a good duration is long enough so that a single
5977          * outlier does not generate spurious alerts, but short enough that
5978          * unhealthy states are detected and alerted on quickly.
5979          * </pre>
5980          *
5981          * <code>.google.protobuf.Duration duration = 6;</code>
5982          */
clearDuration()5983         public Builder clearDuration() {
5984           bitField0_ = (bitField0_ & ~0x00000040);
5985           duration_ = null;
5986           if (durationBuilder_ != null) {
5987             durationBuilder_.dispose();
5988             durationBuilder_ = null;
5989           }
5990           onChanged();
5991           return this;
5992         }
5993         /**
5994          *
5995          *
5996          * <pre>
5997          * The amount of time that a time series must violate the
5998          * threshold to be considered failing. Currently, only values
5999          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
6000          * seconds--are supported. If an invalid value is given, an
6001          * error will be returned. When choosing a duration, it is useful to
6002          * keep in mind the frequency of the underlying time series data
6003          * (which may also be affected by any alignments specified in the
6004          * `aggregations` field); a good duration is long enough so that a single
6005          * outlier does not generate spurious alerts, but short enough that
6006          * unhealthy states are detected and alerted on quickly.
6007          * </pre>
6008          *
6009          * <code>.google.protobuf.Duration duration = 6;</code>
6010          */
getDurationBuilder()6011         public com.google.protobuf.Duration.Builder getDurationBuilder() {
6012           bitField0_ |= 0x00000040;
6013           onChanged();
6014           return getDurationFieldBuilder().getBuilder();
6015         }
6016         /**
6017          *
6018          *
6019          * <pre>
6020          * The amount of time that a time series must violate the
6021          * threshold to be considered failing. Currently, only values
6022          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
6023          * seconds--are supported. If an invalid value is given, an
6024          * error will be returned. When choosing a duration, it is useful to
6025          * keep in mind the frequency of the underlying time series data
6026          * (which may also be affected by any alignments specified in the
6027          * `aggregations` field); a good duration is long enough so that a single
6028          * outlier does not generate spurious alerts, but short enough that
6029          * unhealthy states are detected and alerted on quickly.
6030          * </pre>
6031          *
6032          * <code>.google.protobuf.Duration duration = 6;</code>
6033          */
getDurationOrBuilder()6034         public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
6035           if (durationBuilder_ != null) {
6036             return durationBuilder_.getMessageOrBuilder();
6037           } else {
6038             return duration_ == null
6039                 ? com.google.protobuf.Duration.getDefaultInstance()
6040                 : duration_;
6041           }
6042         }
6043         /**
6044          *
6045          *
6046          * <pre>
6047          * The amount of time that a time series must violate the
6048          * threshold to be considered failing. Currently, only values
6049          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
6050          * seconds--are supported. If an invalid value is given, an
6051          * error will be returned. When choosing a duration, it is useful to
6052          * keep in mind the frequency of the underlying time series data
6053          * (which may also be affected by any alignments specified in the
6054          * `aggregations` field); a good duration is long enough so that a single
6055          * outlier does not generate spurious alerts, but short enough that
6056          * unhealthy states are detected and alerted on quickly.
6057          * </pre>
6058          *
6059          * <code>.google.protobuf.Duration duration = 6;</code>
6060          */
6061         private com.google.protobuf.SingleFieldBuilderV3<
6062                 com.google.protobuf.Duration,
6063                 com.google.protobuf.Duration.Builder,
6064                 com.google.protobuf.DurationOrBuilder>
getDurationFieldBuilder()6065             getDurationFieldBuilder() {
6066           if (durationBuilder_ == null) {
6067             durationBuilder_ =
6068                 new com.google.protobuf.SingleFieldBuilderV3<
6069                     com.google.protobuf.Duration,
6070                     com.google.protobuf.Duration.Builder,
6071                     com.google.protobuf.DurationOrBuilder>(
6072                     getDuration(), getParentForChildren(), isClean());
6073             duration_ = null;
6074           }
6075           return durationBuilder_;
6076         }
6077 
6078         private com.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger_;
6079         private com.google.protobuf.SingleFieldBuilderV3<
6080                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger,
6081                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder,
6082                 com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder>
6083             triggerBuilder_;
6084         /**
6085          *
6086          *
6087          * <pre>
6088          * The number/percent of time series for which the comparison must hold
6089          * in order for the condition to trigger. If unspecified, then the
6090          * condition will trigger if the comparison is true for any of the
6091          * time series that have been identified by `filter` and `aggregations`,
6092          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
6093          * are specified.
6094          * </pre>
6095          *
6096          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
6097          *
6098          * @return Whether the trigger field is set.
6099          */
hasTrigger()6100         public boolean hasTrigger() {
6101           return ((bitField0_ & 0x00000080) != 0);
6102         }
6103         /**
6104          *
6105          *
6106          * <pre>
6107          * The number/percent of time series for which the comparison must hold
6108          * in order for the condition to trigger. If unspecified, then the
6109          * condition will trigger if the comparison is true for any of the
6110          * time series that have been identified by `filter` and `aggregations`,
6111          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
6112          * are specified.
6113          * </pre>
6114          *
6115          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
6116          *
6117          * @return The trigger.
6118          */
getTrigger()6119         public com.google.monitoring.v3.AlertPolicy.Condition.Trigger getTrigger() {
6120           if (triggerBuilder_ == null) {
6121             return trigger_ == null
6122                 ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
6123                 : trigger_;
6124           } else {
6125             return triggerBuilder_.getMessage();
6126           }
6127         }
6128         /**
6129          *
6130          *
6131          * <pre>
6132          * The number/percent of time series for which the comparison must hold
6133          * in order for the condition to trigger. If unspecified, then the
6134          * condition will trigger if the comparison is true for any of the
6135          * time series that have been identified by `filter` and `aggregations`,
6136          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
6137          * are specified.
6138          * </pre>
6139          *
6140          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
6141          */
setTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value)6142         public Builder setTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value) {
6143           if (triggerBuilder_ == null) {
6144             if (value == null) {
6145               throw new NullPointerException();
6146             }
6147             trigger_ = value;
6148           } else {
6149             triggerBuilder_.setMessage(value);
6150           }
6151           bitField0_ |= 0x00000080;
6152           onChanged();
6153           return this;
6154         }
6155         /**
6156          *
6157          *
6158          * <pre>
6159          * The number/percent of time series for which the comparison must hold
6160          * in order for the condition to trigger. If unspecified, then the
6161          * condition will trigger if the comparison is true for any of the
6162          * time series that have been identified by `filter` and `aggregations`,
6163          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
6164          * are specified.
6165          * </pre>
6166          *
6167          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
6168          */
setTrigger( com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder builderForValue)6169         public Builder setTrigger(
6170             com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder builderForValue) {
6171           if (triggerBuilder_ == null) {
6172             trigger_ = builderForValue.build();
6173           } else {
6174             triggerBuilder_.setMessage(builderForValue.build());
6175           }
6176           bitField0_ |= 0x00000080;
6177           onChanged();
6178           return this;
6179         }
6180         /**
6181          *
6182          *
6183          * <pre>
6184          * The number/percent of time series for which the comparison must hold
6185          * in order for the condition to trigger. If unspecified, then the
6186          * condition will trigger if the comparison is true for any of the
6187          * time series that have been identified by `filter` and `aggregations`,
6188          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
6189          * are specified.
6190          * </pre>
6191          *
6192          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
6193          */
mergeTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value)6194         public Builder mergeTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value) {
6195           if (triggerBuilder_ == null) {
6196             if (((bitField0_ & 0x00000080) != 0)
6197                 && trigger_ != null
6198                 && trigger_
6199                     != com.google.monitoring.v3.AlertPolicy.Condition.Trigger
6200                         .getDefaultInstance()) {
6201               getTriggerBuilder().mergeFrom(value);
6202             } else {
6203               trigger_ = value;
6204             }
6205           } else {
6206             triggerBuilder_.mergeFrom(value);
6207           }
6208           bitField0_ |= 0x00000080;
6209           onChanged();
6210           return this;
6211         }
6212         /**
6213          *
6214          *
6215          * <pre>
6216          * The number/percent of time series for which the comparison must hold
6217          * in order for the condition to trigger. If unspecified, then the
6218          * condition will trigger if the comparison is true for any of the
6219          * time series that have been identified by `filter` and `aggregations`,
6220          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
6221          * are specified.
6222          * </pre>
6223          *
6224          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
6225          */
clearTrigger()6226         public Builder clearTrigger() {
6227           bitField0_ = (bitField0_ & ~0x00000080);
6228           trigger_ = null;
6229           if (triggerBuilder_ != null) {
6230             triggerBuilder_.dispose();
6231             triggerBuilder_ = null;
6232           }
6233           onChanged();
6234           return this;
6235         }
6236         /**
6237          *
6238          *
6239          * <pre>
6240          * The number/percent of time series for which the comparison must hold
6241          * in order for the condition to trigger. If unspecified, then the
6242          * condition will trigger if the comparison is true for any of the
6243          * time series that have been identified by `filter` and `aggregations`,
6244          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
6245          * are specified.
6246          * </pre>
6247          *
6248          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
6249          */
getTriggerBuilder()6250         public com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder getTriggerBuilder() {
6251           bitField0_ |= 0x00000080;
6252           onChanged();
6253           return getTriggerFieldBuilder().getBuilder();
6254         }
6255         /**
6256          *
6257          *
6258          * <pre>
6259          * The number/percent of time series for which the comparison must hold
6260          * in order for the condition to trigger. If unspecified, then the
6261          * condition will trigger if the comparison is true for any of the
6262          * time series that have been identified by `filter` and `aggregations`,
6263          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
6264          * are specified.
6265          * </pre>
6266          *
6267          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
6268          */
6269         public com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder
getTriggerOrBuilder()6270             getTriggerOrBuilder() {
6271           if (triggerBuilder_ != null) {
6272             return triggerBuilder_.getMessageOrBuilder();
6273           } else {
6274             return trigger_ == null
6275                 ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
6276                 : trigger_;
6277           }
6278         }
6279         /**
6280          *
6281          *
6282          * <pre>
6283          * The number/percent of time series for which the comparison must hold
6284          * in order for the condition to trigger. If unspecified, then the
6285          * condition will trigger if the comparison is true for any of the
6286          * time series that have been identified by `filter` and `aggregations`,
6287          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
6288          * are specified.
6289          * </pre>
6290          *
6291          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7;</code>
6292          */
6293         private com.google.protobuf.SingleFieldBuilderV3<
6294                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger,
6295                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder,
6296                 com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder>
getTriggerFieldBuilder()6297             getTriggerFieldBuilder() {
6298           if (triggerBuilder_ == null) {
6299             triggerBuilder_ =
6300                 new com.google.protobuf.SingleFieldBuilderV3<
6301                     com.google.monitoring.v3.AlertPolicy.Condition.Trigger,
6302                     com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder,
6303                     com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder>(
6304                     getTrigger(), getParentForChildren(), isClean());
6305             trigger_ = null;
6306           }
6307           return triggerBuilder_;
6308         }
6309 
6310         private int evaluationMissingData_ = 0;
6311         /**
6312          *
6313          *
6314          * <pre>
6315          * A condition control that determines how metric-threshold conditions
6316          * are evaluated when data stops arriving.
6317          * </pre>
6318          *
6319          * <code>
6320          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11;
6321          * </code>
6322          *
6323          * @return The enum numeric value on the wire for evaluationMissingData.
6324          */
6325         @java.lang.Override
getEvaluationMissingDataValue()6326         public int getEvaluationMissingDataValue() {
6327           return evaluationMissingData_;
6328         }
6329         /**
6330          *
6331          *
6332          * <pre>
6333          * A condition control that determines how metric-threshold conditions
6334          * are evaluated when data stops arriving.
6335          * </pre>
6336          *
6337          * <code>
6338          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11;
6339          * </code>
6340          *
6341          * @param value The enum numeric value on the wire for evaluationMissingData to set.
6342          * @return This builder for chaining.
6343          */
setEvaluationMissingDataValue(int value)6344         public Builder setEvaluationMissingDataValue(int value) {
6345           evaluationMissingData_ = value;
6346           bitField0_ |= 0x00000100;
6347           onChanged();
6348           return this;
6349         }
6350         /**
6351          *
6352          *
6353          * <pre>
6354          * A condition control that determines how metric-threshold conditions
6355          * are evaluated when data stops arriving.
6356          * </pre>
6357          *
6358          * <code>
6359          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11;
6360          * </code>
6361          *
6362          * @return The evaluationMissingData.
6363          */
6364         @java.lang.Override
6365         public com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
getEvaluationMissingData()6366             getEvaluationMissingData() {
6367           com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData result =
6368               com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData.forNumber(
6369                   evaluationMissingData_);
6370           return result == null
6371               ? com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData.UNRECOGNIZED
6372               : result;
6373         }
6374         /**
6375          *
6376          *
6377          * <pre>
6378          * A condition control that determines how metric-threshold conditions
6379          * are evaluated when data stops arriving.
6380          * </pre>
6381          *
6382          * <code>
6383          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11;
6384          * </code>
6385          *
6386          * @param value The evaluationMissingData to set.
6387          * @return This builder for chaining.
6388          */
setEvaluationMissingData( com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData value)6389         public Builder setEvaluationMissingData(
6390             com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData value) {
6391           if (value == null) {
6392             throw new NullPointerException();
6393           }
6394           bitField0_ |= 0x00000100;
6395           evaluationMissingData_ = value.getNumber();
6396           onChanged();
6397           return this;
6398         }
6399         /**
6400          *
6401          *
6402          * <pre>
6403          * A condition control that determines how metric-threshold conditions
6404          * are evaluated when data stops arriving.
6405          * </pre>
6406          *
6407          * <code>
6408          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11;
6409          * </code>
6410          *
6411          * @return This builder for chaining.
6412          */
clearEvaluationMissingData()6413         public Builder clearEvaluationMissingData() {
6414           bitField0_ = (bitField0_ & ~0x00000100);
6415           evaluationMissingData_ = 0;
6416           onChanged();
6417           return this;
6418         }
6419 
6420         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)6421         public final Builder setUnknownFields(
6422             final com.google.protobuf.UnknownFieldSet unknownFields) {
6423           return super.setUnknownFields(unknownFields);
6424         }
6425 
6426         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)6427         public final Builder mergeUnknownFields(
6428             final com.google.protobuf.UnknownFieldSet unknownFields) {
6429           return super.mergeUnknownFields(unknownFields);
6430         }
6431 
6432         // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy.Condition.MetricThreshold)
6433       }
6434 
6435       // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Condition.MetricThreshold)
6436       private static final com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
6437           DEFAULT_INSTANCE;
6438 
6439       static {
6440         DEFAULT_INSTANCE = new com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold();
6441       }
6442 
6443       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
getDefaultInstance()6444           getDefaultInstance() {
6445         return DEFAULT_INSTANCE;
6446       }
6447 
6448       private static final com.google.protobuf.Parser<MetricThreshold> PARSER =
6449           new com.google.protobuf.AbstractParser<MetricThreshold>() {
6450             @java.lang.Override
6451             public MetricThreshold parsePartialFrom(
6452                 com.google.protobuf.CodedInputStream input,
6453                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6454                 throws com.google.protobuf.InvalidProtocolBufferException {
6455               Builder builder = newBuilder();
6456               try {
6457                 builder.mergeFrom(input, extensionRegistry);
6458               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6459                 throw e.setUnfinishedMessage(builder.buildPartial());
6460               } catch (com.google.protobuf.UninitializedMessageException e) {
6461                 throw e.asInvalidProtocolBufferException()
6462                     .setUnfinishedMessage(builder.buildPartial());
6463               } catch (java.io.IOException e) {
6464                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
6465                     .setUnfinishedMessage(builder.buildPartial());
6466               }
6467               return builder.buildPartial();
6468             }
6469           };
6470 
parser()6471       public static com.google.protobuf.Parser<MetricThreshold> parser() {
6472         return PARSER;
6473       }
6474 
6475       @java.lang.Override
getParserForType()6476       public com.google.protobuf.Parser<MetricThreshold> getParserForType() {
6477         return PARSER;
6478       }
6479 
6480       @java.lang.Override
6481       public com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
getDefaultInstanceForType()6482           getDefaultInstanceForType() {
6483         return DEFAULT_INSTANCE;
6484       }
6485     }
6486 
6487     public interface MetricAbsenceOrBuilder
6488         extends
6489         // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy.Condition.MetricAbsence)
6490         com.google.protobuf.MessageOrBuilder {
6491 
6492       /**
6493        *
6494        *
6495        * <pre>
6496        * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
6497        * identifies which time series should be compared with the threshold.
6498        * The filter is similar to the one that is specified in the
6499        * [`ListTimeSeries`
6500        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
6501        * (that call is useful to verify the time series that will be retrieved /
6502        * processed). The filter must specify the metric type and the resource
6503        * type. Optionally, it can specify resource labels and metric labels.
6504        * This field must not exceed 2048 Unicode characters in length.
6505        * </pre>
6506        *
6507        * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
6508        *
6509        * @return The filter.
6510        */
getFilter()6511       java.lang.String getFilter();
6512       /**
6513        *
6514        *
6515        * <pre>
6516        * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
6517        * identifies which time series should be compared with the threshold.
6518        * The filter is similar to the one that is specified in the
6519        * [`ListTimeSeries`
6520        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
6521        * (that call is useful to verify the time series that will be retrieved /
6522        * processed). The filter must specify the metric type and the resource
6523        * type. Optionally, it can specify resource labels and metric labels.
6524        * This field must not exceed 2048 Unicode characters in length.
6525        * </pre>
6526        *
6527        * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
6528        *
6529        * @return The bytes for filter.
6530        */
getFilterBytes()6531       com.google.protobuf.ByteString getFilterBytes();
6532 
6533       /**
6534        *
6535        *
6536        * <pre>
6537        * Specifies the alignment of data points in individual time series as
6538        * well as how to combine the retrieved time series together (such as
6539        * when aggregating multiple streams on each resource to a single
6540        * stream for each resource or when aggregating streams across all
6541        * members of a group of resources). Multiple aggregations
6542        * are applied in the order specified.
6543        * This field is similar to the one in the [`ListTimeSeries`
6544        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6545        * It is advisable to use the `ListTimeSeries` method when debugging this
6546        * field.
6547        * </pre>
6548        *
6549        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6550        */
getAggregationsList()6551       java.util.List<com.google.monitoring.v3.Aggregation> getAggregationsList();
6552       /**
6553        *
6554        *
6555        * <pre>
6556        * Specifies the alignment of data points in individual time series as
6557        * well as how to combine the retrieved time series together (such as
6558        * when aggregating multiple streams on each resource to a single
6559        * stream for each resource or when aggregating streams across all
6560        * members of a group of resources). Multiple aggregations
6561        * are applied in the order specified.
6562        * This field is similar to the one in the [`ListTimeSeries`
6563        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6564        * It is advisable to use the `ListTimeSeries` method when debugging this
6565        * field.
6566        * </pre>
6567        *
6568        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6569        */
getAggregations(int index)6570       com.google.monitoring.v3.Aggregation getAggregations(int index);
6571       /**
6572        *
6573        *
6574        * <pre>
6575        * Specifies the alignment of data points in individual time series as
6576        * well as how to combine the retrieved time series together (such as
6577        * when aggregating multiple streams on each resource to a single
6578        * stream for each resource or when aggregating streams across all
6579        * members of a group of resources). Multiple aggregations
6580        * are applied in the order specified.
6581        * This field is similar to the one in the [`ListTimeSeries`
6582        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6583        * It is advisable to use the `ListTimeSeries` method when debugging this
6584        * field.
6585        * </pre>
6586        *
6587        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6588        */
getAggregationsCount()6589       int getAggregationsCount();
6590       /**
6591        *
6592        *
6593        * <pre>
6594        * Specifies the alignment of data points in individual time series as
6595        * well as how to combine the retrieved time series together (such as
6596        * when aggregating multiple streams on each resource to a single
6597        * stream for each resource or when aggregating streams across all
6598        * members of a group of resources). Multiple aggregations
6599        * are applied in the order specified.
6600        * This field is similar to the one in the [`ListTimeSeries`
6601        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6602        * It is advisable to use the `ListTimeSeries` method when debugging this
6603        * field.
6604        * </pre>
6605        *
6606        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6607        */
6608       java.util.List<? extends com.google.monitoring.v3.AggregationOrBuilder>
getAggregationsOrBuilderList()6609           getAggregationsOrBuilderList();
6610       /**
6611        *
6612        *
6613        * <pre>
6614        * Specifies the alignment of data points in individual time series as
6615        * well as how to combine the retrieved time series together (such as
6616        * when aggregating multiple streams on each resource to a single
6617        * stream for each resource or when aggregating streams across all
6618        * members of a group of resources). Multiple aggregations
6619        * are applied in the order specified.
6620        * This field is similar to the one in the [`ListTimeSeries`
6621        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6622        * It is advisable to use the `ListTimeSeries` method when debugging this
6623        * field.
6624        * </pre>
6625        *
6626        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6627        */
getAggregationsOrBuilder(int index)6628       com.google.monitoring.v3.AggregationOrBuilder getAggregationsOrBuilder(int index);
6629 
6630       /**
6631        *
6632        *
6633        * <pre>
6634        * The amount of time that a time series must fail to report new
6635        * data to be considered failing. The minimum value of this field
6636        * is 120 seconds. Larger values that are a multiple of a
6637        * minute--for example, 240 or 300 seconds--are supported.
6638        * If an invalid value is given, an
6639        * error will be returned. The `Duration.nanos` field is
6640        * ignored.
6641        * </pre>
6642        *
6643        * <code>.google.protobuf.Duration duration = 2;</code>
6644        *
6645        * @return Whether the duration field is set.
6646        */
hasDuration()6647       boolean hasDuration();
6648       /**
6649        *
6650        *
6651        * <pre>
6652        * The amount of time that a time series must fail to report new
6653        * data to be considered failing. The minimum value of this field
6654        * is 120 seconds. Larger values that are a multiple of a
6655        * minute--for example, 240 or 300 seconds--are supported.
6656        * If an invalid value is given, an
6657        * error will be returned. The `Duration.nanos` field is
6658        * ignored.
6659        * </pre>
6660        *
6661        * <code>.google.protobuf.Duration duration = 2;</code>
6662        *
6663        * @return The duration.
6664        */
getDuration()6665       com.google.protobuf.Duration getDuration();
6666       /**
6667        *
6668        *
6669        * <pre>
6670        * The amount of time that a time series must fail to report new
6671        * data to be considered failing. The minimum value of this field
6672        * is 120 seconds. Larger values that are a multiple of a
6673        * minute--for example, 240 or 300 seconds--are supported.
6674        * If an invalid value is given, an
6675        * error will be returned. The `Duration.nanos` field is
6676        * ignored.
6677        * </pre>
6678        *
6679        * <code>.google.protobuf.Duration duration = 2;</code>
6680        */
getDurationOrBuilder()6681       com.google.protobuf.DurationOrBuilder getDurationOrBuilder();
6682 
6683       /**
6684        *
6685        *
6686        * <pre>
6687        * The number/percent of time series for which the comparison must hold
6688        * in order for the condition to trigger. If unspecified, then the
6689        * condition will trigger if the comparison is true for any of the
6690        * time series that have been identified by `filter` and `aggregations`.
6691        * </pre>
6692        *
6693        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
6694        *
6695        * @return Whether the trigger field is set.
6696        */
hasTrigger()6697       boolean hasTrigger();
6698       /**
6699        *
6700        *
6701        * <pre>
6702        * The number/percent of time series for which the comparison must hold
6703        * in order for the condition to trigger. If unspecified, then the
6704        * condition will trigger if the comparison is true for any of the
6705        * time series that have been identified by `filter` and `aggregations`.
6706        * </pre>
6707        *
6708        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
6709        *
6710        * @return The trigger.
6711        */
getTrigger()6712       com.google.monitoring.v3.AlertPolicy.Condition.Trigger getTrigger();
6713       /**
6714        *
6715        *
6716        * <pre>
6717        * The number/percent of time series for which the comparison must hold
6718        * in order for the condition to trigger. If unspecified, then the
6719        * condition will trigger if the comparison is true for any of the
6720        * time series that have been identified by `filter` and `aggregations`.
6721        * </pre>
6722        *
6723        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
6724        */
getTriggerOrBuilder()6725       com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder getTriggerOrBuilder();
6726     }
6727     /**
6728      *
6729      *
6730      * <pre>
6731      * A condition type that checks that monitored resources
6732      * are reporting data. The configuration defines a metric and
6733      * a set of monitored resources. The predicate is considered in violation
6734      * when a time series for the specified metric of a monitored
6735      * resource does not include any data in the specified `duration`.
6736      * </pre>
6737      *
6738      * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition.MetricAbsence}
6739      */
6740     public static final class MetricAbsence extends com.google.protobuf.GeneratedMessageV3
6741         implements
6742         // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy.Condition.MetricAbsence)
6743         MetricAbsenceOrBuilder {
6744       private static final long serialVersionUID = 0L;
6745       // Use MetricAbsence.newBuilder() to construct.
MetricAbsence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)6746       private MetricAbsence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
6747         super(builder);
6748       }
6749 
MetricAbsence()6750       private MetricAbsence() {
6751         filter_ = "";
6752         aggregations_ = java.util.Collections.emptyList();
6753       }
6754 
6755       @java.lang.Override
6756       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)6757       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
6758         return new MetricAbsence();
6759       }
6760 
6761       @java.lang.Override
getUnknownFields()6762       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
6763         return this.unknownFields;
6764       }
6765 
getDescriptor()6766       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
6767         return com.google.monitoring.v3.AlertProto
6768             .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricAbsence_descriptor;
6769       }
6770 
6771       @java.lang.Override
6772       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()6773           internalGetFieldAccessorTable() {
6774         return com.google.monitoring.v3.AlertProto
6775             .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricAbsence_fieldAccessorTable
6776             .ensureFieldAccessorsInitialized(
6777                 com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.class,
6778                 com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.Builder.class);
6779       }
6780 
6781       public static final int FILTER_FIELD_NUMBER = 1;
6782 
6783       @SuppressWarnings("serial")
6784       private volatile java.lang.Object filter_ = "";
6785       /**
6786        *
6787        *
6788        * <pre>
6789        * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
6790        * identifies which time series should be compared with the threshold.
6791        * The filter is similar to the one that is specified in the
6792        * [`ListTimeSeries`
6793        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
6794        * (that call is useful to verify the time series that will be retrieved /
6795        * processed). The filter must specify the metric type and the resource
6796        * type. Optionally, it can specify resource labels and metric labels.
6797        * This field must not exceed 2048 Unicode characters in length.
6798        * </pre>
6799        *
6800        * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
6801        *
6802        * @return The filter.
6803        */
6804       @java.lang.Override
getFilter()6805       public java.lang.String getFilter() {
6806         java.lang.Object ref = filter_;
6807         if (ref instanceof java.lang.String) {
6808           return (java.lang.String) ref;
6809         } else {
6810           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
6811           java.lang.String s = bs.toStringUtf8();
6812           filter_ = s;
6813           return s;
6814         }
6815       }
6816       /**
6817        *
6818        *
6819        * <pre>
6820        * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
6821        * identifies which time series should be compared with the threshold.
6822        * The filter is similar to the one that is specified in the
6823        * [`ListTimeSeries`
6824        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
6825        * (that call is useful to verify the time series that will be retrieved /
6826        * processed). The filter must specify the metric type and the resource
6827        * type. Optionally, it can specify resource labels and metric labels.
6828        * This field must not exceed 2048 Unicode characters in length.
6829        * </pre>
6830        *
6831        * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
6832        *
6833        * @return The bytes for filter.
6834        */
6835       @java.lang.Override
getFilterBytes()6836       public com.google.protobuf.ByteString getFilterBytes() {
6837         java.lang.Object ref = filter_;
6838         if (ref instanceof java.lang.String) {
6839           com.google.protobuf.ByteString b =
6840               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
6841           filter_ = b;
6842           return b;
6843         } else {
6844           return (com.google.protobuf.ByteString) ref;
6845         }
6846       }
6847 
6848       public static final int AGGREGATIONS_FIELD_NUMBER = 5;
6849 
6850       @SuppressWarnings("serial")
6851       private java.util.List<com.google.monitoring.v3.Aggregation> aggregations_;
6852       /**
6853        *
6854        *
6855        * <pre>
6856        * Specifies the alignment of data points in individual time series as
6857        * well as how to combine the retrieved time series together (such as
6858        * when aggregating multiple streams on each resource to a single
6859        * stream for each resource or when aggregating streams across all
6860        * members of a group of resources). Multiple aggregations
6861        * are applied in the order specified.
6862        * This field is similar to the one in the [`ListTimeSeries`
6863        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6864        * It is advisable to use the `ListTimeSeries` method when debugging this
6865        * field.
6866        * </pre>
6867        *
6868        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6869        */
6870       @java.lang.Override
getAggregationsList()6871       public java.util.List<com.google.monitoring.v3.Aggregation> getAggregationsList() {
6872         return aggregations_;
6873       }
6874       /**
6875        *
6876        *
6877        * <pre>
6878        * Specifies the alignment of data points in individual time series as
6879        * well as how to combine the retrieved time series together (such as
6880        * when aggregating multiple streams on each resource to a single
6881        * stream for each resource or when aggregating streams across all
6882        * members of a group of resources). Multiple aggregations
6883        * are applied in the order specified.
6884        * This field is similar to the one in the [`ListTimeSeries`
6885        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6886        * It is advisable to use the `ListTimeSeries` method when debugging this
6887        * field.
6888        * </pre>
6889        *
6890        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6891        */
6892       @java.lang.Override
6893       public java.util.List<? extends com.google.monitoring.v3.AggregationOrBuilder>
getAggregationsOrBuilderList()6894           getAggregationsOrBuilderList() {
6895         return aggregations_;
6896       }
6897       /**
6898        *
6899        *
6900        * <pre>
6901        * Specifies the alignment of data points in individual time series as
6902        * well as how to combine the retrieved time series together (such as
6903        * when aggregating multiple streams on each resource to a single
6904        * stream for each resource or when aggregating streams across all
6905        * members of a group of resources). Multiple aggregations
6906        * are applied in the order specified.
6907        * This field is similar to the one in the [`ListTimeSeries`
6908        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6909        * It is advisable to use the `ListTimeSeries` method when debugging this
6910        * field.
6911        * </pre>
6912        *
6913        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6914        */
6915       @java.lang.Override
getAggregationsCount()6916       public int getAggregationsCount() {
6917         return aggregations_.size();
6918       }
6919       /**
6920        *
6921        *
6922        * <pre>
6923        * Specifies the alignment of data points in individual time series as
6924        * well as how to combine the retrieved time series together (such as
6925        * when aggregating multiple streams on each resource to a single
6926        * stream for each resource or when aggregating streams across all
6927        * members of a group of resources). Multiple aggregations
6928        * are applied in the order specified.
6929        * This field is similar to the one in the [`ListTimeSeries`
6930        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6931        * It is advisable to use the `ListTimeSeries` method when debugging this
6932        * field.
6933        * </pre>
6934        *
6935        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6936        */
6937       @java.lang.Override
getAggregations(int index)6938       public com.google.monitoring.v3.Aggregation getAggregations(int index) {
6939         return aggregations_.get(index);
6940       }
6941       /**
6942        *
6943        *
6944        * <pre>
6945        * Specifies the alignment of data points in individual time series as
6946        * well as how to combine the retrieved time series together (such as
6947        * when aggregating multiple streams on each resource to a single
6948        * stream for each resource or when aggregating streams across all
6949        * members of a group of resources). Multiple aggregations
6950        * are applied in the order specified.
6951        * This field is similar to the one in the [`ListTimeSeries`
6952        * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
6953        * It is advisable to use the `ListTimeSeries` method when debugging this
6954        * field.
6955        * </pre>
6956        *
6957        * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
6958        */
6959       @java.lang.Override
getAggregationsOrBuilder(int index)6960       public com.google.monitoring.v3.AggregationOrBuilder getAggregationsOrBuilder(int index) {
6961         return aggregations_.get(index);
6962       }
6963 
6964       public static final int DURATION_FIELD_NUMBER = 2;
6965       private com.google.protobuf.Duration duration_;
6966       /**
6967        *
6968        *
6969        * <pre>
6970        * The amount of time that a time series must fail to report new
6971        * data to be considered failing. The minimum value of this field
6972        * is 120 seconds. Larger values that are a multiple of a
6973        * minute--for example, 240 or 300 seconds--are supported.
6974        * If an invalid value is given, an
6975        * error will be returned. The `Duration.nanos` field is
6976        * ignored.
6977        * </pre>
6978        *
6979        * <code>.google.protobuf.Duration duration = 2;</code>
6980        *
6981        * @return Whether the duration field is set.
6982        */
6983       @java.lang.Override
hasDuration()6984       public boolean hasDuration() {
6985         return duration_ != null;
6986       }
6987       /**
6988        *
6989        *
6990        * <pre>
6991        * The amount of time that a time series must fail to report new
6992        * data to be considered failing. The minimum value of this field
6993        * is 120 seconds. Larger values that are a multiple of a
6994        * minute--for example, 240 or 300 seconds--are supported.
6995        * If an invalid value is given, an
6996        * error will be returned. The `Duration.nanos` field is
6997        * ignored.
6998        * </pre>
6999        *
7000        * <code>.google.protobuf.Duration duration = 2;</code>
7001        *
7002        * @return The duration.
7003        */
7004       @java.lang.Override
getDuration()7005       public com.google.protobuf.Duration getDuration() {
7006         return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
7007       }
7008       /**
7009        *
7010        *
7011        * <pre>
7012        * The amount of time that a time series must fail to report new
7013        * data to be considered failing. The minimum value of this field
7014        * is 120 seconds. Larger values that are a multiple of a
7015        * minute--for example, 240 or 300 seconds--are supported.
7016        * If an invalid value is given, an
7017        * error will be returned. The `Duration.nanos` field is
7018        * ignored.
7019        * </pre>
7020        *
7021        * <code>.google.protobuf.Duration duration = 2;</code>
7022        */
7023       @java.lang.Override
getDurationOrBuilder()7024       public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
7025         return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
7026       }
7027 
7028       public static final int TRIGGER_FIELD_NUMBER = 3;
7029       private com.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger_;
7030       /**
7031        *
7032        *
7033        * <pre>
7034        * The number/percent of time series for which the comparison must hold
7035        * in order for the condition to trigger. If unspecified, then the
7036        * condition will trigger if the comparison is true for any of the
7037        * time series that have been identified by `filter` and `aggregations`.
7038        * </pre>
7039        *
7040        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
7041        *
7042        * @return Whether the trigger field is set.
7043        */
7044       @java.lang.Override
hasTrigger()7045       public boolean hasTrigger() {
7046         return trigger_ != null;
7047       }
7048       /**
7049        *
7050        *
7051        * <pre>
7052        * The number/percent of time series for which the comparison must hold
7053        * in order for the condition to trigger. If unspecified, then the
7054        * condition will trigger if the comparison is true for any of the
7055        * time series that have been identified by `filter` and `aggregations`.
7056        * </pre>
7057        *
7058        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
7059        *
7060        * @return The trigger.
7061        */
7062       @java.lang.Override
getTrigger()7063       public com.google.monitoring.v3.AlertPolicy.Condition.Trigger getTrigger() {
7064         return trigger_ == null
7065             ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
7066             : trigger_;
7067       }
7068       /**
7069        *
7070        *
7071        * <pre>
7072        * The number/percent of time series for which the comparison must hold
7073        * in order for the condition to trigger. If unspecified, then the
7074        * condition will trigger if the comparison is true for any of the
7075        * time series that have been identified by `filter` and `aggregations`.
7076        * </pre>
7077        *
7078        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
7079        */
7080       @java.lang.Override
getTriggerOrBuilder()7081       public com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder getTriggerOrBuilder() {
7082         return trigger_ == null
7083             ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
7084             : trigger_;
7085       }
7086 
7087       private byte memoizedIsInitialized = -1;
7088 
7089       @java.lang.Override
isInitialized()7090       public final boolean isInitialized() {
7091         byte isInitialized = memoizedIsInitialized;
7092         if (isInitialized == 1) return true;
7093         if (isInitialized == 0) return false;
7094 
7095         memoizedIsInitialized = 1;
7096         return true;
7097       }
7098 
7099       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)7100       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
7101         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
7102           com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_);
7103         }
7104         if (duration_ != null) {
7105           output.writeMessage(2, getDuration());
7106         }
7107         if (trigger_ != null) {
7108           output.writeMessage(3, getTrigger());
7109         }
7110         for (int i = 0; i < aggregations_.size(); i++) {
7111           output.writeMessage(5, aggregations_.get(i));
7112         }
7113         getUnknownFields().writeTo(output);
7114       }
7115 
7116       @java.lang.Override
getSerializedSize()7117       public int getSerializedSize() {
7118         int size = memoizedSize;
7119         if (size != -1) return size;
7120 
7121         size = 0;
7122         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
7123           size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_);
7124         }
7125         if (duration_ != null) {
7126           size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDuration());
7127         }
7128         if (trigger_ != null) {
7129           size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTrigger());
7130         }
7131         for (int i = 0; i < aggregations_.size(); i++) {
7132           size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, aggregations_.get(i));
7133         }
7134         size += getUnknownFields().getSerializedSize();
7135         memoizedSize = size;
7136         return size;
7137       }
7138 
7139       @java.lang.Override
equals(final java.lang.Object obj)7140       public boolean equals(final java.lang.Object obj) {
7141         if (obj == this) {
7142           return true;
7143         }
7144         if (!(obj instanceof com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence)) {
7145           return super.equals(obj);
7146         }
7147         com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence other =
7148             (com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) obj;
7149 
7150         if (!getFilter().equals(other.getFilter())) return false;
7151         if (!getAggregationsList().equals(other.getAggregationsList())) return false;
7152         if (hasDuration() != other.hasDuration()) return false;
7153         if (hasDuration()) {
7154           if (!getDuration().equals(other.getDuration())) return false;
7155         }
7156         if (hasTrigger() != other.hasTrigger()) return false;
7157         if (hasTrigger()) {
7158           if (!getTrigger().equals(other.getTrigger())) return false;
7159         }
7160         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
7161         return true;
7162       }
7163 
7164       @java.lang.Override
hashCode()7165       public int hashCode() {
7166         if (memoizedHashCode != 0) {
7167           return memoizedHashCode;
7168         }
7169         int hash = 41;
7170         hash = (19 * hash) + getDescriptor().hashCode();
7171         hash = (37 * hash) + FILTER_FIELD_NUMBER;
7172         hash = (53 * hash) + getFilter().hashCode();
7173         if (getAggregationsCount() > 0) {
7174           hash = (37 * hash) + AGGREGATIONS_FIELD_NUMBER;
7175           hash = (53 * hash) + getAggregationsList().hashCode();
7176         }
7177         if (hasDuration()) {
7178           hash = (37 * hash) + DURATION_FIELD_NUMBER;
7179           hash = (53 * hash) + getDuration().hashCode();
7180         }
7181         if (hasTrigger()) {
7182           hash = (37 * hash) + TRIGGER_FIELD_NUMBER;
7183           hash = (53 * hash) + getTrigger().hashCode();
7184         }
7185         hash = (29 * hash) + getUnknownFields().hashCode();
7186         memoizedHashCode = hash;
7187         return hash;
7188       }
7189 
parseFrom( java.nio.ByteBuffer data)7190       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7191           java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
7192         return PARSER.parseFrom(data);
7193       }
7194 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7195       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7196           java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7197           throws com.google.protobuf.InvalidProtocolBufferException {
7198         return PARSER.parseFrom(data, extensionRegistry);
7199       }
7200 
parseFrom( com.google.protobuf.ByteString data)7201       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7202           com.google.protobuf.ByteString data)
7203           throws com.google.protobuf.InvalidProtocolBufferException {
7204         return PARSER.parseFrom(data);
7205       }
7206 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7207       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7208           com.google.protobuf.ByteString data,
7209           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7210           throws com.google.protobuf.InvalidProtocolBufferException {
7211         return PARSER.parseFrom(data, extensionRegistry);
7212       }
7213 
parseFrom( byte[] data)7214       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7215           byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
7216         return PARSER.parseFrom(data);
7217       }
7218 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7219       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7220           byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7221           throws com.google.protobuf.InvalidProtocolBufferException {
7222         return PARSER.parseFrom(data, extensionRegistry);
7223       }
7224 
parseFrom( java.io.InputStream input)7225       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7226           java.io.InputStream input) throws java.io.IOException {
7227         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
7228       }
7229 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7230       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7231           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7232           throws java.io.IOException {
7233         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
7234             PARSER, input, extensionRegistry);
7235       }
7236 
parseDelimitedFrom( java.io.InputStream input)7237       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseDelimitedFrom(
7238           java.io.InputStream input) throws java.io.IOException {
7239         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
7240       }
7241 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7242       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseDelimitedFrom(
7243           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7244           throws java.io.IOException {
7245         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
7246             PARSER, input, extensionRegistry);
7247       }
7248 
parseFrom( com.google.protobuf.CodedInputStream input)7249       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7250           com.google.protobuf.CodedInputStream input) throws java.io.IOException {
7251         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
7252       }
7253 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7254       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence parseFrom(
7255           com.google.protobuf.CodedInputStream input,
7256           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7257           throws java.io.IOException {
7258         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
7259             PARSER, input, extensionRegistry);
7260       }
7261 
7262       @java.lang.Override
newBuilderForType()7263       public Builder newBuilderForType() {
7264         return newBuilder();
7265       }
7266 
newBuilder()7267       public static Builder newBuilder() {
7268         return DEFAULT_INSTANCE.toBuilder();
7269       }
7270 
newBuilder( com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence prototype)7271       public static Builder newBuilder(
7272           com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence prototype) {
7273         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
7274       }
7275 
7276       @java.lang.Override
toBuilder()7277       public Builder toBuilder() {
7278         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
7279       }
7280 
7281       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)7282       protected Builder newBuilderForType(
7283           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
7284         Builder builder = new Builder(parent);
7285         return builder;
7286       }
7287       /**
7288        *
7289        *
7290        * <pre>
7291        * A condition type that checks that monitored resources
7292        * are reporting data. The configuration defines a metric and
7293        * a set of monitored resources. The predicate is considered in violation
7294        * when a time series for the specified metric of a monitored
7295        * resource does not include any data in the specified `duration`.
7296        * </pre>
7297        *
7298        * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition.MetricAbsence}
7299        */
7300       public static final class Builder
7301           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
7302           implements
7303           // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy.Condition.MetricAbsence)
7304           com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsenceOrBuilder {
getDescriptor()7305         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
7306           return com.google.monitoring.v3.AlertProto
7307               .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricAbsence_descriptor;
7308         }
7309 
7310         @java.lang.Override
7311         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()7312             internalGetFieldAccessorTable() {
7313           return com.google.monitoring.v3.AlertProto
7314               .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricAbsence_fieldAccessorTable
7315               .ensureFieldAccessorsInitialized(
7316                   com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.class,
7317                   com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.Builder.class);
7318         }
7319 
7320         // Construct using com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.newBuilder()
Builder()7321         private Builder() {}
7322 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)7323         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
7324           super(parent);
7325         }
7326 
7327         @java.lang.Override
clear()7328         public Builder clear() {
7329           super.clear();
7330           bitField0_ = 0;
7331           filter_ = "";
7332           if (aggregationsBuilder_ == null) {
7333             aggregations_ = java.util.Collections.emptyList();
7334           } else {
7335             aggregations_ = null;
7336             aggregationsBuilder_.clear();
7337           }
7338           bitField0_ = (bitField0_ & ~0x00000002);
7339           duration_ = null;
7340           if (durationBuilder_ != null) {
7341             durationBuilder_.dispose();
7342             durationBuilder_ = null;
7343           }
7344           trigger_ = null;
7345           if (triggerBuilder_ != null) {
7346             triggerBuilder_.dispose();
7347             triggerBuilder_ = null;
7348           }
7349           return this;
7350         }
7351 
7352         @java.lang.Override
getDescriptorForType()7353         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
7354           return com.google.monitoring.v3.AlertProto
7355               .internal_static_google_monitoring_v3_AlertPolicy_Condition_MetricAbsence_descriptor;
7356         }
7357 
7358         @java.lang.Override
7359         public com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence
getDefaultInstanceForType()7360             getDefaultInstanceForType() {
7361           return com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.getDefaultInstance();
7362         }
7363 
7364         @java.lang.Override
build()7365         public com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence build() {
7366           com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence result = buildPartial();
7367           if (!result.isInitialized()) {
7368             throw newUninitializedMessageException(result);
7369           }
7370           return result;
7371         }
7372 
7373         @java.lang.Override
buildPartial()7374         public com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence buildPartial() {
7375           com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence result =
7376               new com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence(this);
7377           buildPartialRepeatedFields(result);
7378           if (bitField0_ != 0) {
7379             buildPartial0(result);
7380           }
7381           onBuilt();
7382           return result;
7383         }
7384 
buildPartialRepeatedFields( com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence result)7385         private void buildPartialRepeatedFields(
7386             com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence result) {
7387           if (aggregationsBuilder_ == null) {
7388             if (((bitField0_ & 0x00000002) != 0)) {
7389               aggregations_ = java.util.Collections.unmodifiableList(aggregations_);
7390               bitField0_ = (bitField0_ & ~0x00000002);
7391             }
7392             result.aggregations_ = aggregations_;
7393           } else {
7394             result.aggregations_ = aggregationsBuilder_.build();
7395           }
7396         }
7397 
buildPartial0( com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence result)7398         private void buildPartial0(
7399             com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence result) {
7400           int from_bitField0_ = bitField0_;
7401           if (((from_bitField0_ & 0x00000001) != 0)) {
7402             result.filter_ = filter_;
7403           }
7404           if (((from_bitField0_ & 0x00000004) != 0)) {
7405             result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build();
7406           }
7407           if (((from_bitField0_ & 0x00000008) != 0)) {
7408             result.trigger_ = triggerBuilder_ == null ? trigger_ : triggerBuilder_.build();
7409           }
7410         }
7411 
7412         @java.lang.Override
clone()7413         public Builder clone() {
7414           return super.clone();
7415         }
7416 
7417         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)7418         public Builder setField(
7419             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
7420           return super.setField(field, value);
7421         }
7422 
7423         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)7424         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
7425           return super.clearField(field);
7426         }
7427 
7428         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)7429         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
7430           return super.clearOneof(oneof);
7431         }
7432 
7433         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)7434         public Builder setRepeatedField(
7435             com.google.protobuf.Descriptors.FieldDescriptor field,
7436             int index,
7437             java.lang.Object value) {
7438           return super.setRepeatedField(field, index, value);
7439         }
7440 
7441         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)7442         public Builder addRepeatedField(
7443             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
7444           return super.addRepeatedField(field, value);
7445         }
7446 
7447         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)7448         public Builder mergeFrom(com.google.protobuf.Message other) {
7449           if (other instanceof com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) {
7450             return mergeFrom((com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) other);
7451           } else {
7452             super.mergeFrom(other);
7453             return this;
7454           }
7455         }
7456 
mergeFrom( com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence other)7457         public Builder mergeFrom(
7458             com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence other) {
7459           if (other
7460               == com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.getDefaultInstance())
7461             return this;
7462           if (!other.getFilter().isEmpty()) {
7463             filter_ = other.filter_;
7464             bitField0_ |= 0x00000001;
7465             onChanged();
7466           }
7467           if (aggregationsBuilder_ == null) {
7468             if (!other.aggregations_.isEmpty()) {
7469               if (aggregations_.isEmpty()) {
7470                 aggregations_ = other.aggregations_;
7471                 bitField0_ = (bitField0_ & ~0x00000002);
7472               } else {
7473                 ensureAggregationsIsMutable();
7474                 aggregations_.addAll(other.aggregations_);
7475               }
7476               onChanged();
7477             }
7478           } else {
7479             if (!other.aggregations_.isEmpty()) {
7480               if (aggregationsBuilder_.isEmpty()) {
7481                 aggregationsBuilder_.dispose();
7482                 aggregationsBuilder_ = null;
7483                 aggregations_ = other.aggregations_;
7484                 bitField0_ = (bitField0_ & ~0x00000002);
7485                 aggregationsBuilder_ =
7486                     com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
7487                         ? getAggregationsFieldBuilder()
7488                         : null;
7489               } else {
7490                 aggregationsBuilder_.addAllMessages(other.aggregations_);
7491               }
7492             }
7493           }
7494           if (other.hasDuration()) {
7495             mergeDuration(other.getDuration());
7496           }
7497           if (other.hasTrigger()) {
7498             mergeTrigger(other.getTrigger());
7499           }
7500           this.mergeUnknownFields(other.getUnknownFields());
7501           onChanged();
7502           return this;
7503         }
7504 
7505         @java.lang.Override
isInitialized()7506         public final boolean isInitialized() {
7507           return true;
7508         }
7509 
7510         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7511         public Builder mergeFrom(
7512             com.google.protobuf.CodedInputStream input,
7513             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7514             throws java.io.IOException {
7515           if (extensionRegistry == null) {
7516             throw new java.lang.NullPointerException();
7517           }
7518           try {
7519             boolean done = false;
7520             while (!done) {
7521               int tag = input.readTag();
7522               switch (tag) {
7523                 case 0:
7524                   done = true;
7525                   break;
7526                 case 10:
7527                   {
7528                     filter_ = input.readStringRequireUtf8();
7529                     bitField0_ |= 0x00000001;
7530                     break;
7531                   } // case 10
7532                 case 18:
7533                   {
7534                     input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry);
7535                     bitField0_ |= 0x00000004;
7536                     break;
7537                   } // case 18
7538                 case 26:
7539                   {
7540                     input.readMessage(getTriggerFieldBuilder().getBuilder(), extensionRegistry);
7541                     bitField0_ |= 0x00000008;
7542                     break;
7543                   } // case 26
7544                 case 42:
7545                   {
7546                     com.google.monitoring.v3.Aggregation m =
7547                         input.readMessage(
7548                             com.google.monitoring.v3.Aggregation.parser(), extensionRegistry);
7549                     if (aggregationsBuilder_ == null) {
7550                       ensureAggregationsIsMutable();
7551                       aggregations_.add(m);
7552                     } else {
7553                       aggregationsBuilder_.addMessage(m);
7554                     }
7555                     break;
7556                   } // case 42
7557                 default:
7558                   {
7559                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
7560                       done = true; // was an endgroup tag
7561                     }
7562                     break;
7563                   } // default:
7564               } // switch (tag)
7565             } // while (!done)
7566           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7567             throw e.unwrapIOException();
7568           } finally {
7569             onChanged();
7570           } // finally
7571           return this;
7572         }
7573 
7574         private int bitField0_;
7575 
7576         private java.lang.Object filter_ = "";
7577         /**
7578          *
7579          *
7580          * <pre>
7581          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
7582          * identifies which time series should be compared with the threshold.
7583          * The filter is similar to the one that is specified in the
7584          * [`ListTimeSeries`
7585          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
7586          * (that call is useful to verify the time series that will be retrieved /
7587          * processed). The filter must specify the metric type and the resource
7588          * type. Optionally, it can specify resource labels and metric labels.
7589          * This field must not exceed 2048 Unicode characters in length.
7590          * </pre>
7591          *
7592          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
7593          *
7594          * @return The filter.
7595          */
getFilter()7596         public java.lang.String getFilter() {
7597           java.lang.Object ref = filter_;
7598           if (!(ref instanceof java.lang.String)) {
7599             com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
7600             java.lang.String s = bs.toStringUtf8();
7601             filter_ = s;
7602             return s;
7603           } else {
7604             return (java.lang.String) ref;
7605           }
7606         }
7607         /**
7608          *
7609          *
7610          * <pre>
7611          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
7612          * identifies which time series should be compared with the threshold.
7613          * The filter is similar to the one that is specified in the
7614          * [`ListTimeSeries`
7615          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
7616          * (that call is useful to verify the time series that will be retrieved /
7617          * processed). The filter must specify the metric type and the resource
7618          * type. Optionally, it can specify resource labels and metric labels.
7619          * This field must not exceed 2048 Unicode characters in length.
7620          * </pre>
7621          *
7622          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
7623          *
7624          * @return The bytes for filter.
7625          */
getFilterBytes()7626         public com.google.protobuf.ByteString getFilterBytes() {
7627           java.lang.Object ref = filter_;
7628           if (ref instanceof String) {
7629             com.google.protobuf.ByteString b =
7630                 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
7631             filter_ = b;
7632             return b;
7633           } else {
7634             return (com.google.protobuf.ByteString) ref;
7635           }
7636         }
7637         /**
7638          *
7639          *
7640          * <pre>
7641          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
7642          * identifies which time series should be compared with the threshold.
7643          * The filter is similar to the one that is specified in the
7644          * [`ListTimeSeries`
7645          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
7646          * (that call is useful to verify the time series that will be retrieved /
7647          * processed). The filter must specify the metric type and the resource
7648          * type. Optionally, it can specify resource labels and metric labels.
7649          * This field must not exceed 2048 Unicode characters in length.
7650          * </pre>
7651          *
7652          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
7653          *
7654          * @param value The filter to set.
7655          * @return This builder for chaining.
7656          */
setFilter(java.lang.String value)7657         public Builder setFilter(java.lang.String value) {
7658           if (value == null) {
7659             throw new NullPointerException();
7660           }
7661           filter_ = value;
7662           bitField0_ |= 0x00000001;
7663           onChanged();
7664           return this;
7665         }
7666         /**
7667          *
7668          *
7669          * <pre>
7670          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
7671          * identifies which time series should be compared with the threshold.
7672          * The filter is similar to the one that is specified in the
7673          * [`ListTimeSeries`
7674          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
7675          * (that call is useful to verify the time series that will be retrieved /
7676          * processed). The filter must specify the metric type and the resource
7677          * type. Optionally, it can specify resource labels and metric labels.
7678          * This field must not exceed 2048 Unicode characters in length.
7679          * </pre>
7680          *
7681          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
7682          *
7683          * @return This builder for chaining.
7684          */
clearFilter()7685         public Builder clearFilter() {
7686           filter_ = getDefaultInstance().getFilter();
7687           bitField0_ = (bitField0_ & ~0x00000001);
7688           onChanged();
7689           return this;
7690         }
7691         /**
7692          *
7693          *
7694          * <pre>
7695          * Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
7696          * identifies which time series should be compared with the threshold.
7697          * The filter is similar to the one that is specified in the
7698          * [`ListTimeSeries`
7699          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
7700          * (that call is useful to verify the time series that will be retrieved /
7701          * processed). The filter must specify the metric type and the resource
7702          * type. Optionally, it can specify resource labels and metric labels.
7703          * This field must not exceed 2048 Unicode characters in length.
7704          * </pre>
7705          *
7706          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
7707          *
7708          * @param value The bytes for filter to set.
7709          * @return This builder for chaining.
7710          */
setFilterBytes(com.google.protobuf.ByteString value)7711         public Builder setFilterBytes(com.google.protobuf.ByteString value) {
7712           if (value == null) {
7713             throw new NullPointerException();
7714           }
7715           checkByteStringIsUtf8(value);
7716           filter_ = value;
7717           bitField0_ |= 0x00000001;
7718           onChanged();
7719           return this;
7720         }
7721 
7722         private java.util.List<com.google.monitoring.v3.Aggregation> aggregations_ =
7723             java.util.Collections.emptyList();
7724 
ensureAggregationsIsMutable()7725         private void ensureAggregationsIsMutable() {
7726           if (!((bitField0_ & 0x00000002) != 0)) {
7727             aggregations_ =
7728                 new java.util.ArrayList<com.google.monitoring.v3.Aggregation>(aggregations_);
7729             bitField0_ |= 0x00000002;
7730           }
7731         }
7732 
7733         private com.google.protobuf.RepeatedFieldBuilderV3<
7734                 com.google.monitoring.v3.Aggregation,
7735                 com.google.monitoring.v3.Aggregation.Builder,
7736                 com.google.monitoring.v3.AggregationOrBuilder>
7737             aggregationsBuilder_;
7738 
7739         /**
7740          *
7741          *
7742          * <pre>
7743          * Specifies the alignment of data points in individual time series as
7744          * well as how to combine the retrieved time series together (such as
7745          * when aggregating multiple streams on each resource to a single
7746          * stream for each resource or when aggregating streams across all
7747          * members of a group of resources). Multiple aggregations
7748          * are applied in the order specified.
7749          * This field is similar to the one in the [`ListTimeSeries`
7750          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
7751          * It is advisable to use the `ListTimeSeries` method when debugging this
7752          * field.
7753          * </pre>
7754          *
7755          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
7756          */
getAggregationsList()7757         public java.util.List<com.google.monitoring.v3.Aggregation> getAggregationsList() {
7758           if (aggregationsBuilder_ == null) {
7759             return java.util.Collections.unmodifiableList(aggregations_);
7760           } else {
7761             return aggregationsBuilder_.getMessageList();
7762           }
7763         }
7764         /**
7765          *
7766          *
7767          * <pre>
7768          * Specifies the alignment of data points in individual time series as
7769          * well as how to combine the retrieved time series together (such as
7770          * when aggregating multiple streams on each resource to a single
7771          * stream for each resource or when aggregating streams across all
7772          * members of a group of resources). Multiple aggregations
7773          * are applied in the order specified.
7774          * This field is similar to the one in the [`ListTimeSeries`
7775          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
7776          * It is advisable to use the `ListTimeSeries` method when debugging this
7777          * field.
7778          * </pre>
7779          *
7780          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
7781          */
getAggregationsCount()7782         public int getAggregationsCount() {
7783           if (aggregationsBuilder_ == null) {
7784             return aggregations_.size();
7785           } else {
7786             return aggregationsBuilder_.getCount();
7787           }
7788         }
7789         /**
7790          *
7791          *
7792          * <pre>
7793          * Specifies the alignment of data points in individual time series as
7794          * well as how to combine the retrieved time series together (such as
7795          * when aggregating multiple streams on each resource to a single
7796          * stream for each resource or when aggregating streams across all
7797          * members of a group of resources). Multiple aggregations
7798          * are applied in the order specified.
7799          * This field is similar to the one in the [`ListTimeSeries`
7800          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
7801          * It is advisable to use the `ListTimeSeries` method when debugging this
7802          * field.
7803          * </pre>
7804          *
7805          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
7806          */
getAggregations(int index)7807         public com.google.monitoring.v3.Aggregation getAggregations(int index) {
7808           if (aggregationsBuilder_ == null) {
7809             return aggregations_.get(index);
7810           } else {
7811             return aggregationsBuilder_.getMessage(index);
7812           }
7813         }
7814         /**
7815          *
7816          *
7817          * <pre>
7818          * Specifies the alignment of data points in individual time series as
7819          * well as how to combine the retrieved time series together (such as
7820          * when aggregating multiple streams on each resource to a single
7821          * stream for each resource or when aggregating streams across all
7822          * members of a group of resources). Multiple aggregations
7823          * are applied in the order specified.
7824          * This field is similar to the one in the [`ListTimeSeries`
7825          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
7826          * It is advisable to use the `ListTimeSeries` method when debugging this
7827          * field.
7828          * </pre>
7829          *
7830          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
7831          */
setAggregations(int index, com.google.monitoring.v3.Aggregation value)7832         public Builder setAggregations(int index, com.google.monitoring.v3.Aggregation value) {
7833           if (aggregationsBuilder_ == null) {
7834             if (value == null) {
7835               throw new NullPointerException();
7836             }
7837             ensureAggregationsIsMutable();
7838             aggregations_.set(index, value);
7839             onChanged();
7840           } else {
7841             aggregationsBuilder_.setMessage(index, value);
7842           }
7843           return this;
7844         }
7845         /**
7846          *
7847          *
7848          * <pre>
7849          * Specifies the alignment of data points in individual time series as
7850          * well as how to combine the retrieved time series together (such as
7851          * when aggregating multiple streams on each resource to a single
7852          * stream for each resource or when aggregating streams across all
7853          * members of a group of resources). Multiple aggregations
7854          * are applied in the order specified.
7855          * This field is similar to the one in the [`ListTimeSeries`
7856          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
7857          * It is advisable to use the `ListTimeSeries` method when debugging this
7858          * field.
7859          * </pre>
7860          *
7861          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
7862          */
setAggregations( int index, com.google.monitoring.v3.Aggregation.Builder builderForValue)7863         public Builder setAggregations(
7864             int index, com.google.monitoring.v3.Aggregation.Builder builderForValue) {
7865           if (aggregationsBuilder_ == null) {
7866             ensureAggregationsIsMutable();
7867             aggregations_.set(index, builderForValue.build());
7868             onChanged();
7869           } else {
7870             aggregationsBuilder_.setMessage(index, builderForValue.build());
7871           }
7872           return this;
7873         }
7874         /**
7875          *
7876          *
7877          * <pre>
7878          * Specifies the alignment of data points in individual time series as
7879          * well as how to combine the retrieved time series together (such as
7880          * when aggregating multiple streams on each resource to a single
7881          * stream for each resource or when aggregating streams across all
7882          * members of a group of resources). Multiple aggregations
7883          * are applied in the order specified.
7884          * This field is similar to the one in the [`ListTimeSeries`
7885          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
7886          * It is advisable to use the `ListTimeSeries` method when debugging this
7887          * field.
7888          * </pre>
7889          *
7890          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
7891          */
addAggregations(com.google.monitoring.v3.Aggregation value)7892         public Builder addAggregations(com.google.monitoring.v3.Aggregation value) {
7893           if (aggregationsBuilder_ == null) {
7894             if (value == null) {
7895               throw new NullPointerException();
7896             }
7897             ensureAggregationsIsMutable();
7898             aggregations_.add(value);
7899             onChanged();
7900           } else {
7901             aggregationsBuilder_.addMessage(value);
7902           }
7903           return this;
7904         }
7905         /**
7906          *
7907          *
7908          * <pre>
7909          * Specifies the alignment of data points in individual time series as
7910          * well as how to combine the retrieved time series together (such as
7911          * when aggregating multiple streams on each resource to a single
7912          * stream for each resource or when aggregating streams across all
7913          * members of a group of resources). Multiple aggregations
7914          * are applied in the order specified.
7915          * This field is similar to the one in the [`ListTimeSeries`
7916          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
7917          * It is advisable to use the `ListTimeSeries` method when debugging this
7918          * field.
7919          * </pre>
7920          *
7921          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
7922          */
addAggregations(int index, com.google.monitoring.v3.Aggregation value)7923         public Builder addAggregations(int index, com.google.monitoring.v3.Aggregation value) {
7924           if (aggregationsBuilder_ == null) {
7925             if (value == null) {
7926               throw new NullPointerException();
7927             }
7928             ensureAggregationsIsMutable();
7929             aggregations_.add(index, value);
7930             onChanged();
7931           } else {
7932             aggregationsBuilder_.addMessage(index, value);
7933           }
7934           return this;
7935         }
7936         /**
7937          *
7938          *
7939          * <pre>
7940          * Specifies the alignment of data points in individual time series as
7941          * well as how to combine the retrieved time series together (such as
7942          * when aggregating multiple streams on each resource to a single
7943          * stream for each resource or when aggregating streams across all
7944          * members of a group of resources). Multiple aggregations
7945          * are applied in the order specified.
7946          * This field is similar to the one in the [`ListTimeSeries`
7947          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
7948          * It is advisable to use the `ListTimeSeries` method when debugging this
7949          * field.
7950          * </pre>
7951          *
7952          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
7953          */
addAggregations( com.google.monitoring.v3.Aggregation.Builder builderForValue)7954         public Builder addAggregations(
7955             com.google.monitoring.v3.Aggregation.Builder builderForValue) {
7956           if (aggregationsBuilder_ == null) {
7957             ensureAggregationsIsMutable();
7958             aggregations_.add(builderForValue.build());
7959             onChanged();
7960           } else {
7961             aggregationsBuilder_.addMessage(builderForValue.build());
7962           }
7963           return this;
7964         }
7965         /**
7966          *
7967          *
7968          * <pre>
7969          * Specifies the alignment of data points in individual time series as
7970          * well as how to combine the retrieved time series together (such as
7971          * when aggregating multiple streams on each resource to a single
7972          * stream for each resource or when aggregating streams across all
7973          * members of a group of resources). Multiple aggregations
7974          * are applied in the order specified.
7975          * This field is similar to the one in the [`ListTimeSeries`
7976          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
7977          * It is advisable to use the `ListTimeSeries` method when debugging this
7978          * field.
7979          * </pre>
7980          *
7981          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
7982          */
addAggregations( int index, com.google.monitoring.v3.Aggregation.Builder builderForValue)7983         public Builder addAggregations(
7984             int index, com.google.monitoring.v3.Aggregation.Builder builderForValue) {
7985           if (aggregationsBuilder_ == null) {
7986             ensureAggregationsIsMutable();
7987             aggregations_.add(index, builderForValue.build());
7988             onChanged();
7989           } else {
7990             aggregationsBuilder_.addMessage(index, builderForValue.build());
7991           }
7992           return this;
7993         }
7994         /**
7995          *
7996          *
7997          * <pre>
7998          * Specifies the alignment of data points in individual time series as
7999          * well as how to combine the retrieved time series together (such as
8000          * when aggregating multiple streams on each resource to a single
8001          * stream for each resource or when aggregating streams across all
8002          * members of a group of resources). Multiple aggregations
8003          * are applied in the order specified.
8004          * This field is similar to the one in the [`ListTimeSeries`
8005          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
8006          * It is advisable to use the `ListTimeSeries` method when debugging this
8007          * field.
8008          * </pre>
8009          *
8010          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
8011          */
addAllAggregations( java.lang.Iterable<? extends com.google.monitoring.v3.Aggregation> values)8012         public Builder addAllAggregations(
8013             java.lang.Iterable<? extends com.google.monitoring.v3.Aggregation> values) {
8014           if (aggregationsBuilder_ == null) {
8015             ensureAggregationsIsMutable();
8016             com.google.protobuf.AbstractMessageLite.Builder.addAll(values, aggregations_);
8017             onChanged();
8018           } else {
8019             aggregationsBuilder_.addAllMessages(values);
8020           }
8021           return this;
8022         }
8023         /**
8024          *
8025          *
8026          * <pre>
8027          * Specifies the alignment of data points in individual time series as
8028          * well as how to combine the retrieved time series together (such as
8029          * when aggregating multiple streams on each resource to a single
8030          * stream for each resource or when aggregating streams across all
8031          * members of a group of resources). Multiple aggregations
8032          * are applied in the order specified.
8033          * This field is similar to the one in the [`ListTimeSeries`
8034          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
8035          * It is advisable to use the `ListTimeSeries` method when debugging this
8036          * field.
8037          * </pre>
8038          *
8039          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
8040          */
clearAggregations()8041         public Builder clearAggregations() {
8042           if (aggregationsBuilder_ == null) {
8043             aggregations_ = java.util.Collections.emptyList();
8044             bitField0_ = (bitField0_ & ~0x00000002);
8045             onChanged();
8046           } else {
8047             aggregationsBuilder_.clear();
8048           }
8049           return this;
8050         }
8051         /**
8052          *
8053          *
8054          * <pre>
8055          * Specifies the alignment of data points in individual time series as
8056          * well as how to combine the retrieved time series together (such as
8057          * when aggregating multiple streams on each resource to a single
8058          * stream for each resource or when aggregating streams across all
8059          * members of a group of resources). Multiple aggregations
8060          * are applied in the order specified.
8061          * This field is similar to the one in the [`ListTimeSeries`
8062          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
8063          * It is advisable to use the `ListTimeSeries` method when debugging this
8064          * field.
8065          * </pre>
8066          *
8067          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
8068          */
removeAggregations(int index)8069         public Builder removeAggregations(int index) {
8070           if (aggregationsBuilder_ == null) {
8071             ensureAggregationsIsMutable();
8072             aggregations_.remove(index);
8073             onChanged();
8074           } else {
8075             aggregationsBuilder_.remove(index);
8076           }
8077           return this;
8078         }
8079         /**
8080          *
8081          *
8082          * <pre>
8083          * Specifies the alignment of data points in individual time series as
8084          * well as how to combine the retrieved time series together (such as
8085          * when aggregating multiple streams on each resource to a single
8086          * stream for each resource or when aggregating streams across all
8087          * members of a group of resources). Multiple aggregations
8088          * are applied in the order specified.
8089          * This field is similar to the one in the [`ListTimeSeries`
8090          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
8091          * It is advisable to use the `ListTimeSeries` method when debugging this
8092          * field.
8093          * </pre>
8094          *
8095          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
8096          */
getAggregationsBuilder(int index)8097         public com.google.monitoring.v3.Aggregation.Builder getAggregationsBuilder(int index) {
8098           return getAggregationsFieldBuilder().getBuilder(index);
8099         }
8100         /**
8101          *
8102          *
8103          * <pre>
8104          * Specifies the alignment of data points in individual time series as
8105          * well as how to combine the retrieved time series together (such as
8106          * when aggregating multiple streams on each resource to a single
8107          * stream for each resource or when aggregating streams across all
8108          * members of a group of resources). Multiple aggregations
8109          * are applied in the order specified.
8110          * This field is similar to the one in the [`ListTimeSeries`
8111          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
8112          * It is advisable to use the `ListTimeSeries` method when debugging this
8113          * field.
8114          * </pre>
8115          *
8116          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
8117          */
getAggregationsOrBuilder(int index)8118         public com.google.monitoring.v3.AggregationOrBuilder getAggregationsOrBuilder(int index) {
8119           if (aggregationsBuilder_ == null) {
8120             return aggregations_.get(index);
8121           } else {
8122             return aggregationsBuilder_.getMessageOrBuilder(index);
8123           }
8124         }
8125         /**
8126          *
8127          *
8128          * <pre>
8129          * Specifies the alignment of data points in individual time series as
8130          * well as how to combine the retrieved time series together (such as
8131          * when aggregating multiple streams on each resource to a single
8132          * stream for each resource or when aggregating streams across all
8133          * members of a group of resources). Multiple aggregations
8134          * are applied in the order specified.
8135          * This field is similar to the one in the [`ListTimeSeries`
8136          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
8137          * It is advisable to use the `ListTimeSeries` method when debugging this
8138          * field.
8139          * </pre>
8140          *
8141          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
8142          */
8143         public java.util.List<? extends com.google.monitoring.v3.AggregationOrBuilder>
getAggregationsOrBuilderList()8144             getAggregationsOrBuilderList() {
8145           if (aggregationsBuilder_ != null) {
8146             return aggregationsBuilder_.getMessageOrBuilderList();
8147           } else {
8148             return java.util.Collections.unmodifiableList(aggregations_);
8149           }
8150         }
8151         /**
8152          *
8153          *
8154          * <pre>
8155          * Specifies the alignment of data points in individual time series as
8156          * well as how to combine the retrieved time series together (such as
8157          * when aggregating multiple streams on each resource to a single
8158          * stream for each resource or when aggregating streams across all
8159          * members of a group of resources). Multiple aggregations
8160          * are applied in the order specified.
8161          * This field is similar to the one in the [`ListTimeSeries`
8162          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
8163          * It is advisable to use the `ListTimeSeries` method when debugging this
8164          * field.
8165          * </pre>
8166          *
8167          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
8168          */
addAggregationsBuilder()8169         public com.google.monitoring.v3.Aggregation.Builder addAggregationsBuilder() {
8170           return getAggregationsFieldBuilder()
8171               .addBuilder(com.google.monitoring.v3.Aggregation.getDefaultInstance());
8172         }
8173         /**
8174          *
8175          *
8176          * <pre>
8177          * Specifies the alignment of data points in individual time series as
8178          * well as how to combine the retrieved time series together (such as
8179          * when aggregating multiple streams on each resource to a single
8180          * stream for each resource or when aggregating streams across all
8181          * members of a group of resources). Multiple aggregations
8182          * are applied in the order specified.
8183          * This field is similar to the one in the [`ListTimeSeries`
8184          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
8185          * It is advisable to use the `ListTimeSeries` method when debugging this
8186          * field.
8187          * </pre>
8188          *
8189          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
8190          */
addAggregationsBuilder(int index)8191         public com.google.monitoring.v3.Aggregation.Builder addAggregationsBuilder(int index) {
8192           return getAggregationsFieldBuilder()
8193               .addBuilder(index, com.google.monitoring.v3.Aggregation.getDefaultInstance());
8194         }
8195         /**
8196          *
8197          *
8198          * <pre>
8199          * Specifies the alignment of data points in individual time series as
8200          * well as how to combine the retrieved time series together (such as
8201          * when aggregating multiple streams on each resource to a single
8202          * stream for each resource or when aggregating streams across all
8203          * members of a group of resources). Multiple aggregations
8204          * are applied in the order specified.
8205          * This field is similar to the one in the [`ListTimeSeries`
8206          * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
8207          * It is advisable to use the `ListTimeSeries` method when debugging this
8208          * field.
8209          * </pre>
8210          *
8211          * <code>repeated .google.monitoring.v3.Aggregation aggregations = 5;</code>
8212          */
8213         public java.util.List<com.google.monitoring.v3.Aggregation.Builder>
getAggregationsBuilderList()8214             getAggregationsBuilderList() {
8215           return getAggregationsFieldBuilder().getBuilderList();
8216         }
8217 
8218         private com.google.protobuf.RepeatedFieldBuilderV3<
8219                 com.google.monitoring.v3.Aggregation,
8220                 com.google.monitoring.v3.Aggregation.Builder,
8221                 com.google.monitoring.v3.AggregationOrBuilder>
getAggregationsFieldBuilder()8222             getAggregationsFieldBuilder() {
8223           if (aggregationsBuilder_ == null) {
8224             aggregationsBuilder_ =
8225                 new com.google.protobuf.RepeatedFieldBuilderV3<
8226                     com.google.monitoring.v3.Aggregation,
8227                     com.google.monitoring.v3.Aggregation.Builder,
8228                     com.google.monitoring.v3.AggregationOrBuilder>(
8229                     aggregations_,
8230                     ((bitField0_ & 0x00000002) != 0),
8231                     getParentForChildren(),
8232                     isClean());
8233             aggregations_ = null;
8234           }
8235           return aggregationsBuilder_;
8236         }
8237 
8238         private com.google.protobuf.Duration duration_;
8239         private com.google.protobuf.SingleFieldBuilderV3<
8240                 com.google.protobuf.Duration,
8241                 com.google.protobuf.Duration.Builder,
8242                 com.google.protobuf.DurationOrBuilder>
8243             durationBuilder_;
8244         /**
8245          *
8246          *
8247          * <pre>
8248          * The amount of time that a time series must fail to report new
8249          * data to be considered failing. The minimum value of this field
8250          * is 120 seconds. Larger values that are a multiple of a
8251          * minute--for example, 240 or 300 seconds--are supported.
8252          * If an invalid value is given, an
8253          * error will be returned. The `Duration.nanos` field is
8254          * ignored.
8255          * </pre>
8256          *
8257          * <code>.google.protobuf.Duration duration = 2;</code>
8258          *
8259          * @return Whether the duration field is set.
8260          */
hasDuration()8261         public boolean hasDuration() {
8262           return ((bitField0_ & 0x00000004) != 0);
8263         }
8264         /**
8265          *
8266          *
8267          * <pre>
8268          * The amount of time that a time series must fail to report new
8269          * data to be considered failing. The minimum value of this field
8270          * is 120 seconds. Larger values that are a multiple of a
8271          * minute--for example, 240 or 300 seconds--are supported.
8272          * If an invalid value is given, an
8273          * error will be returned. The `Duration.nanos` field is
8274          * ignored.
8275          * </pre>
8276          *
8277          * <code>.google.protobuf.Duration duration = 2;</code>
8278          *
8279          * @return The duration.
8280          */
getDuration()8281         public com.google.protobuf.Duration getDuration() {
8282           if (durationBuilder_ == null) {
8283             return duration_ == null
8284                 ? com.google.protobuf.Duration.getDefaultInstance()
8285                 : duration_;
8286           } else {
8287             return durationBuilder_.getMessage();
8288           }
8289         }
8290         /**
8291          *
8292          *
8293          * <pre>
8294          * The amount of time that a time series must fail to report new
8295          * data to be considered failing. The minimum value of this field
8296          * is 120 seconds. Larger values that are a multiple of a
8297          * minute--for example, 240 or 300 seconds--are supported.
8298          * If an invalid value is given, an
8299          * error will be returned. The `Duration.nanos` field is
8300          * ignored.
8301          * </pre>
8302          *
8303          * <code>.google.protobuf.Duration duration = 2;</code>
8304          */
setDuration(com.google.protobuf.Duration value)8305         public Builder setDuration(com.google.protobuf.Duration value) {
8306           if (durationBuilder_ == null) {
8307             if (value == null) {
8308               throw new NullPointerException();
8309             }
8310             duration_ = value;
8311           } else {
8312             durationBuilder_.setMessage(value);
8313           }
8314           bitField0_ |= 0x00000004;
8315           onChanged();
8316           return this;
8317         }
8318         /**
8319          *
8320          *
8321          * <pre>
8322          * The amount of time that a time series must fail to report new
8323          * data to be considered failing. The minimum value of this field
8324          * is 120 seconds. Larger values that are a multiple of a
8325          * minute--for example, 240 or 300 seconds--are supported.
8326          * If an invalid value is given, an
8327          * error will be returned. The `Duration.nanos` field is
8328          * ignored.
8329          * </pre>
8330          *
8331          * <code>.google.protobuf.Duration duration = 2;</code>
8332          */
setDuration(com.google.protobuf.Duration.Builder builderForValue)8333         public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) {
8334           if (durationBuilder_ == null) {
8335             duration_ = builderForValue.build();
8336           } else {
8337             durationBuilder_.setMessage(builderForValue.build());
8338           }
8339           bitField0_ |= 0x00000004;
8340           onChanged();
8341           return this;
8342         }
8343         /**
8344          *
8345          *
8346          * <pre>
8347          * The amount of time that a time series must fail to report new
8348          * data to be considered failing. The minimum value of this field
8349          * is 120 seconds. Larger values that are a multiple of a
8350          * minute--for example, 240 or 300 seconds--are supported.
8351          * If an invalid value is given, an
8352          * error will be returned. The `Duration.nanos` field is
8353          * ignored.
8354          * </pre>
8355          *
8356          * <code>.google.protobuf.Duration duration = 2;</code>
8357          */
mergeDuration(com.google.protobuf.Duration value)8358         public Builder mergeDuration(com.google.protobuf.Duration value) {
8359           if (durationBuilder_ == null) {
8360             if (((bitField0_ & 0x00000004) != 0)
8361                 && duration_ != null
8362                 && duration_ != com.google.protobuf.Duration.getDefaultInstance()) {
8363               getDurationBuilder().mergeFrom(value);
8364             } else {
8365               duration_ = value;
8366             }
8367           } else {
8368             durationBuilder_.mergeFrom(value);
8369           }
8370           bitField0_ |= 0x00000004;
8371           onChanged();
8372           return this;
8373         }
8374         /**
8375          *
8376          *
8377          * <pre>
8378          * The amount of time that a time series must fail to report new
8379          * data to be considered failing. The minimum value of this field
8380          * is 120 seconds. Larger values that are a multiple of a
8381          * minute--for example, 240 or 300 seconds--are supported.
8382          * If an invalid value is given, an
8383          * error will be returned. The `Duration.nanos` field is
8384          * ignored.
8385          * </pre>
8386          *
8387          * <code>.google.protobuf.Duration duration = 2;</code>
8388          */
clearDuration()8389         public Builder clearDuration() {
8390           bitField0_ = (bitField0_ & ~0x00000004);
8391           duration_ = null;
8392           if (durationBuilder_ != null) {
8393             durationBuilder_.dispose();
8394             durationBuilder_ = null;
8395           }
8396           onChanged();
8397           return this;
8398         }
8399         /**
8400          *
8401          *
8402          * <pre>
8403          * The amount of time that a time series must fail to report new
8404          * data to be considered failing. The minimum value of this field
8405          * is 120 seconds. Larger values that are a multiple of a
8406          * minute--for example, 240 or 300 seconds--are supported.
8407          * If an invalid value is given, an
8408          * error will be returned. The `Duration.nanos` field is
8409          * ignored.
8410          * </pre>
8411          *
8412          * <code>.google.protobuf.Duration duration = 2;</code>
8413          */
getDurationBuilder()8414         public com.google.protobuf.Duration.Builder getDurationBuilder() {
8415           bitField0_ |= 0x00000004;
8416           onChanged();
8417           return getDurationFieldBuilder().getBuilder();
8418         }
8419         /**
8420          *
8421          *
8422          * <pre>
8423          * The amount of time that a time series must fail to report new
8424          * data to be considered failing. The minimum value of this field
8425          * is 120 seconds. Larger values that are a multiple of a
8426          * minute--for example, 240 or 300 seconds--are supported.
8427          * If an invalid value is given, an
8428          * error will be returned. The `Duration.nanos` field is
8429          * ignored.
8430          * </pre>
8431          *
8432          * <code>.google.protobuf.Duration duration = 2;</code>
8433          */
getDurationOrBuilder()8434         public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
8435           if (durationBuilder_ != null) {
8436             return durationBuilder_.getMessageOrBuilder();
8437           } else {
8438             return duration_ == null
8439                 ? com.google.protobuf.Duration.getDefaultInstance()
8440                 : duration_;
8441           }
8442         }
8443         /**
8444          *
8445          *
8446          * <pre>
8447          * The amount of time that a time series must fail to report new
8448          * data to be considered failing. The minimum value of this field
8449          * is 120 seconds. Larger values that are a multiple of a
8450          * minute--for example, 240 or 300 seconds--are supported.
8451          * If an invalid value is given, an
8452          * error will be returned. The `Duration.nanos` field is
8453          * ignored.
8454          * </pre>
8455          *
8456          * <code>.google.protobuf.Duration duration = 2;</code>
8457          */
8458         private com.google.protobuf.SingleFieldBuilderV3<
8459                 com.google.protobuf.Duration,
8460                 com.google.protobuf.Duration.Builder,
8461                 com.google.protobuf.DurationOrBuilder>
getDurationFieldBuilder()8462             getDurationFieldBuilder() {
8463           if (durationBuilder_ == null) {
8464             durationBuilder_ =
8465                 new com.google.protobuf.SingleFieldBuilderV3<
8466                     com.google.protobuf.Duration,
8467                     com.google.protobuf.Duration.Builder,
8468                     com.google.protobuf.DurationOrBuilder>(
8469                     getDuration(), getParentForChildren(), isClean());
8470             duration_ = null;
8471           }
8472           return durationBuilder_;
8473         }
8474 
8475         private com.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger_;
8476         private com.google.protobuf.SingleFieldBuilderV3<
8477                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger,
8478                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder,
8479                 com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder>
8480             triggerBuilder_;
8481         /**
8482          *
8483          *
8484          * <pre>
8485          * The number/percent of time series for which the comparison must hold
8486          * in order for the condition to trigger. If unspecified, then the
8487          * condition will trigger if the comparison is true for any of the
8488          * time series that have been identified by `filter` and `aggregations`.
8489          * </pre>
8490          *
8491          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
8492          *
8493          * @return Whether the trigger field is set.
8494          */
hasTrigger()8495         public boolean hasTrigger() {
8496           return ((bitField0_ & 0x00000008) != 0);
8497         }
8498         /**
8499          *
8500          *
8501          * <pre>
8502          * The number/percent of time series for which the comparison must hold
8503          * in order for the condition to trigger. If unspecified, then the
8504          * condition will trigger if the comparison is true for any of the
8505          * time series that have been identified by `filter` and `aggregations`.
8506          * </pre>
8507          *
8508          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
8509          *
8510          * @return The trigger.
8511          */
getTrigger()8512         public com.google.monitoring.v3.AlertPolicy.Condition.Trigger getTrigger() {
8513           if (triggerBuilder_ == null) {
8514             return trigger_ == null
8515                 ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
8516                 : trigger_;
8517           } else {
8518             return triggerBuilder_.getMessage();
8519           }
8520         }
8521         /**
8522          *
8523          *
8524          * <pre>
8525          * The number/percent of time series for which the comparison must hold
8526          * in order for the condition to trigger. If unspecified, then the
8527          * condition will trigger if the comparison is true for any of the
8528          * time series that have been identified by `filter` and `aggregations`.
8529          * </pre>
8530          *
8531          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
8532          */
setTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value)8533         public Builder setTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value) {
8534           if (triggerBuilder_ == null) {
8535             if (value == null) {
8536               throw new NullPointerException();
8537             }
8538             trigger_ = value;
8539           } else {
8540             triggerBuilder_.setMessage(value);
8541           }
8542           bitField0_ |= 0x00000008;
8543           onChanged();
8544           return this;
8545         }
8546         /**
8547          *
8548          *
8549          * <pre>
8550          * The number/percent of time series for which the comparison must hold
8551          * in order for the condition to trigger. If unspecified, then the
8552          * condition will trigger if the comparison is true for any of the
8553          * time series that have been identified by `filter` and `aggregations`.
8554          * </pre>
8555          *
8556          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
8557          */
setTrigger( com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder builderForValue)8558         public Builder setTrigger(
8559             com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder builderForValue) {
8560           if (triggerBuilder_ == null) {
8561             trigger_ = builderForValue.build();
8562           } else {
8563             triggerBuilder_.setMessage(builderForValue.build());
8564           }
8565           bitField0_ |= 0x00000008;
8566           onChanged();
8567           return this;
8568         }
8569         /**
8570          *
8571          *
8572          * <pre>
8573          * The number/percent of time series for which the comparison must hold
8574          * in order for the condition to trigger. If unspecified, then the
8575          * condition will trigger if the comparison is true for any of the
8576          * time series that have been identified by `filter` and `aggregations`.
8577          * </pre>
8578          *
8579          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
8580          */
mergeTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value)8581         public Builder mergeTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value) {
8582           if (triggerBuilder_ == null) {
8583             if (((bitField0_ & 0x00000008) != 0)
8584                 && trigger_ != null
8585                 && trigger_
8586                     != com.google.monitoring.v3.AlertPolicy.Condition.Trigger
8587                         .getDefaultInstance()) {
8588               getTriggerBuilder().mergeFrom(value);
8589             } else {
8590               trigger_ = value;
8591             }
8592           } else {
8593             triggerBuilder_.mergeFrom(value);
8594           }
8595           bitField0_ |= 0x00000008;
8596           onChanged();
8597           return this;
8598         }
8599         /**
8600          *
8601          *
8602          * <pre>
8603          * The number/percent of time series for which the comparison must hold
8604          * in order for the condition to trigger. If unspecified, then the
8605          * condition will trigger if the comparison is true for any of the
8606          * time series that have been identified by `filter` and `aggregations`.
8607          * </pre>
8608          *
8609          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
8610          */
clearTrigger()8611         public Builder clearTrigger() {
8612           bitField0_ = (bitField0_ & ~0x00000008);
8613           trigger_ = null;
8614           if (triggerBuilder_ != null) {
8615             triggerBuilder_.dispose();
8616             triggerBuilder_ = null;
8617           }
8618           onChanged();
8619           return this;
8620         }
8621         /**
8622          *
8623          *
8624          * <pre>
8625          * The number/percent of time series for which the comparison must hold
8626          * in order for the condition to trigger. If unspecified, then the
8627          * condition will trigger if the comparison is true for any of the
8628          * time series that have been identified by `filter` and `aggregations`.
8629          * </pre>
8630          *
8631          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
8632          */
getTriggerBuilder()8633         public com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder getTriggerBuilder() {
8634           bitField0_ |= 0x00000008;
8635           onChanged();
8636           return getTriggerFieldBuilder().getBuilder();
8637         }
8638         /**
8639          *
8640          *
8641          * <pre>
8642          * The number/percent of time series for which the comparison must hold
8643          * in order for the condition to trigger. If unspecified, then the
8644          * condition will trigger if the comparison is true for any of the
8645          * time series that have been identified by `filter` and `aggregations`.
8646          * </pre>
8647          *
8648          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
8649          */
8650         public com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder
getTriggerOrBuilder()8651             getTriggerOrBuilder() {
8652           if (triggerBuilder_ != null) {
8653             return triggerBuilder_.getMessageOrBuilder();
8654           } else {
8655             return trigger_ == null
8656                 ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
8657                 : trigger_;
8658           }
8659         }
8660         /**
8661          *
8662          *
8663          * <pre>
8664          * The number/percent of time series for which the comparison must hold
8665          * in order for the condition to trigger. If unspecified, then the
8666          * condition will trigger if the comparison is true for any of the
8667          * time series that have been identified by `filter` and `aggregations`.
8668          * </pre>
8669          *
8670          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
8671          */
8672         private com.google.protobuf.SingleFieldBuilderV3<
8673                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger,
8674                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder,
8675                 com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder>
getTriggerFieldBuilder()8676             getTriggerFieldBuilder() {
8677           if (triggerBuilder_ == null) {
8678             triggerBuilder_ =
8679                 new com.google.protobuf.SingleFieldBuilderV3<
8680                     com.google.monitoring.v3.AlertPolicy.Condition.Trigger,
8681                     com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder,
8682                     com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder>(
8683                     getTrigger(), getParentForChildren(), isClean());
8684             trigger_ = null;
8685           }
8686           return triggerBuilder_;
8687         }
8688 
8689         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)8690         public final Builder setUnknownFields(
8691             final com.google.protobuf.UnknownFieldSet unknownFields) {
8692           return super.setUnknownFields(unknownFields);
8693         }
8694 
8695         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)8696         public final Builder mergeUnknownFields(
8697             final com.google.protobuf.UnknownFieldSet unknownFields) {
8698           return super.mergeUnknownFields(unknownFields);
8699         }
8700 
8701         // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy.Condition.MetricAbsence)
8702       }
8703 
8704       // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Condition.MetricAbsence)
8705       private static final com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence
8706           DEFAULT_INSTANCE;
8707 
8708       static {
8709         DEFAULT_INSTANCE = new com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence();
8710       }
8711 
8712       public static com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence
getDefaultInstance()8713           getDefaultInstance() {
8714         return DEFAULT_INSTANCE;
8715       }
8716 
8717       private static final com.google.protobuf.Parser<MetricAbsence> PARSER =
8718           new com.google.protobuf.AbstractParser<MetricAbsence>() {
8719             @java.lang.Override
8720             public MetricAbsence parsePartialFrom(
8721                 com.google.protobuf.CodedInputStream input,
8722                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8723                 throws com.google.protobuf.InvalidProtocolBufferException {
8724               Builder builder = newBuilder();
8725               try {
8726                 builder.mergeFrom(input, extensionRegistry);
8727               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
8728                 throw e.setUnfinishedMessage(builder.buildPartial());
8729               } catch (com.google.protobuf.UninitializedMessageException e) {
8730                 throw e.asInvalidProtocolBufferException()
8731                     .setUnfinishedMessage(builder.buildPartial());
8732               } catch (java.io.IOException e) {
8733                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
8734                     .setUnfinishedMessage(builder.buildPartial());
8735               }
8736               return builder.buildPartial();
8737             }
8738           };
8739 
parser()8740       public static com.google.protobuf.Parser<MetricAbsence> parser() {
8741         return PARSER;
8742       }
8743 
8744       @java.lang.Override
getParserForType()8745       public com.google.protobuf.Parser<MetricAbsence> getParserForType() {
8746         return PARSER;
8747       }
8748 
8749       @java.lang.Override
8750       public com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence
getDefaultInstanceForType()8751           getDefaultInstanceForType() {
8752         return DEFAULT_INSTANCE;
8753       }
8754     }
8755 
8756     public interface LogMatchOrBuilder
8757         extends
8758         // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy.Condition.LogMatch)
8759         com.google.protobuf.MessageOrBuilder {
8760 
8761       /**
8762        *
8763        *
8764        * <pre>
8765        * Required. A logs-based filter. See [Advanced Logs
8766        * Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
8767        * for how this filter should be constructed.
8768        * </pre>
8769        *
8770        * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
8771        *
8772        * @return The filter.
8773        */
getFilter()8774       java.lang.String getFilter();
8775       /**
8776        *
8777        *
8778        * <pre>
8779        * Required. A logs-based filter. See [Advanced Logs
8780        * Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
8781        * for how this filter should be constructed.
8782        * </pre>
8783        *
8784        * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
8785        *
8786        * @return The bytes for filter.
8787        */
getFilterBytes()8788       com.google.protobuf.ByteString getFilterBytes();
8789 
8790       /**
8791        *
8792        *
8793        * <pre>
8794        * Optional. A map from a label key to an extractor expression, which is
8795        * used to extract the value for this label key. Each entry in this map is
8796        * a specification for how data should be extracted from log entries that
8797        * match `filter`. Each combination of extracted values is treated as a
8798        * separate rule for the purposes of triggering notifications. Label keys
8799        * and corresponding values can be used in notifications generated by this
8800        * condition.
8801        * Please see [the documentation on logs-based metric
8802        * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
8803        * for syntax and examples.
8804        * </pre>
8805        *
8806        * <code>map&lt;string, string&gt; label_extractors = 2;</code>
8807        */
getLabelExtractorsCount()8808       int getLabelExtractorsCount();
8809       /**
8810        *
8811        *
8812        * <pre>
8813        * Optional. A map from a label key to an extractor expression, which is
8814        * used to extract the value for this label key. Each entry in this map is
8815        * a specification for how data should be extracted from log entries that
8816        * match `filter`. Each combination of extracted values is treated as a
8817        * separate rule for the purposes of triggering notifications. Label keys
8818        * and corresponding values can be used in notifications generated by this
8819        * condition.
8820        * Please see [the documentation on logs-based metric
8821        * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
8822        * for syntax and examples.
8823        * </pre>
8824        *
8825        * <code>map&lt;string, string&gt; label_extractors = 2;</code>
8826        */
containsLabelExtractors(java.lang.String key)8827       boolean containsLabelExtractors(java.lang.String key);
8828       /** Use {@link #getLabelExtractorsMap()} instead. */
8829       @java.lang.Deprecated
getLabelExtractors()8830       java.util.Map<java.lang.String, java.lang.String> getLabelExtractors();
8831       /**
8832        *
8833        *
8834        * <pre>
8835        * Optional. A map from a label key to an extractor expression, which is
8836        * used to extract the value for this label key. Each entry in this map is
8837        * a specification for how data should be extracted from log entries that
8838        * match `filter`. Each combination of extracted values is treated as a
8839        * separate rule for the purposes of triggering notifications. Label keys
8840        * and corresponding values can be used in notifications generated by this
8841        * condition.
8842        * Please see [the documentation on logs-based metric
8843        * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
8844        * for syntax and examples.
8845        * </pre>
8846        *
8847        * <code>map&lt;string, string&gt; label_extractors = 2;</code>
8848        */
getLabelExtractorsMap()8849       java.util.Map<java.lang.String, java.lang.String> getLabelExtractorsMap();
8850       /**
8851        *
8852        *
8853        * <pre>
8854        * Optional. A map from a label key to an extractor expression, which is
8855        * used to extract the value for this label key. Each entry in this map is
8856        * a specification for how data should be extracted from log entries that
8857        * match `filter`. Each combination of extracted values is treated as a
8858        * separate rule for the purposes of triggering notifications. Label keys
8859        * and corresponding values can be used in notifications generated by this
8860        * condition.
8861        * Please see [the documentation on logs-based metric
8862        * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
8863        * for syntax and examples.
8864        * </pre>
8865        *
8866        * <code>map&lt;string, string&gt; label_extractors = 2;</code>
8867        */
8868       /* nullable */
getLabelExtractorsOrDefault( java.lang.String key, java.lang.String defaultValue)8869       java.lang.String getLabelExtractorsOrDefault(
8870           java.lang.String key,
8871           /* nullable */
8872           java.lang.String defaultValue);
8873       /**
8874        *
8875        *
8876        * <pre>
8877        * Optional. A map from a label key to an extractor expression, which is
8878        * used to extract the value for this label key. Each entry in this map is
8879        * a specification for how data should be extracted from log entries that
8880        * match `filter`. Each combination of extracted values is treated as a
8881        * separate rule for the purposes of triggering notifications. Label keys
8882        * and corresponding values can be used in notifications generated by this
8883        * condition.
8884        * Please see [the documentation on logs-based metric
8885        * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
8886        * for syntax and examples.
8887        * </pre>
8888        *
8889        * <code>map&lt;string, string&gt; label_extractors = 2;</code>
8890        */
getLabelExtractorsOrThrow(java.lang.String key)8891       java.lang.String getLabelExtractorsOrThrow(java.lang.String key);
8892     }
8893     /**
8894      *
8895      *
8896      * <pre>
8897      * A condition type that checks whether a log message in the [scoping
8898      * project](https://cloud.google.com/monitoring/api/v3#project_name)
8899      * satisfies the given filter. Logs from other projects in the metrics
8900      * scope are not evaluated.
8901      * </pre>
8902      *
8903      * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition.LogMatch}
8904      */
8905     public static final class LogMatch extends com.google.protobuf.GeneratedMessageV3
8906         implements
8907         // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy.Condition.LogMatch)
8908         LogMatchOrBuilder {
8909       private static final long serialVersionUID = 0L;
8910       // Use LogMatch.newBuilder() to construct.
LogMatch(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)8911       private LogMatch(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
8912         super(builder);
8913       }
8914 
LogMatch()8915       private LogMatch() {
8916         filter_ = "";
8917       }
8918 
8919       @java.lang.Override
8920       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)8921       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
8922         return new LogMatch();
8923       }
8924 
8925       @java.lang.Override
getUnknownFields()8926       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
8927         return this.unknownFields;
8928       }
8929 
getDescriptor()8930       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
8931         return com.google.monitoring.v3.AlertProto
8932             .internal_static_google_monitoring_v3_AlertPolicy_Condition_LogMatch_descriptor;
8933       }
8934 
8935       @SuppressWarnings({"rawtypes"})
8936       @java.lang.Override
internalGetMapField(int number)8937       protected com.google.protobuf.MapField internalGetMapField(int number) {
8938         switch (number) {
8939           case 2:
8940             return internalGetLabelExtractors();
8941           default:
8942             throw new RuntimeException("Invalid map field number: " + number);
8943         }
8944       }
8945 
8946       @java.lang.Override
8947       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()8948           internalGetFieldAccessorTable() {
8949         return com.google.monitoring.v3.AlertProto
8950             .internal_static_google_monitoring_v3_AlertPolicy_Condition_LogMatch_fieldAccessorTable
8951             .ensureFieldAccessorsInitialized(
8952                 com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.class,
8953                 com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.Builder.class);
8954       }
8955 
8956       public static final int FILTER_FIELD_NUMBER = 1;
8957 
8958       @SuppressWarnings("serial")
8959       private volatile java.lang.Object filter_ = "";
8960       /**
8961        *
8962        *
8963        * <pre>
8964        * Required. A logs-based filter. See [Advanced Logs
8965        * Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
8966        * for how this filter should be constructed.
8967        * </pre>
8968        *
8969        * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
8970        *
8971        * @return The filter.
8972        */
8973       @java.lang.Override
getFilter()8974       public java.lang.String getFilter() {
8975         java.lang.Object ref = filter_;
8976         if (ref instanceof java.lang.String) {
8977           return (java.lang.String) ref;
8978         } else {
8979           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
8980           java.lang.String s = bs.toStringUtf8();
8981           filter_ = s;
8982           return s;
8983         }
8984       }
8985       /**
8986        *
8987        *
8988        * <pre>
8989        * Required. A logs-based filter. See [Advanced Logs
8990        * Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
8991        * for how this filter should be constructed.
8992        * </pre>
8993        *
8994        * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
8995        *
8996        * @return The bytes for filter.
8997        */
8998       @java.lang.Override
getFilterBytes()8999       public com.google.protobuf.ByteString getFilterBytes() {
9000         java.lang.Object ref = filter_;
9001         if (ref instanceof java.lang.String) {
9002           com.google.protobuf.ByteString b =
9003               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
9004           filter_ = b;
9005           return b;
9006         } else {
9007           return (com.google.protobuf.ByteString) ref;
9008         }
9009       }
9010 
9011       public static final int LABEL_EXTRACTORS_FIELD_NUMBER = 2;
9012 
9013       private static final class LabelExtractorsDefaultEntryHolder {
9014         static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
9015             com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
9016                 com.google.monitoring.v3.AlertProto
9017                     .internal_static_google_monitoring_v3_AlertPolicy_Condition_LogMatch_LabelExtractorsEntry_descriptor,
9018                 com.google.protobuf.WireFormat.FieldType.STRING,
9019                 "",
9020                 com.google.protobuf.WireFormat.FieldType.STRING,
9021                 "");
9022       }
9023 
9024       @SuppressWarnings("serial")
9025       private com.google.protobuf.MapField<java.lang.String, java.lang.String> labelExtractors_;
9026 
9027       private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetLabelExtractors()9028           internalGetLabelExtractors() {
9029         if (labelExtractors_ == null) {
9030           return com.google.protobuf.MapField.emptyMapField(
9031               LabelExtractorsDefaultEntryHolder.defaultEntry);
9032         }
9033         return labelExtractors_;
9034       }
9035 
getLabelExtractorsCount()9036       public int getLabelExtractorsCount() {
9037         return internalGetLabelExtractors().getMap().size();
9038       }
9039       /**
9040        *
9041        *
9042        * <pre>
9043        * Optional. A map from a label key to an extractor expression, which is
9044        * used to extract the value for this label key. Each entry in this map is
9045        * a specification for how data should be extracted from log entries that
9046        * match `filter`. Each combination of extracted values is treated as a
9047        * separate rule for the purposes of triggering notifications. Label keys
9048        * and corresponding values can be used in notifications generated by this
9049        * condition.
9050        * Please see [the documentation on logs-based metric
9051        * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9052        * for syntax and examples.
9053        * </pre>
9054        *
9055        * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9056        */
9057       @java.lang.Override
containsLabelExtractors(java.lang.String key)9058       public boolean containsLabelExtractors(java.lang.String key) {
9059         if (key == null) {
9060           throw new NullPointerException("map key");
9061         }
9062         return internalGetLabelExtractors().getMap().containsKey(key);
9063       }
9064       /** Use {@link #getLabelExtractorsMap()} instead. */
9065       @java.lang.Override
9066       @java.lang.Deprecated
getLabelExtractors()9067       public java.util.Map<java.lang.String, java.lang.String> getLabelExtractors() {
9068         return getLabelExtractorsMap();
9069       }
9070       /**
9071        *
9072        *
9073        * <pre>
9074        * Optional. A map from a label key to an extractor expression, which is
9075        * used to extract the value for this label key. Each entry in this map is
9076        * a specification for how data should be extracted from log entries that
9077        * match `filter`. Each combination of extracted values is treated as a
9078        * separate rule for the purposes of triggering notifications. Label keys
9079        * and corresponding values can be used in notifications generated by this
9080        * condition.
9081        * Please see [the documentation on logs-based metric
9082        * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9083        * for syntax and examples.
9084        * </pre>
9085        *
9086        * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9087        */
9088       @java.lang.Override
getLabelExtractorsMap()9089       public java.util.Map<java.lang.String, java.lang.String> getLabelExtractorsMap() {
9090         return internalGetLabelExtractors().getMap();
9091       }
9092       /**
9093        *
9094        *
9095        * <pre>
9096        * Optional. A map from a label key to an extractor expression, which is
9097        * used to extract the value for this label key. Each entry in this map is
9098        * a specification for how data should be extracted from log entries that
9099        * match `filter`. Each combination of extracted values is treated as a
9100        * separate rule for the purposes of triggering notifications. Label keys
9101        * and corresponding values can be used in notifications generated by this
9102        * condition.
9103        * Please see [the documentation on logs-based metric
9104        * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9105        * for syntax and examples.
9106        * </pre>
9107        *
9108        * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9109        */
9110       @java.lang.Override
getLabelExtractorsOrDefault( java.lang.String key, java.lang.String defaultValue)9111       public /* nullable */ java.lang.String getLabelExtractorsOrDefault(
9112           java.lang.String key,
9113           /* nullable */
9114           java.lang.String defaultValue) {
9115         if (key == null) {
9116           throw new NullPointerException("map key");
9117         }
9118         java.util.Map<java.lang.String, java.lang.String> map =
9119             internalGetLabelExtractors().getMap();
9120         return map.containsKey(key) ? map.get(key) : defaultValue;
9121       }
9122       /**
9123        *
9124        *
9125        * <pre>
9126        * Optional. A map from a label key to an extractor expression, which is
9127        * used to extract the value for this label key. Each entry in this map is
9128        * a specification for how data should be extracted from log entries that
9129        * match `filter`. Each combination of extracted values is treated as a
9130        * separate rule for the purposes of triggering notifications. Label keys
9131        * and corresponding values can be used in notifications generated by this
9132        * condition.
9133        * Please see [the documentation on logs-based metric
9134        * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9135        * for syntax and examples.
9136        * </pre>
9137        *
9138        * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9139        */
9140       @java.lang.Override
getLabelExtractorsOrThrow(java.lang.String key)9141       public java.lang.String getLabelExtractorsOrThrow(java.lang.String key) {
9142         if (key == null) {
9143           throw new NullPointerException("map key");
9144         }
9145         java.util.Map<java.lang.String, java.lang.String> map =
9146             internalGetLabelExtractors().getMap();
9147         if (!map.containsKey(key)) {
9148           throw new java.lang.IllegalArgumentException();
9149         }
9150         return map.get(key);
9151       }
9152 
9153       private byte memoizedIsInitialized = -1;
9154 
9155       @java.lang.Override
isInitialized()9156       public final boolean isInitialized() {
9157         byte isInitialized = memoizedIsInitialized;
9158         if (isInitialized == 1) return true;
9159         if (isInitialized == 0) return false;
9160 
9161         memoizedIsInitialized = 1;
9162         return true;
9163       }
9164 
9165       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)9166       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
9167         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
9168           com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_);
9169         }
9170         com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
9171             output,
9172             internalGetLabelExtractors(),
9173             LabelExtractorsDefaultEntryHolder.defaultEntry,
9174             2);
9175         getUnknownFields().writeTo(output);
9176       }
9177 
9178       @java.lang.Override
getSerializedSize()9179       public int getSerializedSize() {
9180         int size = memoizedSize;
9181         if (size != -1) return size;
9182 
9183         size = 0;
9184         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
9185           size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_);
9186         }
9187         for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
9188             internalGetLabelExtractors().getMap().entrySet()) {
9189           com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labelExtractors__ =
9190               LabelExtractorsDefaultEntryHolder.defaultEntry
9191                   .newBuilderForType()
9192                   .setKey(entry.getKey())
9193                   .setValue(entry.getValue())
9194                   .build();
9195           size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labelExtractors__);
9196         }
9197         size += getUnknownFields().getSerializedSize();
9198         memoizedSize = size;
9199         return size;
9200       }
9201 
9202       @java.lang.Override
equals(final java.lang.Object obj)9203       public boolean equals(final java.lang.Object obj) {
9204         if (obj == this) {
9205           return true;
9206         }
9207         if (!(obj instanceof com.google.monitoring.v3.AlertPolicy.Condition.LogMatch)) {
9208           return super.equals(obj);
9209         }
9210         com.google.monitoring.v3.AlertPolicy.Condition.LogMatch other =
9211             (com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) obj;
9212 
9213         if (!getFilter().equals(other.getFilter())) return false;
9214         if (!internalGetLabelExtractors().equals(other.internalGetLabelExtractors())) return false;
9215         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
9216         return true;
9217       }
9218 
9219       @java.lang.Override
hashCode()9220       public int hashCode() {
9221         if (memoizedHashCode != 0) {
9222           return memoizedHashCode;
9223         }
9224         int hash = 41;
9225         hash = (19 * hash) + getDescriptor().hashCode();
9226         hash = (37 * hash) + FILTER_FIELD_NUMBER;
9227         hash = (53 * hash) + getFilter().hashCode();
9228         if (!internalGetLabelExtractors().getMap().isEmpty()) {
9229           hash = (37 * hash) + LABEL_EXTRACTORS_FIELD_NUMBER;
9230           hash = (53 * hash) + internalGetLabelExtractors().hashCode();
9231         }
9232         hash = (29 * hash) + getUnknownFields().hashCode();
9233         memoizedHashCode = hash;
9234         return hash;
9235       }
9236 
parseFrom( java.nio.ByteBuffer data)9237       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(
9238           java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
9239         return PARSER.parseFrom(data);
9240       }
9241 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)9242       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(
9243           java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9244           throws com.google.protobuf.InvalidProtocolBufferException {
9245         return PARSER.parseFrom(data, extensionRegistry);
9246       }
9247 
parseFrom( com.google.protobuf.ByteString data)9248       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(
9249           com.google.protobuf.ByteString data)
9250           throws com.google.protobuf.InvalidProtocolBufferException {
9251         return PARSER.parseFrom(data);
9252       }
9253 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)9254       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(
9255           com.google.protobuf.ByteString data,
9256           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9257           throws com.google.protobuf.InvalidProtocolBufferException {
9258         return PARSER.parseFrom(data, extensionRegistry);
9259       }
9260 
parseFrom(byte[] data)9261       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(byte[] data)
9262           throws com.google.protobuf.InvalidProtocolBufferException {
9263         return PARSER.parseFrom(data);
9264       }
9265 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)9266       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(
9267           byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9268           throws com.google.protobuf.InvalidProtocolBufferException {
9269         return PARSER.parseFrom(data, extensionRegistry);
9270       }
9271 
parseFrom( java.io.InputStream input)9272       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(
9273           java.io.InputStream input) throws java.io.IOException {
9274         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
9275       }
9276 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)9277       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(
9278           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9279           throws java.io.IOException {
9280         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
9281             PARSER, input, extensionRegistry);
9282       }
9283 
parseDelimitedFrom( java.io.InputStream input)9284       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseDelimitedFrom(
9285           java.io.InputStream input) throws java.io.IOException {
9286         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
9287       }
9288 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)9289       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseDelimitedFrom(
9290           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9291           throws java.io.IOException {
9292         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
9293             PARSER, input, extensionRegistry);
9294       }
9295 
parseFrom( com.google.protobuf.CodedInputStream input)9296       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(
9297           com.google.protobuf.CodedInputStream input) throws java.io.IOException {
9298         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
9299       }
9300 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)9301       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch parseFrom(
9302           com.google.protobuf.CodedInputStream input,
9303           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9304           throws java.io.IOException {
9305         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
9306             PARSER, input, extensionRegistry);
9307       }
9308 
9309       @java.lang.Override
newBuilderForType()9310       public Builder newBuilderForType() {
9311         return newBuilder();
9312       }
9313 
newBuilder()9314       public static Builder newBuilder() {
9315         return DEFAULT_INSTANCE.toBuilder();
9316       }
9317 
newBuilder( com.google.monitoring.v3.AlertPolicy.Condition.LogMatch prototype)9318       public static Builder newBuilder(
9319           com.google.monitoring.v3.AlertPolicy.Condition.LogMatch prototype) {
9320         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
9321       }
9322 
9323       @java.lang.Override
toBuilder()9324       public Builder toBuilder() {
9325         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
9326       }
9327 
9328       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)9329       protected Builder newBuilderForType(
9330           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
9331         Builder builder = new Builder(parent);
9332         return builder;
9333       }
9334       /**
9335        *
9336        *
9337        * <pre>
9338        * A condition type that checks whether a log message in the [scoping
9339        * project](https://cloud.google.com/monitoring/api/v3#project_name)
9340        * satisfies the given filter. Logs from other projects in the metrics
9341        * scope are not evaluated.
9342        * </pre>
9343        *
9344        * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition.LogMatch}
9345        */
9346       public static final class Builder
9347           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
9348           implements
9349           // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy.Condition.LogMatch)
9350           com.google.monitoring.v3.AlertPolicy.Condition.LogMatchOrBuilder {
getDescriptor()9351         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
9352           return com.google.monitoring.v3.AlertProto
9353               .internal_static_google_monitoring_v3_AlertPolicy_Condition_LogMatch_descriptor;
9354         }
9355 
9356         @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)9357         protected com.google.protobuf.MapField internalGetMapField(int number) {
9358           switch (number) {
9359             case 2:
9360               return internalGetLabelExtractors();
9361             default:
9362               throw new RuntimeException("Invalid map field number: " + number);
9363           }
9364         }
9365 
9366         @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)9367         protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
9368           switch (number) {
9369             case 2:
9370               return internalGetMutableLabelExtractors();
9371             default:
9372               throw new RuntimeException("Invalid map field number: " + number);
9373           }
9374         }
9375 
9376         @java.lang.Override
9377         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()9378             internalGetFieldAccessorTable() {
9379           return com.google.monitoring.v3.AlertProto
9380               .internal_static_google_monitoring_v3_AlertPolicy_Condition_LogMatch_fieldAccessorTable
9381               .ensureFieldAccessorsInitialized(
9382                   com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.class,
9383                   com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.Builder.class);
9384         }
9385 
9386         // Construct using com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.newBuilder()
Builder()9387         private Builder() {}
9388 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)9389         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
9390           super(parent);
9391         }
9392 
9393         @java.lang.Override
clear()9394         public Builder clear() {
9395           super.clear();
9396           bitField0_ = 0;
9397           filter_ = "";
9398           internalGetMutableLabelExtractors().clear();
9399           return this;
9400         }
9401 
9402         @java.lang.Override
getDescriptorForType()9403         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
9404           return com.google.monitoring.v3.AlertProto
9405               .internal_static_google_monitoring_v3_AlertPolicy_Condition_LogMatch_descriptor;
9406         }
9407 
9408         @java.lang.Override
getDefaultInstanceForType()9409         public com.google.monitoring.v3.AlertPolicy.Condition.LogMatch getDefaultInstanceForType() {
9410           return com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.getDefaultInstance();
9411         }
9412 
9413         @java.lang.Override
build()9414         public com.google.monitoring.v3.AlertPolicy.Condition.LogMatch build() {
9415           com.google.monitoring.v3.AlertPolicy.Condition.LogMatch result = buildPartial();
9416           if (!result.isInitialized()) {
9417             throw newUninitializedMessageException(result);
9418           }
9419           return result;
9420         }
9421 
9422         @java.lang.Override
buildPartial()9423         public com.google.monitoring.v3.AlertPolicy.Condition.LogMatch buildPartial() {
9424           com.google.monitoring.v3.AlertPolicy.Condition.LogMatch result =
9425               new com.google.monitoring.v3.AlertPolicy.Condition.LogMatch(this);
9426           if (bitField0_ != 0) {
9427             buildPartial0(result);
9428           }
9429           onBuilt();
9430           return result;
9431         }
9432 
buildPartial0(com.google.monitoring.v3.AlertPolicy.Condition.LogMatch result)9433         private void buildPartial0(com.google.monitoring.v3.AlertPolicy.Condition.LogMatch result) {
9434           int from_bitField0_ = bitField0_;
9435           if (((from_bitField0_ & 0x00000001) != 0)) {
9436             result.filter_ = filter_;
9437           }
9438           if (((from_bitField0_ & 0x00000002) != 0)) {
9439             result.labelExtractors_ = internalGetLabelExtractors();
9440             result.labelExtractors_.makeImmutable();
9441           }
9442         }
9443 
9444         @java.lang.Override
clone()9445         public Builder clone() {
9446           return super.clone();
9447         }
9448 
9449         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)9450         public Builder setField(
9451             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
9452           return super.setField(field, value);
9453         }
9454 
9455         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)9456         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
9457           return super.clearField(field);
9458         }
9459 
9460         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)9461         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
9462           return super.clearOneof(oneof);
9463         }
9464 
9465         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)9466         public Builder setRepeatedField(
9467             com.google.protobuf.Descriptors.FieldDescriptor field,
9468             int index,
9469             java.lang.Object value) {
9470           return super.setRepeatedField(field, index, value);
9471         }
9472 
9473         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)9474         public Builder addRepeatedField(
9475             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
9476           return super.addRepeatedField(field, value);
9477         }
9478 
9479         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)9480         public Builder mergeFrom(com.google.protobuf.Message other) {
9481           if (other instanceof com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) {
9482             return mergeFrom((com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) other);
9483           } else {
9484             super.mergeFrom(other);
9485             return this;
9486           }
9487         }
9488 
mergeFrom(com.google.monitoring.v3.AlertPolicy.Condition.LogMatch other)9489         public Builder mergeFrom(com.google.monitoring.v3.AlertPolicy.Condition.LogMatch other) {
9490           if (other == com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.getDefaultInstance())
9491             return this;
9492           if (!other.getFilter().isEmpty()) {
9493             filter_ = other.filter_;
9494             bitField0_ |= 0x00000001;
9495             onChanged();
9496           }
9497           internalGetMutableLabelExtractors().mergeFrom(other.internalGetLabelExtractors());
9498           bitField0_ |= 0x00000002;
9499           this.mergeUnknownFields(other.getUnknownFields());
9500           onChanged();
9501           return this;
9502         }
9503 
9504         @java.lang.Override
isInitialized()9505         public final boolean isInitialized() {
9506           return true;
9507         }
9508 
9509         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)9510         public Builder mergeFrom(
9511             com.google.protobuf.CodedInputStream input,
9512             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9513             throws java.io.IOException {
9514           if (extensionRegistry == null) {
9515             throw new java.lang.NullPointerException();
9516           }
9517           try {
9518             boolean done = false;
9519             while (!done) {
9520               int tag = input.readTag();
9521               switch (tag) {
9522                 case 0:
9523                   done = true;
9524                   break;
9525                 case 10:
9526                   {
9527                     filter_ = input.readStringRequireUtf8();
9528                     bitField0_ |= 0x00000001;
9529                     break;
9530                   } // case 10
9531                 case 18:
9532                   {
9533                     com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
9534                         labelExtractors__ =
9535                             input.readMessage(
9536                                 LabelExtractorsDefaultEntryHolder.defaultEntry.getParserForType(),
9537                                 extensionRegistry);
9538                     internalGetMutableLabelExtractors()
9539                         .getMutableMap()
9540                         .put(labelExtractors__.getKey(), labelExtractors__.getValue());
9541                     bitField0_ |= 0x00000002;
9542                     break;
9543                   } // case 18
9544                 default:
9545                   {
9546                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
9547                       done = true; // was an endgroup tag
9548                     }
9549                     break;
9550                   } // default:
9551               } // switch (tag)
9552             } // while (!done)
9553           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
9554             throw e.unwrapIOException();
9555           } finally {
9556             onChanged();
9557           } // finally
9558           return this;
9559         }
9560 
9561         private int bitField0_;
9562 
9563         private java.lang.Object filter_ = "";
9564         /**
9565          *
9566          *
9567          * <pre>
9568          * Required. A logs-based filter. See [Advanced Logs
9569          * Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
9570          * for how this filter should be constructed.
9571          * </pre>
9572          *
9573          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
9574          *
9575          * @return The filter.
9576          */
getFilter()9577         public java.lang.String getFilter() {
9578           java.lang.Object ref = filter_;
9579           if (!(ref instanceof java.lang.String)) {
9580             com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
9581             java.lang.String s = bs.toStringUtf8();
9582             filter_ = s;
9583             return s;
9584           } else {
9585             return (java.lang.String) ref;
9586           }
9587         }
9588         /**
9589          *
9590          *
9591          * <pre>
9592          * Required. A logs-based filter. See [Advanced Logs
9593          * Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
9594          * for how this filter should be constructed.
9595          * </pre>
9596          *
9597          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
9598          *
9599          * @return The bytes for filter.
9600          */
getFilterBytes()9601         public com.google.protobuf.ByteString getFilterBytes() {
9602           java.lang.Object ref = filter_;
9603           if (ref instanceof String) {
9604             com.google.protobuf.ByteString b =
9605                 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
9606             filter_ = b;
9607             return b;
9608           } else {
9609             return (com.google.protobuf.ByteString) ref;
9610           }
9611         }
9612         /**
9613          *
9614          *
9615          * <pre>
9616          * Required. A logs-based filter. See [Advanced Logs
9617          * Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
9618          * for how this filter should be constructed.
9619          * </pre>
9620          *
9621          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
9622          *
9623          * @param value The filter to set.
9624          * @return This builder for chaining.
9625          */
setFilter(java.lang.String value)9626         public Builder setFilter(java.lang.String value) {
9627           if (value == null) {
9628             throw new NullPointerException();
9629           }
9630           filter_ = value;
9631           bitField0_ |= 0x00000001;
9632           onChanged();
9633           return this;
9634         }
9635         /**
9636          *
9637          *
9638          * <pre>
9639          * Required. A logs-based filter. See [Advanced Logs
9640          * Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
9641          * for how this filter should be constructed.
9642          * </pre>
9643          *
9644          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
9645          *
9646          * @return This builder for chaining.
9647          */
clearFilter()9648         public Builder clearFilter() {
9649           filter_ = getDefaultInstance().getFilter();
9650           bitField0_ = (bitField0_ & ~0x00000001);
9651           onChanged();
9652           return this;
9653         }
9654         /**
9655          *
9656          *
9657          * <pre>
9658          * Required. A logs-based filter. See [Advanced Logs
9659          * Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
9660          * for how this filter should be constructed.
9661          * </pre>
9662          *
9663          * <code>string filter = 1 [(.google.api.field_behavior) = REQUIRED];</code>
9664          *
9665          * @param value The bytes for filter to set.
9666          * @return This builder for chaining.
9667          */
setFilterBytes(com.google.protobuf.ByteString value)9668         public Builder setFilterBytes(com.google.protobuf.ByteString value) {
9669           if (value == null) {
9670             throw new NullPointerException();
9671           }
9672           checkByteStringIsUtf8(value);
9673           filter_ = value;
9674           bitField0_ |= 0x00000001;
9675           onChanged();
9676           return this;
9677         }
9678 
9679         private com.google.protobuf.MapField<java.lang.String, java.lang.String> labelExtractors_;
9680 
9681         private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetLabelExtractors()9682             internalGetLabelExtractors() {
9683           if (labelExtractors_ == null) {
9684             return com.google.protobuf.MapField.emptyMapField(
9685                 LabelExtractorsDefaultEntryHolder.defaultEntry);
9686           }
9687           return labelExtractors_;
9688         }
9689 
9690         private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableLabelExtractors()9691             internalGetMutableLabelExtractors() {
9692           if (labelExtractors_ == null) {
9693             labelExtractors_ =
9694                 com.google.protobuf.MapField.newMapField(
9695                     LabelExtractorsDefaultEntryHolder.defaultEntry);
9696           }
9697           if (!labelExtractors_.isMutable()) {
9698             labelExtractors_ = labelExtractors_.copy();
9699           }
9700           bitField0_ |= 0x00000002;
9701           onChanged();
9702           return labelExtractors_;
9703         }
9704 
getLabelExtractorsCount()9705         public int getLabelExtractorsCount() {
9706           return internalGetLabelExtractors().getMap().size();
9707         }
9708         /**
9709          *
9710          *
9711          * <pre>
9712          * Optional. A map from a label key to an extractor expression, which is
9713          * used to extract the value for this label key. Each entry in this map is
9714          * a specification for how data should be extracted from log entries that
9715          * match `filter`. Each combination of extracted values is treated as a
9716          * separate rule for the purposes of triggering notifications. Label keys
9717          * and corresponding values can be used in notifications generated by this
9718          * condition.
9719          * Please see [the documentation on logs-based metric
9720          * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9721          * for syntax and examples.
9722          * </pre>
9723          *
9724          * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9725          */
9726         @java.lang.Override
containsLabelExtractors(java.lang.String key)9727         public boolean containsLabelExtractors(java.lang.String key) {
9728           if (key == null) {
9729             throw new NullPointerException("map key");
9730           }
9731           return internalGetLabelExtractors().getMap().containsKey(key);
9732         }
9733         /** Use {@link #getLabelExtractorsMap()} instead. */
9734         @java.lang.Override
9735         @java.lang.Deprecated
getLabelExtractors()9736         public java.util.Map<java.lang.String, java.lang.String> getLabelExtractors() {
9737           return getLabelExtractorsMap();
9738         }
9739         /**
9740          *
9741          *
9742          * <pre>
9743          * Optional. A map from a label key to an extractor expression, which is
9744          * used to extract the value for this label key. Each entry in this map is
9745          * a specification for how data should be extracted from log entries that
9746          * match `filter`. Each combination of extracted values is treated as a
9747          * separate rule for the purposes of triggering notifications. Label keys
9748          * and corresponding values can be used in notifications generated by this
9749          * condition.
9750          * Please see [the documentation on logs-based metric
9751          * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9752          * for syntax and examples.
9753          * </pre>
9754          *
9755          * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9756          */
9757         @java.lang.Override
getLabelExtractorsMap()9758         public java.util.Map<java.lang.String, java.lang.String> getLabelExtractorsMap() {
9759           return internalGetLabelExtractors().getMap();
9760         }
9761         /**
9762          *
9763          *
9764          * <pre>
9765          * Optional. A map from a label key to an extractor expression, which is
9766          * used to extract the value for this label key. Each entry in this map is
9767          * a specification for how data should be extracted from log entries that
9768          * match `filter`. Each combination of extracted values is treated as a
9769          * separate rule for the purposes of triggering notifications. Label keys
9770          * and corresponding values can be used in notifications generated by this
9771          * condition.
9772          * Please see [the documentation on logs-based metric
9773          * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9774          * for syntax and examples.
9775          * </pre>
9776          *
9777          * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9778          */
9779         @java.lang.Override
getLabelExtractorsOrDefault( java.lang.String key, java.lang.String defaultValue)9780         public /* nullable */ java.lang.String getLabelExtractorsOrDefault(
9781             java.lang.String key,
9782             /* nullable */
9783             java.lang.String defaultValue) {
9784           if (key == null) {
9785             throw new NullPointerException("map key");
9786           }
9787           java.util.Map<java.lang.String, java.lang.String> map =
9788               internalGetLabelExtractors().getMap();
9789           return map.containsKey(key) ? map.get(key) : defaultValue;
9790         }
9791         /**
9792          *
9793          *
9794          * <pre>
9795          * Optional. A map from a label key to an extractor expression, which is
9796          * used to extract the value for this label key. Each entry in this map is
9797          * a specification for how data should be extracted from log entries that
9798          * match `filter`. Each combination of extracted values is treated as a
9799          * separate rule for the purposes of triggering notifications. Label keys
9800          * and corresponding values can be used in notifications generated by this
9801          * condition.
9802          * Please see [the documentation on logs-based metric
9803          * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9804          * for syntax and examples.
9805          * </pre>
9806          *
9807          * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9808          */
9809         @java.lang.Override
getLabelExtractorsOrThrow(java.lang.String key)9810         public java.lang.String getLabelExtractorsOrThrow(java.lang.String key) {
9811           if (key == null) {
9812             throw new NullPointerException("map key");
9813           }
9814           java.util.Map<java.lang.String, java.lang.String> map =
9815               internalGetLabelExtractors().getMap();
9816           if (!map.containsKey(key)) {
9817             throw new java.lang.IllegalArgumentException();
9818           }
9819           return map.get(key);
9820         }
9821 
clearLabelExtractors()9822         public Builder clearLabelExtractors() {
9823           bitField0_ = (bitField0_ & ~0x00000002);
9824           internalGetMutableLabelExtractors().getMutableMap().clear();
9825           return this;
9826         }
9827         /**
9828          *
9829          *
9830          * <pre>
9831          * Optional. A map from a label key to an extractor expression, which is
9832          * used to extract the value for this label key. Each entry in this map is
9833          * a specification for how data should be extracted from log entries that
9834          * match `filter`. Each combination of extracted values is treated as a
9835          * separate rule for the purposes of triggering notifications. Label keys
9836          * and corresponding values can be used in notifications generated by this
9837          * condition.
9838          * Please see [the documentation on logs-based metric
9839          * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9840          * for syntax and examples.
9841          * </pre>
9842          *
9843          * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9844          */
removeLabelExtractors(java.lang.String key)9845         public Builder removeLabelExtractors(java.lang.String key) {
9846           if (key == null) {
9847             throw new NullPointerException("map key");
9848           }
9849           internalGetMutableLabelExtractors().getMutableMap().remove(key);
9850           return this;
9851         }
9852         /** Use alternate mutation accessors instead. */
9853         @java.lang.Deprecated
getMutableLabelExtractors()9854         public java.util.Map<java.lang.String, java.lang.String> getMutableLabelExtractors() {
9855           bitField0_ |= 0x00000002;
9856           return internalGetMutableLabelExtractors().getMutableMap();
9857         }
9858         /**
9859          *
9860          *
9861          * <pre>
9862          * Optional. A map from a label key to an extractor expression, which is
9863          * used to extract the value for this label key. Each entry in this map is
9864          * a specification for how data should be extracted from log entries that
9865          * match `filter`. Each combination of extracted values is treated as a
9866          * separate rule for the purposes of triggering notifications. Label keys
9867          * and corresponding values can be used in notifications generated by this
9868          * condition.
9869          * Please see [the documentation on logs-based metric
9870          * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9871          * for syntax and examples.
9872          * </pre>
9873          *
9874          * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9875          */
putLabelExtractors(java.lang.String key, java.lang.String value)9876         public Builder putLabelExtractors(java.lang.String key, java.lang.String value) {
9877           if (key == null) {
9878             throw new NullPointerException("map key");
9879           }
9880           if (value == null) {
9881             throw new NullPointerException("map value");
9882           }
9883           internalGetMutableLabelExtractors().getMutableMap().put(key, value);
9884           bitField0_ |= 0x00000002;
9885           return this;
9886         }
9887         /**
9888          *
9889          *
9890          * <pre>
9891          * Optional. A map from a label key to an extractor expression, which is
9892          * used to extract the value for this label key. Each entry in this map is
9893          * a specification for how data should be extracted from log entries that
9894          * match `filter`. Each combination of extracted values is treated as a
9895          * separate rule for the purposes of triggering notifications. Label keys
9896          * and corresponding values can be used in notifications generated by this
9897          * condition.
9898          * Please see [the documentation on logs-based metric
9899          * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
9900          * for syntax and examples.
9901          * </pre>
9902          *
9903          * <code>map&lt;string, string&gt; label_extractors = 2;</code>
9904          */
putAllLabelExtractors( java.util.Map<java.lang.String, java.lang.String> values)9905         public Builder putAllLabelExtractors(
9906             java.util.Map<java.lang.String, java.lang.String> values) {
9907           internalGetMutableLabelExtractors().getMutableMap().putAll(values);
9908           bitField0_ |= 0x00000002;
9909           return this;
9910         }
9911 
9912         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)9913         public final Builder setUnknownFields(
9914             final com.google.protobuf.UnknownFieldSet unknownFields) {
9915           return super.setUnknownFields(unknownFields);
9916         }
9917 
9918         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)9919         public final Builder mergeUnknownFields(
9920             final com.google.protobuf.UnknownFieldSet unknownFields) {
9921           return super.mergeUnknownFields(unknownFields);
9922         }
9923 
9924         // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy.Condition.LogMatch)
9925       }
9926 
9927       // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Condition.LogMatch)
9928       private static final com.google.monitoring.v3.AlertPolicy.Condition.LogMatch DEFAULT_INSTANCE;
9929 
9930       static {
9931         DEFAULT_INSTANCE = new com.google.monitoring.v3.AlertPolicy.Condition.LogMatch();
9932       }
9933 
getDefaultInstance()9934       public static com.google.monitoring.v3.AlertPolicy.Condition.LogMatch getDefaultInstance() {
9935         return DEFAULT_INSTANCE;
9936       }
9937 
9938       private static final com.google.protobuf.Parser<LogMatch> PARSER =
9939           new com.google.protobuf.AbstractParser<LogMatch>() {
9940             @java.lang.Override
9941             public LogMatch parsePartialFrom(
9942                 com.google.protobuf.CodedInputStream input,
9943                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
9944                 throws com.google.protobuf.InvalidProtocolBufferException {
9945               Builder builder = newBuilder();
9946               try {
9947                 builder.mergeFrom(input, extensionRegistry);
9948               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
9949                 throw e.setUnfinishedMessage(builder.buildPartial());
9950               } catch (com.google.protobuf.UninitializedMessageException e) {
9951                 throw e.asInvalidProtocolBufferException()
9952                     .setUnfinishedMessage(builder.buildPartial());
9953               } catch (java.io.IOException e) {
9954                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
9955                     .setUnfinishedMessage(builder.buildPartial());
9956               }
9957               return builder.buildPartial();
9958             }
9959           };
9960 
parser()9961       public static com.google.protobuf.Parser<LogMatch> parser() {
9962         return PARSER;
9963       }
9964 
9965       @java.lang.Override
getParserForType()9966       public com.google.protobuf.Parser<LogMatch> getParserForType() {
9967         return PARSER;
9968       }
9969 
9970       @java.lang.Override
getDefaultInstanceForType()9971       public com.google.monitoring.v3.AlertPolicy.Condition.LogMatch getDefaultInstanceForType() {
9972         return DEFAULT_INSTANCE;
9973       }
9974     }
9975 
9976     public interface MonitoringQueryLanguageConditionOrBuilder
9977         extends
9978         // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
9979         com.google.protobuf.MessageOrBuilder {
9980 
9981       /**
9982        *
9983        *
9984        * <pre>
9985        * [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
9986        * query that outputs a boolean stream.
9987        * </pre>
9988        *
9989        * <code>string query = 1;</code>
9990        *
9991        * @return The query.
9992        */
getQuery()9993       java.lang.String getQuery();
9994       /**
9995        *
9996        *
9997        * <pre>
9998        * [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
9999        * query that outputs a boolean stream.
10000        * </pre>
10001        *
10002        * <code>string query = 1;</code>
10003        *
10004        * @return The bytes for query.
10005        */
getQueryBytes()10006       com.google.protobuf.ByteString getQueryBytes();
10007 
10008       /**
10009        *
10010        *
10011        * <pre>
10012        * The amount of time that a time series must violate the
10013        * threshold to be considered failing. Currently, only values
10014        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
10015        * seconds--are supported. If an invalid value is given, an
10016        * error will be returned. When choosing a duration, it is useful to
10017        * keep in mind the frequency of the underlying time series data
10018        * (which may also be affected by any alignments specified in the
10019        * `aggregations` field); a good duration is long enough so that a single
10020        * outlier does not generate spurious alerts, but short enough that
10021        * unhealthy states are detected and alerted on quickly.
10022        * </pre>
10023        *
10024        * <code>.google.protobuf.Duration duration = 2;</code>
10025        *
10026        * @return Whether the duration field is set.
10027        */
hasDuration()10028       boolean hasDuration();
10029       /**
10030        *
10031        *
10032        * <pre>
10033        * The amount of time that a time series must violate the
10034        * threshold to be considered failing. Currently, only values
10035        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
10036        * seconds--are supported. If an invalid value is given, an
10037        * error will be returned. When choosing a duration, it is useful to
10038        * keep in mind the frequency of the underlying time series data
10039        * (which may also be affected by any alignments specified in the
10040        * `aggregations` field); a good duration is long enough so that a single
10041        * outlier does not generate spurious alerts, but short enough that
10042        * unhealthy states are detected and alerted on quickly.
10043        * </pre>
10044        *
10045        * <code>.google.protobuf.Duration duration = 2;</code>
10046        *
10047        * @return The duration.
10048        */
getDuration()10049       com.google.protobuf.Duration getDuration();
10050       /**
10051        *
10052        *
10053        * <pre>
10054        * The amount of time that a time series must violate the
10055        * threshold to be considered failing. Currently, only values
10056        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
10057        * seconds--are supported. If an invalid value is given, an
10058        * error will be returned. When choosing a duration, it is useful to
10059        * keep in mind the frequency of the underlying time series data
10060        * (which may also be affected by any alignments specified in the
10061        * `aggregations` field); a good duration is long enough so that a single
10062        * outlier does not generate spurious alerts, but short enough that
10063        * unhealthy states are detected and alerted on quickly.
10064        * </pre>
10065        *
10066        * <code>.google.protobuf.Duration duration = 2;</code>
10067        */
getDurationOrBuilder()10068       com.google.protobuf.DurationOrBuilder getDurationOrBuilder();
10069 
10070       /**
10071        *
10072        *
10073        * <pre>
10074        * The number/percent of time series for which the comparison must hold
10075        * in order for the condition to trigger. If unspecified, then the
10076        * condition will trigger if the comparison is true for any of the
10077        * time series that have been identified by `filter` and `aggregations`,
10078        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
10079        * are specified.
10080        * </pre>
10081        *
10082        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
10083        *
10084        * @return Whether the trigger field is set.
10085        */
hasTrigger()10086       boolean hasTrigger();
10087       /**
10088        *
10089        *
10090        * <pre>
10091        * The number/percent of time series for which the comparison must hold
10092        * in order for the condition to trigger. If unspecified, then the
10093        * condition will trigger if the comparison is true for any of the
10094        * time series that have been identified by `filter` and `aggregations`,
10095        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
10096        * are specified.
10097        * </pre>
10098        *
10099        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
10100        *
10101        * @return The trigger.
10102        */
getTrigger()10103       com.google.monitoring.v3.AlertPolicy.Condition.Trigger getTrigger();
10104       /**
10105        *
10106        *
10107        * <pre>
10108        * The number/percent of time series for which the comparison must hold
10109        * in order for the condition to trigger. If unspecified, then the
10110        * condition will trigger if the comparison is true for any of the
10111        * time series that have been identified by `filter` and `aggregations`,
10112        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
10113        * are specified.
10114        * </pre>
10115        *
10116        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
10117        */
getTriggerOrBuilder()10118       com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder getTriggerOrBuilder();
10119 
10120       /**
10121        *
10122        *
10123        * <pre>
10124        * A condition control that determines how metric-threshold conditions
10125        * are evaluated when data stops arriving.
10126        * </pre>
10127        *
10128        * <code>
10129        * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
10130        * </code>
10131        *
10132        * @return The enum numeric value on the wire for evaluationMissingData.
10133        */
getEvaluationMissingDataValue()10134       int getEvaluationMissingDataValue();
10135       /**
10136        *
10137        *
10138        * <pre>
10139        * A condition control that determines how metric-threshold conditions
10140        * are evaluated when data stops arriving.
10141        * </pre>
10142        *
10143        * <code>
10144        * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
10145        * </code>
10146        *
10147        * @return The evaluationMissingData.
10148        */
10149       com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
getEvaluationMissingData()10150           getEvaluationMissingData();
10151     }
10152     /**
10153      *
10154      *
10155      * <pre>
10156      * A condition type that allows alert policies to be defined using
10157      * [Monitoring Query Language](https://cloud.google.com/monitoring/mql).
10158      * </pre>
10159      *
10160      * Protobuf type {@code
10161      * google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition}
10162      */
10163     public static final class MonitoringQueryLanguageCondition
10164         extends com.google.protobuf.GeneratedMessageV3
10165         implements
10166         // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
10167         MonitoringQueryLanguageConditionOrBuilder {
10168       private static final long serialVersionUID = 0L;
10169       // Use MonitoringQueryLanguageCondition.newBuilder() to construct.
MonitoringQueryLanguageCondition( com.google.protobuf.GeneratedMessageV3.Builder<?> builder)10170       private MonitoringQueryLanguageCondition(
10171           com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
10172         super(builder);
10173       }
10174 
MonitoringQueryLanguageCondition()10175       private MonitoringQueryLanguageCondition() {
10176         query_ = "";
10177         evaluationMissingData_ = 0;
10178       }
10179 
10180       @java.lang.Override
10181       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)10182       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
10183         return new MonitoringQueryLanguageCondition();
10184       }
10185 
10186       @java.lang.Override
getUnknownFields()10187       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
10188         return this.unknownFields;
10189       }
10190 
getDescriptor()10191       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
10192         return com.google.monitoring.v3.AlertProto
10193             .internal_static_google_monitoring_v3_AlertPolicy_Condition_MonitoringQueryLanguageCondition_descriptor;
10194       }
10195 
10196       @java.lang.Override
10197       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()10198           internalGetFieldAccessorTable() {
10199         return com.google.monitoring.v3.AlertProto
10200             .internal_static_google_monitoring_v3_AlertPolicy_Condition_MonitoringQueryLanguageCondition_fieldAccessorTable
10201             .ensureFieldAccessorsInitialized(
10202                 com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
10203                     .class,
10204                 com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
10205                     .Builder.class);
10206       }
10207 
10208       public static final int QUERY_FIELD_NUMBER = 1;
10209 
10210       @SuppressWarnings("serial")
10211       private volatile java.lang.Object query_ = "";
10212       /**
10213        *
10214        *
10215        * <pre>
10216        * [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
10217        * query that outputs a boolean stream.
10218        * </pre>
10219        *
10220        * <code>string query = 1;</code>
10221        *
10222        * @return The query.
10223        */
10224       @java.lang.Override
getQuery()10225       public java.lang.String getQuery() {
10226         java.lang.Object ref = query_;
10227         if (ref instanceof java.lang.String) {
10228           return (java.lang.String) ref;
10229         } else {
10230           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
10231           java.lang.String s = bs.toStringUtf8();
10232           query_ = s;
10233           return s;
10234         }
10235       }
10236       /**
10237        *
10238        *
10239        * <pre>
10240        * [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
10241        * query that outputs a boolean stream.
10242        * </pre>
10243        *
10244        * <code>string query = 1;</code>
10245        *
10246        * @return The bytes for query.
10247        */
10248       @java.lang.Override
getQueryBytes()10249       public com.google.protobuf.ByteString getQueryBytes() {
10250         java.lang.Object ref = query_;
10251         if (ref instanceof java.lang.String) {
10252           com.google.protobuf.ByteString b =
10253               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
10254           query_ = b;
10255           return b;
10256         } else {
10257           return (com.google.protobuf.ByteString) ref;
10258         }
10259       }
10260 
10261       public static final int DURATION_FIELD_NUMBER = 2;
10262       private com.google.protobuf.Duration duration_;
10263       /**
10264        *
10265        *
10266        * <pre>
10267        * The amount of time that a time series must violate the
10268        * threshold to be considered failing. Currently, only values
10269        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
10270        * seconds--are supported. If an invalid value is given, an
10271        * error will be returned. When choosing a duration, it is useful to
10272        * keep in mind the frequency of the underlying time series data
10273        * (which may also be affected by any alignments specified in the
10274        * `aggregations` field); a good duration is long enough so that a single
10275        * outlier does not generate spurious alerts, but short enough that
10276        * unhealthy states are detected and alerted on quickly.
10277        * </pre>
10278        *
10279        * <code>.google.protobuf.Duration duration = 2;</code>
10280        *
10281        * @return Whether the duration field is set.
10282        */
10283       @java.lang.Override
hasDuration()10284       public boolean hasDuration() {
10285         return duration_ != null;
10286       }
10287       /**
10288        *
10289        *
10290        * <pre>
10291        * The amount of time that a time series must violate the
10292        * threshold to be considered failing. Currently, only values
10293        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
10294        * seconds--are supported. If an invalid value is given, an
10295        * error will be returned. When choosing a duration, it is useful to
10296        * keep in mind the frequency of the underlying time series data
10297        * (which may also be affected by any alignments specified in the
10298        * `aggregations` field); a good duration is long enough so that a single
10299        * outlier does not generate spurious alerts, but short enough that
10300        * unhealthy states are detected and alerted on quickly.
10301        * </pre>
10302        *
10303        * <code>.google.protobuf.Duration duration = 2;</code>
10304        *
10305        * @return The duration.
10306        */
10307       @java.lang.Override
getDuration()10308       public com.google.protobuf.Duration getDuration() {
10309         return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
10310       }
10311       /**
10312        *
10313        *
10314        * <pre>
10315        * The amount of time that a time series must violate the
10316        * threshold to be considered failing. Currently, only values
10317        * that are a multiple of a minute--e.g., 0, 60, 120, or 300
10318        * seconds--are supported. If an invalid value is given, an
10319        * error will be returned. When choosing a duration, it is useful to
10320        * keep in mind the frequency of the underlying time series data
10321        * (which may also be affected by any alignments specified in the
10322        * `aggregations` field); a good duration is long enough so that a single
10323        * outlier does not generate spurious alerts, but short enough that
10324        * unhealthy states are detected and alerted on quickly.
10325        * </pre>
10326        *
10327        * <code>.google.protobuf.Duration duration = 2;</code>
10328        */
10329       @java.lang.Override
getDurationOrBuilder()10330       public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
10331         return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
10332       }
10333 
10334       public static final int TRIGGER_FIELD_NUMBER = 3;
10335       private com.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger_;
10336       /**
10337        *
10338        *
10339        * <pre>
10340        * The number/percent of time series for which the comparison must hold
10341        * in order for the condition to trigger. If unspecified, then the
10342        * condition will trigger if the comparison is true for any of the
10343        * time series that have been identified by `filter` and `aggregations`,
10344        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
10345        * are specified.
10346        * </pre>
10347        *
10348        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
10349        *
10350        * @return Whether the trigger field is set.
10351        */
10352       @java.lang.Override
hasTrigger()10353       public boolean hasTrigger() {
10354         return trigger_ != null;
10355       }
10356       /**
10357        *
10358        *
10359        * <pre>
10360        * The number/percent of time series for which the comparison must hold
10361        * in order for the condition to trigger. If unspecified, then the
10362        * condition will trigger if the comparison is true for any of the
10363        * time series that have been identified by `filter` and `aggregations`,
10364        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
10365        * are specified.
10366        * </pre>
10367        *
10368        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
10369        *
10370        * @return The trigger.
10371        */
10372       @java.lang.Override
getTrigger()10373       public com.google.monitoring.v3.AlertPolicy.Condition.Trigger getTrigger() {
10374         return trigger_ == null
10375             ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
10376             : trigger_;
10377       }
10378       /**
10379        *
10380        *
10381        * <pre>
10382        * The number/percent of time series for which the comparison must hold
10383        * in order for the condition to trigger. If unspecified, then the
10384        * condition will trigger if the comparison is true for any of the
10385        * time series that have been identified by `filter` and `aggregations`,
10386        * or by the ratio, if `denominator_filter` and `denominator_aggregations`
10387        * are specified.
10388        * </pre>
10389        *
10390        * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
10391        */
10392       @java.lang.Override
getTriggerOrBuilder()10393       public com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder getTriggerOrBuilder() {
10394         return trigger_ == null
10395             ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
10396             : trigger_;
10397       }
10398 
10399       public static final int EVALUATION_MISSING_DATA_FIELD_NUMBER = 4;
10400       private int evaluationMissingData_ = 0;
10401       /**
10402        *
10403        *
10404        * <pre>
10405        * A condition control that determines how metric-threshold conditions
10406        * are evaluated when data stops arriving.
10407        * </pre>
10408        *
10409        * <code>
10410        * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
10411        * </code>
10412        *
10413        * @return The enum numeric value on the wire for evaluationMissingData.
10414        */
10415       @java.lang.Override
getEvaluationMissingDataValue()10416       public int getEvaluationMissingDataValue() {
10417         return evaluationMissingData_;
10418       }
10419       /**
10420        *
10421        *
10422        * <pre>
10423        * A condition control that determines how metric-threshold conditions
10424        * are evaluated when data stops arriving.
10425        * </pre>
10426        *
10427        * <code>
10428        * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
10429        * </code>
10430        *
10431        * @return The evaluationMissingData.
10432        */
10433       @java.lang.Override
10434       public com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
getEvaluationMissingData()10435           getEvaluationMissingData() {
10436         com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData result =
10437             com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData.forNumber(
10438                 evaluationMissingData_);
10439         return result == null
10440             ? com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData.UNRECOGNIZED
10441             : result;
10442       }
10443 
10444       private byte memoizedIsInitialized = -1;
10445 
10446       @java.lang.Override
isInitialized()10447       public final boolean isInitialized() {
10448         byte isInitialized = memoizedIsInitialized;
10449         if (isInitialized == 1) return true;
10450         if (isInitialized == 0) return false;
10451 
10452         memoizedIsInitialized = 1;
10453         return true;
10454       }
10455 
10456       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)10457       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
10458         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
10459           com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_);
10460         }
10461         if (duration_ != null) {
10462           output.writeMessage(2, getDuration());
10463         }
10464         if (trigger_ != null) {
10465           output.writeMessage(3, getTrigger());
10466         }
10467         if (evaluationMissingData_
10468             != com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
10469                 .EVALUATION_MISSING_DATA_UNSPECIFIED
10470                 .getNumber()) {
10471           output.writeEnum(4, evaluationMissingData_);
10472         }
10473         getUnknownFields().writeTo(output);
10474       }
10475 
10476       @java.lang.Override
getSerializedSize()10477       public int getSerializedSize() {
10478         int size = memoizedSize;
10479         if (size != -1) return size;
10480 
10481         size = 0;
10482         if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
10483           size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_);
10484         }
10485         if (duration_ != null) {
10486           size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDuration());
10487         }
10488         if (trigger_ != null) {
10489           size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTrigger());
10490         }
10491         if (evaluationMissingData_
10492             != com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
10493                 .EVALUATION_MISSING_DATA_UNSPECIFIED
10494                 .getNumber()) {
10495           size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, evaluationMissingData_);
10496         }
10497         size += getUnknownFields().getSerializedSize();
10498         memoizedSize = size;
10499         return size;
10500       }
10501 
10502       @java.lang.Override
equals(final java.lang.Object obj)10503       public boolean equals(final java.lang.Object obj) {
10504         if (obj == this) {
10505           return true;
10506         }
10507         if (!(obj
10508             instanceof
10509             com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)) {
10510           return super.equals(obj);
10511         }
10512         com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition other =
10513             (com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition) obj;
10514 
10515         if (!getQuery().equals(other.getQuery())) return false;
10516         if (hasDuration() != other.hasDuration()) return false;
10517         if (hasDuration()) {
10518           if (!getDuration().equals(other.getDuration())) return false;
10519         }
10520         if (hasTrigger() != other.hasTrigger()) return false;
10521         if (hasTrigger()) {
10522           if (!getTrigger().equals(other.getTrigger())) return false;
10523         }
10524         if (evaluationMissingData_ != other.evaluationMissingData_) return false;
10525         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
10526         return true;
10527       }
10528 
10529       @java.lang.Override
hashCode()10530       public int hashCode() {
10531         if (memoizedHashCode != 0) {
10532           return memoizedHashCode;
10533         }
10534         int hash = 41;
10535         hash = (19 * hash) + getDescriptor().hashCode();
10536         hash = (37 * hash) + QUERY_FIELD_NUMBER;
10537         hash = (53 * hash) + getQuery().hashCode();
10538         if (hasDuration()) {
10539           hash = (37 * hash) + DURATION_FIELD_NUMBER;
10540           hash = (53 * hash) + getDuration().hashCode();
10541         }
10542         if (hasTrigger()) {
10543           hash = (37 * hash) + TRIGGER_FIELD_NUMBER;
10544           hash = (53 * hash) + getTrigger().hashCode();
10545         }
10546         hash = (37 * hash) + EVALUATION_MISSING_DATA_FIELD_NUMBER;
10547         hash = (53 * hash) + evaluationMissingData_;
10548         hash = (29 * hash) + getUnknownFields().hashCode();
10549         memoizedHashCode = hash;
10550         return hash;
10551       }
10552 
10553       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom(java.nio.ByteBuffer data)10554           parseFrom(java.nio.ByteBuffer data)
10555               throws com.google.protobuf.InvalidProtocolBufferException {
10556         return PARSER.parseFrom(data);
10557       }
10558 
10559       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10560           parseFrom(
10561               java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10562               throws com.google.protobuf.InvalidProtocolBufferException {
10563         return PARSER.parseFrom(data, extensionRegistry);
10564       }
10565 
10566       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom(com.google.protobuf.ByteString data)10567           parseFrom(com.google.protobuf.ByteString data)
10568               throws com.google.protobuf.InvalidProtocolBufferException {
10569         return PARSER.parseFrom(data);
10570       }
10571 
10572       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10573           parseFrom(
10574               com.google.protobuf.ByteString data,
10575               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10576               throws com.google.protobuf.InvalidProtocolBufferException {
10577         return PARSER.parseFrom(data, extensionRegistry);
10578       }
10579 
10580       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom(byte[] data)10581           parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
10582         return PARSER.parseFrom(data);
10583       }
10584 
10585       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10586           parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10587               throws com.google.protobuf.InvalidProtocolBufferException {
10588         return PARSER.parseFrom(data, extensionRegistry);
10589       }
10590 
10591       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom(java.io.InputStream input)10592           parseFrom(java.io.InputStream input) throws java.io.IOException {
10593         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
10594       }
10595 
10596       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10597           parseFrom(
10598               java.io.InputStream input,
10599               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10600               throws java.io.IOException {
10601         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
10602             PARSER, input, extensionRegistry);
10603       }
10604 
10605       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseDelimitedFrom(java.io.InputStream input)10606           parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
10607         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
10608       }
10609 
10610       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10611           parseDelimitedFrom(
10612               java.io.InputStream input,
10613               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10614               throws java.io.IOException {
10615         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
10616             PARSER, input, extensionRegistry);
10617       }
10618 
10619       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom(com.google.protobuf.CodedInputStream input)10620           parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
10621         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
10622       }
10623 
10624       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10625           parseFrom(
10626               com.google.protobuf.CodedInputStream input,
10627               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10628               throws java.io.IOException {
10629         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
10630             PARSER, input, extensionRegistry);
10631       }
10632 
10633       @java.lang.Override
newBuilderForType()10634       public Builder newBuilderForType() {
10635         return newBuilder();
10636       }
10637 
newBuilder()10638       public static Builder newBuilder() {
10639         return DEFAULT_INSTANCE.toBuilder();
10640       }
10641 
newBuilder( com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition prototype)10642       public static Builder newBuilder(
10643           com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
10644               prototype) {
10645         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
10646       }
10647 
10648       @java.lang.Override
toBuilder()10649       public Builder toBuilder() {
10650         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
10651       }
10652 
10653       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)10654       protected Builder newBuilderForType(
10655           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
10656         Builder builder = new Builder(parent);
10657         return builder;
10658       }
10659       /**
10660        *
10661        *
10662        * <pre>
10663        * A condition type that allows alert policies to be defined using
10664        * [Monitoring Query Language](https://cloud.google.com/monitoring/mql).
10665        * </pre>
10666        *
10667        * Protobuf type {@code
10668        * google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition}
10669        */
10670       public static final class Builder
10671           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
10672           implements
10673           // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
10674           com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder {
getDescriptor()10675         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
10676           return com.google.monitoring.v3.AlertProto
10677               .internal_static_google_monitoring_v3_AlertPolicy_Condition_MonitoringQueryLanguageCondition_descriptor;
10678         }
10679 
10680         @java.lang.Override
10681         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()10682             internalGetFieldAccessorTable() {
10683           return com.google.monitoring.v3.AlertProto
10684               .internal_static_google_monitoring_v3_AlertPolicy_Condition_MonitoringQueryLanguageCondition_fieldAccessorTable
10685               .ensureFieldAccessorsInitialized(
10686                   com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
10687                       .class,
10688                   com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
10689                       .Builder.class);
10690         }
10691 
10692         // Construct using
10693         // com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.newBuilder()
Builder()10694         private Builder() {}
10695 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)10696         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
10697           super(parent);
10698         }
10699 
10700         @java.lang.Override
clear()10701         public Builder clear() {
10702           super.clear();
10703           bitField0_ = 0;
10704           query_ = "";
10705           duration_ = null;
10706           if (durationBuilder_ != null) {
10707             durationBuilder_.dispose();
10708             durationBuilder_ = null;
10709           }
10710           trigger_ = null;
10711           if (triggerBuilder_ != null) {
10712             triggerBuilder_.dispose();
10713             triggerBuilder_ = null;
10714           }
10715           evaluationMissingData_ = 0;
10716           return this;
10717         }
10718 
10719         @java.lang.Override
getDescriptorForType()10720         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
10721           return com.google.monitoring.v3.AlertProto
10722               .internal_static_google_monitoring_v3_AlertPolicy_Condition_MonitoringQueryLanguageCondition_descriptor;
10723         }
10724 
10725         @java.lang.Override
10726         public com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
getDefaultInstanceForType()10727             getDefaultInstanceForType() {
10728           return com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
10729               .getDefaultInstance();
10730         }
10731 
10732         @java.lang.Override
10733         public com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
build()10734             build() {
10735           com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition result =
10736               buildPartial();
10737           if (!result.isInitialized()) {
10738             throw newUninitializedMessageException(result);
10739           }
10740           return result;
10741         }
10742 
10743         @java.lang.Override
10744         public com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
buildPartial()10745             buildPartial() {
10746           com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition result =
10747               new com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition(
10748                   this);
10749           if (bitField0_ != 0) {
10750             buildPartial0(result);
10751           }
10752           onBuilt();
10753           return result;
10754         }
10755 
buildPartial0( com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition result)10756         private void buildPartial0(
10757             com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
10758                 result) {
10759           int from_bitField0_ = bitField0_;
10760           if (((from_bitField0_ & 0x00000001) != 0)) {
10761             result.query_ = query_;
10762           }
10763           if (((from_bitField0_ & 0x00000002) != 0)) {
10764             result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build();
10765           }
10766           if (((from_bitField0_ & 0x00000004) != 0)) {
10767             result.trigger_ = triggerBuilder_ == null ? trigger_ : triggerBuilder_.build();
10768           }
10769           if (((from_bitField0_ & 0x00000008) != 0)) {
10770             result.evaluationMissingData_ = evaluationMissingData_;
10771           }
10772         }
10773 
10774         @java.lang.Override
clone()10775         public Builder clone() {
10776           return super.clone();
10777         }
10778 
10779         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)10780         public Builder setField(
10781             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
10782           return super.setField(field, value);
10783         }
10784 
10785         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)10786         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
10787           return super.clearField(field);
10788         }
10789 
10790         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)10791         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
10792           return super.clearOneof(oneof);
10793         }
10794 
10795         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)10796         public Builder setRepeatedField(
10797             com.google.protobuf.Descriptors.FieldDescriptor field,
10798             int index,
10799             java.lang.Object value) {
10800           return super.setRepeatedField(field, index, value);
10801         }
10802 
10803         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)10804         public Builder addRepeatedField(
10805             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
10806           return super.addRepeatedField(field, value);
10807         }
10808 
10809         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)10810         public Builder mergeFrom(com.google.protobuf.Message other) {
10811           if (other
10812               instanceof
10813               com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition) {
10814             return mergeFrom(
10815                 (com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
10816                     other);
10817           } else {
10818             super.mergeFrom(other);
10819             return this;
10820           }
10821         }
10822 
mergeFrom( com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition other)10823         public Builder mergeFrom(
10824             com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition other) {
10825           if (other
10826               == com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
10827                   .getDefaultInstance()) return this;
10828           if (!other.getQuery().isEmpty()) {
10829             query_ = other.query_;
10830             bitField0_ |= 0x00000001;
10831             onChanged();
10832           }
10833           if (other.hasDuration()) {
10834             mergeDuration(other.getDuration());
10835           }
10836           if (other.hasTrigger()) {
10837             mergeTrigger(other.getTrigger());
10838           }
10839           if (other.evaluationMissingData_ != 0) {
10840             setEvaluationMissingDataValue(other.getEvaluationMissingDataValue());
10841           }
10842           this.mergeUnknownFields(other.getUnknownFields());
10843           onChanged();
10844           return this;
10845         }
10846 
10847         @java.lang.Override
isInitialized()10848         public final boolean isInitialized() {
10849           return true;
10850         }
10851 
10852         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10853         public Builder mergeFrom(
10854             com.google.protobuf.CodedInputStream input,
10855             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10856             throws java.io.IOException {
10857           if (extensionRegistry == null) {
10858             throw new java.lang.NullPointerException();
10859           }
10860           try {
10861             boolean done = false;
10862             while (!done) {
10863               int tag = input.readTag();
10864               switch (tag) {
10865                 case 0:
10866                   done = true;
10867                   break;
10868                 case 10:
10869                   {
10870                     query_ = input.readStringRequireUtf8();
10871                     bitField0_ |= 0x00000001;
10872                     break;
10873                   } // case 10
10874                 case 18:
10875                   {
10876                     input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry);
10877                     bitField0_ |= 0x00000002;
10878                     break;
10879                   } // case 18
10880                 case 26:
10881                   {
10882                     input.readMessage(getTriggerFieldBuilder().getBuilder(), extensionRegistry);
10883                     bitField0_ |= 0x00000004;
10884                     break;
10885                   } // case 26
10886                 case 32:
10887                   {
10888                     evaluationMissingData_ = input.readEnum();
10889                     bitField0_ |= 0x00000008;
10890                     break;
10891                   } // case 32
10892                 default:
10893                   {
10894                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
10895                       done = true; // was an endgroup tag
10896                     }
10897                     break;
10898                   } // default:
10899               } // switch (tag)
10900             } // while (!done)
10901           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
10902             throw e.unwrapIOException();
10903           } finally {
10904             onChanged();
10905           } // finally
10906           return this;
10907         }
10908 
10909         private int bitField0_;
10910 
10911         private java.lang.Object query_ = "";
10912         /**
10913          *
10914          *
10915          * <pre>
10916          * [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
10917          * query that outputs a boolean stream.
10918          * </pre>
10919          *
10920          * <code>string query = 1;</code>
10921          *
10922          * @return The query.
10923          */
getQuery()10924         public java.lang.String getQuery() {
10925           java.lang.Object ref = query_;
10926           if (!(ref instanceof java.lang.String)) {
10927             com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
10928             java.lang.String s = bs.toStringUtf8();
10929             query_ = s;
10930             return s;
10931           } else {
10932             return (java.lang.String) ref;
10933           }
10934         }
10935         /**
10936          *
10937          *
10938          * <pre>
10939          * [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
10940          * query that outputs a boolean stream.
10941          * </pre>
10942          *
10943          * <code>string query = 1;</code>
10944          *
10945          * @return The bytes for query.
10946          */
getQueryBytes()10947         public com.google.protobuf.ByteString getQueryBytes() {
10948           java.lang.Object ref = query_;
10949           if (ref instanceof String) {
10950             com.google.protobuf.ByteString b =
10951                 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
10952             query_ = b;
10953             return b;
10954           } else {
10955             return (com.google.protobuf.ByteString) ref;
10956           }
10957         }
10958         /**
10959          *
10960          *
10961          * <pre>
10962          * [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
10963          * query that outputs a boolean stream.
10964          * </pre>
10965          *
10966          * <code>string query = 1;</code>
10967          *
10968          * @param value The query to set.
10969          * @return This builder for chaining.
10970          */
setQuery(java.lang.String value)10971         public Builder setQuery(java.lang.String value) {
10972           if (value == null) {
10973             throw new NullPointerException();
10974           }
10975           query_ = value;
10976           bitField0_ |= 0x00000001;
10977           onChanged();
10978           return this;
10979         }
10980         /**
10981          *
10982          *
10983          * <pre>
10984          * [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
10985          * query that outputs a boolean stream.
10986          * </pre>
10987          *
10988          * <code>string query = 1;</code>
10989          *
10990          * @return This builder for chaining.
10991          */
clearQuery()10992         public Builder clearQuery() {
10993           query_ = getDefaultInstance().getQuery();
10994           bitField0_ = (bitField0_ & ~0x00000001);
10995           onChanged();
10996           return this;
10997         }
10998         /**
10999          *
11000          *
11001          * <pre>
11002          * [Monitoring Query Language](https://cloud.google.com/monitoring/mql)
11003          * query that outputs a boolean stream.
11004          * </pre>
11005          *
11006          * <code>string query = 1;</code>
11007          *
11008          * @param value The bytes for query to set.
11009          * @return This builder for chaining.
11010          */
setQueryBytes(com.google.protobuf.ByteString value)11011         public Builder setQueryBytes(com.google.protobuf.ByteString value) {
11012           if (value == null) {
11013             throw new NullPointerException();
11014           }
11015           checkByteStringIsUtf8(value);
11016           query_ = value;
11017           bitField0_ |= 0x00000001;
11018           onChanged();
11019           return this;
11020         }
11021 
11022         private com.google.protobuf.Duration duration_;
11023         private com.google.protobuf.SingleFieldBuilderV3<
11024                 com.google.protobuf.Duration,
11025                 com.google.protobuf.Duration.Builder,
11026                 com.google.protobuf.DurationOrBuilder>
11027             durationBuilder_;
11028         /**
11029          *
11030          *
11031          * <pre>
11032          * The amount of time that a time series must violate the
11033          * threshold to be considered failing. Currently, only values
11034          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
11035          * seconds--are supported. If an invalid value is given, an
11036          * error will be returned. When choosing a duration, it is useful to
11037          * keep in mind the frequency of the underlying time series data
11038          * (which may also be affected by any alignments specified in the
11039          * `aggregations` field); a good duration is long enough so that a single
11040          * outlier does not generate spurious alerts, but short enough that
11041          * unhealthy states are detected and alerted on quickly.
11042          * </pre>
11043          *
11044          * <code>.google.protobuf.Duration duration = 2;</code>
11045          *
11046          * @return Whether the duration field is set.
11047          */
hasDuration()11048         public boolean hasDuration() {
11049           return ((bitField0_ & 0x00000002) != 0);
11050         }
11051         /**
11052          *
11053          *
11054          * <pre>
11055          * The amount of time that a time series must violate the
11056          * threshold to be considered failing. Currently, only values
11057          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
11058          * seconds--are supported. If an invalid value is given, an
11059          * error will be returned. When choosing a duration, it is useful to
11060          * keep in mind the frequency of the underlying time series data
11061          * (which may also be affected by any alignments specified in the
11062          * `aggregations` field); a good duration is long enough so that a single
11063          * outlier does not generate spurious alerts, but short enough that
11064          * unhealthy states are detected and alerted on quickly.
11065          * </pre>
11066          *
11067          * <code>.google.protobuf.Duration duration = 2;</code>
11068          *
11069          * @return The duration.
11070          */
getDuration()11071         public com.google.protobuf.Duration getDuration() {
11072           if (durationBuilder_ == null) {
11073             return duration_ == null
11074                 ? com.google.protobuf.Duration.getDefaultInstance()
11075                 : duration_;
11076           } else {
11077             return durationBuilder_.getMessage();
11078           }
11079         }
11080         /**
11081          *
11082          *
11083          * <pre>
11084          * The amount of time that a time series must violate the
11085          * threshold to be considered failing. Currently, only values
11086          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
11087          * seconds--are supported. If an invalid value is given, an
11088          * error will be returned. When choosing a duration, it is useful to
11089          * keep in mind the frequency of the underlying time series data
11090          * (which may also be affected by any alignments specified in the
11091          * `aggregations` field); a good duration is long enough so that a single
11092          * outlier does not generate spurious alerts, but short enough that
11093          * unhealthy states are detected and alerted on quickly.
11094          * </pre>
11095          *
11096          * <code>.google.protobuf.Duration duration = 2;</code>
11097          */
setDuration(com.google.protobuf.Duration value)11098         public Builder setDuration(com.google.protobuf.Duration value) {
11099           if (durationBuilder_ == null) {
11100             if (value == null) {
11101               throw new NullPointerException();
11102             }
11103             duration_ = value;
11104           } else {
11105             durationBuilder_.setMessage(value);
11106           }
11107           bitField0_ |= 0x00000002;
11108           onChanged();
11109           return this;
11110         }
11111         /**
11112          *
11113          *
11114          * <pre>
11115          * The amount of time that a time series must violate the
11116          * threshold to be considered failing. Currently, only values
11117          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
11118          * seconds--are supported. If an invalid value is given, an
11119          * error will be returned. When choosing a duration, it is useful to
11120          * keep in mind the frequency of the underlying time series data
11121          * (which may also be affected by any alignments specified in the
11122          * `aggregations` field); a good duration is long enough so that a single
11123          * outlier does not generate spurious alerts, but short enough that
11124          * unhealthy states are detected and alerted on quickly.
11125          * </pre>
11126          *
11127          * <code>.google.protobuf.Duration duration = 2;</code>
11128          */
setDuration(com.google.protobuf.Duration.Builder builderForValue)11129         public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) {
11130           if (durationBuilder_ == null) {
11131             duration_ = builderForValue.build();
11132           } else {
11133             durationBuilder_.setMessage(builderForValue.build());
11134           }
11135           bitField0_ |= 0x00000002;
11136           onChanged();
11137           return this;
11138         }
11139         /**
11140          *
11141          *
11142          * <pre>
11143          * The amount of time that a time series must violate the
11144          * threshold to be considered failing. Currently, only values
11145          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
11146          * seconds--are supported. If an invalid value is given, an
11147          * error will be returned. When choosing a duration, it is useful to
11148          * keep in mind the frequency of the underlying time series data
11149          * (which may also be affected by any alignments specified in the
11150          * `aggregations` field); a good duration is long enough so that a single
11151          * outlier does not generate spurious alerts, but short enough that
11152          * unhealthy states are detected and alerted on quickly.
11153          * </pre>
11154          *
11155          * <code>.google.protobuf.Duration duration = 2;</code>
11156          */
mergeDuration(com.google.protobuf.Duration value)11157         public Builder mergeDuration(com.google.protobuf.Duration value) {
11158           if (durationBuilder_ == null) {
11159             if (((bitField0_ & 0x00000002) != 0)
11160                 && duration_ != null
11161                 && duration_ != com.google.protobuf.Duration.getDefaultInstance()) {
11162               getDurationBuilder().mergeFrom(value);
11163             } else {
11164               duration_ = value;
11165             }
11166           } else {
11167             durationBuilder_.mergeFrom(value);
11168           }
11169           bitField0_ |= 0x00000002;
11170           onChanged();
11171           return this;
11172         }
11173         /**
11174          *
11175          *
11176          * <pre>
11177          * The amount of time that a time series must violate the
11178          * threshold to be considered failing. Currently, only values
11179          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
11180          * seconds--are supported. If an invalid value is given, an
11181          * error will be returned. When choosing a duration, it is useful to
11182          * keep in mind the frequency of the underlying time series data
11183          * (which may also be affected by any alignments specified in the
11184          * `aggregations` field); a good duration is long enough so that a single
11185          * outlier does not generate spurious alerts, but short enough that
11186          * unhealthy states are detected and alerted on quickly.
11187          * </pre>
11188          *
11189          * <code>.google.protobuf.Duration duration = 2;</code>
11190          */
clearDuration()11191         public Builder clearDuration() {
11192           bitField0_ = (bitField0_ & ~0x00000002);
11193           duration_ = null;
11194           if (durationBuilder_ != null) {
11195             durationBuilder_.dispose();
11196             durationBuilder_ = null;
11197           }
11198           onChanged();
11199           return this;
11200         }
11201         /**
11202          *
11203          *
11204          * <pre>
11205          * The amount of time that a time series must violate the
11206          * threshold to be considered failing. Currently, only values
11207          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
11208          * seconds--are supported. If an invalid value is given, an
11209          * error will be returned. When choosing a duration, it is useful to
11210          * keep in mind the frequency of the underlying time series data
11211          * (which may also be affected by any alignments specified in the
11212          * `aggregations` field); a good duration is long enough so that a single
11213          * outlier does not generate spurious alerts, but short enough that
11214          * unhealthy states are detected and alerted on quickly.
11215          * </pre>
11216          *
11217          * <code>.google.protobuf.Duration duration = 2;</code>
11218          */
getDurationBuilder()11219         public com.google.protobuf.Duration.Builder getDurationBuilder() {
11220           bitField0_ |= 0x00000002;
11221           onChanged();
11222           return getDurationFieldBuilder().getBuilder();
11223         }
11224         /**
11225          *
11226          *
11227          * <pre>
11228          * The amount of time that a time series must violate the
11229          * threshold to be considered failing. Currently, only values
11230          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
11231          * seconds--are supported. If an invalid value is given, an
11232          * error will be returned. When choosing a duration, it is useful to
11233          * keep in mind the frequency of the underlying time series data
11234          * (which may also be affected by any alignments specified in the
11235          * `aggregations` field); a good duration is long enough so that a single
11236          * outlier does not generate spurious alerts, but short enough that
11237          * unhealthy states are detected and alerted on quickly.
11238          * </pre>
11239          *
11240          * <code>.google.protobuf.Duration duration = 2;</code>
11241          */
getDurationOrBuilder()11242         public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
11243           if (durationBuilder_ != null) {
11244             return durationBuilder_.getMessageOrBuilder();
11245           } else {
11246             return duration_ == null
11247                 ? com.google.protobuf.Duration.getDefaultInstance()
11248                 : duration_;
11249           }
11250         }
11251         /**
11252          *
11253          *
11254          * <pre>
11255          * The amount of time that a time series must violate the
11256          * threshold to be considered failing. Currently, only values
11257          * that are a multiple of a minute--e.g., 0, 60, 120, or 300
11258          * seconds--are supported. If an invalid value is given, an
11259          * error will be returned. When choosing a duration, it is useful to
11260          * keep in mind the frequency of the underlying time series data
11261          * (which may also be affected by any alignments specified in the
11262          * `aggregations` field); a good duration is long enough so that a single
11263          * outlier does not generate spurious alerts, but short enough that
11264          * unhealthy states are detected and alerted on quickly.
11265          * </pre>
11266          *
11267          * <code>.google.protobuf.Duration duration = 2;</code>
11268          */
11269         private com.google.protobuf.SingleFieldBuilderV3<
11270                 com.google.protobuf.Duration,
11271                 com.google.protobuf.Duration.Builder,
11272                 com.google.protobuf.DurationOrBuilder>
getDurationFieldBuilder()11273             getDurationFieldBuilder() {
11274           if (durationBuilder_ == null) {
11275             durationBuilder_ =
11276                 new com.google.protobuf.SingleFieldBuilderV3<
11277                     com.google.protobuf.Duration,
11278                     com.google.protobuf.Duration.Builder,
11279                     com.google.protobuf.DurationOrBuilder>(
11280                     getDuration(), getParentForChildren(), isClean());
11281             duration_ = null;
11282           }
11283           return durationBuilder_;
11284         }
11285 
11286         private com.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger_;
11287         private com.google.protobuf.SingleFieldBuilderV3<
11288                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger,
11289                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder,
11290                 com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder>
11291             triggerBuilder_;
11292         /**
11293          *
11294          *
11295          * <pre>
11296          * The number/percent of time series for which the comparison must hold
11297          * in order for the condition to trigger. If unspecified, then the
11298          * condition will trigger if the comparison is true for any of the
11299          * time series that have been identified by `filter` and `aggregations`,
11300          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
11301          * are specified.
11302          * </pre>
11303          *
11304          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
11305          *
11306          * @return Whether the trigger field is set.
11307          */
hasTrigger()11308         public boolean hasTrigger() {
11309           return ((bitField0_ & 0x00000004) != 0);
11310         }
11311         /**
11312          *
11313          *
11314          * <pre>
11315          * The number/percent of time series for which the comparison must hold
11316          * in order for the condition to trigger. If unspecified, then the
11317          * condition will trigger if the comparison is true for any of the
11318          * time series that have been identified by `filter` and `aggregations`,
11319          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
11320          * are specified.
11321          * </pre>
11322          *
11323          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
11324          *
11325          * @return The trigger.
11326          */
getTrigger()11327         public com.google.monitoring.v3.AlertPolicy.Condition.Trigger getTrigger() {
11328           if (triggerBuilder_ == null) {
11329             return trigger_ == null
11330                 ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
11331                 : trigger_;
11332           } else {
11333             return triggerBuilder_.getMessage();
11334           }
11335         }
11336         /**
11337          *
11338          *
11339          * <pre>
11340          * The number/percent of time series for which the comparison must hold
11341          * in order for the condition to trigger. If unspecified, then the
11342          * condition will trigger if the comparison is true for any of the
11343          * time series that have been identified by `filter` and `aggregations`,
11344          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
11345          * are specified.
11346          * </pre>
11347          *
11348          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
11349          */
setTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value)11350         public Builder setTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value) {
11351           if (triggerBuilder_ == null) {
11352             if (value == null) {
11353               throw new NullPointerException();
11354             }
11355             trigger_ = value;
11356           } else {
11357             triggerBuilder_.setMessage(value);
11358           }
11359           bitField0_ |= 0x00000004;
11360           onChanged();
11361           return this;
11362         }
11363         /**
11364          *
11365          *
11366          * <pre>
11367          * The number/percent of time series for which the comparison must hold
11368          * in order for the condition to trigger. If unspecified, then the
11369          * condition will trigger if the comparison is true for any of the
11370          * time series that have been identified by `filter` and `aggregations`,
11371          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
11372          * are specified.
11373          * </pre>
11374          *
11375          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
11376          */
setTrigger( com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder builderForValue)11377         public Builder setTrigger(
11378             com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder builderForValue) {
11379           if (triggerBuilder_ == null) {
11380             trigger_ = builderForValue.build();
11381           } else {
11382             triggerBuilder_.setMessage(builderForValue.build());
11383           }
11384           bitField0_ |= 0x00000004;
11385           onChanged();
11386           return this;
11387         }
11388         /**
11389          *
11390          *
11391          * <pre>
11392          * The number/percent of time series for which the comparison must hold
11393          * in order for the condition to trigger. If unspecified, then the
11394          * condition will trigger if the comparison is true for any of the
11395          * time series that have been identified by `filter` and `aggregations`,
11396          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
11397          * are specified.
11398          * </pre>
11399          *
11400          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
11401          */
mergeTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value)11402         public Builder mergeTrigger(com.google.monitoring.v3.AlertPolicy.Condition.Trigger value) {
11403           if (triggerBuilder_ == null) {
11404             if (((bitField0_ & 0x00000004) != 0)
11405                 && trigger_ != null
11406                 && trigger_
11407                     != com.google.monitoring.v3.AlertPolicy.Condition.Trigger
11408                         .getDefaultInstance()) {
11409               getTriggerBuilder().mergeFrom(value);
11410             } else {
11411               trigger_ = value;
11412             }
11413           } else {
11414             triggerBuilder_.mergeFrom(value);
11415           }
11416           bitField0_ |= 0x00000004;
11417           onChanged();
11418           return this;
11419         }
11420         /**
11421          *
11422          *
11423          * <pre>
11424          * The number/percent of time series for which the comparison must hold
11425          * in order for the condition to trigger. If unspecified, then the
11426          * condition will trigger if the comparison is true for any of the
11427          * time series that have been identified by `filter` and `aggregations`,
11428          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
11429          * are specified.
11430          * </pre>
11431          *
11432          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
11433          */
clearTrigger()11434         public Builder clearTrigger() {
11435           bitField0_ = (bitField0_ & ~0x00000004);
11436           trigger_ = null;
11437           if (triggerBuilder_ != null) {
11438             triggerBuilder_.dispose();
11439             triggerBuilder_ = null;
11440           }
11441           onChanged();
11442           return this;
11443         }
11444         /**
11445          *
11446          *
11447          * <pre>
11448          * The number/percent of time series for which the comparison must hold
11449          * in order for the condition to trigger. If unspecified, then the
11450          * condition will trigger if the comparison is true for any of the
11451          * time series that have been identified by `filter` and `aggregations`,
11452          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
11453          * are specified.
11454          * </pre>
11455          *
11456          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
11457          */
getTriggerBuilder()11458         public com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder getTriggerBuilder() {
11459           bitField0_ |= 0x00000004;
11460           onChanged();
11461           return getTriggerFieldBuilder().getBuilder();
11462         }
11463         /**
11464          *
11465          *
11466          * <pre>
11467          * The number/percent of time series for which the comparison must hold
11468          * in order for the condition to trigger. If unspecified, then the
11469          * condition will trigger if the comparison is true for any of the
11470          * time series that have been identified by `filter` and `aggregations`,
11471          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
11472          * are specified.
11473          * </pre>
11474          *
11475          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
11476          */
11477         public com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder
getTriggerOrBuilder()11478             getTriggerOrBuilder() {
11479           if (triggerBuilder_ != null) {
11480             return triggerBuilder_.getMessageOrBuilder();
11481           } else {
11482             return trigger_ == null
11483                 ? com.google.monitoring.v3.AlertPolicy.Condition.Trigger.getDefaultInstance()
11484                 : trigger_;
11485           }
11486         }
11487         /**
11488          *
11489          *
11490          * <pre>
11491          * The number/percent of time series for which the comparison must hold
11492          * in order for the condition to trigger. If unspecified, then the
11493          * condition will trigger if the comparison is true for any of the
11494          * time series that have been identified by `filter` and `aggregations`,
11495          * or by the ratio, if `denominator_filter` and `denominator_aggregations`
11496          * are specified.
11497          * </pre>
11498          *
11499          * <code>.google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3;</code>
11500          */
11501         private com.google.protobuf.SingleFieldBuilderV3<
11502                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger,
11503                 com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder,
11504                 com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder>
getTriggerFieldBuilder()11505             getTriggerFieldBuilder() {
11506           if (triggerBuilder_ == null) {
11507             triggerBuilder_ =
11508                 new com.google.protobuf.SingleFieldBuilderV3<
11509                     com.google.monitoring.v3.AlertPolicy.Condition.Trigger,
11510                     com.google.monitoring.v3.AlertPolicy.Condition.Trigger.Builder,
11511                     com.google.monitoring.v3.AlertPolicy.Condition.TriggerOrBuilder>(
11512                     getTrigger(), getParentForChildren(), isClean());
11513             trigger_ = null;
11514           }
11515           return triggerBuilder_;
11516         }
11517 
11518         private int evaluationMissingData_ = 0;
11519         /**
11520          *
11521          *
11522          * <pre>
11523          * A condition control that determines how metric-threshold conditions
11524          * are evaluated when data stops arriving.
11525          * </pre>
11526          *
11527          * <code>
11528          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
11529          * </code>
11530          *
11531          * @return The enum numeric value on the wire for evaluationMissingData.
11532          */
11533         @java.lang.Override
getEvaluationMissingDataValue()11534         public int getEvaluationMissingDataValue() {
11535           return evaluationMissingData_;
11536         }
11537         /**
11538          *
11539          *
11540          * <pre>
11541          * A condition control that determines how metric-threshold conditions
11542          * are evaluated when data stops arriving.
11543          * </pre>
11544          *
11545          * <code>
11546          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
11547          * </code>
11548          *
11549          * @param value The enum numeric value on the wire for evaluationMissingData to set.
11550          * @return This builder for chaining.
11551          */
setEvaluationMissingDataValue(int value)11552         public Builder setEvaluationMissingDataValue(int value) {
11553           evaluationMissingData_ = value;
11554           bitField0_ |= 0x00000008;
11555           onChanged();
11556           return this;
11557         }
11558         /**
11559          *
11560          *
11561          * <pre>
11562          * A condition control that determines how metric-threshold conditions
11563          * are evaluated when data stops arriving.
11564          * </pre>
11565          *
11566          * <code>
11567          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
11568          * </code>
11569          *
11570          * @return The evaluationMissingData.
11571          */
11572         @java.lang.Override
11573         public com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData
getEvaluationMissingData()11574             getEvaluationMissingData() {
11575           com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData result =
11576               com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData.forNumber(
11577                   evaluationMissingData_);
11578           return result == null
11579               ? com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData.UNRECOGNIZED
11580               : result;
11581         }
11582         /**
11583          *
11584          *
11585          * <pre>
11586          * A condition control that determines how metric-threshold conditions
11587          * are evaluated when data stops arriving.
11588          * </pre>
11589          *
11590          * <code>
11591          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
11592          * </code>
11593          *
11594          * @param value The evaluationMissingData to set.
11595          * @return This builder for chaining.
11596          */
setEvaluationMissingData( com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData value)11597         public Builder setEvaluationMissingData(
11598             com.google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData value) {
11599           if (value == null) {
11600             throw new NullPointerException();
11601           }
11602           bitField0_ |= 0x00000008;
11603           evaluationMissingData_ = value.getNumber();
11604           onChanged();
11605           return this;
11606         }
11607         /**
11608          *
11609          *
11610          * <pre>
11611          * A condition control that determines how metric-threshold conditions
11612          * are evaluated when data stops arriving.
11613          * </pre>
11614          *
11615          * <code>
11616          * .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4;
11617          * </code>
11618          *
11619          * @return This builder for chaining.
11620          */
clearEvaluationMissingData()11621         public Builder clearEvaluationMissingData() {
11622           bitField0_ = (bitField0_ & ~0x00000008);
11623           evaluationMissingData_ = 0;
11624           onChanged();
11625           return this;
11626         }
11627 
11628         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)11629         public final Builder setUnknownFields(
11630             final com.google.protobuf.UnknownFieldSet unknownFields) {
11631           return super.setUnknownFields(unknownFields);
11632         }
11633 
11634         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)11635         public final Builder mergeUnknownFields(
11636             final com.google.protobuf.UnknownFieldSet unknownFields) {
11637           return super.mergeUnknownFields(unknownFields);
11638         }
11639 
11640         // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
11641       }
11642 
11643       // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
11644       private static final com.google.monitoring.v3.AlertPolicy.Condition
11645               .MonitoringQueryLanguageCondition
11646           DEFAULT_INSTANCE;
11647 
11648       static {
11649         DEFAULT_INSTANCE =
11650             new com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition();
11651       }
11652 
11653       public static com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
getDefaultInstance()11654           getDefaultInstance() {
11655         return DEFAULT_INSTANCE;
11656       }
11657 
11658       private static final com.google.protobuf.Parser<MonitoringQueryLanguageCondition> PARSER =
11659           new com.google.protobuf.AbstractParser<MonitoringQueryLanguageCondition>() {
11660             @java.lang.Override
11661             public MonitoringQueryLanguageCondition parsePartialFrom(
11662                 com.google.protobuf.CodedInputStream input,
11663                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11664                 throws com.google.protobuf.InvalidProtocolBufferException {
11665               Builder builder = newBuilder();
11666               try {
11667                 builder.mergeFrom(input, extensionRegistry);
11668               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
11669                 throw e.setUnfinishedMessage(builder.buildPartial());
11670               } catch (com.google.protobuf.UninitializedMessageException e) {
11671                 throw e.asInvalidProtocolBufferException()
11672                     .setUnfinishedMessage(builder.buildPartial());
11673               } catch (java.io.IOException e) {
11674                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
11675                     .setUnfinishedMessage(builder.buildPartial());
11676               }
11677               return builder.buildPartial();
11678             }
11679           };
11680 
parser()11681       public static com.google.protobuf.Parser<MonitoringQueryLanguageCondition> parser() {
11682         return PARSER;
11683       }
11684 
11685       @java.lang.Override
getParserForType()11686       public com.google.protobuf.Parser<MonitoringQueryLanguageCondition> getParserForType() {
11687         return PARSER;
11688       }
11689 
11690       @java.lang.Override
11691       public com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
getDefaultInstanceForType()11692           getDefaultInstanceForType() {
11693         return DEFAULT_INSTANCE;
11694       }
11695     }
11696 
11697     private int conditionCase_ = 0;
11698     private java.lang.Object condition_;
11699 
11700     public enum ConditionCase
11701         implements
11702             com.google.protobuf.Internal.EnumLite,
11703             com.google.protobuf.AbstractMessage.InternalOneOfEnum {
11704       CONDITION_THRESHOLD(1),
11705       CONDITION_ABSENT(2),
11706       CONDITION_MATCHED_LOG(20),
11707       CONDITION_MONITORING_QUERY_LANGUAGE(19),
11708       CONDITION_NOT_SET(0);
11709       private final int value;
11710 
ConditionCase(int value)11711       private ConditionCase(int value) {
11712         this.value = value;
11713       }
11714       /**
11715        * @param value The number of the enum to look for.
11716        * @return The enum associated with the given number.
11717        * @deprecated Use {@link #forNumber(int)} instead.
11718        */
11719       @java.lang.Deprecated
valueOf(int value)11720       public static ConditionCase valueOf(int value) {
11721         return forNumber(value);
11722       }
11723 
forNumber(int value)11724       public static ConditionCase forNumber(int value) {
11725         switch (value) {
11726           case 1:
11727             return CONDITION_THRESHOLD;
11728           case 2:
11729             return CONDITION_ABSENT;
11730           case 20:
11731             return CONDITION_MATCHED_LOG;
11732           case 19:
11733             return CONDITION_MONITORING_QUERY_LANGUAGE;
11734           case 0:
11735             return CONDITION_NOT_SET;
11736           default:
11737             return null;
11738         }
11739       }
11740 
getNumber()11741       public int getNumber() {
11742         return this.value;
11743       }
11744     };
11745 
getConditionCase()11746     public ConditionCase getConditionCase() {
11747       return ConditionCase.forNumber(conditionCase_);
11748     }
11749 
11750     public static final int NAME_FIELD_NUMBER = 12;
11751 
11752     @SuppressWarnings("serial")
11753     private volatile java.lang.Object name_ = "";
11754     /**
11755      *
11756      *
11757      * <pre>
11758      * Required if the condition exists. The unique resource name for this
11759      * condition. Its format is:
11760      *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
11761      * `[CONDITION_ID]` is assigned by Cloud Monitoring when the
11762      * condition is created as part of a new or updated alerting policy.
11763      * When calling the
11764      * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
11765      * method, do not include the `name` field in the conditions of the
11766      * requested alerting policy. Cloud Monitoring creates the
11767      * condition identifiers and includes them in the new policy.
11768      * When calling the
11769      * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
11770      * method to update a policy, including a condition `name` causes the
11771      * existing condition to be updated. Conditions without names are added to
11772      * the updated policy. Existing conditions are deleted if they are not
11773      * updated.
11774      * Best practice is to preserve `[CONDITION_ID]` if you make only small
11775      * changes, such as those to condition thresholds, durations, or trigger
11776      * values.  Otherwise, treat the change as a new condition and let the
11777      * existing condition be deleted.
11778      * </pre>
11779      *
11780      * <code>string name = 12;</code>
11781      *
11782      * @return The name.
11783      */
11784     @java.lang.Override
getName()11785     public java.lang.String getName() {
11786       java.lang.Object ref = name_;
11787       if (ref instanceof java.lang.String) {
11788         return (java.lang.String) ref;
11789       } else {
11790         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
11791         java.lang.String s = bs.toStringUtf8();
11792         name_ = s;
11793         return s;
11794       }
11795     }
11796     /**
11797      *
11798      *
11799      * <pre>
11800      * Required if the condition exists. The unique resource name for this
11801      * condition. Its format is:
11802      *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
11803      * `[CONDITION_ID]` is assigned by Cloud Monitoring when the
11804      * condition is created as part of a new or updated alerting policy.
11805      * When calling the
11806      * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
11807      * method, do not include the `name` field in the conditions of the
11808      * requested alerting policy. Cloud Monitoring creates the
11809      * condition identifiers and includes them in the new policy.
11810      * When calling the
11811      * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
11812      * method to update a policy, including a condition `name` causes the
11813      * existing condition to be updated. Conditions without names are added to
11814      * the updated policy. Existing conditions are deleted if they are not
11815      * updated.
11816      * Best practice is to preserve `[CONDITION_ID]` if you make only small
11817      * changes, such as those to condition thresholds, durations, or trigger
11818      * values.  Otherwise, treat the change as a new condition and let the
11819      * existing condition be deleted.
11820      * </pre>
11821      *
11822      * <code>string name = 12;</code>
11823      *
11824      * @return The bytes for name.
11825      */
11826     @java.lang.Override
getNameBytes()11827     public com.google.protobuf.ByteString getNameBytes() {
11828       java.lang.Object ref = name_;
11829       if (ref instanceof java.lang.String) {
11830         com.google.protobuf.ByteString b =
11831             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
11832         name_ = b;
11833         return b;
11834       } else {
11835         return (com.google.protobuf.ByteString) ref;
11836       }
11837     }
11838 
11839     public static final int DISPLAY_NAME_FIELD_NUMBER = 6;
11840 
11841     @SuppressWarnings("serial")
11842     private volatile java.lang.Object displayName_ = "";
11843     /**
11844      *
11845      *
11846      * <pre>
11847      * A short name or phrase used to identify the condition in dashboards,
11848      * notifications, and incidents. To avoid confusion, don't use the same
11849      * display name for multiple conditions in the same policy.
11850      * </pre>
11851      *
11852      * <code>string display_name = 6;</code>
11853      *
11854      * @return The displayName.
11855      */
11856     @java.lang.Override
getDisplayName()11857     public java.lang.String getDisplayName() {
11858       java.lang.Object ref = displayName_;
11859       if (ref instanceof java.lang.String) {
11860         return (java.lang.String) ref;
11861       } else {
11862         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
11863         java.lang.String s = bs.toStringUtf8();
11864         displayName_ = s;
11865         return s;
11866       }
11867     }
11868     /**
11869      *
11870      *
11871      * <pre>
11872      * A short name or phrase used to identify the condition in dashboards,
11873      * notifications, and incidents. To avoid confusion, don't use the same
11874      * display name for multiple conditions in the same policy.
11875      * </pre>
11876      *
11877      * <code>string display_name = 6;</code>
11878      *
11879      * @return The bytes for displayName.
11880      */
11881     @java.lang.Override
getDisplayNameBytes()11882     public com.google.protobuf.ByteString getDisplayNameBytes() {
11883       java.lang.Object ref = displayName_;
11884       if (ref instanceof java.lang.String) {
11885         com.google.protobuf.ByteString b =
11886             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
11887         displayName_ = b;
11888         return b;
11889       } else {
11890         return (com.google.protobuf.ByteString) ref;
11891       }
11892     }
11893 
11894     public static final int CONDITION_THRESHOLD_FIELD_NUMBER = 1;
11895     /**
11896      *
11897      *
11898      * <pre>
11899      * A condition that compares a time series against a threshold.
11900      * </pre>
11901      *
11902      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
11903      * </code>
11904      *
11905      * @return Whether the conditionThreshold field is set.
11906      */
11907     @java.lang.Override
hasConditionThreshold()11908     public boolean hasConditionThreshold() {
11909       return conditionCase_ == 1;
11910     }
11911     /**
11912      *
11913      *
11914      * <pre>
11915      * A condition that compares a time series against a threshold.
11916      * </pre>
11917      *
11918      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
11919      * </code>
11920      *
11921      * @return The conditionThreshold.
11922      */
11923     @java.lang.Override
getConditionThreshold()11924     public com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold getConditionThreshold() {
11925       if (conditionCase_ == 1) {
11926         return (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) condition_;
11927       }
11928       return com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.getDefaultInstance();
11929     }
11930     /**
11931      *
11932      *
11933      * <pre>
11934      * A condition that compares a time series against a threshold.
11935      * </pre>
11936      *
11937      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
11938      * </code>
11939      */
11940     @java.lang.Override
11941     public com.google.monitoring.v3.AlertPolicy.Condition.MetricThresholdOrBuilder
getConditionThresholdOrBuilder()11942         getConditionThresholdOrBuilder() {
11943       if (conditionCase_ == 1) {
11944         return (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) condition_;
11945       }
11946       return com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.getDefaultInstance();
11947     }
11948 
11949     public static final int CONDITION_ABSENT_FIELD_NUMBER = 2;
11950     /**
11951      *
11952      *
11953      * <pre>
11954      * A condition that checks that a time series continues to
11955      * receive new data points.
11956      * </pre>
11957      *
11958      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;</code>
11959      *
11960      * @return Whether the conditionAbsent field is set.
11961      */
11962     @java.lang.Override
hasConditionAbsent()11963     public boolean hasConditionAbsent() {
11964       return conditionCase_ == 2;
11965     }
11966     /**
11967      *
11968      *
11969      * <pre>
11970      * A condition that checks that a time series continues to
11971      * receive new data points.
11972      * </pre>
11973      *
11974      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;</code>
11975      *
11976      * @return The conditionAbsent.
11977      */
11978     @java.lang.Override
getConditionAbsent()11979     public com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence getConditionAbsent() {
11980       if (conditionCase_ == 2) {
11981         return (com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) condition_;
11982       }
11983       return com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.getDefaultInstance();
11984     }
11985     /**
11986      *
11987      *
11988      * <pre>
11989      * A condition that checks that a time series continues to
11990      * receive new data points.
11991      * </pre>
11992      *
11993      * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;</code>
11994      */
11995     @java.lang.Override
11996     public com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsenceOrBuilder
getConditionAbsentOrBuilder()11997         getConditionAbsentOrBuilder() {
11998       if (conditionCase_ == 2) {
11999         return (com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) condition_;
12000       }
12001       return com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.getDefaultInstance();
12002     }
12003 
12004     public static final int CONDITION_MATCHED_LOG_FIELD_NUMBER = 20;
12005     /**
12006      *
12007      *
12008      * <pre>
12009      * A condition that checks for log messages matching given constraints. If
12010      * set, no other conditions can be present.
12011      * </pre>
12012      *
12013      * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;</code>
12014      *
12015      * @return Whether the conditionMatchedLog field is set.
12016      */
12017     @java.lang.Override
hasConditionMatchedLog()12018     public boolean hasConditionMatchedLog() {
12019       return conditionCase_ == 20;
12020     }
12021     /**
12022      *
12023      *
12024      * <pre>
12025      * A condition that checks for log messages matching given constraints. If
12026      * set, no other conditions can be present.
12027      * </pre>
12028      *
12029      * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;</code>
12030      *
12031      * @return The conditionMatchedLog.
12032      */
12033     @java.lang.Override
getConditionMatchedLog()12034     public com.google.monitoring.v3.AlertPolicy.Condition.LogMatch getConditionMatchedLog() {
12035       if (conditionCase_ == 20) {
12036         return (com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) condition_;
12037       }
12038       return com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.getDefaultInstance();
12039     }
12040     /**
12041      *
12042      *
12043      * <pre>
12044      * A condition that checks for log messages matching given constraints. If
12045      * set, no other conditions can be present.
12046      * </pre>
12047      *
12048      * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;</code>
12049      */
12050     @java.lang.Override
12051     public com.google.monitoring.v3.AlertPolicy.Condition.LogMatchOrBuilder
getConditionMatchedLogOrBuilder()12052         getConditionMatchedLogOrBuilder() {
12053       if (conditionCase_ == 20) {
12054         return (com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) condition_;
12055       }
12056       return com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.getDefaultInstance();
12057     }
12058 
12059     public static final int CONDITION_MONITORING_QUERY_LANGUAGE_FIELD_NUMBER = 19;
12060     /**
12061      *
12062      *
12063      * <pre>
12064      * A condition that uses the Monitoring Query Language to define
12065      * alerts.
12066      * </pre>
12067      *
12068      * <code>
12069      * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
12070      * </code>
12071      *
12072      * @return Whether the conditionMonitoringQueryLanguage field is set.
12073      */
12074     @java.lang.Override
hasConditionMonitoringQueryLanguage()12075     public boolean hasConditionMonitoringQueryLanguage() {
12076       return conditionCase_ == 19;
12077     }
12078     /**
12079      *
12080      *
12081      * <pre>
12082      * A condition that uses the Monitoring Query Language to define
12083      * alerts.
12084      * </pre>
12085      *
12086      * <code>
12087      * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
12088      * </code>
12089      *
12090      * @return The conditionMonitoringQueryLanguage.
12091      */
12092     @java.lang.Override
12093     public com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
getConditionMonitoringQueryLanguage()12094         getConditionMonitoringQueryLanguage() {
12095       if (conditionCase_ == 19) {
12096         return (com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
12097             condition_;
12098       }
12099       return com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
12100           .getDefaultInstance();
12101     }
12102     /**
12103      *
12104      *
12105      * <pre>
12106      * A condition that uses the Monitoring Query Language to define
12107      * alerts.
12108      * </pre>
12109      *
12110      * <code>
12111      * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
12112      * </code>
12113      */
12114     @java.lang.Override
12115     public com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageConditionOrBuilder
getConditionMonitoringQueryLanguageOrBuilder()12116         getConditionMonitoringQueryLanguageOrBuilder() {
12117       if (conditionCase_ == 19) {
12118         return (com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
12119             condition_;
12120       }
12121       return com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
12122           .getDefaultInstance();
12123     }
12124 
12125     private byte memoizedIsInitialized = -1;
12126 
12127     @java.lang.Override
isInitialized()12128     public final boolean isInitialized() {
12129       byte isInitialized = memoizedIsInitialized;
12130       if (isInitialized == 1) return true;
12131       if (isInitialized == 0) return false;
12132 
12133       memoizedIsInitialized = 1;
12134       return true;
12135     }
12136 
12137     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)12138     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
12139       if (conditionCase_ == 1) {
12140         output.writeMessage(
12141             1, (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) condition_);
12142       }
12143       if (conditionCase_ == 2) {
12144         output.writeMessage(
12145             2, (com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) condition_);
12146       }
12147       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
12148         com.google.protobuf.GeneratedMessageV3.writeString(output, 6, displayName_);
12149       }
12150       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
12151         com.google.protobuf.GeneratedMessageV3.writeString(output, 12, name_);
12152       }
12153       if (conditionCase_ == 19) {
12154         output.writeMessage(
12155             19,
12156             (com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
12157                 condition_);
12158       }
12159       if (conditionCase_ == 20) {
12160         output.writeMessage(
12161             20, (com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) condition_);
12162       }
12163       getUnknownFields().writeTo(output);
12164     }
12165 
12166     @java.lang.Override
getSerializedSize()12167     public int getSerializedSize() {
12168       int size = memoizedSize;
12169       if (size != -1) return size;
12170 
12171       size = 0;
12172       if (conditionCase_ == 1) {
12173         size +=
12174             com.google.protobuf.CodedOutputStream.computeMessageSize(
12175                 1, (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) condition_);
12176       }
12177       if (conditionCase_ == 2) {
12178         size +=
12179             com.google.protobuf.CodedOutputStream.computeMessageSize(
12180                 2, (com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) condition_);
12181       }
12182       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
12183         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, displayName_);
12184       }
12185       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
12186         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, name_);
12187       }
12188       if (conditionCase_ == 19) {
12189         size +=
12190             com.google.protobuf.CodedOutputStream.computeMessageSize(
12191                 19,
12192                 (com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
12193                     condition_);
12194       }
12195       if (conditionCase_ == 20) {
12196         size +=
12197             com.google.protobuf.CodedOutputStream.computeMessageSize(
12198                 20, (com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) condition_);
12199       }
12200       size += getUnknownFields().getSerializedSize();
12201       memoizedSize = size;
12202       return size;
12203     }
12204 
12205     @java.lang.Override
equals(final java.lang.Object obj)12206     public boolean equals(final java.lang.Object obj) {
12207       if (obj == this) {
12208         return true;
12209       }
12210       if (!(obj instanceof com.google.monitoring.v3.AlertPolicy.Condition)) {
12211         return super.equals(obj);
12212       }
12213       com.google.monitoring.v3.AlertPolicy.Condition other =
12214           (com.google.monitoring.v3.AlertPolicy.Condition) obj;
12215 
12216       if (!getName().equals(other.getName())) return false;
12217       if (!getDisplayName().equals(other.getDisplayName())) return false;
12218       if (!getConditionCase().equals(other.getConditionCase())) return false;
12219       switch (conditionCase_) {
12220         case 1:
12221           if (!getConditionThreshold().equals(other.getConditionThreshold())) return false;
12222           break;
12223         case 2:
12224           if (!getConditionAbsent().equals(other.getConditionAbsent())) return false;
12225           break;
12226         case 20:
12227           if (!getConditionMatchedLog().equals(other.getConditionMatchedLog())) return false;
12228           break;
12229         case 19:
12230           if (!getConditionMonitoringQueryLanguage()
12231               .equals(other.getConditionMonitoringQueryLanguage())) return false;
12232           break;
12233         case 0:
12234         default:
12235       }
12236       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
12237       return true;
12238     }
12239 
12240     @java.lang.Override
hashCode()12241     public int hashCode() {
12242       if (memoizedHashCode != 0) {
12243         return memoizedHashCode;
12244       }
12245       int hash = 41;
12246       hash = (19 * hash) + getDescriptor().hashCode();
12247       hash = (37 * hash) + NAME_FIELD_NUMBER;
12248       hash = (53 * hash) + getName().hashCode();
12249       hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
12250       hash = (53 * hash) + getDisplayName().hashCode();
12251       switch (conditionCase_) {
12252         case 1:
12253           hash = (37 * hash) + CONDITION_THRESHOLD_FIELD_NUMBER;
12254           hash = (53 * hash) + getConditionThreshold().hashCode();
12255           break;
12256         case 2:
12257           hash = (37 * hash) + CONDITION_ABSENT_FIELD_NUMBER;
12258           hash = (53 * hash) + getConditionAbsent().hashCode();
12259           break;
12260         case 20:
12261           hash = (37 * hash) + CONDITION_MATCHED_LOG_FIELD_NUMBER;
12262           hash = (53 * hash) + getConditionMatchedLog().hashCode();
12263           break;
12264         case 19:
12265           hash = (37 * hash) + CONDITION_MONITORING_QUERY_LANGUAGE_FIELD_NUMBER;
12266           hash = (53 * hash) + getConditionMonitoringQueryLanguage().hashCode();
12267           break;
12268         case 0:
12269         default:
12270       }
12271       hash = (29 * hash) + getUnknownFields().hashCode();
12272       memoizedHashCode = hash;
12273       return hash;
12274     }
12275 
parseFrom(java.nio.ByteBuffer data)12276     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(java.nio.ByteBuffer data)
12277         throws com.google.protobuf.InvalidProtocolBufferException {
12278       return PARSER.parseFrom(data);
12279     }
12280 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)12281     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(
12282         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12283         throws com.google.protobuf.InvalidProtocolBufferException {
12284       return PARSER.parseFrom(data, extensionRegistry);
12285     }
12286 
parseFrom( com.google.protobuf.ByteString data)12287     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(
12288         com.google.protobuf.ByteString data)
12289         throws com.google.protobuf.InvalidProtocolBufferException {
12290       return PARSER.parseFrom(data);
12291     }
12292 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)12293     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(
12294         com.google.protobuf.ByteString data,
12295         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12296         throws com.google.protobuf.InvalidProtocolBufferException {
12297       return PARSER.parseFrom(data, extensionRegistry);
12298     }
12299 
parseFrom(byte[] data)12300     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(byte[] data)
12301         throws com.google.protobuf.InvalidProtocolBufferException {
12302       return PARSER.parseFrom(data);
12303     }
12304 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)12305     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(
12306         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12307         throws com.google.protobuf.InvalidProtocolBufferException {
12308       return PARSER.parseFrom(data, extensionRegistry);
12309     }
12310 
parseFrom( java.io.InputStream input)12311     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(
12312         java.io.InputStream input) throws java.io.IOException {
12313       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
12314     }
12315 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)12316     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(
12317         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12318         throws java.io.IOException {
12319       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
12320           PARSER, input, extensionRegistry);
12321     }
12322 
parseDelimitedFrom( java.io.InputStream input)12323     public static com.google.monitoring.v3.AlertPolicy.Condition parseDelimitedFrom(
12324         java.io.InputStream input) throws java.io.IOException {
12325       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
12326     }
12327 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)12328     public static com.google.monitoring.v3.AlertPolicy.Condition parseDelimitedFrom(
12329         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12330         throws java.io.IOException {
12331       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
12332           PARSER, input, extensionRegistry);
12333     }
12334 
parseFrom( com.google.protobuf.CodedInputStream input)12335     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(
12336         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
12337       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
12338     }
12339 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)12340     public static com.google.monitoring.v3.AlertPolicy.Condition parseFrom(
12341         com.google.protobuf.CodedInputStream input,
12342         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12343         throws java.io.IOException {
12344       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
12345           PARSER, input, extensionRegistry);
12346     }
12347 
12348     @java.lang.Override
newBuilderForType()12349     public Builder newBuilderForType() {
12350       return newBuilder();
12351     }
12352 
newBuilder()12353     public static Builder newBuilder() {
12354       return DEFAULT_INSTANCE.toBuilder();
12355     }
12356 
newBuilder(com.google.monitoring.v3.AlertPolicy.Condition prototype)12357     public static Builder newBuilder(com.google.monitoring.v3.AlertPolicy.Condition prototype) {
12358       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
12359     }
12360 
12361     @java.lang.Override
toBuilder()12362     public Builder toBuilder() {
12363       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
12364     }
12365 
12366     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)12367     protected Builder newBuilderForType(
12368         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
12369       Builder builder = new Builder(parent);
12370       return builder;
12371     }
12372     /**
12373      *
12374      *
12375      * <pre>
12376      * A condition is a true/false test that determines when an alerting policy
12377      * should open an incident. If a condition evaluates to true, it signifies
12378      * that something is wrong.
12379      * </pre>
12380      *
12381      * Protobuf type {@code google.monitoring.v3.AlertPolicy.Condition}
12382      */
12383     public static final class Builder
12384         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
12385         implements
12386         // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy.Condition)
12387         com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder {
getDescriptor()12388       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
12389         return com.google.monitoring.v3.AlertProto
12390             .internal_static_google_monitoring_v3_AlertPolicy_Condition_descriptor;
12391       }
12392 
12393       @java.lang.Override
12394       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()12395           internalGetFieldAccessorTable() {
12396         return com.google.monitoring.v3.AlertProto
12397             .internal_static_google_monitoring_v3_AlertPolicy_Condition_fieldAccessorTable
12398             .ensureFieldAccessorsInitialized(
12399                 com.google.monitoring.v3.AlertPolicy.Condition.class,
12400                 com.google.monitoring.v3.AlertPolicy.Condition.Builder.class);
12401       }
12402 
12403       // Construct using com.google.monitoring.v3.AlertPolicy.Condition.newBuilder()
Builder()12404       private Builder() {}
12405 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)12406       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
12407         super(parent);
12408       }
12409 
12410       @java.lang.Override
clear()12411       public Builder clear() {
12412         super.clear();
12413         bitField0_ = 0;
12414         name_ = "";
12415         displayName_ = "";
12416         if (conditionThresholdBuilder_ != null) {
12417           conditionThresholdBuilder_.clear();
12418         }
12419         if (conditionAbsentBuilder_ != null) {
12420           conditionAbsentBuilder_.clear();
12421         }
12422         if (conditionMatchedLogBuilder_ != null) {
12423           conditionMatchedLogBuilder_.clear();
12424         }
12425         if (conditionMonitoringQueryLanguageBuilder_ != null) {
12426           conditionMonitoringQueryLanguageBuilder_.clear();
12427         }
12428         conditionCase_ = 0;
12429         condition_ = null;
12430         return this;
12431       }
12432 
12433       @java.lang.Override
getDescriptorForType()12434       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
12435         return com.google.monitoring.v3.AlertProto
12436             .internal_static_google_monitoring_v3_AlertPolicy_Condition_descriptor;
12437       }
12438 
12439       @java.lang.Override
getDefaultInstanceForType()12440       public com.google.monitoring.v3.AlertPolicy.Condition getDefaultInstanceForType() {
12441         return com.google.monitoring.v3.AlertPolicy.Condition.getDefaultInstance();
12442       }
12443 
12444       @java.lang.Override
build()12445       public com.google.monitoring.v3.AlertPolicy.Condition build() {
12446         com.google.monitoring.v3.AlertPolicy.Condition result = buildPartial();
12447         if (!result.isInitialized()) {
12448           throw newUninitializedMessageException(result);
12449         }
12450         return result;
12451       }
12452 
12453       @java.lang.Override
buildPartial()12454       public com.google.monitoring.v3.AlertPolicy.Condition buildPartial() {
12455         com.google.monitoring.v3.AlertPolicy.Condition result =
12456             new com.google.monitoring.v3.AlertPolicy.Condition(this);
12457         if (bitField0_ != 0) {
12458           buildPartial0(result);
12459         }
12460         buildPartialOneofs(result);
12461         onBuilt();
12462         return result;
12463       }
12464 
buildPartial0(com.google.monitoring.v3.AlertPolicy.Condition result)12465       private void buildPartial0(com.google.monitoring.v3.AlertPolicy.Condition result) {
12466         int from_bitField0_ = bitField0_;
12467         if (((from_bitField0_ & 0x00000001) != 0)) {
12468           result.name_ = name_;
12469         }
12470         if (((from_bitField0_ & 0x00000002) != 0)) {
12471           result.displayName_ = displayName_;
12472         }
12473       }
12474 
buildPartialOneofs(com.google.monitoring.v3.AlertPolicy.Condition result)12475       private void buildPartialOneofs(com.google.monitoring.v3.AlertPolicy.Condition result) {
12476         result.conditionCase_ = conditionCase_;
12477         result.condition_ = this.condition_;
12478         if (conditionCase_ == 1 && conditionThresholdBuilder_ != null) {
12479           result.condition_ = conditionThresholdBuilder_.build();
12480         }
12481         if (conditionCase_ == 2 && conditionAbsentBuilder_ != null) {
12482           result.condition_ = conditionAbsentBuilder_.build();
12483         }
12484         if (conditionCase_ == 20 && conditionMatchedLogBuilder_ != null) {
12485           result.condition_ = conditionMatchedLogBuilder_.build();
12486         }
12487         if (conditionCase_ == 19 && conditionMonitoringQueryLanguageBuilder_ != null) {
12488           result.condition_ = conditionMonitoringQueryLanguageBuilder_.build();
12489         }
12490       }
12491 
12492       @java.lang.Override
clone()12493       public Builder clone() {
12494         return super.clone();
12495       }
12496 
12497       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)12498       public Builder setField(
12499           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
12500         return super.setField(field, value);
12501       }
12502 
12503       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)12504       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
12505         return super.clearField(field);
12506       }
12507 
12508       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)12509       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
12510         return super.clearOneof(oneof);
12511       }
12512 
12513       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)12514       public Builder setRepeatedField(
12515           com.google.protobuf.Descriptors.FieldDescriptor field,
12516           int index,
12517           java.lang.Object value) {
12518         return super.setRepeatedField(field, index, value);
12519       }
12520 
12521       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)12522       public Builder addRepeatedField(
12523           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
12524         return super.addRepeatedField(field, value);
12525       }
12526 
12527       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)12528       public Builder mergeFrom(com.google.protobuf.Message other) {
12529         if (other instanceof com.google.monitoring.v3.AlertPolicy.Condition) {
12530           return mergeFrom((com.google.monitoring.v3.AlertPolicy.Condition) other);
12531         } else {
12532           super.mergeFrom(other);
12533           return this;
12534         }
12535       }
12536 
mergeFrom(com.google.monitoring.v3.AlertPolicy.Condition other)12537       public Builder mergeFrom(com.google.monitoring.v3.AlertPolicy.Condition other) {
12538         if (other == com.google.monitoring.v3.AlertPolicy.Condition.getDefaultInstance())
12539           return this;
12540         if (!other.getName().isEmpty()) {
12541           name_ = other.name_;
12542           bitField0_ |= 0x00000001;
12543           onChanged();
12544         }
12545         if (!other.getDisplayName().isEmpty()) {
12546           displayName_ = other.displayName_;
12547           bitField0_ |= 0x00000002;
12548           onChanged();
12549         }
12550         switch (other.getConditionCase()) {
12551           case CONDITION_THRESHOLD:
12552             {
12553               mergeConditionThreshold(other.getConditionThreshold());
12554               break;
12555             }
12556           case CONDITION_ABSENT:
12557             {
12558               mergeConditionAbsent(other.getConditionAbsent());
12559               break;
12560             }
12561           case CONDITION_MATCHED_LOG:
12562             {
12563               mergeConditionMatchedLog(other.getConditionMatchedLog());
12564               break;
12565             }
12566           case CONDITION_MONITORING_QUERY_LANGUAGE:
12567             {
12568               mergeConditionMonitoringQueryLanguage(other.getConditionMonitoringQueryLanguage());
12569               break;
12570             }
12571           case CONDITION_NOT_SET:
12572             {
12573               break;
12574             }
12575         }
12576         this.mergeUnknownFields(other.getUnknownFields());
12577         onChanged();
12578         return this;
12579       }
12580 
12581       @java.lang.Override
isInitialized()12582       public final boolean isInitialized() {
12583         return true;
12584       }
12585 
12586       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)12587       public Builder mergeFrom(
12588           com.google.protobuf.CodedInputStream input,
12589           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
12590           throws java.io.IOException {
12591         if (extensionRegistry == null) {
12592           throw new java.lang.NullPointerException();
12593         }
12594         try {
12595           boolean done = false;
12596           while (!done) {
12597             int tag = input.readTag();
12598             switch (tag) {
12599               case 0:
12600                 done = true;
12601                 break;
12602               case 10:
12603                 {
12604                   input.readMessage(
12605                       getConditionThresholdFieldBuilder().getBuilder(), extensionRegistry);
12606                   conditionCase_ = 1;
12607                   break;
12608                 } // case 10
12609               case 18:
12610                 {
12611                   input.readMessage(
12612                       getConditionAbsentFieldBuilder().getBuilder(), extensionRegistry);
12613                   conditionCase_ = 2;
12614                   break;
12615                 } // case 18
12616               case 50:
12617                 {
12618                   displayName_ = input.readStringRequireUtf8();
12619                   bitField0_ |= 0x00000002;
12620                   break;
12621                 } // case 50
12622               case 98:
12623                 {
12624                   name_ = input.readStringRequireUtf8();
12625                   bitField0_ |= 0x00000001;
12626                   break;
12627                 } // case 98
12628               case 154:
12629                 {
12630                   input.readMessage(
12631                       getConditionMonitoringQueryLanguageFieldBuilder().getBuilder(),
12632                       extensionRegistry);
12633                   conditionCase_ = 19;
12634                   break;
12635                 } // case 154
12636               case 162:
12637                 {
12638                   input.readMessage(
12639                       getConditionMatchedLogFieldBuilder().getBuilder(), extensionRegistry);
12640                   conditionCase_ = 20;
12641                   break;
12642                 } // case 162
12643               default:
12644                 {
12645                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
12646                     done = true; // was an endgroup tag
12647                   }
12648                   break;
12649                 } // default:
12650             } // switch (tag)
12651           } // while (!done)
12652         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
12653           throw e.unwrapIOException();
12654         } finally {
12655           onChanged();
12656         } // finally
12657         return this;
12658       }
12659 
12660       private int conditionCase_ = 0;
12661       private java.lang.Object condition_;
12662 
getConditionCase()12663       public ConditionCase getConditionCase() {
12664         return ConditionCase.forNumber(conditionCase_);
12665       }
12666 
clearCondition()12667       public Builder clearCondition() {
12668         conditionCase_ = 0;
12669         condition_ = null;
12670         onChanged();
12671         return this;
12672       }
12673 
12674       private int bitField0_;
12675 
12676       private java.lang.Object name_ = "";
12677       /**
12678        *
12679        *
12680        * <pre>
12681        * Required if the condition exists. The unique resource name for this
12682        * condition. Its format is:
12683        *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
12684        * `[CONDITION_ID]` is assigned by Cloud Monitoring when the
12685        * condition is created as part of a new or updated alerting policy.
12686        * When calling the
12687        * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
12688        * method, do not include the `name` field in the conditions of the
12689        * requested alerting policy. Cloud Monitoring creates the
12690        * condition identifiers and includes them in the new policy.
12691        * When calling the
12692        * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
12693        * method to update a policy, including a condition `name` causes the
12694        * existing condition to be updated. Conditions without names are added to
12695        * the updated policy. Existing conditions are deleted if they are not
12696        * updated.
12697        * Best practice is to preserve `[CONDITION_ID]` if you make only small
12698        * changes, such as those to condition thresholds, durations, or trigger
12699        * values.  Otherwise, treat the change as a new condition and let the
12700        * existing condition be deleted.
12701        * </pre>
12702        *
12703        * <code>string name = 12;</code>
12704        *
12705        * @return The name.
12706        */
getName()12707       public java.lang.String getName() {
12708         java.lang.Object ref = name_;
12709         if (!(ref instanceof java.lang.String)) {
12710           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
12711           java.lang.String s = bs.toStringUtf8();
12712           name_ = s;
12713           return s;
12714         } else {
12715           return (java.lang.String) ref;
12716         }
12717       }
12718       /**
12719        *
12720        *
12721        * <pre>
12722        * Required if the condition exists. The unique resource name for this
12723        * condition. Its format is:
12724        *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
12725        * `[CONDITION_ID]` is assigned by Cloud Monitoring when the
12726        * condition is created as part of a new or updated alerting policy.
12727        * When calling the
12728        * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
12729        * method, do not include the `name` field in the conditions of the
12730        * requested alerting policy. Cloud Monitoring creates the
12731        * condition identifiers and includes them in the new policy.
12732        * When calling the
12733        * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
12734        * method to update a policy, including a condition `name` causes the
12735        * existing condition to be updated. Conditions without names are added to
12736        * the updated policy. Existing conditions are deleted if they are not
12737        * updated.
12738        * Best practice is to preserve `[CONDITION_ID]` if you make only small
12739        * changes, such as those to condition thresholds, durations, or trigger
12740        * values.  Otherwise, treat the change as a new condition and let the
12741        * existing condition be deleted.
12742        * </pre>
12743        *
12744        * <code>string name = 12;</code>
12745        *
12746        * @return The bytes for name.
12747        */
getNameBytes()12748       public com.google.protobuf.ByteString getNameBytes() {
12749         java.lang.Object ref = name_;
12750         if (ref instanceof String) {
12751           com.google.protobuf.ByteString b =
12752               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
12753           name_ = b;
12754           return b;
12755         } else {
12756           return (com.google.protobuf.ByteString) ref;
12757         }
12758       }
12759       /**
12760        *
12761        *
12762        * <pre>
12763        * Required if the condition exists. The unique resource name for this
12764        * condition. Its format is:
12765        *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
12766        * `[CONDITION_ID]` is assigned by Cloud Monitoring when the
12767        * condition is created as part of a new or updated alerting policy.
12768        * When calling the
12769        * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
12770        * method, do not include the `name` field in the conditions of the
12771        * requested alerting policy. Cloud Monitoring creates the
12772        * condition identifiers and includes them in the new policy.
12773        * When calling the
12774        * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
12775        * method to update a policy, including a condition `name` causes the
12776        * existing condition to be updated. Conditions without names are added to
12777        * the updated policy. Existing conditions are deleted if they are not
12778        * updated.
12779        * Best practice is to preserve `[CONDITION_ID]` if you make only small
12780        * changes, such as those to condition thresholds, durations, or trigger
12781        * values.  Otherwise, treat the change as a new condition and let the
12782        * existing condition be deleted.
12783        * </pre>
12784        *
12785        * <code>string name = 12;</code>
12786        *
12787        * @param value The name to set.
12788        * @return This builder for chaining.
12789        */
setName(java.lang.String value)12790       public Builder setName(java.lang.String value) {
12791         if (value == null) {
12792           throw new NullPointerException();
12793         }
12794         name_ = value;
12795         bitField0_ |= 0x00000001;
12796         onChanged();
12797         return this;
12798       }
12799       /**
12800        *
12801        *
12802        * <pre>
12803        * Required if the condition exists. The unique resource name for this
12804        * condition. Its format is:
12805        *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
12806        * `[CONDITION_ID]` is assigned by Cloud Monitoring when the
12807        * condition is created as part of a new or updated alerting policy.
12808        * When calling the
12809        * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
12810        * method, do not include the `name` field in the conditions of the
12811        * requested alerting policy. Cloud Monitoring creates the
12812        * condition identifiers and includes them in the new policy.
12813        * When calling the
12814        * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
12815        * method to update a policy, including a condition `name` causes the
12816        * existing condition to be updated. Conditions without names are added to
12817        * the updated policy. Existing conditions are deleted if they are not
12818        * updated.
12819        * Best practice is to preserve `[CONDITION_ID]` if you make only small
12820        * changes, such as those to condition thresholds, durations, or trigger
12821        * values.  Otherwise, treat the change as a new condition and let the
12822        * existing condition be deleted.
12823        * </pre>
12824        *
12825        * <code>string name = 12;</code>
12826        *
12827        * @return This builder for chaining.
12828        */
clearName()12829       public Builder clearName() {
12830         name_ = getDefaultInstance().getName();
12831         bitField0_ = (bitField0_ & ~0x00000001);
12832         onChanged();
12833         return this;
12834       }
12835       /**
12836        *
12837        *
12838        * <pre>
12839        * Required if the condition exists. The unique resource name for this
12840        * condition. Its format is:
12841        *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
12842        * `[CONDITION_ID]` is assigned by Cloud Monitoring when the
12843        * condition is created as part of a new or updated alerting policy.
12844        * When calling the
12845        * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
12846        * method, do not include the `name` field in the conditions of the
12847        * requested alerting policy. Cloud Monitoring creates the
12848        * condition identifiers and includes them in the new policy.
12849        * When calling the
12850        * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
12851        * method to update a policy, including a condition `name` causes the
12852        * existing condition to be updated. Conditions without names are added to
12853        * the updated policy. Existing conditions are deleted if they are not
12854        * updated.
12855        * Best practice is to preserve `[CONDITION_ID]` if you make only small
12856        * changes, such as those to condition thresholds, durations, or trigger
12857        * values.  Otherwise, treat the change as a new condition and let the
12858        * existing condition be deleted.
12859        * </pre>
12860        *
12861        * <code>string name = 12;</code>
12862        *
12863        * @param value The bytes for name to set.
12864        * @return This builder for chaining.
12865        */
setNameBytes(com.google.protobuf.ByteString value)12866       public Builder setNameBytes(com.google.protobuf.ByteString value) {
12867         if (value == null) {
12868           throw new NullPointerException();
12869         }
12870         checkByteStringIsUtf8(value);
12871         name_ = value;
12872         bitField0_ |= 0x00000001;
12873         onChanged();
12874         return this;
12875       }
12876 
12877       private java.lang.Object displayName_ = "";
12878       /**
12879        *
12880        *
12881        * <pre>
12882        * A short name or phrase used to identify the condition in dashboards,
12883        * notifications, and incidents. To avoid confusion, don't use the same
12884        * display name for multiple conditions in the same policy.
12885        * </pre>
12886        *
12887        * <code>string display_name = 6;</code>
12888        *
12889        * @return The displayName.
12890        */
getDisplayName()12891       public java.lang.String getDisplayName() {
12892         java.lang.Object ref = displayName_;
12893         if (!(ref instanceof java.lang.String)) {
12894           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
12895           java.lang.String s = bs.toStringUtf8();
12896           displayName_ = s;
12897           return s;
12898         } else {
12899           return (java.lang.String) ref;
12900         }
12901       }
12902       /**
12903        *
12904        *
12905        * <pre>
12906        * A short name or phrase used to identify the condition in dashboards,
12907        * notifications, and incidents. To avoid confusion, don't use the same
12908        * display name for multiple conditions in the same policy.
12909        * </pre>
12910        *
12911        * <code>string display_name = 6;</code>
12912        *
12913        * @return The bytes for displayName.
12914        */
getDisplayNameBytes()12915       public com.google.protobuf.ByteString getDisplayNameBytes() {
12916         java.lang.Object ref = displayName_;
12917         if (ref instanceof String) {
12918           com.google.protobuf.ByteString b =
12919               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
12920           displayName_ = b;
12921           return b;
12922         } else {
12923           return (com.google.protobuf.ByteString) ref;
12924         }
12925       }
12926       /**
12927        *
12928        *
12929        * <pre>
12930        * A short name or phrase used to identify the condition in dashboards,
12931        * notifications, and incidents. To avoid confusion, don't use the same
12932        * display name for multiple conditions in the same policy.
12933        * </pre>
12934        *
12935        * <code>string display_name = 6;</code>
12936        *
12937        * @param value The displayName to set.
12938        * @return This builder for chaining.
12939        */
setDisplayName(java.lang.String value)12940       public Builder setDisplayName(java.lang.String value) {
12941         if (value == null) {
12942           throw new NullPointerException();
12943         }
12944         displayName_ = value;
12945         bitField0_ |= 0x00000002;
12946         onChanged();
12947         return this;
12948       }
12949       /**
12950        *
12951        *
12952        * <pre>
12953        * A short name or phrase used to identify the condition in dashboards,
12954        * notifications, and incidents. To avoid confusion, don't use the same
12955        * display name for multiple conditions in the same policy.
12956        * </pre>
12957        *
12958        * <code>string display_name = 6;</code>
12959        *
12960        * @return This builder for chaining.
12961        */
clearDisplayName()12962       public Builder clearDisplayName() {
12963         displayName_ = getDefaultInstance().getDisplayName();
12964         bitField0_ = (bitField0_ & ~0x00000002);
12965         onChanged();
12966         return this;
12967       }
12968       /**
12969        *
12970        *
12971        * <pre>
12972        * A short name or phrase used to identify the condition in dashboards,
12973        * notifications, and incidents. To avoid confusion, don't use the same
12974        * display name for multiple conditions in the same policy.
12975        * </pre>
12976        *
12977        * <code>string display_name = 6;</code>
12978        *
12979        * @param value The bytes for displayName to set.
12980        * @return This builder for chaining.
12981        */
setDisplayNameBytes(com.google.protobuf.ByteString value)12982       public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
12983         if (value == null) {
12984           throw new NullPointerException();
12985         }
12986         checkByteStringIsUtf8(value);
12987         displayName_ = value;
12988         bitField0_ |= 0x00000002;
12989         onChanged();
12990         return this;
12991       }
12992 
12993       private com.google.protobuf.SingleFieldBuilderV3<
12994               com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold,
12995               com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.Builder,
12996               com.google.monitoring.v3.AlertPolicy.Condition.MetricThresholdOrBuilder>
12997           conditionThresholdBuilder_;
12998       /**
12999        *
13000        *
13001        * <pre>
13002        * A condition that compares a time series against a threshold.
13003        * </pre>
13004        *
13005        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
13006        * </code>
13007        *
13008        * @return Whether the conditionThreshold field is set.
13009        */
13010       @java.lang.Override
hasConditionThreshold()13011       public boolean hasConditionThreshold() {
13012         return conditionCase_ == 1;
13013       }
13014       /**
13015        *
13016        *
13017        * <pre>
13018        * A condition that compares a time series against a threshold.
13019        * </pre>
13020        *
13021        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
13022        * </code>
13023        *
13024        * @return The conditionThreshold.
13025        */
13026       @java.lang.Override
13027       public com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
getConditionThreshold()13028           getConditionThreshold() {
13029         if (conditionThresholdBuilder_ == null) {
13030           if (conditionCase_ == 1) {
13031             return (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) condition_;
13032           }
13033           return com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
13034               .getDefaultInstance();
13035         } else {
13036           if (conditionCase_ == 1) {
13037             return conditionThresholdBuilder_.getMessage();
13038           }
13039           return com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
13040               .getDefaultInstance();
13041         }
13042       }
13043       /**
13044        *
13045        *
13046        * <pre>
13047        * A condition that compares a time series against a threshold.
13048        * </pre>
13049        *
13050        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
13051        * </code>
13052        */
setConditionThreshold( com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold value)13053       public Builder setConditionThreshold(
13054           com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold value) {
13055         if (conditionThresholdBuilder_ == null) {
13056           if (value == null) {
13057             throw new NullPointerException();
13058           }
13059           condition_ = value;
13060           onChanged();
13061         } else {
13062           conditionThresholdBuilder_.setMessage(value);
13063         }
13064         conditionCase_ = 1;
13065         return this;
13066       }
13067       /**
13068        *
13069        *
13070        * <pre>
13071        * A condition that compares a time series against a threshold.
13072        * </pre>
13073        *
13074        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
13075        * </code>
13076        */
setConditionThreshold( com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.Builder builderForValue)13077       public Builder setConditionThreshold(
13078           com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.Builder builderForValue) {
13079         if (conditionThresholdBuilder_ == null) {
13080           condition_ = builderForValue.build();
13081           onChanged();
13082         } else {
13083           conditionThresholdBuilder_.setMessage(builderForValue.build());
13084         }
13085         conditionCase_ = 1;
13086         return this;
13087       }
13088       /**
13089        *
13090        *
13091        * <pre>
13092        * A condition that compares a time series against a threshold.
13093        * </pre>
13094        *
13095        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
13096        * </code>
13097        */
mergeConditionThreshold( com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold value)13098       public Builder mergeConditionThreshold(
13099           com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold value) {
13100         if (conditionThresholdBuilder_ == null) {
13101           if (conditionCase_ == 1
13102               && condition_
13103                   != com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
13104                       .getDefaultInstance()) {
13105             condition_ =
13106                 com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.newBuilder(
13107                         (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) condition_)
13108                     .mergeFrom(value)
13109                     .buildPartial();
13110           } else {
13111             condition_ = value;
13112           }
13113           onChanged();
13114         } else {
13115           if (conditionCase_ == 1) {
13116             conditionThresholdBuilder_.mergeFrom(value);
13117           } else {
13118             conditionThresholdBuilder_.setMessage(value);
13119           }
13120         }
13121         conditionCase_ = 1;
13122         return this;
13123       }
13124       /**
13125        *
13126        *
13127        * <pre>
13128        * A condition that compares a time series against a threshold.
13129        * </pre>
13130        *
13131        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
13132        * </code>
13133        */
clearConditionThreshold()13134       public Builder clearConditionThreshold() {
13135         if (conditionThresholdBuilder_ == null) {
13136           if (conditionCase_ == 1) {
13137             conditionCase_ = 0;
13138             condition_ = null;
13139             onChanged();
13140           }
13141         } else {
13142           if (conditionCase_ == 1) {
13143             conditionCase_ = 0;
13144             condition_ = null;
13145           }
13146           conditionThresholdBuilder_.clear();
13147         }
13148         return this;
13149       }
13150       /**
13151        *
13152        *
13153        * <pre>
13154        * A condition that compares a time series against a threshold.
13155        * </pre>
13156        *
13157        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
13158        * </code>
13159        */
13160       public com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.Builder
getConditionThresholdBuilder()13161           getConditionThresholdBuilder() {
13162         return getConditionThresholdFieldBuilder().getBuilder();
13163       }
13164       /**
13165        *
13166        *
13167        * <pre>
13168        * A condition that compares a time series against a threshold.
13169        * </pre>
13170        *
13171        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
13172        * </code>
13173        */
13174       @java.lang.Override
13175       public com.google.monitoring.v3.AlertPolicy.Condition.MetricThresholdOrBuilder
getConditionThresholdOrBuilder()13176           getConditionThresholdOrBuilder() {
13177         if ((conditionCase_ == 1) && (conditionThresholdBuilder_ != null)) {
13178           return conditionThresholdBuilder_.getMessageOrBuilder();
13179         } else {
13180           if (conditionCase_ == 1) {
13181             return (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) condition_;
13182           }
13183           return com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold
13184               .getDefaultInstance();
13185         }
13186       }
13187       /**
13188        *
13189        *
13190        * <pre>
13191        * A condition that compares a time series against a threshold.
13192        * </pre>
13193        *
13194        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1;
13195        * </code>
13196        */
13197       private com.google.protobuf.SingleFieldBuilderV3<
13198               com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold,
13199               com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.Builder,
13200               com.google.monitoring.v3.AlertPolicy.Condition.MetricThresholdOrBuilder>
getConditionThresholdFieldBuilder()13201           getConditionThresholdFieldBuilder() {
13202         if (conditionThresholdBuilder_ == null) {
13203           if (!(conditionCase_ == 1)) {
13204             condition_ =
13205                 com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.getDefaultInstance();
13206           }
13207           conditionThresholdBuilder_ =
13208               new com.google.protobuf.SingleFieldBuilderV3<
13209                   com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold,
13210                   com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.Builder,
13211                   com.google.monitoring.v3.AlertPolicy.Condition.MetricThresholdOrBuilder>(
13212                   (com.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) condition_,
13213                   getParentForChildren(),
13214                   isClean());
13215           condition_ = null;
13216         }
13217         conditionCase_ = 1;
13218         onChanged();
13219         return conditionThresholdBuilder_;
13220       }
13221 
13222       private com.google.protobuf.SingleFieldBuilderV3<
13223               com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence,
13224               com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.Builder,
13225               com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsenceOrBuilder>
13226           conditionAbsentBuilder_;
13227       /**
13228        *
13229        *
13230        * <pre>
13231        * A condition that checks that a time series continues to
13232        * receive new data points.
13233        * </pre>
13234        *
13235        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
13236        * </code>
13237        *
13238        * @return Whether the conditionAbsent field is set.
13239        */
13240       @java.lang.Override
hasConditionAbsent()13241       public boolean hasConditionAbsent() {
13242         return conditionCase_ == 2;
13243       }
13244       /**
13245        *
13246        *
13247        * <pre>
13248        * A condition that checks that a time series continues to
13249        * receive new data points.
13250        * </pre>
13251        *
13252        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
13253        * </code>
13254        *
13255        * @return The conditionAbsent.
13256        */
13257       @java.lang.Override
getConditionAbsent()13258       public com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence getConditionAbsent() {
13259         if (conditionAbsentBuilder_ == null) {
13260           if (conditionCase_ == 2) {
13261             return (com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) condition_;
13262           }
13263           return com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.getDefaultInstance();
13264         } else {
13265           if (conditionCase_ == 2) {
13266             return conditionAbsentBuilder_.getMessage();
13267           }
13268           return com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.getDefaultInstance();
13269         }
13270       }
13271       /**
13272        *
13273        *
13274        * <pre>
13275        * A condition that checks that a time series continues to
13276        * receive new data points.
13277        * </pre>
13278        *
13279        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
13280        * </code>
13281        */
setConditionAbsent( com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence value)13282       public Builder setConditionAbsent(
13283           com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence value) {
13284         if (conditionAbsentBuilder_ == null) {
13285           if (value == null) {
13286             throw new NullPointerException();
13287           }
13288           condition_ = value;
13289           onChanged();
13290         } else {
13291           conditionAbsentBuilder_.setMessage(value);
13292         }
13293         conditionCase_ = 2;
13294         return this;
13295       }
13296       /**
13297        *
13298        *
13299        * <pre>
13300        * A condition that checks that a time series continues to
13301        * receive new data points.
13302        * </pre>
13303        *
13304        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
13305        * </code>
13306        */
setConditionAbsent( com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.Builder builderForValue)13307       public Builder setConditionAbsent(
13308           com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.Builder builderForValue) {
13309         if (conditionAbsentBuilder_ == null) {
13310           condition_ = builderForValue.build();
13311           onChanged();
13312         } else {
13313           conditionAbsentBuilder_.setMessage(builderForValue.build());
13314         }
13315         conditionCase_ = 2;
13316         return this;
13317       }
13318       /**
13319        *
13320        *
13321        * <pre>
13322        * A condition that checks that a time series continues to
13323        * receive new data points.
13324        * </pre>
13325        *
13326        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
13327        * </code>
13328        */
mergeConditionAbsent( com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence value)13329       public Builder mergeConditionAbsent(
13330           com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence value) {
13331         if (conditionAbsentBuilder_ == null) {
13332           if (conditionCase_ == 2
13333               && condition_
13334                   != com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence
13335                       .getDefaultInstance()) {
13336             condition_ =
13337                 com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.newBuilder(
13338                         (com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) condition_)
13339                     .mergeFrom(value)
13340                     .buildPartial();
13341           } else {
13342             condition_ = value;
13343           }
13344           onChanged();
13345         } else {
13346           if (conditionCase_ == 2) {
13347             conditionAbsentBuilder_.mergeFrom(value);
13348           } else {
13349             conditionAbsentBuilder_.setMessage(value);
13350           }
13351         }
13352         conditionCase_ = 2;
13353         return this;
13354       }
13355       /**
13356        *
13357        *
13358        * <pre>
13359        * A condition that checks that a time series continues to
13360        * receive new data points.
13361        * </pre>
13362        *
13363        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
13364        * </code>
13365        */
clearConditionAbsent()13366       public Builder clearConditionAbsent() {
13367         if (conditionAbsentBuilder_ == null) {
13368           if (conditionCase_ == 2) {
13369             conditionCase_ = 0;
13370             condition_ = null;
13371             onChanged();
13372           }
13373         } else {
13374           if (conditionCase_ == 2) {
13375             conditionCase_ = 0;
13376             condition_ = null;
13377           }
13378           conditionAbsentBuilder_.clear();
13379         }
13380         return this;
13381       }
13382       /**
13383        *
13384        *
13385        * <pre>
13386        * A condition that checks that a time series continues to
13387        * receive new data points.
13388        * </pre>
13389        *
13390        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
13391        * </code>
13392        */
13393       public com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.Builder
getConditionAbsentBuilder()13394           getConditionAbsentBuilder() {
13395         return getConditionAbsentFieldBuilder().getBuilder();
13396       }
13397       /**
13398        *
13399        *
13400        * <pre>
13401        * A condition that checks that a time series continues to
13402        * receive new data points.
13403        * </pre>
13404        *
13405        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
13406        * </code>
13407        */
13408       @java.lang.Override
13409       public com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsenceOrBuilder
getConditionAbsentOrBuilder()13410           getConditionAbsentOrBuilder() {
13411         if ((conditionCase_ == 2) && (conditionAbsentBuilder_ != null)) {
13412           return conditionAbsentBuilder_.getMessageOrBuilder();
13413         } else {
13414           if (conditionCase_ == 2) {
13415             return (com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) condition_;
13416           }
13417           return com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.getDefaultInstance();
13418         }
13419       }
13420       /**
13421        *
13422        *
13423        * <pre>
13424        * A condition that checks that a time series continues to
13425        * receive new data points.
13426        * </pre>
13427        *
13428        * <code>.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2;
13429        * </code>
13430        */
13431       private com.google.protobuf.SingleFieldBuilderV3<
13432               com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence,
13433               com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.Builder,
13434               com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsenceOrBuilder>
getConditionAbsentFieldBuilder()13435           getConditionAbsentFieldBuilder() {
13436         if (conditionAbsentBuilder_ == null) {
13437           if (!(conditionCase_ == 2)) {
13438             condition_ =
13439                 com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.getDefaultInstance();
13440           }
13441           conditionAbsentBuilder_ =
13442               new com.google.protobuf.SingleFieldBuilderV3<
13443                   com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence,
13444                   com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.Builder,
13445                   com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsenceOrBuilder>(
13446                   (com.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) condition_,
13447                   getParentForChildren(),
13448                   isClean());
13449           condition_ = null;
13450         }
13451         conditionCase_ = 2;
13452         onChanged();
13453         return conditionAbsentBuilder_;
13454       }
13455 
13456       private com.google.protobuf.SingleFieldBuilderV3<
13457               com.google.monitoring.v3.AlertPolicy.Condition.LogMatch,
13458               com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.Builder,
13459               com.google.monitoring.v3.AlertPolicy.Condition.LogMatchOrBuilder>
13460           conditionMatchedLogBuilder_;
13461       /**
13462        *
13463        *
13464        * <pre>
13465        * A condition that checks for log messages matching given constraints. If
13466        * set, no other conditions can be present.
13467        * </pre>
13468        *
13469        * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
13470        * </code>
13471        *
13472        * @return Whether the conditionMatchedLog field is set.
13473        */
13474       @java.lang.Override
hasConditionMatchedLog()13475       public boolean hasConditionMatchedLog() {
13476         return conditionCase_ == 20;
13477       }
13478       /**
13479        *
13480        *
13481        * <pre>
13482        * A condition that checks for log messages matching given constraints. If
13483        * set, no other conditions can be present.
13484        * </pre>
13485        *
13486        * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
13487        * </code>
13488        *
13489        * @return The conditionMatchedLog.
13490        */
13491       @java.lang.Override
getConditionMatchedLog()13492       public com.google.monitoring.v3.AlertPolicy.Condition.LogMatch getConditionMatchedLog() {
13493         if (conditionMatchedLogBuilder_ == null) {
13494           if (conditionCase_ == 20) {
13495             return (com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) condition_;
13496           }
13497           return com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.getDefaultInstance();
13498         } else {
13499           if (conditionCase_ == 20) {
13500             return conditionMatchedLogBuilder_.getMessage();
13501           }
13502           return com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.getDefaultInstance();
13503         }
13504       }
13505       /**
13506        *
13507        *
13508        * <pre>
13509        * A condition that checks for log messages matching given constraints. If
13510        * set, no other conditions can be present.
13511        * </pre>
13512        *
13513        * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
13514        * </code>
13515        */
setConditionMatchedLog( com.google.monitoring.v3.AlertPolicy.Condition.LogMatch value)13516       public Builder setConditionMatchedLog(
13517           com.google.monitoring.v3.AlertPolicy.Condition.LogMatch value) {
13518         if (conditionMatchedLogBuilder_ == null) {
13519           if (value == null) {
13520             throw new NullPointerException();
13521           }
13522           condition_ = value;
13523           onChanged();
13524         } else {
13525           conditionMatchedLogBuilder_.setMessage(value);
13526         }
13527         conditionCase_ = 20;
13528         return this;
13529       }
13530       /**
13531        *
13532        *
13533        * <pre>
13534        * A condition that checks for log messages matching given constraints. If
13535        * set, no other conditions can be present.
13536        * </pre>
13537        *
13538        * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
13539        * </code>
13540        */
setConditionMatchedLog( com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.Builder builderForValue)13541       public Builder setConditionMatchedLog(
13542           com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.Builder builderForValue) {
13543         if (conditionMatchedLogBuilder_ == null) {
13544           condition_ = builderForValue.build();
13545           onChanged();
13546         } else {
13547           conditionMatchedLogBuilder_.setMessage(builderForValue.build());
13548         }
13549         conditionCase_ = 20;
13550         return this;
13551       }
13552       /**
13553        *
13554        *
13555        * <pre>
13556        * A condition that checks for log messages matching given constraints. If
13557        * set, no other conditions can be present.
13558        * </pre>
13559        *
13560        * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
13561        * </code>
13562        */
mergeConditionMatchedLog( com.google.monitoring.v3.AlertPolicy.Condition.LogMatch value)13563       public Builder mergeConditionMatchedLog(
13564           com.google.monitoring.v3.AlertPolicy.Condition.LogMatch value) {
13565         if (conditionMatchedLogBuilder_ == null) {
13566           if (conditionCase_ == 20
13567               && condition_
13568                   != com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.getDefaultInstance()) {
13569             condition_ =
13570                 com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.newBuilder(
13571                         (com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) condition_)
13572                     .mergeFrom(value)
13573                     .buildPartial();
13574           } else {
13575             condition_ = value;
13576           }
13577           onChanged();
13578         } else {
13579           if (conditionCase_ == 20) {
13580             conditionMatchedLogBuilder_.mergeFrom(value);
13581           } else {
13582             conditionMatchedLogBuilder_.setMessage(value);
13583           }
13584         }
13585         conditionCase_ = 20;
13586         return this;
13587       }
13588       /**
13589        *
13590        *
13591        * <pre>
13592        * A condition that checks for log messages matching given constraints. If
13593        * set, no other conditions can be present.
13594        * </pre>
13595        *
13596        * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
13597        * </code>
13598        */
clearConditionMatchedLog()13599       public Builder clearConditionMatchedLog() {
13600         if (conditionMatchedLogBuilder_ == null) {
13601           if (conditionCase_ == 20) {
13602             conditionCase_ = 0;
13603             condition_ = null;
13604             onChanged();
13605           }
13606         } else {
13607           if (conditionCase_ == 20) {
13608             conditionCase_ = 0;
13609             condition_ = null;
13610           }
13611           conditionMatchedLogBuilder_.clear();
13612         }
13613         return this;
13614       }
13615       /**
13616        *
13617        *
13618        * <pre>
13619        * A condition that checks for log messages matching given constraints. If
13620        * set, no other conditions can be present.
13621        * </pre>
13622        *
13623        * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
13624        * </code>
13625        */
13626       public com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.Builder
getConditionMatchedLogBuilder()13627           getConditionMatchedLogBuilder() {
13628         return getConditionMatchedLogFieldBuilder().getBuilder();
13629       }
13630       /**
13631        *
13632        *
13633        * <pre>
13634        * A condition that checks for log messages matching given constraints. If
13635        * set, no other conditions can be present.
13636        * </pre>
13637        *
13638        * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
13639        * </code>
13640        */
13641       @java.lang.Override
13642       public com.google.monitoring.v3.AlertPolicy.Condition.LogMatchOrBuilder
getConditionMatchedLogOrBuilder()13643           getConditionMatchedLogOrBuilder() {
13644         if ((conditionCase_ == 20) && (conditionMatchedLogBuilder_ != null)) {
13645           return conditionMatchedLogBuilder_.getMessageOrBuilder();
13646         } else {
13647           if (conditionCase_ == 20) {
13648             return (com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) condition_;
13649           }
13650           return com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.getDefaultInstance();
13651         }
13652       }
13653       /**
13654        *
13655        *
13656        * <pre>
13657        * A condition that checks for log messages matching given constraints. If
13658        * set, no other conditions can be present.
13659        * </pre>
13660        *
13661        * <code>.google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20;
13662        * </code>
13663        */
13664       private com.google.protobuf.SingleFieldBuilderV3<
13665               com.google.monitoring.v3.AlertPolicy.Condition.LogMatch,
13666               com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.Builder,
13667               com.google.monitoring.v3.AlertPolicy.Condition.LogMatchOrBuilder>
getConditionMatchedLogFieldBuilder()13668           getConditionMatchedLogFieldBuilder() {
13669         if (conditionMatchedLogBuilder_ == null) {
13670           if (!(conditionCase_ == 20)) {
13671             condition_ =
13672                 com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.getDefaultInstance();
13673           }
13674           conditionMatchedLogBuilder_ =
13675               new com.google.protobuf.SingleFieldBuilderV3<
13676                   com.google.monitoring.v3.AlertPolicy.Condition.LogMatch,
13677                   com.google.monitoring.v3.AlertPolicy.Condition.LogMatch.Builder,
13678                   com.google.monitoring.v3.AlertPolicy.Condition.LogMatchOrBuilder>(
13679                   (com.google.monitoring.v3.AlertPolicy.Condition.LogMatch) condition_,
13680                   getParentForChildren(),
13681                   isClean());
13682           condition_ = null;
13683         }
13684         conditionCase_ = 20;
13685         onChanged();
13686         return conditionMatchedLogBuilder_;
13687       }
13688 
13689       private com.google.protobuf.SingleFieldBuilderV3<
13690               com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition,
13691               com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
13692                   .Builder,
13693               com.google.monitoring.v3.AlertPolicy.Condition
13694                   .MonitoringQueryLanguageConditionOrBuilder>
13695           conditionMonitoringQueryLanguageBuilder_;
13696       /**
13697        *
13698        *
13699        * <pre>
13700        * A condition that uses the Monitoring Query Language to define
13701        * alerts.
13702        * </pre>
13703        *
13704        * <code>
13705        * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
13706        * </code>
13707        *
13708        * @return Whether the conditionMonitoringQueryLanguage field is set.
13709        */
13710       @java.lang.Override
hasConditionMonitoringQueryLanguage()13711       public boolean hasConditionMonitoringQueryLanguage() {
13712         return conditionCase_ == 19;
13713       }
13714       /**
13715        *
13716        *
13717        * <pre>
13718        * A condition that uses the Monitoring Query Language to define
13719        * alerts.
13720        * </pre>
13721        *
13722        * <code>
13723        * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
13724        * </code>
13725        *
13726        * @return The conditionMonitoringQueryLanguage.
13727        */
13728       @java.lang.Override
13729       public com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
getConditionMonitoringQueryLanguage()13730           getConditionMonitoringQueryLanguage() {
13731         if (conditionMonitoringQueryLanguageBuilder_ == null) {
13732           if (conditionCase_ == 19) {
13733             return (com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
13734                 condition_;
13735           }
13736           return com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
13737               .getDefaultInstance();
13738         } else {
13739           if (conditionCase_ == 19) {
13740             return conditionMonitoringQueryLanguageBuilder_.getMessage();
13741           }
13742           return com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
13743               .getDefaultInstance();
13744         }
13745       }
13746       /**
13747        *
13748        *
13749        * <pre>
13750        * A condition that uses the Monitoring Query Language to define
13751        * alerts.
13752        * </pre>
13753        *
13754        * <code>
13755        * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
13756        * </code>
13757        */
setConditionMonitoringQueryLanguage( com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition value)13758       public Builder setConditionMonitoringQueryLanguage(
13759           com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition value) {
13760         if (conditionMonitoringQueryLanguageBuilder_ == null) {
13761           if (value == null) {
13762             throw new NullPointerException();
13763           }
13764           condition_ = value;
13765           onChanged();
13766         } else {
13767           conditionMonitoringQueryLanguageBuilder_.setMessage(value);
13768         }
13769         conditionCase_ = 19;
13770         return this;
13771       }
13772       /**
13773        *
13774        *
13775        * <pre>
13776        * A condition that uses the Monitoring Query Language to define
13777        * alerts.
13778        * </pre>
13779        *
13780        * <code>
13781        * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
13782        * </code>
13783        */
setConditionMonitoringQueryLanguage( com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder builderForValue)13784       public Builder setConditionMonitoringQueryLanguage(
13785           com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder
13786               builderForValue) {
13787         if (conditionMonitoringQueryLanguageBuilder_ == null) {
13788           condition_ = builderForValue.build();
13789           onChanged();
13790         } else {
13791           conditionMonitoringQueryLanguageBuilder_.setMessage(builderForValue.build());
13792         }
13793         conditionCase_ = 19;
13794         return this;
13795       }
13796       /**
13797        *
13798        *
13799        * <pre>
13800        * A condition that uses the Monitoring Query Language to define
13801        * alerts.
13802        * </pre>
13803        *
13804        * <code>
13805        * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
13806        * </code>
13807        */
mergeConditionMonitoringQueryLanguage( com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition value)13808       public Builder mergeConditionMonitoringQueryLanguage(
13809           com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition value) {
13810         if (conditionMonitoringQueryLanguageBuilder_ == null) {
13811           if (conditionCase_ == 19
13812               && condition_
13813                   != com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
13814                       .getDefaultInstance()) {
13815             condition_ =
13816                 com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
13817                     .newBuilder(
13818                         (com.google.monitoring.v3.AlertPolicy.Condition
13819                                 .MonitoringQueryLanguageCondition)
13820                             condition_)
13821                     .mergeFrom(value)
13822                     .buildPartial();
13823           } else {
13824             condition_ = value;
13825           }
13826           onChanged();
13827         } else {
13828           if (conditionCase_ == 19) {
13829             conditionMonitoringQueryLanguageBuilder_.mergeFrom(value);
13830           } else {
13831             conditionMonitoringQueryLanguageBuilder_.setMessage(value);
13832           }
13833         }
13834         conditionCase_ = 19;
13835         return this;
13836       }
13837       /**
13838        *
13839        *
13840        * <pre>
13841        * A condition that uses the Monitoring Query Language to define
13842        * alerts.
13843        * </pre>
13844        *
13845        * <code>
13846        * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
13847        * </code>
13848        */
clearConditionMonitoringQueryLanguage()13849       public Builder clearConditionMonitoringQueryLanguage() {
13850         if (conditionMonitoringQueryLanguageBuilder_ == null) {
13851           if (conditionCase_ == 19) {
13852             conditionCase_ = 0;
13853             condition_ = null;
13854             onChanged();
13855           }
13856         } else {
13857           if (conditionCase_ == 19) {
13858             conditionCase_ = 0;
13859             condition_ = null;
13860           }
13861           conditionMonitoringQueryLanguageBuilder_.clear();
13862         }
13863         return this;
13864       }
13865       /**
13866        *
13867        *
13868        * <pre>
13869        * A condition that uses the Monitoring Query Language to define
13870        * alerts.
13871        * </pre>
13872        *
13873        * <code>
13874        * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
13875        * </code>
13876        */
13877       public com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.Builder
getConditionMonitoringQueryLanguageBuilder()13878           getConditionMonitoringQueryLanguageBuilder() {
13879         return getConditionMonitoringQueryLanguageFieldBuilder().getBuilder();
13880       }
13881       /**
13882        *
13883        *
13884        * <pre>
13885        * A condition that uses the Monitoring Query Language to define
13886        * alerts.
13887        * </pre>
13888        *
13889        * <code>
13890        * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
13891        * </code>
13892        */
13893       @java.lang.Override
13894       public com.google.monitoring.v3.AlertPolicy.Condition
13895               .MonitoringQueryLanguageConditionOrBuilder
getConditionMonitoringQueryLanguageOrBuilder()13896           getConditionMonitoringQueryLanguageOrBuilder() {
13897         if ((conditionCase_ == 19) && (conditionMonitoringQueryLanguageBuilder_ != null)) {
13898           return conditionMonitoringQueryLanguageBuilder_.getMessageOrBuilder();
13899         } else {
13900           if (conditionCase_ == 19) {
13901             return (com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
13902                 condition_;
13903           }
13904           return com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
13905               .getDefaultInstance();
13906         }
13907       }
13908       /**
13909        *
13910        *
13911        * <pre>
13912        * A condition that uses the Monitoring Query Language to define
13913        * alerts.
13914        * </pre>
13915        *
13916        * <code>
13917        * .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19;
13918        * </code>
13919        */
13920       private com.google.protobuf.SingleFieldBuilderV3<
13921               com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition,
13922               com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
13923                   .Builder,
13924               com.google.monitoring.v3.AlertPolicy.Condition
13925                   .MonitoringQueryLanguageConditionOrBuilder>
getConditionMonitoringQueryLanguageFieldBuilder()13926           getConditionMonitoringQueryLanguageFieldBuilder() {
13927         if (conditionMonitoringQueryLanguageBuilder_ == null) {
13928           if (!(conditionCase_ == 19)) {
13929             condition_ =
13930                 com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
13931                     .getDefaultInstance();
13932           }
13933           conditionMonitoringQueryLanguageBuilder_ =
13934               new com.google.protobuf.SingleFieldBuilderV3<
13935                   com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition,
13936                   com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition
13937                       .Builder,
13938                   com.google.monitoring.v3.AlertPolicy.Condition
13939                       .MonitoringQueryLanguageConditionOrBuilder>(
13940                   (com.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition)
13941                       condition_,
13942                   getParentForChildren(),
13943                   isClean());
13944           condition_ = null;
13945         }
13946         conditionCase_ = 19;
13947         onChanged();
13948         return conditionMonitoringQueryLanguageBuilder_;
13949       }
13950 
13951       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)13952       public final Builder setUnknownFields(
13953           final com.google.protobuf.UnknownFieldSet unknownFields) {
13954         return super.setUnknownFields(unknownFields);
13955       }
13956 
13957       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)13958       public final Builder mergeUnknownFields(
13959           final com.google.protobuf.UnknownFieldSet unknownFields) {
13960         return super.mergeUnknownFields(unknownFields);
13961       }
13962 
13963       // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy.Condition)
13964     }
13965 
13966     // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.Condition)
13967     private static final com.google.monitoring.v3.AlertPolicy.Condition DEFAULT_INSTANCE;
13968 
13969     static {
13970       DEFAULT_INSTANCE = new com.google.monitoring.v3.AlertPolicy.Condition();
13971     }
13972 
getDefaultInstance()13973     public static com.google.monitoring.v3.AlertPolicy.Condition getDefaultInstance() {
13974       return DEFAULT_INSTANCE;
13975     }
13976 
13977     private static final com.google.protobuf.Parser<Condition> PARSER =
13978         new com.google.protobuf.AbstractParser<Condition>() {
13979           @java.lang.Override
13980           public Condition parsePartialFrom(
13981               com.google.protobuf.CodedInputStream input,
13982               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
13983               throws com.google.protobuf.InvalidProtocolBufferException {
13984             Builder builder = newBuilder();
13985             try {
13986               builder.mergeFrom(input, extensionRegistry);
13987             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
13988               throw e.setUnfinishedMessage(builder.buildPartial());
13989             } catch (com.google.protobuf.UninitializedMessageException e) {
13990               throw e.asInvalidProtocolBufferException()
13991                   .setUnfinishedMessage(builder.buildPartial());
13992             } catch (java.io.IOException e) {
13993               throw new com.google.protobuf.InvalidProtocolBufferException(e)
13994                   .setUnfinishedMessage(builder.buildPartial());
13995             }
13996             return builder.buildPartial();
13997           }
13998         };
13999 
parser()14000     public static com.google.protobuf.Parser<Condition> parser() {
14001       return PARSER;
14002     }
14003 
14004     @java.lang.Override
getParserForType()14005     public com.google.protobuf.Parser<Condition> getParserForType() {
14006       return PARSER;
14007     }
14008 
14009     @java.lang.Override
getDefaultInstanceForType()14010     public com.google.monitoring.v3.AlertPolicy.Condition getDefaultInstanceForType() {
14011       return DEFAULT_INSTANCE;
14012     }
14013   }
14014 
14015   public interface AlertStrategyOrBuilder
14016       extends
14017       // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy.AlertStrategy)
14018       com.google.protobuf.MessageOrBuilder {
14019 
14020     /**
14021      *
14022      *
14023      * <pre>
14024      * Required for alert policies with a `LogMatch` condition.
14025      * This limit is not implemented for alert policies that are not log-based.
14026      * </pre>
14027      *
14028      * <code>
14029      * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
14030      * </code>
14031      *
14032      * @return Whether the notificationRateLimit field is set.
14033      */
hasNotificationRateLimit()14034     boolean hasNotificationRateLimit();
14035     /**
14036      *
14037      *
14038      * <pre>
14039      * Required for alert policies with a `LogMatch` condition.
14040      * This limit is not implemented for alert policies that are not log-based.
14041      * </pre>
14042      *
14043      * <code>
14044      * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
14045      * </code>
14046      *
14047      * @return The notificationRateLimit.
14048      */
14049     com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
getNotificationRateLimit()14050         getNotificationRateLimit();
14051     /**
14052      *
14053      *
14054      * <pre>
14055      * Required for alert policies with a `LogMatch` condition.
14056      * This limit is not implemented for alert policies that are not log-based.
14057      * </pre>
14058      *
14059      * <code>
14060      * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
14061      * </code>
14062      */
14063     com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimitOrBuilder
getNotificationRateLimitOrBuilder()14064         getNotificationRateLimitOrBuilder();
14065 
14066     /**
14067      *
14068      *
14069      * <pre>
14070      * If an alert policy that was active has no data for this long, any open
14071      * incidents will close
14072      * </pre>
14073      *
14074      * <code>.google.protobuf.Duration auto_close = 3;</code>
14075      *
14076      * @return Whether the autoClose field is set.
14077      */
hasAutoClose()14078     boolean hasAutoClose();
14079     /**
14080      *
14081      *
14082      * <pre>
14083      * If an alert policy that was active has no data for this long, any open
14084      * incidents will close
14085      * </pre>
14086      *
14087      * <code>.google.protobuf.Duration auto_close = 3;</code>
14088      *
14089      * @return The autoClose.
14090      */
getAutoClose()14091     com.google.protobuf.Duration getAutoClose();
14092     /**
14093      *
14094      *
14095      * <pre>
14096      * If an alert policy that was active has no data for this long, any open
14097      * incidents will close
14098      * </pre>
14099      *
14100      * <code>.google.protobuf.Duration auto_close = 3;</code>
14101      */
getAutoCloseOrBuilder()14102     com.google.protobuf.DurationOrBuilder getAutoCloseOrBuilder();
14103   }
14104   /**
14105    *
14106    *
14107    * <pre>
14108    * Control over how the notification channels in `notification_channels`
14109    * are notified when this alert fires.
14110    * </pre>
14111    *
14112    * Protobuf type {@code google.monitoring.v3.AlertPolicy.AlertStrategy}
14113    */
14114   public static final class AlertStrategy extends com.google.protobuf.GeneratedMessageV3
14115       implements
14116       // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy.AlertStrategy)
14117       AlertStrategyOrBuilder {
14118     private static final long serialVersionUID = 0L;
14119     // Use AlertStrategy.newBuilder() to construct.
AlertStrategy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)14120     private AlertStrategy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
14121       super(builder);
14122     }
14123 
AlertStrategy()14124     private AlertStrategy() {}
14125 
14126     @java.lang.Override
14127     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)14128     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
14129       return new AlertStrategy();
14130     }
14131 
14132     @java.lang.Override
getUnknownFields()14133     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
14134       return this.unknownFields;
14135     }
14136 
getDescriptor()14137     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
14138       return com.google.monitoring.v3.AlertProto
14139           .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_descriptor;
14140     }
14141 
14142     @java.lang.Override
14143     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()14144         internalGetFieldAccessorTable() {
14145       return com.google.monitoring.v3.AlertProto
14146           .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_fieldAccessorTable
14147           .ensureFieldAccessorsInitialized(
14148               com.google.monitoring.v3.AlertPolicy.AlertStrategy.class,
14149               com.google.monitoring.v3.AlertPolicy.AlertStrategy.Builder.class);
14150     }
14151 
14152     public interface NotificationRateLimitOrBuilder
14153         extends
14154         // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit)
14155         com.google.protobuf.MessageOrBuilder {
14156 
14157       /**
14158        *
14159        *
14160        * <pre>
14161        * Not more than one notification per `period`.
14162        * </pre>
14163        *
14164        * <code>.google.protobuf.Duration period = 1;</code>
14165        *
14166        * @return Whether the period field is set.
14167        */
hasPeriod()14168       boolean hasPeriod();
14169       /**
14170        *
14171        *
14172        * <pre>
14173        * Not more than one notification per `period`.
14174        * </pre>
14175        *
14176        * <code>.google.protobuf.Duration period = 1;</code>
14177        *
14178        * @return The period.
14179        */
getPeriod()14180       com.google.protobuf.Duration getPeriod();
14181       /**
14182        *
14183        *
14184        * <pre>
14185        * Not more than one notification per `period`.
14186        * </pre>
14187        *
14188        * <code>.google.protobuf.Duration period = 1;</code>
14189        */
getPeriodOrBuilder()14190       com.google.protobuf.DurationOrBuilder getPeriodOrBuilder();
14191     }
14192     /**
14193      *
14194      *
14195      * <pre>
14196      * Control over the rate of notifications sent to this alert policy's
14197      * notification channels.
14198      * </pre>
14199      *
14200      * Protobuf type {@code google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit}
14201      */
14202     public static final class NotificationRateLimit extends com.google.protobuf.GeneratedMessageV3
14203         implements
14204         // @@protoc_insertion_point(message_implements:google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit)
14205         NotificationRateLimitOrBuilder {
14206       private static final long serialVersionUID = 0L;
14207       // Use NotificationRateLimit.newBuilder() to construct.
NotificationRateLimit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)14208       private NotificationRateLimit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
14209         super(builder);
14210       }
14211 
NotificationRateLimit()14212       private NotificationRateLimit() {}
14213 
14214       @java.lang.Override
14215       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)14216       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
14217         return new NotificationRateLimit();
14218       }
14219 
14220       @java.lang.Override
getUnknownFields()14221       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
14222         return this.unknownFields;
14223       }
14224 
getDescriptor()14225       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
14226         return com.google.monitoring.v3.AlertProto
14227             .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_NotificationRateLimit_descriptor;
14228       }
14229 
14230       @java.lang.Override
14231       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()14232           internalGetFieldAccessorTable() {
14233         return com.google.monitoring.v3.AlertProto
14234             .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_NotificationRateLimit_fieldAccessorTable
14235             .ensureFieldAccessorsInitialized(
14236                 com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.class,
14237                 com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.Builder
14238                     .class);
14239       }
14240 
14241       public static final int PERIOD_FIELD_NUMBER = 1;
14242       private com.google.protobuf.Duration period_;
14243       /**
14244        *
14245        *
14246        * <pre>
14247        * Not more than one notification per `period`.
14248        * </pre>
14249        *
14250        * <code>.google.protobuf.Duration period = 1;</code>
14251        *
14252        * @return Whether the period field is set.
14253        */
14254       @java.lang.Override
hasPeriod()14255       public boolean hasPeriod() {
14256         return period_ != null;
14257       }
14258       /**
14259        *
14260        *
14261        * <pre>
14262        * Not more than one notification per `period`.
14263        * </pre>
14264        *
14265        * <code>.google.protobuf.Duration period = 1;</code>
14266        *
14267        * @return The period.
14268        */
14269       @java.lang.Override
getPeriod()14270       public com.google.protobuf.Duration getPeriod() {
14271         return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
14272       }
14273       /**
14274        *
14275        *
14276        * <pre>
14277        * Not more than one notification per `period`.
14278        * </pre>
14279        *
14280        * <code>.google.protobuf.Duration period = 1;</code>
14281        */
14282       @java.lang.Override
getPeriodOrBuilder()14283       public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() {
14284         return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
14285       }
14286 
14287       private byte memoizedIsInitialized = -1;
14288 
14289       @java.lang.Override
isInitialized()14290       public final boolean isInitialized() {
14291         byte isInitialized = memoizedIsInitialized;
14292         if (isInitialized == 1) return true;
14293         if (isInitialized == 0) return false;
14294 
14295         memoizedIsInitialized = 1;
14296         return true;
14297       }
14298 
14299       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)14300       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
14301         if (period_ != null) {
14302           output.writeMessage(1, getPeriod());
14303         }
14304         getUnknownFields().writeTo(output);
14305       }
14306 
14307       @java.lang.Override
getSerializedSize()14308       public int getSerializedSize() {
14309         int size = memoizedSize;
14310         if (size != -1) return size;
14311 
14312         size = 0;
14313         if (period_ != null) {
14314           size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPeriod());
14315         }
14316         size += getUnknownFields().getSerializedSize();
14317         memoizedSize = size;
14318         return size;
14319       }
14320 
14321       @java.lang.Override
equals(final java.lang.Object obj)14322       public boolean equals(final java.lang.Object obj) {
14323         if (obj == this) {
14324           return true;
14325         }
14326         if (!(obj
14327             instanceof com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit)) {
14328           return super.equals(obj);
14329         }
14330         com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit other =
14331             (com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit) obj;
14332 
14333         if (hasPeriod() != other.hasPeriod()) return false;
14334         if (hasPeriod()) {
14335           if (!getPeriod().equals(other.getPeriod())) return false;
14336         }
14337         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
14338         return true;
14339       }
14340 
14341       @java.lang.Override
hashCode()14342       public int hashCode() {
14343         if (memoizedHashCode != 0) {
14344           return memoizedHashCode;
14345         }
14346         int hash = 41;
14347         hash = (19 * hash) + getDescriptor().hashCode();
14348         if (hasPeriod()) {
14349           hash = (37 * hash) + PERIOD_FIELD_NUMBER;
14350           hash = (53 * hash) + getPeriod().hashCode();
14351         }
14352         hash = (29 * hash) + getUnknownFields().hashCode();
14353         memoizedHashCode = hash;
14354         return hash;
14355       }
14356 
14357       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom(java.nio.ByteBuffer data)14358           parseFrom(java.nio.ByteBuffer data)
14359               throws com.google.protobuf.InvalidProtocolBufferException {
14360         return PARSER.parseFrom(data);
14361       }
14362 
14363       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)14364           parseFrom(
14365               java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14366               throws com.google.protobuf.InvalidProtocolBufferException {
14367         return PARSER.parseFrom(data, extensionRegistry);
14368       }
14369 
14370       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom(com.google.protobuf.ByteString data)14371           parseFrom(com.google.protobuf.ByteString data)
14372               throws com.google.protobuf.InvalidProtocolBufferException {
14373         return PARSER.parseFrom(data);
14374       }
14375 
14376       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)14377           parseFrom(
14378               com.google.protobuf.ByteString data,
14379               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14380               throws com.google.protobuf.InvalidProtocolBufferException {
14381         return PARSER.parseFrom(data, extensionRegistry);
14382       }
14383 
14384       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom(byte[] data)14385           parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
14386         return PARSER.parseFrom(data);
14387       }
14388 
14389       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)14390           parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14391               throws com.google.protobuf.InvalidProtocolBufferException {
14392         return PARSER.parseFrom(data, extensionRegistry);
14393       }
14394 
14395       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom(java.io.InputStream input)14396           parseFrom(java.io.InputStream input) throws java.io.IOException {
14397         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
14398       }
14399 
14400       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)14401           parseFrom(
14402               java.io.InputStream input,
14403               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14404               throws java.io.IOException {
14405         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
14406             PARSER, input, extensionRegistry);
14407       }
14408 
14409       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseDelimitedFrom(java.io.InputStream input)14410           parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
14411         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
14412       }
14413 
14414       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)14415           parseDelimitedFrom(
14416               java.io.InputStream input,
14417               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14418               throws java.io.IOException {
14419         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
14420             PARSER, input, extensionRegistry);
14421       }
14422 
14423       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom(com.google.protobuf.CodedInputStream input)14424           parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
14425         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
14426       }
14427 
14428       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)14429           parseFrom(
14430               com.google.protobuf.CodedInputStream input,
14431               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14432               throws java.io.IOException {
14433         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
14434             PARSER, input, extensionRegistry);
14435       }
14436 
14437       @java.lang.Override
newBuilderForType()14438       public Builder newBuilderForType() {
14439         return newBuilder();
14440       }
14441 
newBuilder()14442       public static Builder newBuilder() {
14443         return DEFAULT_INSTANCE.toBuilder();
14444       }
14445 
newBuilder( com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit prototype)14446       public static Builder newBuilder(
14447           com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit prototype) {
14448         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
14449       }
14450 
14451       @java.lang.Override
toBuilder()14452       public Builder toBuilder() {
14453         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
14454       }
14455 
14456       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)14457       protected Builder newBuilderForType(
14458           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
14459         Builder builder = new Builder(parent);
14460         return builder;
14461       }
14462       /**
14463        *
14464        *
14465        * <pre>
14466        * Control over the rate of notifications sent to this alert policy's
14467        * notification channels.
14468        * </pre>
14469        *
14470        * Protobuf type {@code google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit}
14471        */
14472       public static final class Builder
14473           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
14474           implements
14475           // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit)
14476           com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimitOrBuilder {
getDescriptor()14477         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
14478           return com.google.monitoring.v3.AlertProto
14479               .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_NotificationRateLimit_descriptor;
14480         }
14481 
14482         @java.lang.Override
14483         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()14484             internalGetFieldAccessorTable() {
14485           return com.google.monitoring.v3.AlertProto
14486               .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_NotificationRateLimit_fieldAccessorTable
14487               .ensureFieldAccessorsInitialized(
14488                   com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.class,
14489                   com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.Builder
14490                       .class);
14491         }
14492 
14493         // Construct using
14494         // com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.newBuilder()
Builder()14495         private Builder() {}
14496 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)14497         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
14498           super(parent);
14499         }
14500 
14501         @java.lang.Override
clear()14502         public Builder clear() {
14503           super.clear();
14504           bitField0_ = 0;
14505           period_ = null;
14506           if (periodBuilder_ != null) {
14507             periodBuilder_.dispose();
14508             periodBuilder_ = null;
14509           }
14510           return this;
14511         }
14512 
14513         @java.lang.Override
getDescriptorForType()14514         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
14515           return com.google.monitoring.v3.AlertProto
14516               .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_NotificationRateLimit_descriptor;
14517         }
14518 
14519         @java.lang.Override
14520         public com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
getDefaultInstanceForType()14521             getDefaultInstanceForType() {
14522           return com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
14523               .getDefaultInstance();
14524         }
14525 
14526         @java.lang.Override
build()14527         public com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit build() {
14528           com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit result =
14529               buildPartial();
14530           if (!result.isInitialized()) {
14531             throw newUninitializedMessageException(result);
14532           }
14533           return result;
14534         }
14535 
14536         @java.lang.Override
14537         public com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
buildPartial()14538             buildPartial() {
14539           com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit result =
14540               new com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit(this);
14541           if (bitField0_ != 0) {
14542             buildPartial0(result);
14543           }
14544           onBuilt();
14545           return result;
14546         }
14547 
buildPartial0( com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit result)14548         private void buildPartial0(
14549             com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit result) {
14550           int from_bitField0_ = bitField0_;
14551           if (((from_bitField0_ & 0x00000001) != 0)) {
14552             result.period_ = periodBuilder_ == null ? period_ : periodBuilder_.build();
14553           }
14554         }
14555 
14556         @java.lang.Override
clone()14557         public Builder clone() {
14558           return super.clone();
14559         }
14560 
14561         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)14562         public Builder setField(
14563             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
14564           return super.setField(field, value);
14565         }
14566 
14567         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)14568         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
14569           return super.clearField(field);
14570         }
14571 
14572         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)14573         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
14574           return super.clearOneof(oneof);
14575         }
14576 
14577         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)14578         public Builder setRepeatedField(
14579             com.google.protobuf.Descriptors.FieldDescriptor field,
14580             int index,
14581             java.lang.Object value) {
14582           return super.setRepeatedField(field, index, value);
14583         }
14584 
14585         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)14586         public Builder addRepeatedField(
14587             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
14588           return super.addRepeatedField(field, value);
14589         }
14590 
14591         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)14592         public Builder mergeFrom(com.google.protobuf.Message other) {
14593           if (other
14594               instanceof com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit) {
14595             return mergeFrom(
14596                 (com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit) other);
14597           } else {
14598             super.mergeFrom(other);
14599             return this;
14600           }
14601         }
14602 
mergeFrom( com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit other)14603         public Builder mergeFrom(
14604             com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit other) {
14605           if (other
14606               == com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
14607                   .getDefaultInstance()) return this;
14608           if (other.hasPeriod()) {
14609             mergePeriod(other.getPeriod());
14610           }
14611           this.mergeUnknownFields(other.getUnknownFields());
14612           onChanged();
14613           return this;
14614         }
14615 
14616         @java.lang.Override
isInitialized()14617         public final boolean isInitialized() {
14618           return true;
14619         }
14620 
14621         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)14622         public Builder mergeFrom(
14623             com.google.protobuf.CodedInputStream input,
14624             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14625             throws java.io.IOException {
14626           if (extensionRegistry == null) {
14627             throw new java.lang.NullPointerException();
14628           }
14629           try {
14630             boolean done = false;
14631             while (!done) {
14632               int tag = input.readTag();
14633               switch (tag) {
14634                 case 0:
14635                   done = true;
14636                   break;
14637                 case 10:
14638                   {
14639                     input.readMessage(getPeriodFieldBuilder().getBuilder(), extensionRegistry);
14640                     bitField0_ |= 0x00000001;
14641                     break;
14642                   } // case 10
14643                 default:
14644                   {
14645                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
14646                       done = true; // was an endgroup tag
14647                     }
14648                     break;
14649                   } // default:
14650               } // switch (tag)
14651             } // while (!done)
14652           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
14653             throw e.unwrapIOException();
14654           } finally {
14655             onChanged();
14656           } // finally
14657           return this;
14658         }
14659 
14660         private int bitField0_;
14661 
14662         private com.google.protobuf.Duration period_;
14663         private com.google.protobuf.SingleFieldBuilderV3<
14664                 com.google.protobuf.Duration,
14665                 com.google.protobuf.Duration.Builder,
14666                 com.google.protobuf.DurationOrBuilder>
14667             periodBuilder_;
14668         /**
14669          *
14670          *
14671          * <pre>
14672          * Not more than one notification per `period`.
14673          * </pre>
14674          *
14675          * <code>.google.protobuf.Duration period = 1;</code>
14676          *
14677          * @return Whether the period field is set.
14678          */
hasPeriod()14679         public boolean hasPeriod() {
14680           return ((bitField0_ & 0x00000001) != 0);
14681         }
14682         /**
14683          *
14684          *
14685          * <pre>
14686          * Not more than one notification per `period`.
14687          * </pre>
14688          *
14689          * <code>.google.protobuf.Duration period = 1;</code>
14690          *
14691          * @return The period.
14692          */
getPeriod()14693         public com.google.protobuf.Duration getPeriod() {
14694           if (periodBuilder_ == null) {
14695             return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
14696           } else {
14697             return periodBuilder_.getMessage();
14698           }
14699         }
14700         /**
14701          *
14702          *
14703          * <pre>
14704          * Not more than one notification per `period`.
14705          * </pre>
14706          *
14707          * <code>.google.protobuf.Duration period = 1;</code>
14708          */
setPeriod(com.google.protobuf.Duration value)14709         public Builder setPeriod(com.google.protobuf.Duration value) {
14710           if (periodBuilder_ == null) {
14711             if (value == null) {
14712               throw new NullPointerException();
14713             }
14714             period_ = value;
14715           } else {
14716             periodBuilder_.setMessage(value);
14717           }
14718           bitField0_ |= 0x00000001;
14719           onChanged();
14720           return this;
14721         }
14722         /**
14723          *
14724          *
14725          * <pre>
14726          * Not more than one notification per `period`.
14727          * </pre>
14728          *
14729          * <code>.google.protobuf.Duration period = 1;</code>
14730          */
setPeriod(com.google.protobuf.Duration.Builder builderForValue)14731         public Builder setPeriod(com.google.protobuf.Duration.Builder builderForValue) {
14732           if (periodBuilder_ == null) {
14733             period_ = builderForValue.build();
14734           } else {
14735             periodBuilder_.setMessage(builderForValue.build());
14736           }
14737           bitField0_ |= 0x00000001;
14738           onChanged();
14739           return this;
14740         }
14741         /**
14742          *
14743          *
14744          * <pre>
14745          * Not more than one notification per `period`.
14746          * </pre>
14747          *
14748          * <code>.google.protobuf.Duration period = 1;</code>
14749          */
mergePeriod(com.google.protobuf.Duration value)14750         public Builder mergePeriod(com.google.protobuf.Duration value) {
14751           if (periodBuilder_ == null) {
14752             if (((bitField0_ & 0x00000001) != 0)
14753                 && period_ != null
14754                 && period_ != com.google.protobuf.Duration.getDefaultInstance()) {
14755               getPeriodBuilder().mergeFrom(value);
14756             } else {
14757               period_ = value;
14758             }
14759           } else {
14760             periodBuilder_.mergeFrom(value);
14761           }
14762           bitField0_ |= 0x00000001;
14763           onChanged();
14764           return this;
14765         }
14766         /**
14767          *
14768          *
14769          * <pre>
14770          * Not more than one notification per `period`.
14771          * </pre>
14772          *
14773          * <code>.google.protobuf.Duration period = 1;</code>
14774          */
clearPeriod()14775         public Builder clearPeriod() {
14776           bitField0_ = (bitField0_ & ~0x00000001);
14777           period_ = null;
14778           if (periodBuilder_ != null) {
14779             periodBuilder_.dispose();
14780             periodBuilder_ = null;
14781           }
14782           onChanged();
14783           return this;
14784         }
14785         /**
14786          *
14787          *
14788          * <pre>
14789          * Not more than one notification per `period`.
14790          * </pre>
14791          *
14792          * <code>.google.protobuf.Duration period = 1;</code>
14793          */
getPeriodBuilder()14794         public com.google.protobuf.Duration.Builder getPeriodBuilder() {
14795           bitField0_ |= 0x00000001;
14796           onChanged();
14797           return getPeriodFieldBuilder().getBuilder();
14798         }
14799         /**
14800          *
14801          *
14802          * <pre>
14803          * Not more than one notification per `period`.
14804          * </pre>
14805          *
14806          * <code>.google.protobuf.Duration period = 1;</code>
14807          */
getPeriodOrBuilder()14808         public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() {
14809           if (periodBuilder_ != null) {
14810             return periodBuilder_.getMessageOrBuilder();
14811           } else {
14812             return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
14813           }
14814         }
14815         /**
14816          *
14817          *
14818          * <pre>
14819          * Not more than one notification per `period`.
14820          * </pre>
14821          *
14822          * <code>.google.protobuf.Duration period = 1;</code>
14823          */
14824         private com.google.protobuf.SingleFieldBuilderV3<
14825                 com.google.protobuf.Duration,
14826                 com.google.protobuf.Duration.Builder,
14827                 com.google.protobuf.DurationOrBuilder>
getPeriodFieldBuilder()14828             getPeriodFieldBuilder() {
14829           if (periodBuilder_ == null) {
14830             periodBuilder_ =
14831                 new com.google.protobuf.SingleFieldBuilderV3<
14832                     com.google.protobuf.Duration,
14833                     com.google.protobuf.Duration.Builder,
14834                     com.google.protobuf.DurationOrBuilder>(
14835                     getPeriod(), getParentForChildren(), isClean());
14836             period_ = null;
14837           }
14838           return periodBuilder_;
14839         }
14840 
14841         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)14842         public final Builder setUnknownFields(
14843             final com.google.protobuf.UnknownFieldSet unknownFields) {
14844           return super.setUnknownFields(unknownFields);
14845         }
14846 
14847         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)14848         public final Builder mergeUnknownFields(
14849             final com.google.protobuf.UnknownFieldSet unknownFields) {
14850           return super.mergeUnknownFields(unknownFields);
14851         }
14852 
14853         // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit)
14854       }
14855 
14856       // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit)
14857       private static final com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
14858           DEFAULT_INSTANCE;
14859 
14860       static {
14861         DEFAULT_INSTANCE =
14862             new com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit();
14863       }
14864 
14865       public static com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
getDefaultInstance()14866           getDefaultInstance() {
14867         return DEFAULT_INSTANCE;
14868       }
14869 
14870       private static final com.google.protobuf.Parser<NotificationRateLimit> PARSER =
14871           new com.google.protobuf.AbstractParser<NotificationRateLimit>() {
14872             @java.lang.Override
14873             public NotificationRateLimit parsePartialFrom(
14874                 com.google.protobuf.CodedInputStream input,
14875                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
14876                 throws com.google.protobuf.InvalidProtocolBufferException {
14877               Builder builder = newBuilder();
14878               try {
14879                 builder.mergeFrom(input, extensionRegistry);
14880               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
14881                 throw e.setUnfinishedMessage(builder.buildPartial());
14882               } catch (com.google.protobuf.UninitializedMessageException e) {
14883                 throw e.asInvalidProtocolBufferException()
14884                     .setUnfinishedMessage(builder.buildPartial());
14885               } catch (java.io.IOException e) {
14886                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
14887                     .setUnfinishedMessage(builder.buildPartial());
14888               }
14889               return builder.buildPartial();
14890             }
14891           };
14892 
parser()14893       public static com.google.protobuf.Parser<NotificationRateLimit> parser() {
14894         return PARSER;
14895       }
14896 
14897       @java.lang.Override
getParserForType()14898       public com.google.protobuf.Parser<NotificationRateLimit> getParserForType() {
14899         return PARSER;
14900       }
14901 
14902       @java.lang.Override
14903       public com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
getDefaultInstanceForType()14904           getDefaultInstanceForType() {
14905         return DEFAULT_INSTANCE;
14906       }
14907     }
14908 
14909     public static final int NOTIFICATION_RATE_LIMIT_FIELD_NUMBER = 1;
14910     private com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
14911         notificationRateLimit_;
14912     /**
14913      *
14914      *
14915      * <pre>
14916      * Required for alert policies with a `LogMatch` condition.
14917      * This limit is not implemented for alert policies that are not log-based.
14918      * </pre>
14919      *
14920      * <code>
14921      * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
14922      * </code>
14923      *
14924      * @return Whether the notificationRateLimit field is set.
14925      */
14926     @java.lang.Override
hasNotificationRateLimit()14927     public boolean hasNotificationRateLimit() {
14928       return notificationRateLimit_ != null;
14929     }
14930     /**
14931      *
14932      *
14933      * <pre>
14934      * Required for alert policies with a `LogMatch` condition.
14935      * This limit is not implemented for alert policies that are not log-based.
14936      * </pre>
14937      *
14938      * <code>
14939      * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
14940      * </code>
14941      *
14942      * @return The notificationRateLimit.
14943      */
14944     @java.lang.Override
14945     public com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
getNotificationRateLimit()14946         getNotificationRateLimit() {
14947       return notificationRateLimit_ == null
14948           ? com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
14949               .getDefaultInstance()
14950           : notificationRateLimit_;
14951     }
14952     /**
14953      *
14954      *
14955      * <pre>
14956      * Required for alert policies with a `LogMatch` condition.
14957      * This limit is not implemented for alert policies that are not log-based.
14958      * </pre>
14959      *
14960      * <code>
14961      * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
14962      * </code>
14963      */
14964     @java.lang.Override
14965     public com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimitOrBuilder
getNotificationRateLimitOrBuilder()14966         getNotificationRateLimitOrBuilder() {
14967       return notificationRateLimit_ == null
14968           ? com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
14969               .getDefaultInstance()
14970           : notificationRateLimit_;
14971     }
14972 
14973     public static final int AUTO_CLOSE_FIELD_NUMBER = 3;
14974     private com.google.protobuf.Duration autoClose_;
14975     /**
14976      *
14977      *
14978      * <pre>
14979      * If an alert policy that was active has no data for this long, any open
14980      * incidents will close
14981      * </pre>
14982      *
14983      * <code>.google.protobuf.Duration auto_close = 3;</code>
14984      *
14985      * @return Whether the autoClose field is set.
14986      */
14987     @java.lang.Override
hasAutoClose()14988     public boolean hasAutoClose() {
14989       return autoClose_ != null;
14990     }
14991     /**
14992      *
14993      *
14994      * <pre>
14995      * If an alert policy that was active has no data for this long, any open
14996      * incidents will close
14997      * </pre>
14998      *
14999      * <code>.google.protobuf.Duration auto_close = 3;</code>
15000      *
15001      * @return The autoClose.
15002      */
15003     @java.lang.Override
getAutoClose()15004     public com.google.protobuf.Duration getAutoClose() {
15005       return autoClose_ == null ? com.google.protobuf.Duration.getDefaultInstance() : autoClose_;
15006     }
15007     /**
15008      *
15009      *
15010      * <pre>
15011      * If an alert policy that was active has no data for this long, any open
15012      * incidents will close
15013      * </pre>
15014      *
15015      * <code>.google.protobuf.Duration auto_close = 3;</code>
15016      */
15017     @java.lang.Override
getAutoCloseOrBuilder()15018     public com.google.protobuf.DurationOrBuilder getAutoCloseOrBuilder() {
15019       return autoClose_ == null ? com.google.protobuf.Duration.getDefaultInstance() : autoClose_;
15020     }
15021 
15022     private byte memoizedIsInitialized = -1;
15023 
15024     @java.lang.Override
isInitialized()15025     public final boolean isInitialized() {
15026       byte isInitialized = memoizedIsInitialized;
15027       if (isInitialized == 1) return true;
15028       if (isInitialized == 0) return false;
15029 
15030       memoizedIsInitialized = 1;
15031       return true;
15032     }
15033 
15034     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)15035     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
15036       if (notificationRateLimit_ != null) {
15037         output.writeMessage(1, getNotificationRateLimit());
15038       }
15039       if (autoClose_ != null) {
15040         output.writeMessage(3, getAutoClose());
15041       }
15042       getUnknownFields().writeTo(output);
15043     }
15044 
15045     @java.lang.Override
getSerializedSize()15046     public int getSerializedSize() {
15047       int size = memoizedSize;
15048       if (size != -1) return size;
15049 
15050       size = 0;
15051       if (notificationRateLimit_ != null) {
15052         size +=
15053             com.google.protobuf.CodedOutputStream.computeMessageSize(1, getNotificationRateLimit());
15054       }
15055       if (autoClose_ != null) {
15056         size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAutoClose());
15057       }
15058       size += getUnknownFields().getSerializedSize();
15059       memoizedSize = size;
15060       return size;
15061     }
15062 
15063     @java.lang.Override
equals(final java.lang.Object obj)15064     public boolean equals(final java.lang.Object obj) {
15065       if (obj == this) {
15066         return true;
15067       }
15068       if (!(obj instanceof com.google.monitoring.v3.AlertPolicy.AlertStrategy)) {
15069         return super.equals(obj);
15070       }
15071       com.google.monitoring.v3.AlertPolicy.AlertStrategy other =
15072           (com.google.monitoring.v3.AlertPolicy.AlertStrategy) obj;
15073 
15074       if (hasNotificationRateLimit() != other.hasNotificationRateLimit()) return false;
15075       if (hasNotificationRateLimit()) {
15076         if (!getNotificationRateLimit().equals(other.getNotificationRateLimit())) return false;
15077       }
15078       if (hasAutoClose() != other.hasAutoClose()) return false;
15079       if (hasAutoClose()) {
15080         if (!getAutoClose().equals(other.getAutoClose())) return false;
15081       }
15082       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
15083       return true;
15084     }
15085 
15086     @java.lang.Override
hashCode()15087     public int hashCode() {
15088       if (memoizedHashCode != 0) {
15089         return memoizedHashCode;
15090       }
15091       int hash = 41;
15092       hash = (19 * hash) + getDescriptor().hashCode();
15093       if (hasNotificationRateLimit()) {
15094         hash = (37 * hash) + NOTIFICATION_RATE_LIMIT_FIELD_NUMBER;
15095         hash = (53 * hash) + getNotificationRateLimit().hashCode();
15096       }
15097       if (hasAutoClose()) {
15098         hash = (37 * hash) + AUTO_CLOSE_FIELD_NUMBER;
15099         hash = (53 * hash) + getAutoClose().hashCode();
15100       }
15101       hash = (29 * hash) + getUnknownFields().hashCode();
15102       memoizedHashCode = hash;
15103       return hash;
15104     }
15105 
parseFrom( java.nio.ByteBuffer data)15106     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(
15107         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
15108       return PARSER.parseFrom(data);
15109     }
15110 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)15111     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(
15112         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15113         throws com.google.protobuf.InvalidProtocolBufferException {
15114       return PARSER.parseFrom(data, extensionRegistry);
15115     }
15116 
parseFrom( com.google.protobuf.ByteString data)15117     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(
15118         com.google.protobuf.ByteString data)
15119         throws com.google.protobuf.InvalidProtocolBufferException {
15120       return PARSER.parseFrom(data);
15121     }
15122 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)15123     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(
15124         com.google.protobuf.ByteString data,
15125         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15126         throws com.google.protobuf.InvalidProtocolBufferException {
15127       return PARSER.parseFrom(data, extensionRegistry);
15128     }
15129 
parseFrom(byte[] data)15130     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(byte[] data)
15131         throws com.google.protobuf.InvalidProtocolBufferException {
15132       return PARSER.parseFrom(data);
15133     }
15134 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)15135     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(
15136         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15137         throws com.google.protobuf.InvalidProtocolBufferException {
15138       return PARSER.parseFrom(data, extensionRegistry);
15139     }
15140 
parseFrom( java.io.InputStream input)15141     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(
15142         java.io.InputStream input) throws java.io.IOException {
15143       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
15144     }
15145 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)15146     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(
15147         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15148         throws java.io.IOException {
15149       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
15150           PARSER, input, extensionRegistry);
15151     }
15152 
parseDelimitedFrom( java.io.InputStream input)15153     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseDelimitedFrom(
15154         java.io.InputStream input) throws java.io.IOException {
15155       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
15156     }
15157 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)15158     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseDelimitedFrom(
15159         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15160         throws java.io.IOException {
15161       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
15162           PARSER, input, extensionRegistry);
15163     }
15164 
parseFrom( com.google.protobuf.CodedInputStream input)15165     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(
15166         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
15167       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
15168     }
15169 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)15170     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy parseFrom(
15171         com.google.protobuf.CodedInputStream input,
15172         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15173         throws java.io.IOException {
15174       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
15175           PARSER, input, extensionRegistry);
15176     }
15177 
15178     @java.lang.Override
newBuilderForType()15179     public Builder newBuilderForType() {
15180       return newBuilder();
15181     }
15182 
newBuilder()15183     public static Builder newBuilder() {
15184       return DEFAULT_INSTANCE.toBuilder();
15185     }
15186 
newBuilder(com.google.monitoring.v3.AlertPolicy.AlertStrategy prototype)15187     public static Builder newBuilder(com.google.monitoring.v3.AlertPolicy.AlertStrategy prototype) {
15188       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
15189     }
15190 
15191     @java.lang.Override
toBuilder()15192     public Builder toBuilder() {
15193       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
15194     }
15195 
15196     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)15197     protected Builder newBuilderForType(
15198         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
15199       Builder builder = new Builder(parent);
15200       return builder;
15201     }
15202     /**
15203      *
15204      *
15205      * <pre>
15206      * Control over how the notification channels in `notification_channels`
15207      * are notified when this alert fires.
15208      * </pre>
15209      *
15210      * Protobuf type {@code google.monitoring.v3.AlertPolicy.AlertStrategy}
15211      */
15212     public static final class Builder
15213         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
15214         implements
15215         // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy.AlertStrategy)
15216         com.google.monitoring.v3.AlertPolicy.AlertStrategyOrBuilder {
getDescriptor()15217       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
15218         return com.google.monitoring.v3.AlertProto
15219             .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_descriptor;
15220       }
15221 
15222       @java.lang.Override
15223       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()15224           internalGetFieldAccessorTable() {
15225         return com.google.monitoring.v3.AlertProto
15226             .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_fieldAccessorTable
15227             .ensureFieldAccessorsInitialized(
15228                 com.google.monitoring.v3.AlertPolicy.AlertStrategy.class,
15229                 com.google.monitoring.v3.AlertPolicy.AlertStrategy.Builder.class);
15230       }
15231 
15232       // Construct using com.google.monitoring.v3.AlertPolicy.AlertStrategy.newBuilder()
Builder()15233       private Builder() {}
15234 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)15235       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
15236         super(parent);
15237       }
15238 
15239       @java.lang.Override
clear()15240       public Builder clear() {
15241         super.clear();
15242         bitField0_ = 0;
15243         notificationRateLimit_ = null;
15244         if (notificationRateLimitBuilder_ != null) {
15245           notificationRateLimitBuilder_.dispose();
15246           notificationRateLimitBuilder_ = null;
15247         }
15248         autoClose_ = null;
15249         if (autoCloseBuilder_ != null) {
15250           autoCloseBuilder_.dispose();
15251           autoCloseBuilder_ = null;
15252         }
15253         return this;
15254       }
15255 
15256       @java.lang.Override
getDescriptorForType()15257       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
15258         return com.google.monitoring.v3.AlertProto
15259             .internal_static_google_monitoring_v3_AlertPolicy_AlertStrategy_descriptor;
15260       }
15261 
15262       @java.lang.Override
getDefaultInstanceForType()15263       public com.google.monitoring.v3.AlertPolicy.AlertStrategy getDefaultInstanceForType() {
15264         return com.google.monitoring.v3.AlertPolicy.AlertStrategy.getDefaultInstance();
15265       }
15266 
15267       @java.lang.Override
build()15268       public com.google.monitoring.v3.AlertPolicy.AlertStrategy build() {
15269         com.google.monitoring.v3.AlertPolicy.AlertStrategy result = buildPartial();
15270         if (!result.isInitialized()) {
15271           throw newUninitializedMessageException(result);
15272         }
15273         return result;
15274       }
15275 
15276       @java.lang.Override
buildPartial()15277       public com.google.monitoring.v3.AlertPolicy.AlertStrategy buildPartial() {
15278         com.google.monitoring.v3.AlertPolicy.AlertStrategy result =
15279             new com.google.monitoring.v3.AlertPolicy.AlertStrategy(this);
15280         if (bitField0_ != 0) {
15281           buildPartial0(result);
15282         }
15283         onBuilt();
15284         return result;
15285       }
15286 
buildPartial0(com.google.monitoring.v3.AlertPolicy.AlertStrategy result)15287       private void buildPartial0(com.google.monitoring.v3.AlertPolicy.AlertStrategy result) {
15288         int from_bitField0_ = bitField0_;
15289         if (((from_bitField0_ & 0x00000001) != 0)) {
15290           result.notificationRateLimit_ =
15291               notificationRateLimitBuilder_ == null
15292                   ? notificationRateLimit_
15293                   : notificationRateLimitBuilder_.build();
15294         }
15295         if (((from_bitField0_ & 0x00000002) != 0)) {
15296           result.autoClose_ = autoCloseBuilder_ == null ? autoClose_ : autoCloseBuilder_.build();
15297         }
15298       }
15299 
15300       @java.lang.Override
clone()15301       public Builder clone() {
15302         return super.clone();
15303       }
15304 
15305       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)15306       public Builder setField(
15307           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
15308         return super.setField(field, value);
15309       }
15310 
15311       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)15312       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
15313         return super.clearField(field);
15314       }
15315 
15316       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)15317       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
15318         return super.clearOneof(oneof);
15319       }
15320 
15321       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)15322       public Builder setRepeatedField(
15323           com.google.protobuf.Descriptors.FieldDescriptor field,
15324           int index,
15325           java.lang.Object value) {
15326         return super.setRepeatedField(field, index, value);
15327       }
15328 
15329       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)15330       public Builder addRepeatedField(
15331           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
15332         return super.addRepeatedField(field, value);
15333       }
15334 
15335       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)15336       public Builder mergeFrom(com.google.protobuf.Message other) {
15337         if (other instanceof com.google.monitoring.v3.AlertPolicy.AlertStrategy) {
15338           return mergeFrom((com.google.monitoring.v3.AlertPolicy.AlertStrategy) other);
15339         } else {
15340           super.mergeFrom(other);
15341           return this;
15342         }
15343       }
15344 
mergeFrom(com.google.monitoring.v3.AlertPolicy.AlertStrategy other)15345       public Builder mergeFrom(com.google.monitoring.v3.AlertPolicy.AlertStrategy other) {
15346         if (other == com.google.monitoring.v3.AlertPolicy.AlertStrategy.getDefaultInstance())
15347           return this;
15348         if (other.hasNotificationRateLimit()) {
15349           mergeNotificationRateLimit(other.getNotificationRateLimit());
15350         }
15351         if (other.hasAutoClose()) {
15352           mergeAutoClose(other.getAutoClose());
15353         }
15354         this.mergeUnknownFields(other.getUnknownFields());
15355         onChanged();
15356         return this;
15357       }
15358 
15359       @java.lang.Override
isInitialized()15360       public final boolean isInitialized() {
15361         return true;
15362       }
15363 
15364       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)15365       public Builder mergeFrom(
15366           com.google.protobuf.CodedInputStream input,
15367           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15368           throws java.io.IOException {
15369         if (extensionRegistry == null) {
15370           throw new java.lang.NullPointerException();
15371         }
15372         try {
15373           boolean done = false;
15374           while (!done) {
15375             int tag = input.readTag();
15376             switch (tag) {
15377               case 0:
15378                 done = true;
15379                 break;
15380               case 10:
15381                 {
15382                   input.readMessage(
15383                       getNotificationRateLimitFieldBuilder().getBuilder(), extensionRegistry);
15384                   bitField0_ |= 0x00000001;
15385                   break;
15386                 } // case 10
15387               case 26:
15388                 {
15389                   input.readMessage(getAutoCloseFieldBuilder().getBuilder(), extensionRegistry);
15390                   bitField0_ |= 0x00000002;
15391                   break;
15392                 } // case 26
15393               default:
15394                 {
15395                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
15396                     done = true; // was an endgroup tag
15397                   }
15398                   break;
15399                 } // default:
15400             } // switch (tag)
15401           } // while (!done)
15402         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
15403           throw e.unwrapIOException();
15404         } finally {
15405           onChanged();
15406         } // finally
15407         return this;
15408       }
15409 
15410       private int bitField0_;
15411 
15412       private com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
15413           notificationRateLimit_;
15414       private com.google.protobuf.SingleFieldBuilderV3<
15415               com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit,
15416               com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.Builder,
15417               com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimitOrBuilder>
15418           notificationRateLimitBuilder_;
15419       /**
15420        *
15421        *
15422        * <pre>
15423        * Required for alert policies with a `LogMatch` condition.
15424        * This limit is not implemented for alert policies that are not log-based.
15425        * </pre>
15426        *
15427        * <code>
15428        * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
15429        * </code>
15430        *
15431        * @return Whether the notificationRateLimit field is set.
15432        */
hasNotificationRateLimit()15433       public boolean hasNotificationRateLimit() {
15434         return ((bitField0_ & 0x00000001) != 0);
15435       }
15436       /**
15437        *
15438        *
15439        * <pre>
15440        * Required for alert policies with a `LogMatch` condition.
15441        * This limit is not implemented for alert policies that are not log-based.
15442        * </pre>
15443        *
15444        * <code>
15445        * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
15446        * </code>
15447        *
15448        * @return The notificationRateLimit.
15449        */
15450       public com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
getNotificationRateLimit()15451           getNotificationRateLimit() {
15452         if (notificationRateLimitBuilder_ == null) {
15453           return notificationRateLimit_ == null
15454               ? com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
15455                   .getDefaultInstance()
15456               : notificationRateLimit_;
15457         } else {
15458           return notificationRateLimitBuilder_.getMessage();
15459         }
15460       }
15461       /**
15462        *
15463        *
15464        * <pre>
15465        * Required for alert policies with a `LogMatch` condition.
15466        * This limit is not implemented for alert policies that are not log-based.
15467        * </pre>
15468        *
15469        * <code>
15470        * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
15471        * </code>
15472        */
setNotificationRateLimit( com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit value)15473       public Builder setNotificationRateLimit(
15474           com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit value) {
15475         if (notificationRateLimitBuilder_ == null) {
15476           if (value == null) {
15477             throw new NullPointerException();
15478           }
15479           notificationRateLimit_ = value;
15480         } else {
15481           notificationRateLimitBuilder_.setMessage(value);
15482         }
15483         bitField0_ |= 0x00000001;
15484         onChanged();
15485         return this;
15486       }
15487       /**
15488        *
15489        *
15490        * <pre>
15491        * Required for alert policies with a `LogMatch` condition.
15492        * This limit is not implemented for alert policies that are not log-based.
15493        * </pre>
15494        *
15495        * <code>
15496        * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
15497        * </code>
15498        */
setNotificationRateLimit( com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.Builder builderForValue)15499       public Builder setNotificationRateLimit(
15500           com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.Builder
15501               builderForValue) {
15502         if (notificationRateLimitBuilder_ == null) {
15503           notificationRateLimit_ = builderForValue.build();
15504         } else {
15505           notificationRateLimitBuilder_.setMessage(builderForValue.build());
15506         }
15507         bitField0_ |= 0x00000001;
15508         onChanged();
15509         return this;
15510       }
15511       /**
15512        *
15513        *
15514        * <pre>
15515        * Required for alert policies with a `LogMatch` condition.
15516        * This limit is not implemented for alert policies that are not log-based.
15517        * </pre>
15518        *
15519        * <code>
15520        * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
15521        * </code>
15522        */
mergeNotificationRateLimit( com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit value)15523       public Builder mergeNotificationRateLimit(
15524           com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit value) {
15525         if (notificationRateLimitBuilder_ == null) {
15526           if (((bitField0_ & 0x00000001) != 0)
15527               && notificationRateLimit_ != null
15528               && notificationRateLimit_
15529                   != com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
15530                       .getDefaultInstance()) {
15531             getNotificationRateLimitBuilder().mergeFrom(value);
15532           } else {
15533             notificationRateLimit_ = value;
15534           }
15535         } else {
15536           notificationRateLimitBuilder_.mergeFrom(value);
15537         }
15538         bitField0_ |= 0x00000001;
15539         onChanged();
15540         return this;
15541       }
15542       /**
15543        *
15544        *
15545        * <pre>
15546        * Required for alert policies with a `LogMatch` condition.
15547        * This limit is not implemented for alert policies that are not log-based.
15548        * </pre>
15549        *
15550        * <code>
15551        * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
15552        * </code>
15553        */
clearNotificationRateLimit()15554       public Builder clearNotificationRateLimit() {
15555         bitField0_ = (bitField0_ & ~0x00000001);
15556         notificationRateLimit_ = null;
15557         if (notificationRateLimitBuilder_ != null) {
15558           notificationRateLimitBuilder_.dispose();
15559           notificationRateLimitBuilder_ = null;
15560         }
15561         onChanged();
15562         return this;
15563       }
15564       /**
15565        *
15566        *
15567        * <pre>
15568        * Required for alert policies with a `LogMatch` condition.
15569        * This limit is not implemented for alert policies that are not log-based.
15570        * </pre>
15571        *
15572        * <code>
15573        * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
15574        * </code>
15575        */
15576       public com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.Builder
getNotificationRateLimitBuilder()15577           getNotificationRateLimitBuilder() {
15578         bitField0_ |= 0x00000001;
15579         onChanged();
15580         return getNotificationRateLimitFieldBuilder().getBuilder();
15581       }
15582       /**
15583        *
15584        *
15585        * <pre>
15586        * Required for alert policies with a `LogMatch` condition.
15587        * This limit is not implemented for alert policies that are not log-based.
15588        * </pre>
15589        *
15590        * <code>
15591        * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
15592        * </code>
15593        */
15594       public com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimitOrBuilder
getNotificationRateLimitOrBuilder()15595           getNotificationRateLimitOrBuilder() {
15596         if (notificationRateLimitBuilder_ != null) {
15597           return notificationRateLimitBuilder_.getMessageOrBuilder();
15598         } else {
15599           return notificationRateLimit_ == null
15600               ? com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit
15601                   .getDefaultInstance()
15602               : notificationRateLimit_;
15603         }
15604       }
15605       /**
15606        *
15607        *
15608        * <pre>
15609        * Required for alert policies with a `LogMatch` condition.
15610        * This limit is not implemented for alert policies that are not log-based.
15611        * </pre>
15612        *
15613        * <code>
15614        * .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1;
15615        * </code>
15616        */
15617       private com.google.protobuf.SingleFieldBuilderV3<
15618               com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit,
15619               com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.Builder,
15620               com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimitOrBuilder>
getNotificationRateLimitFieldBuilder()15621           getNotificationRateLimitFieldBuilder() {
15622         if (notificationRateLimitBuilder_ == null) {
15623           notificationRateLimitBuilder_ =
15624               new com.google.protobuf.SingleFieldBuilderV3<
15625                   com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit,
15626                   com.google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit.Builder,
15627                   com.google.monitoring.v3.AlertPolicy.AlertStrategy
15628                       .NotificationRateLimitOrBuilder>(
15629                   getNotificationRateLimit(), getParentForChildren(), isClean());
15630           notificationRateLimit_ = null;
15631         }
15632         return notificationRateLimitBuilder_;
15633       }
15634 
15635       private com.google.protobuf.Duration autoClose_;
15636       private com.google.protobuf.SingleFieldBuilderV3<
15637               com.google.protobuf.Duration,
15638               com.google.protobuf.Duration.Builder,
15639               com.google.protobuf.DurationOrBuilder>
15640           autoCloseBuilder_;
15641       /**
15642        *
15643        *
15644        * <pre>
15645        * If an alert policy that was active has no data for this long, any open
15646        * incidents will close
15647        * </pre>
15648        *
15649        * <code>.google.protobuf.Duration auto_close = 3;</code>
15650        *
15651        * @return Whether the autoClose field is set.
15652        */
hasAutoClose()15653       public boolean hasAutoClose() {
15654         return ((bitField0_ & 0x00000002) != 0);
15655       }
15656       /**
15657        *
15658        *
15659        * <pre>
15660        * If an alert policy that was active has no data for this long, any open
15661        * incidents will close
15662        * </pre>
15663        *
15664        * <code>.google.protobuf.Duration auto_close = 3;</code>
15665        *
15666        * @return The autoClose.
15667        */
getAutoClose()15668       public com.google.protobuf.Duration getAutoClose() {
15669         if (autoCloseBuilder_ == null) {
15670           return autoClose_ == null
15671               ? com.google.protobuf.Duration.getDefaultInstance()
15672               : autoClose_;
15673         } else {
15674           return autoCloseBuilder_.getMessage();
15675         }
15676       }
15677       /**
15678        *
15679        *
15680        * <pre>
15681        * If an alert policy that was active has no data for this long, any open
15682        * incidents will close
15683        * </pre>
15684        *
15685        * <code>.google.protobuf.Duration auto_close = 3;</code>
15686        */
setAutoClose(com.google.protobuf.Duration value)15687       public Builder setAutoClose(com.google.protobuf.Duration value) {
15688         if (autoCloseBuilder_ == null) {
15689           if (value == null) {
15690             throw new NullPointerException();
15691           }
15692           autoClose_ = value;
15693         } else {
15694           autoCloseBuilder_.setMessage(value);
15695         }
15696         bitField0_ |= 0x00000002;
15697         onChanged();
15698         return this;
15699       }
15700       /**
15701        *
15702        *
15703        * <pre>
15704        * If an alert policy that was active has no data for this long, any open
15705        * incidents will close
15706        * </pre>
15707        *
15708        * <code>.google.protobuf.Duration auto_close = 3;</code>
15709        */
setAutoClose(com.google.protobuf.Duration.Builder builderForValue)15710       public Builder setAutoClose(com.google.protobuf.Duration.Builder builderForValue) {
15711         if (autoCloseBuilder_ == null) {
15712           autoClose_ = builderForValue.build();
15713         } else {
15714           autoCloseBuilder_.setMessage(builderForValue.build());
15715         }
15716         bitField0_ |= 0x00000002;
15717         onChanged();
15718         return this;
15719       }
15720       /**
15721        *
15722        *
15723        * <pre>
15724        * If an alert policy that was active has no data for this long, any open
15725        * incidents will close
15726        * </pre>
15727        *
15728        * <code>.google.protobuf.Duration auto_close = 3;</code>
15729        */
mergeAutoClose(com.google.protobuf.Duration value)15730       public Builder mergeAutoClose(com.google.protobuf.Duration value) {
15731         if (autoCloseBuilder_ == null) {
15732           if (((bitField0_ & 0x00000002) != 0)
15733               && autoClose_ != null
15734               && autoClose_ != com.google.protobuf.Duration.getDefaultInstance()) {
15735             getAutoCloseBuilder().mergeFrom(value);
15736           } else {
15737             autoClose_ = value;
15738           }
15739         } else {
15740           autoCloseBuilder_.mergeFrom(value);
15741         }
15742         bitField0_ |= 0x00000002;
15743         onChanged();
15744         return this;
15745       }
15746       /**
15747        *
15748        *
15749        * <pre>
15750        * If an alert policy that was active has no data for this long, any open
15751        * incidents will close
15752        * </pre>
15753        *
15754        * <code>.google.protobuf.Duration auto_close = 3;</code>
15755        */
clearAutoClose()15756       public Builder clearAutoClose() {
15757         bitField0_ = (bitField0_ & ~0x00000002);
15758         autoClose_ = null;
15759         if (autoCloseBuilder_ != null) {
15760           autoCloseBuilder_.dispose();
15761           autoCloseBuilder_ = null;
15762         }
15763         onChanged();
15764         return this;
15765       }
15766       /**
15767        *
15768        *
15769        * <pre>
15770        * If an alert policy that was active has no data for this long, any open
15771        * incidents will close
15772        * </pre>
15773        *
15774        * <code>.google.protobuf.Duration auto_close = 3;</code>
15775        */
getAutoCloseBuilder()15776       public com.google.protobuf.Duration.Builder getAutoCloseBuilder() {
15777         bitField0_ |= 0x00000002;
15778         onChanged();
15779         return getAutoCloseFieldBuilder().getBuilder();
15780       }
15781       /**
15782        *
15783        *
15784        * <pre>
15785        * If an alert policy that was active has no data for this long, any open
15786        * incidents will close
15787        * </pre>
15788        *
15789        * <code>.google.protobuf.Duration auto_close = 3;</code>
15790        */
getAutoCloseOrBuilder()15791       public com.google.protobuf.DurationOrBuilder getAutoCloseOrBuilder() {
15792         if (autoCloseBuilder_ != null) {
15793           return autoCloseBuilder_.getMessageOrBuilder();
15794         } else {
15795           return autoClose_ == null
15796               ? com.google.protobuf.Duration.getDefaultInstance()
15797               : autoClose_;
15798         }
15799       }
15800       /**
15801        *
15802        *
15803        * <pre>
15804        * If an alert policy that was active has no data for this long, any open
15805        * incidents will close
15806        * </pre>
15807        *
15808        * <code>.google.protobuf.Duration auto_close = 3;</code>
15809        */
15810       private com.google.protobuf.SingleFieldBuilderV3<
15811               com.google.protobuf.Duration,
15812               com.google.protobuf.Duration.Builder,
15813               com.google.protobuf.DurationOrBuilder>
getAutoCloseFieldBuilder()15814           getAutoCloseFieldBuilder() {
15815         if (autoCloseBuilder_ == null) {
15816           autoCloseBuilder_ =
15817               new com.google.protobuf.SingleFieldBuilderV3<
15818                   com.google.protobuf.Duration,
15819                   com.google.protobuf.Duration.Builder,
15820                   com.google.protobuf.DurationOrBuilder>(
15821                   getAutoClose(), getParentForChildren(), isClean());
15822           autoClose_ = null;
15823         }
15824         return autoCloseBuilder_;
15825       }
15826 
15827       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)15828       public final Builder setUnknownFields(
15829           final com.google.protobuf.UnknownFieldSet unknownFields) {
15830         return super.setUnknownFields(unknownFields);
15831       }
15832 
15833       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)15834       public final Builder mergeUnknownFields(
15835           final com.google.protobuf.UnknownFieldSet unknownFields) {
15836         return super.mergeUnknownFields(unknownFields);
15837       }
15838 
15839       // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy.AlertStrategy)
15840     }
15841 
15842     // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy.AlertStrategy)
15843     private static final com.google.monitoring.v3.AlertPolicy.AlertStrategy DEFAULT_INSTANCE;
15844 
15845     static {
15846       DEFAULT_INSTANCE = new com.google.monitoring.v3.AlertPolicy.AlertStrategy();
15847     }
15848 
getDefaultInstance()15849     public static com.google.monitoring.v3.AlertPolicy.AlertStrategy getDefaultInstance() {
15850       return DEFAULT_INSTANCE;
15851     }
15852 
15853     private static final com.google.protobuf.Parser<AlertStrategy> PARSER =
15854         new com.google.protobuf.AbstractParser<AlertStrategy>() {
15855           @java.lang.Override
15856           public AlertStrategy parsePartialFrom(
15857               com.google.protobuf.CodedInputStream input,
15858               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
15859               throws com.google.protobuf.InvalidProtocolBufferException {
15860             Builder builder = newBuilder();
15861             try {
15862               builder.mergeFrom(input, extensionRegistry);
15863             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
15864               throw e.setUnfinishedMessage(builder.buildPartial());
15865             } catch (com.google.protobuf.UninitializedMessageException e) {
15866               throw e.asInvalidProtocolBufferException()
15867                   .setUnfinishedMessage(builder.buildPartial());
15868             } catch (java.io.IOException e) {
15869               throw new com.google.protobuf.InvalidProtocolBufferException(e)
15870                   .setUnfinishedMessage(builder.buildPartial());
15871             }
15872             return builder.buildPartial();
15873           }
15874         };
15875 
parser()15876     public static com.google.protobuf.Parser<AlertStrategy> parser() {
15877       return PARSER;
15878     }
15879 
15880     @java.lang.Override
getParserForType()15881     public com.google.protobuf.Parser<AlertStrategy> getParserForType() {
15882       return PARSER;
15883     }
15884 
15885     @java.lang.Override
getDefaultInstanceForType()15886     public com.google.monitoring.v3.AlertPolicy.AlertStrategy getDefaultInstanceForType() {
15887       return DEFAULT_INSTANCE;
15888     }
15889   }
15890 
15891   public static final int NAME_FIELD_NUMBER = 1;
15892 
15893   @SuppressWarnings("serial")
15894   private volatile java.lang.Object name_ = "";
15895   /**
15896    *
15897    *
15898    * <pre>
15899    * Required if the policy exists. The resource name for this policy. The
15900    * format is:
15901    *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
15902    * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy
15903    * is created. When calling the
15904    * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
15905    * method, do not include the `name` field in the alerting policy passed as
15906    * part of the request.
15907    * </pre>
15908    *
15909    * <code>string name = 1;</code>
15910    *
15911    * @return The name.
15912    */
15913   @java.lang.Override
getName()15914   public java.lang.String getName() {
15915     java.lang.Object ref = name_;
15916     if (ref instanceof java.lang.String) {
15917       return (java.lang.String) ref;
15918     } else {
15919       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
15920       java.lang.String s = bs.toStringUtf8();
15921       name_ = s;
15922       return s;
15923     }
15924   }
15925   /**
15926    *
15927    *
15928    * <pre>
15929    * Required if the policy exists. The resource name for this policy. The
15930    * format is:
15931    *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
15932    * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy
15933    * is created. When calling the
15934    * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
15935    * method, do not include the `name` field in the alerting policy passed as
15936    * part of the request.
15937    * </pre>
15938    *
15939    * <code>string name = 1;</code>
15940    *
15941    * @return The bytes for name.
15942    */
15943   @java.lang.Override
getNameBytes()15944   public com.google.protobuf.ByteString getNameBytes() {
15945     java.lang.Object ref = name_;
15946     if (ref instanceof java.lang.String) {
15947       com.google.protobuf.ByteString b =
15948           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
15949       name_ = b;
15950       return b;
15951     } else {
15952       return (com.google.protobuf.ByteString) ref;
15953     }
15954   }
15955 
15956   public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
15957 
15958   @SuppressWarnings("serial")
15959   private volatile java.lang.Object displayName_ = "";
15960   /**
15961    *
15962    *
15963    * <pre>
15964    * A short name or phrase used to identify the policy in dashboards,
15965    * notifications, and incidents. To avoid confusion, don't use the same
15966    * display name for multiple policies in the same project. The name is
15967    * limited to 512 Unicode characters.
15968    * </pre>
15969    *
15970    * <code>string display_name = 2;</code>
15971    *
15972    * @return The displayName.
15973    */
15974   @java.lang.Override
getDisplayName()15975   public java.lang.String getDisplayName() {
15976     java.lang.Object ref = displayName_;
15977     if (ref instanceof java.lang.String) {
15978       return (java.lang.String) ref;
15979     } else {
15980       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
15981       java.lang.String s = bs.toStringUtf8();
15982       displayName_ = s;
15983       return s;
15984     }
15985   }
15986   /**
15987    *
15988    *
15989    * <pre>
15990    * A short name or phrase used to identify the policy in dashboards,
15991    * notifications, and incidents. To avoid confusion, don't use the same
15992    * display name for multiple policies in the same project. The name is
15993    * limited to 512 Unicode characters.
15994    * </pre>
15995    *
15996    * <code>string display_name = 2;</code>
15997    *
15998    * @return The bytes for displayName.
15999    */
16000   @java.lang.Override
getDisplayNameBytes()16001   public com.google.protobuf.ByteString getDisplayNameBytes() {
16002     java.lang.Object ref = displayName_;
16003     if (ref instanceof java.lang.String) {
16004       com.google.protobuf.ByteString b =
16005           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
16006       displayName_ = b;
16007       return b;
16008     } else {
16009       return (com.google.protobuf.ByteString) ref;
16010     }
16011   }
16012 
16013   public static final int DOCUMENTATION_FIELD_NUMBER = 13;
16014   private com.google.monitoring.v3.AlertPolicy.Documentation documentation_;
16015   /**
16016    *
16017    *
16018    * <pre>
16019    * Documentation that is included with notifications and incidents related to
16020    * this policy. Best practice is for the documentation to include information
16021    * to help responders understand, mitigate, escalate, and correct the
16022    * underlying problems detected by the alerting policy. Notification channels
16023    * that have limited capacity might not show this documentation.
16024    * </pre>
16025    *
16026    * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
16027    *
16028    * @return Whether the documentation field is set.
16029    */
16030   @java.lang.Override
hasDocumentation()16031   public boolean hasDocumentation() {
16032     return documentation_ != null;
16033   }
16034   /**
16035    *
16036    *
16037    * <pre>
16038    * Documentation that is included with notifications and incidents related to
16039    * this policy. Best practice is for the documentation to include information
16040    * to help responders understand, mitigate, escalate, and correct the
16041    * underlying problems detected by the alerting policy. Notification channels
16042    * that have limited capacity might not show this documentation.
16043    * </pre>
16044    *
16045    * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
16046    *
16047    * @return The documentation.
16048    */
16049   @java.lang.Override
getDocumentation()16050   public com.google.monitoring.v3.AlertPolicy.Documentation getDocumentation() {
16051     return documentation_ == null
16052         ? com.google.monitoring.v3.AlertPolicy.Documentation.getDefaultInstance()
16053         : documentation_;
16054   }
16055   /**
16056    *
16057    *
16058    * <pre>
16059    * Documentation that is included with notifications and incidents related to
16060    * this policy. Best practice is for the documentation to include information
16061    * to help responders understand, mitigate, escalate, and correct the
16062    * underlying problems detected by the alerting policy. Notification channels
16063    * that have limited capacity might not show this documentation.
16064    * </pre>
16065    *
16066    * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
16067    */
16068   @java.lang.Override
getDocumentationOrBuilder()16069   public com.google.monitoring.v3.AlertPolicy.DocumentationOrBuilder getDocumentationOrBuilder() {
16070     return documentation_ == null
16071         ? com.google.monitoring.v3.AlertPolicy.Documentation.getDefaultInstance()
16072         : documentation_;
16073   }
16074 
16075   public static final int USER_LABELS_FIELD_NUMBER = 16;
16076 
16077   private static final class UserLabelsDefaultEntryHolder {
16078     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
16079         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
16080             com.google.monitoring.v3.AlertProto
16081                 .internal_static_google_monitoring_v3_AlertPolicy_UserLabelsEntry_descriptor,
16082             com.google.protobuf.WireFormat.FieldType.STRING,
16083             "",
16084             com.google.protobuf.WireFormat.FieldType.STRING,
16085             "");
16086   }
16087 
16088   @SuppressWarnings("serial")
16089   private com.google.protobuf.MapField<java.lang.String, java.lang.String> userLabels_;
16090 
internalGetUserLabels()16091   private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetUserLabels() {
16092     if (userLabels_ == null) {
16093       return com.google.protobuf.MapField.emptyMapField(UserLabelsDefaultEntryHolder.defaultEntry);
16094     }
16095     return userLabels_;
16096   }
16097 
getUserLabelsCount()16098   public int getUserLabelsCount() {
16099     return internalGetUserLabels().getMap().size();
16100   }
16101   /**
16102    *
16103    *
16104    * <pre>
16105    * User-supplied key/value data to be used for organizing and
16106    * identifying the `AlertPolicy` objects.
16107    * The field can contain up to 64 entries. Each key and value is limited to
16108    * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
16109    * values can contain only lowercase letters, numerals, underscores, and
16110    * dashes. Keys must begin with a letter.
16111    * </pre>
16112    *
16113    * <code>map&lt;string, string&gt; user_labels = 16;</code>
16114    */
16115   @java.lang.Override
containsUserLabels(java.lang.String key)16116   public boolean containsUserLabels(java.lang.String key) {
16117     if (key == null) {
16118       throw new NullPointerException("map key");
16119     }
16120     return internalGetUserLabels().getMap().containsKey(key);
16121   }
16122   /** Use {@link #getUserLabelsMap()} instead. */
16123   @java.lang.Override
16124   @java.lang.Deprecated
getUserLabels()16125   public java.util.Map<java.lang.String, java.lang.String> getUserLabels() {
16126     return getUserLabelsMap();
16127   }
16128   /**
16129    *
16130    *
16131    * <pre>
16132    * User-supplied key/value data to be used for organizing and
16133    * identifying the `AlertPolicy` objects.
16134    * The field can contain up to 64 entries. Each key and value is limited to
16135    * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
16136    * values can contain only lowercase letters, numerals, underscores, and
16137    * dashes. Keys must begin with a letter.
16138    * </pre>
16139    *
16140    * <code>map&lt;string, string&gt; user_labels = 16;</code>
16141    */
16142   @java.lang.Override
getUserLabelsMap()16143   public java.util.Map<java.lang.String, java.lang.String> getUserLabelsMap() {
16144     return internalGetUserLabels().getMap();
16145   }
16146   /**
16147    *
16148    *
16149    * <pre>
16150    * User-supplied key/value data to be used for organizing and
16151    * identifying the `AlertPolicy` objects.
16152    * The field can contain up to 64 entries. Each key and value is limited to
16153    * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
16154    * values can contain only lowercase letters, numerals, underscores, and
16155    * dashes. Keys must begin with a letter.
16156    * </pre>
16157    *
16158    * <code>map&lt;string, string&gt; user_labels = 16;</code>
16159    */
16160   @java.lang.Override
getUserLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)16161   public /* nullable */ java.lang.String getUserLabelsOrDefault(
16162       java.lang.String key,
16163       /* nullable */
16164       java.lang.String defaultValue) {
16165     if (key == null) {
16166       throw new NullPointerException("map key");
16167     }
16168     java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
16169     return map.containsKey(key) ? map.get(key) : defaultValue;
16170   }
16171   /**
16172    *
16173    *
16174    * <pre>
16175    * User-supplied key/value data to be used for organizing and
16176    * identifying the `AlertPolicy` objects.
16177    * The field can contain up to 64 entries. Each key and value is limited to
16178    * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
16179    * values can contain only lowercase letters, numerals, underscores, and
16180    * dashes. Keys must begin with a letter.
16181    * </pre>
16182    *
16183    * <code>map&lt;string, string&gt; user_labels = 16;</code>
16184    */
16185   @java.lang.Override
getUserLabelsOrThrow(java.lang.String key)16186   public java.lang.String getUserLabelsOrThrow(java.lang.String key) {
16187     if (key == null) {
16188       throw new NullPointerException("map key");
16189     }
16190     java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
16191     if (!map.containsKey(key)) {
16192       throw new java.lang.IllegalArgumentException();
16193     }
16194     return map.get(key);
16195   }
16196 
16197   public static final int CONDITIONS_FIELD_NUMBER = 12;
16198 
16199   @SuppressWarnings("serial")
16200   private java.util.List<com.google.monitoring.v3.AlertPolicy.Condition> conditions_;
16201   /**
16202    *
16203    *
16204    * <pre>
16205    * A list of conditions for the policy. The conditions are combined by AND or
16206    * OR according to the `combiner` field. If the combined conditions evaluate
16207    * to true, then an incident is created. A policy can have from one to six
16208    * conditions.
16209    * If `condition_time_series_query_language` is present, it must be the only
16210    * `condition`.
16211    * </pre>
16212    *
16213    * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
16214    */
16215   @java.lang.Override
getConditionsList()16216   public java.util.List<com.google.monitoring.v3.AlertPolicy.Condition> getConditionsList() {
16217     return conditions_;
16218   }
16219   /**
16220    *
16221    *
16222    * <pre>
16223    * A list of conditions for the policy. The conditions are combined by AND or
16224    * OR according to the `combiner` field. If the combined conditions evaluate
16225    * to true, then an incident is created. A policy can have from one to six
16226    * conditions.
16227    * If `condition_time_series_query_language` is present, it must be the only
16228    * `condition`.
16229    * </pre>
16230    *
16231    * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
16232    */
16233   @java.lang.Override
16234   public java.util.List<? extends com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder>
getConditionsOrBuilderList()16235       getConditionsOrBuilderList() {
16236     return conditions_;
16237   }
16238   /**
16239    *
16240    *
16241    * <pre>
16242    * A list of conditions for the policy. The conditions are combined by AND or
16243    * OR according to the `combiner` field. If the combined conditions evaluate
16244    * to true, then an incident is created. A policy can have from one to six
16245    * conditions.
16246    * If `condition_time_series_query_language` is present, it must be the only
16247    * `condition`.
16248    * </pre>
16249    *
16250    * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
16251    */
16252   @java.lang.Override
getConditionsCount()16253   public int getConditionsCount() {
16254     return conditions_.size();
16255   }
16256   /**
16257    *
16258    *
16259    * <pre>
16260    * A list of conditions for the policy. The conditions are combined by AND or
16261    * OR according to the `combiner` field. If the combined conditions evaluate
16262    * to true, then an incident is created. A policy can have from one to six
16263    * conditions.
16264    * If `condition_time_series_query_language` is present, it must be the only
16265    * `condition`.
16266    * </pre>
16267    *
16268    * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
16269    */
16270   @java.lang.Override
getConditions(int index)16271   public com.google.monitoring.v3.AlertPolicy.Condition getConditions(int index) {
16272     return conditions_.get(index);
16273   }
16274   /**
16275    *
16276    *
16277    * <pre>
16278    * A list of conditions for the policy. The conditions are combined by AND or
16279    * OR according to the `combiner` field. If the combined conditions evaluate
16280    * to true, then an incident is created. A policy can have from one to six
16281    * conditions.
16282    * If `condition_time_series_query_language` is present, it must be the only
16283    * `condition`.
16284    * </pre>
16285    *
16286    * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
16287    */
16288   @java.lang.Override
getConditionsOrBuilder(int index)16289   public com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder getConditionsOrBuilder(int index) {
16290     return conditions_.get(index);
16291   }
16292 
16293   public static final int COMBINER_FIELD_NUMBER = 6;
16294   private int combiner_ = 0;
16295   /**
16296    *
16297    *
16298    * <pre>
16299    * How to combine the results of multiple conditions to determine if an
16300    * incident should be opened.
16301    * If `condition_time_series_query_language` is present, this must be
16302    * `COMBINE_UNSPECIFIED`.
16303    * </pre>
16304    *
16305    * <code>.google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6;</code>
16306    *
16307    * @return The enum numeric value on the wire for combiner.
16308    */
16309   @java.lang.Override
getCombinerValue()16310   public int getCombinerValue() {
16311     return combiner_;
16312   }
16313   /**
16314    *
16315    *
16316    * <pre>
16317    * How to combine the results of multiple conditions to determine if an
16318    * incident should be opened.
16319    * If `condition_time_series_query_language` is present, this must be
16320    * `COMBINE_UNSPECIFIED`.
16321    * </pre>
16322    *
16323    * <code>.google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6;</code>
16324    *
16325    * @return The combiner.
16326    */
16327   @java.lang.Override
getCombiner()16328   public com.google.monitoring.v3.AlertPolicy.ConditionCombinerType getCombiner() {
16329     com.google.monitoring.v3.AlertPolicy.ConditionCombinerType result =
16330         com.google.monitoring.v3.AlertPolicy.ConditionCombinerType.forNumber(combiner_);
16331     return result == null
16332         ? com.google.monitoring.v3.AlertPolicy.ConditionCombinerType.UNRECOGNIZED
16333         : result;
16334   }
16335 
16336   public static final int ENABLED_FIELD_NUMBER = 17;
16337   private com.google.protobuf.BoolValue enabled_;
16338   /**
16339    *
16340    *
16341    * <pre>
16342    * Whether or not the policy is enabled. On write, the default interpretation
16343    * if unset is that the policy is enabled. On read, clients should not make
16344    * any assumption about the state if it has not been populated. The
16345    * field should always be populated on List and Get operations, unless
16346    * a field projection has been specified that strips it out.
16347    * </pre>
16348    *
16349    * <code>.google.protobuf.BoolValue enabled = 17;</code>
16350    *
16351    * @return Whether the enabled field is set.
16352    */
16353   @java.lang.Override
hasEnabled()16354   public boolean hasEnabled() {
16355     return enabled_ != null;
16356   }
16357   /**
16358    *
16359    *
16360    * <pre>
16361    * Whether or not the policy is enabled. On write, the default interpretation
16362    * if unset is that the policy is enabled. On read, clients should not make
16363    * any assumption about the state if it has not been populated. The
16364    * field should always be populated on List and Get operations, unless
16365    * a field projection has been specified that strips it out.
16366    * </pre>
16367    *
16368    * <code>.google.protobuf.BoolValue enabled = 17;</code>
16369    *
16370    * @return The enabled.
16371    */
16372   @java.lang.Override
getEnabled()16373   public com.google.protobuf.BoolValue getEnabled() {
16374     return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
16375   }
16376   /**
16377    *
16378    *
16379    * <pre>
16380    * Whether or not the policy is enabled. On write, the default interpretation
16381    * if unset is that the policy is enabled. On read, clients should not make
16382    * any assumption about the state if it has not been populated. The
16383    * field should always be populated on List and Get operations, unless
16384    * a field projection has been specified that strips it out.
16385    * </pre>
16386    *
16387    * <code>.google.protobuf.BoolValue enabled = 17;</code>
16388    */
16389   @java.lang.Override
getEnabledOrBuilder()16390   public com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder() {
16391     return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
16392   }
16393 
16394   public static final int VALIDITY_FIELD_NUMBER = 18;
16395   private com.google.rpc.Status validity_;
16396   /**
16397    *
16398    *
16399    * <pre>
16400    * Read-only description of how the alert policy is invalid. OK if the alert
16401    * policy is valid. If not OK, the alert policy will not generate incidents.
16402    * </pre>
16403    *
16404    * <code>.google.rpc.Status validity = 18;</code>
16405    *
16406    * @return Whether the validity field is set.
16407    */
16408   @java.lang.Override
hasValidity()16409   public boolean hasValidity() {
16410     return validity_ != null;
16411   }
16412   /**
16413    *
16414    *
16415    * <pre>
16416    * Read-only description of how the alert policy is invalid. OK if the alert
16417    * policy is valid. If not OK, the alert policy will not generate incidents.
16418    * </pre>
16419    *
16420    * <code>.google.rpc.Status validity = 18;</code>
16421    *
16422    * @return The validity.
16423    */
16424   @java.lang.Override
getValidity()16425   public com.google.rpc.Status getValidity() {
16426     return validity_ == null ? com.google.rpc.Status.getDefaultInstance() : validity_;
16427   }
16428   /**
16429    *
16430    *
16431    * <pre>
16432    * Read-only description of how the alert policy is invalid. OK if the alert
16433    * policy is valid. If not OK, the alert policy will not generate incidents.
16434    * </pre>
16435    *
16436    * <code>.google.rpc.Status validity = 18;</code>
16437    */
16438   @java.lang.Override
getValidityOrBuilder()16439   public com.google.rpc.StatusOrBuilder getValidityOrBuilder() {
16440     return validity_ == null ? com.google.rpc.Status.getDefaultInstance() : validity_;
16441   }
16442 
16443   public static final int NOTIFICATION_CHANNELS_FIELD_NUMBER = 14;
16444 
16445   @SuppressWarnings("serial")
16446   private com.google.protobuf.LazyStringList notificationChannels_;
16447   /**
16448    *
16449    *
16450    * <pre>
16451    * Identifies the notification channels to which notifications should be sent
16452    * when incidents are opened or closed or when new violations occur on
16453    * an already opened incident. Each element of this array corresponds to
16454    * the `name` field in each of the
16455    * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
16456    * objects that are returned from the [`ListNotificationChannels`]
16457    * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
16458    * method. The format of the entries in this field is:
16459    *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
16460    * </pre>
16461    *
16462    * <code>repeated string notification_channels = 14;</code>
16463    *
16464    * @return A list containing the notificationChannels.
16465    */
getNotificationChannelsList()16466   public com.google.protobuf.ProtocolStringList getNotificationChannelsList() {
16467     return notificationChannels_;
16468   }
16469   /**
16470    *
16471    *
16472    * <pre>
16473    * Identifies the notification channels to which notifications should be sent
16474    * when incidents are opened or closed or when new violations occur on
16475    * an already opened incident. Each element of this array corresponds to
16476    * the `name` field in each of the
16477    * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
16478    * objects that are returned from the [`ListNotificationChannels`]
16479    * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
16480    * method. The format of the entries in this field is:
16481    *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
16482    * </pre>
16483    *
16484    * <code>repeated string notification_channels = 14;</code>
16485    *
16486    * @return The count of notificationChannels.
16487    */
getNotificationChannelsCount()16488   public int getNotificationChannelsCount() {
16489     return notificationChannels_.size();
16490   }
16491   /**
16492    *
16493    *
16494    * <pre>
16495    * Identifies the notification channels to which notifications should be sent
16496    * when incidents are opened or closed or when new violations occur on
16497    * an already opened incident. Each element of this array corresponds to
16498    * the `name` field in each of the
16499    * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
16500    * objects that are returned from the [`ListNotificationChannels`]
16501    * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
16502    * method. The format of the entries in this field is:
16503    *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
16504    * </pre>
16505    *
16506    * <code>repeated string notification_channels = 14;</code>
16507    *
16508    * @param index The index of the element to return.
16509    * @return The notificationChannels at the given index.
16510    */
getNotificationChannels(int index)16511   public java.lang.String getNotificationChannels(int index) {
16512     return notificationChannels_.get(index);
16513   }
16514   /**
16515    *
16516    *
16517    * <pre>
16518    * Identifies the notification channels to which notifications should be sent
16519    * when incidents are opened or closed or when new violations occur on
16520    * an already opened incident. Each element of this array corresponds to
16521    * the `name` field in each of the
16522    * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
16523    * objects that are returned from the [`ListNotificationChannels`]
16524    * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
16525    * method. The format of the entries in this field is:
16526    *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
16527    * </pre>
16528    *
16529    * <code>repeated string notification_channels = 14;</code>
16530    *
16531    * @param index The index of the value to return.
16532    * @return The bytes of the notificationChannels at the given index.
16533    */
getNotificationChannelsBytes(int index)16534   public com.google.protobuf.ByteString getNotificationChannelsBytes(int index) {
16535     return notificationChannels_.getByteString(index);
16536   }
16537 
16538   public static final int CREATION_RECORD_FIELD_NUMBER = 10;
16539   private com.google.monitoring.v3.MutationRecord creationRecord_;
16540   /**
16541    *
16542    *
16543    * <pre>
16544    * A read-only record of the creation of the alerting policy. If provided
16545    * in a call to create or update, this field will be ignored.
16546    * </pre>
16547    *
16548    * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
16549    *
16550    * @return Whether the creationRecord field is set.
16551    */
16552   @java.lang.Override
hasCreationRecord()16553   public boolean hasCreationRecord() {
16554     return creationRecord_ != null;
16555   }
16556   /**
16557    *
16558    *
16559    * <pre>
16560    * A read-only record of the creation of the alerting policy. If provided
16561    * in a call to create or update, this field will be ignored.
16562    * </pre>
16563    *
16564    * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
16565    *
16566    * @return The creationRecord.
16567    */
16568   @java.lang.Override
getCreationRecord()16569   public com.google.monitoring.v3.MutationRecord getCreationRecord() {
16570     return creationRecord_ == null
16571         ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
16572         : creationRecord_;
16573   }
16574   /**
16575    *
16576    *
16577    * <pre>
16578    * A read-only record of the creation of the alerting policy. If provided
16579    * in a call to create or update, this field will be ignored.
16580    * </pre>
16581    *
16582    * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
16583    */
16584   @java.lang.Override
getCreationRecordOrBuilder()16585   public com.google.monitoring.v3.MutationRecordOrBuilder getCreationRecordOrBuilder() {
16586     return creationRecord_ == null
16587         ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
16588         : creationRecord_;
16589   }
16590 
16591   public static final int MUTATION_RECORD_FIELD_NUMBER = 11;
16592   private com.google.monitoring.v3.MutationRecord mutationRecord_;
16593   /**
16594    *
16595    *
16596    * <pre>
16597    * A read-only record of the most recent change to the alerting policy. If
16598    * provided in a call to create or update, this field will be ignored.
16599    * </pre>
16600    *
16601    * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
16602    *
16603    * @return Whether the mutationRecord field is set.
16604    */
16605   @java.lang.Override
hasMutationRecord()16606   public boolean hasMutationRecord() {
16607     return mutationRecord_ != null;
16608   }
16609   /**
16610    *
16611    *
16612    * <pre>
16613    * A read-only record of the most recent change to the alerting policy. If
16614    * provided in a call to create or update, this field will be ignored.
16615    * </pre>
16616    *
16617    * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
16618    *
16619    * @return The mutationRecord.
16620    */
16621   @java.lang.Override
getMutationRecord()16622   public com.google.monitoring.v3.MutationRecord getMutationRecord() {
16623     return mutationRecord_ == null
16624         ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
16625         : mutationRecord_;
16626   }
16627   /**
16628    *
16629    *
16630    * <pre>
16631    * A read-only record of the most recent change to the alerting policy. If
16632    * provided in a call to create or update, this field will be ignored.
16633    * </pre>
16634    *
16635    * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
16636    */
16637   @java.lang.Override
getMutationRecordOrBuilder()16638   public com.google.monitoring.v3.MutationRecordOrBuilder getMutationRecordOrBuilder() {
16639     return mutationRecord_ == null
16640         ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
16641         : mutationRecord_;
16642   }
16643 
16644   public static final int ALERT_STRATEGY_FIELD_NUMBER = 21;
16645   private com.google.monitoring.v3.AlertPolicy.AlertStrategy alertStrategy_;
16646   /**
16647    *
16648    *
16649    * <pre>
16650    * Control over how this alert policy's notification channels are notified.
16651    * </pre>
16652    *
16653    * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
16654    *
16655    * @return Whether the alertStrategy field is set.
16656    */
16657   @java.lang.Override
hasAlertStrategy()16658   public boolean hasAlertStrategy() {
16659     return alertStrategy_ != null;
16660   }
16661   /**
16662    *
16663    *
16664    * <pre>
16665    * Control over how this alert policy's notification channels are notified.
16666    * </pre>
16667    *
16668    * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
16669    *
16670    * @return The alertStrategy.
16671    */
16672   @java.lang.Override
getAlertStrategy()16673   public com.google.monitoring.v3.AlertPolicy.AlertStrategy getAlertStrategy() {
16674     return alertStrategy_ == null
16675         ? com.google.monitoring.v3.AlertPolicy.AlertStrategy.getDefaultInstance()
16676         : alertStrategy_;
16677   }
16678   /**
16679    *
16680    *
16681    * <pre>
16682    * Control over how this alert policy's notification channels are notified.
16683    * </pre>
16684    *
16685    * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
16686    */
16687   @java.lang.Override
getAlertStrategyOrBuilder()16688   public com.google.monitoring.v3.AlertPolicy.AlertStrategyOrBuilder getAlertStrategyOrBuilder() {
16689     return alertStrategy_ == null
16690         ? com.google.monitoring.v3.AlertPolicy.AlertStrategy.getDefaultInstance()
16691         : alertStrategy_;
16692   }
16693 
16694   private byte memoizedIsInitialized = -1;
16695 
16696   @java.lang.Override
isInitialized()16697   public final boolean isInitialized() {
16698     byte isInitialized = memoizedIsInitialized;
16699     if (isInitialized == 1) return true;
16700     if (isInitialized == 0) return false;
16701 
16702     memoizedIsInitialized = 1;
16703     return true;
16704   }
16705 
16706   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)16707   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
16708     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
16709       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
16710     }
16711     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
16712       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
16713     }
16714     if (combiner_
16715         != com.google.monitoring.v3.AlertPolicy.ConditionCombinerType.COMBINE_UNSPECIFIED
16716             .getNumber()) {
16717       output.writeEnum(6, combiner_);
16718     }
16719     if (creationRecord_ != null) {
16720       output.writeMessage(10, getCreationRecord());
16721     }
16722     if (mutationRecord_ != null) {
16723       output.writeMessage(11, getMutationRecord());
16724     }
16725     for (int i = 0; i < conditions_.size(); i++) {
16726       output.writeMessage(12, conditions_.get(i));
16727     }
16728     if (documentation_ != null) {
16729       output.writeMessage(13, getDocumentation());
16730     }
16731     for (int i = 0; i < notificationChannels_.size(); i++) {
16732       com.google.protobuf.GeneratedMessageV3.writeString(
16733           output, 14, notificationChannels_.getRaw(i));
16734     }
16735     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
16736         output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 16);
16737     if (enabled_ != null) {
16738       output.writeMessage(17, getEnabled());
16739     }
16740     if (validity_ != null) {
16741       output.writeMessage(18, getValidity());
16742     }
16743     if (alertStrategy_ != null) {
16744       output.writeMessage(21, getAlertStrategy());
16745     }
16746     getUnknownFields().writeTo(output);
16747   }
16748 
16749   @java.lang.Override
getSerializedSize()16750   public int getSerializedSize() {
16751     int size = memoizedSize;
16752     if (size != -1) return size;
16753 
16754     size = 0;
16755     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
16756       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
16757     }
16758     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
16759       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
16760     }
16761     if (combiner_
16762         != com.google.monitoring.v3.AlertPolicy.ConditionCombinerType.COMBINE_UNSPECIFIED
16763             .getNumber()) {
16764       size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, combiner_);
16765     }
16766     if (creationRecord_ != null) {
16767       size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreationRecord());
16768     }
16769     if (mutationRecord_ != null) {
16770       size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getMutationRecord());
16771     }
16772     for (int i = 0; i < conditions_.size(); i++) {
16773       size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, conditions_.get(i));
16774     }
16775     if (documentation_ != null) {
16776       size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getDocumentation());
16777     }
16778     {
16779       int dataSize = 0;
16780       for (int i = 0; i < notificationChannels_.size(); i++) {
16781         dataSize += computeStringSizeNoTag(notificationChannels_.getRaw(i));
16782       }
16783       size += dataSize;
16784       size += 1 * getNotificationChannelsList().size();
16785     }
16786     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
16787         internalGetUserLabels().getMap().entrySet()) {
16788       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> userLabels__ =
16789           UserLabelsDefaultEntryHolder.defaultEntry
16790               .newBuilderForType()
16791               .setKey(entry.getKey())
16792               .setValue(entry.getValue())
16793               .build();
16794       size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, userLabels__);
16795     }
16796     if (enabled_ != null) {
16797       size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getEnabled());
16798     }
16799     if (validity_ != null) {
16800       size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getValidity());
16801     }
16802     if (alertStrategy_ != null) {
16803       size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getAlertStrategy());
16804     }
16805     size += getUnknownFields().getSerializedSize();
16806     memoizedSize = size;
16807     return size;
16808   }
16809 
16810   @java.lang.Override
equals(final java.lang.Object obj)16811   public boolean equals(final java.lang.Object obj) {
16812     if (obj == this) {
16813       return true;
16814     }
16815     if (!(obj instanceof com.google.monitoring.v3.AlertPolicy)) {
16816       return super.equals(obj);
16817     }
16818     com.google.monitoring.v3.AlertPolicy other = (com.google.monitoring.v3.AlertPolicy) obj;
16819 
16820     if (!getName().equals(other.getName())) return false;
16821     if (!getDisplayName().equals(other.getDisplayName())) return false;
16822     if (hasDocumentation() != other.hasDocumentation()) return false;
16823     if (hasDocumentation()) {
16824       if (!getDocumentation().equals(other.getDocumentation())) return false;
16825     }
16826     if (!internalGetUserLabels().equals(other.internalGetUserLabels())) return false;
16827     if (!getConditionsList().equals(other.getConditionsList())) return false;
16828     if (combiner_ != other.combiner_) return false;
16829     if (hasEnabled() != other.hasEnabled()) return false;
16830     if (hasEnabled()) {
16831       if (!getEnabled().equals(other.getEnabled())) return false;
16832     }
16833     if (hasValidity() != other.hasValidity()) return false;
16834     if (hasValidity()) {
16835       if (!getValidity().equals(other.getValidity())) return false;
16836     }
16837     if (!getNotificationChannelsList().equals(other.getNotificationChannelsList())) return false;
16838     if (hasCreationRecord() != other.hasCreationRecord()) return false;
16839     if (hasCreationRecord()) {
16840       if (!getCreationRecord().equals(other.getCreationRecord())) return false;
16841     }
16842     if (hasMutationRecord() != other.hasMutationRecord()) return false;
16843     if (hasMutationRecord()) {
16844       if (!getMutationRecord().equals(other.getMutationRecord())) return false;
16845     }
16846     if (hasAlertStrategy() != other.hasAlertStrategy()) return false;
16847     if (hasAlertStrategy()) {
16848       if (!getAlertStrategy().equals(other.getAlertStrategy())) return false;
16849     }
16850     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
16851     return true;
16852   }
16853 
16854   @java.lang.Override
hashCode()16855   public int hashCode() {
16856     if (memoizedHashCode != 0) {
16857       return memoizedHashCode;
16858     }
16859     int hash = 41;
16860     hash = (19 * hash) + getDescriptor().hashCode();
16861     hash = (37 * hash) + NAME_FIELD_NUMBER;
16862     hash = (53 * hash) + getName().hashCode();
16863     hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
16864     hash = (53 * hash) + getDisplayName().hashCode();
16865     if (hasDocumentation()) {
16866       hash = (37 * hash) + DOCUMENTATION_FIELD_NUMBER;
16867       hash = (53 * hash) + getDocumentation().hashCode();
16868     }
16869     if (!internalGetUserLabels().getMap().isEmpty()) {
16870       hash = (37 * hash) + USER_LABELS_FIELD_NUMBER;
16871       hash = (53 * hash) + internalGetUserLabels().hashCode();
16872     }
16873     if (getConditionsCount() > 0) {
16874       hash = (37 * hash) + CONDITIONS_FIELD_NUMBER;
16875       hash = (53 * hash) + getConditionsList().hashCode();
16876     }
16877     hash = (37 * hash) + COMBINER_FIELD_NUMBER;
16878     hash = (53 * hash) + combiner_;
16879     if (hasEnabled()) {
16880       hash = (37 * hash) + ENABLED_FIELD_NUMBER;
16881       hash = (53 * hash) + getEnabled().hashCode();
16882     }
16883     if (hasValidity()) {
16884       hash = (37 * hash) + VALIDITY_FIELD_NUMBER;
16885       hash = (53 * hash) + getValidity().hashCode();
16886     }
16887     if (getNotificationChannelsCount() > 0) {
16888       hash = (37 * hash) + NOTIFICATION_CHANNELS_FIELD_NUMBER;
16889       hash = (53 * hash) + getNotificationChannelsList().hashCode();
16890     }
16891     if (hasCreationRecord()) {
16892       hash = (37 * hash) + CREATION_RECORD_FIELD_NUMBER;
16893       hash = (53 * hash) + getCreationRecord().hashCode();
16894     }
16895     if (hasMutationRecord()) {
16896       hash = (37 * hash) + MUTATION_RECORD_FIELD_NUMBER;
16897       hash = (53 * hash) + getMutationRecord().hashCode();
16898     }
16899     if (hasAlertStrategy()) {
16900       hash = (37 * hash) + ALERT_STRATEGY_FIELD_NUMBER;
16901       hash = (53 * hash) + getAlertStrategy().hashCode();
16902     }
16903     hash = (29 * hash) + getUnknownFields().hashCode();
16904     memoizedHashCode = hash;
16905     return hash;
16906   }
16907 
parseFrom(java.nio.ByteBuffer data)16908   public static com.google.monitoring.v3.AlertPolicy parseFrom(java.nio.ByteBuffer data)
16909       throws com.google.protobuf.InvalidProtocolBufferException {
16910     return PARSER.parseFrom(data);
16911   }
16912 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)16913   public static com.google.monitoring.v3.AlertPolicy parseFrom(
16914       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16915       throws com.google.protobuf.InvalidProtocolBufferException {
16916     return PARSER.parseFrom(data, extensionRegistry);
16917   }
16918 
parseFrom(com.google.protobuf.ByteString data)16919   public static com.google.monitoring.v3.AlertPolicy parseFrom(com.google.protobuf.ByteString data)
16920       throws com.google.protobuf.InvalidProtocolBufferException {
16921     return PARSER.parseFrom(data);
16922   }
16923 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)16924   public static com.google.monitoring.v3.AlertPolicy parseFrom(
16925       com.google.protobuf.ByteString data,
16926       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16927       throws com.google.protobuf.InvalidProtocolBufferException {
16928     return PARSER.parseFrom(data, extensionRegistry);
16929   }
16930 
parseFrom(byte[] data)16931   public static com.google.monitoring.v3.AlertPolicy parseFrom(byte[] data)
16932       throws com.google.protobuf.InvalidProtocolBufferException {
16933     return PARSER.parseFrom(data);
16934   }
16935 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)16936   public static com.google.monitoring.v3.AlertPolicy parseFrom(
16937       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16938       throws com.google.protobuf.InvalidProtocolBufferException {
16939     return PARSER.parseFrom(data, extensionRegistry);
16940   }
16941 
parseFrom(java.io.InputStream input)16942   public static com.google.monitoring.v3.AlertPolicy parseFrom(java.io.InputStream input)
16943       throws java.io.IOException {
16944     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
16945   }
16946 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)16947   public static com.google.monitoring.v3.AlertPolicy parseFrom(
16948       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16949       throws java.io.IOException {
16950     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
16951         PARSER, input, extensionRegistry);
16952   }
16953 
parseDelimitedFrom(java.io.InputStream input)16954   public static com.google.monitoring.v3.AlertPolicy parseDelimitedFrom(java.io.InputStream input)
16955       throws java.io.IOException {
16956     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
16957   }
16958 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)16959   public static com.google.monitoring.v3.AlertPolicy parseDelimitedFrom(
16960       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16961       throws java.io.IOException {
16962     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
16963         PARSER, input, extensionRegistry);
16964   }
16965 
parseFrom( com.google.protobuf.CodedInputStream input)16966   public static com.google.monitoring.v3.AlertPolicy parseFrom(
16967       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
16968     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
16969   }
16970 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)16971   public static com.google.monitoring.v3.AlertPolicy parseFrom(
16972       com.google.protobuf.CodedInputStream input,
16973       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
16974       throws java.io.IOException {
16975     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
16976         PARSER, input, extensionRegistry);
16977   }
16978 
16979   @java.lang.Override
newBuilderForType()16980   public Builder newBuilderForType() {
16981     return newBuilder();
16982   }
16983 
newBuilder()16984   public static Builder newBuilder() {
16985     return DEFAULT_INSTANCE.toBuilder();
16986   }
16987 
newBuilder(com.google.monitoring.v3.AlertPolicy prototype)16988   public static Builder newBuilder(com.google.monitoring.v3.AlertPolicy prototype) {
16989     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
16990   }
16991 
16992   @java.lang.Override
toBuilder()16993   public Builder toBuilder() {
16994     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
16995   }
16996 
16997   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)16998   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
16999     Builder builder = new Builder(parent);
17000     return builder;
17001   }
17002   /**
17003    *
17004    *
17005    * <pre>
17006    * A description of the conditions under which some aspect of your system is
17007    * considered to be "unhealthy" and the ways to notify people or services about
17008    * this state. For an overview of alert policies, see
17009    * [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/).
17010    * </pre>
17011    *
17012    * Protobuf type {@code google.monitoring.v3.AlertPolicy}
17013    */
17014   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
17015       implements
17016       // @@protoc_insertion_point(builder_implements:google.monitoring.v3.AlertPolicy)
17017       com.google.monitoring.v3.AlertPolicyOrBuilder {
getDescriptor()17018     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
17019       return com.google.monitoring.v3.AlertProto
17020           .internal_static_google_monitoring_v3_AlertPolicy_descriptor;
17021     }
17022 
17023     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)17024     protected com.google.protobuf.MapField internalGetMapField(int number) {
17025       switch (number) {
17026         case 16:
17027           return internalGetUserLabels();
17028         default:
17029           throw new RuntimeException("Invalid map field number: " + number);
17030       }
17031     }
17032 
17033     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)17034     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
17035       switch (number) {
17036         case 16:
17037           return internalGetMutableUserLabels();
17038         default:
17039           throw new RuntimeException("Invalid map field number: " + number);
17040       }
17041     }
17042 
17043     @java.lang.Override
17044     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()17045         internalGetFieldAccessorTable() {
17046       return com.google.monitoring.v3.AlertProto
17047           .internal_static_google_monitoring_v3_AlertPolicy_fieldAccessorTable
17048           .ensureFieldAccessorsInitialized(
17049               com.google.monitoring.v3.AlertPolicy.class,
17050               com.google.monitoring.v3.AlertPolicy.Builder.class);
17051     }
17052 
17053     // Construct using com.google.monitoring.v3.AlertPolicy.newBuilder()
Builder()17054     private Builder() {}
17055 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)17056     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
17057       super(parent);
17058     }
17059 
17060     @java.lang.Override
clear()17061     public Builder clear() {
17062       super.clear();
17063       bitField0_ = 0;
17064       name_ = "";
17065       displayName_ = "";
17066       documentation_ = null;
17067       if (documentationBuilder_ != null) {
17068         documentationBuilder_.dispose();
17069         documentationBuilder_ = null;
17070       }
17071       internalGetMutableUserLabels().clear();
17072       if (conditionsBuilder_ == null) {
17073         conditions_ = java.util.Collections.emptyList();
17074       } else {
17075         conditions_ = null;
17076         conditionsBuilder_.clear();
17077       }
17078       bitField0_ = (bitField0_ & ~0x00000010);
17079       combiner_ = 0;
17080       enabled_ = null;
17081       if (enabledBuilder_ != null) {
17082         enabledBuilder_.dispose();
17083         enabledBuilder_ = null;
17084       }
17085       validity_ = null;
17086       if (validityBuilder_ != null) {
17087         validityBuilder_.dispose();
17088         validityBuilder_ = null;
17089       }
17090       notificationChannels_ = com.google.protobuf.LazyStringArrayList.EMPTY;
17091       bitField0_ = (bitField0_ & ~0x00000100);
17092       creationRecord_ = null;
17093       if (creationRecordBuilder_ != null) {
17094         creationRecordBuilder_.dispose();
17095         creationRecordBuilder_ = null;
17096       }
17097       mutationRecord_ = null;
17098       if (mutationRecordBuilder_ != null) {
17099         mutationRecordBuilder_.dispose();
17100         mutationRecordBuilder_ = null;
17101       }
17102       alertStrategy_ = null;
17103       if (alertStrategyBuilder_ != null) {
17104         alertStrategyBuilder_.dispose();
17105         alertStrategyBuilder_ = null;
17106       }
17107       return this;
17108     }
17109 
17110     @java.lang.Override
getDescriptorForType()17111     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
17112       return com.google.monitoring.v3.AlertProto
17113           .internal_static_google_monitoring_v3_AlertPolicy_descriptor;
17114     }
17115 
17116     @java.lang.Override
getDefaultInstanceForType()17117     public com.google.monitoring.v3.AlertPolicy getDefaultInstanceForType() {
17118       return com.google.monitoring.v3.AlertPolicy.getDefaultInstance();
17119     }
17120 
17121     @java.lang.Override
build()17122     public com.google.monitoring.v3.AlertPolicy build() {
17123       com.google.monitoring.v3.AlertPolicy result = buildPartial();
17124       if (!result.isInitialized()) {
17125         throw newUninitializedMessageException(result);
17126       }
17127       return result;
17128     }
17129 
17130     @java.lang.Override
buildPartial()17131     public com.google.monitoring.v3.AlertPolicy buildPartial() {
17132       com.google.monitoring.v3.AlertPolicy result = new com.google.monitoring.v3.AlertPolicy(this);
17133       buildPartialRepeatedFields(result);
17134       if (bitField0_ != 0) {
17135         buildPartial0(result);
17136       }
17137       onBuilt();
17138       return result;
17139     }
17140 
buildPartialRepeatedFields(com.google.monitoring.v3.AlertPolicy result)17141     private void buildPartialRepeatedFields(com.google.monitoring.v3.AlertPolicy result) {
17142       if (conditionsBuilder_ == null) {
17143         if (((bitField0_ & 0x00000010) != 0)) {
17144           conditions_ = java.util.Collections.unmodifiableList(conditions_);
17145           bitField0_ = (bitField0_ & ~0x00000010);
17146         }
17147         result.conditions_ = conditions_;
17148       } else {
17149         result.conditions_ = conditionsBuilder_.build();
17150       }
17151       if (((bitField0_ & 0x00000100) != 0)) {
17152         notificationChannels_ = notificationChannels_.getUnmodifiableView();
17153         bitField0_ = (bitField0_ & ~0x00000100);
17154       }
17155       result.notificationChannels_ = notificationChannels_;
17156     }
17157 
buildPartial0(com.google.monitoring.v3.AlertPolicy result)17158     private void buildPartial0(com.google.monitoring.v3.AlertPolicy result) {
17159       int from_bitField0_ = bitField0_;
17160       if (((from_bitField0_ & 0x00000001) != 0)) {
17161         result.name_ = name_;
17162       }
17163       if (((from_bitField0_ & 0x00000002) != 0)) {
17164         result.displayName_ = displayName_;
17165       }
17166       if (((from_bitField0_ & 0x00000004) != 0)) {
17167         result.documentation_ =
17168             documentationBuilder_ == null ? documentation_ : documentationBuilder_.build();
17169       }
17170       if (((from_bitField0_ & 0x00000008) != 0)) {
17171         result.userLabels_ = internalGetUserLabels();
17172         result.userLabels_.makeImmutable();
17173       }
17174       if (((from_bitField0_ & 0x00000020) != 0)) {
17175         result.combiner_ = combiner_;
17176       }
17177       if (((from_bitField0_ & 0x00000040) != 0)) {
17178         result.enabled_ = enabledBuilder_ == null ? enabled_ : enabledBuilder_.build();
17179       }
17180       if (((from_bitField0_ & 0x00000080) != 0)) {
17181         result.validity_ = validityBuilder_ == null ? validity_ : validityBuilder_.build();
17182       }
17183       if (((from_bitField0_ & 0x00000200) != 0)) {
17184         result.creationRecord_ =
17185             creationRecordBuilder_ == null ? creationRecord_ : creationRecordBuilder_.build();
17186       }
17187       if (((from_bitField0_ & 0x00000400) != 0)) {
17188         result.mutationRecord_ =
17189             mutationRecordBuilder_ == null ? mutationRecord_ : mutationRecordBuilder_.build();
17190       }
17191       if (((from_bitField0_ & 0x00000800) != 0)) {
17192         result.alertStrategy_ =
17193             alertStrategyBuilder_ == null ? alertStrategy_ : alertStrategyBuilder_.build();
17194       }
17195     }
17196 
17197     @java.lang.Override
clone()17198     public Builder clone() {
17199       return super.clone();
17200     }
17201 
17202     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)17203     public Builder setField(
17204         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
17205       return super.setField(field, value);
17206     }
17207 
17208     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)17209     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
17210       return super.clearField(field);
17211     }
17212 
17213     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)17214     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
17215       return super.clearOneof(oneof);
17216     }
17217 
17218     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)17219     public Builder setRepeatedField(
17220         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
17221       return super.setRepeatedField(field, index, value);
17222     }
17223 
17224     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)17225     public Builder addRepeatedField(
17226         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
17227       return super.addRepeatedField(field, value);
17228     }
17229 
17230     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)17231     public Builder mergeFrom(com.google.protobuf.Message other) {
17232       if (other instanceof com.google.monitoring.v3.AlertPolicy) {
17233         return mergeFrom((com.google.monitoring.v3.AlertPolicy) other);
17234       } else {
17235         super.mergeFrom(other);
17236         return this;
17237       }
17238     }
17239 
mergeFrom(com.google.monitoring.v3.AlertPolicy other)17240     public Builder mergeFrom(com.google.monitoring.v3.AlertPolicy other) {
17241       if (other == com.google.monitoring.v3.AlertPolicy.getDefaultInstance()) return this;
17242       if (!other.getName().isEmpty()) {
17243         name_ = other.name_;
17244         bitField0_ |= 0x00000001;
17245         onChanged();
17246       }
17247       if (!other.getDisplayName().isEmpty()) {
17248         displayName_ = other.displayName_;
17249         bitField0_ |= 0x00000002;
17250         onChanged();
17251       }
17252       if (other.hasDocumentation()) {
17253         mergeDocumentation(other.getDocumentation());
17254       }
17255       internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels());
17256       bitField0_ |= 0x00000008;
17257       if (conditionsBuilder_ == null) {
17258         if (!other.conditions_.isEmpty()) {
17259           if (conditions_.isEmpty()) {
17260             conditions_ = other.conditions_;
17261             bitField0_ = (bitField0_ & ~0x00000010);
17262           } else {
17263             ensureConditionsIsMutable();
17264             conditions_.addAll(other.conditions_);
17265           }
17266           onChanged();
17267         }
17268       } else {
17269         if (!other.conditions_.isEmpty()) {
17270           if (conditionsBuilder_.isEmpty()) {
17271             conditionsBuilder_.dispose();
17272             conditionsBuilder_ = null;
17273             conditions_ = other.conditions_;
17274             bitField0_ = (bitField0_ & ~0x00000010);
17275             conditionsBuilder_ =
17276                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
17277                     ? getConditionsFieldBuilder()
17278                     : null;
17279           } else {
17280             conditionsBuilder_.addAllMessages(other.conditions_);
17281           }
17282         }
17283       }
17284       if (other.combiner_ != 0) {
17285         setCombinerValue(other.getCombinerValue());
17286       }
17287       if (other.hasEnabled()) {
17288         mergeEnabled(other.getEnabled());
17289       }
17290       if (other.hasValidity()) {
17291         mergeValidity(other.getValidity());
17292       }
17293       if (!other.notificationChannels_.isEmpty()) {
17294         if (notificationChannels_.isEmpty()) {
17295           notificationChannels_ = other.notificationChannels_;
17296           bitField0_ = (bitField0_ & ~0x00000100);
17297         } else {
17298           ensureNotificationChannelsIsMutable();
17299           notificationChannels_.addAll(other.notificationChannels_);
17300         }
17301         onChanged();
17302       }
17303       if (other.hasCreationRecord()) {
17304         mergeCreationRecord(other.getCreationRecord());
17305       }
17306       if (other.hasMutationRecord()) {
17307         mergeMutationRecord(other.getMutationRecord());
17308       }
17309       if (other.hasAlertStrategy()) {
17310         mergeAlertStrategy(other.getAlertStrategy());
17311       }
17312       this.mergeUnknownFields(other.getUnknownFields());
17313       onChanged();
17314       return this;
17315     }
17316 
17317     @java.lang.Override
isInitialized()17318     public final boolean isInitialized() {
17319       return true;
17320     }
17321 
17322     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)17323     public Builder mergeFrom(
17324         com.google.protobuf.CodedInputStream input,
17325         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
17326         throws java.io.IOException {
17327       if (extensionRegistry == null) {
17328         throw new java.lang.NullPointerException();
17329       }
17330       try {
17331         boolean done = false;
17332         while (!done) {
17333           int tag = input.readTag();
17334           switch (tag) {
17335             case 0:
17336               done = true;
17337               break;
17338             case 10:
17339               {
17340                 name_ = input.readStringRequireUtf8();
17341                 bitField0_ |= 0x00000001;
17342                 break;
17343               } // case 10
17344             case 18:
17345               {
17346                 displayName_ = input.readStringRequireUtf8();
17347                 bitField0_ |= 0x00000002;
17348                 break;
17349               } // case 18
17350             case 48:
17351               {
17352                 combiner_ = input.readEnum();
17353                 bitField0_ |= 0x00000020;
17354                 break;
17355               } // case 48
17356             case 82:
17357               {
17358                 input.readMessage(getCreationRecordFieldBuilder().getBuilder(), extensionRegistry);
17359                 bitField0_ |= 0x00000200;
17360                 break;
17361               } // case 82
17362             case 90:
17363               {
17364                 input.readMessage(getMutationRecordFieldBuilder().getBuilder(), extensionRegistry);
17365                 bitField0_ |= 0x00000400;
17366                 break;
17367               } // case 90
17368             case 98:
17369               {
17370                 com.google.monitoring.v3.AlertPolicy.Condition m =
17371                     input.readMessage(
17372                         com.google.monitoring.v3.AlertPolicy.Condition.parser(), extensionRegistry);
17373                 if (conditionsBuilder_ == null) {
17374                   ensureConditionsIsMutable();
17375                   conditions_.add(m);
17376                 } else {
17377                   conditionsBuilder_.addMessage(m);
17378                 }
17379                 break;
17380               } // case 98
17381             case 106:
17382               {
17383                 input.readMessage(getDocumentationFieldBuilder().getBuilder(), extensionRegistry);
17384                 bitField0_ |= 0x00000004;
17385                 break;
17386               } // case 106
17387             case 114:
17388               {
17389                 java.lang.String s = input.readStringRequireUtf8();
17390                 ensureNotificationChannelsIsMutable();
17391                 notificationChannels_.add(s);
17392                 break;
17393               } // case 114
17394             case 130:
17395               {
17396                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> userLabels__ =
17397                     input.readMessage(
17398                         UserLabelsDefaultEntryHolder.defaultEntry.getParserForType(),
17399                         extensionRegistry);
17400                 internalGetMutableUserLabels()
17401                     .getMutableMap()
17402                     .put(userLabels__.getKey(), userLabels__.getValue());
17403                 bitField0_ |= 0x00000008;
17404                 break;
17405               } // case 130
17406             case 138:
17407               {
17408                 input.readMessage(getEnabledFieldBuilder().getBuilder(), extensionRegistry);
17409                 bitField0_ |= 0x00000040;
17410                 break;
17411               } // case 138
17412             case 146:
17413               {
17414                 input.readMessage(getValidityFieldBuilder().getBuilder(), extensionRegistry);
17415                 bitField0_ |= 0x00000080;
17416                 break;
17417               } // case 146
17418             case 170:
17419               {
17420                 input.readMessage(getAlertStrategyFieldBuilder().getBuilder(), extensionRegistry);
17421                 bitField0_ |= 0x00000800;
17422                 break;
17423               } // case 170
17424             default:
17425               {
17426                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
17427                   done = true; // was an endgroup tag
17428                 }
17429                 break;
17430               } // default:
17431           } // switch (tag)
17432         } // while (!done)
17433       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
17434         throw e.unwrapIOException();
17435       } finally {
17436         onChanged();
17437       } // finally
17438       return this;
17439     }
17440 
17441     private int bitField0_;
17442 
17443     private java.lang.Object name_ = "";
17444     /**
17445      *
17446      *
17447      * <pre>
17448      * Required if the policy exists. The resource name for this policy. The
17449      * format is:
17450      *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
17451      * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy
17452      * is created. When calling the
17453      * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
17454      * method, do not include the `name` field in the alerting policy passed as
17455      * part of the request.
17456      * </pre>
17457      *
17458      * <code>string name = 1;</code>
17459      *
17460      * @return The name.
17461      */
getName()17462     public java.lang.String getName() {
17463       java.lang.Object ref = name_;
17464       if (!(ref instanceof java.lang.String)) {
17465         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
17466         java.lang.String s = bs.toStringUtf8();
17467         name_ = s;
17468         return s;
17469       } else {
17470         return (java.lang.String) ref;
17471       }
17472     }
17473     /**
17474      *
17475      *
17476      * <pre>
17477      * Required if the policy exists. The resource name for this policy. The
17478      * format is:
17479      *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
17480      * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy
17481      * is created. When calling the
17482      * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
17483      * method, do not include the `name` field in the alerting policy passed as
17484      * part of the request.
17485      * </pre>
17486      *
17487      * <code>string name = 1;</code>
17488      *
17489      * @return The bytes for name.
17490      */
getNameBytes()17491     public com.google.protobuf.ByteString getNameBytes() {
17492       java.lang.Object ref = name_;
17493       if (ref instanceof String) {
17494         com.google.protobuf.ByteString b =
17495             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
17496         name_ = b;
17497         return b;
17498       } else {
17499         return (com.google.protobuf.ByteString) ref;
17500       }
17501     }
17502     /**
17503      *
17504      *
17505      * <pre>
17506      * Required if the policy exists. The resource name for this policy. The
17507      * format is:
17508      *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
17509      * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy
17510      * is created. When calling the
17511      * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
17512      * method, do not include the `name` field in the alerting policy passed as
17513      * part of the request.
17514      * </pre>
17515      *
17516      * <code>string name = 1;</code>
17517      *
17518      * @param value The name to set.
17519      * @return This builder for chaining.
17520      */
setName(java.lang.String value)17521     public Builder setName(java.lang.String value) {
17522       if (value == null) {
17523         throw new NullPointerException();
17524       }
17525       name_ = value;
17526       bitField0_ |= 0x00000001;
17527       onChanged();
17528       return this;
17529     }
17530     /**
17531      *
17532      *
17533      * <pre>
17534      * Required if the policy exists. The resource name for this policy. The
17535      * format is:
17536      *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
17537      * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy
17538      * is created. When calling the
17539      * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
17540      * method, do not include the `name` field in the alerting policy passed as
17541      * part of the request.
17542      * </pre>
17543      *
17544      * <code>string name = 1;</code>
17545      *
17546      * @return This builder for chaining.
17547      */
clearName()17548     public Builder clearName() {
17549       name_ = getDefaultInstance().getName();
17550       bitField0_ = (bitField0_ & ~0x00000001);
17551       onChanged();
17552       return this;
17553     }
17554     /**
17555      *
17556      *
17557      * <pre>
17558      * Required if the policy exists. The resource name for this policy. The
17559      * format is:
17560      *     projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
17561      * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy
17562      * is created. When calling the
17563      * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
17564      * method, do not include the `name` field in the alerting policy passed as
17565      * part of the request.
17566      * </pre>
17567      *
17568      * <code>string name = 1;</code>
17569      *
17570      * @param value The bytes for name to set.
17571      * @return This builder for chaining.
17572      */
setNameBytes(com.google.protobuf.ByteString value)17573     public Builder setNameBytes(com.google.protobuf.ByteString value) {
17574       if (value == null) {
17575         throw new NullPointerException();
17576       }
17577       checkByteStringIsUtf8(value);
17578       name_ = value;
17579       bitField0_ |= 0x00000001;
17580       onChanged();
17581       return this;
17582     }
17583 
17584     private java.lang.Object displayName_ = "";
17585     /**
17586      *
17587      *
17588      * <pre>
17589      * A short name or phrase used to identify the policy in dashboards,
17590      * notifications, and incidents. To avoid confusion, don't use the same
17591      * display name for multiple policies in the same project. The name is
17592      * limited to 512 Unicode characters.
17593      * </pre>
17594      *
17595      * <code>string display_name = 2;</code>
17596      *
17597      * @return The displayName.
17598      */
getDisplayName()17599     public java.lang.String getDisplayName() {
17600       java.lang.Object ref = displayName_;
17601       if (!(ref instanceof java.lang.String)) {
17602         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
17603         java.lang.String s = bs.toStringUtf8();
17604         displayName_ = s;
17605         return s;
17606       } else {
17607         return (java.lang.String) ref;
17608       }
17609     }
17610     /**
17611      *
17612      *
17613      * <pre>
17614      * A short name or phrase used to identify the policy in dashboards,
17615      * notifications, and incidents. To avoid confusion, don't use the same
17616      * display name for multiple policies in the same project. The name is
17617      * limited to 512 Unicode characters.
17618      * </pre>
17619      *
17620      * <code>string display_name = 2;</code>
17621      *
17622      * @return The bytes for displayName.
17623      */
getDisplayNameBytes()17624     public com.google.protobuf.ByteString getDisplayNameBytes() {
17625       java.lang.Object ref = displayName_;
17626       if (ref instanceof String) {
17627         com.google.protobuf.ByteString b =
17628             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
17629         displayName_ = b;
17630         return b;
17631       } else {
17632         return (com.google.protobuf.ByteString) ref;
17633       }
17634     }
17635     /**
17636      *
17637      *
17638      * <pre>
17639      * A short name or phrase used to identify the policy in dashboards,
17640      * notifications, and incidents. To avoid confusion, don't use the same
17641      * display name for multiple policies in the same project. The name is
17642      * limited to 512 Unicode characters.
17643      * </pre>
17644      *
17645      * <code>string display_name = 2;</code>
17646      *
17647      * @param value The displayName to set.
17648      * @return This builder for chaining.
17649      */
setDisplayName(java.lang.String value)17650     public Builder setDisplayName(java.lang.String value) {
17651       if (value == null) {
17652         throw new NullPointerException();
17653       }
17654       displayName_ = value;
17655       bitField0_ |= 0x00000002;
17656       onChanged();
17657       return this;
17658     }
17659     /**
17660      *
17661      *
17662      * <pre>
17663      * A short name or phrase used to identify the policy in dashboards,
17664      * notifications, and incidents. To avoid confusion, don't use the same
17665      * display name for multiple policies in the same project. The name is
17666      * limited to 512 Unicode characters.
17667      * </pre>
17668      *
17669      * <code>string display_name = 2;</code>
17670      *
17671      * @return This builder for chaining.
17672      */
clearDisplayName()17673     public Builder clearDisplayName() {
17674       displayName_ = getDefaultInstance().getDisplayName();
17675       bitField0_ = (bitField0_ & ~0x00000002);
17676       onChanged();
17677       return this;
17678     }
17679     /**
17680      *
17681      *
17682      * <pre>
17683      * A short name or phrase used to identify the policy in dashboards,
17684      * notifications, and incidents. To avoid confusion, don't use the same
17685      * display name for multiple policies in the same project. The name is
17686      * limited to 512 Unicode characters.
17687      * </pre>
17688      *
17689      * <code>string display_name = 2;</code>
17690      *
17691      * @param value The bytes for displayName to set.
17692      * @return This builder for chaining.
17693      */
setDisplayNameBytes(com.google.protobuf.ByteString value)17694     public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
17695       if (value == null) {
17696         throw new NullPointerException();
17697       }
17698       checkByteStringIsUtf8(value);
17699       displayName_ = value;
17700       bitField0_ |= 0x00000002;
17701       onChanged();
17702       return this;
17703     }
17704 
17705     private com.google.monitoring.v3.AlertPolicy.Documentation documentation_;
17706     private com.google.protobuf.SingleFieldBuilderV3<
17707             com.google.monitoring.v3.AlertPolicy.Documentation,
17708             com.google.monitoring.v3.AlertPolicy.Documentation.Builder,
17709             com.google.monitoring.v3.AlertPolicy.DocumentationOrBuilder>
17710         documentationBuilder_;
17711     /**
17712      *
17713      *
17714      * <pre>
17715      * Documentation that is included with notifications and incidents related to
17716      * this policy. Best practice is for the documentation to include information
17717      * to help responders understand, mitigate, escalate, and correct the
17718      * underlying problems detected by the alerting policy. Notification channels
17719      * that have limited capacity might not show this documentation.
17720      * </pre>
17721      *
17722      * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
17723      *
17724      * @return Whether the documentation field is set.
17725      */
hasDocumentation()17726     public boolean hasDocumentation() {
17727       return ((bitField0_ & 0x00000004) != 0);
17728     }
17729     /**
17730      *
17731      *
17732      * <pre>
17733      * Documentation that is included with notifications and incidents related to
17734      * this policy. Best practice is for the documentation to include information
17735      * to help responders understand, mitigate, escalate, and correct the
17736      * underlying problems detected by the alerting policy. Notification channels
17737      * that have limited capacity might not show this documentation.
17738      * </pre>
17739      *
17740      * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
17741      *
17742      * @return The documentation.
17743      */
getDocumentation()17744     public com.google.monitoring.v3.AlertPolicy.Documentation getDocumentation() {
17745       if (documentationBuilder_ == null) {
17746         return documentation_ == null
17747             ? com.google.monitoring.v3.AlertPolicy.Documentation.getDefaultInstance()
17748             : documentation_;
17749       } else {
17750         return documentationBuilder_.getMessage();
17751       }
17752     }
17753     /**
17754      *
17755      *
17756      * <pre>
17757      * Documentation that is included with notifications and incidents related to
17758      * this policy. Best practice is for the documentation to include information
17759      * to help responders understand, mitigate, escalate, and correct the
17760      * underlying problems detected by the alerting policy. Notification channels
17761      * that have limited capacity might not show this documentation.
17762      * </pre>
17763      *
17764      * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
17765      */
setDocumentation(com.google.monitoring.v3.AlertPolicy.Documentation value)17766     public Builder setDocumentation(com.google.monitoring.v3.AlertPolicy.Documentation value) {
17767       if (documentationBuilder_ == null) {
17768         if (value == null) {
17769           throw new NullPointerException();
17770         }
17771         documentation_ = value;
17772       } else {
17773         documentationBuilder_.setMessage(value);
17774       }
17775       bitField0_ |= 0x00000004;
17776       onChanged();
17777       return this;
17778     }
17779     /**
17780      *
17781      *
17782      * <pre>
17783      * Documentation that is included with notifications and incidents related to
17784      * this policy. Best practice is for the documentation to include information
17785      * to help responders understand, mitigate, escalate, and correct the
17786      * underlying problems detected by the alerting policy. Notification channels
17787      * that have limited capacity might not show this documentation.
17788      * </pre>
17789      *
17790      * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
17791      */
setDocumentation( com.google.monitoring.v3.AlertPolicy.Documentation.Builder builderForValue)17792     public Builder setDocumentation(
17793         com.google.monitoring.v3.AlertPolicy.Documentation.Builder builderForValue) {
17794       if (documentationBuilder_ == null) {
17795         documentation_ = builderForValue.build();
17796       } else {
17797         documentationBuilder_.setMessage(builderForValue.build());
17798       }
17799       bitField0_ |= 0x00000004;
17800       onChanged();
17801       return this;
17802     }
17803     /**
17804      *
17805      *
17806      * <pre>
17807      * Documentation that is included with notifications and incidents related to
17808      * this policy. Best practice is for the documentation to include information
17809      * to help responders understand, mitigate, escalate, and correct the
17810      * underlying problems detected by the alerting policy. Notification channels
17811      * that have limited capacity might not show this documentation.
17812      * </pre>
17813      *
17814      * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
17815      */
mergeDocumentation(com.google.monitoring.v3.AlertPolicy.Documentation value)17816     public Builder mergeDocumentation(com.google.monitoring.v3.AlertPolicy.Documentation value) {
17817       if (documentationBuilder_ == null) {
17818         if (((bitField0_ & 0x00000004) != 0)
17819             && documentation_ != null
17820             && documentation_
17821                 != com.google.monitoring.v3.AlertPolicy.Documentation.getDefaultInstance()) {
17822           getDocumentationBuilder().mergeFrom(value);
17823         } else {
17824           documentation_ = value;
17825         }
17826       } else {
17827         documentationBuilder_.mergeFrom(value);
17828       }
17829       bitField0_ |= 0x00000004;
17830       onChanged();
17831       return this;
17832     }
17833     /**
17834      *
17835      *
17836      * <pre>
17837      * Documentation that is included with notifications and incidents related to
17838      * this policy. Best practice is for the documentation to include information
17839      * to help responders understand, mitigate, escalate, and correct the
17840      * underlying problems detected by the alerting policy. Notification channels
17841      * that have limited capacity might not show this documentation.
17842      * </pre>
17843      *
17844      * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
17845      */
clearDocumentation()17846     public Builder clearDocumentation() {
17847       bitField0_ = (bitField0_ & ~0x00000004);
17848       documentation_ = null;
17849       if (documentationBuilder_ != null) {
17850         documentationBuilder_.dispose();
17851         documentationBuilder_ = null;
17852       }
17853       onChanged();
17854       return this;
17855     }
17856     /**
17857      *
17858      *
17859      * <pre>
17860      * Documentation that is included with notifications and incidents related to
17861      * this policy. Best practice is for the documentation to include information
17862      * to help responders understand, mitigate, escalate, and correct the
17863      * underlying problems detected by the alerting policy. Notification channels
17864      * that have limited capacity might not show this documentation.
17865      * </pre>
17866      *
17867      * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
17868      */
getDocumentationBuilder()17869     public com.google.monitoring.v3.AlertPolicy.Documentation.Builder getDocumentationBuilder() {
17870       bitField0_ |= 0x00000004;
17871       onChanged();
17872       return getDocumentationFieldBuilder().getBuilder();
17873     }
17874     /**
17875      *
17876      *
17877      * <pre>
17878      * Documentation that is included with notifications and incidents related to
17879      * this policy. Best practice is for the documentation to include information
17880      * to help responders understand, mitigate, escalate, and correct the
17881      * underlying problems detected by the alerting policy. Notification channels
17882      * that have limited capacity might not show this documentation.
17883      * </pre>
17884      *
17885      * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
17886      */
getDocumentationOrBuilder()17887     public com.google.monitoring.v3.AlertPolicy.DocumentationOrBuilder getDocumentationOrBuilder() {
17888       if (documentationBuilder_ != null) {
17889         return documentationBuilder_.getMessageOrBuilder();
17890       } else {
17891         return documentation_ == null
17892             ? com.google.monitoring.v3.AlertPolicy.Documentation.getDefaultInstance()
17893             : documentation_;
17894       }
17895     }
17896     /**
17897      *
17898      *
17899      * <pre>
17900      * Documentation that is included with notifications and incidents related to
17901      * this policy. Best practice is for the documentation to include information
17902      * to help responders understand, mitigate, escalate, and correct the
17903      * underlying problems detected by the alerting policy. Notification channels
17904      * that have limited capacity might not show this documentation.
17905      * </pre>
17906      *
17907      * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code>
17908      */
17909     private com.google.protobuf.SingleFieldBuilderV3<
17910             com.google.monitoring.v3.AlertPolicy.Documentation,
17911             com.google.monitoring.v3.AlertPolicy.Documentation.Builder,
17912             com.google.monitoring.v3.AlertPolicy.DocumentationOrBuilder>
getDocumentationFieldBuilder()17913         getDocumentationFieldBuilder() {
17914       if (documentationBuilder_ == null) {
17915         documentationBuilder_ =
17916             new com.google.protobuf.SingleFieldBuilderV3<
17917                 com.google.monitoring.v3.AlertPolicy.Documentation,
17918                 com.google.monitoring.v3.AlertPolicy.Documentation.Builder,
17919                 com.google.monitoring.v3.AlertPolicy.DocumentationOrBuilder>(
17920                 getDocumentation(), getParentForChildren(), isClean());
17921         documentation_ = null;
17922       }
17923       return documentationBuilder_;
17924     }
17925 
17926     private com.google.protobuf.MapField<java.lang.String, java.lang.String> userLabels_;
17927 
17928     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetUserLabels()17929         internalGetUserLabels() {
17930       if (userLabels_ == null) {
17931         return com.google.protobuf.MapField.emptyMapField(
17932             UserLabelsDefaultEntryHolder.defaultEntry);
17933       }
17934       return userLabels_;
17935     }
17936 
17937     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableUserLabels()17938         internalGetMutableUserLabels() {
17939       if (userLabels_ == null) {
17940         userLabels_ =
17941             com.google.protobuf.MapField.newMapField(UserLabelsDefaultEntryHolder.defaultEntry);
17942       }
17943       if (!userLabels_.isMutable()) {
17944         userLabels_ = userLabels_.copy();
17945       }
17946       bitField0_ |= 0x00000008;
17947       onChanged();
17948       return userLabels_;
17949     }
17950 
getUserLabelsCount()17951     public int getUserLabelsCount() {
17952       return internalGetUserLabels().getMap().size();
17953     }
17954     /**
17955      *
17956      *
17957      * <pre>
17958      * User-supplied key/value data to be used for organizing and
17959      * identifying the `AlertPolicy` objects.
17960      * The field can contain up to 64 entries. Each key and value is limited to
17961      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
17962      * values can contain only lowercase letters, numerals, underscores, and
17963      * dashes. Keys must begin with a letter.
17964      * </pre>
17965      *
17966      * <code>map&lt;string, string&gt; user_labels = 16;</code>
17967      */
17968     @java.lang.Override
containsUserLabels(java.lang.String key)17969     public boolean containsUserLabels(java.lang.String key) {
17970       if (key == null) {
17971         throw new NullPointerException("map key");
17972       }
17973       return internalGetUserLabels().getMap().containsKey(key);
17974     }
17975     /** Use {@link #getUserLabelsMap()} instead. */
17976     @java.lang.Override
17977     @java.lang.Deprecated
getUserLabels()17978     public java.util.Map<java.lang.String, java.lang.String> getUserLabels() {
17979       return getUserLabelsMap();
17980     }
17981     /**
17982      *
17983      *
17984      * <pre>
17985      * User-supplied key/value data to be used for organizing and
17986      * identifying the `AlertPolicy` objects.
17987      * The field can contain up to 64 entries. Each key and value is limited to
17988      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
17989      * values can contain only lowercase letters, numerals, underscores, and
17990      * dashes. Keys must begin with a letter.
17991      * </pre>
17992      *
17993      * <code>map&lt;string, string&gt; user_labels = 16;</code>
17994      */
17995     @java.lang.Override
getUserLabelsMap()17996     public java.util.Map<java.lang.String, java.lang.String> getUserLabelsMap() {
17997       return internalGetUserLabels().getMap();
17998     }
17999     /**
18000      *
18001      *
18002      * <pre>
18003      * User-supplied key/value data to be used for organizing and
18004      * identifying the `AlertPolicy` objects.
18005      * The field can contain up to 64 entries. Each key and value is limited to
18006      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
18007      * values can contain only lowercase letters, numerals, underscores, and
18008      * dashes. Keys must begin with a letter.
18009      * </pre>
18010      *
18011      * <code>map&lt;string, string&gt; user_labels = 16;</code>
18012      */
18013     @java.lang.Override
getUserLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)18014     public /* nullable */ java.lang.String getUserLabelsOrDefault(
18015         java.lang.String key,
18016         /* nullable */
18017         java.lang.String defaultValue) {
18018       if (key == null) {
18019         throw new NullPointerException("map key");
18020       }
18021       java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
18022       return map.containsKey(key) ? map.get(key) : defaultValue;
18023     }
18024     /**
18025      *
18026      *
18027      * <pre>
18028      * User-supplied key/value data to be used for organizing and
18029      * identifying the `AlertPolicy` objects.
18030      * The field can contain up to 64 entries. Each key and value is limited to
18031      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
18032      * values can contain only lowercase letters, numerals, underscores, and
18033      * dashes. Keys must begin with a letter.
18034      * </pre>
18035      *
18036      * <code>map&lt;string, string&gt; user_labels = 16;</code>
18037      */
18038     @java.lang.Override
getUserLabelsOrThrow(java.lang.String key)18039     public java.lang.String getUserLabelsOrThrow(java.lang.String key) {
18040       if (key == null) {
18041         throw new NullPointerException("map key");
18042       }
18043       java.util.Map<java.lang.String, java.lang.String> map = internalGetUserLabels().getMap();
18044       if (!map.containsKey(key)) {
18045         throw new java.lang.IllegalArgumentException();
18046       }
18047       return map.get(key);
18048     }
18049 
clearUserLabels()18050     public Builder clearUserLabels() {
18051       bitField0_ = (bitField0_ & ~0x00000008);
18052       internalGetMutableUserLabels().getMutableMap().clear();
18053       return this;
18054     }
18055     /**
18056      *
18057      *
18058      * <pre>
18059      * User-supplied key/value data to be used for organizing and
18060      * identifying the `AlertPolicy` objects.
18061      * The field can contain up to 64 entries. Each key and value is limited to
18062      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
18063      * values can contain only lowercase letters, numerals, underscores, and
18064      * dashes. Keys must begin with a letter.
18065      * </pre>
18066      *
18067      * <code>map&lt;string, string&gt; user_labels = 16;</code>
18068      */
removeUserLabels(java.lang.String key)18069     public Builder removeUserLabels(java.lang.String key) {
18070       if (key == null) {
18071         throw new NullPointerException("map key");
18072       }
18073       internalGetMutableUserLabels().getMutableMap().remove(key);
18074       return this;
18075     }
18076     /** Use alternate mutation accessors instead. */
18077     @java.lang.Deprecated
getMutableUserLabels()18078     public java.util.Map<java.lang.String, java.lang.String> getMutableUserLabels() {
18079       bitField0_ |= 0x00000008;
18080       return internalGetMutableUserLabels().getMutableMap();
18081     }
18082     /**
18083      *
18084      *
18085      * <pre>
18086      * User-supplied key/value data to be used for organizing and
18087      * identifying the `AlertPolicy` objects.
18088      * The field can contain up to 64 entries. Each key and value is limited to
18089      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
18090      * values can contain only lowercase letters, numerals, underscores, and
18091      * dashes. Keys must begin with a letter.
18092      * </pre>
18093      *
18094      * <code>map&lt;string, string&gt; user_labels = 16;</code>
18095      */
putUserLabels(java.lang.String key, java.lang.String value)18096     public Builder putUserLabels(java.lang.String key, java.lang.String value) {
18097       if (key == null) {
18098         throw new NullPointerException("map key");
18099       }
18100       if (value == null) {
18101         throw new NullPointerException("map value");
18102       }
18103       internalGetMutableUserLabels().getMutableMap().put(key, value);
18104       bitField0_ |= 0x00000008;
18105       return this;
18106     }
18107     /**
18108      *
18109      *
18110      * <pre>
18111      * User-supplied key/value data to be used for organizing and
18112      * identifying the `AlertPolicy` objects.
18113      * The field can contain up to 64 entries. Each key and value is limited to
18114      * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
18115      * values can contain only lowercase letters, numerals, underscores, and
18116      * dashes. Keys must begin with a letter.
18117      * </pre>
18118      *
18119      * <code>map&lt;string, string&gt; user_labels = 16;</code>
18120      */
putAllUserLabels(java.util.Map<java.lang.String, java.lang.String> values)18121     public Builder putAllUserLabels(java.util.Map<java.lang.String, java.lang.String> values) {
18122       internalGetMutableUserLabels().getMutableMap().putAll(values);
18123       bitField0_ |= 0x00000008;
18124       return this;
18125     }
18126 
18127     private java.util.List<com.google.monitoring.v3.AlertPolicy.Condition> conditions_ =
18128         java.util.Collections.emptyList();
18129 
ensureConditionsIsMutable()18130     private void ensureConditionsIsMutable() {
18131       if (!((bitField0_ & 0x00000010) != 0)) {
18132         conditions_ =
18133             new java.util.ArrayList<com.google.monitoring.v3.AlertPolicy.Condition>(conditions_);
18134         bitField0_ |= 0x00000010;
18135       }
18136     }
18137 
18138     private com.google.protobuf.RepeatedFieldBuilderV3<
18139             com.google.monitoring.v3.AlertPolicy.Condition,
18140             com.google.monitoring.v3.AlertPolicy.Condition.Builder,
18141             com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder>
18142         conditionsBuilder_;
18143 
18144     /**
18145      *
18146      *
18147      * <pre>
18148      * A list of conditions for the policy. The conditions are combined by AND or
18149      * OR according to the `combiner` field. If the combined conditions evaluate
18150      * to true, then an incident is created. A policy can have from one to six
18151      * conditions.
18152      * If `condition_time_series_query_language` is present, it must be the only
18153      * `condition`.
18154      * </pre>
18155      *
18156      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18157      */
getConditionsList()18158     public java.util.List<com.google.monitoring.v3.AlertPolicy.Condition> getConditionsList() {
18159       if (conditionsBuilder_ == null) {
18160         return java.util.Collections.unmodifiableList(conditions_);
18161       } else {
18162         return conditionsBuilder_.getMessageList();
18163       }
18164     }
18165     /**
18166      *
18167      *
18168      * <pre>
18169      * A list of conditions for the policy. The conditions are combined by AND or
18170      * OR according to the `combiner` field. If the combined conditions evaluate
18171      * to true, then an incident is created. A policy can have from one to six
18172      * conditions.
18173      * If `condition_time_series_query_language` is present, it must be the only
18174      * `condition`.
18175      * </pre>
18176      *
18177      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18178      */
getConditionsCount()18179     public int getConditionsCount() {
18180       if (conditionsBuilder_ == null) {
18181         return conditions_.size();
18182       } else {
18183         return conditionsBuilder_.getCount();
18184       }
18185     }
18186     /**
18187      *
18188      *
18189      * <pre>
18190      * A list of conditions for the policy. The conditions are combined by AND or
18191      * OR according to the `combiner` field. If the combined conditions evaluate
18192      * to true, then an incident is created. A policy can have from one to six
18193      * conditions.
18194      * If `condition_time_series_query_language` is present, it must be the only
18195      * `condition`.
18196      * </pre>
18197      *
18198      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18199      */
getConditions(int index)18200     public com.google.monitoring.v3.AlertPolicy.Condition getConditions(int index) {
18201       if (conditionsBuilder_ == null) {
18202         return conditions_.get(index);
18203       } else {
18204         return conditionsBuilder_.getMessage(index);
18205       }
18206     }
18207     /**
18208      *
18209      *
18210      * <pre>
18211      * A list of conditions for the policy. The conditions are combined by AND or
18212      * OR according to the `combiner` field. If the combined conditions evaluate
18213      * to true, then an incident is created. A policy can have from one to six
18214      * conditions.
18215      * If `condition_time_series_query_language` is present, it must be the only
18216      * `condition`.
18217      * </pre>
18218      *
18219      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18220      */
setConditions(int index, com.google.monitoring.v3.AlertPolicy.Condition value)18221     public Builder setConditions(int index, com.google.monitoring.v3.AlertPolicy.Condition value) {
18222       if (conditionsBuilder_ == null) {
18223         if (value == null) {
18224           throw new NullPointerException();
18225         }
18226         ensureConditionsIsMutable();
18227         conditions_.set(index, value);
18228         onChanged();
18229       } else {
18230         conditionsBuilder_.setMessage(index, value);
18231       }
18232       return this;
18233     }
18234     /**
18235      *
18236      *
18237      * <pre>
18238      * A list of conditions for the policy. The conditions are combined by AND or
18239      * OR according to the `combiner` field. If the combined conditions evaluate
18240      * to true, then an incident is created. A policy can have from one to six
18241      * conditions.
18242      * If `condition_time_series_query_language` is present, it must be the only
18243      * `condition`.
18244      * </pre>
18245      *
18246      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18247      */
setConditions( int index, com.google.monitoring.v3.AlertPolicy.Condition.Builder builderForValue)18248     public Builder setConditions(
18249         int index, com.google.monitoring.v3.AlertPolicy.Condition.Builder builderForValue) {
18250       if (conditionsBuilder_ == null) {
18251         ensureConditionsIsMutable();
18252         conditions_.set(index, builderForValue.build());
18253         onChanged();
18254       } else {
18255         conditionsBuilder_.setMessage(index, builderForValue.build());
18256       }
18257       return this;
18258     }
18259     /**
18260      *
18261      *
18262      * <pre>
18263      * A list of conditions for the policy. The conditions are combined by AND or
18264      * OR according to the `combiner` field. If the combined conditions evaluate
18265      * to true, then an incident is created. A policy can have from one to six
18266      * conditions.
18267      * If `condition_time_series_query_language` is present, it must be the only
18268      * `condition`.
18269      * </pre>
18270      *
18271      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18272      */
addConditions(com.google.monitoring.v3.AlertPolicy.Condition value)18273     public Builder addConditions(com.google.monitoring.v3.AlertPolicy.Condition value) {
18274       if (conditionsBuilder_ == null) {
18275         if (value == null) {
18276           throw new NullPointerException();
18277         }
18278         ensureConditionsIsMutable();
18279         conditions_.add(value);
18280         onChanged();
18281       } else {
18282         conditionsBuilder_.addMessage(value);
18283       }
18284       return this;
18285     }
18286     /**
18287      *
18288      *
18289      * <pre>
18290      * A list of conditions for the policy. The conditions are combined by AND or
18291      * OR according to the `combiner` field. If the combined conditions evaluate
18292      * to true, then an incident is created. A policy can have from one to six
18293      * conditions.
18294      * If `condition_time_series_query_language` is present, it must be the only
18295      * `condition`.
18296      * </pre>
18297      *
18298      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18299      */
addConditions(int index, com.google.monitoring.v3.AlertPolicy.Condition value)18300     public Builder addConditions(int index, com.google.monitoring.v3.AlertPolicy.Condition value) {
18301       if (conditionsBuilder_ == null) {
18302         if (value == null) {
18303           throw new NullPointerException();
18304         }
18305         ensureConditionsIsMutable();
18306         conditions_.add(index, value);
18307         onChanged();
18308       } else {
18309         conditionsBuilder_.addMessage(index, value);
18310       }
18311       return this;
18312     }
18313     /**
18314      *
18315      *
18316      * <pre>
18317      * A list of conditions for the policy. The conditions are combined by AND or
18318      * OR according to the `combiner` field. If the combined conditions evaluate
18319      * to true, then an incident is created. A policy can have from one to six
18320      * conditions.
18321      * If `condition_time_series_query_language` is present, it must be the only
18322      * `condition`.
18323      * </pre>
18324      *
18325      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18326      */
addConditions( com.google.monitoring.v3.AlertPolicy.Condition.Builder builderForValue)18327     public Builder addConditions(
18328         com.google.monitoring.v3.AlertPolicy.Condition.Builder builderForValue) {
18329       if (conditionsBuilder_ == null) {
18330         ensureConditionsIsMutable();
18331         conditions_.add(builderForValue.build());
18332         onChanged();
18333       } else {
18334         conditionsBuilder_.addMessage(builderForValue.build());
18335       }
18336       return this;
18337     }
18338     /**
18339      *
18340      *
18341      * <pre>
18342      * A list of conditions for the policy. The conditions are combined by AND or
18343      * OR according to the `combiner` field. If the combined conditions evaluate
18344      * to true, then an incident is created. A policy can have from one to six
18345      * conditions.
18346      * If `condition_time_series_query_language` is present, it must be the only
18347      * `condition`.
18348      * </pre>
18349      *
18350      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18351      */
addConditions( int index, com.google.monitoring.v3.AlertPolicy.Condition.Builder builderForValue)18352     public Builder addConditions(
18353         int index, com.google.monitoring.v3.AlertPolicy.Condition.Builder builderForValue) {
18354       if (conditionsBuilder_ == null) {
18355         ensureConditionsIsMutable();
18356         conditions_.add(index, builderForValue.build());
18357         onChanged();
18358       } else {
18359         conditionsBuilder_.addMessage(index, builderForValue.build());
18360       }
18361       return this;
18362     }
18363     /**
18364      *
18365      *
18366      * <pre>
18367      * A list of conditions for the policy. The conditions are combined by AND or
18368      * OR according to the `combiner` field. If the combined conditions evaluate
18369      * to true, then an incident is created. A policy can have from one to six
18370      * conditions.
18371      * If `condition_time_series_query_language` is present, it must be the only
18372      * `condition`.
18373      * </pre>
18374      *
18375      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18376      */
addAllConditions( java.lang.Iterable<? extends com.google.monitoring.v3.AlertPolicy.Condition> values)18377     public Builder addAllConditions(
18378         java.lang.Iterable<? extends com.google.monitoring.v3.AlertPolicy.Condition> values) {
18379       if (conditionsBuilder_ == null) {
18380         ensureConditionsIsMutable();
18381         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conditions_);
18382         onChanged();
18383       } else {
18384         conditionsBuilder_.addAllMessages(values);
18385       }
18386       return this;
18387     }
18388     /**
18389      *
18390      *
18391      * <pre>
18392      * A list of conditions for the policy. The conditions are combined by AND or
18393      * OR according to the `combiner` field. If the combined conditions evaluate
18394      * to true, then an incident is created. A policy can have from one to six
18395      * conditions.
18396      * If `condition_time_series_query_language` is present, it must be the only
18397      * `condition`.
18398      * </pre>
18399      *
18400      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18401      */
clearConditions()18402     public Builder clearConditions() {
18403       if (conditionsBuilder_ == null) {
18404         conditions_ = java.util.Collections.emptyList();
18405         bitField0_ = (bitField0_ & ~0x00000010);
18406         onChanged();
18407       } else {
18408         conditionsBuilder_.clear();
18409       }
18410       return this;
18411     }
18412     /**
18413      *
18414      *
18415      * <pre>
18416      * A list of conditions for the policy. The conditions are combined by AND or
18417      * OR according to the `combiner` field. If the combined conditions evaluate
18418      * to true, then an incident is created. A policy can have from one to six
18419      * conditions.
18420      * If `condition_time_series_query_language` is present, it must be the only
18421      * `condition`.
18422      * </pre>
18423      *
18424      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18425      */
removeConditions(int index)18426     public Builder removeConditions(int index) {
18427       if (conditionsBuilder_ == null) {
18428         ensureConditionsIsMutable();
18429         conditions_.remove(index);
18430         onChanged();
18431       } else {
18432         conditionsBuilder_.remove(index);
18433       }
18434       return this;
18435     }
18436     /**
18437      *
18438      *
18439      * <pre>
18440      * A list of conditions for the policy. The conditions are combined by AND or
18441      * OR according to the `combiner` field. If the combined conditions evaluate
18442      * to true, then an incident is created. A policy can have from one to six
18443      * conditions.
18444      * If `condition_time_series_query_language` is present, it must be the only
18445      * `condition`.
18446      * </pre>
18447      *
18448      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18449      */
getConditionsBuilder(int index)18450     public com.google.monitoring.v3.AlertPolicy.Condition.Builder getConditionsBuilder(int index) {
18451       return getConditionsFieldBuilder().getBuilder(index);
18452     }
18453     /**
18454      *
18455      *
18456      * <pre>
18457      * A list of conditions for the policy. The conditions are combined by AND or
18458      * OR according to the `combiner` field. If the combined conditions evaluate
18459      * to true, then an incident is created. A policy can have from one to six
18460      * conditions.
18461      * If `condition_time_series_query_language` is present, it must be the only
18462      * `condition`.
18463      * </pre>
18464      *
18465      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18466      */
getConditionsOrBuilder( int index)18467     public com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder getConditionsOrBuilder(
18468         int index) {
18469       if (conditionsBuilder_ == null) {
18470         return conditions_.get(index);
18471       } else {
18472         return conditionsBuilder_.getMessageOrBuilder(index);
18473       }
18474     }
18475     /**
18476      *
18477      *
18478      * <pre>
18479      * A list of conditions for the policy. The conditions are combined by AND or
18480      * OR according to the `combiner` field. If the combined conditions evaluate
18481      * to true, then an incident is created. A policy can have from one to six
18482      * conditions.
18483      * If `condition_time_series_query_language` is present, it must be the only
18484      * `condition`.
18485      * </pre>
18486      *
18487      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18488      */
18489     public java.util.List<? extends com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder>
getConditionsOrBuilderList()18490         getConditionsOrBuilderList() {
18491       if (conditionsBuilder_ != null) {
18492         return conditionsBuilder_.getMessageOrBuilderList();
18493       } else {
18494         return java.util.Collections.unmodifiableList(conditions_);
18495       }
18496     }
18497     /**
18498      *
18499      *
18500      * <pre>
18501      * A list of conditions for the policy. The conditions are combined by AND or
18502      * OR according to the `combiner` field. If the combined conditions evaluate
18503      * to true, then an incident is created. A policy can have from one to six
18504      * conditions.
18505      * If `condition_time_series_query_language` is present, it must be the only
18506      * `condition`.
18507      * </pre>
18508      *
18509      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18510      */
addConditionsBuilder()18511     public com.google.monitoring.v3.AlertPolicy.Condition.Builder addConditionsBuilder() {
18512       return getConditionsFieldBuilder()
18513           .addBuilder(com.google.monitoring.v3.AlertPolicy.Condition.getDefaultInstance());
18514     }
18515     /**
18516      *
18517      *
18518      * <pre>
18519      * A list of conditions for the policy. The conditions are combined by AND or
18520      * OR according to the `combiner` field. If the combined conditions evaluate
18521      * to true, then an incident is created. A policy can have from one to six
18522      * conditions.
18523      * If `condition_time_series_query_language` is present, it must be the only
18524      * `condition`.
18525      * </pre>
18526      *
18527      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18528      */
addConditionsBuilder(int index)18529     public com.google.monitoring.v3.AlertPolicy.Condition.Builder addConditionsBuilder(int index) {
18530       return getConditionsFieldBuilder()
18531           .addBuilder(index, com.google.monitoring.v3.AlertPolicy.Condition.getDefaultInstance());
18532     }
18533     /**
18534      *
18535      *
18536      * <pre>
18537      * A list of conditions for the policy. The conditions are combined by AND or
18538      * OR according to the `combiner` field. If the combined conditions evaluate
18539      * to true, then an incident is created. A policy can have from one to six
18540      * conditions.
18541      * If `condition_time_series_query_language` is present, it must be the only
18542      * `condition`.
18543      * </pre>
18544      *
18545      * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code>
18546      */
18547     public java.util.List<com.google.monitoring.v3.AlertPolicy.Condition.Builder>
getConditionsBuilderList()18548         getConditionsBuilderList() {
18549       return getConditionsFieldBuilder().getBuilderList();
18550     }
18551 
18552     private com.google.protobuf.RepeatedFieldBuilderV3<
18553             com.google.monitoring.v3.AlertPolicy.Condition,
18554             com.google.monitoring.v3.AlertPolicy.Condition.Builder,
18555             com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder>
getConditionsFieldBuilder()18556         getConditionsFieldBuilder() {
18557       if (conditionsBuilder_ == null) {
18558         conditionsBuilder_ =
18559             new com.google.protobuf.RepeatedFieldBuilderV3<
18560                 com.google.monitoring.v3.AlertPolicy.Condition,
18561                 com.google.monitoring.v3.AlertPolicy.Condition.Builder,
18562                 com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder>(
18563                 conditions_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean());
18564         conditions_ = null;
18565       }
18566       return conditionsBuilder_;
18567     }
18568 
18569     private int combiner_ = 0;
18570     /**
18571      *
18572      *
18573      * <pre>
18574      * How to combine the results of multiple conditions to determine if an
18575      * incident should be opened.
18576      * If `condition_time_series_query_language` is present, this must be
18577      * `COMBINE_UNSPECIFIED`.
18578      * </pre>
18579      *
18580      * <code>.google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6;</code>
18581      *
18582      * @return The enum numeric value on the wire for combiner.
18583      */
18584     @java.lang.Override
getCombinerValue()18585     public int getCombinerValue() {
18586       return combiner_;
18587     }
18588     /**
18589      *
18590      *
18591      * <pre>
18592      * How to combine the results of multiple conditions to determine if an
18593      * incident should be opened.
18594      * If `condition_time_series_query_language` is present, this must be
18595      * `COMBINE_UNSPECIFIED`.
18596      * </pre>
18597      *
18598      * <code>.google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6;</code>
18599      *
18600      * @param value The enum numeric value on the wire for combiner to set.
18601      * @return This builder for chaining.
18602      */
setCombinerValue(int value)18603     public Builder setCombinerValue(int value) {
18604       combiner_ = value;
18605       bitField0_ |= 0x00000020;
18606       onChanged();
18607       return this;
18608     }
18609     /**
18610      *
18611      *
18612      * <pre>
18613      * How to combine the results of multiple conditions to determine if an
18614      * incident should be opened.
18615      * If `condition_time_series_query_language` is present, this must be
18616      * `COMBINE_UNSPECIFIED`.
18617      * </pre>
18618      *
18619      * <code>.google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6;</code>
18620      *
18621      * @return The combiner.
18622      */
18623     @java.lang.Override
getCombiner()18624     public com.google.monitoring.v3.AlertPolicy.ConditionCombinerType getCombiner() {
18625       com.google.monitoring.v3.AlertPolicy.ConditionCombinerType result =
18626           com.google.monitoring.v3.AlertPolicy.ConditionCombinerType.forNumber(combiner_);
18627       return result == null
18628           ? com.google.monitoring.v3.AlertPolicy.ConditionCombinerType.UNRECOGNIZED
18629           : result;
18630     }
18631     /**
18632      *
18633      *
18634      * <pre>
18635      * How to combine the results of multiple conditions to determine if an
18636      * incident should be opened.
18637      * If `condition_time_series_query_language` is present, this must be
18638      * `COMBINE_UNSPECIFIED`.
18639      * </pre>
18640      *
18641      * <code>.google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6;</code>
18642      *
18643      * @param value The combiner to set.
18644      * @return This builder for chaining.
18645      */
setCombiner(com.google.monitoring.v3.AlertPolicy.ConditionCombinerType value)18646     public Builder setCombiner(com.google.monitoring.v3.AlertPolicy.ConditionCombinerType value) {
18647       if (value == null) {
18648         throw new NullPointerException();
18649       }
18650       bitField0_ |= 0x00000020;
18651       combiner_ = value.getNumber();
18652       onChanged();
18653       return this;
18654     }
18655     /**
18656      *
18657      *
18658      * <pre>
18659      * How to combine the results of multiple conditions to determine if an
18660      * incident should be opened.
18661      * If `condition_time_series_query_language` is present, this must be
18662      * `COMBINE_UNSPECIFIED`.
18663      * </pre>
18664      *
18665      * <code>.google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6;</code>
18666      *
18667      * @return This builder for chaining.
18668      */
clearCombiner()18669     public Builder clearCombiner() {
18670       bitField0_ = (bitField0_ & ~0x00000020);
18671       combiner_ = 0;
18672       onChanged();
18673       return this;
18674     }
18675 
18676     private com.google.protobuf.BoolValue enabled_;
18677     private com.google.protobuf.SingleFieldBuilderV3<
18678             com.google.protobuf.BoolValue,
18679             com.google.protobuf.BoolValue.Builder,
18680             com.google.protobuf.BoolValueOrBuilder>
18681         enabledBuilder_;
18682     /**
18683      *
18684      *
18685      * <pre>
18686      * Whether or not the policy is enabled. On write, the default interpretation
18687      * if unset is that the policy is enabled. On read, clients should not make
18688      * any assumption about the state if it has not been populated. The
18689      * field should always be populated on List and Get operations, unless
18690      * a field projection has been specified that strips it out.
18691      * </pre>
18692      *
18693      * <code>.google.protobuf.BoolValue enabled = 17;</code>
18694      *
18695      * @return Whether the enabled field is set.
18696      */
hasEnabled()18697     public boolean hasEnabled() {
18698       return ((bitField0_ & 0x00000040) != 0);
18699     }
18700     /**
18701      *
18702      *
18703      * <pre>
18704      * Whether or not the policy is enabled. On write, the default interpretation
18705      * if unset is that the policy is enabled. On read, clients should not make
18706      * any assumption about the state if it has not been populated. The
18707      * field should always be populated on List and Get operations, unless
18708      * a field projection has been specified that strips it out.
18709      * </pre>
18710      *
18711      * <code>.google.protobuf.BoolValue enabled = 17;</code>
18712      *
18713      * @return The enabled.
18714      */
getEnabled()18715     public com.google.protobuf.BoolValue getEnabled() {
18716       if (enabledBuilder_ == null) {
18717         return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
18718       } else {
18719         return enabledBuilder_.getMessage();
18720       }
18721     }
18722     /**
18723      *
18724      *
18725      * <pre>
18726      * Whether or not the policy is enabled. On write, the default interpretation
18727      * if unset is that the policy is enabled. On read, clients should not make
18728      * any assumption about the state if it has not been populated. The
18729      * field should always be populated on List and Get operations, unless
18730      * a field projection has been specified that strips it out.
18731      * </pre>
18732      *
18733      * <code>.google.protobuf.BoolValue enabled = 17;</code>
18734      */
setEnabled(com.google.protobuf.BoolValue value)18735     public Builder setEnabled(com.google.protobuf.BoolValue value) {
18736       if (enabledBuilder_ == null) {
18737         if (value == null) {
18738           throw new NullPointerException();
18739         }
18740         enabled_ = value;
18741       } else {
18742         enabledBuilder_.setMessage(value);
18743       }
18744       bitField0_ |= 0x00000040;
18745       onChanged();
18746       return this;
18747     }
18748     /**
18749      *
18750      *
18751      * <pre>
18752      * Whether or not the policy is enabled. On write, the default interpretation
18753      * if unset is that the policy is enabled. On read, clients should not make
18754      * any assumption about the state if it has not been populated. The
18755      * field should always be populated on List and Get operations, unless
18756      * a field projection has been specified that strips it out.
18757      * </pre>
18758      *
18759      * <code>.google.protobuf.BoolValue enabled = 17;</code>
18760      */
setEnabled(com.google.protobuf.BoolValue.Builder builderForValue)18761     public Builder setEnabled(com.google.protobuf.BoolValue.Builder builderForValue) {
18762       if (enabledBuilder_ == null) {
18763         enabled_ = builderForValue.build();
18764       } else {
18765         enabledBuilder_.setMessage(builderForValue.build());
18766       }
18767       bitField0_ |= 0x00000040;
18768       onChanged();
18769       return this;
18770     }
18771     /**
18772      *
18773      *
18774      * <pre>
18775      * Whether or not the policy is enabled. On write, the default interpretation
18776      * if unset is that the policy is enabled. On read, clients should not make
18777      * any assumption about the state if it has not been populated. The
18778      * field should always be populated on List and Get operations, unless
18779      * a field projection has been specified that strips it out.
18780      * </pre>
18781      *
18782      * <code>.google.protobuf.BoolValue enabled = 17;</code>
18783      */
mergeEnabled(com.google.protobuf.BoolValue value)18784     public Builder mergeEnabled(com.google.protobuf.BoolValue value) {
18785       if (enabledBuilder_ == null) {
18786         if (((bitField0_ & 0x00000040) != 0)
18787             && enabled_ != null
18788             && enabled_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
18789           getEnabledBuilder().mergeFrom(value);
18790         } else {
18791           enabled_ = value;
18792         }
18793       } else {
18794         enabledBuilder_.mergeFrom(value);
18795       }
18796       bitField0_ |= 0x00000040;
18797       onChanged();
18798       return this;
18799     }
18800     /**
18801      *
18802      *
18803      * <pre>
18804      * Whether or not the policy is enabled. On write, the default interpretation
18805      * if unset is that the policy is enabled. On read, clients should not make
18806      * any assumption about the state if it has not been populated. The
18807      * field should always be populated on List and Get operations, unless
18808      * a field projection has been specified that strips it out.
18809      * </pre>
18810      *
18811      * <code>.google.protobuf.BoolValue enabled = 17;</code>
18812      */
clearEnabled()18813     public Builder clearEnabled() {
18814       bitField0_ = (bitField0_ & ~0x00000040);
18815       enabled_ = null;
18816       if (enabledBuilder_ != null) {
18817         enabledBuilder_.dispose();
18818         enabledBuilder_ = null;
18819       }
18820       onChanged();
18821       return this;
18822     }
18823     /**
18824      *
18825      *
18826      * <pre>
18827      * Whether or not the policy is enabled. On write, the default interpretation
18828      * if unset is that the policy is enabled. On read, clients should not make
18829      * any assumption about the state if it has not been populated. The
18830      * field should always be populated on List and Get operations, unless
18831      * a field projection has been specified that strips it out.
18832      * </pre>
18833      *
18834      * <code>.google.protobuf.BoolValue enabled = 17;</code>
18835      */
getEnabledBuilder()18836     public com.google.protobuf.BoolValue.Builder getEnabledBuilder() {
18837       bitField0_ |= 0x00000040;
18838       onChanged();
18839       return getEnabledFieldBuilder().getBuilder();
18840     }
18841     /**
18842      *
18843      *
18844      * <pre>
18845      * Whether or not the policy is enabled. On write, the default interpretation
18846      * if unset is that the policy is enabled. On read, clients should not make
18847      * any assumption about the state if it has not been populated. The
18848      * field should always be populated on List and Get operations, unless
18849      * a field projection has been specified that strips it out.
18850      * </pre>
18851      *
18852      * <code>.google.protobuf.BoolValue enabled = 17;</code>
18853      */
getEnabledOrBuilder()18854     public com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder() {
18855       if (enabledBuilder_ != null) {
18856         return enabledBuilder_.getMessageOrBuilder();
18857       } else {
18858         return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
18859       }
18860     }
18861     /**
18862      *
18863      *
18864      * <pre>
18865      * Whether or not the policy is enabled. On write, the default interpretation
18866      * if unset is that the policy is enabled. On read, clients should not make
18867      * any assumption about the state if it has not been populated. The
18868      * field should always be populated on List and Get operations, unless
18869      * a field projection has been specified that strips it out.
18870      * </pre>
18871      *
18872      * <code>.google.protobuf.BoolValue enabled = 17;</code>
18873      */
18874     private com.google.protobuf.SingleFieldBuilderV3<
18875             com.google.protobuf.BoolValue,
18876             com.google.protobuf.BoolValue.Builder,
18877             com.google.protobuf.BoolValueOrBuilder>
getEnabledFieldBuilder()18878         getEnabledFieldBuilder() {
18879       if (enabledBuilder_ == null) {
18880         enabledBuilder_ =
18881             new com.google.protobuf.SingleFieldBuilderV3<
18882                 com.google.protobuf.BoolValue,
18883                 com.google.protobuf.BoolValue.Builder,
18884                 com.google.protobuf.BoolValueOrBuilder>(
18885                 getEnabled(), getParentForChildren(), isClean());
18886         enabled_ = null;
18887       }
18888       return enabledBuilder_;
18889     }
18890 
18891     private com.google.rpc.Status validity_;
18892     private com.google.protobuf.SingleFieldBuilderV3<
18893             com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
18894         validityBuilder_;
18895     /**
18896      *
18897      *
18898      * <pre>
18899      * Read-only description of how the alert policy is invalid. OK if the alert
18900      * policy is valid. If not OK, the alert policy will not generate incidents.
18901      * </pre>
18902      *
18903      * <code>.google.rpc.Status validity = 18;</code>
18904      *
18905      * @return Whether the validity field is set.
18906      */
hasValidity()18907     public boolean hasValidity() {
18908       return ((bitField0_ & 0x00000080) != 0);
18909     }
18910     /**
18911      *
18912      *
18913      * <pre>
18914      * Read-only description of how the alert policy is invalid. OK if the alert
18915      * policy is valid. If not OK, the alert policy will not generate incidents.
18916      * </pre>
18917      *
18918      * <code>.google.rpc.Status validity = 18;</code>
18919      *
18920      * @return The validity.
18921      */
getValidity()18922     public com.google.rpc.Status getValidity() {
18923       if (validityBuilder_ == null) {
18924         return validity_ == null ? com.google.rpc.Status.getDefaultInstance() : validity_;
18925       } else {
18926         return validityBuilder_.getMessage();
18927       }
18928     }
18929     /**
18930      *
18931      *
18932      * <pre>
18933      * Read-only description of how the alert policy is invalid. OK if the alert
18934      * policy is valid. If not OK, the alert policy will not generate incidents.
18935      * </pre>
18936      *
18937      * <code>.google.rpc.Status validity = 18;</code>
18938      */
setValidity(com.google.rpc.Status value)18939     public Builder setValidity(com.google.rpc.Status value) {
18940       if (validityBuilder_ == null) {
18941         if (value == null) {
18942           throw new NullPointerException();
18943         }
18944         validity_ = value;
18945       } else {
18946         validityBuilder_.setMessage(value);
18947       }
18948       bitField0_ |= 0x00000080;
18949       onChanged();
18950       return this;
18951     }
18952     /**
18953      *
18954      *
18955      * <pre>
18956      * Read-only description of how the alert policy is invalid. OK if the alert
18957      * policy is valid. If not OK, the alert policy will not generate incidents.
18958      * </pre>
18959      *
18960      * <code>.google.rpc.Status validity = 18;</code>
18961      */
setValidity(com.google.rpc.Status.Builder builderForValue)18962     public Builder setValidity(com.google.rpc.Status.Builder builderForValue) {
18963       if (validityBuilder_ == null) {
18964         validity_ = builderForValue.build();
18965       } else {
18966         validityBuilder_.setMessage(builderForValue.build());
18967       }
18968       bitField0_ |= 0x00000080;
18969       onChanged();
18970       return this;
18971     }
18972     /**
18973      *
18974      *
18975      * <pre>
18976      * Read-only description of how the alert policy is invalid. OK if the alert
18977      * policy is valid. If not OK, the alert policy will not generate incidents.
18978      * </pre>
18979      *
18980      * <code>.google.rpc.Status validity = 18;</code>
18981      */
mergeValidity(com.google.rpc.Status value)18982     public Builder mergeValidity(com.google.rpc.Status value) {
18983       if (validityBuilder_ == null) {
18984         if (((bitField0_ & 0x00000080) != 0)
18985             && validity_ != null
18986             && validity_ != com.google.rpc.Status.getDefaultInstance()) {
18987           getValidityBuilder().mergeFrom(value);
18988         } else {
18989           validity_ = value;
18990         }
18991       } else {
18992         validityBuilder_.mergeFrom(value);
18993       }
18994       bitField0_ |= 0x00000080;
18995       onChanged();
18996       return this;
18997     }
18998     /**
18999      *
19000      *
19001      * <pre>
19002      * Read-only description of how the alert policy is invalid. OK if the alert
19003      * policy is valid. If not OK, the alert policy will not generate incidents.
19004      * </pre>
19005      *
19006      * <code>.google.rpc.Status validity = 18;</code>
19007      */
clearValidity()19008     public Builder clearValidity() {
19009       bitField0_ = (bitField0_ & ~0x00000080);
19010       validity_ = null;
19011       if (validityBuilder_ != null) {
19012         validityBuilder_.dispose();
19013         validityBuilder_ = null;
19014       }
19015       onChanged();
19016       return this;
19017     }
19018     /**
19019      *
19020      *
19021      * <pre>
19022      * Read-only description of how the alert policy is invalid. OK if the alert
19023      * policy is valid. If not OK, the alert policy will not generate incidents.
19024      * </pre>
19025      *
19026      * <code>.google.rpc.Status validity = 18;</code>
19027      */
getValidityBuilder()19028     public com.google.rpc.Status.Builder getValidityBuilder() {
19029       bitField0_ |= 0x00000080;
19030       onChanged();
19031       return getValidityFieldBuilder().getBuilder();
19032     }
19033     /**
19034      *
19035      *
19036      * <pre>
19037      * Read-only description of how the alert policy is invalid. OK if the alert
19038      * policy is valid. If not OK, the alert policy will not generate incidents.
19039      * </pre>
19040      *
19041      * <code>.google.rpc.Status validity = 18;</code>
19042      */
getValidityOrBuilder()19043     public com.google.rpc.StatusOrBuilder getValidityOrBuilder() {
19044       if (validityBuilder_ != null) {
19045         return validityBuilder_.getMessageOrBuilder();
19046       } else {
19047         return validity_ == null ? com.google.rpc.Status.getDefaultInstance() : validity_;
19048       }
19049     }
19050     /**
19051      *
19052      *
19053      * <pre>
19054      * Read-only description of how the alert policy is invalid. OK if the alert
19055      * policy is valid. If not OK, the alert policy will not generate incidents.
19056      * </pre>
19057      *
19058      * <code>.google.rpc.Status validity = 18;</code>
19059      */
19060     private com.google.protobuf.SingleFieldBuilderV3<
19061             com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
getValidityFieldBuilder()19062         getValidityFieldBuilder() {
19063       if (validityBuilder_ == null) {
19064         validityBuilder_ =
19065             new com.google.protobuf.SingleFieldBuilderV3<
19066                 com.google.rpc.Status,
19067                 com.google.rpc.Status.Builder,
19068                 com.google.rpc.StatusOrBuilder>(getValidity(), getParentForChildren(), isClean());
19069         validity_ = null;
19070       }
19071       return validityBuilder_;
19072     }
19073 
19074     private com.google.protobuf.LazyStringList notificationChannels_ =
19075         com.google.protobuf.LazyStringArrayList.EMPTY;
19076 
ensureNotificationChannelsIsMutable()19077     private void ensureNotificationChannelsIsMutable() {
19078       if (!((bitField0_ & 0x00000100) != 0)) {
19079         notificationChannels_ = new com.google.protobuf.LazyStringArrayList(notificationChannels_);
19080         bitField0_ |= 0x00000100;
19081       }
19082     }
19083     /**
19084      *
19085      *
19086      * <pre>
19087      * Identifies the notification channels to which notifications should be sent
19088      * when incidents are opened or closed or when new violations occur on
19089      * an already opened incident. Each element of this array corresponds to
19090      * the `name` field in each of the
19091      * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
19092      * objects that are returned from the [`ListNotificationChannels`]
19093      * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
19094      * method. The format of the entries in this field is:
19095      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
19096      * </pre>
19097      *
19098      * <code>repeated string notification_channels = 14;</code>
19099      *
19100      * @return A list containing the notificationChannels.
19101      */
getNotificationChannelsList()19102     public com.google.protobuf.ProtocolStringList getNotificationChannelsList() {
19103       return notificationChannels_.getUnmodifiableView();
19104     }
19105     /**
19106      *
19107      *
19108      * <pre>
19109      * Identifies the notification channels to which notifications should be sent
19110      * when incidents are opened or closed or when new violations occur on
19111      * an already opened incident. Each element of this array corresponds to
19112      * the `name` field in each of the
19113      * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
19114      * objects that are returned from the [`ListNotificationChannels`]
19115      * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
19116      * method. The format of the entries in this field is:
19117      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
19118      * </pre>
19119      *
19120      * <code>repeated string notification_channels = 14;</code>
19121      *
19122      * @return The count of notificationChannels.
19123      */
getNotificationChannelsCount()19124     public int getNotificationChannelsCount() {
19125       return notificationChannels_.size();
19126     }
19127     /**
19128      *
19129      *
19130      * <pre>
19131      * Identifies the notification channels to which notifications should be sent
19132      * when incidents are opened or closed or when new violations occur on
19133      * an already opened incident. Each element of this array corresponds to
19134      * the `name` field in each of the
19135      * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
19136      * objects that are returned from the [`ListNotificationChannels`]
19137      * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
19138      * method. The format of the entries in this field is:
19139      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
19140      * </pre>
19141      *
19142      * <code>repeated string notification_channels = 14;</code>
19143      *
19144      * @param index The index of the element to return.
19145      * @return The notificationChannels at the given index.
19146      */
getNotificationChannels(int index)19147     public java.lang.String getNotificationChannels(int index) {
19148       return notificationChannels_.get(index);
19149     }
19150     /**
19151      *
19152      *
19153      * <pre>
19154      * Identifies the notification channels to which notifications should be sent
19155      * when incidents are opened or closed or when new violations occur on
19156      * an already opened incident. Each element of this array corresponds to
19157      * the `name` field in each of the
19158      * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
19159      * objects that are returned from the [`ListNotificationChannels`]
19160      * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
19161      * method. The format of the entries in this field is:
19162      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
19163      * </pre>
19164      *
19165      * <code>repeated string notification_channels = 14;</code>
19166      *
19167      * @param index The index of the value to return.
19168      * @return The bytes of the notificationChannels at the given index.
19169      */
getNotificationChannelsBytes(int index)19170     public com.google.protobuf.ByteString getNotificationChannelsBytes(int index) {
19171       return notificationChannels_.getByteString(index);
19172     }
19173     /**
19174      *
19175      *
19176      * <pre>
19177      * Identifies the notification channels to which notifications should be sent
19178      * when incidents are opened or closed or when new violations occur on
19179      * an already opened incident. Each element of this array corresponds to
19180      * the `name` field in each of the
19181      * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
19182      * objects that are returned from the [`ListNotificationChannels`]
19183      * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
19184      * method. The format of the entries in this field is:
19185      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
19186      * </pre>
19187      *
19188      * <code>repeated string notification_channels = 14;</code>
19189      *
19190      * @param index The index to set the value at.
19191      * @param value The notificationChannels to set.
19192      * @return This builder for chaining.
19193      */
setNotificationChannels(int index, java.lang.String value)19194     public Builder setNotificationChannels(int index, java.lang.String value) {
19195       if (value == null) {
19196         throw new NullPointerException();
19197       }
19198       ensureNotificationChannelsIsMutable();
19199       notificationChannels_.set(index, value);
19200       onChanged();
19201       return this;
19202     }
19203     /**
19204      *
19205      *
19206      * <pre>
19207      * Identifies the notification channels to which notifications should be sent
19208      * when incidents are opened or closed or when new violations occur on
19209      * an already opened incident. Each element of this array corresponds to
19210      * the `name` field in each of the
19211      * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
19212      * objects that are returned from the [`ListNotificationChannels`]
19213      * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
19214      * method. The format of the entries in this field is:
19215      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
19216      * </pre>
19217      *
19218      * <code>repeated string notification_channels = 14;</code>
19219      *
19220      * @param value The notificationChannels to add.
19221      * @return This builder for chaining.
19222      */
addNotificationChannels(java.lang.String value)19223     public Builder addNotificationChannels(java.lang.String value) {
19224       if (value == null) {
19225         throw new NullPointerException();
19226       }
19227       ensureNotificationChannelsIsMutable();
19228       notificationChannels_.add(value);
19229       onChanged();
19230       return this;
19231     }
19232     /**
19233      *
19234      *
19235      * <pre>
19236      * Identifies the notification channels to which notifications should be sent
19237      * when incidents are opened or closed or when new violations occur on
19238      * an already opened incident. Each element of this array corresponds to
19239      * the `name` field in each of the
19240      * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
19241      * objects that are returned from the [`ListNotificationChannels`]
19242      * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
19243      * method. The format of the entries in this field is:
19244      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
19245      * </pre>
19246      *
19247      * <code>repeated string notification_channels = 14;</code>
19248      *
19249      * @param values The notificationChannels to add.
19250      * @return This builder for chaining.
19251      */
addAllNotificationChannels(java.lang.Iterable<java.lang.String> values)19252     public Builder addAllNotificationChannels(java.lang.Iterable<java.lang.String> values) {
19253       ensureNotificationChannelsIsMutable();
19254       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, notificationChannels_);
19255       onChanged();
19256       return this;
19257     }
19258     /**
19259      *
19260      *
19261      * <pre>
19262      * Identifies the notification channels to which notifications should be sent
19263      * when incidents are opened or closed or when new violations occur on
19264      * an already opened incident. Each element of this array corresponds to
19265      * the `name` field in each of the
19266      * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
19267      * objects that are returned from the [`ListNotificationChannels`]
19268      * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
19269      * method. The format of the entries in this field is:
19270      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
19271      * </pre>
19272      *
19273      * <code>repeated string notification_channels = 14;</code>
19274      *
19275      * @return This builder for chaining.
19276      */
clearNotificationChannels()19277     public Builder clearNotificationChannels() {
19278       notificationChannels_ = com.google.protobuf.LazyStringArrayList.EMPTY;
19279       bitField0_ = (bitField0_ & ~0x00000100);
19280       onChanged();
19281       return this;
19282     }
19283     /**
19284      *
19285      *
19286      * <pre>
19287      * Identifies the notification channels to which notifications should be sent
19288      * when incidents are opened or closed or when new violations occur on
19289      * an already opened incident. Each element of this array corresponds to
19290      * the `name` field in each of the
19291      * [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
19292      * objects that are returned from the [`ListNotificationChannels`]
19293      * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
19294      * method. The format of the entries in this field is:
19295      *     projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
19296      * </pre>
19297      *
19298      * <code>repeated string notification_channels = 14;</code>
19299      *
19300      * @param value The bytes of the notificationChannels to add.
19301      * @return This builder for chaining.
19302      */
addNotificationChannelsBytes(com.google.protobuf.ByteString value)19303     public Builder addNotificationChannelsBytes(com.google.protobuf.ByteString value) {
19304       if (value == null) {
19305         throw new NullPointerException();
19306       }
19307       checkByteStringIsUtf8(value);
19308       ensureNotificationChannelsIsMutable();
19309       notificationChannels_.add(value);
19310       onChanged();
19311       return this;
19312     }
19313 
19314     private com.google.monitoring.v3.MutationRecord creationRecord_;
19315     private com.google.protobuf.SingleFieldBuilderV3<
19316             com.google.monitoring.v3.MutationRecord,
19317             com.google.monitoring.v3.MutationRecord.Builder,
19318             com.google.monitoring.v3.MutationRecordOrBuilder>
19319         creationRecordBuilder_;
19320     /**
19321      *
19322      *
19323      * <pre>
19324      * A read-only record of the creation of the alerting policy. If provided
19325      * in a call to create or update, this field will be ignored.
19326      * </pre>
19327      *
19328      * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
19329      *
19330      * @return Whether the creationRecord field is set.
19331      */
hasCreationRecord()19332     public boolean hasCreationRecord() {
19333       return ((bitField0_ & 0x00000200) != 0);
19334     }
19335     /**
19336      *
19337      *
19338      * <pre>
19339      * A read-only record of the creation of the alerting policy. If provided
19340      * in a call to create or update, this field will be ignored.
19341      * </pre>
19342      *
19343      * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
19344      *
19345      * @return The creationRecord.
19346      */
getCreationRecord()19347     public com.google.monitoring.v3.MutationRecord getCreationRecord() {
19348       if (creationRecordBuilder_ == null) {
19349         return creationRecord_ == null
19350             ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
19351             : creationRecord_;
19352       } else {
19353         return creationRecordBuilder_.getMessage();
19354       }
19355     }
19356     /**
19357      *
19358      *
19359      * <pre>
19360      * A read-only record of the creation of the alerting policy. If provided
19361      * in a call to create or update, this field will be ignored.
19362      * </pre>
19363      *
19364      * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
19365      */
setCreationRecord(com.google.monitoring.v3.MutationRecord value)19366     public Builder setCreationRecord(com.google.monitoring.v3.MutationRecord value) {
19367       if (creationRecordBuilder_ == null) {
19368         if (value == null) {
19369           throw new NullPointerException();
19370         }
19371         creationRecord_ = value;
19372       } else {
19373         creationRecordBuilder_.setMessage(value);
19374       }
19375       bitField0_ |= 0x00000200;
19376       onChanged();
19377       return this;
19378     }
19379     /**
19380      *
19381      *
19382      * <pre>
19383      * A read-only record of the creation of the alerting policy. If provided
19384      * in a call to create or update, this field will be ignored.
19385      * </pre>
19386      *
19387      * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
19388      */
setCreationRecord( com.google.monitoring.v3.MutationRecord.Builder builderForValue)19389     public Builder setCreationRecord(
19390         com.google.monitoring.v3.MutationRecord.Builder builderForValue) {
19391       if (creationRecordBuilder_ == null) {
19392         creationRecord_ = builderForValue.build();
19393       } else {
19394         creationRecordBuilder_.setMessage(builderForValue.build());
19395       }
19396       bitField0_ |= 0x00000200;
19397       onChanged();
19398       return this;
19399     }
19400     /**
19401      *
19402      *
19403      * <pre>
19404      * A read-only record of the creation of the alerting policy. If provided
19405      * in a call to create or update, this field will be ignored.
19406      * </pre>
19407      *
19408      * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
19409      */
mergeCreationRecord(com.google.monitoring.v3.MutationRecord value)19410     public Builder mergeCreationRecord(com.google.monitoring.v3.MutationRecord value) {
19411       if (creationRecordBuilder_ == null) {
19412         if (((bitField0_ & 0x00000200) != 0)
19413             && creationRecord_ != null
19414             && creationRecord_ != com.google.monitoring.v3.MutationRecord.getDefaultInstance()) {
19415           getCreationRecordBuilder().mergeFrom(value);
19416         } else {
19417           creationRecord_ = value;
19418         }
19419       } else {
19420         creationRecordBuilder_.mergeFrom(value);
19421       }
19422       bitField0_ |= 0x00000200;
19423       onChanged();
19424       return this;
19425     }
19426     /**
19427      *
19428      *
19429      * <pre>
19430      * A read-only record of the creation of the alerting policy. If provided
19431      * in a call to create or update, this field will be ignored.
19432      * </pre>
19433      *
19434      * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
19435      */
clearCreationRecord()19436     public Builder clearCreationRecord() {
19437       bitField0_ = (bitField0_ & ~0x00000200);
19438       creationRecord_ = null;
19439       if (creationRecordBuilder_ != null) {
19440         creationRecordBuilder_.dispose();
19441         creationRecordBuilder_ = null;
19442       }
19443       onChanged();
19444       return this;
19445     }
19446     /**
19447      *
19448      *
19449      * <pre>
19450      * A read-only record of the creation of the alerting policy. If provided
19451      * in a call to create or update, this field will be ignored.
19452      * </pre>
19453      *
19454      * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
19455      */
getCreationRecordBuilder()19456     public com.google.monitoring.v3.MutationRecord.Builder getCreationRecordBuilder() {
19457       bitField0_ |= 0x00000200;
19458       onChanged();
19459       return getCreationRecordFieldBuilder().getBuilder();
19460     }
19461     /**
19462      *
19463      *
19464      * <pre>
19465      * A read-only record of the creation of the alerting policy. If provided
19466      * in a call to create or update, this field will be ignored.
19467      * </pre>
19468      *
19469      * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
19470      */
getCreationRecordOrBuilder()19471     public com.google.monitoring.v3.MutationRecordOrBuilder getCreationRecordOrBuilder() {
19472       if (creationRecordBuilder_ != null) {
19473         return creationRecordBuilder_.getMessageOrBuilder();
19474       } else {
19475         return creationRecord_ == null
19476             ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
19477             : creationRecord_;
19478       }
19479     }
19480     /**
19481      *
19482      *
19483      * <pre>
19484      * A read-only record of the creation of the alerting policy. If provided
19485      * in a call to create or update, this field will be ignored.
19486      * </pre>
19487      *
19488      * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code>
19489      */
19490     private com.google.protobuf.SingleFieldBuilderV3<
19491             com.google.monitoring.v3.MutationRecord,
19492             com.google.monitoring.v3.MutationRecord.Builder,
19493             com.google.monitoring.v3.MutationRecordOrBuilder>
getCreationRecordFieldBuilder()19494         getCreationRecordFieldBuilder() {
19495       if (creationRecordBuilder_ == null) {
19496         creationRecordBuilder_ =
19497             new com.google.protobuf.SingleFieldBuilderV3<
19498                 com.google.monitoring.v3.MutationRecord,
19499                 com.google.monitoring.v3.MutationRecord.Builder,
19500                 com.google.monitoring.v3.MutationRecordOrBuilder>(
19501                 getCreationRecord(), getParentForChildren(), isClean());
19502         creationRecord_ = null;
19503       }
19504       return creationRecordBuilder_;
19505     }
19506 
19507     private com.google.monitoring.v3.MutationRecord mutationRecord_;
19508     private com.google.protobuf.SingleFieldBuilderV3<
19509             com.google.monitoring.v3.MutationRecord,
19510             com.google.monitoring.v3.MutationRecord.Builder,
19511             com.google.monitoring.v3.MutationRecordOrBuilder>
19512         mutationRecordBuilder_;
19513     /**
19514      *
19515      *
19516      * <pre>
19517      * A read-only record of the most recent change to the alerting policy. If
19518      * provided in a call to create or update, this field will be ignored.
19519      * </pre>
19520      *
19521      * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
19522      *
19523      * @return Whether the mutationRecord field is set.
19524      */
hasMutationRecord()19525     public boolean hasMutationRecord() {
19526       return ((bitField0_ & 0x00000400) != 0);
19527     }
19528     /**
19529      *
19530      *
19531      * <pre>
19532      * A read-only record of the most recent change to the alerting policy. If
19533      * provided in a call to create or update, this field will be ignored.
19534      * </pre>
19535      *
19536      * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
19537      *
19538      * @return The mutationRecord.
19539      */
getMutationRecord()19540     public com.google.monitoring.v3.MutationRecord getMutationRecord() {
19541       if (mutationRecordBuilder_ == null) {
19542         return mutationRecord_ == null
19543             ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
19544             : mutationRecord_;
19545       } else {
19546         return mutationRecordBuilder_.getMessage();
19547       }
19548     }
19549     /**
19550      *
19551      *
19552      * <pre>
19553      * A read-only record of the most recent change to the alerting policy. If
19554      * provided in a call to create or update, this field will be ignored.
19555      * </pre>
19556      *
19557      * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
19558      */
setMutationRecord(com.google.monitoring.v3.MutationRecord value)19559     public Builder setMutationRecord(com.google.monitoring.v3.MutationRecord value) {
19560       if (mutationRecordBuilder_ == null) {
19561         if (value == null) {
19562           throw new NullPointerException();
19563         }
19564         mutationRecord_ = value;
19565       } else {
19566         mutationRecordBuilder_.setMessage(value);
19567       }
19568       bitField0_ |= 0x00000400;
19569       onChanged();
19570       return this;
19571     }
19572     /**
19573      *
19574      *
19575      * <pre>
19576      * A read-only record of the most recent change to the alerting policy. If
19577      * provided in a call to create or update, this field will be ignored.
19578      * </pre>
19579      *
19580      * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
19581      */
setMutationRecord( com.google.monitoring.v3.MutationRecord.Builder builderForValue)19582     public Builder setMutationRecord(
19583         com.google.monitoring.v3.MutationRecord.Builder builderForValue) {
19584       if (mutationRecordBuilder_ == null) {
19585         mutationRecord_ = builderForValue.build();
19586       } else {
19587         mutationRecordBuilder_.setMessage(builderForValue.build());
19588       }
19589       bitField0_ |= 0x00000400;
19590       onChanged();
19591       return this;
19592     }
19593     /**
19594      *
19595      *
19596      * <pre>
19597      * A read-only record of the most recent change to the alerting policy. If
19598      * provided in a call to create or update, this field will be ignored.
19599      * </pre>
19600      *
19601      * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
19602      */
mergeMutationRecord(com.google.monitoring.v3.MutationRecord value)19603     public Builder mergeMutationRecord(com.google.monitoring.v3.MutationRecord value) {
19604       if (mutationRecordBuilder_ == null) {
19605         if (((bitField0_ & 0x00000400) != 0)
19606             && mutationRecord_ != null
19607             && mutationRecord_ != com.google.monitoring.v3.MutationRecord.getDefaultInstance()) {
19608           getMutationRecordBuilder().mergeFrom(value);
19609         } else {
19610           mutationRecord_ = value;
19611         }
19612       } else {
19613         mutationRecordBuilder_.mergeFrom(value);
19614       }
19615       bitField0_ |= 0x00000400;
19616       onChanged();
19617       return this;
19618     }
19619     /**
19620      *
19621      *
19622      * <pre>
19623      * A read-only record of the most recent change to the alerting policy. If
19624      * provided in a call to create or update, this field will be ignored.
19625      * </pre>
19626      *
19627      * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
19628      */
clearMutationRecord()19629     public Builder clearMutationRecord() {
19630       bitField0_ = (bitField0_ & ~0x00000400);
19631       mutationRecord_ = null;
19632       if (mutationRecordBuilder_ != null) {
19633         mutationRecordBuilder_.dispose();
19634         mutationRecordBuilder_ = null;
19635       }
19636       onChanged();
19637       return this;
19638     }
19639     /**
19640      *
19641      *
19642      * <pre>
19643      * A read-only record of the most recent change to the alerting policy. If
19644      * provided in a call to create or update, this field will be ignored.
19645      * </pre>
19646      *
19647      * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
19648      */
getMutationRecordBuilder()19649     public com.google.monitoring.v3.MutationRecord.Builder getMutationRecordBuilder() {
19650       bitField0_ |= 0x00000400;
19651       onChanged();
19652       return getMutationRecordFieldBuilder().getBuilder();
19653     }
19654     /**
19655      *
19656      *
19657      * <pre>
19658      * A read-only record of the most recent change to the alerting policy. If
19659      * provided in a call to create or update, this field will be ignored.
19660      * </pre>
19661      *
19662      * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
19663      */
getMutationRecordOrBuilder()19664     public com.google.monitoring.v3.MutationRecordOrBuilder getMutationRecordOrBuilder() {
19665       if (mutationRecordBuilder_ != null) {
19666         return mutationRecordBuilder_.getMessageOrBuilder();
19667       } else {
19668         return mutationRecord_ == null
19669             ? com.google.monitoring.v3.MutationRecord.getDefaultInstance()
19670             : mutationRecord_;
19671       }
19672     }
19673     /**
19674      *
19675      *
19676      * <pre>
19677      * A read-only record of the most recent change to the alerting policy. If
19678      * provided in a call to create or update, this field will be ignored.
19679      * </pre>
19680      *
19681      * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code>
19682      */
19683     private com.google.protobuf.SingleFieldBuilderV3<
19684             com.google.monitoring.v3.MutationRecord,
19685             com.google.monitoring.v3.MutationRecord.Builder,
19686             com.google.monitoring.v3.MutationRecordOrBuilder>
getMutationRecordFieldBuilder()19687         getMutationRecordFieldBuilder() {
19688       if (mutationRecordBuilder_ == null) {
19689         mutationRecordBuilder_ =
19690             new com.google.protobuf.SingleFieldBuilderV3<
19691                 com.google.monitoring.v3.MutationRecord,
19692                 com.google.monitoring.v3.MutationRecord.Builder,
19693                 com.google.monitoring.v3.MutationRecordOrBuilder>(
19694                 getMutationRecord(), getParentForChildren(), isClean());
19695         mutationRecord_ = null;
19696       }
19697       return mutationRecordBuilder_;
19698     }
19699 
19700     private com.google.monitoring.v3.AlertPolicy.AlertStrategy alertStrategy_;
19701     private com.google.protobuf.SingleFieldBuilderV3<
19702             com.google.monitoring.v3.AlertPolicy.AlertStrategy,
19703             com.google.monitoring.v3.AlertPolicy.AlertStrategy.Builder,
19704             com.google.monitoring.v3.AlertPolicy.AlertStrategyOrBuilder>
19705         alertStrategyBuilder_;
19706     /**
19707      *
19708      *
19709      * <pre>
19710      * Control over how this alert policy's notification channels are notified.
19711      * </pre>
19712      *
19713      * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
19714      *
19715      * @return Whether the alertStrategy field is set.
19716      */
hasAlertStrategy()19717     public boolean hasAlertStrategy() {
19718       return ((bitField0_ & 0x00000800) != 0);
19719     }
19720     /**
19721      *
19722      *
19723      * <pre>
19724      * Control over how this alert policy's notification channels are notified.
19725      * </pre>
19726      *
19727      * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
19728      *
19729      * @return The alertStrategy.
19730      */
getAlertStrategy()19731     public com.google.monitoring.v3.AlertPolicy.AlertStrategy getAlertStrategy() {
19732       if (alertStrategyBuilder_ == null) {
19733         return alertStrategy_ == null
19734             ? com.google.monitoring.v3.AlertPolicy.AlertStrategy.getDefaultInstance()
19735             : alertStrategy_;
19736       } else {
19737         return alertStrategyBuilder_.getMessage();
19738       }
19739     }
19740     /**
19741      *
19742      *
19743      * <pre>
19744      * Control over how this alert policy's notification channels are notified.
19745      * </pre>
19746      *
19747      * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
19748      */
setAlertStrategy(com.google.monitoring.v3.AlertPolicy.AlertStrategy value)19749     public Builder setAlertStrategy(com.google.monitoring.v3.AlertPolicy.AlertStrategy value) {
19750       if (alertStrategyBuilder_ == null) {
19751         if (value == null) {
19752           throw new NullPointerException();
19753         }
19754         alertStrategy_ = value;
19755       } else {
19756         alertStrategyBuilder_.setMessage(value);
19757       }
19758       bitField0_ |= 0x00000800;
19759       onChanged();
19760       return this;
19761     }
19762     /**
19763      *
19764      *
19765      * <pre>
19766      * Control over how this alert policy's notification channels are notified.
19767      * </pre>
19768      *
19769      * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
19770      */
setAlertStrategy( com.google.monitoring.v3.AlertPolicy.AlertStrategy.Builder builderForValue)19771     public Builder setAlertStrategy(
19772         com.google.monitoring.v3.AlertPolicy.AlertStrategy.Builder builderForValue) {
19773       if (alertStrategyBuilder_ == null) {
19774         alertStrategy_ = builderForValue.build();
19775       } else {
19776         alertStrategyBuilder_.setMessage(builderForValue.build());
19777       }
19778       bitField0_ |= 0x00000800;
19779       onChanged();
19780       return this;
19781     }
19782     /**
19783      *
19784      *
19785      * <pre>
19786      * Control over how this alert policy's notification channels are notified.
19787      * </pre>
19788      *
19789      * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
19790      */
mergeAlertStrategy(com.google.monitoring.v3.AlertPolicy.AlertStrategy value)19791     public Builder mergeAlertStrategy(com.google.monitoring.v3.AlertPolicy.AlertStrategy value) {
19792       if (alertStrategyBuilder_ == null) {
19793         if (((bitField0_ & 0x00000800) != 0)
19794             && alertStrategy_ != null
19795             && alertStrategy_
19796                 != com.google.monitoring.v3.AlertPolicy.AlertStrategy.getDefaultInstance()) {
19797           getAlertStrategyBuilder().mergeFrom(value);
19798         } else {
19799           alertStrategy_ = value;
19800         }
19801       } else {
19802         alertStrategyBuilder_.mergeFrom(value);
19803       }
19804       bitField0_ |= 0x00000800;
19805       onChanged();
19806       return this;
19807     }
19808     /**
19809      *
19810      *
19811      * <pre>
19812      * Control over how this alert policy's notification channels are notified.
19813      * </pre>
19814      *
19815      * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
19816      */
clearAlertStrategy()19817     public Builder clearAlertStrategy() {
19818       bitField0_ = (bitField0_ & ~0x00000800);
19819       alertStrategy_ = null;
19820       if (alertStrategyBuilder_ != null) {
19821         alertStrategyBuilder_.dispose();
19822         alertStrategyBuilder_ = null;
19823       }
19824       onChanged();
19825       return this;
19826     }
19827     /**
19828      *
19829      *
19830      * <pre>
19831      * Control over how this alert policy's notification channels are notified.
19832      * </pre>
19833      *
19834      * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
19835      */
getAlertStrategyBuilder()19836     public com.google.monitoring.v3.AlertPolicy.AlertStrategy.Builder getAlertStrategyBuilder() {
19837       bitField0_ |= 0x00000800;
19838       onChanged();
19839       return getAlertStrategyFieldBuilder().getBuilder();
19840     }
19841     /**
19842      *
19843      *
19844      * <pre>
19845      * Control over how this alert policy's notification channels are notified.
19846      * </pre>
19847      *
19848      * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
19849      */
getAlertStrategyOrBuilder()19850     public com.google.monitoring.v3.AlertPolicy.AlertStrategyOrBuilder getAlertStrategyOrBuilder() {
19851       if (alertStrategyBuilder_ != null) {
19852         return alertStrategyBuilder_.getMessageOrBuilder();
19853       } else {
19854         return alertStrategy_ == null
19855             ? com.google.monitoring.v3.AlertPolicy.AlertStrategy.getDefaultInstance()
19856             : alertStrategy_;
19857       }
19858     }
19859     /**
19860      *
19861      *
19862      * <pre>
19863      * Control over how this alert policy's notification channels are notified.
19864      * </pre>
19865      *
19866      * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code>
19867      */
19868     private com.google.protobuf.SingleFieldBuilderV3<
19869             com.google.monitoring.v3.AlertPolicy.AlertStrategy,
19870             com.google.monitoring.v3.AlertPolicy.AlertStrategy.Builder,
19871             com.google.monitoring.v3.AlertPolicy.AlertStrategyOrBuilder>
getAlertStrategyFieldBuilder()19872         getAlertStrategyFieldBuilder() {
19873       if (alertStrategyBuilder_ == null) {
19874         alertStrategyBuilder_ =
19875             new com.google.protobuf.SingleFieldBuilderV3<
19876                 com.google.monitoring.v3.AlertPolicy.AlertStrategy,
19877                 com.google.monitoring.v3.AlertPolicy.AlertStrategy.Builder,
19878                 com.google.monitoring.v3.AlertPolicy.AlertStrategyOrBuilder>(
19879                 getAlertStrategy(), getParentForChildren(), isClean());
19880         alertStrategy_ = null;
19881       }
19882       return alertStrategyBuilder_;
19883     }
19884 
19885     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)19886     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
19887       return super.setUnknownFields(unknownFields);
19888     }
19889 
19890     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)19891     public final Builder mergeUnknownFields(
19892         final com.google.protobuf.UnknownFieldSet unknownFields) {
19893       return super.mergeUnknownFields(unknownFields);
19894     }
19895 
19896     // @@protoc_insertion_point(builder_scope:google.monitoring.v3.AlertPolicy)
19897   }
19898 
19899   // @@protoc_insertion_point(class_scope:google.monitoring.v3.AlertPolicy)
19900   private static final com.google.monitoring.v3.AlertPolicy DEFAULT_INSTANCE;
19901 
19902   static {
19903     DEFAULT_INSTANCE = new com.google.monitoring.v3.AlertPolicy();
19904   }
19905 
getDefaultInstance()19906   public static com.google.monitoring.v3.AlertPolicy getDefaultInstance() {
19907     return DEFAULT_INSTANCE;
19908   }
19909 
19910   private static final com.google.protobuf.Parser<AlertPolicy> PARSER =
19911       new com.google.protobuf.AbstractParser<AlertPolicy>() {
19912         @java.lang.Override
19913         public AlertPolicy parsePartialFrom(
19914             com.google.protobuf.CodedInputStream input,
19915             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
19916             throws com.google.protobuf.InvalidProtocolBufferException {
19917           Builder builder = newBuilder();
19918           try {
19919             builder.mergeFrom(input, extensionRegistry);
19920           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
19921             throw e.setUnfinishedMessage(builder.buildPartial());
19922           } catch (com.google.protobuf.UninitializedMessageException e) {
19923             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
19924           } catch (java.io.IOException e) {
19925             throw new com.google.protobuf.InvalidProtocolBufferException(e)
19926                 .setUnfinishedMessage(builder.buildPartial());
19927           }
19928           return builder.buildPartial();
19929         }
19930       };
19931 
parser()19932   public static com.google.protobuf.Parser<AlertPolicy> parser() {
19933     return PARSER;
19934   }
19935 
19936   @java.lang.Override
getParserForType()19937   public com.google.protobuf.Parser<AlertPolicy> getParserForType() {
19938     return PARSER;
19939   }
19940 
19941   @java.lang.Override
getDefaultInstanceForType()19942   public com.google.monitoring.v3.AlertPolicy getDefaultInstanceForType() {
19943     return DEFAULT_INSTANCE;
19944   }
19945 }
19946