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

namespace Temporal\Api\Taskqueue\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.taskqueue.v1.PollerInfo</code>
 */
class PollerInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_access_time = 1;</code>
     */
    protected $last_access_time = null;
    /**
     * Generated from protobuf field <code>string identity = 2;</code>
     */
    protected $identity = '';
    /**
     * Generated from protobuf field <code>double rate_per_second = 3;</code>
     */
    protected $rate_per_second = 0.0;
    /**
     * If a worker has opted into the worker versioning feature while polling, its capabilities will
     * appear here.
     * Deprecated. Replaced by deployment_options.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4 [deprecated = true];</code>
     * @deprecated
     */
    protected $worker_version_capabilities = null;
    /**
     * Worker deployment options that SDK sent to server.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 5;</code>
     */
    protected $deployment_options = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Timestamp $last_access_time
     *     @type string $identity
     *     @type float $rate_per_second
     *     @type \Temporal\Api\Common\V1\WorkerVersionCapabilities $worker_version_capabilities
     *           If a worker has opted into the worker versioning feature while polling, its capabilities will
     *           appear here.
     *           Deprecated. Replaced by deployment_options.
     *     @type \Temporal\Api\Deployment\V1\WorkerDeploymentOptions $deployment_options
     *           Worker deployment options that SDK sent to server.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_access_time = 1;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastAccessTime()
    {
        return $this->last_access_time;
    }

    public function hasLastAccessTime()
    {
        return isset($this->last_access_time);
    }

    public function clearLastAccessTime()
    {
        unset($this->last_access_time);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_access_time = 1;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastAccessTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_access_time = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string identity = 2;</code>
     * @return string
     */
    public function getIdentity()
    {
        return $this->identity;
    }

    /**
     * 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>double rate_per_second = 3;</code>
     * @return float
     */
    public function getRatePerSecond()
    {
        return $this->rate_per_second;
    }

    /**
     * Generated from protobuf field <code>double rate_per_second = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setRatePerSecond($var)
    {
        GPBUtil::checkDouble($var);
        $this->rate_per_second = $var;

        return $this;
    }

    /**
     * If a worker has opted into the worker versioning feature while polling, its capabilities will
     * appear here.
     * Deprecated. Replaced by deployment_options.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4 [deprecated = true];</code>
     * @return \Temporal\Api\Common\V1\WorkerVersionCapabilities|null
     * @deprecated
     */
    public function getWorkerVersionCapabilities()
    {
        if (isset($this->worker_version_capabilities)) {
            @trigger_error('worker_version_capabilities is deprecated.', E_USER_DEPRECATED);
        }
        return $this->worker_version_capabilities;
    }

    public function hasWorkerVersionCapabilities()
    {
        if (isset($this->worker_version_capabilities)) {
            @trigger_error('worker_version_capabilities is deprecated.', E_USER_DEPRECATED);
        }
        return isset($this->worker_version_capabilities);
    }

    public function clearWorkerVersionCapabilities()
    {
        @trigger_error('worker_version_capabilities is deprecated.', E_USER_DEPRECATED);
        unset($this->worker_version_capabilities);
    }

    /**
     * If a worker has opted into the worker versioning feature while polling, its capabilities will
     * appear here.
     * Deprecated. Replaced by deployment_options.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkerVersionCapabilities worker_version_capabilities = 4 [deprecated = true];</code>
     * @param \Temporal\Api\Common\V1\WorkerVersionCapabilities $var
     * @return $this
     * @deprecated
     */
    public function setWorkerVersionCapabilities($var)
    {
        @trigger_error('worker_version_capabilities is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionCapabilities::class);
        $this->worker_version_capabilities = $var;

        return $this;
    }

    /**
     * Worker deployment options that SDK sent to server.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 5;</code>
     * @return \Temporal\Api\Deployment\V1\WorkerDeploymentOptions|null
     */
    public function getDeploymentOptions()
    {
        return $this->deployment_options;
    }

    public function hasDeploymentOptions()
    {
        return isset($this->deployment_options);
    }

    public function clearDeploymentOptions()
    {
        unset($this->deployment_options);
    }

    /**
     * Worker deployment options that SDK sent to server.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 5;</code>
     * @param \Temporal\Api\Deployment\V1\WorkerDeploymentOptions $var
     * @return $this
     */
    public function setDeploymentOptions($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Deployment\V1\WorkerDeploymentOptions::class);
        $this->deployment_options = $var;

        return $this;
    }

}

