<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/feature_online_store_service.proto

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Response message for
 * [FeatureOnlineStoreService.FeatureViewDirectWrite][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FeatureViewDirectWrite].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse</code>
 */
class FeatureViewDirectWriteResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Response status for the keys listed in
     * [FeatureViewDirectWriteResponse.write_responses][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.write_responses].
     * The error only applies to the
     * listed data keys - the stream will remain open for further
     * [FeatureOnlineStoreService.FeatureViewDirectWriteRequest][] requests.
     * Partial failures (e.g. if the first 10 keys of a request fail, but the
     * rest succeed) from a single request may result in multiple responses -
     * there will be one response for the successful request keys and one response
     * for the failing request keys.
     *
     * Generated from protobuf field <code>.google.rpc.Status status = 1;</code>
     */
    protected $status = null;
    /**
     * Details about write for each key. If status is not OK,
     * [WriteResponse.data_key][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.data_key]
     * will have the key with error, but
     * [WriteResponse.online_store_write_time][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.online_store_write_time]
     * will not be present.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse write_responses = 2;</code>
     */
    private $write_responses;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Rpc\Status $status
     *           Response status for the keys listed in
     *           [FeatureViewDirectWriteResponse.write_responses][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.write_responses].
     *           The error only applies to the
     *           listed data keys - the stream will remain open for further
     *           [FeatureOnlineStoreService.FeatureViewDirectWriteRequest][] requests.
     *           Partial failures (e.g. if the first 10 keys of a request fail, but the
     *           rest succeed) from a single request may result in multiple responses -
     *           there will be one response for the successful request keys and one response
     *           for the failing request keys.
     *     @type array<\Google\Cloud\AIPlatform\V1\FeatureViewDirectWriteResponse\WriteResponse>|\Google\Protobuf\Internal\RepeatedField $write_responses
     *           Details about write for each key. If status is not OK,
     *           [WriteResponse.data_key][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.data_key]
     *           will have the key with error, but
     *           [WriteResponse.online_store_write_time][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.online_store_write_time]
     *           will not be present.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureOnlineStoreService::initOnce();
        parent::__construct($data);
    }

    /**
     * Response status for the keys listed in
     * [FeatureViewDirectWriteResponse.write_responses][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.write_responses].
     * The error only applies to the
     * listed data keys - the stream will remain open for further
     * [FeatureOnlineStoreService.FeatureViewDirectWriteRequest][] requests.
     * Partial failures (e.g. if the first 10 keys of a request fail, but the
     * rest succeed) from a single request may result in multiple responses -
     * there will be one response for the successful request keys and one response
     * for the failing request keys.
     *
     * Generated from protobuf field <code>.google.rpc.Status status = 1;</code>
     * @return \Google\Rpc\Status|null
     */
    public function getStatus()
    {
        return $this->status;
    }

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

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

    /**
     * Response status for the keys listed in
     * [FeatureViewDirectWriteResponse.write_responses][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.write_responses].
     * The error only applies to the
     * listed data keys - the stream will remain open for further
     * [FeatureOnlineStoreService.FeatureViewDirectWriteRequest][] requests.
     * Partial failures (e.g. if the first 10 keys of a request fail, but the
     * rest succeed) from a single request may result in multiple responses -
     * there will be one response for the successful request keys and one response
     * for the failing request keys.
     *
     * Generated from protobuf field <code>.google.rpc.Status status = 1;</code>
     * @param \Google\Rpc\Status $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->status = $var;

        return $this;
    }

    /**
     * Details about write for each key. If status is not OK,
     * [WriteResponse.data_key][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.data_key]
     * will have the key with error, but
     * [WriteResponse.online_store_write_time][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.online_store_write_time]
     * will not be present.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse write_responses = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getWriteResponses()
    {
        return $this->write_responses;
    }

    /**
     * Details about write for each key. If status is not OK,
     * [WriteResponse.data_key][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.data_key]
     * will have the key with error, but
     * [WriteResponse.online_store_write_time][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.online_store_write_time]
     * will not be present.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse write_responses = 2;</code>
     * @param array<\Google\Cloud\AIPlatform\V1\FeatureViewDirectWriteResponse\WriteResponse>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setWriteResponses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\FeatureViewDirectWriteResponse\WriteResponse::class);
        $this->write_responses = $arr;

        return $this;
    }

}

