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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Represents the configuration of importing a set of conversation files in
 * Google Cloud Storage.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.InputConfig</code>
 */
class InputConfig extends \Google\Protobuf\Internal\Message
{
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\GcsSources $gcs_source
     *           The Cloud Storage URI has the form gs://<Google Cloud Storage bucket
     *           name>//agent*.json. Wildcards are allowed and will be expanded into all
     *           matched JSON files, which will be read as one conversation per file.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce();
        parent::__construct($data);
    }

    /**
     * The Cloud Storage URI has the form gs://<Google Cloud Storage bucket
     * name>//agent*.json. Wildcards are allowed and will be expanded into all
     * matched JSON files, which will be read as one conversation per file.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GcsSources gcs_source = 1;</code>
     * @return \Google\Cloud\Dialogflow\V2\GcsSources|null
     */
    public function getGcsSource()
    {
        return $this->readOneof(1);
    }

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

    /**
     * The Cloud Storage URI has the form gs://<Google Cloud Storage bucket
     * name>//agent*.json. Wildcards are allowed and will be expanded into all
     * matched JSON files, which will be read as one conversation per file.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.GcsSources gcs_source = 1;</code>
     * @param \Google\Cloud\Dialogflow\V2\GcsSources $var
     * @return $this
     */
    public function setGcsSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsSources::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

