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

namespace Google\Cloud\Bigtable\V2;

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

/**
 * Specifies the complete (requested) contents of a single row of a table.
 * Rows which exceed 256MiB in size cannot be read in full.
 *
 * Generated from protobuf message <code>google.bigtable.v2.Row</code>
 */
class Row extends \Google\Protobuf\Internal\Message
{
    /**
     * The unique key which identifies this row within its table. This is the same
     * key that's used to identify the row in, for example, a MutateRowRequest.
     * May contain any non-empty byte string up to 4KiB in length.
     *
     * Generated from protobuf field <code>bytes key = 1;</code>
     */
    private $key = '';
    /**
     * May be empty, but only if the entire row is empty.
     * The mutual ordering of column families is not specified.
     *
     * Generated from protobuf field <code>repeated .google.bigtable.v2.Family families = 2;</code>
     */
    private $families;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $key
     *           The unique key which identifies this row within its table. This is the same
     *           key that's used to identify the row in, for example, a MutateRowRequest.
     *           May contain any non-empty byte string up to 4KiB in length.
     *     @type \Google\Cloud\Bigtable\V2\Family[]|\Google\Protobuf\Internal\RepeatedField $families
     *           May be empty, but only if the entire row is empty.
     *           The mutual ordering of column families is not specified.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * The unique key which identifies this row within its table. This is the same
     * key that's used to identify the row in, for example, a MutateRowRequest.
     * May contain any non-empty byte string up to 4KiB in length.
     *
     * Generated from protobuf field <code>bytes key = 1;</code>
     * @return string
     */
    public function getKey()
    {
        return $this->key;
    }

    /**
     * The unique key which identifies this row within its table. This is the same
     * key that's used to identify the row in, for example, a MutateRowRequest.
     * May contain any non-empty byte string up to 4KiB in length.
     *
     * Generated from protobuf field <code>bytes key = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->key = $var;

        return $this;
    }

    /**
     * May be empty, but only if the entire row is empty.
     * The mutual ordering of column families is not specified.
     *
     * Generated from protobuf field <code>repeated .google.bigtable.v2.Family families = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFamilies()
    {
        return $this->families;
    }

    /**
     * May be empty, but only if the entire row is empty.
     * The mutual ordering of column families is not specified.
     *
     * Generated from protobuf field <code>repeated .google.bigtable.v2.Family families = 2;</code>
     * @param \Google\Cloud\Bigtable\V2\Family[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFamilies($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Family::class);
        $this->families = $arr;

        return $this;
    }

}

