---
sidebar:
  hidden: true
title: roboto.domain.actions.trigger_view
---
## Module Contents

### TriggerOnEvent

```python
class roboto.domain.actions.trigger_view.TriggerOnEvent(/, **data: Any)
```

`from roboto.domain.actions import TriggerOnEvent`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger_view.py#L47-L63)

Bases: `pydantic.BaseModel`

Properties specific to event-driven triggers.

**Parameters**

- **data** (`Any`)

**Attributes**

- **TriggerOnEvent.additional_inputs** (`list[str] | None`) = `None`: Optional additional file patterns to include.
- **TriggerOnEvent.causes** (`list[roboto.domain.actions.trigger_record.TriggerEvaluationCause]`): One or more events that cause the trigger to be evaluated.
- **TriggerOnEvent.condition** (`roboto.query.ConditionType | None`) = `None`: Optional condition that must be met for trigger to fire.
- **TriggerOnEvent.for_each** (`roboto.domain.actions.trigger_record.TriggerForEachPrimitive`): Granularity of trigger execution.
- **TriggerOnEvent.required_inputs** (`list[str]`): File patterns that must be present for trigger to fire.

### TriggerOnSchedule

```python
class roboto.domain.actions.trigger_view.TriggerOnSchedule(/, **data: Any)
```

`from roboto.domain.actions import TriggerOnSchedule`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger_view.py#L66-L76)

Bases: `pydantic.BaseModel`

Properties specific to scheduled triggers.

**Parameters**

- **data** (`Any`)

**Attributes**

- **TriggerOnSchedule.invocation_input** (`roboto.domain.actions.invocation_record.InvocationInput | None`) = `None`: Input specification for each scheduled invocation.
- **TriggerOnSchedule.next_occurrence** (`datetime.datetime | None`) = `None`: Next scheduled invocation time.
- **TriggerOnSchedule.schedule** (`str`): Recurring invocation schedule.

### TriggerType

```python
class roboto.domain.actions.trigger_view.TriggerType
```

`from roboto.domain.actions import TriggerType`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger_view.py#L33-L44)

Bases: `roboto.compat.StrEnum`

Types of triggers supported by the Roboto platform.

**Attributes**

- **TriggerType.EventDriven** = `'event_driven'`: A trigger that invokes its target action in response to an event.

  See [`TriggerEvaluationCause`](/reference/python-sdk/roboto/domain/actions/trigger_record#roboto.domain.actions.trigger_record.TriggerEvaluationCause) for the currently supported causes for event-driven triggers to be evaluated.

- **TriggerType.Scheduled** = `'scheduled'`: A trigger that invokes its target action on a recurring schedule.

### TriggerView

```python
class roboto.domain.actions.trigger_view.TriggerView(/, **data: Any)
```

`from roboto.domain.actions import TriggerView`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger_view.py#L79-L214)

Bases: `pydantic.BaseModel`

Unified data model for all Roboto trigger types.

**Parameters**

- **data** (`Any`)

**Attributes**

- **TriggerView.action** (`roboto.domain.actions.action_record.ActionReference`): Reference to the trigger's target action.
- **TriggerView.compute_requirement_overrides** (`roboto.domain.actions.action_record.ComputeRequirements | None`) = `None`: Optional compute requirement overrides.
- **TriggerView.container_parameter_overrides** (`roboto.domain.actions.action_record.ContainerParameters | None`) = `None`: Optional container parameter overrides.
- **TriggerView.created** (`datetime.datetime`): Creation time for the scheduled trigger.
- **TriggerView.created_by** (`str`): User who created the scheduled trigger.
- **TriggerView.enabled** (`bool`): True if the trigger is enabled.
- **TriggerView.invocation_upload_destination** (`roboto.domain.actions.invocation_record.InvocationUploadDestination | None`) = `None`: Optional default upload destination for action invocations.
- **TriggerView.modified** (`datetime.datetime`): Latest modification time for the scheduled trigger.
- **TriggerView.modified_by** (`str`): User who last modified this scheduled trigger.
- **TriggerView.name** (`str`): Trigger name. Unique within an organization and trigger type.
- **TriggerView.on_event** (`TriggerOnEvent | None`) = `None`: Properties of triggers that fire on events (`TriggerType.EventDriven`).
- **TriggerView.on_schedule** (`TriggerOnSchedule | None`) = `None`: Properties of triggers that fire on a recurring schedule (`TriggerType.Scheduled`).
- **TriggerView.org_id** (`str`): Organization ID which owns the scheduled trigger.
- **TriggerView.parameter_values** (`dict[str, Any] | None`) = `None`: Optional action parameter values.
- **TriggerView.service_user_id** (`str`): Service user ID for authentication.
- **TriggerView.timeout** (`int | None`) = `None`: Optional invocation timeout, in minutes.
- **TriggerView.trigger_id** (`str`): Unique trigger ID.
- **TriggerView.trigger_type** (`TriggerType`): Trigger type.

#### TriggerView.to_event_trigger_record()

```python
def to_event_trigger_record() -> Optional[roboto.domain.actions.trigger_record.TriggerRecord]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger_view.py#L136-L173)

Convert this trigger view into a [`TriggerRecord`](/reference/python-sdk/roboto/domain/actions/trigger_record#roboto.domain.actions.trigger_record.TriggerRecord) if possible.

**Returns**

- `Optional[roboto.domain.actions.trigger_record.TriggerRecord]`: A `TriggerRecord` instance if `self.trigger_type` is `TriggerType.EventDriven`, otherwise None.

#### TriggerView.to_scheduled_trigger_record()

```python
def to_scheduled_trigger_record() -> Optional[roboto.domain.actions.scheduled_trigger_record.ScheduledTriggerRecord]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger_view.py#L175-L214)

Convert this trigger view into a [`ScheduledTriggerRecord`](/reference/python-sdk/roboto/domain/actions/scheduled_trigger_record#roboto.domain.actions.scheduled_trigger_record.ScheduledTriggerRecord) if possible.

**Returns**

- `Optional[roboto.domain.actions.scheduled_trigger_record.ScheduledTriggerRecord]`: A `ScheduledTriggerRecord` instance if `self.trigger_type` is `TriggerType.Scheduled`, otherwise None.
