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

namespace PhpWA\Protocol\Proto\StatusAttribution\StatusReshare;

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

/**
 * Generated from protobuf message <code>proto.StatusAttribution.StatusReshare.Metadata</code>
 */
class Metadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional int32 duration = 1;</code>
     */
    protected $duration = null;
    /**
     * Generated from protobuf field <code>optional string channelJid = 2;</code>
     */
    protected $channelJid = null;
    /**
     * Generated from protobuf field <code>optional int32 channelMessageId = 3;</code>
     */
    protected $channelMessageId = null;
    /**
     * Generated from protobuf field <code>optional bool hasMultipleReshares = 4;</code>
     */
    protected $hasMultipleReshares = null;

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

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

    public function hasDuration()
    {
        return isset($this->duration);
    }

    public function clearDuration()
    {
        unset($this->duration);
    }

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

        return $this;
    }

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

    public function hasChannelJid()
    {
        return isset($this->channelJid);
    }

    public function clearChannelJid()
    {
        unset($this->channelJid);
    }

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

        return $this;
    }

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

    public function hasChannelMessageId()
    {
        return isset($this->channelMessageId);
    }

    public function clearChannelMessageId()
    {
        unset($this->channelMessageId);
    }

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

        return $this;
    }

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

    public function hasHasMultipleReshares()
    {
        return isset($this->hasMultipleReshares);
    }

    public function clearHasMultipleReshares()
    {
        unset($this->hasMultipleReshares);
    }

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

        return $this;
    }

}

