Class Trigger

java.lang.Object
com.google.genai.gaos.models.triggers.Trigger

public class Trigger extends Object
Trigger

A trigger configuration that is scheduled to run an agent.

  • Constructor Details

  • Method Details

    • consecutiveFailureCount

      public Optional<Integer> consecutiveFailureCount()
      Output only. The number of consecutive failures that have occurred since the last successful execution.
    • createTime

      public Optional<OffsetDateTime> createTime()
      Output only. The time when the trigger was created.
    • displayName

      public Optional<String> displayName()
      Optional. The display name of the trigger.
    • environmentId

      public Optional<String> environmentId()
      Optional. The environment ID for the trigger execution.
    • executionTimeoutSeconds

      public Optional<Integer> executionTimeoutSeconds()
      Optional. The execution timeout for the triggered interaction.
    • id

      public Optional<String> id()
      Required. Output only. Identifier.

      The ID of the trigger.

    • interaction

      public Optional<Interaction> interaction()
      The Interaction resource.
    • lastPauseTime

      public Optional<OffsetDateTime> lastPauseTime()
      Output only. The time when the trigger was last paused.
    • lastResumeTime

      public Optional<OffsetDateTime> lastResumeTime()
      Output only. The time when the trigger was last resumed.
    • lastRunTime

      public Optional<OffsetDateTime> lastRunTime()
      Output only. The time when the trigger was last run.
    • maxConsecutiveFailures

      public Optional<Integer> maxConsecutiveFailures()
      Optional. The maximum number of consecutive failures allowed before the trigger is automatically paused (status becomes ERROR).
    • nextRunTime

      public Optional<OffsetDateTime> nextRunTime()
      Output only. The time when the trigger is scheduled to run next.
    • previousInteractionId

      public Optional<String> previousInteractionId()
      Output only. The ID of the last interaction created by this trigger.
    • schedule

      public Optional<String> schedule()
      Required. The cron schedule on which the trigger should run. Standard cron format.
    • status

      public Optional<TriggerStatus> status()
      Output only. The current status of the trigger.
    • timeZone

      public Optional<String> timeZone()
      Required. Time zone in which the schedule should be interpreted.
    • updateTime

      public Optional<OffsetDateTime> updateTime()
      Output only. The time when the trigger was last updated.
    • builder

      public static Trigger.Builder builder()
    • withConsecutiveFailureCount

      public Trigger withConsecutiveFailureCount(@Nullable Integer consecutiveFailureCount)
      Output only. The number of consecutive failures that have occurred since the last successful execution.
    • withCreateTime

      public Trigger withCreateTime(@Nullable OffsetDateTime createTime)
      Output only. The time when the trigger was created.
    • withDisplayName

      public Trigger withDisplayName(@Nullable String displayName)
      Optional. The display name of the trigger.
    • withEnvironmentId

      public Trigger withEnvironmentId(@Nullable String environmentId)
      Optional. The environment ID for the trigger execution.
    • withExecutionTimeoutSeconds

      public Trigger withExecutionTimeoutSeconds(@Nullable Integer executionTimeoutSeconds)
      Optional. The execution timeout for the triggered interaction.
    • withId

      public Trigger withId(@Nonnull String id)
      Required. Output only. Identifier.

      The ID of the trigger.

    • withInteraction

      public Trigger withInteraction(@Nonnull Interaction interaction)
      The Interaction resource.
    • withLastPauseTime

      public Trigger withLastPauseTime(@Nullable OffsetDateTime lastPauseTime)
      Output only. The time when the trigger was last paused.
    • withLastResumeTime

      public Trigger withLastResumeTime(@Nullable OffsetDateTime lastResumeTime)
      Output only. The time when the trigger was last resumed.
    • withLastRunTime

      public Trigger withLastRunTime(@Nullable OffsetDateTime lastRunTime)
      Output only. The time when the trigger was last run.
    • withMaxConsecutiveFailures

      public Trigger withMaxConsecutiveFailures(@Nullable Integer maxConsecutiveFailures)
      Optional. The maximum number of consecutive failures allowed before the trigger is automatically paused (status becomes ERROR).
    • withNextRunTime

      public Trigger withNextRunTime(@Nullable OffsetDateTime nextRunTime)
      Output only. The time when the trigger is scheduled to run next.
    • withPreviousInteractionId

      public Trigger withPreviousInteractionId(@Nullable String previousInteractionId)
      Output only. The ID of the last interaction created by this trigger.
    • withSchedule

      public Trigger withSchedule(@Nonnull String schedule)
      Required. The cron schedule on which the trigger should run. Standard cron format.
    • withStatus

      public Trigger withStatus(@Nullable TriggerStatus status)
      Output only. The current status of the trigger.
    • withTimeZone

      public Trigger withTimeZone(@Nonnull String timeZone)
      Required. Time zone in which the schedule should be interpreted.
    • withUpdateTime

      public Trigger withUpdateTime(@Nullable OffsetDateTime updateTime)
      Output only. The time when the trigger was last updated.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object