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

namespace Google\Cloud\DiscoveryEngine\V1;

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

/**
 * Request for
 * [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1.DataStoreService.CreateDataStore]
 * method.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.CreateDataStoreRequest</code>
 */
class CreateDataStoreRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource name, such as
     * `projects/{project}/locations/{location}/collections/{collection}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to
     * create.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.DataStore data_store = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_store = null;
    /**
     * Required. The ID to use for the
     * [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become
     * the final component of the
     * [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.
     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
     * standard with a length limit of 63 characters. Otherwise, an
     * INVALID_ARGUMENT error is returned.
     *
     * Generated from protobuf field <code>string data_store_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_store_id = '';
    /**
     * A boolean flag indicating whether user want to directly create an advanced
     * data store for site search.
     * If the data store is not configured as site
     * search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will
     * be ignored.
     *
     * Generated from protobuf field <code>bool create_advanced_site_search = 4;</code>
     */
    protected $create_advanced_site_search = false;

    /**
     * @param string                                     $parent      Required. The parent resource name, such as
     *                                                                `projects/{project}/locations/{location}/collections/{collection}`. Please see
     *                                                                {@see DataStoreServiceClient::collectionName()} for help formatting this field.
     * @param \Google\Cloud\DiscoveryEngine\V1\DataStore $dataStore   Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to
     *                                                                create.
     * @param string                                     $dataStoreId Required. The ID to use for the
     *                                                                [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become
     *                                                                the final component of the
     *                                                                [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.
     *
     *                                                                This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
     *                                                                standard with a length limit of 63 characters. Otherwise, an
     *                                                                INVALID_ARGUMENT error is returned.
     *
     * @return \Google\Cloud\DiscoveryEngine\V1\CreateDataStoreRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1\DataStore $dataStore, string $dataStoreId): self
    {
        return (new self())
            ->setParent($parent)
            ->setDataStore($dataStore)
            ->setDataStoreId($dataStoreId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource name, such as
     *           `projects/{project}/locations/{location}/collections/{collection}`.
     *     @type \Google\Cloud\DiscoveryEngine\V1\DataStore $data_store
     *           Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to
     *           create.
     *     @type string $data_store_id
     *           Required. The ID to use for the
     *           [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become
     *           the final component of the
     *           [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.
     *           This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
     *           standard with a length limit of 63 characters. Otherwise, an
     *           INVALID_ARGUMENT error is returned.
     *     @type bool $create_advanced_site_search
     *           A boolean flag indicating whether user want to directly create an advanced
     *           data store for site search.
     *           If the data store is not configured as site
     *           search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will
     *           be ignored.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\DataStoreService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource name, such as
     * `projects/{project}/locations/{location}/collections/{collection}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent resource name, such as
     * `projects/{project}/locations/{location}/collections/{collection}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to
     * create.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.DataStore data_store = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\DiscoveryEngine\V1\DataStore|null
     */
    public function getDataStore()
    {
        return $this->data_store;
    }

    public function hasDataStore()
    {
        return isset($this->data_store);
    }

    public function clearDataStore()
    {
        unset($this->data_store);
    }

    /**
     * Required. The [DataStore][google.cloud.discoveryengine.v1.DataStore] to
     * create.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.DataStore data_store = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\DiscoveryEngine\V1\DataStore $var
     * @return $this
     */
    public function setDataStore($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\DataStore::class);
        $this->data_store = $var;

        return $this;
    }

    /**
     * Required. The ID to use for the
     * [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become
     * the final component of the
     * [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.
     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
     * standard with a length limit of 63 characters. Otherwise, an
     * INVALID_ARGUMENT error is returned.
     *
     * Generated from protobuf field <code>string data_store_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDataStoreId()
    {
        return $this->data_store_id;
    }

    /**
     * Required. The ID to use for the
     * [DataStore][google.cloud.discoveryengine.v1.DataStore], which will become
     * the final component of the
     * [DataStore][google.cloud.discoveryengine.v1.DataStore]'s resource name.
     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
     * standard with a length limit of 63 characters. Otherwise, an
     * INVALID_ARGUMENT error is returned.
     *
     * Generated from protobuf field <code>string data_store_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDataStoreId($var)
    {
        GPBUtil::checkString($var, True);
        $this->data_store_id = $var;

        return $this;
    }

    /**
     * A boolean flag indicating whether user want to directly create an advanced
     * data store for site search.
     * If the data store is not configured as site
     * search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will
     * be ignored.
     *
     * Generated from protobuf field <code>bool create_advanced_site_search = 4;</code>
     * @return bool
     */
    public function getCreateAdvancedSiteSearch()
    {
        return $this->create_advanced_site_search;
    }

    /**
     * A boolean flag indicating whether user want to directly create an advanced
     * data store for site search.
     * If the data store is not configured as site
     * search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will
     * be ignored.
     *
     * Generated from protobuf field <code>bool create_advanced_site_search = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setCreateAdvancedSiteSearch($var)
    {
        GPBUtil::checkBool($var);
        $this->create_advanced_site_search = $var;

        return $this;
    }

}

