📂 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: MetricThreshold.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 MetricThreshold extends \Google\Collection
{
  /**
   * No ordering relationship is specified.
   */
  public const COMPARISON_COMPARISON_UNSPECIFIED = 'COMPARISON_UNSPECIFIED';
  /**
   * True if the left argument is greater than the right argument.
   */
  public const COMPARISON_COMPARISON_GT = 'COMPARISON_GT';
  /**
   * True if the left argument is greater than or equal to the right argument.
   */
  public const COMPARISON_COMPARISON_GE = 'COMPARISON_GE';
  /**
   * True if the left argument is less than the right argument.
   */
  public const COMPARISON_COMPARISON_LT = 'COMPARISON_LT';
  /**
   * True if the left argument is less than or equal to the right argument.
   */
  public const COMPARISON_COMPARISON_LE = 'COMPARISON_LE';
  /**
   * True if the left argument is equal to the right argument.
   */
  public const COMPARISON_COMPARISON_EQ = 'COMPARISON_EQ';
  /**
   * True if the left argument is not equal to the right argument.
   */
  public const COMPARISON_COMPARISON_NE = 'COMPARISON_NE';
  /**
   * An unspecified evaluation missing data option. Equivalent to
   * EVALUATION_MISSING_DATA_NO_OP.
   */
  public const EVALUATION_MISSING_DATA_EVALUATION_MISSING_DATA_UNSPECIFIED = 'EVALUATION_MISSING_DATA_UNSPECIFIED';
  /**
   * If there is no data to evaluate the condition, then evaluate the condition
   * as false.
   */
  public const EVALUATION_MISSING_DATA_EVALUATION_MISSING_DATA_INACTIVE = 'EVALUATION_MISSING_DATA_INACTIVE';
  /**
   * If there is no data to evaluate the condition, then evaluate the condition
   * as true.
   */
  public const EVALUATION_MISSING_DATA_EVALUATION_MISSING_DATA_ACTIVE = 'EVALUATION_MISSING_DATA_ACTIVE';
  /**
   * Do not evaluate the condition to any value if there is no data.
   */
  public const EVALUATION_MISSING_DATA_EVALUATION_MISSING_DATA_NO_OP = 'EVALUATION_MISSING_DATA_NO_OP';
  protected $collection_key = 'denominatorAggregations';
  protected $aggregationsType = Aggregation::class;
  protected $aggregationsDataType = 'array';
  /**
   * The comparison to apply between the time series (indicated by filter and
   * aggregation) and the threshold (indicated by threshold_value). The
   * comparison is applied on each time series, with the time series on the
   * left-hand side and the threshold on the right-hand side.Only COMPARISON_LT
   * and COMPARISON_GT are supported currently.
   *
   * @var string
   */
  public $comparison;
  protected $denominatorAggregationsType = Aggregation::class;
  protected $denominatorAggregationsDataType = 'array';
  /**
   * A filter (https://cloud.google.com/monitoring/api/v3/filters) that
   * identifies a time series that should be used as the denominator of a ratio
   * that will be compared with the threshold. If a denominator_filter is
   * specified, the time series specified by the filter field will be used as
   * the numerator.The filter must specify the metric type and optionally may
   * contain restrictions on resource type, resource labels, and metric labels.
   * This field may not exceed 2048 Unicode characters in length.
   *
   * @var string
   */
  public $denominatorFilter;
  /**
   * Required. The amount of time that a time series must violate the threshold
   * to be considered failing. Currently, only values that are a multiple of a
   * minute--e.g., 0, 60, 120, or 300 seconds--are supported. If an invalid
   * value is given, an error will be returned. When choosing a duration, it is
   * useful to keep in mind the frequency of the underlying time series data
   * (which may also be affected by any alignments specified in the aggregations
   * field); a good duration is long enough so that a single outlier does not
   * generate spurious alerts, but short enough that unhealthy states are
   * detected and alerted on quickly.
   *
   * @var string
   */
  public $duration;
  /**
   * A condition control that determines how metric-threshold conditions are
   * evaluated when data stops arriving. To use this control, the value of the
   * duration field must be greater than or equal to 60 seconds.
   *
   * @var string
   */
  public $evaluationMissingData;
  /**
   * Required. A filter (https://cloud.google.com/monitoring/api/v3/filters)
   * that identifies which time series should be compared with the threshold.The
   * filter is similar to the one that is specified in the ListTimeSeries
   * request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.ti
   * meSeries/list) (that call is useful to verify the time series that will be
   * retrieved / processed). The filter must specify the metric type and the
   * resource type. Optionally, it can specify resource labels and metric
   * labels. This field must not exceed 2048 Unicode characters in length.
   *
   * @var string
   */
  public $filter;
  protected $forecastOptionsType = ForecastOptions::class;
  protected $forecastOptionsDataType = '';
  /**
   * A value against which to compare the time series.
   *
   * @var 
   */
  public $thresholdValue;
  protected $triggerType = Trigger::class;
  protected $triggerDataType = '';

  /**
   * Specifies the alignment of data points in individual time series as well as
   * how to combine the retrieved time series together (such as when aggregating
   * multiple streams on each resource to a single stream for each resource or
   * when aggregating streams across all members of a group of resources).
   * Multiple aggregations are applied in the order specified.This field is
   * similar to the one in the ListTimeSeries request (https://cloud.google.com/
   * monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It is advisable to
   * use the ListTimeSeries method when debugging this field.
   *
   * @param Aggregation[] $aggregations
   */
  public function setAggregations($aggregations)
  {
    $this->aggregations = $aggregations;
  }
  /**
   * @return Aggregation[]
   */
  public function getAggregations()
  {
    return $this->aggregations;
  }
  /**
   * The comparison to apply between the time series (indicated by filter and
   * aggregation) and the threshold (indicated by threshold_value). The
   * comparison is applied on each time series, with the time series on the
   * left-hand side and the threshold on the right-hand side.Only COMPARISON_LT
   * and COMPARISON_GT are supported currently.
   *
   * Accepted values: COMPARISON_UNSPECIFIED, COMPARISON_GT, COMPARISON_GE,
   * COMPARISON_LT, COMPARISON_LE, COMPARISON_EQ, COMPARISON_NE
   *
   * @param self::COMPARISON_* $comparison
   */
  public function setComparison($comparison)
  {
    $this->comparison = $comparison;
  }
  /**
   * @return self::COMPARISON_*
   */
  public function getComparison()
  {
    return $this->comparison;
  }
  /**
   * Specifies the alignment of data points in individual time series selected
   * by denominatorFilter as well as how to combine the retrieved time series
   * together (such as when aggregating multiple streams on each resource to a
   * single stream for each resource or when aggregating streams across all
   * members of a group of resources).When computing ratios, the aggregations
   * and denominator_aggregations fields must use the same alignment period and
   * produce time series that have the same periodicity and labels.
   *
   * @param Aggregation[] $denominatorAggregations
   */
  public function setDenominatorAggregations($denominatorAggregations)
  {
    $this->denominatorAggregations = $denominatorAggregations;
  }
  /**
   * @return Aggregation[]
   */
  public function getDenominatorAggregations()
  {
    return $this->denominatorAggregations;
  }
  /**
   * A filter (https://cloud.google.com/monitoring/api/v3/filters) that
   * identifies a time series that should be used as the denominator of a ratio
   * that will be compared with the threshold. If a denominator_filter is
   * specified, the time series specified by the filter field will be used as
   * the numerator.The filter must specify the metric type and optionally may
   * contain restrictions on resource type, resource labels, and metric labels.
   * This field may not exceed 2048 Unicode characters in length.
   *
   * @param string $denominatorFilter
   */
  public function setDenominatorFilter($denominatorFilter)
  {
    $this->denominatorFilter = $denominatorFilter;
  }
  /**
   * @return string
   */
  public function getDenominatorFilter()
  {
    return $this->denominatorFilter;
  }
  /**
   * Required. The amount of time that a time series must violate the threshold
   * to be considered failing. Currently, only values that are a multiple of a
   * minute--e.g., 0, 60, 120, or 300 seconds--are supported. If an invalid
   * value is given, an error will be returned. When choosing a duration, it is
   * useful to keep in mind the frequency of the underlying time series data
   * (which may also be affected by any alignments specified in the aggregations
   * field); a good duration is long enough so that a single outlier does not
   * generate spurious alerts, but short enough that unhealthy states are
   * detected and alerted on quickly.
   *
   * @param string $duration
   */
  public function setDuration($duration)
  {
    $this->duration = $duration;
  }
  /**
   * @return string
   */
  public function getDuration()
  {
    return $this->duration;
  }
  /**
   * A condition control that determines how metric-threshold conditions are
   * evaluated when data stops arriving. To use this control, the value of the
   * duration field must be greater than or equal to 60 seconds.
   *
   * Accepted values: EVALUATION_MISSING_DATA_UNSPECIFIED,
   * EVALUATION_MISSING_DATA_INACTIVE, EVALUATION_MISSING_DATA_ACTIVE,
   * EVALUATION_MISSING_DATA_NO_OP
   *
   * @param self::EVALUATION_MISSING_DATA_* $evaluationMissingData
   */
  public function setEvaluationMissingData($evaluationMissingData)
  {
    $this->evaluationMissingData = $evaluationMissingData;
  }
  /**
   * @return self::EVALUATION_MISSING_DATA_*
   */
  public function getEvaluationMissingData()
  {
    return $this->evaluationMissingData;
  }
  /**
   * Required. A filter (https://cloud.google.com/monitoring/api/v3/filters)
   * that identifies which time series should be compared with the threshold.The
   * filter is similar to the one that is specified in the ListTimeSeries
   * request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.ti
   * meSeries/list) (that call is useful to verify the time series that will be
   * retrieved / processed). The filter must specify the metric type and the
   * resource type. Optionally, it can specify resource labels and metric
   * labels. This field must not exceed 2048 Unicode characters in length.
   *
   * @param string $filter
   */
  public function setFilter($filter)
  {
    $this->filter = $filter;
  }
  /**
   * @return string
   */
  public function getFilter()
  {
    return $this->filter;
  }
  /**
   * When this field is present, the MetricThreshold condition forecasts whether
   * the time series is predicted to violate the threshold within the
   * forecast_horizon. When this field is not set, the MetricThreshold tests the
   * current value of the timeseries against the threshold.
   *
   * @param ForecastOptions $forecastOptions
   */
  public function setForecastOptions(ForecastOptions $forecastOptions)
  {
    $this->forecastOptions = $forecastOptions;
  }
  /**
   * @return ForecastOptions
   */
  public function getForecastOptions()
  {
    return $this->forecastOptions;
  }
  public function setThresholdValue($thresholdValue)
  {
    $this->thresholdValue = $thresholdValue;
  }
  public function getThresholdValue()
  {
    return $this->thresholdValue;
  }
  /**
   * The number/percent of time series for which the comparison must hold in
   * order for the condition to trigger. If unspecified, then the condition will
   * trigger if the comparison is true for any of the time series that have been
   * identified by filter and aggregations, or by the ratio, if
   * denominator_filter and denominator_aggregations are specified.
   *
   * @param Trigger $trigger
   */
  public function setTrigger(Trigger $trigger)
  {
    $this->trigger = $trigger;
  }
  /**
   * @return Trigger
   */
  public function getTrigger()
  {
    return $this->trigger;
  }
}

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