<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




class MessageAssociation extends \Google\Protobuf\Internal\Message
{
    


    protected $associationType = null;
    


    protected $parentMessageKey = null;
    


    protected $messageIndex = null;

    










    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    



    public function getAssociationType()
    {
        return isset($this->associationType) ? $this->associationType : 0;
    }

    public function hasAssociationType()
    {
        return isset($this->associationType);
    }

    public function clearAssociationType()
    {
        unset($this->associationType);
    }

    




    public function setAssociationType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\MessageAssociation\AssociationType::class);
        $this->associationType = $var;

        return $this;
    }

    



    public function getParentMessageKey()
    {
        return $this->parentMessageKey;
    }

    public function hasParentMessageKey()
    {
        return isset($this->parentMessageKey);
    }

    public function clearParentMessageKey()
    {
        unset($this->parentMessageKey);
    }

    




    public function setParentMessageKey($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\MessageKey::class);
        $this->parentMessageKey = $var;

        return $this;
    }

    



    public function getMessageIndex()
    {
        return isset($this->messageIndex) ? $this->messageIndex : 0;
    }

    public function hasMessageIndex()
    {
        return isset($this->messageIndex);
    }

    public function clearMessageIndex()
    {
        unset($this->messageIndex);
    }

    




    public function setMessageIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->messageIndex = $var;

        return $this;
    }

}

