<?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.QueryWorkflowResponse</code>
 */
class QueryWorkflowResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads query_result = 1;</code>
     */
    protected $query_result = null;
    /**
     * Generated from protobuf field <code>.temporal.api.query.v1.QueryRejected query_rejected = 2;</code>
     */
    protected $query_rejected = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Common\V1\Payloads $query_result
     *     @type \Temporal\Api\Query\V1\QueryRejected $query_rejected
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads query_result = 1;</code>
     * @return \Temporal\Api\Common\V1\Payloads|null
     */
    public function getQueryResult()
    {
        return $this->query_result;
    }

    public function hasQueryResult()
    {
        return isset($this->query_result);
    }

    public function clearQueryResult()
    {
        unset($this->query_result);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads query_result = 1;</code>
     * @param \Temporal\Api\Common\V1\Payloads $var
     * @return $this
     */
    public function setQueryResult($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class);
        $this->query_result = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.query.v1.QueryRejected query_rejected = 2;</code>
     * @return \Temporal\Api\Query\V1\QueryRejected|null
     */
    public function getQueryRejected()
    {
        return $this->query_rejected;
    }

    public function hasQueryRejected()
    {
        return isset($this->query_rejected);
    }

    public function clearQueryRejected()
    {
        unset($this->query_rejected);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.query.v1.QueryRejected query_rejected = 2;</code>
     * @param \Temporal\Api\Query\V1\QueryRejected $var
     * @return $this
     */
    public function setQueryRejected($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Query\V1\QueryRejected::class);
        $this->query_rejected = $var;

        return $this;
    }

}

