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

namespace Google\Cloud\DocumentAI\V1;

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

/**
 * The schema defines the output of the processed document by a processor.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.DocumentSchema</code>
 */
class DocumentSchema extends \Google\Protobuf\Internal\Message
{
    /**
     * Display name to show to users.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     */
    protected $display_name = '';
    /**
     * Description of the schema.
     *
     * Generated from protobuf field <code>string description = 2;</code>
     */
    protected $description = '';
    /**
     * Entity types of the schema.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.DocumentSchema.EntityType entity_types = 3;</code>
     */
    private $entity_types;
    /**
     * Metadata of the schema.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentSchema.Metadata metadata = 4;</code>
     */
    protected $metadata = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $display_name
     *           Display name to show to users.
     *     @type string $description
     *           Description of the schema.
     *     @type array<\Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types
     *           Entity types of the schema.
     *     @type \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata $metadata
     *           Metadata of the schema.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\DocumentSchema::initOnce();
        parent::__construct($data);
    }

    /**
     * Display name to show to users.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Display name to show to users.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Description of the schema.
     *
     * Generated from protobuf field <code>string description = 2;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Description of the schema.
     *
     * Generated from protobuf field <code>string description = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Entity types of the schema.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.DocumentSchema.EntityType entity_types = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEntityTypes()
    {
        return $this->entity_types;
    }

    /**
     * Entity types of the schema.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.DocumentSchema.EntityType entity_types = 3;</code>
     * @param array<\Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEntityTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\DocumentSchema\EntityType::class);
        $this->entity_types = $arr;

        return $this;
    }

    /**
     * Metadata of the schema.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentSchema.Metadata metadata = 4;</code>
     * @return \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata|null
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    public function hasMetadata()
    {
        return isset($this->metadata);
    }

    public function clearMetadata()
    {
        unset($this->metadata);
    }

    /**
     * Metadata of the schema.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentSchema.Metadata metadata = 4;</code>
     * @param \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata $var
     * @return $this
     */
    public function setMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema\Metadata::class);
        $this->metadata = $var;

        return $this;
    }

}

