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

namespace Temporal\Api\Batch\V1;

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

/**
 * BatchOperationTermination sends terminate requests to batch workflows.
 * Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest.
 * Ignore first_execution_run_id because this is used for single workflow operation.
 *
 * Generated from protobuf message <code>temporal.api.batch.v1.BatchOperationTermination</code>
 */
class BatchOperationTermination extends \Google\Protobuf\Internal\Message
{
    /**
     * Serialized value(s) to provide to the termination event
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads details = 1;</code>
     */
    protected $details = null;
    /**
     * The identity of the worker/client
     *
     * Generated from protobuf field <code>string identity = 2;</code>
     */
    protected $identity = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Common\V1\Payloads $details
     *           Serialized value(s) to provide to the termination event
     *     @type string $identity
     *           The identity of the worker/client
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Serialized value(s) to provide to the termination event
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads details = 1;</code>
     * @return \Temporal\Api\Common\V1\Payloads|null
     */
    public function getDetails()
    {
        return $this->details;
    }

    public function hasDetails()
    {
        return isset($this->details);
    }

    public function clearDetails()
    {
        unset($this->details);
    }

    /**
     * Serialized value(s) to provide to the termination event
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads details = 1;</code>
     * @param \Temporal\Api\Common\V1\Payloads $var
     * @return $this
     */
    public function setDetails($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class);
        $this->details = $var;

        return $this;
    }

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

    /**
     * The identity of the worker/client
     *
     * 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;
    }

}

