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 public interface AlertPolicyOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.monitoring.v3.AlertPolicy) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Required if the policy exists. The resource name for this policy. The 31 * format is: 32 * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] 33 * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy 34 * is created. When calling the 35 * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] 36 * method, do not include the `name` field in the alerting policy passed as 37 * part of the request. 38 * </pre> 39 * 40 * <code>string name = 1;</code> 41 * 42 * @return The name. 43 */ getName()44 java.lang.String getName(); 45 /** 46 * 47 * 48 * <pre> 49 * Required if the policy exists. The resource name for this policy. The 50 * format is: 51 * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] 52 * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy 53 * is created. When calling the 54 * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] 55 * method, do not include the `name` field in the alerting policy passed as 56 * part of the request. 57 * </pre> 58 * 59 * <code>string name = 1;</code> 60 * 61 * @return The bytes for name. 62 */ getNameBytes()63 com.google.protobuf.ByteString getNameBytes(); 64 65 /** 66 * 67 * 68 * <pre> 69 * A short name or phrase used to identify the policy in dashboards, 70 * notifications, and incidents. To avoid confusion, don't use the same 71 * display name for multiple policies in the same project. The name is 72 * limited to 512 Unicode characters. 73 * </pre> 74 * 75 * <code>string display_name = 2;</code> 76 * 77 * @return The displayName. 78 */ getDisplayName()79 java.lang.String getDisplayName(); 80 /** 81 * 82 * 83 * <pre> 84 * A short name or phrase used to identify the policy in dashboards, 85 * notifications, and incidents. To avoid confusion, don't use the same 86 * display name for multiple policies in the same project. The name is 87 * limited to 512 Unicode characters. 88 * </pre> 89 * 90 * <code>string display_name = 2;</code> 91 * 92 * @return The bytes for displayName. 93 */ getDisplayNameBytes()94 com.google.protobuf.ByteString getDisplayNameBytes(); 95 96 /** 97 * 98 * 99 * <pre> 100 * Documentation that is included with notifications and incidents related to 101 * this policy. Best practice is for the documentation to include information 102 * to help responders understand, mitigate, escalate, and correct the 103 * underlying problems detected by the alerting policy. Notification channels 104 * that have limited capacity might not show this documentation. 105 * </pre> 106 * 107 * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code> 108 * 109 * @return Whether the documentation field is set. 110 */ hasDocumentation()111 boolean hasDocumentation(); 112 /** 113 * 114 * 115 * <pre> 116 * Documentation that is included with notifications and incidents related to 117 * this policy. Best practice is for the documentation to include information 118 * to help responders understand, mitigate, escalate, and correct the 119 * underlying problems detected by the alerting policy. Notification channels 120 * that have limited capacity might not show this documentation. 121 * </pre> 122 * 123 * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code> 124 * 125 * @return The documentation. 126 */ getDocumentation()127 com.google.monitoring.v3.AlertPolicy.Documentation getDocumentation(); 128 /** 129 * 130 * 131 * <pre> 132 * Documentation that is included with notifications and incidents related to 133 * this policy. Best practice is for the documentation to include information 134 * to help responders understand, mitigate, escalate, and correct the 135 * underlying problems detected by the alerting policy. Notification channels 136 * that have limited capacity might not show this documentation. 137 * </pre> 138 * 139 * <code>.google.monitoring.v3.AlertPolicy.Documentation documentation = 13;</code> 140 */ getDocumentationOrBuilder()141 com.google.monitoring.v3.AlertPolicy.DocumentationOrBuilder getDocumentationOrBuilder(); 142 143 /** 144 * 145 * 146 * <pre> 147 * User-supplied key/value data to be used for organizing and 148 * identifying the `AlertPolicy` objects. 149 * The field can contain up to 64 entries. Each key and value is limited to 150 * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and 151 * values can contain only lowercase letters, numerals, underscores, and 152 * dashes. Keys must begin with a letter. 153 * </pre> 154 * 155 * <code>map<string, string> user_labels = 16;</code> 156 */ getUserLabelsCount()157 int getUserLabelsCount(); 158 /** 159 * 160 * 161 * <pre> 162 * User-supplied key/value data to be used for organizing and 163 * identifying the `AlertPolicy` objects. 164 * The field can contain up to 64 entries. Each key and value is limited to 165 * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and 166 * values can contain only lowercase letters, numerals, underscores, and 167 * dashes. Keys must begin with a letter. 168 * </pre> 169 * 170 * <code>map<string, string> user_labels = 16;</code> 171 */ containsUserLabels(java.lang.String key)172 boolean containsUserLabels(java.lang.String key); 173 /** Use {@link #getUserLabelsMap()} instead. */ 174 @java.lang.Deprecated getUserLabels()175 java.util.Map<java.lang.String, java.lang.String> getUserLabels(); 176 /** 177 * 178 * 179 * <pre> 180 * User-supplied key/value data to be used for organizing and 181 * identifying the `AlertPolicy` objects. 182 * The field can contain up to 64 entries. Each key and value is limited to 183 * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and 184 * values can contain only lowercase letters, numerals, underscores, and 185 * dashes. Keys must begin with a letter. 186 * </pre> 187 * 188 * <code>map<string, string> user_labels = 16;</code> 189 */ getUserLabelsMap()190 java.util.Map<java.lang.String, java.lang.String> getUserLabelsMap(); 191 /** 192 * 193 * 194 * <pre> 195 * User-supplied key/value data to be used for organizing and 196 * identifying the `AlertPolicy` objects. 197 * The field can contain up to 64 entries. Each key and value is limited to 198 * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and 199 * values can contain only lowercase letters, numerals, underscores, and 200 * dashes. Keys must begin with a letter. 201 * </pre> 202 * 203 * <code>map<string, string> user_labels = 16;</code> 204 */ 205 /* nullable */ getUserLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)206 java.lang.String getUserLabelsOrDefault( 207 java.lang.String key, 208 /* nullable */ 209 java.lang.String defaultValue); 210 /** 211 * 212 * 213 * <pre> 214 * User-supplied key/value data to be used for organizing and 215 * identifying the `AlertPolicy` objects. 216 * The field can contain up to 64 entries. Each key and value is limited to 217 * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and 218 * values can contain only lowercase letters, numerals, underscores, and 219 * dashes. Keys must begin with a letter. 220 * </pre> 221 * 222 * <code>map<string, string> user_labels = 16;</code> 223 */ getUserLabelsOrThrow(java.lang.String key)224 java.lang.String getUserLabelsOrThrow(java.lang.String key); 225 226 /** 227 * 228 * 229 * <pre> 230 * A list of conditions for the policy. The conditions are combined by AND or 231 * OR according to the `combiner` field. If the combined conditions evaluate 232 * to true, then an incident is created. A policy can have from one to six 233 * conditions. 234 * If `condition_time_series_query_language` is present, it must be the only 235 * `condition`. 236 * </pre> 237 * 238 * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code> 239 */ getConditionsList()240 java.util.List<com.google.monitoring.v3.AlertPolicy.Condition> getConditionsList(); 241 /** 242 * 243 * 244 * <pre> 245 * A list of conditions for the policy. The conditions are combined by AND or 246 * OR according to the `combiner` field. If the combined conditions evaluate 247 * to true, then an incident is created. A policy can have from one to six 248 * conditions. 249 * If `condition_time_series_query_language` is present, it must be the only 250 * `condition`. 251 * </pre> 252 * 253 * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code> 254 */ getConditions(int index)255 com.google.monitoring.v3.AlertPolicy.Condition getConditions(int index); 256 /** 257 * 258 * 259 * <pre> 260 * A list of conditions for the policy. The conditions are combined by AND or 261 * OR according to the `combiner` field. If the combined conditions evaluate 262 * to true, then an incident is created. A policy can have from one to six 263 * conditions. 264 * If `condition_time_series_query_language` is present, it must be the only 265 * `condition`. 266 * </pre> 267 * 268 * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code> 269 */ getConditionsCount()270 int getConditionsCount(); 271 /** 272 * 273 * 274 * <pre> 275 * A list of conditions for the policy. The conditions are combined by AND or 276 * OR according to the `combiner` field. If the combined conditions evaluate 277 * to true, then an incident is created. A policy can have from one to six 278 * conditions. 279 * If `condition_time_series_query_language` is present, it must be the only 280 * `condition`. 281 * </pre> 282 * 283 * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code> 284 */ 285 java.util.List<? extends com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder> getConditionsOrBuilderList()286 getConditionsOrBuilderList(); 287 /** 288 * 289 * 290 * <pre> 291 * A list of conditions for the policy. The conditions are combined by AND or 292 * OR according to the `combiner` field. If the combined conditions evaluate 293 * to true, then an incident is created. A policy can have from one to six 294 * conditions. 295 * If `condition_time_series_query_language` is present, it must be the only 296 * `condition`. 297 * </pre> 298 * 299 * <code>repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12;</code> 300 */ getConditionsOrBuilder(int index)301 com.google.monitoring.v3.AlertPolicy.ConditionOrBuilder getConditionsOrBuilder(int index); 302 303 /** 304 * 305 * 306 * <pre> 307 * How to combine the results of multiple conditions to determine if an 308 * incident should be opened. 309 * If `condition_time_series_query_language` is present, this must be 310 * `COMBINE_UNSPECIFIED`. 311 * </pre> 312 * 313 * <code>.google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6;</code> 314 * 315 * @return The enum numeric value on the wire for combiner. 316 */ getCombinerValue()317 int getCombinerValue(); 318 /** 319 * 320 * 321 * <pre> 322 * How to combine the results of multiple conditions to determine if an 323 * incident should be opened. 324 * If `condition_time_series_query_language` is present, this must be 325 * `COMBINE_UNSPECIFIED`. 326 * </pre> 327 * 328 * <code>.google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6;</code> 329 * 330 * @return The combiner. 331 */ getCombiner()332 com.google.monitoring.v3.AlertPolicy.ConditionCombinerType getCombiner(); 333 334 /** 335 * 336 * 337 * <pre> 338 * Whether or not the policy is enabled. On write, the default interpretation 339 * if unset is that the policy is enabled. On read, clients should not make 340 * any assumption about the state if it has not been populated. The 341 * field should always be populated on List and Get operations, unless 342 * a field projection has been specified that strips it out. 343 * </pre> 344 * 345 * <code>.google.protobuf.BoolValue enabled = 17;</code> 346 * 347 * @return Whether the enabled field is set. 348 */ hasEnabled()349 boolean hasEnabled(); 350 /** 351 * 352 * 353 * <pre> 354 * Whether or not the policy is enabled. On write, the default interpretation 355 * if unset is that the policy is enabled. On read, clients should not make 356 * any assumption about the state if it has not been populated. The 357 * field should always be populated on List and Get operations, unless 358 * a field projection has been specified that strips it out. 359 * </pre> 360 * 361 * <code>.google.protobuf.BoolValue enabled = 17;</code> 362 * 363 * @return The enabled. 364 */ getEnabled()365 com.google.protobuf.BoolValue getEnabled(); 366 /** 367 * 368 * 369 * <pre> 370 * Whether or not the policy is enabled. On write, the default interpretation 371 * if unset is that the policy is enabled. On read, clients should not make 372 * any assumption about the state if it has not been populated. The 373 * field should always be populated on List and Get operations, unless 374 * a field projection has been specified that strips it out. 375 * </pre> 376 * 377 * <code>.google.protobuf.BoolValue enabled = 17;</code> 378 */ getEnabledOrBuilder()379 com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder(); 380 381 /** 382 * 383 * 384 * <pre> 385 * Read-only description of how the alert policy is invalid. OK if the alert 386 * policy is valid. If not OK, the alert policy will not generate incidents. 387 * </pre> 388 * 389 * <code>.google.rpc.Status validity = 18;</code> 390 * 391 * @return Whether the validity field is set. 392 */ hasValidity()393 boolean hasValidity(); 394 /** 395 * 396 * 397 * <pre> 398 * Read-only description of how the alert policy is invalid. OK if the alert 399 * policy is valid. If not OK, the alert policy will not generate incidents. 400 * </pre> 401 * 402 * <code>.google.rpc.Status validity = 18;</code> 403 * 404 * @return The validity. 405 */ getValidity()406 com.google.rpc.Status getValidity(); 407 /** 408 * 409 * 410 * <pre> 411 * Read-only description of how the alert policy is invalid. OK if the alert 412 * policy is valid. If not OK, the alert policy will not generate incidents. 413 * </pre> 414 * 415 * <code>.google.rpc.Status validity = 18;</code> 416 */ getValidityOrBuilder()417 com.google.rpc.StatusOrBuilder getValidityOrBuilder(); 418 419 /** 420 * 421 * 422 * <pre> 423 * Identifies the notification channels to which notifications should be sent 424 * when incidents are opened or closed or when new violations occur on 425 * an already opened incident. Each element of this array corresponds to 426 * the `name` field in each of the 427 * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] 428 * objects that are returned from the [`ListNotificationChannels`] 429 * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] 430 * method. The format of the entries in this field is: 431 * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] 432 * </pre> 433 * 434 * <code>repeated string notification_channels = 14;</code> 435 * 436 * @return A list containing the notificationChannels. 437 */ getNotificationChannelsList()438 java.util.List<java.lang.String> getNotificationChannelsList(); 439 /** 440 * 441 * 442 * <pre> 443 * Identifies the notification channels to which notifications should be sent 444 * when incidents are opened or closed or when new violations occur on 445 * an already opened incident. Each element of this array corresponds to 446 * the `name` field in each of the 447 * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] 448 * objects that are returned from the [`ListNotificationChannels`] 449 * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] 450 * method. The format of the entries in this field is: 451 * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] 452 * </pre> 453 * 454 * <code>repeated string notification_channels = 14;</code> 455 * 456 * @return The count of notificationChannels. 457 */ getNotificationChannelsCount()458 int getNotificationChannelsCount(); 459 /** 460 * 461 * 462 * <pre> 463 * Identifies the notification channels to which notifications should be sent 464 * when incidents are opened or closed or when new violations occur on 465 * an already opened incident. Each element of this array corresponds to 466 * the `name` field in each of the 467 * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] 468 * objects that are returned from the [`ListNotificationChannels`] 469 * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] 470 * method. The format of the entries in this field is: 471 * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] 472 * </pre> 473 * 474 * <code>repeated string notification_channels = 14;</code> 475 * 476 * @param index The index of the element to return. 477 * @return The notificationChannels at the given index. 478 */ getNotificationChannels(int index)479 java.lang.String getNotificationChannels(int index); 480 /** 481 * 482 * 483 * <pre> 484 * Identifies the notification channels to which notifications should be sent 485 * when incidents are opened or closed or when new violations occur on 486 * an already opened incident. Each element of this array corresponds to 487 * the `name` field in each of the 488 * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] 489 * objects that are returned from the [`ListNotificationChannels`] 490 * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] 491 * method. The format of the entries in this field is: 492 * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] 493 * </pre> 494 * 495 * <code>repeated string notification_channels = 14;</code> 496 * 497 * @param index The index of the value to return. 498 * @return The bytes of the notificationChannels at the given index. 499 */ getNotificationChannelsBytes(int index)500 com.google.protobuf.ByteString getNotificationChannelsBytes(int index); 501 502 /** 503 * 504 * 505 * <pre> 506 * A read-only record of the creation of the alerting policy. If provided 507 * in a call to create or update, this field will be ignored. 508 * </pre> 509 * 510 * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code> 511 * 512 * @return Whether the creationRecord field is set. 513 */ hasCreationRecord()514 boolean hasCreationRecord(); 515 /** 516 * 517 * 518 * <pre> 519 * A read-only record of the creation of the alerting policy. If provided 520 * in a call to create or update, this field will be ignored. 521 * </pre> 522 * 523 * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code> 524 * 525 * @return The creationRecord. 526 */ getCreationRecord()527 com.google.monitoring.v3.MutationRecord getCreationRecord(); 528 /** 529 * 530 * 531 * <pre> 532 * A read-only record of the creation of the alerting policy. If provided 533 * in a call to create or update, this field will be ignored. 534 * </pre> 535 * 536 * <code>.google.monitoring.v3.MutationRecord creation_record = 10;</code> 537 */ getCreationRecordOrBuilder()538 com.google.monitoring.v3.MutationRecordOrBuilder getCreationRecordOrBuilder(); 539 540 /** 541 * 542 * 543 * <pre> 544 * A read-only record of the most recent change to the alerting policy. If 545 * provided in a call to create or update, this field will be ignored. 546 * </pre> 547 * 548 * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code> 549 * 550 * @return Whether the mutationRecord field is set. 551 */ hasMutationRecord()552 boolean hasMutationRecord(); 553 /** 554 * 555 * 556 * <pre> 557 * A read-only record of the most recent change to the alerting policy. If 558 * provided in a call to create or update, this field will be ignored. 559 * </pre> 560 * 561 * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code> 562 * 563 * @return The mutationRecord. 564 */ getMutationRecord()565 com.google.monitoring.v3.MutationRecord getMutationRecord(); 566 /** 567 * 568 * 569 * <pre> 570 * A read-only record of the most recent change to the alerting policy. If 571 * provided in a call to create or update, this field will be ignored. 572 * </pre> 573 * 574 * <code>.google.monitoring.v3.MutationRecord mutation_record = 11;</code> 575 */ getMutationRecordOrBuilder()576 com.google.monitoring.v3.MutationRecordOrBuilder getMutationRecordOrBuilder(); 577 578 /** 579 * 580 * 581 * <pre> 582 * Control over how this alert policy's notification channels are notified. 583 * </pre> 584 * 585 * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code> 586 * 587 * @return Whether the alertStrategy field is set. 588 */ hasAlertStrategy()589 boolean hasAlertStrategy(); 590 /** 591 * 592 * 593 * <pre> 594 * Control over how this alert policy's notification channels are notified. 595 * </pre> 596 * 597 * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code> 598 * 599 * @return The alertStrategy. 600 */ getAlertStrategy()601 com.google.monitoring.v3.AlertPolicy.AlertStrategy getAlertStrategy(); 602 /** 603 * 604 * 605 * <pre> 606 * Control over how this alert policy's notification channels are notified. 607 * </pre> 608 * 609 * <code>.google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21;</code> 610 */ getAlertStrategyOrBuilder()611 com.google.monitoring.v3.AlertPolicy.AlertStrategyOrBuilder getAlertStrategyOrBuilder(); 612 } 613