Class AsyncWebhooks

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

public class AsyncWebhooks extends Object
  • Method Details

    • sync

      public Webhooks 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

      public CreateWebhookRequestBuilder create()
      Creates a new Webhook.
      Returns:
      The async call builder
    • create

      public CompletableFuture<CreateWebhookResponse> create(@Nonnull WebhookInput body)
      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

      public DeleteWebhookRequestBuilder delete()
      Deletes a Webhook.
      Returns:
      The async call builder
    • delete

      public CompletableFuture<DeleteWebhookResponse> delete(@Nonnull String id)
      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

      public CompletableFuture<GetWebhookResponse> get(@Nonnull String id)
      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

      public UpdateWebhookRequestBuilder update()
      Updates an existing Webhook.
      Returns:
      The async call builder
    • update

      public CompletableFuture<UpdateWebhookResponse> update(@Nonnull String id)
      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

      public CompletableFuture<PingWebhookResponse> ping(@Nonnull String id)
      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

      public RotateSigningSecretRequestBuilder rotateSigningSecret()
      Generates a new signing secret for a Webhook.
      Returns:
      The async call builder
    • rotateSigningSecret

      public CompletableFuture<RotateSigningSecretResponse> rotateSigningSecret(@Nonnull String id)
      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