<?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.UpdateWorkerConfigResponse</code>
 */
class UpdateWorkerConfigResponse extends \Google\Protobuf\Internal\Message
{
    protected $response;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Sdk\V1\WorkerConfig $worker_config
     *           The worker configuration. Will be returned if the command was sent to a single worker.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * The worker configuration. Will be returned if the command was sent to a single worker.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.WorkerConfig worker_config = 1;</code>
     * @return \Temporal\Api\Sdk\V1\WorkerConfig|null
     */
    public function getWorkerConfig()
    {
        return $this->readOneof(1);
    }

    public function hasWorkerConfig()
    {
        return $this->hasOneof(1);
    }

    /**
     * The worker configuration. Will be returned if the command was sent to a single worker.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.WorkerConfig worker_config = 1;</code>
     * @param \Temporal\Api\Sdk\V1\WorkerConfig $var
     * @return $this
     */
    public function setWorkerConfig($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\WorkerConfig::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getResponse()
    {
        return $this->whichOneof("response");
    }

}

