<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/translate/v3/translation_service.proto

namespace Google\Cloud\Translate\V3;

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

/**
 * Input configuration for BatchTranslateDocument request.
 *
 * Generated from protobuf message <code>google.cloud.translation.v3.BatchDocumentInputConfig</code>
 */
class BatchDocumentInputConfig extends \Google\Protobuf\Internal\Message
{
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Translate\V3\GcsSource $gcs_source
     *           Google Cloud Storage location for the source input.
     *           This can be a single file (for example,
     *           `gs://translation-test/input.docx`) or a wildcard (for example,
     *           `gs://translation-test/&#42;`).
     *           File mime type is determined based on extension. Supported mime type
     *           includes:
     *           - `pdf`, application/pdf
     *           - `docx`,
     *           application/vnd.openxmlformats-officedocument.wordprocessingml.document
     *           - `pptx`,
     *           application/vnd.openxmlformats-officedocument.presentationml.presentation
     *           - `xlsx`,
     *           application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
     *           The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
     *           The max file size to support for `.pdf` is 1GB and the max page limit is
     *           1000 pages.
     *           The max file size to support for all input documents is 1GB.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Google Cloud Storage location for the source input.
     * This can be a single file (for example,
     * `gs://translation-test/input.docx`) or a wildcard (for example,
     * `gs://translation-test/&#42;`).
     * File mime type is determined based on extension. Supported mime type
     * includes:
     * - `pdf`, application/pdf
     * - `docx`,
     * application/vnd.openxmlformats-officedocument.wordprocessingml.document
     * - `pptx`,
     * application/vnd.openxmlformats-officedocument.presentationml.presentation
     * - `xlsx`,
     * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
     * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
     * The max file size to support for `.pdf` is 1GB and the max page limit is
     * 1000 pages.
     * The max file size to support for all input documents is 1GB.
     *
     * Generated from protobuf field <code>.google.cloud.translation.v3.GcsSource gcs_source = 1;</code>
     * @return \Google\Cloud\Translate\V3\GcsSource|null
     */
    public function getGcsSource()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Google Cloud Storage location for the source input.
     * This can be a single file (for example,
     * `gs://translation-test/input.docx`) or a wildcard (for example,
     * `gs://translation-test/&#42;`).
     * File mime type is determined based on extension. Supported mime type
     * includes:
     * - `pdf`, application/pdf
     * - `docx`,
     * application/vnd.openxmlformats-officedocument.wordprocessingml.document
     * - `pptx`,
     * application/vnd.openxmlformats-officedocument.presentationml.presentation
     * - `xlsx`,
     * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
     * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB.
     * The max file size to support for `.pdf` is 1GB and the max page limit is
     * 1000 pages.
     * The max file size to support for all input documents is 1GB.
     *
     * Generated from protobuf field <code>.google.cloud.translation.v3.GcsSource gcs_source = 1;</code>
     * @param \Google\Cloud\Translate\V3\GcsSource $var
     * @return $this
     */
    public function setGcsSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsSource::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

