Package com.google.genai.gaos
Class AsyncTriggers
java.lang.Object
com.google.genai.gaos.AsyncTriggers
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates a new trigger that will invoke the specified agent on the given cron schedule.create(TriggerCreateParams body) Creates a new trigger that will invoke the specified agent on the given cron schedule.create(String apiVersion, TriggerCreateParams body, Options options) Creates a new trigger that will invoke the specified agent on the given cron schedule.delete()Deletes a trigger.Deletes a trigger.Deletes a trigger.get()Gets details of a single trigger.Gets details of a single trigger.Gets details of a single trigger.list()Lists triggers for a project.Lists triggers for a project.Lists triggers for a project.Lists executions for a trigger.listExecutions(String triggerId) Lists executions for a trigger.listExecutions(String apiVersion, String triggerId, Long pageSize, String pageToken, Options options) Lists executions for a trigger.run()Runs a trigger immediately.Runs a trigger immediately.Runs a trigger immediately.sync()Switches to the sync SDK.update()Updates a trigger.update(String id, TriggerUpdate body) Updates a trigger.update(String apiVersion, String id, TriggerUpdate body, Options options) Updates a trigger.
-
Method Details
-
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
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
Deletes a trigger.- Returns:
- The async call builder
-
delete
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
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
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
Lists executions for a trigger.- Returns:
- The async call builder
-
listExecutions
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
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
-