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

namespace Google\Cloud\DocumentAI\V1;

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

/**
 * The common config to specify a set of documents used as input.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.BatchDocumentsInputConfig</code>
 */
class BatchDocumentsInputConfig extends \Google\Protobuf\Internal\Message
{
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DocumentAI\V1\GcsPrefix $gcs_prefix
     *           The set of documents that match the specified Cloud Storage `gcs_prefix`.
     *     @type \Google\Cloud\DocumentAI\V1\GcsDocuments $gcs_documents
     *           The set of documents individually specified on Cloud Storage.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce();
        parent::__construct($data);
    }

    /**
     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.GcsPrefix gcs_prefix = 1;</code>
     * @return \Google\Cloud\DocumentAI\V1\GcsPrefix|null
     */
    public function getGcsPrefix()
    {
        return $this->readOneof(1);
    }

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

    /**
     * The set of documents that match the specified Cloud Storage `gcs_prefix`.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.GcsPrefix gcs_prefix = 1;</code>
     * @param \Google\Cloud\DocumentAI\V1\GcsPrefix $var
     * @return $this
     */
    public function setGcsPrefix($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\GcsPrefix::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The set of documents individually specified on Cloud Storage.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.GcsDocuments gcs_documents = 2;</code>
     * @return \Google\Cloud\DocumentAI\V1\GcsDocuments|null
     */
    public function getGcsDocuments()
    {
        return $this->readOneof(2);
    }

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

    /**
     * The set of documents individually specified on Cloud Storage.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.GcsDocuments gcs_documents = 2;</code>
     * @param \Google\Cloud\DocumentAI\V1\GcsDocuments $var
     * @return $this
     */
    public function setGcsDocuments($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\GcsDocuments::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

