<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/billing/v1/cloud_catalog.proto

namespace Google\Cloud\Billing\V1;

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

/**
 * Represents the aggregation level and interval for pricing of a single SKU.
 *
 * Generated from protobuf message <code>google.cloud.billing.v1.AggregationInfo</code>
 */
class AggregationInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
     */
    private $aggregation_level = 0;
    /**
     * Generated from protobuf field <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;</code>
     */
    private $aggregation_interval = 0;
    /**
     * The number of intervals to aggregate over.
     * Example: If aggregation_level is "DAILY" and aggregation_count is 14,
     * aggregation will be over 14 days.
     *
     * Generated from protobuf field <code>int32 aggregation_count = 3;</code>
     */
    private $aggregation_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $aggregation_level
     *     @type int $aggregation_interval
     *     @type int $aggregation_count
     *           The number of intervals to aggregate over.
     *           Example: If aggregation_level is "DAILY" and aggregation_count is 14,
     *           aggregation will be over 14 days.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Billing\V1\CloudCatalog::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
     * @return int
     */
    public function getAggregationLevel()
    {
        return $this->aggregation_level;
    }

    /**
     * Generated from protobuf field <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setAggregationLevel($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Billing\V1\AggregationInfo\AggregationLevel::class);
        $this->aggregation_level = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;</code>
     * @return int
     */
    public function getAggregationInterval()
    {
        return $this->aggregation_interval;
    }

    /**
     * Generated from protobuf field <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setAggregationInterval($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Billing\V1\AggregationInfo\AggregationInterval::class);
        $this->aggregation_interval = $var;

        return $this;
    }

    /**
     * The number of intervals to aggregate over.
     * Example: If aggregation_level is "DAILY" and aggregation_count is 14,
     * aggregation will be over 14 days.
     *
     * Generated from protobuf field <code>int32 aggregation_count = 3;</code>
     * @return int
     */
    public function getAggregationCount()
    {
        return $this->aggregation_count;
    }

    /**
     * The number of intervals to aggregate over.
     * Example: If aggregation_level is "DAILY" and aggregation_count is 14,
     * aggregation will be over 14 days.
     *
     * Generated from protobuf field <code>int32 aggregation_count = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setAggregationCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->aggregation_count = $var;

        return $this;
    }

}

