<?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.DisappearingMode</code>
 */
class DisappearingMode extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.DisappearingMode.Initiator initiator = 1;</code>
     */
    protected $initiator = null;
    /**
     * Generated from protobuf field <code>optional .proto.DisappearingMode.Trigger trigger = 2;</code>
     */
    protected $trigger = null;
    /**
     * Generated from protobuf field <code>optional string initiatorDeviceJid = 3;</code>
     */
    protected $initiatorDeviceJid = null;
    /**
     * Generated from protobuf field <code>optional bool initiatedByMe = 4;</code>
     */
    protected $initiatedByMe = null;

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

    /**
     * Generated from protobuf field <code>optional .proto.DisappearingMode.Initiator initiator = 1;</code>
     * @return int
     */
    public function getInitiator()
    {
        return isset($this->initiator) ? $this->initiator : 0;
    }

    public function hasInitiator()
    {
        return isset($this->initiator);
    }

    public function clearInitiator()
    {
        unset($this->initiator);
    }

    /**
     * Generated from protobuf field <code>optional .proto.DisappearingMode.Initiator initiator = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setInitiator($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\DisappearingMode\Initiator::class);
        $this->initiator = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.DisappearingMode.Trigger trigger = 2;</code>
     * @return int
     */
    public function getTrigger()
    {
        return isset($this->trigger) ? $this->trigger : 0;
    }

    public function hasTrigger()
    {
        return isset($this->trigger);
    }

    public function clearTrigger()
    {
        unset($this->trigger);
    }

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

        return $this;
    }

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

    public function hasInitiatorDeviceJid()
    {
        return isset($this->initiatorDeviceJid);
    }

    public function clearInitiatorDeviceJid()
    {
        unset($this->initiatorDeviceJid);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool initiatedByMe = 4;</code>
     * @return bool
     */
    public function getInitiatedByMe()
    {
        return isset($this->initiatedByMe) ? $this->initiatedByMe : false;
    }

    public function hasInitiatedByMe()
    {
        return isset($this->initiatedByMe);
    }

    public function clearInitiatedByMe()
    {
        unset($this->initiatedByMe);
    }

    /**
     * Generated from protobuf field <code>optional bool initiatedByMe = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setInitiatedByMe($var)
    {
        GPBUtil::checkBool($var);
        $this->initiatedByMe = $var;

        return $this;
    }

}

