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

namespace Google\Cloud\DiscoveryEngine\V1;

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

/**
 * Request message for
 * [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions]
 * method.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest</code>
 */
class ImportCompletionSuggestionsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent data store resource name for which to import customer
     * autocomplete suggestions.
     * Follows pattern `projects/&#42;&#47;locations/&#42;&#47;collections/&#42;&#47;dataStores/&#42;`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * The desired location of errors incurred during the Import.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5;</code>
     */
    protected $error_config = null;
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DiscoveryEngine\V1\ImportCompletionSuggestionsRequest\InlineSource $inline_source
     *           The Inline source for suggestion entries.
     *     @type \Google\Cloud\DiscoveryEngine\V1\GcsSource $gcs_source
     *           Cloud Storage location for the input content.
     *     @type \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $bigquery_source
     *           BigQuery input source.
     *     @type string $parent
     *           Required. The parent data store resource name for which to import customer
     *           autocomplete suggestions.
     *           Follows pattern `projects/&#42;&#47;locations/&#42;&#47;collections/&#42;&#47;dataStores/&#42;`
     *     @type \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $error_config
     *           The desired location of errors incurred during the Import.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * The Inline source for suggestion entries.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource inline_source = 2;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1\ImportCompletionSuggestionsRequest\InlineSource|null
     */
    public function getInlineSource()
    {
        return $this->readOneof(2);
    }

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

    /**
     * The Inline source for suggestion entries.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource inline_source = 2;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1\ImportCompletionSuggestionsRequest\InlineSource $var
     * @return $this
     */
    public function setInlineSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportCompletionSuggestionsRequest\InlineSource::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Cloud Storage location for the input content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.GcsSource gcs_source = 3;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1\GcsSource|null
     */
    public function getGcsSource()
    {
        return $this->readOneof(3);
    }

    public function hasGcsSource()
    {
        return $this->hasOneof(3);
    }

    /**
     * Cloud Storage location for the input content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.GcsSource gcs_source = 3;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1\GcsSource $var
     * @return $this
     */
    public function setGcsSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\GcsSource::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * BigQuery input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1\BigQuerySource|null
     */
    public function getBigquerySource()
    {
        return $this->readOneof(4);
    }

    public function hasBigquerySource()
    {
        return $this->hasOneof(4);
    }

    /**
     * BigQuery input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.BigQuerySource bigquery_source = 4;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $var
     * @return $this
     */
    public function setBigquerySource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\BigQuerySource::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Required. The parent data store resource name for which to import customer
     * autocomplete suggestions.
     * Follows pattern `projects/&#42;&#47;locations/&#42;&#47;collections/&#42;&#47;dataStores/&#42;`
     *
     * 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 data store resource name for which to import customer
     * autocomplete suggestions.
     * Follows pattern `projects/&#42;&#47;locations/&#42;&#47;collections/&#42;&#47;dataStores/&#42;`
     *
     * 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;
    }

    /**
     * The desired location of errors incurred during the Import.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig|null
     */
    public function getErrorConfig()
    {
        return $this->error_config;
    }

    public function hasErrorConfig()
    {
        return isset($this->error_config);
    }

    public function clearErrorConfig()
    {
        unset($this->error_config);
    }

    /**
     * The desired location of errors incurred during the Import.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.ImportErrorConfig error_config = 5;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig $var
     * @return $this
     */
    public function setErrorConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\ImportErrorConfig::class);
        $this->error_config = $var;

        return $this;
    }

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

}

