<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/worker/v1/message.proto

namespace Temporal\Api\Worker\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.worker.v1.WorkerInfo</code>
 */
class WorkerInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 1;</code>
     */
    protected $worker_heartbeat = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Worker\V1\WorkerHeartbeat $worker_heartbeat
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Worker\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 1;</code>
     * @return \Temporal\Api\Worker\V1\WorkerHeartbeat|null
     */
    public function getWorkerHeartbeat()
    {
        return $this->worker_heartbeat;
    }

    public function hasWorkerHeartbeat()
    {
        return isset($this->worker_heartbeat);
    }

    public function clearWorkerHeartbeat()
    {
        unset($this->worker_heartbeat);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 1;</code>
     * @param \Temporal\Api\Worker\V1\WorkerHeartbeat $var
     * @return $this
     */
    public function setWorkerHeartbeat($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Worker\V1\WorkerHeartbeat::class);
        $this->worker_heartbeat = $var;

        return $this;
    }

}

