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

namespace Google\Cloud\Bigtable\V2\MutateRowsResponse;

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

/**
 * The result of applying a passed mutation in the original request.
 *
 * Generated from protobuf message <code>google.bigtable.v2.MutateRowsResponse.Entry</code>
 */
class Entry extends \Google\Protobuf\Internal\Message
{
    /**
     * The index into the original request's `entries` list of the Entry
     * for which a result is being reported.
     *
     * Generated from protobuf field <code>int64 index = 1;</code>
     */
    private $index = 0;
    /**
     * The result of the request Entry identified by `index`.
     * Depending on how requests are batched during execution, it is possible
     * for one Entry to fail due to an error with another Entry. In the event
     * that this occurs, the same error will be reported for both entries.
     *
     * Generated from protobuf field <code>.google.rpc.Status status = 2;</code>
     */
    private $status = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $index
     *           The index into the original request's `entries` list of the Entry
     *           for which a result is being reported.
     *     @type \Google\Rpc\Status $status
     *           The result of the request Entry identified by `index`.
     *           Depending on how requests are batched during execution, it is possible
     *           for one Entry to fail due to an error with another Entry. In the event
     *           that this occurs, the same error will be reported for both entries.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce();
        parent::__construct($data);
    }

    /**
     * The index into the original request's `entries` list of the Entry
     * for which a result is being reported.
     *
     * Generated from protobuf field <code>int64 index = 1;</code>
     * @return int|string
     */
    public function getIndex()
    {
        return $this->index;
    }

    /**
     * The index into the original request's `entries` list of the Entry
     * for which a result is being reported.
     *
     * Generated from protobuf field <code>int64 index = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setIndex($var)
    {
        GPBUtil::checkInt64($var);
        $this->index = $var;

        return $this;
    }

    /**
     * The result of the request Entry identified by `index`.
     * Depending on how requests are batched during execution, it is possible
     * for one Entry to fail due to an error with another Entry. In the event
     * that this occurs, the same error will be reported for both entries.
     *
     * Generated from protobuf field <code>.google.rpc.Status status = 2;</code>
     * @return \Google\Rpc\Status|null
     */
    public function getStatus()
    {
        return isset($this->status) ? $this->status : null;
    }

    public function hasStatus()
    {
        return isset($this->status);
    }

    public function clearStatus()
    {
        unset($this->status);
    }

    /**
     * The result of the request Entry identified by `index`.
     * Depending on how requests are batched during execution, it is possible
     * for one Entry to fail due to an error with another Entry. In the event
     * that this occurs, the same error will be reported for both entries.
     *
     * Generated from protobuf field <code>.google.rpc.Status status = 2;</code>
     * @param \Google\Rpc\Status $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->status = $var;

        return $this;
    }

}

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

