📂 File Browser

/AgentAI/vendor/google/apiclient-services/src/Monitoring
🌙 Dark Mode
🎯 Quick Launch:

📁 Directories

📁 Resource/ 🔓 Open

📄 Files

🐘 Aggregation.php
▶ Open 📄 View Source
🐘 Alert.php
▶ Open 📄 View Source
🐘 AlertPolicy.php
▶ Open 📄 View Source
🐘 AlertStrategy.php
▶ Open 📄 View Source
🐘 AppEngine.php
▶ Open 📄 View Source
🐘 AvailabilityCriteria.php
▶ Open 📄 View Source
🐘 BasicAuthentication.php
▶ Open 📄 View Source
🐘 BasicService.php
▶ Open 📄 View Source
🐘 BasicSli.php
▶ Open 📄 View Source
🐘 BooleanTest.php
▶ Open 📄 View Source
🐘 BucketOptions.php
▶ Open 📄 View Source
🐘 CloudEndpoints.php
▶ Open 📄 View Source
🐘 CloudFunctionV2Target.php
▶ Open 📄 View Source
🐘 CloudRun.php
▶ Open 📄 View Source
🐘 ClusterIstio.php
▶ Open 📄 View Source
🐘 CollectdPayload.php
▶ Open 📄 View Source
🐘 CollectdPayloadError.php
▶ Open 📄 View Source
🐘 CollectdValue.php
▶ Open 📄 View Source
🐘 CollectdValueError.php
▶ Open 📄 View Source
🐘 Condition.php
▶ Open 📄 View Source
🐘 ContentMatcher.php
▶ Open 📄 View Source
🐘 CreateCollectdTimeSeriesRequest.php
▶ Open 📄 View Source
🐘 CreateCollectdTimeSeriesResponse.php
▶ Open 📄 View Source
🐘 CreateTimeSeriesRequest.php
▶ Open 📄 View Source
🐘 CreateTimeSeriesSummary.php
▶ Open 📄 View Source
🐘 Criteria.php
▶ Open 📄 View Source
🐘 Custom.php
▶ Open 📄 View Source
🐘 Daily.php
▶ Open 📄 View Source
🐘 Distribution.php
▶ Open 📄 View Source
🐘 DistributionCut.php
▶ Open 📄 View Source
🐘 Documentation.php
▶ Open 📄 View Source
🐘 DroppedLabels.php
▶ Open 📄 View Source
🐘 Error.php
▶ Open 📄 View Source
🐘 Exemplar.php
▶ Open 📄 View Source
🐘 Explicit.php
▶ Open 📄 View Source
🐘 Exponential.php
▶ Open 📄 View Source
🐘 Field.php
▶ Open 📄 View Source
🐘 ForecastOptions.php
▶ Open 📄 View Source
🐘 GetNotificationChannelVerificationCodeRequest.php
▶ Open 📄 View Source
🐘 GetNotificationChannelVerificationCodeResponse.php
▶ Open 📄 View Source
🐘 GkeNamespace.php
▶ Open 📄 View Source
🐘 GkeService.php
▶ Open 📄 View Source
🐘 GkeWorkload.php
▶ Open 📄 View Source
🐘 GoogleMonitoringV3Range.php
▶ Open 📄 View Source
🐘 Group.php
▶ Open 📄 View Source
🐘 Hourly.php
▶ Open 📄 View Source
🐘 HttpCheck.php
▶ Open 📄 View Source
🐘 InternalChecker.php
▶ Open 📄 View Source
🐘 IstioCanonicalService.php
▶ Open 📄 View Source
🐘 JsonPathMatcher.php
▶ Open 📄 View Source
🐘 LabelDescriptor.php
▶ Open 📄 View Source
🐘 LabelValue.php
▶ Open 📄 View Source
🐘 LatencyCriteria.php
▶ Open 📄 View Source
🐘 Linear.php
▶ Open 📄 View Source
🐘 Link.php
▶ Open 📄 View Source
🐘 ListAlertPoliciesResponse.php
▶ Open 📄 View Source
🐘 ListAlertsResponse.php
▶ Open 📄 View Source
🐘 ListGroupMembersResponse.php
▶ Open 📄 View Source
🐘 ListGroupsResponse.php
▶ Open 📄 View Source
🐘 ListMetricDescriptorsResponse.php
▶ Open 📄 View Source
🐘 ListMonitoredResourceDescriptorsResponse.php
▶ Open 📄 View Source
🐘 ListNotificationChannelDescriptorsResponse.php
▶ Open 📄 View Source
🐘 ListNotificationChannelsResponse.php
▶ Open 📄 View Source
🐘 ListServiceLevelObjectivesResponse.php
▶ Open 📄 View Source
🐘 ListServicesResponse.php
▶ Open 📄 View Source
🐘 ListSnoozesResponse.php
▶ Open 📄 View Source
🐘 ListTimeSeriesResponse.php
▶ Open 📄 View Source
🐘 ListUptimeCheckConfigsResponse.php
▶ Open 📄 View Source
🐘 ListUptimeCheckIpsResponse.php
▶ Open 📄 View Source
🐘 LogMatch.php
▶ Open 📄 View Source
🐘 LogMetadata.php
▶ Open 📄 View Source
🐘 MeshIstio.php
▶ Open 📄 View Source
🐘 Metric.php
▶ Open 📄 View Source
🐘 MetricAbsence.php
▶ Open 📄 View Source
🐘 MetricDescriptor.php
▶ Open 📄 View Source
🐘 MetricDescriptorMetadata.php
▶ Open 📄 View Source
🐘 MetricRange.php
▶ Open 📄 View Source
🐘 MetricThreshold.php
▶ Open 📄 View Source
🐘 Minutes.php
▶ Open 📄 View Source
🐘 MonitoredResource.php
▶ Open 📄 View Source
🐘 MonitoredResourceDescriptor.php
▶ Open 📄 View Source
🐘 MonitoredResourceMetadata.php
▶ Open 📄 View Source
🐘 MonitoringEmpty.php
▶ Open 📄 View Source
🐘 MonitoringQueryLanguageCondition.php
▶ Open 📄 View Source
🐘 MutationRecord.php
▶ Open 📄 View Source
🐘 NotificationChannel.php
▶ Open 📄 View Source
🐘 NotificationChannelDescriptor.php
▶ Open 📄 View Source
🐘 NotificationChannelStrategy.php
▶ Open 📄 View Source
🐘 NotificationRateLimit.php
▶ Open 📄 View Source
🐘 OperationMetadata.php
▶ Open 📄 View Source
🐘 Option.php
▶ Open 📄 View Source
🐘 PerformanceThreshold.php
▶ Open 📄 View Source
🐘 PingConfig.php
▶ Open 📄 View Source
🐘 Point.php
▶ Open 📄 View Source
🐘 PointData.php
▶ Open 📄 View Source
🐘 PolicySnapshot.php
▶ Open 📄 View Source
🐘 PrometheusQueryLanguageCondition.php
▶ Open 📄 View Source
🐘 QueryTimeSeriesRequest.php
▶ Open 📄 View Source
🐘 QueryTimeSeriesResponse.php
▶ Open 📄 View Source
🐘 Range.php
▶ Open 📄 View Source
🐘 RequestBasedSli.php
▶ Open 📄 View Source
🐘 ResourceGroup.php
▶ Open 📄 View Source
🐘 ResponseStatusCode.php
▶ Open 📄 View Source
🐘 RowCountTest.php
▶ Open 📄 View Source
🐘 SendNotificationChannelVerificationCodeRequest.php
▶ Open 📄 View Source
🐘 Service.php
▶ Open 📄 View Source
🐘 ServiceAgentAuthentication.php
▶ Open 📄 View Source
🐘 ServiceLevelIndicator.php
▶ Open 📄 View Source
🐘 ServiceLevelObjective.php
▶ Open 📄 View Source
🐘 Snooze.php
▶ Open 📄 View Source
🐘 SourceContext.php
▶ Open 📄 View Source
🐘 SpanContext.php
▶ Open 📄 View Source
🐘 SqlCondition.php
▶ Open 📄 View Source
🐘 Status.php
▶ Open 📄 View Source
🐘 SyntheticMonitorTarget.php
▶ Open 📄 View Source
🐘 TcpCheck.php
▶ Open 📄 View Source
🐘 Telemetry.php
▶ Open 📄 View Source
🐘 TimeInterval.php
▶ Open 📄 View Source
🐘 TimeOfDay.php
▶ Open 📄 View Source
🐘 TimeSeries.php
▶ Open 📄 View Source
🐘 TimeSeriesData.php
▶ Open 📄 View Source
🐘 TimeSeriesDescriptor.php
▶ Open 📄 View Source
🐘 TimeSeriesRatio.php
▶ Open 📄 View Source
🐘 Trigger.php
▶ Open 📄 View Source
🐘 Type.php
▶ Open 📄 View Source
🐘 TypedValue.php
▶ Open 📄 View Source
🐘 UptimeCheckConfig.php
▶ Open 📄 View Source
🐘 UptimeCheckIp.php
▶ Open 📄 View Source
🐘 ValueDescriptor.php
▶ Open 📄 View Source
🐘 VerifyNotificationChannelRequest.php
▶ Open 📄 View Source
🐘 WindowsBasedSli.php
▶ Open 📄 View Source

📄 Source: AlertPolicy.php

<?php
/*
 * Copyright 2014 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

namespace Google\Service\Monitoring;

class AlertPolicy extends \Google\Collection
{
  /**
   * An unspecified combiner.
   */
  public const COMBINER_COMBINE_UNSPECIFIED = 'COMBINE_UNSPECIFIED';
  /**
   * Combine conditions using the logical AND operator. An incident is created
   * only if all the conditions are met simultaneously. This combiner is
   * satisfied if all conditions are met, even if they are met on completely
   * different resources.
   */
  public const COMBINER_AND = 'AND';
  /**
   * Combine conditions using the logical OR operator. An incident is created if
   * any of the listed conditions is met.
   */
  public const COMBINER_OR = 'OR';
  /**
   * Combine conditions using logical AND operator, but unlike the regular AND
   * option, an incident is created only if all conditions are met
   * simultaneously on at least one resource.
   */
  public const COMBINER_AND_WITH_MATCHING_RESOURCE = 'AND_WITH_MATCHING_RESOURCE';
  /**
   * No severity is specified. This is the default value.
   */
  public const SEVERITY_SEVERITY_UNSPECIFIED = 'SEVERITY_UNSPECIFIED';
  /**
   * This is the highest severity level. Use this if the problem could cause
   * significant damage or downtime.
   */
  public const SEVERITY_CRITICAL = 'CRITICAL';
  /**
   * This is the medium severity level. Use this if the problem could cause
   * minor damage or downtime.
   */
  public const SEVERITY_ERROR = 'ERROR';
  /**
   * This is the lowest severity level. Use this if the problem is not causing
   * any damage or downtime, but could potentially lead to a problem in the
   * future.
   */
  public const SEVERITY_WARNING = 'WARNING';
  protected $collection_key = 'notificationChannels';
  protected $alertStrategyType = AlertStrategy::class;
  protected $alertStrategyDataType = '';
  /**
   * How to combine the results of multiple conditions to determine if an
   * incident should be opened. If condition_time_series_query_language is
   * present, this must be COMBINE_UNSPECIFIED.
   *
   * @var string
   */
  public $combiner;
  protected $conditionsType = Condition::class;
  protected $conditionsDataType = 'array';
  protected $creationRecordType = MutationRecord::class;
  protected $creationRecordDataType = '';
  /**
   * A short name or phrase used to identify the policy in dashboards,
   * notifications, and incidents. To avoid confusion, don't use the same
   * display name for multiple policies in the same project. The name is limited
   * to 512 Unicode characters.The convention for the display_name of a
   * PrometheusQueryLanguageCondition is "{rule group name}/{alert name}", where
   * the {rule group name} and {alert name} should be taken from the
   * corresponding Prometheus configuration file. This convention is not
   * enforced. In any case the display_name is not a unique key of the
   * AlertPolicy.
   *
   * @var string
   */
  public $displayName;
  protected $documentationType = Documentation::class;
  protected $documentationDataType = '';
  /**
   * Whether or not the policy is enabled. On write, the default interpretation
   * if unset is that the policy is enabled. On read, clients should not make
   * any assumption about the state if it has not been populated. The field
   * should always be populated on List and Get operations, unless a field
   * projection has been specified that strips it out.
   *
   * @var bool
   */
  public $enabled;
  protected $mutationRecordType = MutationRecord::class;
  protected $mutationRecordDataType = '';
  /**
   * Identifier. Required if the policy exists. The resource name for this
   * policy. The format is:
   * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
   * [ALERT_POLICY_ID] is assigned by Cloud Monitoring when the policy is
   * created. When calling the alertPolicies.create method, do not include the
   * name field in the alerting policy passed as part of the request.
   *
   * @var string
   */
  public $name;
  /**
   * Identifies the notification channels to which notifications should be sent
   * when incidents are opened or closed or when new violations occur on an
   * already opened incident. Each element of this array corresponds to the name
   * field in each of the NotificationChannel objects that are returned from the
   * ListNotificationChannels method. The format of the entries in this field
   * is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
   *
   * @var string[]
   */
  public $notificationChannels;
  /**
   * Optional. The severity of an alerting policy indicates how important
   * incidents generated by that policy are. The severity level will be
   * displayed on the Incident detail page and in notifications.
   *
   * @var string
   */
  public $severity;
  /**
   * User-supplied key/value data to be used for organizing and identifying the
   * AlertPolicy objects.The field can contain up to 64 entries. Each key and
   * value is limited to 63 Unicode characters or 128 bytes, whichever is
   * smaller. Labels and values can contain only lowercase letters, numerals,
   * underscores, and dashes. Keys must begin with a letter.Note that Prometheus
   * {alert name} is a valid Prometheus label names
   * (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels),
   * whereas Prometheus {rule group} is an unrestricted UTF-8 string. This means
   * that they cannot be stored as-is in user labels, because they may contain
   * characters that are not allowed in user-label values.
   *
   * @var string[]
   */
  public $userLabels;
  protected $validityType = Status::class;
  protected $validityDataType = '';

  /**
   * Control over how this alerting policy's notification channels are notified.
   *
   * @param AlertStrategy $alertStrategy
   */
  public function setAlertStrategy(AlertStrategy $alertStrategy)
  {
    $this->alertStrategy = $alertStrategy;
  }
  /**
   * @return AlertStrategy
   */
  public function getAlertStrategy()
  {
    return $this->alertStrategy;
  }
  /**
   * How to combine the results of multiple conditions to determine if an
   * incident should be opened. If condition_time_series_query_language is
   * present, this must be COMBINE_UNSPECIFIED.
   *
   * Accepted values: COMBINE_UNSPECIFIED, AND, OR, AND_WITH_MATCHING_RESOURCE
   *
   * @param self::COMBINER_* $combiner
   */
  public function setCombiner($combiner)
  {
    $this->combiner = $combiner;
  }
  /**
   * @return self::COMBINER_*
   */
  public function getCombiner()
  {
    return $this->combiner;
  }
  /**
   * A list of conditions for the policy. The conditions are combined by AND or
   * OR according to the combiner field. If the combined conditions evaluate to
   * true, then an incident is created. A policy can have from one to six
   * conditions. If condition_time_series_query_language is present, it must be
   * the only condition. If condition_monitoring_query_language is present, it
   * must be the only condition.
   *
   * @param Condition[] $conditions
   */
  public function setConditions($conditions)
  {
    $this->conditions = $conditions;
  }
  /**
   * @return Condition[]
   */
  public function getConditions()
  {
    return $this->conditions;
  }
  /**
   * A read-only record of the creation of the alerting policy. If provided in a
   * call to create or update, this field will be ignored.
   *
   * @param MutationRecord $creationRecord
   */
  public function setCreationRecord(MutationRecord $creationRecord)
  {
    $this->creationRecord = $creationRecord;
  }
  /**
   * @return MutationRecord
   */
  public function getCreationRecord()
  {
    return $this->creationRecord;
  }
  /**
   * A short name or phrase used to identify the policy in dashboards,
   * notifications, and incidents. To avoid confusion, don't use the same
   * display name for multiple policies in the same project. The name is limited
   * to 512 Unicode characters.The convention for the display_name of a
   * PrometheusQueryLanguageCondition is "{rule group name}/{alert name}", where
   * the {rule group name} and {alert name} should be taken from the
   * corresponding Prometheus configuration file. This convention is not
   * enforced. In any case the display_name is not a unique key of the
   * AlertPolicy.
   *
   * @param string $displayName
   */
  public function setDisplayName($displayName)
  {
    $this->displayName = $displayName;
  }
  /**
   * @return string
   */
  public function getDisplayName()
  {
    return $this->displayName;
  }
  /**
   * Documentation that is included with notifications and incidents related to
   * this policy. Best practice is for the documentation to include information
   * to help responders understand, mitigate, escalate, and correct the
   * underlying problems detected by the alerting policy. Notification channels
   * that have limited capacity might not show this documentation.
   *
   * @param Documentation $documentation
   */
  public function setDocumentation(Documentation $documentation)
  {
    $this->documentation = $documentation;
  }
  /**
   * @return Documentation
   */
  public function getDocumentation()
  {
    return $this->documentation;
  }
  /**
   * Whether or not the policy is enabled. On write, the default interpretation
   * if unset is that the policy is enabled. On read, clients should not make
   * any assumption about the state if it has not been populated. The field
   * should always be populated on List and Get operations, unless a field
   * projection has been specified that strips it out.
   *
   * @param bool $enabled
   */
  public function setEnabled($enabled)
  {
    $this->enabled = $enabled;
  }
  /**
   * @return bool
   */
  public function getEnabled()
  {
    return $this->enabled;
  }
  /**
   * A read-only record of the most recent change to the alerting policy. If
   * provided in a call to create or update, this field will be ignored.
   *
   * @param MutationRecord $mutationRecord
   */
  public function setMutationRecord(MutationRecord $mutationRecord)
  {
    $this->mutationRecord = $mutationRecord;
  }
  /**
   * @return MutationRecord
   */
  public function getMutationRecord()
  {
    return $this->mutationRecord;
  }
  /**
   * Identifier. Required if the policy exists. The resource name for this
   * policy. The format is:
   * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
   * [ALERT_POLICY_ID] is assigned by Cloud Monitoring when the policy is
   * created. When calling the alertPolicies.create method, do not include the
   * name field in the alerting policy passed as part of the request.
   *
   * @param string $name
   */
  public function setName($name)
  {
    $this->name = $name;
  }
  /**
   * @return string
   */
  public function getName()
  {
    return $this->name;
  }
  /**
   * Identifies the notification channels to which notifications should be sent
   * when incidents are opened or closed or when new violations occur on an
   * already opened incident. Each element of this array corresponds to the name
   * field in each of the NotificationChannel objects that are returned from the
   * ListNotificationChannels method. The format of the entries in this field
   * is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
   *
   * @param string[] $notificationChannels
   */
  public function setNotificationChannels($notificationChannels)
  {
    $this->notificationChannels = $notificationChannels;
  }
  /**
   * @return string[]
   */
  public function getNotificationChannels()
  {
    return $this->notificationChannels;
  }
  /**
   * Optional. The severity of an alerting policy indicates how important
   * incidents generated by that policy are. The severity level will be
   * displayed on the Incident detail page and in notifications.
   *
   * Accepted values: SEVERITY_UNSPECIFIED, CRITICAL, ERROR, WARNING
   *
   * @param self::SEVERITY_* $severity
   */
  public function setSeverity($severity)
  {
    $this->severity = $severity;
  }
  /**
   * @return self::SEVERITY_*
   */
  public function getSeverity()
  {
    return $this->severity;
  }
  /**
   * User-supplied key/value data to be used for organizing and identifying the
   * AlertPolicy objects.The field can contain up to 64 entries. Each key and
   * value is limited to 63 Unicode characters or 128 bytes, whichever is
   * smaller. Labels and values can contain only lowercase letters, numerals,
   * underscores, and dashes. Keys must begin with a letter.Note that Prometheus
   * {alert name} is a valid Prometheus label names
   * (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels),
   * whereas Prometheus {rule group} is an unrestricted UTF-8 string. This means
   * that they cannot be stored as-is in user labels, because they may contain
   * characters that are not allowed in user-label values.
   *
   * @param string[] $userLabels
   */
  public function setUserLabels($userLabels)
  {
    $this->userLabels = $userLabels;
  }
  /**
   * @return string[]
   */
  public function getUserLabels()
  {
    return $this->userLabels;
  }
  /**
   * Read-only description of how the alerting policy is invalid. This field is
   * only set when the alerting policy is invalid. An invalid alerting policy
   * will not generate incidents.
   *
   * @param Status $validity
   */
  public function setValidity(Status $validity)
  {
    $this->validity = $validity;
  }
  /**
   * @return Status
   */
  public function getValidity()
  {
    return $this->validity;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AlertPolicy::class, 'Google_Service_Monitoring_AlertPolicy');
← Back