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

namespace Google\Cloud\Bigtable\Admin\V2\GcRule;

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

/**
 * A GcRule which deletes cells matching any of the given rules.
 *
 * Generated from protobuf message <code>google.bigtable.admin.v2.GcRule.Union</code>
 */
class Union extends \Google\Protobuf\Internal\Message
{
    /**
     * Delete cells which would be deleted by any element of `rules`.
     *
     * Generated from protobuf field <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    private $rules;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Bigtable\Admin\V2\GcRule[]|\Google\Protobuf\Internal\RepeatedField $rules
     *           Delete cells which would be deleted by any element of `rules`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce();
        parent::__construct($data);
    }

    /**
     * Delete cells which would be deleted by any element of `rules`.
     *
     * Generated from protobuf field <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRules()
    {
        return $this->rules;
    }

    /**
     * Delete cells which would be deleted by any element of `rules`.
     *
     * Generated from protobuf field <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     * @param \Google\Cloud\Bigtable\Admin\V2\GcRule[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\GcRule::class);
        $this->rules = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Union::class, \Google\Cloud\Bigtable\Admin\V2\GcRule_Union::class);

