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

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

/**
 * PostResetOperation represents an operation to be performed on the new workflow execution after a workflow reset.
 *
 * Generated from protobuf message <code>temporal.api.workflow.v1.PostResetOperation</code>
 */
class PostResetOperation extends \Google\Protobuf\Internal\Message
{
    protected $variant;

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

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions update_workflow_options = 2;</code>
     * @return \Temporal\Api\Workflow\V1\PostResetOperation\UpdateWorkflowOptions|null
     */
    public function getUpdateWorkflowOptions()
    {
        return $this->readOneof(2);
    }

    public function hasUpdateWorkflowOptions()
    {
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions update_workflow_options = 2;</code>
     * @param \Temporal\Api\Workflow\V1\PostResetOperation\UpdateWorkflowOptions $var
     * @return $this
     */
    public function setUpdateWorkflowOptions($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\PostResetOperation\UpdateWorkflowOptions::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

