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

namespace Google\Cloud\Container\V1\ResourceUsageExportConfig;

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

/**
 * Parameters for controlling consumption metering.
 *
 * Generated from protobuf message <code>google.container.v1.ResourceUsageExportConfig.ConsumptionMeteringConfig</code>
 */
class ConsumptionMeteringConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Whether to enable consumption metering for this cluster. If enabled, a
     * second BigQuery table will be created to hold resource consumption
     * records.
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     */
    private $enabled = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enabled
     *           Whether to enable consumption metering for this cluster. If enabled, a
     *           second BigQuery table will be created to hold resource consumption
     *           records.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * Whether to enable consumption metering for this cluster. If enabled, a
     * second BigQuery table will be created to hold resource consumption
     * records.
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @return bool
     */
    public function getEnabled()
    {
        return $this->enabled;
    }

    /**
     * Whether to enable consumption metering for this cluster. If enabled, a
     * second BigQuery table will be created to hold resource consumption
     * records.
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->enabled = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ConsumptionMeteringConfig::class, \Google\Cloud\Container\V1\ResourceUsageExportConfig_ConsumptionMeteringConfig::class);

