<?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\RespondWorkflowTaskCompletedRequest;

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

/**
 * SDK capability details.
 *
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities</code>
 */
class Capabilities extends \Google\Protobuf\Internal\Message
{
    /**
     * True if the SDK can handle speculative workflow task with command events. If true, the
     * server may choose, at its discretion, to discard a speculative workflow task even if that
     * speculative task included command events the SDK had not previously processed.
     * (-- api-linter: core::0140::prepositions=disabled
     *     aip.dev/not-precedent: "with" used to describe the workflow task. --)
     *
     * Generated from protobuf field <code>bool discard_speculative_workflow_task_with_events = 1;</code>
     */
    protected $discard_speculative_workflow_task_with_events = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $discard_speculative_workflow_task_with_events
     *           True if the SDK can handle speculative workflow task with command events. If true, the
     *           server may choose, at its discretion, to discard a speculative workflow task even if that
     *           speculative task included command events the SDK had not previously processed.
     *           (-- api-linter: core::0140::prepositions=disabled
     *               aip.dev/not-precedent: "with" used to describe the workflow task. --)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * True if the SDK can handle speculative workflow task with command events. If true, the
     * server may choose, at its discretion, to discard a speculative workflow task even if that
     * speculative task included command events the SDK had not previously processed.
     * (-- api-linter: core::0140::prepositions=disabled
     *     aip.dev/not-precedent: "with" used to describe the workflow task. --)
     *
     * Generated from protobuf field <code>bool discard_speculative_workflow_task_with_events = 1;</code>
     * @return bool
     */
    public function getDiscardSpeculativeWorkflowTaskWithEvents()
    {
        return $this->discard_speculative_workflow_task_with_events;
    }

    /**
     * True if the SDK can handle speculative workflow task with command events. If true, the
     * server may choose, at its discretion, to discard a speculative workflow task even if that
     * speculative task included command events the SDK had not previously processed.
     * (-- api-linter: core::0140::prepositions=disabled
     *     aip.dev/not-precedent: "with" used to describe the workflow task. --)
     *
     * Generated from protobuf field <code>bool discard_speculative_workflow_task_with_events = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setDiscardSpeculativeWorkflowTaskWithEvents($var)
    {
        GPBUtil::checkBool($var);
        $this->discard_speculative_workflow_task_with_events = $var;

        return $this;
    }

}

