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

namespace Google\Cloud\DocumentAI\V1\DocumentOutputConfig;

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

/**
 * The configuration used when outputting documents.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig</code>
 */
class GcsOutputConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The Cloud Storage uri (a directory) of the output.
     *
     * Generated from protobuf field <code>string gcs_uri = 1;</code>
     */
    private $gcs_uri = '';
    /**
     * Specifies which fields to include in the output documents.
     * Only supports top level document and pages field so it must be in the
     * form of `{document_field_name}` or `pages.{page_field_name}`.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 2;</code>
     */
    private $field_mask = null;
    /**
     * Specifies the sharding config for the output document.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig sharding_config = 3;</code>
     */
    private $sharding_config = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $gcs_uri
     *           The Cloud Storage uri (a directory) of the output.
     *     @type \Google\Protobuf\FieldMask $field_mask
     *           Specifies which fields to include in the output documents.
     *           Only supports top level document and pages field so it must be in the
     *           form of `{document_field_name}` or `pages.{page_field_name}`.
     *     @type \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig $sharding_config
     *           Specifies the sharding config for the output document.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce();
        parent::__construct($data);
    }

    /**
     * The Cloud Storage uri (a directory) of the output.
     *
     * Generated from protobuf field <code>string gcs_uri = 1;</code>
     * @return string
     */
    public function getGcsUri()
    {
        return $this->gcs_uri;
    }

    /**
     * The Cloud Storage uri (a directory) of the output.
     *
     * Generated from protobuf field <code>string gcs_uri = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setGcsUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->gcs_uri = $var;

        return $this;
    }

    /**
     * Specifies which fields to include in the output documents.
     * Only supports top level document and pages field so it must be in the
     * form of `{document_field_name}` or `pages.{page_field_name}`.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 2;</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getFieldMask()
    {
        return $this->field_mask;
    }

    public function hasFieldMask()
    {
        return isset($this->field_mask);
    }

    public function clearFieldMask()
    {
        unset($this->field_mask);
    }

    /**
     * Specifies which fields to include in the output documents.
     * Only supports top level document and pages field so it must be in the
     * form of `{document_field_name}` or `pages.{page_field_name}`.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 2;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setFieldMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->field_mask = $var;

        return $this;
    }

    /**
     * Specifies the sharding config for the output document.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig sharding_config = 3;</code>
     * @return \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig|null
     */
    public function getShardingConfig()
    {
        return $this->sharding_config;
    }

    public function hasShardingConfig()
    {
        return isset($this->sharding_config);
    }

    public function clearShardingConfig()
    {
        unset($this->sharding_config);
    }

    /**
     * Specifies the sharding config for the output document.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.ShardingConfig sharding_config = 3;</code>
     * @param \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig $var
     * @return $this
     */
    public function setShardingConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentOutputConfig\GcsOutputConfig\ShardingConfig::class);
        $this->sharding_config = $var;

        return $this;
    }

}


