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

namespace Google\Cloud\AIPlatform\V1\NearestNeighborSearchOperationMetadata;

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

/**
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.NearestNeighborSearchOperationMetadata.RecordError</code>
 */
class RecordError extends \Google\Protobuf\Internal\Message
{
    /**
     * The error type of this record.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NearestNeighborSearchOperationMetadata.RecordError.RecordErrorType error_type = 1;</code>
     */
    private $error_type = 0;
    /**
     * A human-readable message that is shown to the user to help them fix the
     * error. Note that this message may change from time to time, your code
     * should check against error_type as the source of truth.
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     */
    private $error_message = '';
    /**
     * Cloud Storage URI pointing to the original file in user's bucket.
     *
     * Generated from protobuf field <code>string source_gcs_uri = 3;</code>
     */
    private $source_gcs_uri = '';
    /**
     * Empty if the embedding id is failed to parse.
     *
     * Generated from protobuf field <code>string embedding_id = 4;</code>
     */
    private $embedding_id = '';
    /**
     * The original content of this record.
     *
     * Generated from protobuf field <code>string raw_record = 5;</code>
     */
    private $raw_record = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $error_type
     *           The error type of this record.
     *     @type string $error_message
     *           A human-readable message that is shown to the user to help them fix the
     *           error. Note that this message may change from time to time, your code
     *           should check against error_type as the source of truth.
     *     @type string $source_gcs_uri
     *           Cloud Storage URI pointing to the original file in user's bucket.
     *     @type string $embedding_id
     *           Empty if the embedding id is failed to parse.
     *     @type string $raw_record
     *           The original content of this record.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\IndexService::initOnce();
        parent::__construct($data);
    }

    /**
     * The error type of this record.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NearestNeighborSearchOperationMetadata.RecordError.RecordErrorType error_type = 1;</code>
     * @return int
     */
    public function getErrorType()
    {
        return $this->error_type;
    }

    /**
     * The error type of this record.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NearestNeighborSearchOperationMetadata.RecordError.RecordErrorType error_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setErrorType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\NearestNeighborSearchOperationMetadata\RecordError\RecordErrorType::class);
        $this->error_type = $var;

        return $this;
    }

    /**
     * A human-readable message that is shown to the user to help them fix the
     * error. Note that this message may change from time to time, your code
     * should check against error_type as the source of truth.
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     * @return string
     */
    public function getErrorMessage()
    {
        return $this->error_message;
    }

    /**
     * A human-readable message that is shown to the user to help them fix the
     * error. Note that this message may change from time to time, your code
     * should check against error_type as the source of truth.
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setErrorMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->error_message = $var;

        return $this;
    }

    /**
     * Cloud Storage URI pointing to the original file in user's bucket.
     *
     * Generated from protobuf field <code>string source_gcs_uri = 3;</code>
     * @return string
     */
    public function getSourceGcsUri()
    {
        return $this->source_gcs_uri;
    }

    /**
     * Cloud Storage URI pointing to the original file in user's bucket.
     *
     * Generated from protobuf field <code>string source_gcs_uri = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceGcsUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_gcs_uri = $var;

        return $this;
    }

    /**
     * Empty if the embedding id is failed to parse.
     *
     * Generated from protobuf field <code>string embedding_id = 4;</code>
     * @return string
     */
    public function getEmbeddingId()
    {
        return $this->embedding_id;
    }

    /**
     * Empty if the embedding id is failed to parse.
     *
     * Generated from protobuf field <code>string embedding_id = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setEmbeddingId($var)
    {
        GPBUtil::checkString($var, True);
        $this->embedding_id = $var;

        return $this;
    }

    /**
     * The original content of this record.
     *
     * Generated from protobuf field <code>string raw_record = 5;</code>
     * @return string
     */
    public function getRawRecord()
    {
        return $this->raw_record;
    }

    /**
     * The original content of this record.
     *
     * Generated from protobuf field <code>string raw_record = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setRawRecord($var)
    {
        GPBUtil::checkString($var, True);
        $this->raw_record = $var;

        return $this;
    }

}


