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

namespace Google\Cloud\Metastore\V1;

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

/**
 * Request message for
 * [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata].
 *
 * Generated from protobuf message <code>google.cloud.metastore.v1.ExportMetadataRequest</code>
 */
class ExportMetadataRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The relative resource name of the metastore service to run
     * export, in the following form:
     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
     *
     * Generated from protobuf field <code>string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $service = '';
    /**
     * Optional. A request ID. Specify a unique request ID to allow the server to
     * ignore the request if it has completed. The server will ignore subsequent
     * requests that provide a duplicate request ID for at least 60 minutes after
     * the first request.
     * For example, if an initial request times out, followed by another request
     * with the same request ID, the server ignores the second request to prevent
     * the creation of duplicate commitments.
     * The request ID must be a valid
     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
     *
     * Generated from protobuf field <code>string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $request_id = '';
    /**
     * Optional. The type of the database dump. If unspecified, defaults to
     * `MYSQL`.
     *
     * Generated from protobuf field <code>.google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $database_dump_type = 0;
    protected $destination;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $destination_gcs_folder
     *           A Cloud Storage URI of a folder, in the format
     *           `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
     *           `<export_folder>` containing exported files will be created below it.
     *     @type string $service
     *           Required. The relative resource name of the metastore service to run
     *           export, in the following form:
     *           `projects/{project_id}/locations/{location_id}/services/{service_id}`.
     *     @type string $request_id
     *           Optional. A request ID. Specify a unique request ID to allow the server to
     *           ignore the request if it has completed. The server will ignore subsequent
     *           requests that provide a duplicate request ID for at least 60 minutes after
     *           the first request.
     *           For example, if an initial request times out, followed by another request
     *           with the same request ID, the server ignores the second request to prevent
     *           the creation of duplicate commitments.
     *           The request ID must be a valid
     *           [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
     *           A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
     *     @type int $database_dump_type
     *           Optional. The type of the database dump. If unspecified, defaults to
     *           `MYSQL`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Metastore\V1\Metastore::initOnce();
        parent::__construct($data);
    }

    /**
     * A Cloud Storage URI of a folder, in the format
     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
     * `<export_folder>` containing exported files will be created below it.
     *
     * Generated from protobuf field <code>string destination_gcs_folder = 2;</code>
     * @return string
     */
    public function getDestinationGcsFolder()
    {
        return $this->readOneof(2);
    }

    public function hasDestinationGcsFolder()
    {
        return $this->hasOneof(2);
    }

    /**
     * A Cloud Storage URI of a folder, in the format
     * `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
     * `<export_folder>` containing exported files will be created below it.
     *
     * Generated from protobuf field <code>string destination_gcs_folder = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDestinationGcsFolder($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Required. The relative resource name of the metastore service to run
     * export, in the following form:
     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
     *
     * Generated from protobuf field <code>string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getService()
    {
        return $this->service;
    }

    /**
     * Required. The relative resource name of the metastore service to run
     * export, in the following form:
     * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
     *
     * Generated from protobuf field <code>string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setService($var)
    {
        GPBUtil::checkString($var, True);
        $this->service = $var;

        return $this;
    }

    /**
     * Optional. A request ID. Specify a unique request ID to allow the server to
     * ignore the request if it has completed. The server will ignore subsequent
     * requests that provide a duplicate request ID for at least 60 minutes after
     * the first request.
     * For example, if an initial request times out, followed by another request
     * with the same request ID, the server ignores the second request to prevent
     * the creation of duplicate commitments.
     * The request ID must be a valid
     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
     *
     * Generated from protobuf field <code>string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Optional. A request ID. Specify a unique request ID to allow the server to
     * ignore the request if it has completed. The server will ignore subsequent
     * requests that provide a duplicate request ID for at least 60 minutes after
     * the first request.
     * For example, if an initial request times out, followed by another request
     * with the same request ID, the server ignores the second request to prevent
     * the creation of duplicate commitments.
     * The request ID must be a valid
     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
     * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
     *
     * Generated from protobuf field <code>string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Optional. The type of the database dump. If unspecified, defaults to
     * `MYSQL`.
     *
     * Generated from protobuf field <code>.google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getDatabaseDumpType()
    {
        return $this->database_dump_type;
    }

    /**
     * Optional. The type of the database dump. If unspecified, defaults to
     * `MYSQL`.
     *
     * Generated from protobuf field <code>.google.cloud.metastore.v1.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setDatabaseDumpType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1\DatabaseDumpSpec\Type::class);
        $this->database_dump_type = $var;

        return $this;
    }

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

}

