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

namespace Google\Cloud\Retail\V2;

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

/**
 * Request message for ImportCompletionData methods.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.ImportCompletionDataRequest</code>
 */
class ImportCompletionDataRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The catalog which the suggestions dataset belongs to.
     * Format: `projects/1234/locations/global/catalogs/default_catalog`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The desired input location of the data.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.CompletionDataInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $input_config = null;
    /**
     * Pub/Sub topic for receiving notification. If this field is set,
     * when the import is finished, a notification is sent to
     * specified Pub/Sub topic. The message data is JSON string of a
     * [Operation][google.longrunning.Operation].
     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
     *
     * Generated from protobuf field <code>string notification_pubsub_topic = 3;</code>
     */
    private $notification_pubsub_topic = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The catalog which the suggestions dataset belongs to.
     *           Format: `projects/1234/locations/global/catalogs/default_catalog`.
     *     @type \Google\Cloud\Retail\V2\CompletionDataInputConfig $input_config
     *           Required. The desired input location of the data.
     *     @type string $notification_pubsub_topic
     *           Pub/Sub topic for receiving notification. If this field is set,
     *           when the import is finished, a notification is sent to
     *           specified Pub/Sub topic. The message data is JSON string of a
     *           [Operation][google.longrunning.Operation].
     *           Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\ImportConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The catalog which the suggestions dataset belongs to.
     * Format: `projects/1234/locations/global/catalogs/default_catalog`.
     *
     * 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 catalog which the suggestions dataset belongs to.
     * Format: `projects/1234/locations/global/catalogs/default_catalog`.
     *
     * 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 desired input location of the data.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.CompletionDataInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Retail\V2\CompletionDataInputConfig|null
     */
    public function getInputConfig()
    {
        return $this->input_config;
    }

    public function hasInputConfig()
    {
        return isset($this->input_config);
    }

    public function clearInputConfig()
    {
        unset($this->input_config);
    }

    /**
     * Required. The desired input location of the data.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.CompletionDataInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Retail\V2\CompletionDataInputConfig $var
     * @return $this
     */
    public function setInputConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Retail\V2\CompletionDataInputConfig::class);
        $this->input_config = $var;

        return $this;
    }

    /**
     * Pub/Sub topic for receiving notification. If this field is set,
     * when the import is finished, a notification is sent to
     * specified Pub/Sub topic. The message data is JSON string of a
     * [Operation][google.longrunning.Operation].
     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
     *
     * Generated from protobuf field <code>string notification_pubsub_topic = 3;</code>
     * @return string
     */
    public function getNotificationPubsubTopic()
    {
        return $this->notification_pubsub_topic;
    }

    /**
     * Pub/Sub topic for receiving notification. If this field is set,
     * when the import is finished, a notification is sent to
     * specified Pub/Sub topic. The message data is JSON string of a
     * [Operation][google.longrunning.Operation].
     * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
     *
     * Generated from protobuf field <code>string notification_pubsub_topic = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setNotificationPubsubTopic($var)
    {
        GPBUtil::checkString($var, True);
        $this->notification_pubsub_topic = $var;

        return $this;
    }

}

