Package com.google.genai.gaos
Class AsyncWebhooks
java.lang.Object
com.google.genai.gaos.AsyncWebhooks
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates a new Webhook.create(WebhookInput body) Creates a new Webhook.create(String apiVersion, WebhookInput body, Options options) Creates a new Webhook.delete()Deletes a Webhook.Deletes a Webhook.Deletes a Webhook.get()Gets a specific Webhook.Gets a specific Webhook.Gets a specific Webhook.list()Lists all Webhooks.Lists all Webhooks.Lists all Webhooks.ping()Sends a ping event to a Webhook.Sends a ping event to a Webhook.ping(String apiVersion, String id, PingWebhookRequest body, Options options) Sends a ping event to a Webhook.Generates a new signing secret for a Webhook.Generates a new signing secret for a Webhook.rotateSigningSecret(String apiVersion, String id, RotateSigningSecretRequest body, Options options) Generates a new signing secret for a Webhook.sync()Switches to the sync SDK.update()Updates an existing Webhook.Updates an existing Webhook.Updates an existing Webhook.
-
Method Details
-
sync
Switches to the sync SDK.- Returns:
- The sync SDK
-
list
Lists all Webhooks.- Returns:
- The async call builder
-
listDirect
Lists all Webhooks.- Returns:
CompletableFuture<ListWebhooksResponse>- The async response
-
list
public CompletableFuture<ListWebhooksResponse> list(@Nullable String apiVersion, @Nullable Integer pageSize, @Nullable String pageToken, @Nullable Options options) Lists all Webhooks.- Parameters:
apiVersion- Which version of the API to use.pageSize- Optional. The maximum number of webhooks to return. The service may return fewer than this value. If unspecified, at most 50 webhooks will be returned. The maximum value is 1000.pageToken- Optional. A page token, received from a previous `ListWebhooks` call. Provide this to retrieve the subsequent page.options- additional options- Returns:
CompletableFuture<ListWebhooksResponse>- The async response
-
create
Creates a new Webhook.- Returns:
- The async call builder
-
create
Creates a new Webhook.- Parameters:
body- A Webhook resource.- Returns:
CompletableFuture<CreateWebhookResponse>- The async response
-
create
public CompletableFuture<CreateWebhookResponse> create(@Nullable String apiVersion, @Nonnull WebhookInput body, @Nullable Options options) Creates a new Webhook.- Parameters:
apiVersion- Which version of the API to use.body- A Webhook resource.options- additional options- Returns:
CompletableFuture<CreateWebhookResponse>- The async response
-
delete
Deletes a Webhook.- Returns:
- The async call builder
-
delete
Deletes a Webhook.- Parameters:
id- Required. The ID of the webhook to delete. Format: `{webhook_id}`- Returns:
CompletableFuture<DeleteWebhookResponse>- The async response
-
delete
public CompletableFuture<DeleteWebhookResponse> delete(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options) Deletes a Webhook.- Parameters:
apiVersion- Which version of the API to use.id- Required. The ID of the webhook to delete. Format: `{webhook_id}`options- additional options- Returns:
CompletableFuture<DeleteWebhookResponse>- The async response
-
get
Gets a specific Webhook.- Returns:
- The async call builder
-
get
Gets a specific Webhook.- Parameters:
id- Required. The ID of the webhook to retrieve.- Returns:
CompletableFuture<GetWebhookResponse>- The async response
-
get
public CompletableFuture<GetWebhookResponse> get(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options) Gets a specific Webhook.- Parameters:
apiVersion- Which version of the API to use.id- Required. The ID of the webhook to retrieve.options- additional options- Returns:
CompletableFuture<GetWebhookResponse>- The async response
-
update
Updates an existing Webhook.- Returns:
- The async call builder
-
update
Updates an existing Webhook.- Parameters:
id- Required. The ID of the webhook to update.- Returns:
CompletableFuture<UpdateWebhookResponse>- The async response
-
update
public CompletableFuture<UpdateWebhookResponse> update(@Nullable String apiVersion, @Nonnull String id, @Nullable String updateMask, @Nullable WebhookUpdate body, @Nullable Options options) Updates an existing Webhook.- Parameters:
apiVersion- Which version of the API to use.id- Required. The ID of the webhook to update.updateMask- Optional. The list of fields to update.body-options- additional options- Returns:
CompletableFuture<UpdateWebhookResponse>- The async response
-
ping
Sends a ping event to a Webhook.- Returns:
- The async call builder
-
ping
Sends a ping event to a Webhook.- Parameters:
id- Required. The ID of the webhook to ping. Format: `{webhook_id}`- Returns:
CompletableFuture<PingWebhookResponse>- The async response
-
ping
public CompletableFuture<PingWebhookResponse> ping(@Nullable String apiVersion, @Nonnull String id, @Nullable PingWebhookRequest body, @Nullable Options options) Sends a ping event to a Webhook.- Parameters:
apiVersion- Which version of the API to use.id- Required. The ID of the webhook to ping. Format: `{webhook_id}`body- Request message for WebhookService.PingWebhook.options- additional options- Returns:
CompletableFuture<PingWebhookResponse>- The async response
-
rotateSigningSecret
Generates a new signing secret for a Webhook.- Returns:
- The async call builder
-
rotateSigningSecret
Generates a new signing secret for a Webhook.- Parameters:
id- Required. The ID of the webhook for which to generate a signing secret. Format: `{webhook_id}`- Returns:
CompletableFuture<RotateSigningSecretResponse>- The async response
-
rotateSigningSecret
public CompletableFuture<RotateSigningSecretResponse> rotateSigningSecret(@Nullable String apiVersion, @Nonnull String id, @Nullable RotateSigningSecretRequest body, @Nullable Options options) Generates a new signing secret for a Webhook.- Parameters:
apiVersion- Which version of the API to use.id- Required. The ID of the webhook for which to generate a signing secret. Format: `{webhook_id}`body- Request message for WebhookService.RotateSigningSecret.options- additional options- Returns:
CompletableFuture<RotateSigningSecretResponse>- The async response
-