<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/recommendationengine/v1beta1/import.proto

namespace Google\Cloud\RecommendationEngine\V1beta1;

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

/**
 * Configuration of destination for Import related errors.
 *
 * Generated from protobuf message <code>google.cloud.recommendationengine.v1beta1.ImportErrorsConfig</code>
 */
class ImportErrorsConfig 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. Import 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\Recommendationengine\V1Beta1\Import::initOnce();
        parent::__construct($data);
    }

    /**
     * Google Cloud Storage path for import errors. This must be an empty,
     * existing Cloud Storage bucket. Import 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. Import 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");
    }

}

