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

namespace Temporal\Api\Rules\V1;

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

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

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

    /**
     * Generated from protobuf field <code>.temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause activity_pause = 1;</code>
     * @return \Temporal\Api\Rules\V1\WorkflowRuleAction\ActionActivityPause|null
     */
    public function getActivityPause()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Generated from protobuf field <code>.temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause activity_pause = 1;</code>
     * @param \Temporal\Api\Rules\V1\WorkflowRuleAction\ActionActivityPause $var
     * @return $this
     */
    public function setActivityPause($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Rules\V1\WorkflowRuleAction\ActionActivityPause::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

