diff --git a/.fern/metadata.json b/.fern/metadata.json index a973d6c8..9e4e19b9 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { - "cliVersion": "5.89.0", + "cliVersion": "5.44.6", "generatorName": "fernapi/fern-java-sdk", - "generatorVersion": "4.16.0", + "generatorVersion": "4.10.1", "generatorConfig": { "package-prefix": "com.deepgram", "base-api-exception-class-name": "DeepgramHttpException", @@ -9,11 +9,10 @@ "client": { "class-name": "DeepgramClient" }, - "enable-wire-tests": true, - "runtime-version": true + "enable-wire-tests": true }, - "originGitCommit": "9e641c9fb92e1e0398c79c196f6a71c70b4fdbf6", + "originGitCommit": "ff8fd2b74fdd5c081e9f111d59d3619f7e286dd8", "originGitCommitIsDirty": true, "invokedBy": "manual", - "sdkVersion": "0.7.2" + "sdkVersion": "0.7.1" } \ No newline at end of file diff --git a/.fernignore b/.fernignore index 693dcfbf..ce1762cf 100644 --- a/.fernignore +++ b/.fernignore @@ -10,6 +10,12 @@ src/main/java/com/deepgram/AsyncDeepgramClient.java src/main/java/com/deepgram/DeepgramClientBuilder.java src/main/java/com/deepgram/AsyncDeepgramClientBuilder.java +# Core files with release-please version markers +# Contains User-Agent, X-Fern-SDK-Name, and X-Fern-SDK-Version headers +# with // x-release-please-version comments for automated version bumps. +# Fern regen overwrites these with incorrect SDK names and strips the markers. +src/main/java/com/deepgram/core/ClientOptions.java + # Transport abstraction (pluggable transport for SageMaker, etc.) src/main/java/com/deepgram/core/transport/ @@ -49,7 +55,6 @@ src/main/java/com/deepgram/resources/speak/v1/websocket/V1WebSocketClient.java # hashCode() to each. Unfreeze and drop these patches once the generator emits a matching # equals/hashCode pair for fields-less types (tracked as an upstream Fern request). src/main/java/com/deepgram/resources/listen/v2/types/ListenV2CloseStream.java -src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ForceEndTurn.java src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Close.java src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Flush.java src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ListenUpdated.java @@ -61,64 +66,6 @@ src/main/java/com/deepgram/resources/agent/v1/types/AgentV1KeepAlive.java src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ThinkUpdated.java src/main/java/com/deepgram/resources/agent/v1/types/AgentV1PromptUpdated.java -# Type-rename back-compat freeze (STOPGAP — remove once Fern fixes this upstream). -# fern-java-sdk 4.16.0 introduced unconditional collision-based name shortening that -# renamed public provider types that 0.7.x shipped (e.g. DeepgramSpeakProviderModel -> -# DeepgramModel, AnthropicThinkProviderModel -> AnthropicModel). Single-role providers get -# shortened; OpenAi keeps the long name only because it is both a think and speak provider -# (a collision). This is a generator regression, not a spec change, and smart-casing:false -# does NOT restore the old names. We patch the names back to preserve source compatibility. -# Freeze both the renamed leaf types AND their referencing payloads so the reversal survives -# regen. NOTE: a future regen will still emit the short-named files (e.g. DeepgramModel.java) -# as unreferenced orphans until the generator is fixed; delete those and drop this whole block -# once Fern stops renaming (tracked as an upstream Fern request). -src/main/java/com/deepgram/types/DeepgramSpeakProviderModel.java -src/main/java/com/deepgram/types/AnthropicThinkProviderModel.java -src/main/java/com/deepgram/types/GoogleThinkProviderModel.java -src/main/java/com/deepgram/types/GroqThinkProviderReasoningMode.java -src/main/java/com/deepgram/types/CartesiaSpeakProviderModelId.java -src/main/java/com/deepgram/types/CartesiaSpeakProviderVoice.java -src/main/java/com/deepgram/resources/agent/v1/types/AgentV1HistoryContentRole.java -src/main/java/com/deepgram/resources/agent/v1/types/AgentV1HistoryFunctionCallsFunctionCallsItem.java -src/main/java/com/deepgram/types/Deepgram.java -src/main/java/com/deepgram/types/Anthropic.java -src/main/java/com/deepgram/types/Google.java -src/main/java/com/deepgram/types/Groq.java -src/main/java/com/deepgram/types/Cartesia.java -src/main/java/com/deepgram/resources/agent/v1/types/ConversationHistoryMessage.java -src/main/java/com/deepgram/resources/agent/v1/types/FunctionCallHistoryMessage.java - -# Return-type back-compat shims (STOPGAP — remove once these ship in a major). -# fern-java-sdk 4.16.0 made source-breaking return-type/shape changes to types 0.7.x shipped. -# Java cannot shim a return-type change additively (no return-type overloading; can't subclass -# final enums), so these are handled two ways: -# - AgentV1UpdateListenListen.getProvider() widened from DeepgramListenProviderV2 to a V1|V2 union -# (docs #1066, to allow model/language changes). Hand-shimmed ADDITIVELY: getProvider() still -# returns DeepgramListenProviderV2 and provider(DeepgramListenProviderV2) still builds; the union -# is exposed via getProviderValue() and provider(DeepgramListenProviderV1) for the new capability. -# - ConversationHistoryMessage.getRole() and FunctionCallHistoryMessage.getFunctionCalls() (frozen -# above) were reparented onto history-specific types with the shared ContextMessagesItem types -# deleted; restored to their 0.7.x shapes with the two deleted types re-added below. -# Drop these once the new shapes ship in a major (tracked as an upstream Fern request). -src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListen.java -src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextContextMessagesItemContentRole.java -src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem.java - -# Union default-variant fix for the same UpdateListen shim (STOPGAP). -# "version" is optional on both DeepgramListenProviderV1/V2, so a provider object without it is a -# valid payload -- and is exactly what 0.7.x emitted and parsed as a V2. Fern points the union's -# @JsonTypeInfo defaultImpl at _UnknownValue, whose @JsonCreator has an empty body, so a version-less -# provider deserialized to an unknown variant carrying null: getProvider() returned null and -# re-serializing emitted {"provider":null}, silently dropping the caller's provider (and -# _getUnknown()/equals() threw NPE). Patched to defaultImpl = V2Value, restoring 0.7.x behaviour. -# Guarded by AgentV1UpdateListenShimTest. Unfreeze once Fern defaults to a real variant. -# The two Settings providers carry the identical defect (both shipped in 0.7.1, so a pre-existing -# bug rather than a regression) and are patched the same way, so all three agent listen-provider -# unions behave consistently -- a version-less provider is a V2 everywhere, not silently dropped. -src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListenProvider.java -src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentListenProvider.java -src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextListenProvider.java - # Build and project configuration build.gradle settings.gradle diff --git a/.github/release-please-config.json b/.github/release-please-config.json index 4f405621..dc40f24d 100644 --- a/.github/release-please-config.json +++ b/.github/release-please-config.json @@ -27,6 +27,10 @@ "type": "json", "path": ".fern/metadata.json", "jsonpath": "$.sdkVersion" + }, + { + "type": "generic", + "path": "src/main/java/com/deepgram/core/ClientOptions.java" } ] } diff --git a/AGENTS.md b/AGENTS.md index ad47d915..8b3a3897 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,12 +47,10 @@ How to identify: Current temporarily frozen files: +- `src/main/java/com/deepgram/core/ClientOptions.java` - preserves release-please version markers and correct SDK header constants that Fern currently overwrites; use the standard `.bak` swap/restore workflow during regen review - `src/main/java/com/deepgram/core/ReconnectingWebSocketListener.java` - carries bug fixes for `maxRetries(0)` semantics ("connect once, don't retry") and a configurable `connectionTimeoutMs` field (was hardcoded 4000ms), plus an `applyOptionsOverride(...)` hook used by `TransportWebSocketFactory` to apply per-transport reconnect policy; pull this back out once the fixes are upstreamed into the Fern generator. Use the standard `.bak` swap/restore workflow during regen review. - `src/main/java/com/deepgram/resources/speak/v2/websocket/V2WebSocketClient.java` and `src/main/java/com/deepgram/resources/listen/v2/websocket/V2WebSocketClient.java` - forward-compat patch (both clients). Fern's generated `handleIncomingMessage` dispatcher routes any unrecognized message type to `onError` with "Update your SDK version...", which makes a benign new server control frame look fatal to a deployed client. Patched so the unrecognized-type branch is a no-op — the raw frame is already delivered via `onMessage(String)` earlier in the method, so consumers still see it. Mirrors the JS/Python SDKs' forward-compat behavior and is regression-guarded by `src/test/java/com/deepgram/SpeakV2ForwardCompatTest.java` and `src/test/java/com/deepgram/ListenV2ForwardCompatTest.java`. Use the standard `.bak` swap/restore workflow during regen review; re-apply the no-op to both after regen, and unfreeze once the generator stops treating unknown frames as errors. -- Fields-less message types carrying a manual `hashCode()` patch (Fern generates `equals()` but no `hashCode()` for these, violating the Object contract): `src/main/java/com/deepgram/resources/listen/v2/types/ListenV2CloseStream.java`, `src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ForceEndTurn.java`, `src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Close.java`, `src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Flush.java`, and the `AgentV1*` event types `src/main/java/com/deepgram/resources/agent/v1/types/{AgentV1ListenUpdated,AgentV1SpeakUpdated,AgentV1AgentAudioDone,AgentV1SettingsApplied,AgentV1UserStartedSpeaking,AgentV1KeepAlive,AgentV1ThinkUpdated,AgentV1PromptUpdated}.java`. Use the standard `.bak` swap/restore workflow during regen review; drop the patches and unfreeze all of them once the generator emits a matching equals/hashCode pair for fields-less types (tracked as an upstream Fern request). -- Type-rename back-compat freeze (STOPGAP): fern-java-sdk 4.16.0 introduced unconditional collision-based name shortening that renamed public types shipped in 0.7.x — `DeepgramSpeakProviderModel→DeepgramModel`, `AnthropicThinkProviderModel→AnthropicModel`, `GoogleThinkProviderModel→GoogleModel`, `GroqThinkProviderReasoningMode→GroqReasoningMode`, `CartesiaSpeakProviderModelId→CartesiaModelId`, `CartesiaSpeakProviderVoice→CartesiaVoice`, and the agent history leaf types `AgentV1HistoryContentRole`/`AgentV1HistoryFunctionCallsFunctionCallsItem`. Single-role providers get shortened; OpenAi keeps its long names only because it is both a think and speak provider (name collision). This is a generator regression (not a spec change) with no config opt-out (`smart-casing: false` does not restore the names). We rename the types back and freeze both the renamed leaf types and their referencing payloads (`Deepgram`/`Anthropic`/`Google`/`Groq`/`Cartesia`/`ConversationHistoryMessage`/`FunctionCallHistoryMessage`). A future regen still emits the short-named orphan files until the generator is fixed — delete those and drop this whole group once the upstream Fern fix lands. -- Return-type back-compat shims (STOPGAP): fern-java-sdk 4.16.0 also made source-breaking return-type/shape changes to types 0.7.x shipped, which Java cannot shim additively via a return-type change. (1) `AgentV1UpdateListenListen.getProvider()` widened `DeepgramListenProviderV2` → an `AgentV1UpdateListenListenProvider` (V1|V2) union (docs #1066). This file is hand-shimmed additively — `getProvider()` still returns `DeepgramListenProviderV2` and `provider(DeepgramListenProviderV2)` still builds, while the union is exposed via `getProviderValue()` and `provider(DeepgramListenProviderV1)` for the new model/language capability. (2) `ConversationHistoryMessage.getRole()` and `FunctionCallHistoryMessage.getFunctionCalls()` were reparented onto history-specific types with the shared `AgentV1SettingsAgentContextContextMessagesItem{ContentRole,FunctionCallsFunctionCallsItem}` types deleted; these two message types are restored to their 0.7.x shapes and the two deleted types re-added, all frozen. Drop these once the new shapes ship in a major (tracked as an upstream Fern request). -- Union default-variant fix (STOPGAP): `src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListenProvider.java` — `version` is optional on both `DeepgramListenProviderV1`/`V2`, so a provider object without it is a valid payload and is exactly what 0.7.x emitted and parsed as a V2. Fern points the union's `@JsonTypeInfo` `defaultImpl` at `_UnknownValue`, whose `@JsonCreator` has an empty body, so a version-less provider deserialized to an unknown variant carrying `null`: `getProvider()` returned `null` and re-serializing emitted `{"provider":null}`, silently dropping the caller's provider (and `_getUnknown()`/`equals()` threw `NullPointerException`). Patched to `defaultImpl = V2Value`, which restores 0.7.x behaviour; as a side effect an unrecognized future `version` now coerces to V2 instead of landing in `_UnknownValue`, which is deliberate for a client-sent message. Regression-guarded by `src/test/java/com/deepgram/AgentV1UpdateListenShimTest.java`. Unfreeze once Fern defaults to a real variant. `AgentV1SettingsAgentListenProvider` and `AgentV1SettingsAgentContextListenProvider` carry the identical defect (both shipped in 0.7.1, so pre-existing rather than a regression) and are patched and frozen the same way, so all three agent listen-provider unions behave consistently — a version-less provider is a V2 everywhere instead of being silently dropped. Guarded by `src/test/java/com/deepgram/AgentSettingsProviderDefaultTest.java`. +- Fields-less message types carrying a manual `hashCode()` patch (Fern generates `equals()` but no `hashCode()` for these, violating the Object contract): `src/main/java/com/deepgram/resources/listen/v2/types/ListenV2CloseStream.java`, `src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Close.java`, `src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Flush.java`, and the `AgentV1*` event types `src/main/java/com/deepgram/resources/agent/v1/types/{AgentV1ListenUpdated,AgentV1SpeakUpdated,AgentV1AgentAudioDone,AgentV1SettingsApplied,AgentV1UserStartedSpeaking,AgentV1KeepAlive,AgentV1ThinkUpdated,AgentV1PromptUpdated}.java`. Use the standard `.bak` swap/restore workflow during regen review; drop the patches and unfreeze all of them once the generator emits a matching equals/hashCode pair for fields-less types (tracked as an upstream Fern request). ### Prepare repo for regeneration @@ -71,7 +69,7 @@ Current temporarily frozen files: The `.bak` files are our manually patched versions protected by `.fernignore`. The original paths now contain the freshly generated versions. By comparing the two, we can see what the generator now produces versus what we had patched. 1. Diff each `.bak` file against the new generated version to understand what changed and whether our patches are still needed. -2. Re-apply any patches that are still necessary to the newly generated files. +2. Re-apply any patches that are still necessary to the newly generated files. For `src/main/java/com/deepgram/core/ClientOptions.java`, use the standard `.bak` restore flow if the generated output still overwrites the Deepgram SDK header constants and `// x-release-please-version` markers. 3. In `.fernignore`, replace each `.bak` path back to the original path for files that still need patches. 4. Remove `.fernignore` entries entirely for any files where the generator now produces correct output. 5. Delete all `.bak` files once review is complete. diff --git a/README.md b/README.md index e540484b..b140c8c6 100644 --- a/README.md +++ b/README.md @@ -485,7 +485,8 @@ DeepgramClient client = DeepgramClient.builder() ### Retry Configuration The SDK retries `408`, `429`, and `5xx` responses with exponential backoff and jitter, honouring -`Retry-After` and `X-RateLimit-Reset` when the server sends them. +`Retry-After` and `X-RateLimit-Reset` when the server sends them. Configure the maximum number of +retries with `maxRetries`: ```java DeepgramClient client = DeepgramClient.builder() @@ -494,28 +495,6 @@ DeepgramClient client = DeepgramClient.builder() .build(); ``` -Tune the backoff curve if the defaults do not suit your traffic: - -```java -DeepgramClient client = DeepgramClient.builder() - .apiKey("YOUR_DEEPGRAM_API_KEY") - .maxRetries(3) - .initialRetryDelayMillis(500) // first backoff, doubles each attempt (default 1000) - .maxRetryDelayMillis(10_000) // ceiling for any single wait (default 60000) - .retryJitterFactor(0.5) // randomness applied to each delay, 0-1 (default 0.2) - .build(); -``` - -To override the retry count for a single call, pass it via `RequestOptions`: - -```java -import com.deepgram.core.RequestOptions; - -client.listen().v1().media().transcribeUrl(request, RequestOptions.builder() - .maxRetries(0) // this call only; leaves the client-wide setting untouched - .build()); -``` - ### Custom HTTP Client > **Note:** When providing a custom `OkHttpClient`, the SDK's built-in retry interceptor is not added automatically. Add your own retry logic if needed. diff --git a/build.gradle b/build.gradle index 438c7103..19cb953c 100644 --- a/build.gradle +++ b/build.gradle @@ -20,19 +20,6 @@ java { targetCompatibility = JavaVersion.VERSION_11 } -// Stamp the jar manifest so ClientOptions resolves the real SDK version at runtime via -// Package.getImplementationVersion(), instead of falling back to its hardcoded literal. -// Mirrors the published Maven artifact, where pom.xml's maven-jar-plugin sets -// addDefaultImplementationEntries. Keep the title in sync with pom.xml's . -jar { - manifest { - attributes( - 'Implementation-Title': 'Deepgram Java SDK', - 'Implementation-Version': project.version - ) - } -} - repositories { mavenCentral() } diff --git a/pom.xml b/pom.xml index 93dca74c..cbc9ce3f 100644 --- a/pom.xml +++ b/pom.xml @@ -169,13 +169,6 @@ org.apache.maven.plugins maven-jar-plugin 3.4.1 - - - - true - - - diff --git a/src/main/java/com/deepgram/AsyncDeepgramApiClientBuilder.java b/src/main/java/com/deepgram/AsyncDeepgramApiClientBuilder.java index a7fe4c9e..35f7792a 100644 --- a/src/main/java/com/deepgram/AsyncDeepgramApiClientBuilder.java +++ b/src/main/java/com/deepgram/AsyncDeepgramApiClientBuilder.java @@ -16,12 +16,6 @@ public class AsyncDeepgramApiClientBuilder { private Optional maxRetries = Optional.empty(); - private Optional initialRetryDelayMillis = Optional.empty(); - - private Optional maxRetryDelayMillis = Optional.empty(); - - private Optional retryJitterFactor = Optional.empty(); - private final Map customHeaders = new HashMap<>(); private String apiKey = System.getenv("DEEPGRAM_API_KEY"); @@ -62,30 +56,6 @@ public AsyncDeepgramApiClientBuilder maxRetries(int maxRetries) { return this; } - /** - * Sets the initial delay (in milliseconds) used for exponential backoff between retries. Defaults to 1000 milliseconds. - */ - public AsyncDeepgramApiClientBuilder initialRetryDelayMillis(long initialRetryDelayMillis) { - this.initialRetryDelayMillis = Optional.of(initialRetryDelayMillis); - return this; - } - - /** - * Sets the maximum delay (in milliseconds) between retries. Defaults to 60000 milliseconds. - */ - public AsyncDeepgramApiClientBuilder maxRetryDelayMillis(long maxRetryDelayMillis) { - this.maxRetryDelayMillis = Optional.of(maxRetryDelayMillis); - return this; - } - - /** - * Sets the jitter factor (between 0 and 1) applied to retry delays. Defaults to 0.2. - */ - public AsyncDeepgramApiClientBuilder retryJitterFactor(double retryJitterFactor) { - this.retryJitterFactor = Optional.of(retryJitterFactor); - return this; - } - /** * Sets the underlying OkHttp client */ @@ -156,9 +126,7 @@ protected void setEnvironment(ClientOptions.Builder builder) { * } */ protected void setAuthentication(ClientOptions.Builder builder) { - if (this.apiKey != null) { - builder.addHeader("Authorization", "Token " + this.apiKey); - } + builder.addHeader("Authorization", "Token " + this.apiKey); } /** @@ -183,15 +151,6 @@ protected void setRetries(ClientOptions.Builder builder) { if (this.maxRetries.isPresent()) { builder.maxRetries(this.maxRetries.get()); } - if (this.initialRetryDelayMillis.isPresent()) { - builder.initialRetryDelayMillis(this.initialRetryDelayMillis.get()); - } - if (this.maxRetryDelayMillis.isPresent()) { - builder.maxRetryDelayMillis(this.maxRetryDelayMillis.get()); - } - if (this.retryJitterFactor.isPresent()) { - builder.retryJitterFactor(this.retryJitterFactor.get()); - } } /** diff --git a/src/main/java/com/deepgram/AsyncDeepgramClientBuilder.java b/src/main/java/com/deepgram/AsyncDeepgramClientBuilder.java index 89157af8..c147d264 100644 --- a/src/main/java/com/deepgram/AsyncDeepgramClientBuilder.java +++ b/src/main/java/com/deepgram/AsyncDeepgramClientBuilder.java @@ -85,24 +85,6 @@ public AsyncDeepgramClientBuilder maxRetries(int maxRetries) { return this; } - @Override - public AsyncDeepgramClientBuilder initialRetryDelayMillis(long initialRetryDelayMillis) { - super.initialRetryDelayMillis(initialRetryDelayMillis); - return this; - } - - @Override - public AsyncDeepgramClientBuilder maxRetryDelayMillis(long maxRetryDelayMillis) { - super.maxRetryDelayMillis(maxRetryDelayMillis); - return this; - } - - @Override - public AsyncDeepgramClientBuilder retryJitterFactor(double retryJitterFactor) { - super.retryJitterFactor(retryJitterFactor); - return this; - } - @Override public AsyncDeepgramClientBuilder httpClient(OkHttpClient httpClient) { super.httpClient(httpClient); diff --git a/src/main/java/com/deepgram/DeepgramApiClientBuilder.java b/src/main/java/com/deepgram/DeepgramApiClientBuilder.java index 5d61fbdd..b6060d1f 100644 --- a/src/main/java/com/deepgram/DeepgramApiClientBuilder.java +++ b/src/main/java/com/deepgram/DeepgramApiClientBuilder.java @@ -16,12 +16,6 @@ public class DeepgramApiClientBuilder { private Optional maxRetries = Optional.empty(); - private Optional initialRetryDelayMillis = Optional.empty(); - - private Optional maxRetryDelayMillis = Optional.empty(); - - private Optional retryJitterFactor = Optional.empty(); - private final Map customHeaders = new HashMap<>(); private String apiKey = System.getenv("DEEPGRAM_API_KEY"); @@ -62,30 +56,6 @@ public DeepgramApiClientBuilder maxRetries(int maxRetries) { return this; } - /** - * Sets the initial delay (in milliseconds) used for exponential backoff between retries. Defaults to 1000 milliseconds. - */ - public DeepgramApiClientBuilder initialRetryDelayMillis(long initialRetryDelayMillis) { - this.initialRetryDelayMillis = Optional.of(initialRetryDelayMillis); - return this; - } - - /** - * Sets the maximum delay (in milliseconds) between retries. Defaults to 60000 milliseconds. - */ - public DeepgramApiClientBuilder maxRetryDelayMillis(long maxRetryDelayMillis) { - this.maxRetryDelayMillis = Optional.of(maxRetryDelayMillis); - return this; - } - - /** - * Sets the jitter factor (between 0 and 1) applied to retry delays. Defaults to 0.2. - */ - public DeepgramApiClientBuilder retryJitterFactor(double retryJitterFactor) { - this.retryJitterFactor = Optional.of(retryJitterFactor); - return this; - } - /** * Sets the underlying OkHttp client */ @@ -156,9 +126,7 @@ protected void setEnvironment(ClientOptions.Builder builder) { * } */ protected void setAuthentication(ClientOptions.Builder builder) { - if (this.apiKey != null) { - builder.addHeader("Authorization", "Token " + this.apiKey); - } + builder.addHeader("Authorization", "Token " + this.apiKey); } /** @@ -183,15 +151,6 @@ protected void setRetries(ClientOptions.Builder builder) { if (this.maxRetries.isPresent()) { builder.maxRetries(this.maxRetries.get()); } - if (this.initialRetryDelayMillis.isPresent()) { - builder.initialRetryDelayMillis(this.initialRetryDelayMillis.get()); - } - if (this.maxRetryDelayMillis.isPresent()) { - builder.maxRetryDelayMillis(this.maxRetryDelayMillis.get()); - } - if (this.retryJitterFactor.isPresent()) { - builder.retryJitterFactor(this.retryJitterFactor.get()); - } } /** diff --git a/src/main/java/com/deepgram/DeepgramClientBuilder.java b/src/main/java/com/deepgram/DeepgramClientBuilder.java index 0ba140cb..eb3a1664 100644 --- a/src/main/java/com/deepgram/DeepgramClientBuilder.java +++ b/src/main/java/com/deepgram/DeepgramClientBuilder.java @@ -84,24 +84,6 @@ public DeepgramClientBuilder maxRetries(int maxRetries) { return this; } - @Override - public DeepgramClientBuilder initialRetryDelayMillis(long initialRetryDelayMillis) { - super.initialRetryDelayMillis(initialRetryDelayMillis); - return this; - } - - @Override - public DeepgramClientBuilder maxRetryDelayMillis(long maxRetryDelayMillis) { - super.maxRetryDelayMillis(maxRetryDelayMillis); - return this; - } - - @Override - public DeepgramClientBuilder retryJitterFactor(double retryJitterFactor) { - super.retryJitterFactor(retryJitterFactor); - return this; - } - @Override public DeepgramClientBuilder httpClient(OkHttpClient httpClient) { super.httpClient(httpClient); diff --git a/src/main/java/com/deepgram/core/ClientOptions.java b/src/main/java/com/deepgram/core/ClientOptions.java index e2a76ffc..021caba9 100644 --- a/src/main/java/com/deepgram/core/ClientOptions.java +++ b/src/main/java/com/deepgram/core/ClientOptions.java @@ -23,12 +23,6 @@ public final class ClientOptions { private final int maxRetries; - private final Optional initialRetryDelayMillis; - - private final Optional maxRetryDelayMillis; - - private final Optional retryJitterFactor; - private final Optional webSocketFactory; private final Optional logging; @@ -40,9 +34,6 @@ private ClientOptions( OkHttpClient httpClient, int timeout, int maxRetries, - Optional initialRetryDelayMillis, - Optional maxRetryDelayMillis, - Optional retryJitterFactor, Optional webSocketFactory, Optional logging) { this.environment = environment; @@ -50,19 +41,16 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.deepgram.deepgram-java-sdk/" + getSdkVersion()); + put("User-Agent", "com.deepgram:deepgram-java-sdk/0.7.1"); // x-release-please-version put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.deepgram:deepgram-java-sdk"); - put("X-Fern-SDK-Version", getSdkVersion()); + put("X-Fern-SDK-Version", "0.7.1"); // x-release-please-version } }); this.headerSuppliers = headerSuppliers; this.httpClient = httpClient; this.timeout = timeout; this.maxRetries = maxRetries; - this.initialRetryDelayMillis = initialRetryDelayMillis; - this.maxRetryDelayMillis = maxRetryDelayMillis; - this.retryJitterFactor = retryJitterFactor; this.webSocketFactory = webSocketFactory; this.logging = logging; } @@ -82,11 +70,6 @@ public Map headers(RequestOptions requestOptions) { return values; } - private static String getSdkVersion() { - String version = ClientOptions.class.getPackage().getImplementationVersion(); - return version != null ? version : "0.7.2"; - } - public int timeout(RequestOptions requestOptions) { if (requestOptions == null) { return this.timeout; @@ -115,18 +98,6 @@ public int maxRetries() { return this.maxRetries; } - public Optional initialRetryDelayMillis() { - return this.initialRetryDelayMillis; - } - - public Optional maxRetryDelayMillis() { - return this.maxRetryDelayMillis; - } - - public Optional retryJitterFactor() { - return this.retryJitterFactor; - } - public Optional webSocketFactory() { return this.webSocketFactory; } @@ -148,12 +119,6 @@ public static class Builder { private int maxRetries = 2; - private Optional initialRetryDelayMillis = Optional.empty(); - - private Optional maxRetryDelayMillis = Optional.empty(); - - private Optional retryJitterFactor = Optional.empty(); - private Optional timeout = Optional.empty(); private OkHttpClient httpClient = null; @@ -168,9 +133,7 @@ public Builder environment(Environment environment) { } public Builder addHeader(String key, String value) { - if (value != null) { - this.headers.put(key, value); - } + this.headers.put(key, value); return this; } @@ -203,30 +166,6 @@ public Builder maxRetries(int maxRetries) { return this; } - /** - * Override the initial delay (in milliseconds) used for exponential backoff between retries. Defaults to 1000 milliseconds. - */ - public Builder initialRetryDelayMillis(long initialRetryDelayMillis) { - this.initialRetryDelayMillis = Optional.of(initialRetryDelayMillis); - return this; - } - - /** - * Override the maximum delay (in milliseconds) between retries. Defaults to 60000 milliseconds. - */ - public Builder maxRetryDelayMillis(long maxRetryDelayMillis) { - this.maxRetryDelayMillis = Optional.of(maxRetryDelayMillis); - return this; - } - - /** - * Override the jitter factor (between 0 and 1) applied to retry delays. Defaults to 0.2. - */ - public Builder retryJitterFactor(double retryJitterFactor) { - this.retryJitterFactor = Optional.of(retryJitterFactor); - return this; - } - public Builder httpClient(OkHttpClient httpClient) { this.httpClient = httpClient; return this; @@ -264,16 +203,11 @@ public ClientOptions build() { .connectTimeout(0, TimeUnit.SECONDS) .writeTimeout(0, TimeUnit.SECONDS) .readTimeout(0, TimeUnit.SECONDS) - .addInterceptor(new RetryInterceptor( - this.maxRetries, - this.initialRetryDelayMillis, - this.maxRetryDelayMillis, - this.retryJitterFactor)); + .addInterceptor(new RetryInterceptor(this.maxRetries)); } Logger logger = Logger.from(this.logging); httpClientBuilder.addInterceptor(new LoggingInterceptor(logger)); - httpClientBuilder.addInterceptor(new ResponseDecompressionInterceptor()); this.httpClient = httpClientBuilder.build(); this.timeout = Optional.of(httpClient.callTimeoutMillis() / 1000); @@ -285,9 +219,6 @@ public ClientOptions build() { httpClient, this.timeout.get(), this.maxRetries, - this.initialRetryDelayMillis, - this.maxRetryDelayMillis, - this.retryJitterFactor, this.webSocketFactory, this.logging); } @@ -303,9 +234,6 @@ public static Builder from(ClientOptions clientOptions) { builder.headers.putAll(clientOptions.headers); builder.headerSuppliers.putAll(clientOptions.headerSuppliers); builder.maxRetries = clientOptions.maxRetries(); - builder.initialRetryDelayMillis = clientOptions.initialRetryDelayMillis(); - builder.maxRetryDelayMillis = clientOptions.maxRetryDelayMillis(); - builder.retryJitterFactor = clientOptions.retryJitterFactor(); builder.logging = clientOptions.logging(); return builder; } diff --git a/src/main/java/com/deepgram/core/ConsoleLogger.java b/src/main/java/com/deepgram/core/ConsoleLogger.java index c96f3acb..a0b46a93 100644 --- a/src/main/java/com/deepgram/core/ConsoleLogger.java +++ b/src/main/java/com/deepgram/core/ConsoleLogger.java @@ -23,7 +23,6 @@ public String format(java.util.logging.LogRecord record) { return record.getLevel() + " - " + record.getMessage() + System.lineSeparator(); } }); - handler.setLevel(Level.ALL); logger.addHandler(handler); logger.setUseParentHandlers(false); logger.setLevel(Level.ALL); diff --git a/src/main/java/com/deepgram/core/DateTimeDeserializer.java b/src/main/java/com/deepgram/core/DateTimeDeserializer.java index d7f66b5a..0a8e0b67 100644 --- a/src/main/java/com/deepgram/core/DateTimeDeserializer.java +++ b/src/main/java/com/deepgram/core/DateTimeDeserializer.java @@ -19,8 +19,7 @@ import java.time.temporal.TemporalQueries; /** - * Custom deserializer that handles converting date-time strings into {@link OffsetDateTime} objects. - * Supports ISO 8601 format, space-separated variants, and RFC 1123 (RFC 2822) format. + * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. */ class DateTimeDeserializer extends JsonDeserializer { private static final SimpleModule MODULE; @@ -49,15 +48,9 @@ public OffsetDateTime deserialize(JsonParser parser, DeserializationContext cont try { temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(value, OffsetDateTime::from, LocalDateTime::from); } catch (DateTimeParseException e) { - try { - // Fall back to space-separated format (e.g. "2025-02-15 10:30:00+00:00"). - temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( - value.replace(' ', 'T'), OffsetDateTime::from, LocalDateTime::from); - } catch (DateTimeParseException e2) { - // Fall back to RFC 1123 format (e.g. "Thu, 07 May 2026 14:23:38 +0000"). - temporal = DateTimeFormatter.RFC_1123_DATE_TIME.parseBest( - value, OffsetDateTime::from, LocalDateTime::from); - } + // Fall back to space-separated format (e.g. "2025-02-15 10:30:00+00:00"). + temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( + value.replace(' ', 'T'), OffsetDateTime::from, LocalDateTime::from); } if (temporal.query(TemporalQueries.offset()) == null) { diff --git a/src/main/java/com/deepgram/core/RequestOptions.java b/src/main/java/com/deepgram/core/RequestOptions.java index 0e706417..d0e615a6 100644 --- a/src/main/java/com/deepgram/core/RequestOptions.java +++ b/src/main/java/com/deepgram/core/RequestOptions.java @@ -16,8 +16,6 @@ public final class RequestOptions { private final TimeUnit timeoutTimeUnit; - private final Optional maxRetries; - private final Map headers; private final Map> headerSuppliers; @@ -30,7 +28,6 @@ private RequestOptions( String apiKey, Optional timeout, TimeUnit timeoutTimeUnit, - Optional maxRetries, Map headers, Map> headerSuppliers, Map queryParameters, @@ -38,7 +35,6 @@ private RequestOptions( this.apiKey = apiKey; this.timeout = timeout; this.timeoutTimeUnit = timeoutTimeUnit; - this.maxRetries = maxRetries; this.headers = headers; this.headerSuppliers = headerSuppliers; this.queryParameters = queryParameters; @@ -53,10 +49,6 @@ public TimeUnit getTimeoutTimeUnit() { return timeoutTimeUnit; } - public Optional getMaxRetries() { - return maxRetries; - } - public Map getHeaders() { Map headers = new HashMap<>(); if (this.apiKey != null) { @@ -88,8 +80,6 @@ public static class Builder { private TimeUnit timeoutTimeUnit = TimeUnit.SECONDS; - private Optional maxRetries = Optional.empty(); - private final Map headers = new HashMap<>(); private final Map> headerSuppliers = new HashMap<>(); @@ -114,11 +104,6 @@ public Builder timeout(Integer timeout, TimeUnit timeoutTimeUnit) { return this; } - public Builder maxRetries(Integer maxRetries) { - this.maxRetries = Optional.of(maxRetries); - return this; - } - public Builder addHeader(String key, String value) { this.headers.put(key, value); return this; @@ -144,7 +129,6 @@ public RequestOptions build() { apiKey, timeout, timeoutTimeUnit, - maxRetries, headers, headerSuppliers, queryParameters, diff --git a/src/main/java/com/deepgram/core/ResponseDecompressionInterceptor.java b/src/main/java/com/deepgram/core/ResponseDecompressionInterceptor.java deleted file mode 100644 index f49b9989..00000000 --- a/src/main/java/com/deepgram/core/ResponseDecompressionInterceptor.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.core; - -import java.io.IOException; -import java.util.zip.Inflater; -import okhttp3.Interceptor; -import okhttp3.Response; -import okhttp3.ResponseBody; -import okio.GzipSource; -import okio.InflaterSource; -import okio.Okio; -import okio.Source; - -/** - * Decompresses gzip and deflate encoded response bodies. OkHttp only performs - * transparent decompression when it adds the Accept-Encoding header itself, so - * responses to requests with an explicitly set Accept-Encoding header would - * otherwise be returned as raw compressed bytes. - */ -public class ResponseDecompressionInterceptor implements Interceptor { - - @Override - public Response intercept(Chain chain) throws IOException { - return decompress(chain.proceed(chain.request())); - } - - private Response decompress(Response response) { - ResponseBody body = response.body(); - if (body == null) { - return response; - } - String encoding = response.header("Content-Encoding"); - if (encoding == null) { - return response; - } - Source decompressedSource; - if (encoding.equalsIgnoreCase("gzip") || encoding.equalsIgnoreCase("x-gzip")) { - decompressedSource = new GzipSource(body.source()); - } else if (encoding.equalsIgnoreCase("deflate")) { - decompressedSource = new InflaterSource(body.source(), new Inflater()); - } else { - return response; - } - ResponseBody decompressedBody = ResponseBody.create(body.contentType(), -1L, Okio.buffer(decompressedSource)); - return response.newBuilder() - .headers(response.headers() - .newBuilder() - .removeAll("Content-Encoding") - .removeAll("Content-Length") - .build()) - .body(decompressedBody) - .build(); - } -} diff --git a/src/main/java/com/deepgram/core/RetryInterceptor.java b/src/main/java/com/deepgram/core/RetryInterceptor.java index a0959bbc..91e8e267 100644 --- a/src/main/java/com/deepgram/core/RetryInterceptor.java +++ b/src/main/java/com/deepgram/core/RetryInterceptor.java @@ -11,71 +11,34 @@ import java.util.Optional; import java.util.Random; import okhttp3.Interceptor; -import okhttp3.Request; import okhttp3.Response; public class RetryInterceptor implements Interceptor { - private static final Duration DEFAULT_INITIAL_RETRY_DELAY = Duration.ofMillis(1000); - private static final Duration DEFAULT_MAX_RETRY_DELAY = Duration.ofMillis(60000); - private static final double DEFAULT_JITTER_FACTOR = 0.2; + private static final Duration INITIAL_RETRY_DELAY = Duration.ofMillis(1000); + private static final Duration MAX_RETRY_DELAY = Duration.ofMillis(60000); + private static final double JITTER_FACTOR = 0.2; private final int maxRetries; - private final Duration initialRetryDelay; - private final Duration maxRetryDelay; - private final double jitterFactor; private final Random random = new Random(); public RetryInterceptor(int maxRetries) { - this(maxRetries, Optional.empty(), Optional.empty(), Optional.empty()); - } - - public RetryInterceptor( - int maxRetries, - Optional initialRetryDelayMillis, - Optional maxRetryDelayMillis, - Optional jitterFactor) { - initialRetryDelayMillis.ifPresent(delay -> { - if (delay < 0) { - throw new IllegalArgumentException("initialRetryDelayMillis must be non-negative"); - } - }); - maxRetryDelayMillis.ifPresent(delay -> { - if (delay < 0) { - throw new IllegalArgumentException("maxRetryDelayMillis must be non-negative"); - } - }); - jitterFactor.ifPresent(factor -> { - if (factor < 0 || factor > 1) { - throw new IllegalArgumentException("jitterFactor must be between 0 and 1"); - } - }); this.maxRetries = maxRetries; - this.initialRetryDelay = initialRetryDelayMillis.map(Duration::ofMillis).orElse(DEFAULT_INITIAL_RETRY_DELAY); - this.maxRetryDelay = maxRetryDelayMillis.map(Duration::ofMillis).orElse(DEFAULT_MAX_RETRY_DELAY); - this.jitterFactor = jitterFactor.orElse(DEFAULT_JITTER_FACTOR); } @Override public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - int effectiveMaxRetries = resolveMaxRetries(request); - Response response = chain.proceed(request); + Response response = chain.proceed(chain.request()); if (shouldRetry(response.code())) { - return retryChain(response, chain, effectiveMaxRetries); + return retryChain(response, chain); } return response; } - private int resolveMaxRetries(Request request) { - MaxRetriesOverride override = request.tag(MaxRetriesOverride.class); - return override != null ? override.getValue() : this.maxRetries; - } - - private Response retryChain(Response response, Chain chain, int maxRetries) throws IOException { - ExponentialBackoff backoff = new ExponentialBackoff(maxRetries); + private Response retryChain(Response response, Chain chain) throws IOException { + ExponentialBackoff backoff = new ExponentialBackoff(this.maxRetries); Optional nextBackoff = backoff.nextBackoff(response); while (nextBackoff.isPresent()) { try { @@ -107,7 +70,7 @@ private Duration getRetryDelayFromHeaders(Response response, int retryAttempt) { Optional secondsDelay = tryParseLong(retryAfter) .map(seconds -> seconds * 1000) .filter(delayMs -> delayMs > 0) - .map(delayMs -> Math.min(delayMs, maxRetryDelay.toMillis())) + .map(delayMs -> Math.min(delayMs, MAX_RETRY_DELAY.toMillis())) .map(Duration::ofMillis); if (secondsDelay.isPresent()) { return secondsDelay.get(); @@ -117,7 +80,7 @@ private Duration getRetryDelayFromHeaders(Response response, int retryAttempt) { Optional dateDelay = tryParseHttpDate(retryAfter) .map(resetTime -> resetTime.toInstant().toEpochMilli() - System.currentTimeMillis()) .filter(delayMs -> delayMs > 0) - .map(delayMs -> Math.min(delayMs, maxRetryDelay.toMillis())) + .map(delayMs -> Math.min(delayMs, MAX_RETRY_DELAY.toMillis())) .map(Duration::ofMillis); if (dateDelay.isPresent()) { return dateDelay.get(); @@ -131,7 +94,7 @@ private Duration getRetryDelayFromHeaders(Response response, int retryAttempt) { Optional rateLimitDelay = tryParseLong(rateLimitReset) .map(resetTimeSeconds -> (resetTimeSeconds * 1000) - System.currentTimeMillis()) .filter(delayMs -> delayMs > 0) - .map(delayMs -> Math.min(delayMs, maxRetryDelay.toMillis())) + .map(delayMs -> Math.min(delayMs, MAX_RETRY_DELAY.toMillis())) .map(this::addPositiveJitter) .map(Duration::ofMillis); if (rateLimitDelay.isPresent()) { @@ -140,15 +103,8 @@ private Duration getRetryDelayFromHeaders(Response response, int retryAttempt) { } // Fall back to exponential backoff, with symmetric jitter - long initialDelayMillis = initialRetryDelay.toMillis(); - long maxDelayMillis = maxRetryDelay.toMillis(); - long cappedDelay; - if (retryAttempt >= Long.SIZE - 1 || initialDelayMillis > (maxDelayMillis >> retryAttempt)) { - // initialDelayMillis * 2^retryAttempt would exceed maxDelayMillis (or overflow) - cappedDelay = maxDelayMillis; - } else { - cappedDelay = Math.min(initialDelayMillis << retryAttempt, maxDelayMillis); // 2^retryAttempt - } + long baseDelay = INITIAL_RETRY_DELAY.toMillis() * (1L << retryAttempt); // 2^retryAttempt + long cappedDelay = Math.min(baseDelay, MAX_RETRY_DELAY.toMillis()); return Duration.ofMillis(addSymmetricJitter(cappedDelay)); } @@ -185,7 +141,7 @@ private Optional tryParseHttpDate(String value) { * Used for X-RateLimit-Reset header delays. */ private long addPositiveJitter(long delayMs) { - double jitterMultiplier = 1.0 + (random.nextDouble() * jitterFactor); + double jitterMultiplier = 1.0 + (random.nextDouble() * JITTER_FACTOR); return (long) (delayMs * jitterMultiplier); } @@ -194,7 +150,7 @@ private long addPositiveJitter(long delayMs) { * Used for exponential backoff delays. */ private long addSymmetricJitter(long delayMs) { - double jitterMultiplier = 1.0 + ((random.nextDouble() - 0.5) * jitterFactor); + double jitterMultiplier = 1.0 + ((random.nextDouble() - 0.5) * JITTER_FACTOR); return (long) (delayMs * jitterMultiplier); } @@ -202,23 +158,6 @@ private static boolean shouldRetry(int statusCode) { return statusCode == 408 || statusCode == 429 || statusCode >= 500; } - /** - * Per-request override carried on the OkHttp {@link Request} as a tag. - * When present, the interceptor uses this value instead of the client-wide - * {@code maxRetries} configured at construction time. - */ - public static final class MaxRetriesOverride { - private final int value; - - public MaxRetriesOverride(int value) { - this.value = value; - } - - public int getValue() { - return value; - } - } - private final class ExponentialBackoff { private final int maxNumRetries; diff --git a/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/AsyncRawModelsClient.java b/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/AsyncRawModelsClient.java index a2c304c4..cb35a9a2 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/AsyncRawModelsClient.java +++ b/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/AsyncRawModelsClient.java @@ -9,7 +9,6 @@ import com.deepgram.core.DeepgramHttpException; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.types.AgentThinkModelsV1Response; import com.fasterxml.jackson.core.JsonProcessingException; @@ -61,15 +60,6 @@ public CompletableFuture> li if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -96,9 +86,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/RawModelsClient.java b/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/RawModelsClient.java index f22e1792..51a486f9 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/RawModelsClient.java +++ b/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/RawModelsClient.java @@ -9,7 +9,6 @@ import com.deepgram.core.DeepgramHttpException; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.types.AgentThinkModelsV1Response; import com.fasterxml.jackson.core.JsonProcessingException; @@ -57,15 +56,6 @@ public DeepgramApiHttpResponse list(RequestOptions r if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -85,8 +75,6 @@ public DeepgramApiHttpResponse list(RequestOptions r Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1AgentStartedSpeaking.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1AgentStartedSpeaking.java index 42d8e69c..65c5d4e9 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1AgentStartedSpeaking.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1AgentStartedSpeaking.java @@ -148,6 +148,7 @@ public Builder from(AgentV1AgentStartedSpeaking other) { } /** + *

Seconds from receiving the user's utterance to producing the agent's reply

*

Seconds from receiving the user's utterance to producing the agent's reply

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -159,6 +160,7 @@ public TtsLatencyStage totalLatency(float totalLatency) { } /** + *

The portion of total latency attributable to text-to-speech

*

The portion of total latency attributable to text-to-speech

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -170,6 +172,7 @@ public TttLatencyStage ttsLatency(float ttsLatency) { } /** + *

The portion of total latency attributable to text-to-text (usually an LLM)

*

The portion of total latency attributable to text-to-text (usually an LLM)

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1AgentThinking.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1AgentThinking.java index 60b37ddc..b98b6b5e 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1AgentThinking.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1AgentThinking.java @@ -106,6 +106,7 @@ public Builder from(AgentV1AgentThinking other) { } /** + *

The text of the agent's thought process

*

The text of the agent's thought process

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ConversationText.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ConversationText.java index 6533a483..a15a427c 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ConversationText.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ConversationText.java @@ -180,6 +180,7 @@ public Builder from(AgentV1ConversationText other) { } /** + *

Identifies who spoke the statement

*

Identifies who spoke the statement

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -191,6 +192,7 @@ public ContentStage role(@NotNull AgentV1ConversationTextRole role) { } /** + *

The actual statement that was spoken

*

The actual statement that was spoken

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Error.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Error.java index 7ac10b81..aa97cc90 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Error.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Error.java @@ -127,6 +127,7 @@ public Builder from(AgentV1Error other) { } /** + *

A description of what went wrong

*

A description of what went wrong

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -138,6 +139,7 @@ public CodeStage description(@NotNull String description) { } /** + *

Error code identifying the type of error

*

Error code identifying the type of error

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1FunctionCallRequestFunctionsItem.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1FunctionCallRequestFunctionsItem.java index 15267f39..d683b72f 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1FunctionCallRequestFunctionsItem.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1FunctionCallRequestFunctionsItem.java @@ -195,6 +195,7 @@ public Builder from(AgentV1FunctionCallRequestFunctionsItem other) { } /** + *

Unique identifier for the function call

*

Unique identifier for the function call

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -206,6 +207,7 @@ public NameStage id(@NotNull String id) { } /** + *

The name of the function to call

*

The name of the function to call

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -217,6 +219,7 @@ public ArgumentsStage name(@NotNull String name) { } /** + *

JSON string containing the function arguments

*

JSON string containing the function arguments

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -228,6 +231,7 @@ public ClientSideStage arguments(@NotNull String arguments) { } /** + *

Whether the function should be executed client-side

*

Whether the function should be executed client-side

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1HistoryFunctionCallsFunctionCallsItem.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1HistoryFunctionCallsFunctionCallsItem.java index 4a45de4e..0a04bbf9 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1HistoryFunctionCallsFunctionCallsItem.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1HistoryFunctionCallsFunctionCallsItem.java @@ -219,6 +219,7 @@ public Builder from(AgentV1HistoryFunctionCallsFunctionCallsItem other) { } /** + *

Unique identifier for the function call

*

Unique identifier for the function call

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -230,6 +231,7 @@ public NameStage id(@NotNull String id) { } /** + *

Name of the function called

*

Name of the function called

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -241,6 +243,7 @@ public ClientSideStage name(@NotNull String name) { } /** + *

Indicates if the call was client-side or server-side

*

Indicates if the call was client-side or server-side

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -252,6 +255,7 @@ public ArgumentsStage clientSide(boolean clientSide) { } /** + *

Arguments passed to the function

*

Arguments passed to the function

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -263,6 +267,7 @@ public ResponseStage arguments(@NotNull String arguments) { } /** + *

Response from the function call

*

Response from the function call

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectAgentMessage.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectAgentMessage.java index 872f4fbb..88be5ed8 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectAgentMessage.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectAgentMessage.java @@ -142,6 +142,7 @@ public Builder from(AgentV1InjectAgentMessage other) { } /** + *

The statement that the agent should say

*

The statement that the agent should say

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectUserMessage.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectUserMessage.java index f6d0aaf2..38696b64 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectUserMessage.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectUserMessage.java @@ -106,6 +106,7 @@ public Builder from(AgentV1InjectUserMessage other) { } /** + *

The specific phrase or statement the agent should respond to

*

The specific phrase or statement the agent should respond to

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectionRefused.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectionRefused.java index de789a23..8a2250da 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectionRefused.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1InjectionRefused.java @@ -106,6 +106,7 @@ public Builder from(AgentV1InjectionRefused other) { } /** + *

Details about why the injection was refused

*

Details about why the injection was refused

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1LatencyReport.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1LatencyReport.java index 39aecfb2..f6efcc4d 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1LatencyReport.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1LatencyReport.java @@ -20,8 +20,6 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AgentV1LatencyReport.Builder.class) public final class AgentV1LatencyReport { - private final Optional sttLatency; - private final Optional tttTokenLatency; private final Optional tttTextLatency; @@ -37,7 +35,6 @@ public final class AgentV1LatencyReport { private final Map additionalProperties; private AgentV1LatencyReport( - Optional sttLatency, Optional tttTokenLatency, Optional tttTextLatency, Optional tttToolLatency, @@ -45,7 +42,6 @@ private AgentV1LatencyReport( Optional ttsLatency, Optional totalLatency, Map additionalProperties) { - this.sttLatency = sttLatency; this.tttTokenLatency = tttTokenLatency; this.tttTextLatency = tttTextLatency; this.tttToolLatency = tttToolLatency; @@ -63,14 +59,6 @@ public String getType() { return "LatencyReport"; } - /** - * @return Speech-to-text: time from audio received to transcript produced, in seconds - */ - @JsonProperty("stt_latency") - public Optional getSttLatency() { - return sttLatency; - } - /** * @return Time to first token of any type (text, tool call, or thinking), in seconds */ @@ -131,8 +119,7 @@ public Map getAdditionalProperties() { } private boolean equalTo(AgentV1LatencyReport other) { - return sttLatency.equals(other.sttLatency) - && tttTokenLatency.equals(other.tttTokenLatency) + return tttTokenLatency.equals(other.tttTokenLatency) && tttTextLatency.equals(other.tttTextLatency) && tttToolLatency.equals(other.tttToolLatency) && tttThinkingLatency.equals(other.tttThinkingLatency) @@ -143,7 +130,6 @@ private boolean equalTo(AgentV1LatencyReport other) { @java.lang.Override public int hashCode() { return Objects.hash( - this.sttLatency, this.tttTokenLatency, this.tttTextLatency, this.tttToolLatency, @@ -163,8 +149,6 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional sttLatency = Optional.empty(); - private Optional tttTokenLatency = Optional.empty(); private Optional tttTextLatency = Optional.empty(); @@ -183,7 +167,6 @@ public static final class Builder { private Builder() {} public Builder from(AgentV1LatencyReport other) { - sttLatency(other.getSttLatency()); tttTokenLatency(other.getTttTokenLatency()); tttTextLatency(other.getTttTextLatency()); tttToolLatency(other.getTttToolLatency()); @@ -193,20 +176,6 @@ public Builder from(AgentV1LatencyReport other) { return this; } - /** - *

Speech-to-text: time from audio received to transcript produced, in seconds

- */ - @JsonSetter(value = "stt_latency", nulls = Nulls.SKIP) - public Builder sttLatency(Optional sttLatency) { - this.sttLatency = sttLatency; - return this; - } - - public Builder sttLatency(Float sttLatency) { - this.sttLatency = Optional.ofNullable(sttLatency); - return this; - } - /** *

Time to first token of any type (text, tool call, or thinking), in seconds

*/ @@ -293,7 +262,6 @@ public Builder totalLatency(Float totalLatency) { public AgentV1LatencyReport build() { return new AgentV1LatencyReport( - sttLatency, tttTokenLatency, tttTextLatency, tttToolLatency, diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ReceiveFunctionCallResponse.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ReceiveFunctionCallResponse.java index 1ee16f69..17e67d85 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ReceiveFunctionCallResponse.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ReceiveFunctionCallResponse.java @@ -160,6 +160,7 @@ public Builder from(AgentV1ReceiveFunctionCallResponse other) { } /** + *

The name of the function being called

*

The name of the function being called

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -171,6 +172,7 @@ public ContentStage name(@NotNull String name) { } /** + *

The content or result of the function call

*

The content or result of the function call

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SendFunctionCallResponse.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SendFunctionCallResponse.java index 4562fa90..e89546b9 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SendFunctionCallResponse.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SendFunctionCallResponse.java @@ -159,6 +159,7 @@ public Builder from(AgentV1SendFunctionCallResponse other) { } /** + *

The name of the function being called

*

The name of the function being called

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -170,6 +171,7 @@ public ContentStage name(@NotNull String name) { } /** + *

The content or result of the function call

*

The content or result of the function call

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextListenProvider.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextListenProvider.java index 81315366..eea1585a 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextListenProvider.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextListenProvider.java @@ -99,16 +99,7 @@ public interface Visitor { T _visitUnknown(Object unknownType); } - // Manual patch: "version" is optional on both DeepgramListenProviderV1/V2, so a provider - // object without it is a valid payload. Fern points defaultImpl at _UnknownValue, whose - // @JsonCreator has an empty body, so such a payload deserialized to an unknown variant - // carrying null -- getV2() came back empty and re-serializing emitted null, silently dropping - // the caller's provider. Default to V2Value, matching the server's own default. Kept - // consistent with AgentV1UpdateListenListenProvider. Remove once Fern defaults to a real - // variant. Note this also coerces an unrecognized future version to V2, which is deliberate: - // Settings is client-sent, so the caller chooses the version, and preserving the provider - // beats dropping it. - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "version", visible = true, defaultImpl = V2Value.class) + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "version", visible = true, defaultImpl = _UnknownValue.class) @JsonSubTypes({@JsonSubTypes.Type(V1Value.class), @JsonSubTypes.Type(V2Value.class)}) @JsonIgnoreProperties(ignoreUnknown = true) private interface Value { diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentListenProvider.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentListenProvider.java index f3692183..4309ec04 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentListenProvider.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentListenProvider.java @@ -99,16 +99,7 @@ public interface Visitor { T _visitUnknown(Object unknownType); } - // Manual patch: "version" is optional on both DeepgramListenProviderV1/V2, so a provider - // object without it is a valid payload. Fern points defaultImpl at _UnknownValue, whose - // @JsonCreator has an empty body, so such a payload deserialized to an unknown variant - // carrying null -- getV2() came back empty and re-serializing emitted null, silently dropping - // the caller's provider. Default to V2Value, matching the server's own default. Kept - // consistent with AgentV1UpdateListenListenProvider. Remove once Fern defaults to a real - // variant. Note this also coerces an unrecognized future version to V2, which is deliberate: - // Settings is client-sent, so the caller chooses the version, and preserving the provider - // beats dropping it. - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "version", visible = true, defaultImpl = V2Value.class) + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "version", visible = true, defaultImpl = _UnknownValue.class) @JsonSubTypes({@JsonSubTypes.Type(V1Value.class), @JsonSubTypes.Type(V2Value.class)}) @JsonIgnoreProperties(ignoreUnknown = true) private interface Value { diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioInput.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioInput.java index 9e72cc65..714c93dd 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioInput.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioInput.java @@ -120,6 +120,7 @@ public Builder from(AgentV1SettingsAudioInput other) { } /** + *

Audio encoding format

*

Audio encoding format

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -131,6 +132,7 @@ public SampleRateStage encoding(@NotNull AgentV1SettingsAudioInputEncoding encod } /** + *

Sample rate in Hz. Common values are 16000, 24000, 44100, 48000

*

Sample rate in Hz. Common values are 16000, 24000, 44100, 48000

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListen.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListen.java index f200eb6f..432d72b5 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListen.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListen.java @@ -37,7 +37,7 @@ public String getType() { } /** - * @return Listen configuration to update. Contains a provider object with the same schema as Settings. The model and language can be changed mid-session. + * @return Listen configuration to update. Contains a provider object with the same schema as Settings. The provider identity (type, version, model) is required and must match the current session. */ @JsonProperty("listen") public AgentV1UpdateListenListen getListen() { @@ -75,7 +75,7 @@ public static ListenStage builder() { public interface ListenStage { /** - *

Listen configuration to update. Contains a provider object with the same schema as Settings. The model and language can be changed mid-session.

+ *

Listen configuration to update. Contains a provider object with the same schema as Settings. The provider identity (type, version, model) is required and must match the current session.

*/ _FinalStage listen(@NotNull AgentV1UpdateListenListen listen); @@ -106,7 +106,8 @@ public Builder from(AgentV1UpdateListen other) { } /** - *

Listen configuration to update. Contains a provider object with the same schema as Settings. The model and language can be changed mid-session.

+ *

Listen configuration to update. Contains a provider object with the same schema as Settings. The provider identity (type, version, model) is required and must match the current session.

+ *

Listen configuration to update. Contains a provider object with the same schema as Settings. The provider identity (type, version, model) is required and must match the current session.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListen.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListen.java index 43b3852d..c65548ae 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListen.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListen.java @@ -4,11 +4,9 @@ package com.deepgram.resources.agent.v1.types; import com.deepgram.core.ObjectMappers; -import com.deepgram.types.DeepgramListenProviderV1; import com.deepgram.types.DeepgramListenProviderV2; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -19,41 +17,20 @@ import java.util.Objects; import org.jetbrains.annotations.NotNull; -// MANUAL PATCH (back-compat shim): fern-java-sdk 4.16.0 widened `provider` from -// DeepgramListenProviderV2 to the AgentV1UpdateListenListenProvider (V1|V2) union so that -// UpdateListen can change model/language (docs #1066). That return-type change is source-breaking -// for 0.7.x consumers. This shim keeps the union on the wire and as the new API surface, while -// preserving the old typed API additively: getProvider() still returns DeepgramListenProviderV2, -// and provider(DeepgramListenProviderV2) still builds. New callers use getProviderValue()/the -// union and provider(DeepgramListenProviderV1). Drop this patch once the union ships in a major. @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AgentV1UpdateListenListen.Builder.class) public final class AgentV1UpdateListenListen { - private final AgentV1UpdateListenListenProvider provider; + private final DeepgramListenProviderV2 provider; private final Map additionalProperties; - private AgentV1UpdateListenListen( - AgentV1UpdateListenListenProvider provider, Map additionalProperties) { + private AgentV1UpdateListenListen(DeepgramListenProviderV2 provider, Map additionalProperties) { this.provider = provider; this.additionalProperties = additionalProperties; } - /** - * @return the listen provider as a {@link DeepgramListenProviderV2}, or {@code null} if a V1 - * provider was set. Preserved for source compatibility with 0.7.x; new code should use - * {@link #getProviderValue()} to read either variant. - */ - @JsonIgnore - public DeepgramListenProviderV2 getProvider() { - return provider == null ? null : provider.getV2().orElse(null); - } - - /** - * @return the full provider union (V1 or V2). V1 is used to change model/language on the fly. - */ @JsonProperty("provider") - public AgentV1UpdateListenListenProvider getProviderValue() { + public DeepgramListenProviderV2 getProvider() { return provider; } @@ -87,14 +64,8 @@ public static ProviderStage builder() { } public interface ProviderStage { - _FinalStage provider(@NotNull AgentV1UpdateListenListenProvider provider); - - /** Back-compat overload: sets a V2 provider. Preserved for 0.7.x source compatibility. */ _FinalStage provider(@NotNull DeepgramListenProviderV2 provider); - /** New: sets a V1 provider (used to change model/language). */ - _FinalStage provider(@NotNull DeepgramListenProviderV1 provider); - Builder from(AgentV1UpdateListenListen other); } @@ -108,7 +79,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ProviderStage, _FinalStage { - private AgentV1UpdateListenListenProvider provider; + private DeepgramListenProviderV2 provider; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -117,28 +88,14 @@ private Builder() {} @java.lang.Override public Builder from(AgentV1UpdateListenListen other) { - provider(other.getProviderValue()); + provider(other.getProvider()); return this; } @java.lang.Override @JsonSetter("provider") - public _FinalStage provider(@NotNull AgentV1UpdateListenListenProvider provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - @java.lang.Override public _FinalStage provider(@NotNull DeepgramListenProviderV2 provider) { - this.provider = AgentV1UpdateListenListenProvider.v2( - Objects.requireNonNull(provider, "provider must not be null")); - return this; - } - - @java.lang.Override - public _FinalStage provider(@NotNull DeepgramListenProviderV1 provider) { - this.provider = AgentV1UpdateListenListenProvider.v1( - Objects.requireNonNull(provider, "provider must not be null")); + this.provider = Objects.requireNonNull(provider, "provider must not be null"); return this; } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListenProvider.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListenProvider.java deleted file mode 100644 index 2180292d..00000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateListenListenProvider.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.deepgram.types.DeepgramListenProviderV1; -import com.deepgram.types.DeepgramListenProviderV2; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public final class AgentV1UpdateListenListenProvider { - private final Value value; - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private AgentV1UpdateListenListenProvider(Value value) { - this.value = value; - } - - public T visit(Visitor visitor) { - return value.visit(visitor); - } - - public static AgentV1UpdateListenListenProvider v1(DeepgramListenProviderV1 value) { - return new AgentV1UpdateListenListenProvider(new V1Value(value)); - } - - public static AgentV1UpdateListenListenProvider v2(DeepgramListenProviderV2 value) { - return new AgentV1UpdateListenListenProvider(new V2Value(value)); - } - - public boolean isV1() { - return value instanceof V1Value; - } - - public boolean isV2() { - return value instanceof V2Value; - } - - public boolean _isUnknown() { - return value instanceof _UnknownValue; - } - - public Optional getV1() { - if (isV1()) { - return Optional.of(((V1Value) value).value); - } - return Optional.empty(); - } - - public Optional getV2() { - if (isV2()) { - return Optional.of(((V2Value) value).value); - } - return Optional.empty(); - } - - public Optional _getUnknown() { - if (_isUnknown()) { - return Optional.of(((_UnknownValue) value).value); - } - return Optional.empty(); - } - - @Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateListenListenProvider - && value.equals(((AgentV1UpdateListenListenProvider) other).value); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public String toString() { - return value.toString(); - } - - @JsonValue - private Value getValue() { - return this.value; - } - - public interface Visitor { - T visitV1(DeepgramListenProviderV1 v1); - - T visitV2(DeepgramListenProviderV2 v2); - - T _visitUnknown(Object unknownType); - } - - // Manual patch: Fern defaults a missing "version" discriminator to _UnknownValue, but - // "version" is optional on both provider variants, so a version-less provider object is a - // valid payload -- and is exactly what 0.7.x emitted and parsed as a V2. Defaulting to - // _UnknownValue made such a payload deserialize to an unknown variant whose value was never - // populated: getProvider() returned null and re-serializing emitted {"provider":null}, - // silently dropping the caller's provider. Default to V2Value instead, matching both the - // 0.7.x shape and the server's own default. - // - // Note: Jackson applies defaultImpl when the discriminator is absent OR unrecognized, so an - // unknown future version (say "v3") now coerces to V2 and re-serializes as "v2" rather than - // landing in _UnknownValue. That is deliberate and still strictly better than the old - // behaviour, which dropped the whole provider and threw from _getUnknown(). It does leave - // _isUnknown()/_getUnknown() unreachable on this type. This message is client-sent, so the - // caller -- not the server -- chooses the version. Remove once Fern picks a real default. - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "version", visible = true, defaultImpl = V2Value.class) - @JsonSubTypes({@JsonSubTypes.Type(V1Value.class), @JsonSubTypes.Type(V2Value.class)}) - @JsonIgnoreProperties(ignoreUnknown = true) - private interface Value { - T visit(Visitor visitor); - } - - @JsonTypeName("v1") - @JsonIgnoreProperties("version") - private static final class V1Value implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "version", allowSetters = true) - private DeepgramListenProviderV1 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private V1Value() {} - - private V1Value(DeepgramListenProviderV1 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitV1(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof V1Value && equalTo((V1Value) other); - } - - private boolean equalTo(V1Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateListenListenProvider{" + "value: " + value + "}"; - } - } - - @JsonTypeName("v2") - @JsonIgnoreProperties("version") - private static final class V2Value implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "version", allowSetters = true) - private DeepgramListenProviderV2 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private V2Value() {} - - private V2Value(DeepgramListenProviderV2 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitV2(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof V2Value && equalTo((V2Value) other); - } - - private boolean equalTo(V2Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateListenListenProvider{" + "value: " + value + "}"; - } - } - - @JsonIgnoreProperties("version") - private static final class _UnknownValue implements Value { - private String type; - - @JsonValue - private Object value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private _UnknownValue(@JsonProperty("value") Object value) {} - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor._visitUnknown(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof _UnknownValue && equalTo((_UnknownValue) other); - } - - private boolean equalTo(_UnknownValue other) { - return type.equals(other.type) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateListenListenProvider{" + "type: " + type + ", value: " + value + "}"; - } - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdatePrompt.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdatePrompt.java index d3ee6428..adbd18fd 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdatePrompt.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdatePrompt.java @@ -106,6 +106,7 @@ public Builder from(AgentV1UpdatePrompt other) { } /** + *

The new system prompt to be used by the agent

*

The new system prompt to be used by the agent

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Warning.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Warning.java index fd2d7ea0..f151d6d4 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Warning.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Warning.java @@ -127,6 +127,7 @@ public Builder from(AgentV1Warning other) { } /** + *

Description of the warning

*

Description of the warning

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -138,6 +139,7 @@ public CodeStage description(@NotNull String description) { } /** + *

Warning code identifier

*

Warning code identifier

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Welcome.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Welcome.java index 0c24b593..1303bea8 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Welcome.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1Welcome.java @@ -106,6 +106,7 @@ public Builder from(AgentV1Welcome other) { } /** + *

Unique identifier for the request

*

Unique identifier for the request

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/auth/v1/tokens/AsyncRawTokensClient.java b/src/main/java/com/deepgram/resources/auth/v1/tokens/AsyncRawTokensClient.java index 1d7875ae..784132cc 100644 --- a/src/main/java/com/deepgram/resources/auth/v1/tokens/AsyncRawTokensClient.java +++ b/src/main/java/com/deepgram/resources/auth/v1/tokens/AsyncRawTokensClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.auth.v1.tokens.requests.GrantV1Request; import com.deepgram.types.GrantV1Response; @@ -87,15 +86,6 @@ public CompletableFuture> grant( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -121,9 +111,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/auth/v1/tokens/RawTokensClient.java b/src/main/java/com/deepgram/resources/auth/v1/tokens/RawTokensClient.java index 6f99ea4c..a8bfeeb6 100644 --- a/src/main/java/com/deepgram/resources/auth/v1/tokens/RawTokensClient.java +++ b/src/main/java/com/deepgram/resources/auth/v1/tokens/RawTokensClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.auth.v1.tokens.requests.GrantV1Request; import com.deepgram.types.GrantV1Response; @@ -82,15 +81,6 @@ public DeepgramApiHttpResponse grant(GrantV1Request request, Re if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -109,8 +99,6 @@ public DeepgramApiHttpResponse grant(GrantV1Request request, Re Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/listen/v1/media/AsyncRawMediaClient.java b/src/main/java/com/deepgram/resources/listen/v1/media/AsyncRawMediaClient.java index 203d243e..a186d879 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/media/AsyncRawMediaClient.java +++ b/src/main/java/com/deepgram/resources/listen/v1/media/AsyncRawMediaClient.java @@ -12,7 +12,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.listen.v1.media.requests.ListenV1RequestUrl; import com.deepgram.resources.listen.v1.media.requests.MediaTranscribeRequestOctetStream; @@ -226,15 +225,6 @@ public CompletableFuture> trans if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -260,9 +250,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -474,15 +461,6 @@ public CompletableFuture> trans if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -508,9 +486,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/listen/v1/media/RawMediaClient.java b/src/main/java/com/deepgram/resources/listen/v1/media/RawMediaClient.java index b0114e5c..f2632247 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/media/RawMediaClient.java +++ b/src/main/java/com/deepgram/resources/listen/v1/media/RawMediaClient.java @@ -12,7 +12,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.listen.v1.media.requests.ListenV1RequestUrl; import com.deepgram.resources.listen.v1.media.requests.MediaTranscribeRequestOctetStream; @@ -221,15 +220,6 @@ public DeepgramApiHttpResponse transcribeUrl( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -249,8 +239,6 @@ public DeepgramApiHttpResponse transcribeUrl( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -452,15 +440,6 @@ public DeepgramApiHttpResponse transcribeFile( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -480,8 +459,6 @@ public DeepgramApiHttpResponse transcribeFile( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/listen/v1/media/requests/ListenV1RequestUrl.java b/src/main/java/com/deepgram/resources/listen/v1/media/requests/ListenV1RequestUrl.java index 196ad4bc..d456f3a4 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/media/requests/ListenV1RequestUrl.java +++ b/src/main/java/com/deepgram/resources/listen/v1/media/requests/ListenV1RequestUrl.java @@ -224,9 +224,7 @@ public Optional> getCustomIntent() { } /** - * @return Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - *

keyterm accepts plain terms only. Unlike the legacy keywords feature, it does not support weights or intensifiers. Appending one (for example, keyterm=term:0.15) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm.

- *

To boost multiple separate keyterms, repeat the keyterm parameter (for example, keyterm=term1&keyterm=term2). To boost one multi-word phrase as a single keyterm, join the words with %20 or + (for example, keyterm=customer%20service). Do not separate keyterms with commas, semicolons, or line breaks.

+ * @return Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 */ @JsonIgnore public Optional> getKeyterm() { @@ -648,9 +646,7 @@ public interface _FinalStage { _FinalStage customIntent(String customIntent); /** - *

Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3.

- *

keyterm accepts plain terms only. Unlike the legacy keywords feature, it does not support weights or intensifiers. Appending one (for example, keyterm=term:0.15) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm.

- *

To boost multiple separate keyterms, repeat the keyterm parameter (for example, keyterm=term1&keyterm=term2). To boost one multi-word phrase as a single keyterm, join the words with %20 or + (for example, keyterm=customer%20service). Do not separate keyterms with commas, semicolons, or line breaks.

+ *

Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3

*/ _FinalStage keyterm(Optional> keyterm); @@ -1687,9 +1683,7 @@ public _FinalStage keyterm(String keyterm) { } /** - *

Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3.

- *

keyterm accepts plain terms only. Unlike the legacy keywords feature, it does not support weights or intensifiers. Appending one (for example, keyterm=term:0.15) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm.

- *

To boost multiple separate keyterms, repeat the keyterm parameter (for example, keyterm=term1&keyterm=term2). To boost one multi-word phrase as a single keyterm, join the words with %20 or + (for example, keyterm=customer%20service). Do not separate keyterms with commas, semicolons, or line breaks.

+ *

Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -1699,9 +1693,7 @@ public _FinalStage keyterm(List keyterm) { } /** - *

Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3.

- *

keyterm accepts plain terms only. Unlike the legacy keywords feature, it does not support weights or intensifiers. Appending one (for example, keyterm=term:0.15) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm.

- *

To boost multiple separate keyterms, repeat the keyterm parameter (for example, keyterm=term1&keyterm=term2). To boost one multi-word phrase as a single keyterm, join the words with %20 or + (for example, keyterm=customer%20service). Do not separate keyterms with commas, semicolons, or line breaks.

+ *

Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3

*/ @java.lang.Override @JsonSetter(value = "keyterm", nulls = Nulls.SKIP) diff --git a/src/main/java/com/deepgram/resources/listen/v1/media/requests/MediaTranscribeRequestOctetStream.java b/src/main/java/com/deepgram/resources/listen/v1/media/requests/MediaTranscribeRequestOctetStream.java index 9286eb1c..bbf624f4 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/media/requests/MediaTranscribeRequestOctetStream.java +++ b/src/main/java/com/deepgram/resources/listen/v1/media/requests/MediaTranscribeRequestOctetStream.java @@ -223,9 +223,7 @@ public Optional> getCustomIntent() { } /** - * @return Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - *

keyterm accepts plain terms only. Unlike the legacy keywords feature, it does not support weights or intensifiers. Appending one (for example, keyterm=term:0.15) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm.

- *

To boost multiple separate keyterms, repeat the keyterm parameter (for example, keyterm=term1&keyterm=term2). To boost one multi-word phrase as a single keyterm, join the words with %20 or + (for example, keyterm=customer%20service). Do not separate keyterms with commas, semicolons, or line breaks.

+ * @return Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 */ @JsonProperty("keyterm") public Optional> getKeyterm() { @@ -647,9 +645,7 @@ public interface _FinalStage { _FinalStage customIntent(String customIntent); /** - *

Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3.

- *

keyterm accepts plain terms only. Unlike the legacy keywords feature, it does not support weights or intensifiers. Appending one (for example, keyterm=term:0.15) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm.

- *

To boost multiple separate keyterms, repeat the keyterm parameter (for example, keyterm=term1&keyterm=term2). To boost one multi-word phrase as a single keyterm, join the words with %20 or + (for example, keyterm=customer%20service). Do not separate keyterms with commas, semicolons, or line breaks.

+ *

Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3

*/ _FinalStage keyterm(Optional> keyterm); @@ -1686,9 +1682,7 @@ public _FinalStage keyterm(String keyterm) { } /** - *

Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3.

- *

keyterm accepts plain terms only. Unlike the legacy keywords feature, it does not support weights or intensifiers. Appending one (for example, keyterm=term:0.15) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm.

- *

To boost multiple separate keyterms, repeat the keyterm parameter (for example, keyterm=term1&keyterm=term2). To boost one multi-word phrase as a single keyterm, join the words with %20 or + (for example, keyterm=customer%20service). Do not separate keyterms with commas, semicolons, or line breaks.

+ *

Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -1698,9 +1692,7 @@ public _FinalStage keyterm(List keyterm) { } /** - *

Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3.

- *

keyterm accepts plain terms only. Unlike the legacy keywords feature, it does not support weights or intensifiers. Appending one (for example, keyterm=term:0.15) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm.

- *

To boost multiple separate keyterms, repeat the keyterm parameter (for example, keyterm=term1&keyterm=term2). To boost one multi-word phrase as a single keyterm, join the words with %20 or + (for example, keyterm=customer%20service). Do not separate keyterms with commas, semicolons, or line breaks.

+ *

Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3

*/ @java.lang.Override @JsonSetter(value = "keyterm", nulls = Nulls.SKIP) diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1CloseStream.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1CloseStream.java index e3302a4b..57312735 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1CloseStream.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1CloseStream.java @@ -98,6 +98,7 @@ public Builder from(ListenV1CloseStream other) { } /** + *

Message type identifier

*

Message type identifier

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Finalize.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Finalize.java index 93a6b930..c1bac7fe 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Finalize.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Finalize.java @@ -98,6 +98,7 @@ public Builder from(ListenV1Finalize other) { } /** + *

Message type identifier

*

Message type identifier

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1KeepAlive.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1KeepAlive.java index c5342c16..2cfb71e4 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1KeepAlive.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1KeepAlive.java @@ -98,6 +98,7 @@ public Builder from(ListenV1KeepAlive other) { } /** + *

Message type identifier

*

Message type identifier

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Metadata.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Metadata.java index 95dec033..b11bbe60 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Metadata.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Metadata.java @@ -231,6 +231,7 @@ public Builder from(ListenV1Metadata other) { } /** + *

The transaction key

*

The transaction key

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -242,6 +243,7 @@ public RequestIdStage transactionKey(@NotNull String transactionKey) { } /** + *

The request ID

*

The request ID

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -253,6 +255,7 @@ public Sha256Stage requestId(@NotNull String requestId) { } /** + *

The sha256

*

The sha256

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -264,6 +267,7 @@ public CreatedStage sha256(@NotNull String sha256) { } /** + *

The created

*

The created

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -275,6 +279,7 @@ public DurationStage created(@NotNull String created) { } /** + *

The duration

*

The duration

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -286,6 +291,7 @@ public ChannelsStage duration(double duration) { } /** + *

The channels

*

The channels

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Results.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Results.java index 9a61ea69..242eddef 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Results.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1Results.java @@ -295,6 +295,7 @@ public Builder from(ListenV1Results other) { } /** + *

The duration of the transcription

*

The duration of the transcription

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -306,6 +307,7 @@ public StartStage duration(double duration) { } /** + *

The start time of the transcription

*

The start time of the transcription

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsChannelAlternativesItem.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsChannelAlternativesItem.java index 928064ec..fd5ff33a 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsChannelAlternativesItem.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsChannelAlternativesItem.java @@ -164,6 +164,7 @@ public Builder from(ListenV1ResultsChannelAlternativesItem other) { } /** + *

The transcript of the transcription

*

The transcript of the transcription

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -175,6 +176,7 @@ public ConfidenceStage transcript(@NotNull String transcript) { } /** + *

The confidence of the transcription

*

The confidence of the transcription

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsChannelAlternativesItemWordsItem.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsChannelAlternativesItemWordsItem.java index e84e7e73..159504a0 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsChannelAlternativesItemWordsItem.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsChannelAlternativesItemWordsItem.java @@ -105,7 +105,7 @@ public Optional getPunctuatedWord() { } /** - * @return The speaker of the word, present when diarization is enabled + * @return The speaker of the word */ @JsonProperty("speaker") public Optional getSpeaker() { @@ -201,7 +201,7 @@ public interface _FinalStage { _FinalStage punctuatedWord(String punctuatedWord); /** - *

The speaker of the word, present when diarization is enabled

+ *

The speaker of the word

*/ _FinalStage speaker(Optional speaker); @@ -242,6 +242,7 @@ public Builder from(ListenV1ResultsChannelAlternativesItemWordsItem other) { } /** + *

The word of the transcription

*

The word of the transcription

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -253,6 +254,7 @@ public StartStage word(@NotNull String word) { } /** + *

The start time of the word

*

The start time of the word

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -264,6 +266,7 @@ public EndStage start(double start) { } /** + *

The end time of the word

*

The end time of the word

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -275,6 +278,7 @@ public ConfidenceStage end(double end) { } /** + *

The confidence of the word

*

The confidence of the word

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -286,7 +290,7 @@ public _FinalStage confidence(double confidence) { } /** - *

The speaker of the word, present when diarization is enabled

+ *

The speaker of the word

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -296,7 +300,7 @@ public _FinalStage speaker(Integer speaker) { } /** - *

The speaker of the word, present when diarization is enabled

+ *

The speaker of the word

*/ @java.lang.Override @JsonSetter(value = "speaker", nulls = Nulls.SKIP) diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsEntitiesItem.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsEntitiesItem.java index 29b86923..ff5c10ee 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsEntitiesItem.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsEntitiesItem.java @@ -222,6 +222,7 @@ public Builder from(ListenV1ResultsEntitiesItem other) { } /** + *

The type/category of the entity (e.g., NAME, PHONE_NUMBER, EMAIL_ADDRESS, ORGANIZATION, CARDINAL)

*

The type/category of the entity (e.g., NAME, PHONE_NUMBER, EMAIL_ADDRESS, ORGANIZATION, CARDINAL)

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -233,6 +234,7 @@ public ValueStage label(@NotNull String label) { } /** + *

The formatted text representation of the entity

*

The formatted text representation of the entity

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -244,6 +246,7 @@ public RawValueStage value(@NotNull String value) { } /** + *

The original spoken text of the entity (present when formatting is enabled)

*

The original spoken text of the entity (present when formatting is enabled)

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -255,6 +258,7 @@ public ConfidenceStage rawValue(@NotNull String rawValue) { } /** + *

The confidence score of the entity detection

*

The confidence score of the entity detection

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -266,6 +270,7 @@ public StartWordStage confidence(double confidence) { } /** + *

The index of the first word of the entity in the transcript (inclusive)

*

The index of the first word of the entity in the transcript (inclusive)

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -277,6 +282,7 @@ public EndWordStage startWord(int startWord) { } /** + *

The index of the last word of the entity in the transcript (exclusive)

*

The index of the last word of the entity in the transcript (exclusive)

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadata.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadata.java index d49fbff7..df504c73 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadata.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadata.java @@ -10,12 +10,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; import java.util.Map; import java.util.Objects; -import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @@ -27,20 +25,16 @@ public final class ListenV1ResultsMetadata { private final String modelUuid; - private final Optional diarizeInfo; - private final Map additionalProperties; private ListenV1ResultsMetadata( String requestId, ListenV1ResultsMetadataModelInfo modelInfo, String modelUuid, - Optional diarizeInfo, Map additionalProperties) { this.requestId = requestId; this.modelInfo = modelInfo; this.modelUuid = modelUuid; - this.diarizeInfo = diarizeInfo; this.additionalProperties = additionalProperties; } @@ -65,14 +59,6 @@ public String getModelUuid() { return modelUuid; } - /** - * @return The diarizer that produced the speaker labels. Present only when a diarizer ran. - */ - @JsonProperty("diarize_info") - public Optional getDiarizeInfo() { - return diarizeInfo; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -87,13 +73,12 @@ public Map getAdditionalProperties() { private boolean equalTo(ListenV1ResultsMetadata other) { return requestId.equals(other.requestId) && modelInfo.equals(other.modelInfo) - && modelUuid.equals(other.modelUuid) - && diarizeInfo.equals(other.diarizeInfo); + && modelUuid.equals(other.modelUuid); } @java.lang.Override public int hashCode() { - return Objects.hash(this.requestId, this.modelInfo, this.modelUuid, this.diarizeInfo); + return Objects.hash(this.requestId, this.modelInfo, this.modelUuid); } @java.lang.Override @@ -131,13 +116,6 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); - - /** - *

The diarizer that produced the speaker labels. Present only when a diarizer ran.

- */ - _FinalStage diarizeInfo(Optional diarizeInfo); - - _FinalStage diarizeInfo(ListenV1ResultsMetadataDiarizeInfo diarizeInfo); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -148,8 +126,6 @@ public static final class Builder implements RequestIdStage, ModelInfoStage, Mod private String modelUuid; - private Optional diarizeInfo = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -160,11 +136,11 @@ public Builder from(ListenV1ResultsMetadata other) { requestId(other.getRequestId()); modelInfo(other.getModelInfo()); modelUuid(other.getModelUuid()); - diarizeInfo(other.getDiarizeInfo()); return this; } /** + *

The request ID

*

The request ID

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -183,6 +159,7 @@ public ModelUuidStage modelInfo(@NotNull ListenV1ResultsMetadataModelInfo modelI } /** + *

The model UUID

*

The model UUID

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -193,29 +170,9 @@ public _FinalStage modelUuid(@NotNull String modelUuid) { return this; } - /** - *

The diarizer that produced the speaker labels. Present only when a diarizer ran.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage diarizeInfo(ListenV1ResultsMetadataDiarizeInfo diarizeInfo) { - this.diarizeInfo = Optional.ofNullable(diarizeInfo); - return this; - } - - /** - *

The diarizer that produced the speaker labels. Present only when a diarizer ran.

- */ - @java.lang.Override - @JsonSetter(value = "diarize_info", nulls = Nulls.SKIP) - public _FinalStage diarizeInfo(Optional diarizeInfo) { - this.diarizeInfo = diarizeInfo; - return this; - } - @java.lang.Override public ListenV1ResultsMetadata build() { - return new ListenV1ResultsMetadata(requestId, modelInfo, modelUuid, diarizeInfo, additionalProperties); + return new ListenV1ResultsMetadata(requestId, modelInfo, modelUuid, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataDiarizeInfo.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataDiarizeInfo.java deleted file mode 100644 index d5d735b8..00000000 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataDiarizeInfo.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.listen.v1.types; - -import com.deepgram.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListenV1ResultsMetadataDiarizeInfo.Builder.class) -public final class ListenV1ResultsMetadataDiarizeInfo { - private final String modelUuid; - - private final ListenV1ResultsMetadataDiarizeInfoArch arch; - - private final Map additionalProperties; - - private ListenV1ResultsMetadataDiarizeInfo( - String modelUuid, ListenV1ResultsMetadataDiarizeInfoArch arch, Map additionalProperties) { - this.modelUuid = modelUuid; - this.arch = arch; - this.additionalProperties = additionalProperties; - } - - /** - * @return The diarizer model UUID - */ - @JsonProperty("model_uuid") - public String getModelUuid() { - return modelUuid; - } - - /** - * @return The diarizer arch - */ - @JsonProperty("arch") - public ListenV1ResultsMetadataDiarizeInfoArch getArch() { - return arch; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListenV1ResultsMetadataDiarizeInfo - && equalTo((ListenV1ResultsMetadataDiarizeInfo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListenV1ResultsMetadataDiarizeInfo other) { - return modelUuid.equals(other.modelUuid) && arch.equals(other.arch); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.modelUuid, this.arch); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelUuidStage builder() { - return new Builder(); - } - - public interface ModelUuidStage { - /** - *

The diarizer model UUID

- */ - ArchStage modelUuid(@NotNull String modelUuid); - - Builder from(ListenV1ResultsMetadataDiarizeInfo other); - } - - public interface ArchStage { - /** - *

The diarizer arch

- */ - _FinalStage arch(@NotNull ListenV1ResultsMetadataDiarizeInfoArch arch); - } - - public interface _FinalStage { - ListenV1ResultsMetadataDiarizeInfo build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelUuidStage, ArchStage, _FinalStage { - private String modelUuid; - - private ListenV1ResultsMetadataDiarizeInfoArch arch; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ListenV1ResultsMetadataDiarizeInfo other) { - modelUuid(other.getModelUuid()); - arch(other.getArch()); - return this; - } - - /** - *

The diarizer model UUID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("model_uuid") - public ArchStage modelUuid(@NotNull String modelUuid) { - this.modelUuid = Objects.requireNonNull(modelUuid, "modelUuid must not be null"); - return this; - } - - /** - *

The diarizer arch

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("arch") - public _FinalStage arch(@NotNull ListenV1ResultsMetadataDiarizeInfoArch arch) { - this.arch = Objects.requireNonNull(arch, "arch must not be null"); - return this; - } - - @java.lang.Override - public ListenV1ResultsMetadataDiarizeInfo build() { - return new ListenV1ResultsMetadataDiarizeInfo(modelUuid, arch, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataDiarizeInfoArch.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataDiarizeInfoArch.java deleted file mode 100644 index abf00692..00000000 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataDiarizeInfoArch.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.listen.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ListenV1ResultsMetadataDiarizeInfoArch { - public static final ListenV1ResultsMetadataDiarizeInfoArch V2 = - new ListenV1ResultsMetadataDiarizeInfoArch(Value.V2, "v2"); - - public static final ListenV1ResultsMetadataDiarizeInfoArch V1 = - new ListenV1ResultsMetadataDiarizeInfoArch(Value.V1, "v1"); - - private final Value value; - - private final String string; - - ListenV1ResultsMetadataDiarizeInfoArch(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ListenV1ResultsMetadataDiarizeInfoArch - && this.string.equals(((ListenV1ResultsMetadataDiarizeInfoArch) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case V2: - return visitor.visitV2(); - case V1: - return visitor.visitV1(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ListenV1ResultsMetadataDiarizeInfoArch valueOf(String value) { - switch (value) { - case "v2": - return V2; - case "v1": - return V1; - default: - return new ListenV1ResultsMetadataDiarizeInfoArch(Value.UNKNOWN, value); - } - } - - public enum Value { - V1, - - V2, - - UNKNOWN - } - - public interface Visitor { - T visitV1(); - - T visitV2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataModelInfo.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataModelInfo.java index 46d7a146..732cd947 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataModelInfo.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1ResultsMetadataModelInfo.java @@ -141,6 +141,7 @@ public Builder from(ListenV1ResultsMetadataModelInfo other) { } /** + *

The name of the model

*

The name of the model

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -152,6 +153,7 @@ public VersionStage name(@NotNull String name) { } /** + *

The version of the model

*

The version of the model

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -163,6 +165,7 @@ public ArchStage version(@NotNull String version) { } /** + *

The arch of the model

*

The arch of the model

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1SpeechStarted.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1SpeechStarted.java index baf4abba..ce614e39 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1SpeechStarted.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1SpeechStarted.java @@ -131,6 +131,7 @@ public Builder from(ListenV1SpeechStarted other) { } /** + *

The timestamp

*

The timestamp

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1UtteranceEnd.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1UtteranceEnd.java index 7a9f0f9c..df76d559 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1UtteranceEnd.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1UtteranceEnd.java @@ -131,6 +131,7 @@ public Builder from(ListenV1UtteranceEnd other) { } /** + *

The last word end

*

The last word end

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v1/websocket/V1ConnectOptions.java b/src/main/java/com/deepgram/resources/listen/v1/websocket/V1ConnectOptions.java index 700f2cdf..77822f1b 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/websocket/V1ConnectOptions.java +++ b/src/main/java/com/deepgram/resources/listen/v1/websocket/V1ConnectOptions.java @@ -648,6 +648,7 @@ public Builder from(V1ConnectOptions other) { } /** + *

AI model to use for the transcription

*

AI model to use for the transcription

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java index 478307b8..5f482fb4 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java @@ -131,6 +131,7 @@ public Builder from(ListenV2ConfigureFailure other) { } /** + *

The unique identifier of the request

*

The unique identifier of the request

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -142,6 +143,9 @@ public SequenceIdStage requestId(@NotNull String requestId) { } /** + *

Starts at 0 and increments for each message the server sends + * to the client. This includes messages of other types, like + * TurnInfo messages.

*

Starts at 0 and increments for each message the server sends * to the client. This includes messages of other types, like * TurnInfo messages.

diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccess.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccess.java index ca93f2b2..1319c9e4 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccess.java +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccess.java @@ -205,6 +205,7 @@ public Builder from(ListenV2ConfigureSuccess other) { } /** + *

The unique identifier of the request

*

The unique identifier of the request

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -216,6 +217,8 @@ public ThresholdsStage requestId(@NotNull String requestId) { } /** + *

Updates each parameter, if it is supplied. If a particular threshold parameter + * is not supplied, the configuration continues using the currently configured value.

*

Updates each parameter, if it is supplied. If a particular threshold parameter * is not supplied, the configuration continues using the currently configured value.

* @return Reference to {@code this} so that method calls can be chained together. @@ -235,6 +238,9 @@ public SequenceIdStage keyterms(@NotNull ListenV2Keyterm keyterms) { } /** + *

Starts at 0 and increments for each message the server sends + * to the client. This includes messages of other types, like + * TurnInfo messages.

*

Starts at 0 and increments for each message the server sends * to the client. This includes messages of other types, like * TurnInfo messages.

diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Connected.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Connected.java index 14a9b641..56e09a8b 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Connected.java +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Connected.java @@ -131,6 +131,7 @@ public Builder from(ListenV2Connected other) { } /** + *

The unique identifier of the request

*

The unique identifier of the request

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -142,6 +143,9 @@ public SequenceIdStage requestId(@NotNull String requestId) { } /** + *

Starts at 0 and increments for each message the server sends + * to the client. This includes messages of other types, like + * TurnInfo messages.

*

Starts at 0 and increments for each message the server sends * to the client. This includes messages of other types, like * TurnInfo messages.

diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2FatalError.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2FatalError.java index fcf3c0ba..1bd208b8 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2FatalError.java +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2FatalError.java @@ -153,6 +153,9 @@ public Builder from(ListenV2FatalError other) { } /** + *

Starts at 0 and increments for each message the server sends + * to the client. This includes messages of other types, like + * Connected messages.

*

Starts at 0 and increments for each message the server sends * to the client. This includes messages of other types, like * Connected messages.

@@ -166,6 +169,7 @@ public CodeStage sequenceId(int sequenceId) { } /** + *

A string code describing the error, e.g. INTERNAL_SERVER_ERROR

*

A string code describing the error, e.g. INTERNAL_SERVER_ERROR

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -177,6 +181,7 @@ public DescriptionStage code(@NotNull String code) { } /** + *

Prose description of the error

*

Prose description of the error

* @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ForceEndTurn.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ForceEndTurn.java deleted file mode 100644 index a2e722af..00000000 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ForceEndTurn.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.listen.v2.types; - -import com.deepgram.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListenV2ForceEndTurn.Builder.class) -public final class ListenV2ForceEndTurn { - private final Map additionalProperties; - - private ListenV2ForceEndTurn(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - /** - * @return Message type identifier - */ - @JsonProperty("type") - public String getType() { - return "ForceEndTurn"; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListenV2ForceEndTurn; - } - - @java.lang.Override - public int hashCode() { - // Manual patch: Fern generates equals() (all instances of this fields-less message - // are equal) but no hashCode(), violating the Object contract. Mirror equals() with a - // type-based constant hash. Remove once Fern emits a consistent equals/hashCode pair. - return getClass().hashCode(); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListenV2ForceEndTurn other) { - return this; - } - - public ListenV2ForceEndTurn build() { - return new ListenV2ForceEndTurn(additionalProperties); - } - - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2TurnInfo.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2TurnInfo.java index 9eab9fe5..5cb7195d 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2TurnInfo.java +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2TurnInfo.java @@ -41,8 +41,6 @@ public final class ListenV2TurnInfo { private final float endOfTurnConfidence; - private final Optional trigger; - private final Optional> languages; private final Optional> languagesHinted; @@ -59,7 +57,6 @@ private ListenV2TurnInfo( String transcript, List words, float endOfTurnConfidence, - Optional trigger, Optional> languages, Optional> languagesHinted, Map additionalProperties) { @@ -72,7 +69,6 @@ private ListenV2TurnInfo( this.transcript = transcript; this.words = words; this.endOfTurnConfidence = endOfTurnConfidence; - this.trigger = trigger; this.languages = languages; this.languagesHinted = languagesHinted; this.additionalProperties = additionalProperties; @@ -162,26 +158,6 @@ public float getEndOfTurnConfidence() { return endOfTurnConfidence; } - /** - * @return The cause of the turn ending. Present on every EndOfTurn event and only there. - *
    - *
  • - *

    model - the turn ended by Flux's native end-of-turn detection

    - *
  • - *
  • - *

    manual - the turn ended because a ForceEndTurn message was sent

    - *
  • - *
  • - *

    timeout - the turn ended because eot_timeout_ms elapsed

    - *
  • - *
- *

This is an open enum. New values may be added over time, so clients must tolerate values they do not recognize.

- */ - @JsonProperty("trigger") - public Optional getTrigger() { - return trigger; - } - /** * @return Detected languages sorted by descending frequency in the * transcript. Only present when the flux-general-multi model @@ -222,7 +198,6 @@ private boolean equalTo(ListenV2TurnInfo other) { && transcript.equals(other.transcript) && words.equals(other.words) && endOfTurnConfidence == other.endOfTurnConfidence - && trigger.equals(other.trigger) && languages.equals(other.languages) && languagesHinted.equals(other.languagesHinted); } @@ -239,7 +214,6 @@ public int hashCode() { this.transcript, this.words, this.endOfTurnConfidence, - this.trigger, this.languages, this.languagesHinted); } @@ -334,25 +308,6 @@ public interface _FinalStage { _FinalStage addAllWords(List words); - /** - *

The cause of the turn ending. Present on every EndOfTurn event and only there.

- *
    - *
  • - *

    model - the turn ended by Flux's native end-of-turn detection

    - *
  • - *
  • - *

    manual - the turn ended because a ForceEndTurn message was sent

    - *
  • - *
  • - *

    timeout - the turn ended because eot_timeout_ms elapsed

    - *
  • - *
- *

This is an open enum. New values may be added over time, so clients must tolerate values they do not recognize.

- */ - _FinalStage trigger(Optional trigger); - - _FinalStage trigger(String trigger); - /** *

Detected languages sorted by descending frequency in the * transcript. Only present when the flux-general-multi model @@ -402,8 +357,6 @@ public static final class Builder private Optional> languages = Optional.empty(); - private Optional trigger = Optional.empty(); - private List words = new ArrayList<>(); @JsonAnySetter @@ -422,13 +375,13 @@ public Builder from(ListenV2TurnInfo other) { transcript(other.getTranscript()); words(other.getWords()); endOfTurnConfidence(other.getEndOfTurnConfidence()); - trigger(other.getTrigger()); languages(other.getLanguages()); languagesHinted(other.getLanguagesHinted()); return this; } /** + *

The unique identifier of the request

*

The unique identifier of the request

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -440,6 +393,7 @@ public SequenceIdStage requestId(@NotNull String requestId) { } /** + *

Starts at 0 and increments for each message the server sends to the client. This includes messages of other types, like Connected messages.

*

Starts at 0 and increments for each message the server sends to the client. This includes messages of other types, like Connected messages.

* @return Reference to {@code this} so that method calls can be chained together. */ @@ -451,6 +405,14 @@ public EventStage sequenceId(int sequenceId) { } /** + *

The type of event being reported.

+ *
    + *
  • Update - Additional audio has been transcribed, but the turn state hasn't changed
  • + *
  • StartOfTurn - The user has begun speaking for the first time in the turn
  • + *
  • EagerEndOfTurn - The system has moderate confidence that the user has finished speaking for the turn. This is an opportunity to begin preparing an agent reply
  • + *
  • TurnResumed - The system detected that speech had ended and therefore sent an EagerEndOfTurn event, but speech is actually continuing for this turn
  • + *
  • EndOfTurn - The user has finished speaking for the turn
  • + *
*

The type of event being reported.

*
    *
  • Update - Additional audio has been transcribed, but the turn state hasn't changed
  • @@ -469,6 +431,7 @@ public TurnIndexStage event(@NotNull ListenV2TurnInfoEvent event) { } /** + *

    The index of the current turn

    *

    The index of the current turn

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -480,6 +443,7 @@ public AudioWindowStartStage turnIndex(int turnIndex) { } /** + *

    Start time in seconds of the audio range that was transcribed

    *

    Start time in seconds of the audio range that was transcribed

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -491,6 +455,7 @@ public AudioWindowEndStage audioWindowStart(float audioWindowStart) { } /** + *

    End time in seconds of the audio range that was transcribed

    *

    End time in seconds of the audio range that was transcribed

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -502,6 +467,7 @@ public TranscriptStage audioWindowEnd(float audioWindowEnd) { } /** + *

    Text that was said over the course of the current turn

    *

    Text that was said over the course of the current turn

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -513,6 +479,7 @@ public EndOfTurnConfidenceStage transcript(@NotNull String transcript) { } /** + *

    Confidence that no more speech is coming in this turn

    *

    Confidence that no more speech is coming in this turn

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -569,50 +536,6 @@ public _FinalStage languages(Optional> languages) { return this; } - /** - *

    The cause of the turn ending. Present on every EndOfTurn event and only there.

    - *
      - *
    • - *

      model - the turn ended by Flux's native end-of-turn detection

      - *
    • - *
    • - *

      manual - the turn ended because a ForceEndTurn message was sent

      - *
    • - *
    • - *

      timeout - the turn ended because eot_timeout_ms elapsed

      - *
    • - *
    - *

    This is an open enum. New values may be added over time, so clients must tolerate values they do not recognize.

    - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage trigger(String trigger) { - this.trigger = Optional.ofNullable(trigger); - return this; - } - - /** - *

    The cause of the turn ending. Present on every EndOfTurn event and only there.

    - *
      - *
    • - *

      model - the turn ended by Flux's native end-of-turn detection

      - *
    • - *
    • - *

      manual - the turn ended because a ForceEndTurn message was sent

      - *
    • - *
    • - *

      timeout - the turn ended because eot_timeout_ms elapsed

      - *
    • - *
    - *

    This is an open enum. New values may be added over time, so clients must tolerate values they do not recognize.

    - */ - @java.lang.Override - @JsonSetter(value = "trigger", nulls = Nulls.SKIP) - public _FinalStage trigger(Optional trigger) { - this.trigger = trigger; - return this; - } - /** *

    The words in the transcript

    * @return Reference to {@code this} so that method calls can be chained together. @@ -660,7 +583,6 @@ public ListenV2TurnInfo build() { transcript, words, endOfTurnConfidence, - trigger, languages, languagesHinted, additionalProperties); diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2TurnInfoWordsItem.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2TurnInfoWordsItem.java index aa7396f2..35e7f79c 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2TurnInfoWordsItem.java +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2TurnInfoWordsItem.java @@ -171,6 +171,7 @@ public Builder from(ListenV2TurnInfoWordsItem other) { } /** + *

    The individual punctuated, properly-cased word from the transcript

    *

    The individual punctuated, properly-cased word from the transcript

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -182,6 +183,7 @@ public ConfidenceStage word(@NotNull String word) { } /** + *

    Confidence that this word was transcribed correctly

    *

    Confidence that this word was transcribed correctly

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/listen/v2/websocket/V2ConnectOptions.java b/src/main/java/com/deepgram/resources/listen/v2/websocket/V2ConnectOptions.java index 5cc78b93..d14542a1 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/websocket/V2ConnectOptions.java +++ b/src/main/java/com/deepgram/resources/listen/v2/websocket/V2ConnectOptions.java @@ -14,7 +14,6 @@ import com.deepgram.types.ListenV2Model; import com.deepgram.types.ListenV2Numerals; import com.deepgram.types.ListenV2ProfanityFilter; -import com.deepgram.types.ListenV2Redact; import com.deepgram.types.ListenV2SampleRate; import com.deepgram.types.ListenV2Tag; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -54,8 +53,6 @@ public final class V2ConnectOptions { private final Optional numerals; - private final Optional redact; - private final Optional mipOptOut; private final Optional tag; @@ -73,7 +70,6 @@ private V2ConnectOptions( Optional languageHint, Optional profanityFilter, Optional numerals, - Optional redact, Optional mipOptOut, Optional tag, Map additionalProperties) { @@ -87,7 +83,6 @@ private V2ConnectOptions( this.languageHint = languageHint; this.profanityFilter = profanityFilter; this.numerals = numerals; - this.redact = redact; this.mipOptOut = mipOptOut; this.tag = tag; this.additionalProperties = additionalProperties; @@ -143,11 +138,6 @@ public Optional getNumerals() { return numerals; } - @JsonProperty("redact") - public Optional getRedact() { - return redact; - } - @JsonProperty("mip_opt_out") public Optional getMipOptOut() { return mipOptOut; @@ -180,7 +170,6 @@ private boolean equalTo(V2ConnectOptions other) { && languageHint.equals(other.languageHint) && profanityFilter.equals(other.profanityFilter) && numerals.equals(other.numerals) - && redact.equals(other.redact) && mipOptOut.equals(other.mipOptOut) && tag.equals(other.tag); } @@ -198,7 +187,6 @@ public int hashCode() { this.languageHint, this.profanityFilter, this.numerals, - this.redact, this.mipOptOut, this.tag); } @@ -261,10 +249,6 @@ public interface _FinalStage { _FinalStage numerals(ListenV2Numerals numerals); - _FinalStage redact(Optional redact); - - _FinalStage redact(ListenV2Redact redact); - _FinalStage mipOptOut(Optional mipOptOut); _FinalStage mipOptOut(ListenV2MipOptOut mipOptOut); @@ -282,8 +266,6 @@ public static final class Builder implements ModelStage, _FinalStage { private Optional mipOptOut = Optional.empty(); - private Optional redact = Optional.empty(); - private Optional numerals = Optional.empty(); private Optional profanityFilter = Optional.empty(); @@ -319,7 +301,6 @@ public Builder from(V2ConnectOptions other) { languageHint(other.getLanguageHint()); profanityFilter(other.getProfanityFilter()); numerals(other.getNumerals()); - redact(other.getRedact()); mipOptOut(other.getMipOptOut()); tag(other.getTag()); return this; @@ -358,19 +339,6 @@ public _FinalStage mipOptOut(Optional mipOptOut) { return this; } - @java.lang.Override - public _FinalStage redact(ListenV2Redact redact) { - this.redact = Optional.ofNullable(redact); - return this; - } - - @java.lang.Override - @JsonSetter(value = "redact", nulls = Nulls.SKIP) - public _FinalStage redact(Optional redact) { - this.redact = redact; - return this; - } - @java.lang.Override public _FinalStage numerals(ListenV2Numerals numerals) { this.numerals = Optional.ofNullable(numerals); @@ -501,7 +469,6 @@ public V2ConnectOptions build() { languageHint, profanityFilter, numerals, - redact, mipOptOut, tag, additionalProperties); diff --git a/src/main/java/com/deepgram/resources/listen/v2/websocket/V2WebSocketClient.java b/src/main/java/com/deepgram/resources/listen/v2/websocket/V2WebSocketClient.java index 3fc3dd57..f47ee221 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/websocket/V2WebSocketClient.java +++ b/src/main/java/com/deepgram/resources/listen/v2/websocket/V2WebSocketClient.java @@ -16,7 +16,6 @@ import com.deepgram.resources.listen.v2.types.ListenV2ConfigureSuccess; import com.deepgram.resources.listen.v2.types.ListenV2Connected; import com.deepgram.resources.listen.v2.types.ListenV2FatalError; -import com.deepgram.resources.listen.v2.types.ListenV2ForceEndTurn; import com.deepgram.resources.listen.v2.types.ListenV2TurnInfo; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -147,10 +146,6 @@ public CompletableFuture connect(V2ConnectOptions options) { urlBuilder.addQueryParameter( "numerals", String.valueOf(options.getNumerals().get())); } - if (options.getRedact() != null && options.getRedact().isPresent()) { - urlBuilder.addQueryParameter( - "redact", String.valueOf(options.getRedact().get())); - } if (options.getMipOptOut() != null && options.getMipOptOut().isPresent()) { urlBuilder.addQueryParameter( "mip_opt_out", String.valueOf(options.getMipOptOut().get())); @@ -272,15 +267,6 @@ public CompletableFuture sendCloseStream(ListenV2CloseStream message) { return sendMessage(message); } - /** - * Sends a ListenV2ForceEndTurn message to the server asynchronously. - * @param message the message to send - * @return a CompletableFuture that completes when the message is sent - */ - public CompletableFuture sendForceEndTurn(ListenV2ForceEndTurn message) { - return sendMessage(message); - } - /** * Sends a ListenV2Configure message to the server asynchronously. * @param message the message to send diff --git a/src/main/java/com/deepgram/resources/manage/v1/models/AsyncRawModelsClient.java b/src/main/java/com/deepgram/resources/manage/v1/models/AsyncRawModelsClient.java index d545d484..e338abc9 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/models/AsyncRawModelsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/models/AsyncRawModelsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.models.requests.ModelsListRequest; import com.deepgram.types.GetModelV1Response; @@ -83,15 +82,6 @@ public CompletableFuture> list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -117,9 +107,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -164,15 +151,6 @@ public CompletableFuture> get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -198,9 +176,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/models/RawModelsClient.java b/src/main/java/com/deepgram/resources/manage/v1/models/RawModelsClient.java index 84d10253..fa32fb95 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/models/RawModelsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/models/RawModelsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.models.requests.ModelsListRequest; import com.deepgram.types.GetModelV1Response; @@ -79,15 +78,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -106,8 +96,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -143,15 +131,6 @@ public DeepgramApiHttpResponse get(String modelId, RequestOp if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -170,8 +149,6 @@ public DeepgramApiHttpResponse get(String modelId, RequestOp Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/AsyncRawProjectsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/AsyncRawProjectsClient.java index fd1eb5d4..4bc3e684 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/AsyncRawProjectsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/AsyncRawProjectsClient.java @@ -11,7 +11,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.requests.ProjectsGetRequest; import com.deepgram.resources.manage.v1.projects.requests.UpdateProjectV1Request; @@ -70,15 +69,6 @@ public CompletableFuture> list(R if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -104,9 +94,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -175,15 +162,6 @@ public CompletableFuture> get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -209,9 +187,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -256,15 +231,6 @@ public CompletableFuture> delet if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -290,9 +256,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -361,15 +324,6 @@ public CompletableFuture> updat if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -395,9 +349,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -443,15 +394,6 @@ public CompletableFuture> leave( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -477,9 +419,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/RawProjectsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/RawProjectsClient.java index 66a7d57b..04a7fec3 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/RawProjectsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/RawProjectsClient.java @@ -11,7 +11,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.requests.ProjectsGetRequest; import com.deepgram.resources.manage.v1.projects.requests.UpdateProjectV1Request; @@ -66,15 +65,6 @@ public DeepgramApiHttpResponse list(RequestOptions reque if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -94,8 +84,6 @@ public DeepgramApiHttpResponse list(RequestOptions reque Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -154,15 +142,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -181,8 +160,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -218,15 +195,6 @@ public DeepgramApiHttpResponse delete(String projectId, if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -246,8 +214,6 @@ public DeepgramApiHttpResponse delete(String projectId, Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -306,15 +272,6 @@ public DeepgramApiHttpResponse update( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -334,8 +291,6 @@ public DeepgramApiHttpResponse update( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -372,15 +327,6 @@ public DeepgramApiHttpResponse leave(String projectId, R if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -400,8 +346,6 @@ public DeepgramApiHttpResponse leave(String projectId, R Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/balances/AsyncRawBalancesClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/balances/AsyncRawBalancesClient.java index 653f0074..accb8f78 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/balances/AsyncRawBalancesClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/balances/AsyncRawBalancesClient.java @@ -9,7 +9,6 @@ import com.deepgram.core.DeepgramHttpException; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.types.GetProjectBalanceV1Response; import com.deepgram.types.ListProjectBalancesV1Response; @@ -65,15 +64,6 @@ public CompletableFuture> if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -100,9 +90,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -150,15 +137,6 @@ public CompletableFuture> g if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -185,9 +163,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/balances/RawBalancesClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/balances/RawBalancesClient.java index 9f6747cb..85645291 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/balances/RawBalancesClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/balances/RawBalancesClient.java @@ -9,7 +9,6 @@ import com.deepgram.core.DeepgramHttpException; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.types.GetProjectBalanceV1Response; import com.deepgram.types.ListProjectBalancesV1Response; @@ -61,15 +60,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -89,8 +79,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -129,15 +117,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -157,8 +136,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/breakdown/AsyncRawBreakdownClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/breakdown/AsyncRawBreakdownClient.java index 129fe404..cb3f70d6 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/breakdown/AsyncRawBreakdownClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/breakdown/AsyncRawBreakdownClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.billing.breakdown.requests.BreakdownListRequest; import com.deepgram.types.BillingBreakdownV1Response; @@ -109,15 +108,6 @@ public CompletableFuture> li if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -144,9 +134,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/breakdown/RawBreakdownClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/breakdown/RawBreakdownClient.java index 75e687b6..333f3315 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/breakdown/RawBreakdownClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/breakdown/RawBreakdownClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.billing.breakdown.requests.BreakdownListRequest; import com.deepgram.types.BillingBreakdownV1Response; @@ -103,15 +102,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -131,8 +121,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/fields/AsyncRawFieldsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/fields/AsyncRawFieldsClient.java index 354ac206..56ee9247 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/fields/AsyncRawFieldsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/fields/AsyncRawFieldsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.billing.fields.requests.FieldsListRequest; import com.deepgram.types.ListBillingFieldsV1Response; @@ -90,15 +89,6 @@ public CompletableFuture> l if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -125,9 +115,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/fields/RawFieldsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/fields/RawFieldsClient.java index 22b94869..4b8ad148 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/fields/RawFieldsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/fields/RawFieldsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.billing.fields.requests.FieldsListRequest; import com.deepgram.types.ListBillingFieldsV1Response; @@ -84,15 +83,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -112,8 +102,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/purchases/AsyncRawPurchasesClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/purchases/AsyncRawPurchasesClient.java index 36fc9403..f521f9df 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/purchases/AsyncRawPurchasesClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/purchases/AsyncRawPurchasesClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.billing.purchases.requests.PurchasesListRequest; import com.deepgram.types.ListProjectPurchasesV1Response; @@ -86,15 +85,6 @@ public CompletableFuture if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -121,9 +111,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/purchases/RawPurchasesClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/purchases/RawPurchasesClient.java index 6ec1db4f..6df387fe 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/billing/purchases/RawPurchasesClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/billing/purchases/RawPurchasesClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.billing.purchases.requests.PurchasesListRequest; import com.deepgram.types.ListProjectPurchasesV1Response; @@ -82,15 +81,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -110,8 +100,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/keys/AsyncRawKeysClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/keys/AsyncRawKeysClient.java index 985ef3d8..8d4ce475 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/keys/AsyncRawKeysClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/keys/AsyncRawKeysClient.java @@ -11,7 +11,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.keys.requests.KeysListRequest; import com.deepgram.types.CreateKeyV1Request; @@ -92,15 +91,6 @@ public CompletableFuture> lis if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -127,9 +117,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -184,15 +171,6 @@ public CompletableFuture> create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -218,9 +196,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -267,15 +242,6 @@ public CompletableFuture> get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -301,9 +267,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -351,15 +314,6 @@ public CompletableFuture> de if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -386,9 +340,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/keys/RawKeysClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/keys/RawKeysClient.java index a4773883..fc2e5f49 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/keys/RawKeysClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/keys/RawKeysClient.java @@ -11,7 +11,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.keys.requests.KeysListRequest; import com.deepgram.types.CreateKeyV1Request; @@ -86,15 +85,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -114,8 +104,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -161,15 +149,6 @@ public DeepgramApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -188,8 +167,6 @@ public DeepgramApiHttpResponse create( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -228,15 +205,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -256,8 +224,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -296,15 +262,6 @@ public DeepgramApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -324,8 +281,6 @@ public DeepgramApiHttpResponse delete( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/members/AsyncRawMembersClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/members/AsyncRawMembersClient.java index f9dabda2..c150e339 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/members/AsyncRawMembersClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/members/AsyncRawMembersClient.java @@ -9,7 +9,6 @@ import com.deepgram.core.DeepgramHttpException; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.types.DeleteProjectMemberV1Response; import com.deepgram.types.ListProjectMembersV1Response; @@ -65,15 +64,6 @@ public CompletableFuture> if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -100,9 +90,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -150,15 +137,6 @@ public CompletableFuture> if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -185,9 +163,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/members/RawMembersClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/members/RawMembersClient.java index c9dbb222..ac79ae01 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/members/RawMembersClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/members/RawMembersClient.java @@ -9,7 +9,6 @@ import com.deepgram.core.DeepgramHttpException; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.types.DeleteProjectMemberV1Response; import com.deepgram.types.ListProjectMembersV1Response; @@ -60,15 +59,6 @@ public DeepgramApiHttpResponse list(String project if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -88,8 +78,6 @@ public DeepgramApiHttpResponse list(String project Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -128,15 +116,6 @@ public DeepgramApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -156,8 +135,6 @@ public DeepgramApiHttpResponse delete( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/AsyncRawInvitesClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/AsyncRawInvitesClient.java index a91b624f..008c6330 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/AsyncRawInvitesClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/AsyncRawInvitesClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.members.invites.requests.CreateProjectInviteV1Request; import com.deepgram.types.CreateProjectInviteV1Response; @@ -69,15 +68,6 @@ public CompletableFuture> if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -104,9 +94,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -161,15 +148,6 @@ public CompletableFuture> if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -196,9 +174,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -246,15 +221,6 @@ public CompletableFuture> if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -281,9 +247,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/RawInvitesClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/RawInvitesClient.java index e9421f6b..fdd2bd81 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/RawInvitesClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/RawInvitesClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.members.invites.requests.CreateProjectInviteV1Request; import com.deepgram.types.CreateProjectInviteV1Response; @@ -64,15 +63,6 @@ public DeepgramApiHttpResponse list(String project if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -92,8 +82,6 @@ public DeepgramApiHttpResponse list(String project Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -140,15 +128,6 @@ public DeepgramApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -168,8 +147,6 @@ public DeepgramApiHttpResponse create( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -208,15 +185,6 @@ public DeepgramApiHttpResponse delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -236,8 +204,6 @@ public DeepgramApiHttpResponse delete( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/requests/CreateProjectInviteV1Request.java b/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/requests/CreateProjectInviteV1Request.java index aa758faf..223785a1 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/requests/CreateProjectInviteV1Request.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/members/invites/requests/CreateProjectInviteV1Request.java @@ -119,6 +119,7 @@ public Builder from(CreateProjectInviteV1Request other) { } /** + *

    The email address of the invitee

    *

    The email address of the invitee

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,6 +131,7 @@ public ScopeStage email(@NotNull String email) { } /** + *

    The scope of the invitee

    *

    The scope of the invitee

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/AsyncRawScopesClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/AsyncRawScopesClient.java index 5b2bf664..7466c377 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/AsyncRawScopesClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/AsyncRawScopesClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.members.scopes.requests.UpdateProjectMemberScopesV1Request; import com.deepgram.types.ListProjectMemberScopesV1Response; @@ -71,15 +70,6 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -107,9 +97,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -169,15 +156,6 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -205,9 +183,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/RawScopesClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/RawScopesClient.java index d3faa380..c033b818 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/RawScopesClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/RawScopesClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.members.scopes.requests.UpdateProjectMemberScopesV1Request; import com.deepgram.types.ListProjectMemberScopesV1Response; @@ -66,15 +65,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -95,8 +85,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -148,15 +136,6 @@ public DeepgramApiHttpResponse update( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -177,8 +156,6 @@ public DeepgramApiHttpResponse update( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/requests/UpdateProjectMemberScopesV1Request.java b/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/requests/UpdateProjectMemberScopesV1Request.java index e5328622..4bbb0247 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/requests/UpdateProjectMemberScopesV1Request.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/members/scopes/requests/UpdateProjectMemberScopesV1Request.java @@ -99,6 +99,7 @@ public Builder from(UpdateProjectMemberScopesV1Request other) { } /** + *

    A scope to update

    *

    A scope to update

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/models/AsyncRawModelsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/models/AsyncRawModelsClient.java index 2dd4d6c6..d4d3f078 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/models/AsyncRawModelsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/models/AsyncRawModelsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.models.requests.ModelsListRequest; import com.deepgram.types.GetModelV1Response; @@ -87,15 +86,6 @@ public CompletableFuture> list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -121,9 +111,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -170,15 +157,6 @@ public CompletableFuture> get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -204,9 +182,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/models/RawModelsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/models/RawModelsClient.java index 48aaf2d2..ec991bf7 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/models/RawModelsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/models/RawModelsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.models.requests.ModelsListRequest; import com.deepgram.types.GetModelV1Response; @@ -81,15 +80,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -108,8 +98,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -148,15 +136,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -175,8 +154,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/requests/AsyncRawRequestsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/requests/AsyncRawRequestsClient.java index 67d2a82a..0aa178b2 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/requests/AsyncRawRequestsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/requests/AsyncRawRequestsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.requests.requests.RequestsListRequest; import com.deepgram.types.GetProjectRequestV1Response; @@ -122,15 +121,6 @@ public CompletableFuture> if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -157,9 +147,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -207,15 +194,6 @@ public CompletableFuture> g if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -242,9 +220,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/requests/RawRequestsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/requests/RawRequestsClient.java index 00412a07..5a8da146 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/requests/RawRequestsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/requests/RawRequestsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.requests.requests.RequestsListRequest; import com.deepgram.types.GetProjectRequestV1Response; @@ -117,15 +116,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -145,8 +135,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -185,15 +173,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -213,8 +192,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/AsyncRawUsageClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/AsyncRawUsageClient.java index 8ec476d1..af94ec69 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/AsyncRawUsageClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/AsyncRawUsageClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.usage.requests.UsageGetRequest; import com.deepgram.types.UsageV1Response; @@ -255,15 +254,6 @@ public CompletableFuture> get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -289,9 +279,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/RawUsageClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/RawUsageClient.java index 8a5db020..1f85ae8d 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/RawUsageClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/RawUsageClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.usage.requests.UsageGetRequest; import com.deepgram.types.UsageV1Response; @@ -250,15 +249,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -277,8 +267,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/AsyncRawBreakdownClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/AsyncRawBreakdownClient.java index aeb64bae..aeaac37d 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/AsyncRawBreakdownClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/AsyncRawBreakdownClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.usage.breakdown.requests.BreakdownGetRequest; import com.deepgram.types.UsageBreakdownV1Response; @@ -261,15 +260,6 @@ public CompletableFuture> get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -295,9 +285,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/RawBreakdownClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/RawBreakdownClient.java index 98fcf3a6..60b4af2f 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/RawBreakdownClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/RawBreakdownClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.usage.breakdown.requests.BreakdownGetRequest; import com.deepgram.types.UsageBreakdownV1Response; @@ -255,15 +254,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -283,8 +273,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/fields/AsyncRawFieldsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/fields/AsyncRawFieldsClient.java index c2233f8d..72c78202 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/fields/AsyncRawFieldsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/fields/AsyncRawFieldsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.usage.fields.requests.FieldsListRequest; import com.deepgram.types.UsageFieldsV1Response; @@ -90,15 +89,6 @@ public CompletableFuture> list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -124,9 +114,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/fields/RawFieldsClient.java b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/fields/RawFieldsClient.java index d5e702d8..93382924 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/fields/RawFieldsClient.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/fields/RawFieldsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.manage.v1.projects.usage.fields.requests.FieldsListRequest; import com.deepgram.types.UsageFieldsV1Response; @@ -84,15 +83,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -111,8 +101,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/read/v1/text/AsyncRawTextClient.java b/src/main/java/com/deepgram/resources/read/v1/text/AsyncRawTextClient.java index 526ca2bc..06d06098 100644 --- a/src/main/java/com/deepgram/resources/read/v1/text/AsyncRawTextClient.java +++ b/src/main/java/com/deepgram/resources/read/v1/text/AsyncRawTextClient.java @@ -11,7 +11,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.read.v1.text.requests.TextAnalyzeRequest; import com.deepgram.types.ReadV1Request; @@ -137,15 +136,6 @@ public CompletableFuture> analyze( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -171,9 +161,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/read/v1/text/RawTextClient.java b/src/main/java/com/deepgram/resources/read/v1/text/RawTextClient.java index daaaf93a..c244be9c 100644 --- a/src/main/java/com/deepgram/resources/read/v1/text/RawTextClient.java +++ b/src/main/java/com/deepgram/resources/read/v1/text/RawTextClient.java @@ -11,7 +11,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.read.v1.text.requests.TextAnalyzeRequest; import com.deepgram.types.ReadV1Request; @@ -131,15 +130,6 @@ public DeepgramApiHttpResponse analyze(TextAnalyzeRequest reques if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -158,8 +148,6 @@ public DeepgramApiHttpResponse analyze(TextAnalyzeRequest reques Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/AsyncRawDistributionCredentialsClient.java b/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/AsyncRawDistributionCredentialsClient.java index c24a88fa..3c7cfb6d 100644 --- a/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/AsyncRawDistributionCredentialsClient.java +++ b/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/AsyncRawDistributionCredentialsClient.java @@ -11,7 +11,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.selfhosted.v1.distributioncredentials.requests.CreateProjectDistributionCredentialsV1Request; import com.deepgram.types.CreateProjectDistributionCredentialsV1Response; @@ -72,15 +71,6 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -108,9 +98,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -195,15 +182,6 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -231,9 +209,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -281,15 +256,6 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -317,9 +283,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -367,15 +330,6 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -403,9 +357,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/RawDistributionCredentialsClient.java b/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/RawDistributionCredentialsClient.java index 6af7bd2f..7e5f0388 100644 --- a/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/RawDistributionCredentialsClient.java +++ b/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/RawDistributionCredentialsClient.java @@ -11,7 +11,6 @@ import com.deepgram.core.ObjectMappers; import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.selfhosted.v1.distributioncredentials.requests.CreateProjectDistributionCredentialsV1Request; import com.deepgram.types.CreateProjectDistributionCredentialsV1Response; @@ -67,15 +66,6 @@ public DeepgramApiHttpResponse lis if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -96,8 +86,6 @@ public DeepgramApiHttpResponse lis Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -173,15 +161,6 @@ public DeepgramApiHttpResponse c if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -202,8 +181,6 @@ public DeepgramApiHttpResponse c Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -243,15 +220,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -272,8 +240,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -313,15 +279,6 @@ public DeepgramApiHttpResponse dele if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -342,8 +299,6 @@ public DeepgramApiHttpResponse dele Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/speak/v1/audio/AsyncRawAudioClient.java b/src/main/java/com/deepgram/resources/speak/v1/audio/AsyncRawAudioClient.java index a17b66b6..479e78ba 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/audio/AsyncRawAudioClient.java +++ b/src/main/java/com/deepgram/resources/speak/v1/audio/AsyncRawAudioClient.java @@ -12,7 +12,6 @@ import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; import com.deepgram.core.ResponseBodyInputStream; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.speak.v1.audio.requests.SpeakV1Request; import com.fasterxml.jackson.core.JsonProcessingException; @@ -114,15 +113,6 @@ public CompletableFuture> generate( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -147,9 +137,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/speak/v1/audio/RawAudioClient.java b/src/main/java/com/deepgram/resources/speak/v1/audio/RawAudioClient.java index 8e326d65..377c30e2 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/audio/RawAudioClient.java +++ b/src/main/java/com/deepgram/resources/speak/v1/audio/RawAudioClient.java @@ -12,7 +12,6 @@ import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; import com.deepgram.core.ResponseBodyInputStream; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.speak.v1.audio.requests.SpeakV1Request; import com.fasterxml.jackson.core.JsonProcessingException; @@ -109,15 +108,6 @@ public DeepgramApiHttpResponse generate(SpeakV1Request request, Req if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try { Response response = client.newCall(okhttpRequest).execute(); ResponseBody responseBody = response.body(); @@ -136,8 +126,6 @@ public DeepgramApiHttpResponse generate(SpeakV1Request request, Req Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/speak/v1/audio/requests/SpeakV1Request.java b/src/main/java/com/deepgram/resources/speak/v1/audio/requests/SpeakV1Request.java index 4bd04563..75c4629d 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/audio/requests/SpeakV1Request.java +++ b/src/main/java/com/deepgram/resources/speak/v1/audio/requests/SpeakV1Request.java @@ -352,6 +352,7 @@ public Builder from(SpeakV1Request other) { } /** + *

    The text content to be converted to speech

    *

    The text content to be converted to speech

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Clear.java b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Clear.java index 7f75df43..1c170c37 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Clear.java +++ b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Clear.java @@ -98,6 +98,7 @@ public Builder from(SpeakV1Clear other) { } /** + *

    Message type identifier

    *

    Message type identifier

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Cleared.java b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Cleared.java index a279df13..b494af8d 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Cleared.java +++ b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Cleared.java @@ -119,6 +119,7 @@ public Builder from(SpeakV1Cleared other) { } /** + *

    Message type identifier

    *

    Message type identifier

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,6 +131,7 @@ public SequenceIdStage type(@NotNull SpeakV1ClearedType type) { } /** + *

    The sequence ID of the response

    *

    The sequence ID of the response

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Close.java b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Close.java index 3aa0904c..81cc5937 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Close.java +++ b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Close.java @@ -98,6 +98,7 @@ public Builder from(SpeakV1Close other) { } /** + *

    Message type identifier

    *

    Message type identifier

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Flush.java b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Flush.java index 73556726..848dd1dd 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Flush.java +++ b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Flush.java @@ -98,6 +98,7 @@ public Builder from(SpeakV1Flush other) { } /** + *

    Message type identifier

    *

    Message type identifier

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Flushed.java b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Flushed.java index db49f038..442d6566 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Flushed.java +++ b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Flushed.java @@ -119,6 +119,7 @@ public Builder from(SpeakV1Flushed other) { } /** + *

    Message type identifier

    *

    Message type identifier

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,6 +131,7 @@ public SequenceIdStage type(@NotNull SpeakV1FlushedType type) { } /** + *

    The sequence ID of the response

    *

    The sequence ID of the response

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Metadata.java b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Metadata.java index 1c891524..44f77b6c 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Metadata.java +++ b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Metadata.java @@ -205,6 +205,7 @@ public Builder from(SpeakV1Metadata other) { } /** + *

    Unique identifier for the request

    *

    Unique identifier for the request

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -216,6 +217,7 @@ public ModelNameStage requestId(@NotNull String requestId) { } /** + *

    Name of the model being used

    *

    Name of the model being used

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -227,6 +229,7 @@ public ModelVersionStage modelName(@NotNull String modelName) { } /** + *

    Version of the primary model being used

    *

    Version of the primary model being used

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -238,6 +241,7 @@ public ModelUuidStage modelVersion(@NotNull String modelVersion) { } /** + *

    Unique identifier for the primary model used

    *

    Unique identifier for the primary model used

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Text.java b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Text.java index 003857b7..0f5704f1 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Text.java +++ b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Text.java @@ -106,6 +106,7 @@ public Builder from(SpeakV1Text other) { } /** + *

    The input text to be converted to speech

    *

    The input text to be converted to speech

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Warning.java b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Warning.java index 00a5ffb3..f8ba1d2c 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Warning.java +++ b/src/main/java/com/deepgram/resources/speak/v1/types/SpeakV1Warning.java @@ -127,6 +127,7 @@ public Builder from(SpeakV1Warning other) { } /** + *

    A description of what went wrong

    *

    A description of what went wrong

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -138,6 +139,7 @@ public CodeStage description(@NotNull String description) { } /** + *

    Error code identifying the type of error

    *

    Error code identifying the type of error

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/audio/AsyncRawAudioClient.java b/src/main/java/com/deepgram/resources/speak/v2/audio/AsyncRawAudioClient.java index 6d71bb85..05baadc9 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/audio/AsyncRawAudioClient.java +++ b/src/main/java/com/deepgram/resources/speak/v2/audio/AsyncRawAudioClient.java @@ -12,7 +12,6 @@ import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; import com.deepgram.core.ResponseBodyInputStream; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.speak.v2.audio.requests.SpeakV2Request; import com.fasterxml.jackson.core.JsonProcessingException; @@ -111,15 +110,6 @@ public CompletableFuture> generate( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -144,9 +134,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/speak/v2/audio/RawAudioClient.java b/src/main/java/com/deepgram/resources/speak/v2/audio/RawAudioClient.java index dbd01464..08b3bd01 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/audio/RawAudioClient.java +++ b/src/main/java/com/deepgram/resources/speak/v2/audio/RawAudioClient.java @@ -12,7 +12,6 @@ import com.deepgram.core.QueryStringMapper; import com.deepgram.core.RequestOptions; import com.deepgram.core.ResponseBodyInputStream; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.speak.v2.audio.requests.SpeakV2Request; import com.fasterxml.jackson.core.JsonProcessingException; @@ -106,15 +105,6 @@ public DeepgramApiHttpResponse generate(SpeakV2Request request, Req if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try { Response response = client.newCall(okhttpRequest).execute(); ResponseBody responseBody = response.body(); @@ -133,8 +123,6 @@ public DeepgramApiHttpResponse generate(SpeakV2Request request, Req Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/speak/v2/audio/requests/SpeakV2Request.java b/src/main/java/com/deepgram/resources/speak/v2/audio/requests/SpeakV2Request.java index 0e34781c..bf7a08c5 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/audio/requests/SpeakV2Request.java +++ b/src/main/java/com/deepgram/resources/speak/v2/audio/requests/SpeakV2Request.java @@ -351,6 +351,7 @@ public Builder from(SpeakV2Request other) { } /** + *

    Flux TTS model used to synthesize the submitted text, in the form flux-{voice}-{language} (for example, flux-alexis-en). Required; unlike the v1 (Aura) endpoint there is no default and only flux models are accepted. English-only at launch.

    *

    Flux TTS model used to synthesize the submitted text, in the form flux-{voice}-{language} (for example, flux-alexis-en). Required; unlike the v1 (Aura) endpoint there is no default and only flux models are accepted. English-only at launch.

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -362,6 +363,7 @@ public TextStage model(@NotNull String model) { } /** + *

    The text content to be converted to speech. The server normalizes and preprocesses the text (e.g. stripping inline controls) before synthesis.

    *

    The text content to be converted to speech. The server normalizes and preprocesses the text (e.g. stripping inline controls) before synthesis.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Connected.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Connected.java index 4b6046de..64301ae3 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Connected.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Connected.java @@ -182,6 +182,7 @@ public Builder from(SpeakV2Connected other) { } /** + *

    The unique identifier of the /v2/speak request

    *

    The unique identifier of the /v2/speak request

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -193,6 +194,7 @@ public ModelNameStage requestId(@NotNull String requestId) { } /** + *

    Resolved model name

    *

    Resolved model name

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -204,6 +206,7 @@ public ModelVersionStage modelName(@NotNull String modelName) { } /** + *

    Resolved model version

    *

    Resolved model version

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Error.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Error.java index 343cfa72..288d11c6 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Error.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Error.java @@ -127,6 +127,7 @@ public Builder from(SpeakV2Error other) { } /** + *

    A code identifying the error, e.g. MESSAGE-0000 or NET-0000.

    *

    A code identifying the error, e.g. MESSAGE-0000 or NET-0000.

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -138,6 +139,7 @@ public DescriptionStage code(@NotNull SpeakV2ErrorCode code) { } /** + *

    Prose description of the error

    *

    Prose description of the error

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Flushed.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Flushed.java index 74629bdb..76aa4f9f 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Flushed.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Flushed.java @@ -106,6 +106,7 @@ public Builder from(SpeakV2Flushed other) { } /** + *

    Server-assigned turn identifier

    *

    Server-assigned turn identifier

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SessionMetadata.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SessionMetadata.java index ebd2ff65..a0d38ee3 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SessionMetadata.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SessionMetadata.java @@ -157,6 +157,7 @@ public Builder from(SpeakV2SessionMetadata other) { } /** + *

    Cumulative audio duration produced across the session, in milliseconds

    *

    Cumulative audio duration produced across the session, in milliseconds

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -168,6 +169,7 @@ public TotalInputCharacterCountStage totalAudioDurationMs(int totalAudioDuration } /** + *

    Cumulative raw input character count across the session

    *

    Cumulative raw input character count across the session

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -179,6 +181,7 @@ public TotalBillableCharacterCountStage totalInputCharacterCount(int totalInputC } /** + *

    Cumulative billable character count across the session

    *

    Cumulative billable character count across the session

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Speak.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Speak.java index 493985b3..56476cc8 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Speak.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Speak.java @@ -106,6 +106,7 @@ public Builder from(SpeakV2Speak other) { } /** + *

    The input text to synthesize

    *

    The input text to synthesize

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadata.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadata.java index 2b564898..e1c0ece8 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadata.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadata.java @@ -211,6 +211,7 @@ public Builder from(SpeakV2SpeechMetadata other) { } /** + *

    Server-assigned turn identifier

    *

    Server-assigned turn identifier

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -222,6 +223,7 @@ public AudioDurationMsStage speechId(@NotNull String speechId) { } /** + *

    Total audio duration produced for this turn, in milliseconds

    *

    Total audio duration produced for this turn, in milliseconds

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -233,6 +235,7 @@ public InputCharacterCountStage audioDurationMs(int audioDurationMs) { } /** + *

    Raw input character count for this turn, before text normalization

    *

    Raw input character count for this turn, before text normalization

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -244,6 +247,7 @@ public BillableCharacterCountStage inputCharacterCount(int inputCharacterCount) } /** + *

    Billable character count for this turn — the input character count with stripped control characters removed. Always less than or equal to input_character_count.

    *

    Billable character count for this turn — the input character count with stripped control characters removed. Always less than or equal to input_character_count.

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -255,6 +259,7 @@ public ControlsAppliedStage billableCharacterCount(int billableCharacterCount) { } /** + *

    Controls applied during the turn. Inline pronunciation and pause controls are not available during Early Access, so every count is currently 0.

    *

    Controls applied during the turn. Inline pronunciation and pause controls are not available during Early Access, so every count is currently 0.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadataControlsApplied.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadataControlsApplied.java index bf2fdb1d..8225d049 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadataControlsApplied.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechMetadataControlsApplied.java @@ -121,6 +121,7 @@ public Builder from(SpeakV2SpeechMetadataControlsApplied other) { } /** + *

    Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. Always 0 during Early Access.

    *

    Pronunciation overrides successfully applied. Mirrors the Aura-2 dg-pronunciations-applied REST header. Always 0 during Early Access.

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -132,6 +133,7 @@ public PronunciationWarningsStage pronunciationsApplied(int pronunciationsApplie } /** + *

    Pronunciation entries that triggered a warning (invalid IPA, word too long). Mirrors the Aura-2 dg-pronunciation-warnings REST header. Always 0 during Early Access.

    *

    Pronunciation entries that triggered a warning (invalid IPA, word too long). Mirrors the Aura-2 dg-pronunciation-warnings REST header. Always 0 during Early Access.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechStarted.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechStarted.java index 033f5afa..b83be2f5 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechStarted.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2SpeechStarted.java @@ -106,6 +106,7 @@ public Builder from(SpeakV2SpeechStarted other) { } /** + *

    Server-minted identifier for this turn, of the form dg_sp_<12 hex digits>. Informational.

    *

    Server-minted identifier for this turn, of the form dg_sp_<12 hex digits>. Informational.

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Warning.java b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Warning.java index f7c7d909..1542479f 100644 --- a/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Warning.java +++ b/src/main/java/com/deepgram/resources/speak/v2/types/SpeakV2Warning.java @@ -127,6 +127,7 @@ public Builder from(SpeakV2Warning other) { } /** + *

    Warning code identifying the condition, in SCREAMING_SNAKE_CASE. Early Access codes are NO_ACTIVE_SPEECH (a speech-scoped message arrived with no active turn) and SYNTHESIS_RETRYING (a synthesis request failed and is being retried).

    *

    Warning code identifying the condition, in SCREAMING_SNAKE_CASE. Early Access codes are NO_ACTIVE_SPEECH (a speech-scoped message arrived with no active turn) and SYNTHESIS_RETRYING (a synthesis request failed and is being retried).

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -138,6 +139,7 @@ public DescriptionStage code(@NotNull String code) { } /** + *

    A human-readable description of the warning

    *

    A human-readable description of the warning

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncRawConfigurationsClient.java b/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncRawConfigurationsClient.java index 3f0d53f5..9f2dc29b 100644 --- a/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncRawConfigurationsClient.java +++ b/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncRawConfigurationsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.voiceagent.configurations.requests.CreateAgentConfigurationV1Request; import com.deepgram.resources.voiceagent.configurations.requests.UpdateAgentMetadataV1Request; @@ -72,15 +71,6 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -108,9 +98,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -165,15 +152,6 @@ public CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @@ -201,9 +179,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -250,15 +225,6 @@ public CompletableFuture> get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -284,9 +250,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -342,15 +305,6 @@ public CompletableFuture> update( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -376,9 +330,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -425,15 +376,6 @@ public CompletableFuture>> delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -460,9 +402,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/voiceagent/configurations/RawConfigurationsClient.java b/src/main/java/com/deepgram/resources/voiceagent/configurations/RawConfigurationsClient.java index 2c78edb7..d15fe0fb 100644 --- a/src/main/java/com/deepgram/resources/voiceagent/configurations/RawConfigurationsClient.java +++ b/src/main/java/com/deepgram/resources/voiceagent/configurations/RawConfigurationsClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.voiceagent.configurations.requests.CreateAgentConfigurationV1Request; import com.deepgram.resources.voiceagent.configurations.requests.UpdateAgentMetadataV1Request; @@ -68,15 +67,6 @@ public DeepgramApiHttpResponse list( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -97,8 +87,6 @@ public DeepgramApiHttpResponse list( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -145,15 +133,6 @@ public DeepgramApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -174,8 +153,6 @@ public DeepgramApiHttpResponse create( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -214,15 +191,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -241,8 +209,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -290,15 +256,6 @@ public DeepgramApiHttpResponse update( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -317,8 +274,6 @@ public DeepgramApiHttpResponse update( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -357,15 +312,6 @@ public DeepgramApiHttpResponse> delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -386,8 +332,6 @@ public DeepgramApiHttpResponse> delete( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/voiceagent/configurations/requests/CreateAgentConfigurationV1Request.java b/src/main/java/com/deepgram/resources/voiceagent/configurations/requests/CreateAgentConfigurationV1Request.java index 5eceba9b..8c6f4441 100644 --- a/src/main/java/com/deepgram/resources/voiceagent/configurations/requests/CreateAgentConfigurationV1Request.java +++ b/src/main/java/com/deepgram/resources/voiceagent/configurations/requests/CreateAgentConfigurationV1Request.java @@ -146,6 +146,7 @@ public Builder from(CreateAgentConfigurationV1Request other) { } /** + *

    A valid JSON string representing the agent block of a Settings message

    *

    A valid JSON string representing the agent block of a Settings message

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/resources/voiceagent/variables/AsyncRawVariablesClient.java b/src/main/java/com/deepgram/resources/voiceagent/variables/AsyncRawVariablesClient.java index 8073f3b2..6ae084dc 100644 --- a/src/main/java/com/deepgram/resources/voiceagent/variables/AsyncRawVariablesClient.java +++ b/src/main/java/com/deepgram/resources/voiceagent/variables/AsyncRawVariablesClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.voiceagent.variables.requests.CreateAgentVariableV1Request; import com.deepgram.resources.voiceagent.variables.requests.UpdateAgentVariableV1Request; @@ -71,15 +70,6 @@ public CompletableFuture> if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -106,9 +96,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -163,15 +150,6 @@ public CompletableFuture> create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -197,9 +175,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -246,15 +221,6 @@ public CompletableFuture> get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -280,9 +246,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -329,15 +292,6 @@ public CompletableFuture>> delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -364,9 +318,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } @@ -422,15 +373,6 @@ public CompletableFuture> update( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override @@ -456,9 +398,6 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO future.completeExceptionally(new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response)); return; - } catch (JsonProcessingException e) { - future.completeExceptionally( - new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e)); } catch (IOException e) { future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); } diff --git a/src/main/java/com/deepgram/resources/voiceagent/variables/RawVariablesClient.java b/src/main/java/com/deepgram/resources/voiceagent/variables/RawVariablesClient.java index 49bd2d25..745e3d5f 100644 --- a/src/main/java/com/deepgram/resources/voiceagent/variables/RawVariablesClient.java +++ b/src/main/java/com/deepgram/resources/voiceagent/variables/RawVariablesClient.java @@ -10,7 +10,6 @@ import com.deepgram.core.MediaTypes; import com.deepgram.core.ObjectMappers; import com.deepgram.core.RequestOptions; -import com.deepgram.core.RetryInterceptor; import com.deepgram.errors.BadRequestError; import com.deepgram.resources.voiceagent.variables.requests.CreateAgentVariableV1Request; import com.deepgram.resources.voiceagent.variables.requests.UpdateAgentVariableV1Request; @@ -66,15 +65,6 @@ public DeepgramApiHttpResponse list(String project if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -94,8 +84,6 @@ public DeepgramApiHttpResponse list(String project Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -141,15 +129,6 @@ public DeepgramApiHttpResponse create( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -168,8 +147,6 @@ public DeepgramApiHttpResponse create( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -208,15 +185,6 @@ public DeepgramApiHttpResponse get( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -235,8 +203,6 @@ public DeepgramApiHttpResponse get( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -275,15 +241,6 @@ public DeepgramApiHttpResponse> delete( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -304,8 +261,6 @@ public DeepgramApiHttpResponse> delete( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } @@ -353,15 +308,6 @@ public DeepgramApiHttpResponse update( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) { - okhttpRequest = okhttpRequest - .newBuilder() - .tag( - RetryInterceptor.MaxRetriesOverride.class, - new RetryInterceptor.MaxRetriesOverride( - requestOptions.getMaxRetries().get())) - .build(); - } try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; @@ -380,8 +326,6 @@ public DeepgramApiHttpResponse update( Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new DeepgramHttpException( "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (JsonProcessingException e) { - throw new DeepgramApiException("Failed to deserialize response: " + e.getMessage(), e); } catch (IOException e) { throw new DeepgramApiException("Network error executing HTTP request", e); } diff --git a/src/main/java/com/deepgram/resources/voiceagent/variables/requests/CreateAgentVariableV1Request.java b/src/main/java/com/deepgram/resources/voiceagent/variables/requests/CreateAgentVariableV1Request.java index dc92662b..e8d8eceb 100644 --- a/src/main/java/com/deepgram/resources/voiceagent/variables/requests/CreateAgentVariableV1Request.java +++ b/src/main/java/com/deepgram/resources/voiceagent/variables/requests/CreateAgentVariableV1Request.java @@ -137,6 +137,7 @@ public Builder from(CreateAgentVariableV1Request other) { } /** + *

    The variable name, following the DG_<VARIABLE_NAME> format

    *

    The variable name, following the DG_<VARIABLE_NAME> format

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/AgentConfigurationV1.java b/src/main/java/com/deepgram/types/AgentConfigurationV1.java index d18d2641..610babac 100644 --- a/src/main/java/com/deepgram/types/AgentConfigurationV1.java +++ b/src/main/java/com/deepgram/types/AgentConfigurationV1.java @@ -198,6 +198,7 @@ public Builder from(AgentConfigurationV1 other) { } /** + *

    The unique identifier of the agent configuration

    *

    The unique identifier of the agent configuration

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemId.java b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemId.java index 7e82e4f1..f09bc0ba 100644 --- a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemId.java +++ b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemId.java @@ -128,6 +128,7 @@ public Builder from(AgentThinkModelsV1ResponseModelsItemId other) { } /** + *

    The unique identifier of the AWS Bedrock model (any model string accepted for BYO LLMs)

    *

    The unique identifier of the AWS Bedrock model (any model string accepted for BYO LLMs)

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -139,6 +140,7 @@ public NameStage id(@NotNull String id) { } /** + *

    The display name of the model

    *

    The display name of the model

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemOne.java b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemOne.java index 55d1b1cf..b756dd73 100644 --- a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemOne.java +++ b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemOne.java @@ -129,6 +129,7 @@ public Builder from(AgentThinkModelsV1ResponseModelsItemOne other) { } /** + *

    The unique identifier of the Anthropic model

    *

    The unique identifier of the Anthropic model

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -140,6 +141,7 @@ public NameStage id(@NotNull AgentThinkModelsV1ResponseModelsItemOneId id) { } /** + *

    The display name of the model

    *

    The display name of the model

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemThree.java b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemThree.java index 3fb1d9e6..257e4338 100644 --- a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemThree.java +++ b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemThree.java @@ -115,6 +115,7 @@ public Builder from(AgentThinkModelsV1ResponseModelsItemThree other) { } /** + *

    The display name of the model

    *

    The display name of the model

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemTwo.java b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemTwo.java index 0587907f..b58d5379 100644 --- a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemTwo.java +++ b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemTwo.java @@ -129,6 +129,7 @@ public Builder from(AgentThinkModelsV1ResponseModelsItemTwo other) { } /** + *

    The unique identifier of the Google model

    *

    The unique identifier of the Google model

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -140,6 +141,7 @@ public NameStage id(@NotNull AgentThinkModelsV1ResponseModelsItemTwoId id) { } /** + *

    The display name of the model

    *

    The display name of the model

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemZero.java b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemZero.java index 351975b1..e41781c8 100644 --- a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemZero.java +++ b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemZero.java @@ -129,6 +129,7 @@ public Builder from(AgentThinkModelsV1ResponseModelsItemZero other) { } /** + *

    The unique identifier of the OpenAI model

    *

    The unique identifier of the OpenAI model

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -140,6 +141,7 @@ public NameStage id(@NotNull AgentThinkModelsV1ResponseModelsItemZeroId id) { } /** + *

    The display name of the model

    *

    The display name of the model

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/AgentVariableV1.java b/src/main/java/com/deepgram/types/AgentVariableV1.java index 0fa7f88b..6f09f2f7 100644 --- a/src/main/java/com/deepgram/types/AgentVariableV1.java +++ b/src/main/java/com/deepgram/types/AgentVariableV1.java @@ -189,6 +189,7 @@ public Builder from(AgentVariableV1 other) { } /** + *

    The unique identifier of the variable

    *

    The unique identifier of the variable

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -200,6 +201,7 @@ public KeyStage variableId(@NotNull String variableId) { } /** + *

    The variable name, following the DG_<VARIABLE_NAME> format

    *

    The variable name, following the DG_<VARIABLE_NAME> format

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/Anthropic.java b/src/main/java/com/deepgram/types/Anthropic.java index 0c4b5d6d..02214865 100644 --- a/src/main/java/com/deepgram/types/Anthropic.java +++ b/src/main/java/com/deepgram/types/Anthropic.java @@ -151,6 +151,7 @@ public Builder from(Anthropic other) { } /** + *

    Anthropic model to use

    *

    Anthropic model to use

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/AnthropicThinkProviderModel.java b/src/main/java/com/deepgram/types/AnthropicThinkProviderModel.java index fbe6810e..9aa4608f 100644 --- a/src/main/java/com/deepgram/types/AnthropicThinkProviderModel.java +++ b/src/main/java/com/deepgram/types/AnthropicThinkProviderModel.java @@ -35,7 +35,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AnthropicThinkProviderModel && this.string.equals(((AnthropicThinkProviderModel) other).string)); + || (other instanceof AnthropicThinkProviderModel + && this.string.equals(((AnthropicThinkProviderModel) other).string)); } @java.lang.Override diff --git a/src/main/java/com/deepgram/types/AwsBedrockThinkProvider.java b/src/main/java/com/deepgram/types/AwsBedrockThinkProvider.java index 5f2840d6..3cc3faeb 100644 --- a/src/main/java/com/deepgram/types/AwsBedrockThinkProvider.java +++ b/src/main/java/com/deepgram/types/AwsBedrockThinkProvider.java @@ -153,6 +153,7 @@ public Builder from(AwsBedrockThinkProvider other) { } /** + *

    AWS Bedrock model to use

    *

    AWS Bedrock model to use

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/AwsPollySpeakProvider.java b/src/main/java/com/deepgram/types/AwsPollySpeakProvider.java index 4b292ab2..0e5f4ef9 100644 --- a/src/main/java/com/deepgram/types/AwsPollySpeakProvider.java +++ b/src/main/java/com/deepgram/types/AwsPollySpeakProvider.java @@ -187,6 +187,7 @@ public Builder from(AwsPollySpeakProvider other) { } /** + *

    AWS Polly voice name

    *

    AWS Polly voice name

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -198,6 +199,7 @@ public LanguageStage voice(@NotNull AwsPollySpeakProviderVoice voice) { } /** + *

    Language code to use, e.g. 'en-US'. Corresponds to the language_code parameter in the AWS Polly API

    *

    Language code to use, e.g. 'en-US'. Corresponds to the language_code parameter in the AWS Polly API

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/BillingBreakdownV1Response.java b/src/main/java/com/deepgram/types/BillingBreakdownV1Response.java index 3c4f9f70..ecb9982a 100644 --- a/src/main/java/com/deepgram/types/BillingBreakdownV1Response.java +++ b/src/main/java/com/deepgram/types/BillingBreakdownV1Response.java @@ -162,6 +162,7 @@ public Builder from(BillingBreakdownV1Response other) { } /** + *

    Start date of the billing summmary period

    *

    Start date of the billing summmary period

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -173,6 +174,7 @@ public EndStage start(@NotNull String start) { } /** + *

    End date of the billing summary period

    *

    End date of the billing summary period

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/BillingBreakdownV1ResponseResolution.java b/src/main/java/com/deepgram/types/BillingBreakdownV1ResponseResolution.java index 15de5dee..5527d1c2 100644 --- a/src/main/java/com/deepgram/types/BillingBreakdownV1ResponseResolution.java +++ b/src/main/java/com/deepgram/types/BillingBreakdownV1ResponseResolution.java @@ -121,6 +121,7 @@ public Builder from(BillingBreakdownV1ResponseResolution other) { } /** + *

    Time unit for the resolution

    *

    Time unit for the resolution

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -132,6 +133,7 @@ public AmountStage units(@NotNull String units) { } /** + *

    Amount of units

    *

    Amount of units

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/BillingBreakdownV1ResponseResultsItem.java b/src/main/java/com/deepgram/types/BillingBreakdownV1ResponseResultsItem.java index ef690ece..7927fe80 100644 --- a/src/main/java/com/deepgram/types/BillingBreakdownV1ResponseResultsItem.java +++ b/src/main/java/com/deepgram/types/BillingBreakdownV1ResponseResultsItem.java @@ -117,6 +117,7 @@ public Builder from(BillingBreakdownV1ResponseResultsItem other) { } /** + *

    USD cost of the billing for this grouping

    *

    USD cost of the billing for this grouping

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/Cartesia.java b/src/main/java/com/deepgram/types/Cartesia.java index 0a7bfae0..8ca88475 100644 --- a/src/main/java/com/deepgram/types/Cartesia.java +++ b/src/main/java/com/deepgram/types/Cartesia.java @@ -193,6 +193,7 @@ public Builder from(Cartesia other) { } /** + *

    Cartesia model ID

    *

    Cartesia model ID

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/CartesiaSpeakProviderModelId.java b/src/main/java/com/deepgram/types/CartesiaSpeakProviderModelId.java index 91802e30..fddf6079 100644 --- a/src/main/java/com/deepgram/types/CartesiaSpeakProviderModelId.java +++ b/src/main/java/com/deepgram/types/CartesiaSpeakProviderModelId.java @@ -34,7 +34,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof CartesiaSpeakProviderModelId && this.string.equals(((CartesiaSpeakProviderModelId) other).string)); + || (other instanceof CartesiaSpeakProviderModelId + && this.string.equals(((CartesiaSpeakProviderModelId) other).string)); } @java.lang.Override diff --git a/src/main/java/com/deepgram/types/CartesiaSpeakProviderVoice.java b/src/main/java/com/deepgram/types/CartesiaSpeakProviderVoice.java index b7886758..9d7168f9 100644 --- a/src/main/java/com/deepgram/types/CartesiaSpeakProviderVoice.java +++ b/src/main/java/com/deepgram/types/CartesiaSpeakProviderVoice.java @@ -119,6 +119,7 @@ public Builder from(CartesiaSpeakProviderVoice other) { } /** + *

    Cartesia voice mode

    *

    Cartesia voice mode

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -130,6 +131,7 @@ public IdStage mode(@NotNull String mode) { } /** + *

    Cartesia voice ID

    *

    Cartesia voice ID

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/CreateAgentConfigurationV1Response.java b/src/main/java/com/deepgram/types/CreateAgentConfigurationV1Response.java index 38070904..aed9a454 100644 --- a/src/main/java/com/deepgram/types/CreateAgentConfigurationV1Response.java +++ b/src/main/java/com/deepgram/types/CreateAgentConfigurationV1Response.java @@ -150,6 +150,7 @@ public Builder from(CreateAgentConfigurationV1Response other) { } /** + *

    The unique identifier of the newly created agent configuration

    *

    The unique identifier of the newly created agent configuration

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/CreateProjectDistributionCredentialsV1ResponseDistributionCredentials.java b/src/main/java/com/deepgram/types/CreateProjectDistributionCredentialsV1ResponseDistributionCredentials.java index 0f6d43ad..a8fe5af5 100644 --- a/src/main/java/com/deepgram/types/CreateProjectDistributionCredentialsV1ResponseDistributionCredentials.java +++ b/src/main/java/com/deepgram/types/CreateProjectDistributionCredentialsV1ResponseDistributionCredentials.java @@ -201,6 +201,7 @@ public Builder from(CreateProjectDistributionCredentialsV1ResponseDistributionCr } /** + *

    Unique identifier for the distribution credentials

    *

    Unique identifier for the distribution credentials

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -213,6 +214,7 @@ public ProviderStage distributionCredentialsId(@NotNull String distributionCrede } /** + *

    The provider of the distribution service

    *

    The provider of the distribution service

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -224,6 +226,7 @@ public CreatedStage provider(@NotNull String provider) { } /** + *

    Timestamp when the credentials were created

    *

    Timestamp when the credentials were created

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/CreateProjectDistributionCredentialsV1ResponseMember.java b/src/main/java/com/deepgram/types/CreateProjectDistributionCredentialsV1ResponseMember.java index 968290db..4c7468c4 100644 --- a/src/main/java/com/deepgram/types/CreateProjectDistributionCredentialsV1ResponseMember.java +++ b/src/main/java/com/deepgram/types/CreateProjectDistributionCredentialsV1ResponseMember.java @@ -121,6 +121,7 @@ public Builder from(CreateProjectDistributionCredentialsV1ResponseMember other) } /** + *

    Unique identifier for the member

    *

    Unique identifier for the member

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -132,6 +133,7 @@ public EmailStage memberId(@NotNull String memberId) { } /** + *

    Email address of the member

    *

    Email address of the member

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/Deepgram.java b/src/main/java/com/deepgram/types/Deepgram.java index e502c19c..28ba235a 100644 --- a/src/main/java/com/deepgram/types/Deepgram.java +++ b/src/main/java/com/deepgram/types/Deepgram.java @@ -46,7 +46,7 @@ public String getType() { } /** - * @return The Deepgram text-to-speech model family. Accepted values: v1 (Aura, the default) and v2 (Flux TTS, Early Access). Use v1 with an aura-* model and v2 with a flux-* model. Defaults to v1 when omitted. + * @return The REST API version for the Deepgram text-to-speech API */ @JsonProperty("version") public Optional getVersion() { @@ -54,7 +54,7 @@ public Optional getVersion() { } /** - * @return Deepgram TTS model. Aura models (version v1) use the aura-* voices; Flux TTS (version v2, Early Access) uses the flux-{voice}-{language} voices (e.g. flux-alexis-en). + * @return Deepgram TTS model */ @JsonProperty("model") public DeepgramSpeakProviderModel getModel() { @@ -100,7 +100,7 @@ public static ModelStage builder() { public interface ModelStage { /** - *

    Deepgram TTS model. Aura models (version v1) use the aura-* voices; Flux TTS (version v2, Early Access) uses the flux-{voice}-{language} voices (e.g. flux-alexis-en).

    + *

    Deepgram TTS model

    */ _FinalStage model(@NotNull DeepgramSpeakProviderModel model); @@ -115,7 +115,7 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); /** - *

    The Deepgram text-to-speech model family. Accepted values: v1 (Aura, the default) and v2 (Flux TTS, Early Access). Use v1 with an aura-* model and v2 with a flux-* model. Defaults to v1 when omitted.

    + *

    The REST API version for the Deepgram text-to-speech API

    */ _FinalStage version(Optional version); @@ -151,7 +151,8 @@ public Builder from(Deepgram other) { } /** - *

    Deepgram TTS model. Aura models (version v1) use the aura-* voices; Flux TTS (version v2, Early Access) uses the flux-{voice}-{language} voices (e.g. flux-alexis-en).

    + *

    Deepgram TTS model

    + *

    Deepgram TTS model

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -182,7 +183,7 @@ public _FinalStage speed(Optional speed) { } /** - *

    The Deepgram text-to-speech model family. Accepted values: v1 (Aura, the default) and v2 (Flux TTS, Early Access). Use v1 with an aura-* model and v2 with a flux-* model. Defaults to v1 when omitted.

    + *

    The REST API version for the Deepgram text-to-speech API

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -192,7 +193,7 @@ public _FinalStage version(String version) { } /** - *

    The Deepgram text-to-speech model family. Accepted values: v1 (Aura, the default) and v2 (Flux TTS, Early Access). Use v1 with an aura-* model and v2 with a flux-* model. Defaults to v1 when omitted.

    + *

    The REST API version for the Deepgram text-to-speech API

    */ @java.lang.Override @JsonSetter(value = "version", nulls = Nulls.SKIP) diff --git a/src/main/java/com/deepgram/types/DeepgramListenProviderV2.java b/src/main/java/com/deepgram/types/DeepgramListenProviderV2.java index 79cdd1e0..560f010b 100644 --- a/src/main/java/com/deepgram/types/DeepgramListenProviderV2.java +++ b/src/main/java/com/deepgram/types/DeepgramListenProviderV2.java @@ -256,6 +256,7 @@ public Builder from(DeepgramListenProviderV2 other) { } /** + *

    Model to use for speech to text using the V2 API (e.g. flux-general-en, flux-general-multi)

    *

    Model to use for speech to text using the V2 API (e.g. flux-general-en, flux-general-multi)

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/DeepgramSpeakProviderModel.java b/src/main/java/com/deepgram/types/DeepgramSpeakProviderModel.java index 8d600575..897ac16e 100644 --- a/src/main/java/com/deepgram/types/DeepgramSpeakProviderModel.java +++ b/src/main/java/com/deepgram/types/DeepgramSpeakProviderModel.java @@ -7,163 +7,194 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class DeepgramSpeakProviderModel { - public static final DeepgramSpeakProviderModel AURA2SIRIO_ES = new DeepgramSpeakProviderModel(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); + public static final DeepgramSpeakProviderModel AURA2SIRIO_ES = + new DeepgramSpeakProviderModel(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); - public static final DeepgramSpeakProviderModel AURA2HERA_EN = new DeepgramSpeakProviderModel(Value.AURA2HERA_EN, "aura-2-hera-en"); + public static final DeepgramSpeakProviderModel AURA2HERA_EN = + new DeepgramSpeakProviderModel(Value.AURA2HERA_EN, "aura-2-hera-en"); - public static final DeepgramSpeakProviderModel AURA2ASTERIA_EN = new DeepgramSpeakProviderModel(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); + public static final DeepgramSpeakProviderModel AURA2ASTERIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); public static final DeepgramSpeakProviderModel AURA2HARMONIA_EN = new DeepgramSpeakProviderModel(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); - public static final DeepgramSpeakProviderModel AURA2CARINA_ES = new DeepgramSpeakProviderModel(Value.AURA2CARINA_ES, "aura-2-carina-es"); + public static final DeepgramSpeakProviderModel AURA2CARINA_ES = + new DeepgramSpeakProviderModel(Value.AURA2CARINA_ES, "aura-2-carina-es"); - public static final DeepgramSpeakProviderModel AURA_ZEUS_EN = new DeepgramSpeakProviderModel(Value.AURA_ZEUS_EN, "aura-zeus-en"); + public static final DeepgramSpeakProviderModel AURA_ZEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA_ZEUS_EN, "aura-zeus-en"); - public static final DeepgramSpeakProviderModel AURA2HERMES_EN = new DeepgramSpeakProviderModel(Value.AURA2HERMES_EN, "aura-2-hermes-en"); + public static final DeepgramSpeakProviderModel AURA2HERMES_EN = + new DeepgramSpeakProviderModel(Value.AURA2HERMES_EN, "aura-2-hermes-en"); - public static final DeepgramSpeakProviderModel AURA2SELENA_ES = new DeepgramSpeakProviderModel(Value.AURA2SELENA_ES, "aura-2-selena-es"); + public static final DeepgramSpeakProviderModel AURA2SELENA_ES = + new DeepgramSpeakProviderModel(Value.AURA2SELENA_ES, "aura-2-selena-es"); - public static final DeepgramSpeakProviderModel AURA2NEPTUNE_EN = new DeepgramSpeakProviderModel(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); - - public static final DeepgramSpeakProviderModel FLUX_RUFUS_EN = new DeepgramSpeakProviderModel(Value.FLUX_RUFUS_EN, "flux-rufus-en"); + public static final DeepgramSpeakProviderModel AURA2NEPTUNE_EN = + new DeepgramSpeakProviderModel(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); public static final DeepgramSpeakProviderModel AURA2CALLISTA_EN = new DeepgramSpeakProviderModel(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); - public static final DeepgramSpeakProviderModel AURA2AURORA_EN = new DeepgramSpeakProviderModel(Value.AURA2AURORA_EN, "aura-2-aurora-en"); - - public static final DeepgramSpeakProviderModel AURA2OPHELIA_EN = new DeepgramSpeakProviderModel(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); - - public static final DeepgramSpeakProviderModel FLUX_BRUCE_EN = new DeepgramSpeakProviderModel(Value.FLUX_BRUCE_EN, "flux-bruce-en"); + public static final DeepgramSpeakProviderModel AURA2AURORA_EN = + new DeepgramSpeakProviderModel(Value.AURA2AURORA_EN, "aura-2-aurora-en"); - public static final DeepgramSpeakProviderModel AURA2APOLLO_EN = new DeepgramSpeakProviderModel(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); + public static final DeepgramSpeakProviderModel AURA2OPHELIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); - public static final DeepgramSpeakProviderModel FLUX_ALEXIS_EN = new DeepgramSpeakProviderModel(Value.FLUX_ALEXIS_EN, "flux-alexis-en"); + public static final DeepgramSpeakProviderModel AURA2APOLLO_EN = + new DeepgramSpeakProviderModel(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); - public static final DeepgramSpeakProviderModel AURA_LUNA_EN = new DeepgramSpeakProviderModel(Value.AURA_LUNA_EN, "aura-luna-en"); + public static final DeepgramSpeakProviderModel AURA_LUNA_EN = + new DeepgramSpeakProviderModel(Value.AURA_LUNA_EN, "aura-luna-en"); - public static final DeepgramSpeakProviderModel AURA_ORPHEUS_EN = new DeepgramSpeakProviderModel(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); + public static final DeepgramSpeakProviderModel AURA_ORPHEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); - public static final DeepgramSpeakProviderModel AURA2DELIA_EN = new DeepgramSpeakProviderModel(Value.AURA2DELIA_EN, "aura-2-delia-en"); + public static final DeepgramSpeakProviderModel AURA2DELIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2DELIA_EN, "aura-2-delia-en"); - public static final DeepgramSpeakProviderModel AURA2MARS_EN = new DeepgramSpeakProviderModel(Value.AURA2MARS_EN, "aura-2-mars-en"); + public static final DeepgramSpeakProviderModel AURA2MARS_EN = + new DeepgramSpeakProviderModel(Value.AURA2MARS_EN, "aura-2-mars-en"); public static final DeepgramSpeakProviderModel AURA2AMALTHEA_EN = new DeepgramSpeakProviderModel(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); - public static final DeepgramSpeakProviderModel AURA_HERA_EN = new DeepgramSpeakProviderModel(Value.AURA_HERA_EN, "aura-hera-en"); - - public static final DeepgramSpeakProviderModel AURA2SELENE_EN = new DeepgramSpeakProviderModel(Value.AURA2SELENE_EN, "aura-2-selene-en"); - - public static final DeepgramSpeakProviderModel FLUX_MARCUS_EN = new DeepgramSpeakProviderModel(Value.FLUX_MARCUS_EN, "flux-marcus-en"); + public static final DeepgramSpeakProviderModel AURA_HERA_EN = + new DeepgramSpeakProviderModel(Value.AURA_HERA_EN, "aura-hera-en"); - public static final DeepgramSpeakProviderModel FLUX_SHARON_EN = new DeepgramSpeakProviderModel(Value.FLUX_SHARON_EN, "flux-sharon-en"); + public static final DeepgramSpeakProviderModel AURA2SELENE_EN = + new DeepgramSpeakProviderModel(Value.AURA2SELENE_EN, "aura-2-selene-en"); - public static final DeepgramSpeakProviderModel AURA2ARIES_EN = new DeepgramSpeakProviderModel(Value.AURA2ARIES_EN, "aura-2-aries-en"); + public static final DeepgramSpeakProviderModel AURA2ARIES_EN = + new DeepgramSpeakProviderModel(Value.AURA2ARIES_EN, "aura-2-aries-en"); - public static final DeepgramSpeakProviderModel AURA2JUNO_EN = new DeepgramSpeakProviderModel(Value.AURA2JUNO_EN, "aura-2-juno-en"); + public static final DeepgramSpeakProviderModel AURA2JUNO_EN = + new DeepgramSpeakProviderModel(Value.AURA2JUNO_EN, "aura-2-juno-en"); - public static final DeepgramSpeakProviderModel AURA2LUNA_EN = new DeepgramSpeakProviderModel(Value.AURA2LUNA_EN, "aura-2-luna-en"); + public static final DeepgramSpeakProviderModel AURA2LUNA_EN = + new DeepgramSpeakProviderModel(Value.AURA2LUNA_EN, "aura-2-luna-en"); - public static final DeepgramSpeakProviderModel FLUX_DREW_EN = new DeepgramSpeakProviderModel(Value.FLUX_DREW_EN, "flux-drew-en"); + public static final DeepgramSpeakProviderModel AURA2JAVIER_ES = + new DeepgramSpeakProviderModel(Value.AURA2JAVIER_ES, "aura-2-javier-es"); - public static final DeepgramSpeakProviderModel AURA2JAVIER_ES = new DeepgramSpeakProviderModel(Value.AURA2JAVIER_ES, "aura-2-javier-es"); + public static final DeepgramSpeakProviderModel AURA2PHOEBE_EN = + new DeepgramSpeakProviderModel(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); - public static final DeepgramSpeakProviderModel AURA2PHOEBE_EN = new DeepgramSpeakProviderModel(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); + public static final DeepgramSpeakProviderModel AURA2DIANA_ES = + new DeepgramSpeakProviderModel(Value.AURA2DIANA_ES, "aura-2-diana-es"); - public static final DeepgramSpeakProviderModel AURA2DIANA_ES = new DeepgramSpeakProviderModel(Value.AURA2DIANA_ES, "aura-2-diana-es"); - - public static final DeepgramSpeakProviderModel AURA_ORION_EN = new DeepgramSpeakProviderModel(Value.AURA_ORION_EN, "aura-orion-en"); + public static final DeepgramSpeakProviderModel AURA_ORION_EN = + new DeepgramSpeakProviderModel(Value.AURA_ORION_EN, "aura-orion-en"); public static final DeepgramSpeakProviderModel AURA2ANDROMEDA_EN = new DeepgramSpeakProviderModel(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); - public static final DeepgramSpeakProviderModel AURA2ATHENA_EN = new DeepgramSpeakProviderModel(Value.AURA2ATHENA_EN, "aura-2-athena-en"); - - public static final DeepgramSpeakProviderModel AURA2SATURN_EN = new DeepgramSpeakProviderModel(Value.AURA2SATURN_EN, "aura-2-saturn-en"); + public static final DeepgramSpeakProviderModel AURA2ATHENA_EN = + new DeepgramSpeakProviderModel(Value.AURA2ATHENA_EN, "aura-2-athena-en"); - public static final DeepgramSpeakProviderModel AURA_ARCAS_EN = new DeepgramSpeakProviderModel(Value.AURA_ARCAS_EN, "aura-arcas-en"); + public static final DeepgramSpeakProviderModel AURA2SATURN_EN = + new DeepgramSpeakProviderModel(Value.AURA2SATURN_EN, "aura-2-saturn-en"); - public static final DeepgramSpeakProviderModel AURA2THEIA_EN = new DeepgramSpeakProviderModel(Value.AURA2THEIA_EN, "aura-2-theia-en"); + public static final DeepgramSpeakProviderModel AURA_ARCAS_EN = + new DeepgramSpeakProviderModel(Value.AURA_ARCAS_EN, "aura-arcas-en"); - public static final DeepgramSpeakProviderModel AURA2IRIS_EN = new DeepgramSpeakProviderModel(Value.AURA2IRIS_EN, "aura-2-iris-en"); + public static final DeepgramSpeakProviderModel AURA2THEIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2THEIA_EN, "aura-2-theia-en"); - public static final DeepgramSpeakProviderModel AURA_ANGUS_EN = new DeepgramSpeakProviderModel(Value.AURA_ANGUS_EN, "aura-angus-en"); + public static final DeepgramSpeakProviderModel AURA2IRIS_EN = + new DeepgramSpeakProviderModel(Value.AURA2IRIS_EN, "aura-2-iris-en"); - public static final DeepgramSpeakProviderModel FLUX_HEATHER_EN = new DeepgramSpeakProviderModel(Value.FLUX_HEATHER_EN, "flux-heather-en"); + public static final DeepgramSpeakProviderModel AURA_ANGUS_EN = + new DeepgramSpeakProviderModel(Value.AURA_ANGUS_EN, "aura-angus-en"); - public static final DeepgramSpeakProviderModel AURA2JUPITER_EN = new DeepgramSpeakProviderModel(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); + public static final DeepgramSpeakProviderModel AURA2JUPITER_EN = + new DeepgramSpeakProviderModel(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); - public static final DeepgramSpeakProviderModel AURA2AQUILA_ES = new DeepgramSpeakProviderModel(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); + public static final DeepgramSpeakProviderModel AURA2AQUILA_ES = + new DeepgramSpeakProviderModel(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); - public static final DeepgramSpeakProviderModel AURA2CORA_EN = new DeepgramSpeakProviderModel(Value.AURA2CORA_EN, "aura-2-cora-en"); + public static final DeepgramSpeakProviderModel AURA2CORA_EN = + new DeepgramSpeakProviderModel(Value.AURA2CORA_EN, "aura-2-cora-en"); public static final DeepgramSpeakProviderModel AURA2CORDELIA_EN = new DeepgramSpeakProviderModel(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); - public static final DeepgramSpeakProviderModel AURA2ATLAS_EN = new DeepgramSpeakProviderModel(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); - - public static final DeepgramSpeakProviderModel AURA2HELENA_EN = new DeepgramSpeakProviderModel(Value.AURA2HELENA_EN, "aura-2-helena-en"); - - public static final DeepgramSpeakProviderModel FLUX_HALEY_EN = new DeepgramSpeakProviderModel(Value.FLUX_HALEY_EN, "flux-haley-en"); + public static final DeepgramSpeakProviderModel AURA2ATLAS_EN = + new DeepgramSpeakProviderModel(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); - public static final DeepgramSpeakProviderModel AURA_STELLA_EN = new DeepgramSpeakProviderModel(Value.AURA_STELLA_EN, "aura-stella-en"); + public static final DeepgramSpeakProviderModel AURA2HELENA_EN = + new DeepgramSpeakProviderModel(Value.AURA2HELENA_EN, "aura-2-helena-en"); - public static final DeepgramSpeakProviderModel FLUX_JACK_EN = new DeepgramSpeakProviderModel(Value.FLUX_JACK_EN, "flux-jack-en"); + public static final DeepgramSpeakProviderModel AURA_STELLA_EN = + new DeepgramSpeakProviderModel(Value.AURA_STELLA_EN, "aura-stella-en"); - public static final DeepgramSpeakProviderModel AURA2DRACO_EN = new DeepgramSpeakProviderModel(Value.AURA2DRACO_EN, "aura-2-draco-en"); + public static final DeepgramSpeakProviderModel AURA2DRACO_EN = + new DeepgramSpeakProviderModel(Value.AURA2DRACO_EN, "aura-2-draco-en"); public static final DeepgramSpeakProviderModel AURA2HYPERION_EN = new DeepgramSpeakProviderModel(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); - public static final DeepgramSpeakProviderModel AURA2CELESTE_ES = new DeepgramSpeakProviderModel(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); + public static final DeepgramSpeakProviderModel AURA2CELESTE_ES = + new DeepgramSpeakProviderModel(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); - public static final DeepgramSpeakProviderModel FLUX_PRIYA_EN = new DeepgramSpeakProviderModel(Value.FLUX_PRIYA_EN, "flux-priya-en"); + public static final DeepgramSpeakProviderModel AURA_HELIOS_EN = + new DeepgramSpeakProviderModel(Value.AURA_HELIOS_EN, "aura-helios-en"); - public static final DeepgramSpeakProviderModel AURA_HELIOS_EN = new DeepgramSpeakProviderModel(Value.AURA_HELIOS_EN, "aura-helios-en"); + public static final DeepgramSpeakProviderModel AURA2PLUTO_EN = + new DeepgramSpeakProviderModel(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); - public static final DeepgramSpeakProviderModel AURA2PLUTO_EN = new DeepgramSpeakProviderModel(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); + public static final DeepgramSpeakProviderModel AURA2JANUS_EN = + new DeepgramSpeakProviderModel(Value.AURA2JANUS_EN, "aura-2-janus-en"); - public static final DeepgramSpeakProviderModel AURA2JANUS_EN = new DeepgramSpeakProviderModel(Value.AURA2JANUS_EN, "aura-2-janus-en"); + public static final DeepgramSpeakProviderModel AURA2NESTOR_ES = + new DeepgramSpeakProviderModel(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); - public static final DeepgramSpeakProviderModel AURA2NESTOR_ES = new DeepgramSpeakProviderModel(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); + public static final DeepgramSpeakProviderModel AURA2ARCAS_EN = + new DeepgramSpeakProviderModel(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); - public static final DeepgramSpeakProviderModel AURA2ARCAS_EN = new DeepgramSpeakProviderModel(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); + public static final DeepgramSpeakProviderModel AURA2ORION_EN = + new DeepgramSpeakProviderModel(Value.AURA2ORION_EN, "aura-2-orion-en"); - public static final DeepgramSpeakProviderModel AURA2ORION_EN = new DeepgramSpeakProviderModel(Value.AURA2ORION_EN, "aura-2-orion-en"); - - public static final DeepgramSpeakProviderModel FLUX_RENEE_EN = new DeepgramSpeakProviderModel(Value.FLUX_RENEE_EN, "flux-renee-en"); - - public static final DeepgramSpeakProviderModel AURA_ATHENA_EN = new DeepgramSpeakProviderModel(Value.AURA_ATHENA_EN, "aura-athena-en"); + public static final DeepgramSpeakProviderModel AURA_ATHENA_EN = + new DeepgramSpeakProviderModel(Value.AURA_ATHENA_EN, "aura-athena-en"); public static final DeepgramSpeakProviderModel AURA2ODYSSEUS_EN = new DeepgramSpeakProviderModel(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); - public static final DeepgramSpeakProviderModel AURA2PANDORA_EN = new DeepgramSpeakProviderModel(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); - - public static final DeepgramSpeakProviderModel AURA2MINERVA_EN = new DeepgramSpeakProviderModel(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); + public static final DeepgramSpeakProviderModel AURA2PANDORA_EN = + new DeepgramSpeakProviderModel(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); - public static final DeepgramSpeakProviderModel AURA2ALVARO_ES = new DeepgramSpeakProviderModel(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); + public static final DeepgramSpeakProviderModel AURA2MINERVA_EN = + new DeepgramSpeakProviderModel(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); - public static final DeepgramSpeakProviderModel AURA_PERSEUS_EN = new DeepgramSpeakProviderModel(Value.AURA_PERSEUS_EN, "aura-perseus-en"); + public static final DeepgramSpeakProviderModel AURA2ALVARO_ES = + new DeepgramSpeakProviderModel(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); - public static final DeepgramSpeakProviderModel AURA2VESTA_EN = new DeepgramSpeakProviderModel(Value.AURA2VESTA_EN, "aura-2-vesta-en"); + public static final DeepgramSpeakProviderModel AURA_PERSEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA_PERSEUS_EN, "aura-perseus-en"); - public static final DeepgramSpeakProviderModel FLUX_COLE_EN = new DeepgramSpeakProviderModel(Value.FLUX_COLE_EN, "flux-cole-en"); + public static final DeepgramSpeakProviderModel AURA2VESTA_EN = + new DeepgramSpeakProviderModel(Value.AURA2VESTA_EN, "aura-2-vesta-en"); - public static final DeepgramSpeakProviderModel AURA_ASTERIA_EN = new DeepgramSpeakProviderModel(Value.AURA_ASTERIA_EN, "aura-asteria-en"); + public static final DeepgramSpeakProviderModel AURA_ASTERIA_EN = + new DeepgramSpeakProviderModel(Value.AURA_ASTERIA_EN, "aura-asteria-en"); - public static final DeepgramSpeakProviderModel AURA2ZEUS_EN = new DeepgramSpeakProviderModel(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); + public static final DeepgramSpeakProviderModel AURA2ZEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); - public static final DeepgramSpeakProviderModel AURA2ELECTRA_EN = new DeepgramSpeakProviderModel(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); + public static final DeepgramSpeakProviderModel AURA2ELECTRA_EN = + new DeepgramSpeakProviderModel(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); - public static final DeepgramSpeakProviderModel AURA2ORPHEUS_EN = new DeepgramSpeakProviderModel(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); + public static final DeepgramSpeakProviderModel AURA2ORPHEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); public static final DeepgramSpeakProviderModel AURA2ESTRELLA_ES = new DeepgramSpeakProviderModel(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); - public static final DeepgramSpeakProviderModel AURA2THALIA_EN = new DeepgramSpeakProviderModel(Value.AURA2THALIA_EN, "aura-2-thalia-en"); + public static final DeepgramSpeakProviderModel AURA2THALIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2THALIA_EN, "aura-2-thalia-en"); private final Value value; @@ -187,7 +218,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof DeepgramSpeakProviderModel && this.string.equals(((DeepgramSpeakProviderModel) other).string)); + || (other instanceof DeepgramSpeakProviderModel + && this.string.equals(((DeepgramSpeakProviderModel) other).string)); } @java.lang.Override @@ -215,20 +247,14 @@ public T visit(Visitor visitor) { return visitor.visitAura2SelenaEs(); case AURA2NEPTUNE_EN: return visitor.visitAura2NeptuneEn(); - case FLUX_RUFUS_EN: - return visitor.visitFluxRufusEn(); case AURA2CALLISTA_EN: return visitor.visitAura2CallistaEn(); case AURA2AURORA_EN: return visitor.visitAura2AuroraEn(); case AURA2OPHELIA_EN: return visitor.visitAura2OpheliaEn(); - case FLUX_BRUCE_EN: - return visitor.visitFluxBruceEn(); case AURA2APOLLO_EN: return visitor.visitAura2ApolloEn(); - case FLUX_ALEXIS_EN: - return visitor.visitFluxAlexisEn(); case AURA_LUNA_EN: return visitor.visitAuraLunaEn(); case AURA_ORPHEUS_EN: @@ -243,18 +269,12 @@ public T visit(Visitor visitor) { return visitor.visitAuraHeraEn(); case AURA2SELENE_EN: return visitor.visitAura2SeleneEn(); - case FLUX_MARCUS_EN: - return visitor.visitFluxMarcusEn(); - case FLUX_SHARON_EN: - return visitor.visitFluxSharonEn(); case AURA2ARIES_EN: return visitor.visitAura2AriesEn(); case AURA2JUNO_EN: return visitor.visitAura2JunoEn(); case AURA2LUNA_EN: return visitor.visitAura2LunaEn(); - case FLUX_DREW_EN: - return visitor.visitFluxDrewEn(); case AURA2JAVIER_ES: return visitor.visitAura2JavierEs(); case AURA2PHOEBE_EN: @@ -277,8 +297,6 @@ public T visit(Visitor visitor) { return visitor.visitAura2IrisEn(); case AURA_ANGUS_EN: return visitor.visitAuraAngusEn(); - case FLUX_HEATHER_EN: - return visitor.visitFluxHeatherEn(); case AURA2JUPITER_EN: return visitor.visitAura2JupiterEn(); case AURA2AQUILA_ES: @@ -291,20 +309,14 @@ public T visit(Visitor visitor) { return visitor.visitAura2AtlasEn(); case AURA2HELENA_EN: return visitor.visitAura2HelenaEn(); - case FLUX_HALEY_EN: - return visitor.visitFluxHaleyEn(); case AURA_STELLA_EN: return visitor.visitAuraStellaEn(); - case FLUX_JACK_EN: - return visitor.visitFluxJackEn(); case AURA2DRACO_EN: return visitor.visitAura2DracoEn(); case AURA2HYPERION_EN: return visitor.visitAura2HyperionEn(); case AURA2CELESTE_ES: return visitor.visitAura2CelesteEs(); - case FLUX_PRIYA_EN: - return visitor.visitFluxPriyaEn(); case AURA_HELIOS_EN: return visitor.visitAuraHeliosEn(); case AURA2PLUTO_EN: @@ -317,8 +329,6 @@ public T visit(Visitor visitor) { return visitor.visitAura2ArcasEn(); case AURA2ORION_EN: return visitor.visitAura2OrionEn(); - case FLUX_RENEE_EN: - return visitor.visitFluxReneeEn(); case AURA_ATHENA_EN: return visitor.visitAuraAthenaEn(); case AURA2ODYSSEUS_EN: @@ -333,8 +343,6 @@ public T visit(Visitor visitor) { return visitor.visitAuraPerseusEn(); case AURA2VESTA_EN: return visitor.visitAura2VestaEn(); - case FLUX_COLE_EN: - return visitor.visitFluxColeEn(); case AURA_ASTERIA_EN: return visitor.visitAuraAsteriaEn(); case AURA2ZEUS_EN: @@ -374,20 +382,14 @@ public static DeepgramSpeakProviderModel valueOf(String value) { return AURA2SELENA_ES; case "aura-2-neptune-en": return AURA2NEPTUNE_EN; - case "flux-rufus-en": - return FLUX_RUFUS_EN; case "aura-2-callista-en": return AURA2CALLISTA_EN; case "aura-2-aurora-en": return AURA2AURORA_EN; case "aura-2-ophelia-en": return AURA2OPHELIA_EN; - case "flux-bruce-en": - return FLUX_BRUCE_EN; case "aura-2-apollo-en": return AURA2APOLLO_EN; - case "flux-alexis-en": - return FLUX_ALEXIS_EN; case "aura-luna-en": return AURA_LUNA_EN; case "aura-orpheus-en": @@ -402,18 +404,12 @@ public static DeepgramSpeakProviderModel valueOf(String value) { return AURA_HERA_EN; case "aura-2-selene-en": return AURA2SELENE_EN; - case "flux-marcus-en": - return FLUX_MARCUS_EN; - case "flux-sharon-en": - return FLUX_SHARON_EN; case "aura-2-aries-en": return AURA2ARIES_EN; case "aura-2-juno-en": return AURA2JUNO_EN; case "aura-2-luna-en": return AURA2LUNA_EN; - case "flux-drew-en": - return FLUX_DREW_EN; case "aura-2-javier-es": return AURA2JAVIER_ES; case "aura-2-phoebe-en": @@ -436,8 +432,6 @@ public static DeepgramSpeakProviderModel valueOf(String value) { return AURA2IRIS_EN; case "aura-angus-en": return AURA_ANGUS_EN; - case "flux-heather-en": - return FLUX_HEATHER_EN; case "aura-2-jupiter-en": return AURA2JUPITER_EN; case "aura-2-aquila-es": @@ -450,20 +444,14 @@ public static DeepgramSpeakProviderModel valueOf(String value) { return AURA2ATLAS_EN; case "aura-2-helena-en": return AURA2HELENA_EN; - case "flux-haley-en": - return FLUX_HALEY_EN; case "aura-stella-en": return AURA_STELLA_EN; - case "flux-jack-en": - return FLUX_JACK_EN; case "aura-2-draco-en": return AURA2DRACO_EN; case "aura-2-hyperion-en": return AURA2HYPERION_EN; case "aura-2-celeste-es": return AURA2CELESTE_ES; - case "flux-priya-en": - return FLUX_PRIYA_EN; case "aura-helios-en": return AURA_HELIOS_EN; case "aura-2-pluto-en": @@ -476,8 +464,6 @@ public static DeepgramSpeakProviderModel valueOf(String value) { return AURA2ARCAS_EN; case "aura-2-orion-en": return AURA2ORION_EN; - case "flux-renee-en": - return FLUX_RENEE_EN; case "aura-athena-en": return AURA_ATHENA_EN; case "aura-2-odysseus-en": @@ -492,8 +478,6 @@ public static DeepgramSpeakProviderModel valueOf(String value) { return AURA_PERSEUS_EN; case "aura-2-vesta-en": return AURA2VESTA_EN; - case "flux-cole-en": - return FLUX_COLE_EN; case "aura-asteria-en": return AURA_ASTERIA_EN; case "aura-2-zeus-en": @@ -638,30 +622,6 @@ public enum Value { AURA2JAVIER_ES, - FLUX_HALEY_EN, - - FLUX_HEATHER_EN, - - FLUX_COLE_EN, - - FLUX_ALEXIS_EN, - - FLUX_PRIYA_EN, - - FLUX_JACK_EN, - - FLUX_BRUCE_EN, - - FLUX_RUFUS_EN, - - FLUX_DREW_EN, - - FLUX_RENEE_EN, - - FLUX_MARCUS_EN, - - FLUX_SHARON_EN, - UNKNOWN } @@ -792,30 +752,6 @@ public interface Visitor { T visitAura2JavierEs(); - T visitFluxHaleyEn(); - - T visitFluxHeatherEn(); - - T visitFluxColeEn(); - - T visitFluxAlexisEn(); - - T visitFluxPriyaEn(); - - T visitFluxJackEn(); - - T visitFluxBruceEn(); - - T visitFluxRufusEn(); - - T visitFluxDrewEn(); - - T visitFluxReneeEn(); - - T visitFluxMarcusEn(); - - T visitFluxSharonEn(); - T visitUnknown(String unknownType); } } diff --git a/src/main/java/com/deepgram/types/ElevenLabsSpeakProvider.java b/src/main/java/com/deepgram/types/ElevenLabsSpeakProvider.java index 9379f942..b530f1f0 100644 --- a/src/main/java/com/deepgram/types/ElevenLabsSpeakProvider.java +++ b/src/main/java/com/deepgram/types/ElevenLabsSpeakProvider.java @@ -176,6 +176,7 @@ public Builder from(ElevenLabsSpeakProvider other) { } /** + *

    Eleven Labs model ID

    *

    Eleven Labs model ID

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/GetProjectDistributionCredentialsV1ResponseDistributionCredentials.java b/src/main/java/com/deepgram/types/GetProjectDistributionCredentialsV1ResponseDistributionCredentials.java index 735d9032..08bd56eb 100644 --- a/src/main/java/com/deepgram/types/GetProjectDistributionCredentialsV1ResponseDistributionCredentials.java +++ b/src/main/java/com/deepgram/types/GetProjectDistributionCredentialsV1ResponseDistributionCredentials.java @@ -201,6 +201,7 @@ public Builder from(GetProjectDistributionCredentialsV1ResponseDistributionCrede } /** + *

    Unique identifier for the distribution credentials

    *

    Unique identifier for the distribution credentials

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -213,6 +214,7 @@ public ProviderStage distributionCredentialsId(@NotNull String distributionCrede } /** + *

    The provider of the distribution service

    *

    The provider of the distribution service

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -224,6 +226,7 @@ public CreatedStage provider(@NotNull String provider) { } /** + *

    Timestamp when the credentials were created

    *

    Timestamp when the credentials were created

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/GetProjectDistributionCredentialsV1ResponseMember.java b/src/main/java/com/deepgram/types/GetProjectDistributionCredentialsV1ResponseMember.java index d39bda7e..17320324 100644 --- a/src/main/java/com/deepgram/types/GetProjectDistributionCredentialsV1ResponseMember.java +++ b/src/main/java/com/deepgram/types/GetProjectDistributionCredentialsV1ResponseMember.java @@ -121,6 +121,7 @@ public Builder from(GetProjectDistributionCredentialsV1ResponseMember other) { } /** + *

    Unique identifier for the member

    *

    Unique identifier for the member

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -132,6 +133,7 @@ public EmailStage memberId(@NotNull String memberId) { } /** + *

    Email address of the member

    *

    Email address of the member

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/Google.java b/src/main/java/com/deepgram/types/Google.java index 35471a96..fb6b2ef9 100644 --- a/src/main/java/com/deepgram/types/Google.java +++ b/src/main/java/com/deepgram/types/Google.java @@ -151,6 +151,7 @@ public Builder from(Google other) { } /** + *

    Google model to use

    *

    Google model to use

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/GoogleThinkProviderModel.java b/src/main/java/com/deepgram/types/GoogleThinkProviderModel.java index b5f53cf4..c7d3a5e0 100644 --- a/src/main/java/com/deepgram/types/GoogleThinkProviderModel.java +++ b/src/main/java/com/deepgram/types/GoogleThinkProviderModel.java @@ -10,9 +10,11 @@ public final class GoogleThinkProviderModel { public static final GoogleThinkProviderModel GEMINI20FLASH_LITE = new GoogleThinkProviderModel(Value.GEMINI20FLASH_LITE, "gemini-2.0-flash-lite"); - public static final GoogleThinkProviderModel GEMINI25FLASH = new GoogleThinkProviderModel(Value.GEMINI25FLASH, "gemini-2.5-flash"); + public static final GoogleThinkProviderModel GEMINI25FLASH = + new GoogleThinkProviderModel(Value.GEMINI25FLASH, "gemini-2.5-flash"); - public static final GoogleThinkProviderModel GEMINI20FLASH = new GoogleThinkProviderModel(Value.GEMINI20FLASH, "gemini-2.0-flash"); + public static final GoogleThinkProviderModel GEMINI20FLASH = + new GoogleThinkProviderModel(Value.GEMINI20FLASH, "gemini-2.0-flash"); private final Value value; @@ -35,7 +37,9 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { - return (this == other) || (other instanceof GoogleThinkProviderModel && this.string.equals(((GoogleThinkProviderModel) other).string)); + return (this == other) + || (other instanceof GoogleThinkProviderModel + && this.string.equals(((GoogleThinkProviderModel) other).string)); } @java.lang.Override diff --git a/src/main/java/com/deepgram/types/GrantV1Response.java b/src/main/java/com/deepgram/types/GrantV1Response.java index 968d7b4c..f4c886ca 100644 --- a/src/main/java/com/deepgram/types/GrantV1Response.java +++ b/src/main/java/com/deepgram/types/GrantV1Response.java @@ -121,6 +121,7 @@ public Builder from(GrantV1Response other) { } /** + *

    JSON Web Token (JWT)

    *

    JSON Web Token (JWT)

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/GroqThinkProviderReasoningMode.java b/src/main/java/com/deepgram/types/GroqThinkProviderReasoningMode.java index eed22dc6..c8bd38b1 100644 --- a/src/main/java/com/deepgram/types/GroqThinkProviderReasoningMode.java +++ b/src/main/java/com/deepgram/types/GroqThinkProviderReasoningMode.java @@ -7,11 +7,13 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class GroqThinkProviderReasoningMode { - public static final GroqThinkProviderReasoningMode MEDIUM = new GroqThinkProviderReasoningMode(Value.MEDIUM, "medium"); + public static final GroqThinkProviderReasoningMode MEDIUM = + new GroqThinkProviderReasoningMode(Value.MEDIUM, "medium"); public static final GroqThinkProviderReasoningMode LOW = new GroqThinkProviderReasoningMode(Value.LOW, "low"); - public static final GroqThinkProviderReasoningMode MINIMAL = new GroqThinkProviderReasoningMode(Value.MINIMAL, "minimal"); + public static final GroqThinkProviderReasoningMode MINIMAL = + new GroqThinkProviderReasoningMode(Value.MINIMAL, "minimal"); public static final GroqThinkProviderReasoningMode HIGH = new GroqThinkProviderReasoningMode(Value.HIGH, "high"); @@ -39,7 +41,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof GroqThinkProviderReasoningMode && this.string.equals(((GroqThinkProviderReasoningMode) other).string)); + || (other instanceof GroqThinkProviderReasoningMode + && this.string.equals(((GroqThinkProviderReasoningMode) other).string)); } @java.lang.Override diff --git a/src/main/java/com/deepgram/types/ListProjectDistributionCredentialsV1ResponseDistributionCredentialsItemDistributionCredentials.java b/src/main/java/com/deepgram/types/ListProjectDistributionCredentialsV1ResponseDistributionCredentialsItemDistributionCredentials.java index b12610ad..060f4139 100644 --- a/src/main/java/com/deepgram/types/ListProjectDistributionCredentialsV1ResponseDistributionCredentialsItemDistributionCredentials.java +++ b/src/main/java/com/deepgram/types/ListProjectDistributionCredentialsV1ResponseDistributionCredentialsItemDistributionCredentials.java @@ -211,6 +211,7 @@ public Builder from( } /** + *

    Unique identifier for the distribution credentials

    *

    Unique identifier for the distribution credentials

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -223,6 +224,7 @@ public ProviderStage distributionCredentialsId(@NotNull String distributionCrede } /** + *

    The provider of the distribution service

    *

    The provider of the distribution service

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -234,6 +236,7 @@ public CreatedStage provider(@NotNull String provider) { } /** + *

    Timestamp when the credentials were created

    *

    Timestamp when the credentials were created

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/ListProjectDistributionCredentialsV1ResponseDistributionCredentialsItemMember.java b/src/main/java/com/deepgram/types/ListProjectDistributionCredentialsV1ResponseDistributionCredentialsItemMember.java index 88f7d860..9931e313 100644 --- a/src/main/java/com/deepgram/types/ListProjectDistributionCredentialsV1ResponseDistributionCredentialsItemMember.java +++ b/src/main/java/com/deepgram/types/ListProjectDistributionCredentialsV1ResponseDistributionCredentialsItemMember.java @@ -121,6 +121,7 @@ public Builder from(ListProjectDistributionCredentialsV1ResponseDistributionCred } /** + *

    Unique identifier for the member

    *

    Unique identifier for the member

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -132,6 +133,7 @@ public EmailStage memberId(@NotNull String memberId) { } /** + *

    Email address of the member

    *

    Email address of the member

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/ListenV1AcceptedResponse.java b/src/main/java/com/deepgram/types/ListenV1AcceptedResponse.java index 94bc4fcc..5d58d50a 100644 --- a/src/main/java/com/deepgram/types/ListenV1AcceptedResponse.java +++ b/src/main/java/com/deepgram/types/ListenV1AcceptedResponse.java @@ -98,6 +98,7 @@ public Builder from(ListenV1AcceptedResponse other) { } /** + *

    Unique identifier for tracking the asynchronous request

    *

    Unique identifier for tracking the asynchronous request

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseMetadata.java b/src/main/java/com/deepgram/types/ListenV1ResponseMetadata.java index 53a2090f..25c4a9df 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseMetadata.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseMetadata.java @@ -41,8 +41,6 @@ public final class ListenV1ResponseMetadata { private final Map modelInfo; - private final Optional diarizeInfo; - private final Optional summaryInfo; private final Optional sentimentInfo; @@ -64,7 +62,6 @@ private ListenV1ResponseMetadata( int channels, List models, Map modelInfo, - Optional diarizeInfo, Optional summaryInfo, Optional sentimentInfo, Optional topicsInfo, @@ -79,7 +76,6 @@ private ListenV1ResponseMetadata( this.channels = channels; this.models = models; this.modelInfo = modelInfo; - this.diarizeInfo = diarizeInfo; this.summaryInfo = summaryInfo; this.sentimentInfo = sentimentInfo; this.topicsInfo = topicsInfo; @@ -128,14 +124,6 @@ public Map getModelInfo() { return modelInfo; } - /** - * @return The diarizer that produced the speaker labels. Present only when a diarizer ran. - */ - @JsonProperty("diarize_info") - public Optional getDiarizeInfo() { - return diarizeInfo; - } - @JsonProperty("summary_info") public Optional getSummaryInfo() { return summaryInfo; @@ -181,7 +169,6 @@ private boolean equalTo(ListenV1ResponseMetadata other) { && channels == other.channels && models.equals(other.models) && modelInfo.equals(other.modelInfo) - && diarizeInfo.equals(other.diarizeInfo) && summaryInfo.equals(other.summaryInfo) && sentimentInfo.equals(other.sentimentInfo) && topicsInfo.equals(other.topicsInfo) @@ -200,7 +187,6 @@ public int hashCode() { this.channels, this.models, this.modelInfo, - this.diarizeInfo, this.summaryInfo, this.sentimentInfo, this.topicsInfo, @@ -262,13 +248,6 @@ public interface _FinalStage { _FinalStage modelInfo(String key, Object value); - /** - *

    The diarizer that produced the speaker labels. Present only when a diarizer ran.

    - */ - _FinalStage diarizeInfo(Optional diarizeInfo); - - _FinalStage diarizeInfo(ListenV1ResponseMetadataDiarizeInfo diarizeInfo); - _FinalStage summaryInfo(Optional summaryInfo); _FinalStage summaryInfo(ListenV1ResponseMetadataSummaryInfo summaryInfo); @@ -313,8 +292,6 @@ public static final class Builder private Optional summaryInfo = Optional.empty(); - private Optional diarizeInfo = Optional.empty(); - private Map modelInfo = new LinkedHashMap<>(); private List models = new ArrayList<>(); @@ -336,7 +313,6 @@ public Builder from(ListenV1ResponseMetadata other) { channels(other.getChannels()); models(other.getModels()); modelInfo(other.getModelInfo()); - diarizeInfo(other.getDiarizeInfo()); summaryInfo(other.getSummaryInfo()); sentimentInfo(other.getSentimentInfo()); topicsInfo(other.getTopicsInfo()); @@ -445,26 +421,6 @@ public _FinalStage summaryInfo(Optional sum return this; } - /** - *

    The diarizer that produced the speaker labels. Present only when a diarizer ran.

    - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage diarizeInfo(ListenV1ResponseMetadataDiarizeInfo diarizeInfo) { - this.diarizeInfo = Optional.ofNullable(diarizeInfo); - return this; - } - - /** - *

    The diarizer that produced the speaker labels. Present only when a diarizer ran.

    - */ - @java.lang.Override - @JsonSetter(value = "diarize_info", nulls = Nulls.SKIP) - public _FinalStage diarizeInfo(Optional diarizeInfo) { - this.diarizeInfo = diarizeInfo; - return this; - } - @java.lang.Override public _FinalStage modelInfo(String key, Object value) { this.modelInfo.put(key, value); @@ -537,7 +493,6 @@ public ListenV1ResponseMetadata build() { channels, models, modelInfo, - diarizeInfo, summaryInfo, sentimentInfo, topicsInfo, diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataDiarizeInfo.java b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataDiarizeInfo.java deleted file mode 100644 index e5a8bc91..00000000 --- a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataDiarizeInfo.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.types; - -import com.deepgram.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListenV1ResponseMetadataDiarizeInfo.Builder.class) -public final class ListenV1ResponseMetadataDiarizeInfo { - private final String modelUuid; - - private final ListenV1ResponseMetadataDiarizeInfoArch arch; - - private final Map additionalProperties; - - private ListenV1ResponseMetadataDiarizeInfo( - String modelUuid, ListenV1ResponseMetadataDiarizeInfoArch arch, Map additionalProperties) { - this.modelUuid = modelUuid; - this.arch = arch; - this.additionalProperties = additionalProperties; - } - - /** - * @return The diarizer model UUID - */ - @JsonProperty("model_uuid") - public String getModelUuid() { - return modelUuid; - } - - /** - * @return The diarizer arch - */ - @JsonProperty("arch") - public ListenV1ResponseMetadataDiarizeInfoArch getArch() { - return arch; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListenV1ResponseMetadataDiarizeInfo - && equalTo((ListenV1ResponseMetadataDiarizeInfo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListenV1ResponseMetadataDiarizeInfo other) { - return modelUuid.equals(other.modelUuid) && arch.equals(other.arch); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.modelUuid, this.arch); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelUuidStage builder() { - return new Builder(); - } - - public interface ModelUuidStage { - /** - *

    The diarizer model UUID

    - */ - ArchStage modelUuid(@NotNull String modelUuid); - - Builder from(ListenV1ResponseMetadataDiarizeInfo other); - } - - public interface ArchStage { - /** - *

    The diarizer arch

    - */ - _FinalStage arch(@NotNull ListenV1ResponseMetadataDiarizeInfoArch arch); - } - - public interface _FinalStage { - ListenV1ResponseMetadataDiarizeInfo build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelUuidStage, ArchStage, _FinalStage { - private String modelUuid; - - private ListenV1ResponseMetadataDiarizeInfoArch arch; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ListenV1ResponseMetadataDiarizeInfo other) { - modelUuid(other.getModelUuid()); - arch(other.getArch()); - return this; - } - - /** - *

    The diarizer model UUID

    - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("model_uuid") - public ArchStage modelUuid(@NotNull String modelUuid) { - this.modelUuid = Objects.requireNonNull(modelUuid, "modelUuid must not be null"); - return this; - } - - /** - *

    The diarizer arch

    - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("arch") - public _FinalStage arch(@NotNull ListenV1ResponseMetadataDiarizeInfoArch arch) { - this.arch = Objects.requireNonNull(arch, "arch must not be null"); - return this; - } - - @java.lang.Override - public ListenV1ResponseMetadataDiarizeInfo build() { - return new ListenV1ResponseMetadataDiarizeInfo(modelUuid, arch, additionalProperties); - } - - @java.lang.Override - public Builder additionalProperty(String key, Object value) { - this.additionalProperties.put(key, value); - return this; - } - - @java.lang.Override - public Builder additionalProperties(Map additionalProperties) { - this.additionalProperties.putAll(additionalProperties); - return this; - } - } -} diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataDiarizeInfoArch.java b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataDiarizeInfoArch.java deleted file mode 100644 index f1b5213c..00000000 --- a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataDiarizeInfoArch.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ListenV1ResponseMetadataDiarizeInfoArch { - public static final ListenV1ResponseMetadataDiarizeInfoArch V2 = - new ListenV1ResponseMetadataDiarizeInfoArch(Value.V2, "v2"); - - public static final ListenV1ResponseMetadataDiarizeInfoArch V1 = - new ListenV1ResponseMetadataDiarizeInfoArch(Value.V1, "v1"); - - private final Value value; - - private final String string; - - ListenV1ResponseMetadataDiarizeInfoArch(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ListenV1ResponseMetadataDiarizeInfoArch - && this.string.equals(((ListenV1ResponseMetadataDiarizeInfoArch) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case V2: - return visitor.visitV2(); - case V1: - return visitor.visitV1(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ListenV1ResponseMetadataDiarizeInfoArch valueOf(String value) { - switch (value) { - case "v2": - return V2; - case "v1": - return V1; - default: - return new ListenV1ResponseMetadataDiarizeInfoArch(Value.UNKNOWN, value); - } - } - - public enum Value { - V1, - - V2, - - UNKNOWN - } - - public interface Visitor { - T visitV1(); - - T visitV2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem.java b/src/main/java/com/deepgram/types/ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem.java index d3896580..b54fa41e 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem.java @@ -28,10 +28,6 @@ public final class ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem private final Optional confidence; - private final Optional speaker; - - private final Optional speakerConfidence; - private final Map additionalProperties; private ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem( @@ -39,15 +35,11 @@ private ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem( Optional start, Optional end, Optional confidence, - Optional speaker, - Optional speakerConfidence, Map additionalProperties) { this.word = word; this.start = start; this.end = end; this.confidence = confidence; - this.speaker = speaker; - this.speakerConfidence = speakerConfidence; this.additionalProperties = additionalProperties; } @@ -71,22 +63,6 @@ public Optional getConfidence() { return confidence; } - /** - * @return The speaker of the word, present when diarization is enabled - */ - @JsonProperty("speaker") - public Optional getSpeaker() { - return speaker; - } - - /** - * @return Confidence in the speaker assignment. Returned only for pre-recorded diarization; not available for streaming - */ - @JsonProperty("speaker_confidence") - public Optional getSpeakerConfidence() { - return speakerConfidence; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -103,14 +79,12 @@ private boolean equalTo(ListenV1ResponseResultsChannelsItemAlternativesItemWords return word.equals(other.word) && start.equals(other.start) && end.equals(other.end) - && confidence.equals(other.confidence) - && speaker.equals(other.speaker) - && speakerConfidence.equals(other.speakerConfidence); + && confidence.equals(other.confidence); } @java.lang.Override public int hashCode() { - return Objects.hash(this.word, this.start, this.end, this.confidence, this.speaker, this.speakerConfidence); + return Objects.hash(this.word, this.start, this.end, this.confidence); } @java.lang.Override @@ -132,10 +106,6 @@ public static final class Builder { private Optional confidence = Optional.empty(); - private Optional speaker = Optional.empty(); - - private Optional speakerConfidence = Optional.empty(); - @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -146,8 +116,6 @@ public Builder from(ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem start(other.getStart()); end(other.getEnd()); confidence(other.getConfidence()); - speaker(other.getSpeaker()); - speakerConfidence(other.getSpeakerConfidence()); return this; } @@ -195,37 +163,9 @@ public Builder confidence(Float confidence) { return this; } - /** - *

    The speaker of the word, present when diarization is enabled

    - */ - @JsonSetter(value = "speaker", nulls = Nulls.SKIP) - public Builder speaker(Optional speaker) { - this.speaker = speaker; - return this; - } - - public Builder speaker(Integer speaker) { - this.speaker = Optional.ofNullable(speaker); - return this; - } - - /** - *

    Confidence in the speaker assignment. Returned only for pre-recorded diarization; not available for streaming

    - */ - @JsonSetter(value = "speaker_confidence", nulls = Nulls.SKIP) - public Builder speakerConfidence(Optional speakerConfidence) { - this.speakerConfidence = speakerConfidence; - return this; - } - - public Builder speakerConfidence(Float speakerConfidence) { - this.speakerConfidence = Optional.ofNullable(speakerConfidence); - return this; - } - public ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem build() { return new ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem( - word, start, end, confidence, speaker, speakerConfidence, additionalProperties); + word, start, end, confidence, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/types/ListenV2Redact.java b/src/main/java/com/deepgram/types/ListenV2Redact.java deleted file mode 100644 index ceee795c..00000000 --- a/src/main/java/com/deepgram/types/ListenV2Redact.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ListenV2Redact { - public static final ListenV2Redact NUMBERS = new ListenV2Redact(Value.NUMBERS, "numbers"); - - public static final ListenV2Redact AGGRESSIVE_NUMBERS = - new ListenV2Redact(Value.AGGRESSIVE_NUMBERS, "aggressive_numbers"); - - private final Value value; - - private final String string; - - ListenV2Redact(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ListenV2Redact && this.string.equals(((ListenV2Redact) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case NUMBERS: - return visitor.visitNumbers(); - case AGGRESSIVE_NUMBERS: - return visitor.visitAggressiveNumbers(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ListenV2Redact valueOf(String value) { - switch (value) { - case "numbers": - return NUMBERS; - case "aggressive_numbers": - return AGGRESSIVE_NUMBERS; - default: - return new ListenV2Redact(Value.UNKNOWN, value); - } - } - - public enum Value { - NUMBERS, - - AGGRESSIVE_NUMBERS, - - UNKNOWN - } - - public interface Visitor { - T visitNumbers(); - - T visitAggressiveNumbers(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/types/OpenAiSpeakProvider.java b/src/main/java/com/deepgram/types/OpenAiSpeakProvider.java index 880da92b..7f6c48fb 100644 --- a/src/main/java/com/deepgram/types/OpenAiSpeakProvider.java +++ b/src/main/java/com/deepgram/types/OpenAiSpeakProvider.java @@ -151,6 +151,7 @@ public Builder from(OpenAiSpeakProvider other) { } /** + *

    OpenAI TTS model

    *

    OpenAI TTS model

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -162,6 +163,7 @@ public VoiceStage model(@NotNull OpenAiSpeakProviderModel model) { } /** + *

    OpenAI voice

    *

    OpenAI voice

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/OpenAiThinkProvider.java b/src/main/java/com/deepgram/types/OpenAiThinkProvider.java index 01e69a49..18f31223 100644 --- a/src/main/java/com/deepgram/types/OpenAiThinkProvider.java +++ b/src/main/java/com/deepgram/types/OpenAiThinkProvider.java @@ -176,6 +176,7 @@ public Builder from(OpenAiThinkProvider other) { } /** + *

    OpenAI model to use

    *

    OpenAI model to use

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/ReadV1RequestText.java b/src/main/java/com/deepgram/types/ReadV1RequestText.java index e9ce4e0f..326f080b 100644 --- a/src/main/java/com/deepgram/types/ReadV1RequestText.java +++ b/src/main/java/com/deepgram/types/ReadV1RequestText.java @@ -98,6 +98,7 @@ public Builder from(ReadV1RequestText other) { } /** + *

    The plain text to analyze

    *

    The plain text to analyze

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/ReadV1RequestUrl.java b/src/main/java/com/deepgram/types/ReadV1RequestUrl.java index 1125494b..c2825b36 100644 --- a/src/main/java/com/deepgram/types/ReadV1RequestUrl.java +++ b/src/main/java/com/deepgram/types/ReadV1RequestUrl.java @@ -98,6 +98,7 @@ public Builder from(ReadV1RequestUrl other) { } /** + *

    A URL pointing to the text source

    *

    A URL pointing to the text source

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/SpeakV2AcceptedResponse.java b/src/main/java/com/deepgram/types/SpeakV2AcceptedResponse.java index c448c836..cb5f4bcb 100644 --- a/src/main/java/com/deepgram/types/SpeakV2AcceptedResponse.java +++ b/src/main/java/com/deepgram/types/SpeakV2AcceptedResponse.java @@ -98,6 +98,7 @@ public Builder from(SpeakV2AcceptedResponse other) { } /** + *

    Unique identifier for tracking the asynchronous request

    *

    Unique identifier for tracking the asynchronous request

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/UsageBreakdownV1Response.java b/src/main/java/com/deepgram/types/UsageBreakdownV1Response.java index 162530a7..2dec51d0 100644 --- a/src/main/java/com/deepgram/types/UsageBreakdownV1Response.java +++ b/src/main/java/com/deepgram/types/UsageBreakdownV1Response.java @@ -162,6 +162,7 @@ public Builder from(UsageBreakdownV1Response other) { } /** + *

    Start date of the usage period

    *

    Start date of the usage period

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -173,6 +174,7 @@ public EndStage start(@NotNull String start) { } /** + *

    End date of the usage period

    *

    End date of the usage period

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/UsageBreakdownV1ResponseResolution.java b/src/main/java/com/deepgram/types/UsageBreakdownV1ResponseResolution.java index b0b2de66..5372f220 100644 --- a/src/main/java/com/deepgram/types/UsageBreakdownV1ResponseResolution.java +++ b/src/main/java/com/deepgram/types/UsageBreakdownV1ResponseResolution.java @@ -120,6 +120,7 @@ public Builder from(UsageBreakdownV1ResponseResolution other) { } /** + *

    Time unit for the resolution

    *

    Time unit for the resolution

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -131,6 +132,7 @@ public AmountStage units(@NotNull String units) { } /** + *

    Amount of units

    *

    Amount of units

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/main/java/com/deepgram/types/UsageBreakdownV1ResponseResultsItem.java b/src/main/java/com/deepgram/types/UsageBreakdownV1ResponseResultsItem.java index 3b018a5c..e9e94951 100644 --- a/src/main/java/com/deepgram/types/UsageBreakdownV1ResponseResultsItem.java +++ b/src/main/java/com/deepgram/types/UsageBreakdownV1ResponseResultsItem.java @@ -273,6 +273,7 @@ public Builder from(UsageBreakdownV1ResponseResultsItem other) { } /** + *

    Audio hours processed

    *

    Audio hours processed

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -284,6 +285,7 @@ public TotalHoursStage hours(float hours) { } /** + *

    Total hours including all processing

    *

    Total hours including all processing

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -295,6 +297,7 @@ public AgentHoursStage totalHours(float totalHours) { } /** + *

    Agent hours used

    *

    Agent hours used

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -306,6 +309,7 @@ public TokensInStage agentHours(float agentHours) { } /** + *

    Number of input tokens

    *

    Number of input tokens

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -317,6 +321,7 @@ public TokensOutStage tokensIn(double tokensIn) { } /** + *

    Number of output tokens

    *

    Number of output tokens

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -328,6 +333,7 @@ public TtsCharactersStage tokensOut(double tokensOut) { } /** + *

    Number of text-to-speech characters processed

    *

    Number of text-to-speech characters processed

    * @return Reference to {@code this} so that method calls can be chained together. */ @@ -339,6 +345,7 @@ public RequestsStage ttsCharacters(double ttsCharacters) { } /** + *

    Number of requests

    *

    Number of requests

    * @return Reference to {@code this} so that method calls can be chained together. */ diff --git a/src/test/java/com/deepgram/AgentSettingsProviderDefaultTest.java b/src/test/java/com/deepgram/AgentSettingsProviderDefaultTest.java deleted file mode 100644 index a6939000..00000000 --- a/src/test/java/com/deepgram/AgentSettingsProviderDefaultTest.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.deepgram; - -import static org.assertj.core.api.Assertions.assertThat; - -import com.deepgram.core.ObjectMappers; -import com.deepgram.resources.agent.v1.types.AgentV1SettingsAgentContextListen; -import com.deepgram.resources.agent.v1.types.AgentV1SettingsAgentListen; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -/** - * Guards the union default-variant patch on the two agent Settings listen-provider unions (see - * .fernignore): {@code AgentV1SettingsAgentListenProvider} and - * {@code AgentV1SettingsAgentContextListenProvider}. - * - *

    {@code version} is optional on both {@code DeepgramListenProviderV1} and - * {@code DeepgramListenProviderV2}, so a provider object without it is a valid payload. Fern points - * the union's {@code @JsonTypeInfo} {@code defaultImpl} at {@code _UnknownValue}, whose - * {@code @JsonCreator} has an empty body, so such a payload deserialized to an unknown variant - * carrying {@code null}: {@code getV2()} came back empty and re-serializing emitted {@code null}, - * silently dropping the caller's provider. Both are patched to {@code defaultImpl = V2Value}, which - * matches the server's default and keeps them consistent with the UpdateListen union - * ({@link AgentV1UpdateListenShimTest}). - * - *

    These two shipped in 0.7.1 with the defect, so this is a pre-existing bug fix rather than a - * regression guard — but it is the same trade-off, so it is pinned the same way. - */ -public class AgentSettingsProviderDefaultTest { - - private static final String VERSIONLESS = "{\"provider\":{\"type\":\"deepgram\",\"model\":\"nova-3\"}}"; - - @Test - @DisplayName("settings agent.listen: a provider with no \"version\" key parses as V2, not an unknown variant") - void agentListenVersionlessProviderIsV2() throws Exception { - AgentV1SettingsAgentListen listen = - ObjectMappers.JSON_MAPPER.readValue(VERSIONLESS, AgentV1SettingsAgentListen.class); - - assertThat(listen.getProvider()).isPresent(); - assertThat(listen.getProvider().get().isV2()).isTrue(); - assertThat(listen.getProvider().get()._isUnknown()).isFalse(); - assertThat(listen.getProvider().get().getV2()).isPresent(); - assertThat(listen.getProvider().get().getV2().get().getModel()).isEqualTo("nova-3"); - - // and it must survive re-serialization rather than becoming {"provider":null} - String again = ObjectMappers.JSON_MAPPER.writeValueAsString(listen); - assertThat(again).doesNotContain("\"provider\":null"); - assertThat(again).contains("\"model\":\"nova-3\""); - } - - @Test - @DisplayName("settings agent.context.listen: a provider with no \"version\" key parses as V2") - void agentContextListenVersionlessProviderIsV2() throws Exception { - AgentV1SettingsAgentContextListen listen = - ObjectMappers.JSON_MAPPER.readValue(VERSIONLESS, AgentV1SettingsAgentContextListen.class); - - assertThat(listen.getProvider()).isPresent(); - assertThat(listen.getProvider().get().isV2()).isTrue(); - assertThat(listen.getProvider().get()._isUnknown()).isFalse(); - assertThat(listen.getProvider().get().getV2().get().getModel()).isEqualTo("nova-3"); - - String again = ObjectMappers.JSON_MAPPER.writeValueAsString(listen); - assertThat(again).doesNotContain("\"provider\":null"); - assertThat(again).contains("\"model\":\"nova-3\""); - } - - @Test - @DisplayName("an explicit \"version\":\"v1\" still selects the V1 variant on both unions") - void explicitV1StillWins() throws Exception { - String v1 = "{\"provider\":{\"version\":\"v1\",\"type\":\"deepgram\"," - + "\"model\":\"nova-2\",\"language\":\"en\"}}"; - - AgentV1SettingsAgentListen listen = ObjectMappers.JSON_MAPPER.readValue(v1, AgentV1SettingsAgentListen.class); - assertThat(listen.getProvider().get().isV1()).isTrue(); - // note: model is Optional on V1 (required on V2), hence contains() rather than isEqualTo() - assertThat(listen.getProvider().get().getV1().get().getModel()).contains("nova-2"); - - AgentV1SettingsAgentContextListen context = - ObjectMappers.JSON_MAPPER.readValue(v1, AgentV1SettingsAgentContextListen.class); - assertThat(context.getProvider().get().isV1()).isTrue(); - } -} diff --git a/src/test/java/com/deepgram/AgentV1UpdateListenShimTest.java b/src/test/java/com/deepgram/AgentV1UpdateListenShimTest.java deleted file mode 100644 index 6453b7cc..00000000 --- a/src/test/java/com/deepgram/AgentV1UpdateListenShimTest.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.deepgram; - -import static org.assertj.core.api.Assertions.assertThat; - -import com.deepgram.core.ObjectMappers; -import com.deepgram.resources.agent.v1.types.AgentV1UpdateListenListen; -import com.deepgram.resources.agent.v1.types.AgentV1UpdateListenListenProvider; -import com.deepgram.types.DeepgramListenProviderV1; -import com.deepgram.types.DeepgramListenProviderV2; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -/** - * Guards the hand-written back-compat shim on {@code AgentV1UpdateListenListen} (see .fernignore). - * - *

    fern-java-sdk 4.16.0 widened {@code provider} from {@link DeepgramListenProviderV2} to an - * {@link AgentV1UpdateListenListenProvider} (V1|V2) union so UpdateListen can change model/language - * (docs #1066). That return-type change is source-breaking for 0.7.x. The shim keeps the old typed - * API ({@code getProvider()}/{@code provider(V2)}) while exposing the union additively - * ({@code getProviderValue()}/{@code provider(V1)}). These tests lock in both the API surface and - * the outbound JSON shape (UpdateListen is a client-sent message, so serialization is what matters). - */ -public class AgentV1UpdateListenShimTest { - - @Test - @DisplayName("back-compat: provider(V2) builds and getProvider() still returns the V2") - void backCompatV2Api() { - DeepgramListenProviderV2 v2 = - DeepgramListenProviderV2.builder().model("nova-3").build(); - AgentV1UpdateListenListen msg = - AgentV1UpdateListenListen.builder().provider(v2).build(); - - // 0.7.x typed API preserved - assertThat(msg.getProvider()).isEqualTo(v2); - // union exposed additively - assertThat(msg.getProviderValue().isV2()).isTrue(); - assertThat(msg.getProviderValue().getV2()).contains(v2); - } - - @Test - @DisplayName("new: provider(V1) carries the union; getProvider() is null (no V2 present)") - void newV1Api() { - DeepgramListenProviderV1 v1 = DeepgramListenProviderV1.builder() - .model("nova-2") - .language("en") - .build(); - AgentV1UpdateListenListen msg = - AgentV1UpdateListenListen.builder().provider(v1).build(); - - assertThat(msg.getProvider()).isNull(); - assertThat(msg.getProviderValue().isV1()).isTrue(); - assertThat(msg.getProviderValue().getV1()).contains(v1); - } - - @Test - @DisplayName("union setter: provider(union) is accepted directly") - void unionSetter() { - DeepgramListenProviderV2 v2 = - DeepgramListenProviderV2.builder().model("nova-3").build(); - AgentV1UpdateListenListenProvider union = AgentV1UpdateListenListenProvider.v2(v2); - AgentV1UpdateListenListen msg = - AgentV1UpdateListenListen.builder().provider(union).build(); - - assertThat(msg.getProviderValue()).isEqualTo(union); - assertThat(msg.getProvider()).isEqualTo(v2); - } - - @Test - @DisplayName("outbound JSON (V2): provider serializes as the bare V2 object, exactly once") - void serializesV2() throws Exception { - DeepgramListenProviderV2 v2 = - DeepgramListenProviderV2.builder().model("nova-3").build(); - String json = ObjectMappers.JSON_MAPPER.writeValueAsString( - AgentV1UpdateListenListen.builder().provider(v2).build()); - - // exactly one "provider" key (getProvider() must be @JsonIgnore so it doesn't double-emit) - assertThat(json.split("\"provider\"", -1).length - 1).isEqualTo(1); - // provider is the V2 object itself (type=deepgram, model), not wrapped in a variant key - assertThat(json).contains("\"provider\":{").contains("\"model\":\"nova-3\"").contains("\"type\":\"deepgram\""); - // not wrapped in a union-variant key (e.g. {"provider":{"v2":{...}}}); the "v2" that - // appears legitimately is the version value ("version":"v2"), never a key ("v2":) - assertThat(json).doesNotContain("\"v2\":").doesNotContain("\"v1\":"); - } - - @Test - @DisplayName("outbound JSON (V1): provider serializes as the bare V1 object with model/language") - void serializesV1() throws Exception { - DeepgramListenProviderV1 v1 = DeepgramListenProviderV1.builder() - .model("nova-2") - .language("en") - .build(); - String json = ObjectMappers.JSON_MAPPER.writeValueAsString( - AgentV1UpdateListenListen.builder().provider(v1).build()); - - assertThat(json.split("\"provider\"", -1).length - 1).isEqualTo(1); - assertThat(json).contains("\"model\":\"nova-2\"").contains("\"language\":\"en\""); - assertThat(json).doesNotContain("\"v2\":").doesNotContain("\"v1\":"); - } - - @Test - @DisplayName("round-trip: serialize -> deserialize preserves V2 (union discriminates on version)") - void roundTripV2() throws Exception { - DeepgramListenProviderV2 v2 = - DeepgramListenProviderV2.builder().model("nova-3").build(); - AgentV1UpdateListenListen msg = - AgentV1UpdateListenListen.builder().provider(v2).build(); - - String json = ObjectMappers.JSON_MAPPER.writeValueAsString(msg); - AgentV1UpdateListenListen back = ObjectMappers.JSON_MAPPER.readValue(json, AgentV1UpdateListenListen.class); - - assertThat(back.getProviderValue().isV2()).isTrue(); - assertThat(back.getProvider()).isEqualTo(v2); - assertThat(back).isEqualTo(msg); - } - - @Test - @DisplayName("round-trip: serialize -> deserialize preserves V1") - void roundTripV1() throws Exception { - DeepgramListenProviderV1 v1 = DeepgramListenProviderV1.builder() - .model("nova-2") - .language("en") - .build(); - AgentV1UpdateListenListen msg = - AgentV1UpdateListenListen.builder().provider(v1).build(); - - String json = ObjectMappers.JSON_MAPPER.writeValueAsString(msg); - AgentV1UpdateListenListen back = ObjectMappers.JSON_MAPPER.readValue(json, AgentV1UpdateListenListen.class); - - assertThat(back.getProviderValue().isV1()).isTrue(); - assertThat(back).isEqualTo(msg); - } - - @Test - @DisplayName("0.7.x compat: a provider with no \"version\" key parses as V2, not an unknown variant") - void legacyVersionlessProviderParsesAsV2() throws Exception { - // Exactly what 0.7.x emitted and parsed as a V2: "version" is optional on the provider, so - // a version-less object is a valid payload. Fern defaulted a missing discriminator to - // _UnknownValue, whose value was never populated -- getProvider() came back null and - // re-serializing emitted {"provider":null}, silently dropping the caller's provider. - // Patched via defaultImpl = V2Value (see AgentV1UpdateListenListenProvider). - String legacy = "{\"provider\":{\"type\":\"deepgram\",\"model\":\"nova-3\"}}"; - - AgentV1UpdateListenListen back = ObjectMappers.JSON_MAPPER.readValue(legacy, AgentV1UpdateListenListen.class); - - assertThat(back.getProviderValue().isV2()).isTrue(); - assertThat(back.getProviderValue()._isUnknown()).isFalse(); - assertThat(back.getProvider()).isNotNull(); - assertThat(back.getProvider().getModel()).isEqualTo("nova-3"); - - // and it must survive re-serialization rather than becoming {"provider":null} - String again = ObjectMappers.JSON_MAPPER.writeValueAsString(back); - assertThat(again).doesNotContain("\"provider\":null"); - assertThat(again).contains("\"model\":\"nova-3\""); - } - - @Test - @DisplayName("forward-compat: an unrecognized \"version\" coerces to V2 rather than losing the provider") - void unknownVersionCoercesToV2() throws Exception { - // Jackson applies defaultImpl for an absent OR unrecognized discriminator, so a future - // "v3" lands on V2 and re-serializes as "v2". Deliberate: this message is client-sent, and - // preserving the provider beats dropping it (the old behaviour returned null and threw - // from _getUnknown()). Locking this in so the trade-off is not silently reverted. - String future = "{\"provider\":{\"version\":\"v3\",\"type\":\"deepgram\",\"model\":\"nova-9\"}}"; - - AgentV1UpdateListenListen back = ObjectMappers.JSON_MAPPER.readValue(future, AgentV1UpdateListenListen.class); - - assertThat(back.getProvider()).isNotNull(); - assertThat(back.getProvider().getModel()).isEqualTo("nova-9"); - assertThat(ObjectMappers.JSON_MAPPER.writeValueAsString(back)).doesNotContain("\"provider\":null"); - } -} diff --git a/src/test/java/com/deepgram/RegenTypesTest.java b/src/test/java/com/deepgram/RegenTypesTest.java index 37293508..9b8d76c5 100644 --- a/src/test/java/com/deepgram/RegenTypesTest.java +++ b/src/test/java/com/deepgram/RegenTypesTest.java @@ -12,7 +12,6 @@ import com.deepgram.resources.agent.v1.types.AgentV1ThinkUpdated; import com.deepgram.resources.agent.v1.types.AgentV1UserStartedSpeaking; import com.deepgram.resources.listen.v2.types.ListenV2CloseStream; -import com.deepgram.resources.listen.v2.types.ListenV2ForceEndTurn; import com.deepgram.resources.listen.v2.types.ListenV2TurnInfoWordsItem; import com.deepgram.resources.speak.v2.types.SpeakV2Close; import com.deepgram.resources.speak.v2.types.SpeakV2Flush; @@ -110,7 +109,6 @@ void equalsHashCodeContract() { // Each type generates equals() (all instances equal) but no hashCode(); we patch a // consistent hashCode(). Two freshly-built instances must be equal AND share a hash. assertContract(SpeakV2Close.builder().build(), SpeakV2Close.builder().build()); - assertContract(ListenV2ForceEndTurn.builder().build(), ListenV2ForceEndTurn.builder().build()); assertContract(SpeakV2Flush.builder().build(), SpeakV2Flush.builder().build()); assertContract(AgentV1ListenUpdated.builder().build(), AgentV1ListenUpdated.builder().build()); assertContract(AgentV1SpeakUpdated.builder().build(), AgentV1SpeakUpdated.builder().build());