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

namespace Temporal\Api\Workflow\V1\CallbackInfo;

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

/**
 * Generated from protobuf message <code>temporal.api.workflow.v1.CallbackInfo.Trigger</code>
 */
class Trigger extends \Google\Protobuf\Internal\Message
{
    protected $variant;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Workflow\V1\CallbackInfo\WorkflowClosed $workflow_closed
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.workflow.v1.CallbackInfo.WorkflowClosed workflow_closed = 1;</code>
     * @return \Temporal\Api\Workflow\V1\CallbackInfo\WorkflowClosed|null
     */
    public function getWorkflowClosed()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Generated from protobuf field <code>.temporal.api.workflow.v1.CallbackInfo.WorkflowClosed workflow_closed = 1;</code>
     * @param \Temporal\Api\Workflow\V1\CallbackInfo\WorkflowClosed $var
     * @return $this
     */
    public function setWorkflowClosed($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\CallbackInfo\WorkflowClosed::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

