<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datalabeling/v1beta1/dataset.proto

namespace Google\Cloud\DataLabeling\V1beta1;

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

/**
 * Metadata for the text.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.TextMetadata</code>
 */
class TextMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The language of this text, as a
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
     * Default value is en-US.
     *
     * Generated from protobuf field <code>string language_code = 1;</code>
     */
    private $language_code = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $language_code
     *           The language of this text, as a
     *           [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
     *           Default value is en-US.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\Dataset::initOnce();
        parent::__construct($data);
    }

    /**
     * The language of this text, as a
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
     * Default value is en-US.
     *
     * Generated from protobuf field <code>string language_code = 1;</code>
     * @return string
     */
    public function getLanguageCode()
    {
        return $this->language_code;
    }

    /**
     * The language of this text, as a
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
     * Default value is en-US.
     *
     * Generated from protobuf field <code>string language_code = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->language_code = $var;

        return $this;
    }

}

