<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/bigtable/admin/v2/table.proto

namespace Google\Cloud\Bigtable\Admin\V2;

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

/**
 * Config for tiered storage.
 * A valid config must have a valid TieredStorageRule. Otherwise the whole
 * TieredStorageConfig must be unset.
 * By default all data is stored in the SSD tier (only SSD instances can
 * configure tiered storage).
 *
 * Generated from protobuf message <code>google.bigtable.admin.v2.TieredStorageConfig</code>
 */
class TieredStorageConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Rule to specify what data is stored in the infrequent access(IA) tier.
     * The IA tier allows storing more data per node with reduced performance.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1;</code>
     */
    protected $infrequent_access = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Bigtable\Admin\V2\TieredStorageRule $infrequent_access
     *           Rule to specify what data is stored in the infrequent access(IA) tier.
     *           The IA tier allows storing more data per node with reduced performance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce();
        parent::__construct($data);
    }

    /**
     * Rule to specify what data is stored in the infrequent access(IA) tier.
     * The IA tier allows storing more data per node with reduced performance.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1;</code>
     * @return \Google\Cloud\Bigtable\Admin\V2\TieredStorageRule|null
     */
    public function getInfrequentAccess()
    {
        return $this->infrequent_access;
    }

    public function hasInfrequentAccess()
    {
        return isset($this->infrequent_access);
    }

    public function clearInfrequentAccess()
    {
        unset($this->infrequent_access);
    }

    /**
     * Rule to specify what data is stored in the infrequent access(IA) tier.
     * The IA tier allows storing more data per node with reduced performance.
     *
     * Generated from protobuf field <code>.google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1;</code>
     * @param \Google\Cloud\Bigtable\Admin\V2\TieredStorageRule $var
     * @return $this
     */
    public function setInfrequentAccess($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\TieredStorageRule::class);
        $this->infrequent_access = $var;

        return $this;
    }

}

