<?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.ThreadID</code>
 */
class ThreadID extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.ThreadID.ThreadType threadType = 1;</code>
     */
    protected $threadType = null;
    /**
     * Generated from protobuf field <code>optional .proto.MessageKey threadKey = 2;</code>
     */
    protected $threadKey = null;

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

    /**
     * Generated from protobuf field <code>optional .proto.ThreadID.ThreadType threadType = 1;</code>
     * @return int
     */
    public function getThreadType()
    {
        return isset($this->threadType) ? $this->threadType : 0;
    }

    public function hasThreadType()
    {
        return isset($this->threadType);
    }

    public function clearThreadType()
    {
        unset($this->threadType);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.MessageKey threadKey = 2;</code>
     * @return \PhpWA\Protocol\Proto\MessageKey|null
     */
    public function getThreadKey()
    {
        return $this->threadKey;
    }

    public function hasThreadKey()
    {
        return isset($this->threadKey);
    }

    public function clearThreadKey()
    {
        unset($this->threadKey);
    }

    /**
     * Generated from protobuf field <code>optional .proto.MessageKey threadKey = 2;</code>
     * @param \PhpWA\Protocol\Proto\MessageKey $var
     * @return $this
     */
    public function setThreadKey($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\MessageKey::class);
        $this->threadKey = $var;

        return $this;
    }

}

