Class ListVoicesRequest.Builder

java.lang.Object
com.google.genai.gaos.models.operations.ListVoicesRequest.Builder
Enclosing class:
ListVoicesRequest

public static final class ListVoicesRequest.Builder extends Object
  • Method Details

    • apiVersion

      public ListVoicesRequest.Builder apiVersion(@Nullable String apiVersion)
      API version for request routing.
    • accent

      public ListVoicesRequest.Builder accent(@Nullable List<String> accent)
      Optional. Filter by accent description (e.g. "American", "British"). Case-insensitive exact match. If multiple values are specified, matches voices with any of the specified accents (OR).
    • contexts

      public ListVoicesRequest.Builder contexts(@Nullable List<String> contexts)
      Optional. Filter by intended context or domain (e.g. "News, Commercial"). Case-insensitive exact match. If multiple values are specified, matches voices with any of the specified contexts (OR).
    • gender

      public ListVoicesRequest.Builder gender(@Nullable List<String> gender)
      Optional. Filter by gender presentation (e.g. "female", "male", "neutral"). Case-insensitive exact match. If multiple values are specified, matches voices with any of the specified genders (OR).
    • languageCode

      public ListVoicesRequest.Builder languageCode(@Nullable List<String> languageCode)
      Optional. Filter by BCP-47 language code (e.g. "en-US"). Case-insensitive exact match. If multiple values are specified, matches voices with any of the specified language codes (OR).
    • pageSize

      public ListVoicesRequest.Builder pageSize(@Nullable Integer pageSize)
      Optional. The maximum number of voices to return per page. The service may return fewer than this value. If unspecified, at most 50 voices are returned. The maximum value is 1000; values above 1000 are coerced to 1000.
    • pageToken

      public ListVoicesRequest.Builder pageToken(@Nullable String pageToken)
      Optional. A page token received from a previous `ListVoices` call. Provide this to retrieve the subsequent page.

      When paginating, all filter query parameters (`language_code`, `region_code`, `accent`, `persona`, `context`, `gender`, `pitch`, `type`, and `search`) must match the call that returned this token; otherwise the request fails with `INVALID_ARGUMENT`. `page_size` may change between pages.

    • persona

      public ListVoicesRequest.Builder persona(@Nullable List<String> persona)
      Optional. Filter by vocal persona (e.g. "Warm, Friendly"). Case-insensitive exact match. If multiple values are specified, matches voices with any of the specified personas (OR).
    • pitch

      public ListVoicesRequest.Builder pitch(@Nullable List<String> pitch)
      Optional. Filter by vocal pitch. Accepts `"low"`, `"medium"`, `"high"` (case-insensitive). If multiple values are specified, matches voices with any of the specified pitches (OR).
    • regionCode

      public ListVoicesRequest.Builder regionCode(@Nullable List<String> regionCode)
      Optional. Filter by ISO 3166-1 alpha-2 or UN M.49 region code (e.g. "US", "001"). Case-insensitive exact match. If multiple values are specified, matches voices with any of the specified region codes (OR).
    • search

      public ListVoicesRequest.Builder search(@Nullable String search)
      Optional. Free-text substring search query matched case-insensitively against both `display_name` and `description`. Maximum 2048 bytes.
    • type

      public ListVoicesRequest.Builder type(@Nullable List<String> type)
      Optional. Filter by voice type. Accepts `"prebuilt"`, `"replicated"`, `"prompted"` (case-insensitive). If multiple values are specified, matches voices with any of the specified types (OR).
    • build

      public ListVoicesRequest build()