Package com.google.genai.gaos
Class Triggers
java.lang.Object
com.google.genai.gaos.Triggers
-
Method Summary
Modifier and TypeMethodDescriptionasync()Switches to the async SDK.create()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.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
-
async
Switches to the async SDK.- Returns:
- The async SDK
-
list
Lists triggers for a project.- Returns:
- The call builder
-
listDirect
Lists triggers for a project.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
list
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
create
Creates a new trigger that will invoke the specified agent on the given cron schedule.- Returns:
- The 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
create
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
Deletes a trigger.- Returns:
- The call builder
-
delete
Deletes a trigger.- Parameters:
id- Resource name of the trigger.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
Gets details of a single trigger.- Returns:
- The call builder
-
get
Gets details of a single trigger.- Parameters:
id- Resource name of the trigger.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
update
Updates a trigger.- Returns:
- The call builder
-
update
Updates a trigger.- Parameters:
id- Resource name of the trigger.body- Represents the fields of a Trigger that can be updated.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
update
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
listExecutions
Lists executions for a trigger.- Returns:
- The call builder
-
listExecutions
Lists executions for a trigger.- Parameters:
triggerId- Resource name of the trigger.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
listExecutions
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
run
Runs a trigger immediately.- Returns:
- The call builder
-
run
Runs a trigger immediately.- Parameters:
triggerId- Resource name of the trigger.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
run
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-