Class Webhooks

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

public class Webhooks extends Object
  • Method Details

    • async

      public AsyncWebhooks async()
      Switches to the async SDK.
      Returns:
      The async SDK
    • list

      Lists all Webhooks.
      Returns:
      The call builder
    • listDirect

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

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

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

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

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

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

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

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

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

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

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