<?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;

/**
 * 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
     */
    public function getStatus()
    {
        return $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);

