Rule

public final class Rule

Class representation of a Nylas rule object.

Constructors

Link copied to clipboard
public Rule Rule(@Json(name = "id") String id, @Json(name = "name") String name, @Json(name = "description") String description, @Json(name = "priority") Integer priority, @Json(name = "enabled") Boolean enabled, @Json(name = "trigger") RuleTrigger trigger, @Json(name = "match") RuleMatch match, @Json(name = "actions") List<RuleAction> actions, @Json(name = "application_id") String applicationId, @Json(name = "organization_id") String organizationId, @Json(name = "created_at") Long createdAt, @Json(name = "updated_at") Long updatedAt)

Properties

Link copied to clipboard
private final List<RuleAction> actions

The actions to perform when conditions are met.

Link copied to clipboard
private final String applicationId

The ID of the Nylas application this rule belongs to.

Link copied to clipboard
private final Long createdAt

Unix timestamp when the rule was created.

Link copied to clipboard
private final String description

Optional description of the rule.

Link copied to clipboard
private final Boolean enabled

Whether the rule is active.

Link copied to clipboard
private final String id

Globally unique object identifier.

Link copied to clipboard
private final RuleMatch match

The match conditions for this rule.

Link copied to clipboard
private final String name

Name of the rule.

Link copied to clipboard
private final String organizationId

The ID of the organization this rule belongs to.

Link copied to clipboard
private final Integer priority

Evaluation order — lower numbers run first. Range 0–1000, default 10.

Link copied to clipboard
private final RuleTrigger trigger

When this rule is evaluated — on inbound mail or outbound sends.

Link copied to clipboard
private final Long updatedAt

Unix timestamp when the rule was last updated.

Functions

Link copied to clipboard
public final List<RuleAction> getActions()

The actions to perform when conditions are met.

Link copied to clipboard
public final String getApplicationId()

The ID of the Nylas application this rule belongs to.

Link copied to clipboard
public final Long getCreatedAt()

Unix timestamp when the rule was created.

Link copied to clipboard
public final String getDescription()

Optional description of the rule.

Link copied to clipboard
public final Boolean getEnabled()

Whether the rule is active.

Link copied to clipboard
public final String getId()

Globally unique object identifier.

Link copied to clipboard
public final RuleMatch getMatch()

The match conditions for this rule.

Link copied to clipboard
public final String getName()

Name of the rule.

Link copied to clipboard
public final String getOrganizationId()

The ID of the organization this rule belongs to.

Link copied to clipboard
public final Integer getPriority()

Evaluation order — lower numbers run first. Range 0–1000, default 10.

Link copied to clipboard
public final RuleTrigger getTrigger()

When this rule is evaluated — on inbound mail or outbound sends.

Link copied to clipboard
public final Long getUpdatedAt()

Unix timestamp when the rule was last updated.