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

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

/**
 * Activity trigger will be triggered when an activity is about to start.
 *
 * Generated from protobuf message <code>temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTrigger</code>
 */
class ActivityStartingTrigger extends \Google\Protobuf\Internal\Message
{
    /**
     * Activity predicate is a SQL-like string filter parameter.
     * It is used to match against workflow data.
     * The following activity attributes are supported as part of the predicate:
     * - ActivityType: An Activity Type is the mapping of a name to an Activity Definition..
     * - ActivityId: The ID of the activity.
     * - ActivityAttempt: The number attempts of the activity.
     * - BackoffInterval: The current amount of time between scheduled attempts of the activity.
     * - ActivityStatus: The status of the activity. Can be one of "Scheduled", "Started", "Paused".
     * - TaskQueue: The name of the task queue the workflow specified that the activity should run on.
     * Activity predicate support the following operators:
     *  * =, !=, >, >=, <, <=
     *  * AND, OR, ()
     *  * BETWEEN ... AND
     *    STARTS_WITH
     *
     * Generated from protobuf field <code>string predicate = 1;</code>
     */
    protected $predicate = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $predicate
     *           Activity predicate is a SQL-like string filter parameter.
     *           It is used to match against workflow data.
     *           The following activity attributes are supported as part of the predicate:
     *           - ActivityType: An Activity Type is the mapping of a name to an Activity Definition..
     *           - ActivityId: The ID of the activity.
     *           - ActivityAttempt: The number attempts of the activity.
     *           - BackoffInterval: The current amount of time between scheduled attempts of the activity.
     *           - ActivityStatus: The status of the activity. Can be one of "Scheduled", "Started", "Paused".
     *           - TaskQueue: The name of the task queue the workflow specified that the activity should run on.
     *           Activity predicate support the following operators:
     *            * =, !=, >, >=, <, <=
     *            * AND, OR, ()
     *            * BETWEEN ... AND
     *              STARTS_WITH
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Rules\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Activity predicate is a SQL-like string filter parameter.
     * It is used to match against workflow data.
     * The following activity attributes are supported as part of the predicate:
     * - ActivityType: An Activity Type is the mapping of a name to an Activity Definition..
     * - ActivityId: The ID of the activity.
     * - ActivityAttempt: The number attempts of the activity.
     * - BackoffInterval: The current amount of time between scheduled attempts of the activity.
     * - ActivityStatus: The status of the activity. Can be one of "Scheduled", "Started", "Paused".
     * - TaskQueue: The name of the task queue the workflow specified that the activity should run on.
     * Activity predicate support the following operators:
     *  * =, !=, >, >=, <, <=
     *  * AND, OR, ()
     *  * BETWEEN ... AND
     *    STARTS_WITH
     *
     * Generated from protobuf field <code>string predicate = 1;</code>
     * @return string
     */
    public function getPredicate()
    {
        return $this->predicate;
    }

    /**
     * Activity predicate is a SQL-like string filter parameter.
     * It is used to match against workflow data.
     * The following activity attributes are supported as part of the predicate:
     * - ActivityType: An Activity Type is the mapping of a name to an Activity Definition..
     * - ActivityId: The ID of the activity.
     * - ActivityAttempt: The number attempts of the activity.
     * - BackoffInterval: The current amount of time between scheduled attempts of the activity.
     * - ActivityStatus: The status of the activity. Can be one of "Scheduled", "Started", "Paused".
     * - TaskQueue: The name of the task queue the workflow specified that the activity should run on.
     * Activity predicate support the following operators:
     *  * =, !=, >, >=, <, <=
     *  * AND, OR, ()
     *  * BETWEEN ... AND
     *    STARTS_WITH
     *
     * Generated from protobuf field <code>string predicate = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPredicate($var)
    {
        GPBUtil::checkString($var, True);
        $this->predicate = $var;

        return $this;
    }

}

