<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\ContextInfo;

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

/**
 * Generated from protobuf message <code>proto.ContextInfo.ForwardedNewsletterMessageInfo</code>
 */
class ForwardedNewsletterMessageInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string newsletterJid = 1;</code>
     */
    protected $newsletterJid = null;
    /**
     * Generated from protobuf field <code>optional int32 serverMessageId = 2;</code>
     */
    protected $serverMessageId = null;
    /**
     * Generated from protobuf field <code>optional string newsletterName = 3;</code>
     */
    protected $newsletterName = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType contentType = 4;</code>
     */
    protected $contentType = null;
    /**
     * Generated from protobuf field <code>optional string accessibilityText = 5;</code>
     */
    protected $accessibilityText = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $newsletterJid
     *     @type int $serverMessageId
     *     @type string $newsletterName
     *     @type int $contentType
     *     @type string $accessibilityText
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string newsletterJid = 1;</code>
     * @return string
     */
    public function getNewsletterJid()
    {
        return isset($this->newsletterJid) ? $this->newsletterJid : '';
    }

    public function hasNewsletterJid()
    {
        return isset($this->newsletterJid);
    }

    public function clearNewsletterJid()
    {
        unset($this->newsletterJid);
    }

    /**
     * Generated from protobuf field <code>optional string newsletterJid = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setNewsletterJid($var)
    {
        GPBUtil::checkString($var, True);
        $this->newsletterJid = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int32 serverMessageId = 2;</code>
     * @return int
     */
    public function getServerMessageId()
    {
        return isset($this->serverMessageId) ? $this->serverMessageId : 0;
    }

    public function hasServerMessageId()
    {
        return isset($this->serverMessageId);
    }

    public function clearServerMessageId()
    {
        unset($this->serverMessageId);
    }

    /**
     * Generated from protobuf field <code>optional int32 serverMessageId = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setServerMessageId($var)
    {
        GPBUtil::checkInt32($var);
        $this->serverMessageId = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string newsletterName = 3;</code>
     * @return string
     */
    public function getNewsletterName()
    {
        return isset($this->newsletterName) ? $this->newsletterName : '';
    }

    public function hasNewsletterName()
    {
        return isset($this->newsletterName);
    }

    public function clearNewsletterName()
    {
        unset($this->newsletterName);
    }

    /**
     * Generated from protobuf field <code>optional string newsletterName = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setNewsletterName($var)
    {
        GPBUtil::checkString($var, True);
        $this->newsletterName = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType contentType = 4;</code>
     * @return int
     */
    public function getContentType()
    {
        return isset($this->contentType) ? $this->contentType : 0;
    }

    public function hasContentType()
    {
        return isset($this->contentType);
    }

    public function clearContentType()
    {
        unset($this->contentType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType contentType = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setContentType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\ContextInfo\ForwardedNewsletterMessageInfo\ContentType::class);
        $this->contentType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string accessibilityText = 5;</code>
     * @return string
     */
    public function getAccessibilityText()
    {
        return isset($this->accessibilityText) ? $this->accessibilityText : '';
    }

    public function hasAccessibilityText()
    {
        return isset($this->accessibilityText);
    }

    public function clearAccessibilityText()
    {
        unset($this->accessibilityText);
    }

    /**
     * Generated from protobuf field <code>optional string accessibilityText = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setAccessibilityText($var)
    {
        GPBUtil::checkString($var, True);
        $this->accessibilityText = $var;

        return $this;
    }

}

