Class AsyncTriggers

java.lang.Object
com.google.genai.gaos.AsyncTriggers

public class AsyncTriggers extends Object
  • Method Details

    • sync

      public Triggers sync()
      Switches to the sync SDK.
      Returns:
      The sync SDK
    • list

      Lists triggers for a project.
      Returns:
      The async call builder
    • listDirect

      Lists triggers for a project.
      Returns:
      CompletableFuture<ListTriggersResponse> - The async response
    • list

      public CompletableFuture<ListTriggersResponse> list(@Nullable String apiVersion, @Nullable String filter, @Nullable Long pageSize, @Nullable String pageToken, @Nullable Options options)
      Lists triggers for a project.
      Parameters:
      apiVersion - Which version of the API to use.
      filter - Optional. Filter expression (e.g., by state).
      pageSize - Optional. The maximum number of triggers to return per page.
      pageToken - Optional. A page token from a previous ListTriggers call.
      options - additional options
      Returns:
      CompletableFuture<ListTriggersResponse> - The async response
    • create

      public CreateTriggerRequestBuilder create()
      Creates a new trigger that will invoke the specified agent on the given cron schedule.
      Returns:
      The async call builder
    • create

      Creates a new trigger that will invoke the specified agent on the given cron schedule.
      Parameters:
      body - Parameters for creating a trigger.
      Returns:
      CompletableFuture<CreateTriggerResponse> - The async response
    • create

      public CompletableFuture<CreateTriggerResponse> create(@Nullable String apiVersion, @Nonnull TriggerCreateParams body, @Nullable Options options)
      Creates a new trigger that will invoke the specified agent on the given cron schedule.
      Parameters:
      apiVersion - Which version of the API to use.
      body - Parameters for creating a trigger.
      options - additional options
      Returns:
      CompletableFuture<CreateTriggerResponse> - The async response
    • delete

      public DeleteTriggerRequestBuilder delete()
      Deletes a trigger.
      Returns:
      The async call builder
    • delete

      public CompletableFuture<DeleteTriggerResponse> delete(@Nonnull String id)
      Deletes a trigger.
      Parameters:
      id - Resource name of the trigger.
      Returns:
      CompletableFuture<DeleteTriggerResponse> - The async response
    • delete

      public CompletableFuture<DeleteTriggerResponse> delete(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options)
      Deletes a trigger.
      Parameters:
      apiVersion - Which version of the API to use.
      id - Resource name of the trigger.
      options - additional options
      Returns:
      CompletableFuture<DeleteTriggerResponse> - The async response
    • get

      Gets details of a single trigger.
      Returns:
      The async call builder
    • get

      public CompletableFuture<GetTriggerResponse> get(@Nonnull String id)
      Gets details of a single trigger.
      Parameters:
      id - Resource name of the trigger.
      Returns:
      CompletableFuture<GetTriggerResponse> - The async response
    • get

      public CompletableFuture<GetTriggerResponse> get(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options)
      Gets details of a single trigger.
      Parameters:
      apiVersion - Which version of the API to use.
      id - Resource name of the trigger.
      options - additional options
      Returns:
      CompletableFuture<GetTriggerResponse> - The async response
    • update

      public UpdateTriggerRequestBuilder update()
      Updates a trigger.
      Returns:
      The async call builder
    • update

      public CompletableFuture<UpdateTriggerResponse> update(@Nonnull String id, @Nonnull TriggerUpdate body)
      Updates a trigger.
      Parameters:
      id - Resource name of the trigger.
      body - Represents the fields of a Trigger that can be updated.
      Returns:
      CompletableFuture<UpdateTriggerResponse> - The async response
    • update

      public CompletableFuture<UpdateTriggerResponse> update(@Nullable String apiVersion, @Nonnull String id, @Nonnull TriggerUpdate body, @Nullable Options options)
      Updates a trigger.
      Parameters:
      apiVersion - Which version of the API to use.
      id - Resource name of the trigger.
      body - Represents the fields of a Trigger that can be updated.
      options - additional options
      Returns:
      CompletableFuture<UpdateTriggerResponse> - The async response
    • listExecutions

      public ListTriggerExecutionsRequestBuilder listExecutions()
      Lists executions for a trigger.
      Returns:
      The async call builder
    • listExecutions

      public CompletableFuture<ListTriggerExecutionsResponse> listExecutions(@Nonnull String triggerId)
      Lists executions for a trigger.
      Parameters:
      triggerId - Resource name of the trigger.
      Returns:
      CompletableFuture<ListTriggerExecutionsResponse> - The async response
    • listExecutions

      public CompletableFuture<ListTriggerExecutionsResponse> listExecutions(@Nullable String apiVersion, @Nonnull String triggerId, @Nullable Long pageSize, @Nullable String pageToken, @Nullable Options options)
      Lists executions for a trigger.
      Parameters:
      apiVersion - Which version of the API to use.
      triggerId - Resource name of the trigger.
      pageSize - Optional. The maximum number of executions to return per page.
      pageToken - Optional. A page token from a previous ListTriggerExecutions call.
      options - additional options
      Returns:
      CompletableFuture<ListTriggerExecutionsResponse> - The async response
    • run

      Runs a trigger immediately.
      Returns:
      The async call builder
    • run

      public CompletableFuture<RunTriggerResponse> run(@Nonnull String triggerId)
      Runs a trigger immediately.
      Parameters:
      triggerId - Resource name of the trigger.
      Returns:
      CompletableFuture<RunTriggerResponse> - The async response
    • run

      public CompletableFuture<RunTriggerResponse> run(@Nullable String apiVersion, @Nonnull String triggerId, @Nullable Options options)
      Runs a trigger immediately.
      Parameters:
      apiVersion - Which version of the API to use.
      triggerId - Resource name of the trigger.
      options - additional options
      Returns:
      CompletableFuture<RunTriggerResponse> - The async response