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

namespace Google\Cloud\Bigtable\V2\Mutation;

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

/**
 * A Mutation which incrementally updates a cell in an `Aggregate` family.
 *
 * Generated from protobuf message <code>google.bigtable.v2.Mutation.AddToCell</code>
 */
class AddToCell extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the `Aggregate` family into which new data should be added.
     * This must be a family with a `value_type` of `Aggregate`.
     * Format: `[-_.a-zA-Z0-9]+`
     *
     * Generated from protobuf field <code>string family_name = 1;</code>
     */
    protected $family_name = '';
    /**
     * The qualifier of the column into which new data should be added. This
     * must be a `raw_value`.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Value column_qualifier = 2;</code>
     */
    protected $column_qualifier = null;
    /**
     * The timestamp of the cell to which new data should be added. This must
     * be a `raw_timestamp_micros` that matches the table's `granularity`.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Value timestamp = 3;</code>
     */
    protected $timestamp = null;
    /**
     * The input value to be accumulated into the specified cell. This must be
     * compatible with the family's `value_type.input_type`.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Value input = 4;</code>
     */
    protected $input = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $family_name
     *           The name of the `Aggregate` family into which new data should be added.
     *           This must be a family with a `value_type` of `Aggregate`.
     *           Format: `[-_.a-zA-Z0-9]+`
     *     @type \Google\Cloud\Bigtable\V2\Value $column_qualifier
     *           The qualifier of the column into which new data should be added. This
     *           must be a `raw_value`.
     *     @type \Google\Cloud\Bigtable\V2\Value $timestamp
     *           The timestamp of the cell to which new data should be added. This must
     *           be a `raw_timestamp_micros` that matches the table's `granularity`.
     *     @type \Google\Cloud\Bigtable\V2\Value $input
     *           The input value to be accumulated into the specified cell. This must be
     *           compatible with the family's `value_type.input_type`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the `Aggregate` family into which new data should be added.
     * This must be a family with a `value_type` of `Aggregate`.
     * Format: `[-_.a-zA-Z0-9]+`
     *
     * Generated from protobuf field <code>string family_name = 1;</code>
     * @return string
     */
    public function getFamilyName()
    {
        return $this->family_name;
    }

    /**
     * The name of the `Aggregate` family into which new data should be added.
     * This must be a family with a `value_type` of `Aggregate`.
     * Format: `[-_.a-zA-Z0-9]+`
     *
     * Generated from protobuf field <code>string family_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFamilyName($var)
    {
        GPBUtil::checkString($var, True);
        $this->family_name = $var;

        return $this;
    }

    /**
     * The qualifier of the column into which new data should be added. This
     * must be a `raw_value`.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Value column_qualifier = 2;</code>
     * @return \Google\Cloud\Bigtable\V2\Value|null
     */
    public function getColumnQualifier()
    {
        return $this->column_qualifier;
    }

    public function hasColumnQualifier()
    {
        return isset($this->column_qualifier);
    }

    public function clearColumnQualifier()
    {
        unset($this->column_qualifier);
    }

    /**
     * The qualifier of the column into which new data should be added. This
     * must be a `raw_value`.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Value column_qualifier = 2;</code>
     * @param \Google\Cloud\Bigtable\V2\Value $var
     * @return $this
     */
    public function setColumnQualifier($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class);
        $this->column_qualifier = $var;

        return $this;
    }

    /**
     * The timestamp of the cell to which new data should be added. This must
     * be a `raw_timestamp_micros` that matches the table's `granularity`.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Value timestamp = 3;</code>
     * @return \Google\Cloud\Bigtable\V2\Value|null
     */
    public function getTimestamp()
    {
        return $this->timestamp;
    }

    public function hasTimestamp()
    {
        return isset($this->timestamp);
    }

    public function clearTimestamp()
    {
        unset($this->timestamp);
    }

    /**
     * The timestamp of the cell to which new data should be added. This must
     * be a `raw_timestamp_micros` that matches the table's `granularity`.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Value timestamp = 3;</code>
     * @param \Google\Cloud\Bigtable\V2\Value $var
     * @return $this
     */
    public function setTimestamp($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class);
        $this->timestamp = $var;

        return $this;
    }

    /**
     * The input value to be accumulated into the specified cell. This must be
     * compatible with the family's `value_type.input_type`.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Value input = 4;</code>
     * @return \Google\Cloud\Bigtable\V2\Value|null
     */
    public function getInput()
    {
        return $this->input;
    }

    public function hasInput()
    {
        return isset($this->input);
    }

    public function clearInput()
    {
        unset($this->input);
    }

    /**
     * The input value to be accumulated into the specified cell. This must be
     * compatible with the family's `value_type.input_type`.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Value input = 4;</code>
     * @param \Google\Cloud\Bigtable\V2\Value $var
     * @return $this
     */
    public function setInput($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class);
        $this->input = $var;

        return $this;
    }

}

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

