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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.MessageAddOnContextInfo</code>
 */
class MessageAddOnContextInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint32 messageAddOnDurationInSecs = 1;</code>
     */
    protected $messageAddOnDurationInSecs = null;
    /**
     * Generated from protobuf field <code>optional .proto.MessageContextInfo.MessageAddonExpiryType messageAddOnExpiryType = 2;</code>
     */
    protected $messageAddOnExpiryType = null;

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

    /**
     * Generated from protobuf field <code>optional uint32 messageAddOnDurationInSecs = 1;</code>
     * @return int
     */
    public function getMessageAddOnDurationInSecs()
    {
        return isset($this->messageAddOnDurationInSecs) ? $this->messageAddOnDurationInSecs : 0;
    }

    public function hasMessageAddOnDurationInSecs()
    {
        return isset($this->messageAddOnDurationInSecs);
    }

    public function clearMessageAddOnDurationInSecs()
    {
        unset($this->messageAddOnDurationInSecs);
    }

    /**
     * Generated from protobuf field <code>optional uint32 messageAddOnDurationInSecs = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setMessageAddOnDurationInSecs($var)
    {
        GPBUtil::checkUint32($var);
        $this->messageAddOnDurationInSecs = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.MessageContextInfo.MessageAddonExpiryType messageAddOnExpiryType = 2;</code>
     * @return int
     */
    public function getMessageAddOnExpiryType()
    {
        return isset($this->messageAddOnExpiryType) ? $this->messageAddOnExpiryType : 0;
    }

    public function hasMessageAddOnExpiryType()
    {
        return isset($this->messageAddOnExpiryType);
    }

    public function clearMessageAddOnExpiryType()
    {
        unset($this->messageAddOnExpiryType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.MessageContextInfo.MessageAddonExpiryType messageAddOnExpiryType = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMessageAddOnExpiryType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\MessageContextInfo\MessageAddonExpiryType::class);
        $this->messageAddOnExpiryType = $var;

        return $this;
    }

}

