<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/monitoring/v3/service.proto

namespace Google\Cloud\Monitoring\V3;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A `TimeSeriesRatio` specifies two `TimeSeries` to use for computing the
 * `good_service / total_service` ratio. The specified `TimeSeries` must have
 * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
 * DELTA` or `MetricKind = CUMULATIVE`. The `TimeSeriesRatio` must specify
 * exactly two of good, bad, and total, and the relationship `good_service +
 * bad_service = total_service` will be assumed.
 *
 * Generated from protobuf message <code>google.monitoring.v3.TimeSeriesRatio</code>
 */
class TimeSeriesRatio extends \Google\Protobuf\Internal\Message
{
    /**
     * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     * specifying a `TimeSeries` quantifying good service provided. Must have
     * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
     * DELTA` or `MetricKind = CUMULATIVE`.
     *
     * Generated from protobuf field <code>string good_service_filter = 4;</code>
     */
    private $good_service_filter = '';
    /**
     * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     * specifying a `TimeSeries` quantifying bad service, either demanded service
     * that was not provided or demanded service that was of inadequate quality.
     * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have
     * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.
     *
     * Generated from protobuf field <code>string bad_service_filter = 5;</code>
     */
    private $bad_service_filter = '';
    /**
     * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     * specifying a `TimeSeries` quantifying total demanded service. Must have
     * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
     * DELTA` or `MetricKind = CUMULATIVE`.
     *
     * Generated from protobuf field <code>string total_service_filter = 6;</code>
     */
    private $total_service_filter = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $good_service_filter
     *           A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     *           specifying a `TimeSeries` quantifying good service provided. Must have
     *           `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
     *           DELTA` or `MetricKind = CUMULATIVE`.
     *     @type string $bad_service_filter
     *           A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     *           specifying a `TimeSeries` quantifying bad service, either demanded service
     *           that was not provided or demanded service that was of inadequate quality.
     *           Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have
     *           `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.
     *     @type string $total_service_filter
     *           A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     *           specifying a `TimeSeries` quantifying total demanded service. Must have
     *           `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
     *           DELTA` or `MetricKind = CUMULATIVE`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     * specifying a `TimeSeries` quantifying good service provided. Must have
     * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
     * DELTA` or `MetricKind = CUMULATIVE`.
     *
     * Generated from protobuf field <code>string good_service_filter = 4;</code>
     * @return string
     */
    public function getGoodServiceFilter()
    {
        return $this->good_service_filter;
    }

    /**
     * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     * specifying a `TimeSeries` quantifying good service provided. Must have
     * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
     * DELTA` or `MetricKind = CUMULATIVE`.
     *
     * Generated from protobuf field <code>string good_service_filter = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setGoodServiceFilter($var)
    {
        GPBUtil::checkString($var, True);
        $this->good_service_filter = $var;

        return $this;
    }

    /**
     * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     * specifying a `TimeSeries` quantifying bad service, either demanded service
     * that was not provided or demanded service that was of inadequate quality.
     * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have
     * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.
     *
     * Generated from protobuf field <code>string bad_service_filter = 5;</code>
     * @return string
     */
    public function getBadServiceFilter()
    {
        return $this->bad_service_filter;
    }

    /**
     * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     * specifying a `TimeSeries` quantifying bad service, either demanded service
     * that was not provided or demanded service that was of inadequate quality.
     * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have
     * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.
     *
     * Generated from protobuf field <code>string bad_service_filter = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setBadServiceFilter($var)
    {
        GPBUtil::checkString($var, True);
        $this->bad_service_filter = $var;

        return $this;
    }

    /**
     * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     * specifying a `TimeSeries` quantifying total demanded service. Must have
     * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
     * DELTA` or `MetricKind = CUMULATIVE`.
     *
     * Generated from protobuf field <code>string total_service_filter = 6;</code>
     * @return string
     */
    public function getTotalServiceFilter()
    {
        return $this->total_service_filter;
    }

    /**
     * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
     * specifying a `TimeSeries` quantifying total demanded service. Must have
     * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
     * DELTA` or `MetricKind = CUMULATIVE`.
     *
     * Generated from protobuf field <code>string total_service_filter = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setTotalServiceFilter($var)
    {
        GPBUtil::checkString($var, True);
        $this->total_service_filter = $var;

        return $this;
    }

}

