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

namespace Google\Cloud\Retail\V2;

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

/**
 * Configuration of destination for Export related errors.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.ExportErrorsConfig</code>
 */
class ExportErrorsConfig extends \Google\Protobuf\Internal\Message
{
    protected $destination;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $gcs_prefix
     *           Google Cloud Storage path for import errors. This must be an empty,
     *           existing Cloud Storage bucket. Export errors will be written to a file in
     *           this bucket, one per line, as a JSON-encoded
     *           `google.rpc.Status` message.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\ExportConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Google Cloud Storage path for import errors. This must be an empty,
     * existing Cloud Storage bucket. Export errors will be written to a file in
     * this bucket, one per line, as a JSON-encoded
     * `google.rpc.Status` message.
     *
     * Generated from protobuf field <code>string gcs_prefix = 1;</code>
     * @return string
     */
    public function getGcsPrefix()
    {
        return $this->readOneof(1);
    }

    public function hasGcsPrefix()
    {
        return $this->hasOneof(1);
    }

    /**
     * Google Cloud Storage path for import errors. This must be an empty,
     * existing Cloud Storage bucket. Export errors will be written to a file in
     * this bucket, one per line, as a JSON-encoded
     * `google.rpc.Status` message.
     *
     * Generated from protobuf field <code>string gcs_prefix = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setGcsPrefix($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getDestination()
    {
        return $this->whichOneof("destination");
    }

}

