Package com.google.genai.gaos
Class Webhooks
java.lang.Object
com.google.genai.gaos.Webhooks
-
Method Summary
Modifier and TypeMethodDescriptionasync()Switches to the async SDK.create()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.update()Updates an existing Webhook.Updates an existing Webhook.Updates an existing Webhook.
-
Method Details
-
async
Switches to the async SDK.- Returns:
- The async SDK
-
list
Lists all Webhooks.- Returns:
- The call builder
-
listDirect
Lists all Webhooks.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
list
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
create
Creates a new Webhook.- Returns:
- The call builder
-
create
Creates a new Webhook.- Parameters:
body- A Webhook resource.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
create
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
Deletes a Webhook.- Returns:
- The call builder
-
delete
Deletes a Webhook.- Parameters:
id- Required. The ID of the webhook to delete. Format: `{webhook_id}`- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
Gets a specific Webhook.- Returns:
- The call builder
-
get
Gets a specific Webhook.- Parameters:
id- Required. The ID of the webhook to retrieve.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
update
Updates an existing Webhook.- Returns:
- The call builder
-
update
Updates an existing Webhook.- Parameters:
id- Required. The ID of the webhook to update.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
update
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
ping
Sends a ping event to a Webhook.- Returns:
- The call builder
-
ping
Sends a ping event to a Webhook.- Parameters:
id- Required. The ID of the webhook to ping. Format: `{webhook_id}`- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
ping
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
rotateSigningSecret
Generates a new signing secret for a Webhook.- Returns:
- The 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
rotateSigningSecret
public 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:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-