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

namespace Google\Cloud\AdvisoryNotifications\V1;

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

/**
 * A text object containing the English text and its localized copies.
 *
 * Generated from protobuf message <code>google.cloud.advisorynotifications.v1.Text</code>
 */
class Text extends \Google\Protobuf\Internal\Message
{
    /**
     * The English copy.
     *
     * Generated from protobuf field <code>string en_text = 1;</code>
     */
    protected $en_text = '';
    /**
     * The requested localized copy (if applicable).
     *
     * Generated from protobuf field <code>string localized_text = 2;</code>
     */
    protected $localized_text = '';
    /**
     * Status of the localization.
     *
     * Generated from protobuf field <code>.google.cloud.advisorynotifications.v1.LocalizationState localization_state = 3;</code>
     */
    protected $localization_state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $en_text
     *           The English copy.
     *     @type string $localized_text
     *           The requested localized copy (if applicable).
     *     @type int $localization_state
     *           Status of the localization.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Advisorynotifications\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * The English copy.
     *
     * Generated from protobuf field <code>string en_text = 1;</code>
     * @return string
     */
    public function getEnText()
    {
        return $this->en_text;
    }

    /**
     * The English copy.
     *
     * Generated from protobuf field <code>string en_text = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setEnText($var)
    {
        GPBUtil::checkString($var, True);
        $this->en_text = $var;

        return $this;
    }

    /**
     * The requested localized copy (if applicable).
     *
     * Generated from protobuf field <code>string localized_text = 2;</code>
     * @return string
     */
    public function getLocalizedText()
    {
        return $this->localized_text;
    }

    /**
     * The requested localized copy (if applicable).
     *
     * Generated from protobuf field <code>string localized_text = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setLocalizedText($var)
    {
        GPBUtil::checkString($var, True);
        $this->localized_text = $var;

        return $this;
    }

    /**
     * Status of the localization.
     *
     * Generated from protobuf field <code>.google.cloud.advisorynotifications.v1.LocalizationState localization_state = 3;</code>
     * @return int
     */
    public function getLocalizationState()
    {
        return $this->localization_state;
    }

    /**
     * Status of the localization.
     *
     * Generated from protobuf field <code>.google.cloud.advisorynotifications.v1.LocalizationState localization_state = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setLocalizationState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AdvisoryNotifications\V1\LocalizationState::class);
        $this->localization_state = $var;

        return $this;
    }

}

