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

namespace Temporal\Api\Workflowservice\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest</code>
 */
class RecordWorkerHeartbeatRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Namespace this worker belongs to.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * The identity of the client who initiated this request.
     *
     * Generated from protobuf field <code>string identity = 2;</code>
     */
    protected $identity = '';
    /**
     * Generated from protobuf field <code>repeated .temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 3;</code>
     */
    private $worker_heartbeat;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *           Namespace this worker belongs to.
     *     @type string $identity
     *           The identity of the client who initiated this request.
     *     @type \Temporal\Api\Worker\V1\WorkerHeartbeat[] $worker_heartbeat
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Namespace this worker belongs to.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @return string
     */
    public function getNamespace()
    {
        return $this->namespace;
    }

    /**
     * Namespace this worker belongs to.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->namespace = $var;

        return $this;
    }

    /**
     * The identity of the client who initiated this request.
     *
     * Generated from protobuf field <code>string identity = 2;</code>
     * @return string
     */
    public function getIdentity()
    {
        return $this->identity;
    }

    /**
     * The identity of the client who initiated this request.
     *
     * Generated from protobuf field <code>string identity = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->identity = $var;

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>repeated .temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 3;</code>
     * @param \Temporal\Api\Worker\V1\WorkerHeartbeat[] $var
     * @return $this
     */
    public function setWorkerHeartbeat($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Worker\V1\WorkerHeartbeat::class);
        $this->worker_heartbeat = $arr;

        return $this;
    }

}

