<?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.MediaRetryNotification</code>
 */
class MediaRetryNotification extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string stanzaId = 1;</code>
     */
    protected $stanzaId = null;
    /**
     * Generated from protobuf field <code>optional string directPath = 2;</code>
     */
    protected $directPath = null;
    /**
     * Generated from protobuf field <code>optional .proto.MediaRetryNotification.ResultType result = 3;</code>
     */
    protected $result = null;
    /**
     * Generated from protobuf field <code>optional bytes messageSecret = 4;</code>
     */
    protected $messageSecret = null;

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

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

    public function hasStanzaId()
    {
        return isset($this->stanzaId);
    }

    public function clearStanzaId()
    {
        unset($this->stanzaId);
    }

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

        return $this;
    }

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

    public function hasDirectPath()
    {
        return isset($this->directPath);
    }

    public function clearDirectPath()
    {
        unset($this->directPath);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.MediaRetryNotification.ResultType result = 3;</code>
     * @return int
     */
    public function getResult()
    {
        return isset($this->result) ? $this->result : 0;
    }

    public function hasResult()
    {
        return isset($this->result);
    }

    public function clearResult()
    {
        unset($this->result);
    }

    /**
     * Generated from protobuf field <code>optional .proto.MediaRetryNotification.ResultType result = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setResult($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\MediaRetryNotification\ResultType::class);
        $this->result = $var;

        return $this;
    }

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

    public function hasMessageSecret()
    {
        return isset($this->messageSecret);
    }

    public function clearMessageSecret()
    {
        unset($this->messageSecret);
    }

    /**
     * Generated from protobuf field <code>optional bytes messageSecret = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setMessageSecret($var)
    {
        GPBUtil::checkString($var, False);
        $this->messageSecret = $var;

        return $this;
    }

}

