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

namespace Google\Cloud\Firestore\Admin\V1;

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

/**
 * The request for
 * [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments].
 *
 * Generated from protobuf message <code>google.firestore.admin.v1.ImportDocumentsRequest</code>
 */
class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Database to import into. Should be of the form:
     * `projects/{project_id}/databases/{database_id}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * Which collection ids to import. Unspecified means all collections included
     * in the import.
     *
     * Generated from protobuf field <code>repeated string collection_ids = 2;</code>
     */
    private $collection_ids;
    /**
     * Location of the exported files.
     * This must match the output_uri_prefix of an ExportDocumentsResponse from
     * an export that has completed successfully.
     * See:
     * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
     *
     * Generated from protobuf field <code>string input_uri_prefix = 3;</code>
     */
    private $input_uri_prefix = '';
    /**
     * An empty list represents all namespaces. This is the preferred
     * usage for databases that don't use namespaces.
     * An empty string element represents the default namespace. This should be
     * used if the database has data in non-default namespaces, but doesn't want
     * to include them. Each namespace in this list must be unique.
     *
     * Generated from protobuf field <code>repeated string namespace_ids = 4;</code>
     */
    private $namespace_ids;

    /**
     * @param string $name Required. Database to import into. Should be of the form:
     *                     `projects/{project_id}/databases/{database_id}`. Please see
     *                     {@see FirestoreAdminClient::databaseName()} for help formatting this field.
     *
     * @return \Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest
     *
     * @experimental
     */
    public static function build(string $name): self
    {
        return (new self())
            ->setName($name);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Database to import into. Should be of the form:
     *           `projects/{project_id}/databases/{database_id}`.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $collection_ids
     *           Which collection ids to import. Unspecified means all collections included
     *           in the import.
     *     @type string $input_uri_prefix
     *           Location of the exported files.
     *           This must match the output_uri_prefix of an ExportDocumentsResponse from
     *           an export that has completed successfully.
     *           See:
     *           [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $namespace_ids
     *           An empty list represents all namespaces. This is the preferred
     *           usage for databases that don't use namespaces.
     *           An empty string element represents the default namespace. This should be
     *           used if the database has data in non-default namespaces, but doesn't want
     *           to include them. Each namespace in this list must be unique.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Database to import into. Should be of the form:
     * `projects/{project_id}/databases/{database_id}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Database to import into. Should be of the form:
     * `projects/{project_id}/databases/{database_id}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Which collection ids to import. Unspecified means all collections included
     * in the import.
     *
     * Generated from protobuf field <code>repeated string collection_ids = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCollectionIds()
    {
        return $this->collection_ids;
    }

    /**
     * Which collection ids to import. Unspecified means all collections included
     * in the import.
     *
     * Generated from protobuf field <code>repeated string collection_ids = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCollectionIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->collection_ids = $arr;

        return $this;
    }

    /**
     * Location of the exported files.
     * This must match the output_uri_prefix of an ExportDocumentsResponse from
     * an export that has completed successfully.
     * See:
     * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
     *
     * Generated from protobuf field <code>string input_uri_prefix = 3;</code>
     * @return string
     */
    public function getInputUriPrefix()
    {
        return $this->input_uri_prefix;
    }

    /**
     * Location of the exported files.
     * This must match the output_uri_prefix of an ExportDocumentsResponse from
     * an export that has completed successfully.
     * See:
     * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
     *
     * Generated from protobuf field <code>string input_uri_prefix = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setInputUriPrefix($var)
    {
        GPBUtil::checkString($var, True);
        $this->input_uri_prefix = $var;

        return $this;
    }

    /**
     * An empty list represents all namespaces. This is the preferred
     * usage for databases that don't use namespaces.
     * An empty string element represents the default namespace. This should be
     * used if the database has data in non-default namespaces, but doesn't want
     * to include them. Each namespace in this list must be unique.
     *
     * Generated from protobuf field <code>repeated string namespace_ids = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNamespaceIds()
    {
        return $this->namespace_ids;
    }

    /**
     * An empty list represents all namespaces. This is the preferred
     * usage for databases that don't use namespaces.
     * An empty string element represents the default namespace. This should be
     * used if the database has data in non-default namespaces, but doesn't want
     * to include them. Each namespace in this list must be unique.
     *
     * Generated from protobuf field <code>repeated string namespace_ids = 4;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNamespaceIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->namespace_ids = $arr;

        return $this;
    }

}

