From a40750a3d75d0316e5c112e5139e92287ee15894 Mon Sep 17 00:00:00 2001 From: Greg Holmes Date: Tue, 21 Apr 2026 16:00:41 +0100 Subject: [PATCH 1/5] chore: initialize SDK regeneration branch From 8e10745b6f3436a6a20b080c6905ab8d7e8d6a7e Mon Sep 17 00:00:00 2001 From: Greg Holmes Date: Tue, 21 Apr 2026 16:02:44 +0100 Subject: [PATCH 2/5] chore: unfreeze files pending regen --- .fernignore | 2 +- .../com/deepgram/core/ClientOptions.java.bak | 241 ++++++++++++++++++ 2 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/deepgram/core/ClientOptions.java.bak diff --git a/.fernignore b/.fernignore index 61a3aea..1470181 100644 --- a/.fernignore +++ b/.fernignore @@ -14,7 +14,7 @@ src/main/java/com/deepgram/AsyncDeepgramClientBuilder.java # 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 +src/main/java/com/deepgram/core/ClientOptions.java.bak # Transport abstraction (pluggable transport for SageMaker, etc.) src/main/java/com/deepgram/core/transport/ diff --git a/src/main/java/com/deepgram/core/ClientOptions.java.bak b/src/main/java/com/deepgram/core/ClientOptions.java.bak new file mode 100644 index 0000000..c2e4ff8 --- /dev/null +++ b/src/main/java/com/deepgram/core/ClientOptions.java.bak @@ -0,0 +1,241 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.core; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; +import okhttp3.OkHttpClient; + +public final class ClientOptions { + private final Environment environment; + + private final Map headers; + + private final Map> headerSuppliers; + + private final OkHttpClient httpClient; + + private final int timeout; + + private final int maxRetries; + + private final Optional webSocketFactory; + + private final Optional logging; + + private ClientOptions( + Environment environment, + Map headers, + Map> headerSuppliers, + OkHttpClient httpClient, + int timeout, + int maxRetries, + Optional webSocketFactory, + Optional logging) { + this.environment = environment; + this.headers = new HashMap<>(); + this.headers.putAll(headers); + this.headers.putAll(new HashMap() { + { + put("User-Agent", "com.deepgram:deepgram-java-sdk/0.2.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", "0.2.1"); // x-release-please-version + } + }); + this.headerSuppliers = headerSuppliers; + this.httpClient = httpClient; + this.timeout = timeout; + this.maxRetries = maxRetries; + this.webSocketFactory = webSocketFactory; + this.logging = logging; + } + + public Environment environment() { + return this.environment; + } + + public Map headers(RequestOptions requestOptions) { + Map values = new HashMap<>(this.headers); + headerSuppliers.forEach((key, supplier) -> { + values.put(key, supplier.get()); + }); + if (requestOptions != null) { + values.putAll(requestOptions.getHeaders()); + } + return values; + } + + public int timeout(RequestOptions requestOptions) { + if (requestOptions == null) { + return this.timeout; + } + return requestOptions.getTimeout().orElse(this.timeout); + } + + public OkHttpClient httpClient() { + return this.httpClient; + } + + public OkHttpClient httpClientWithTimeout(RequestOptions requestOptions) { + if (requestOptions == null) { + return this.httpClient; + } + return this.httpClient + .newBuilder() + .callTimeout(requestOptions.getTimeout().get(), requestOptions.getTimeoutTimeUnit()) + .connectTimeout(0, TimeUnit.SECONDS) + .writeTimeout(0, TimeUnit.SECONDS) + .readTimeout(0, TimeUnit.SECONDS) + .build(); + } + + public int maxRetries() { + return this.maxRetries; + } + + public Optional webSocketFactory() { + return this.webSocketFactory; + } + + public Optional logging() { + return this.logging; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Environment environment; + + private final Map headers = new HashMap<>(); + + private final Map> headerSuppliers = new HashMap<>(); + + private int maxRetries = 2; + + private Optional timeout = Optional.empty(); + + private OkHttpClient httpClient = null; + + private Optional logging = Optional.empty(); + + private Optional webSocketFactory = Optional.empty(); + + public Builder environment(Environment environment) { + this.environment = environment; + return this; + } + + public Builder addHeader(String key, String value) { + this.headers.put(key, value); + return this; + } + + public Builder addHeader(String key, Supplier value) { + this.headerSuppliers.put(key, value); + return this; + } + + /** + * Override the timeout in seconds. Defaults to 60 seconds. + */ + public Builder timeout(int timeout) { + this.timeout = Optional.of(timeout); + return this; + } + + /** + * Override the timeout in seconds. Defaults to 60 seconds. + */ + public Builder timeout(Optional timeout) { + this.timeout = timeout; + return this; + } + + /** + * Override the maximum number of retries. Defaults to 2 retries. + */ + public Builder maxRetries(int maxRetries) { + this.maxRetries = maxRetries; + return this; + } + + public Builder httpClient(OkHttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Set a custom WebSocketFactory for creating WebSocket connections. + */ + public Builder webSocketFactory(WebSocketFactory webSocketFactory) { + this.webSocketFactory = Optional.of(webSocketFactory); + return this; + } + + /** + * Configure logging for the SDK. Silent by default — no log output unless explicitly configured. + */ + public Builder logging(LogConfig logging) { + this.logging = Optional.of(logging); + return this; + } + + public ClientOptions build() { + OkHttpClient.Builder httpClientBuilder = + this.httpClient != null ? this.httpClient.newBuilder() : new OkHttpClient.Builder(); + + if (this.httpClient != null) { + timeout.ifPresent(timeout -> httpClientBuilder + .callTimeout(timeout, TimeUnit.SECONDS) + .connectTimeout(0, TimeUnit.SECONDS) + .writeTimeout(0, TimeUnit.SECONDS) + .readTimeout(0, TimeUnit.SECONDS)); + } else { + httpClientBuilder + .callTimeout(this.timeout.orElse(60), TimeUnit.SECONDS) + .connectTimeout(0, TimeUnit.SECONDS) + .writeTimeout(0, TimeUnit.SECONDS) + .readTimeout(0, TimeUnit.SECONDS) + .addInterceptor(new RetryInterceptor(this.maxRetries)); + } + + Logger logger = Logger.from(this.logging); + httpClientBuilder.addInterceptor(new LoggingInterceptor(logger)); + + this.httpClient = httpClientBuilder.build(); + this.timeout = Optional.of(httpClient.callTimeoutMillis() / 1000); + + return new ClientOptions( + environment, + headers, + headerSuppliers, + httpClient, + this.timeout.get(), + this.maxRetries, + this.webSocketFactory, + this.logging); + } + + /** + * Create a new Builder initialized with values from an existing ClientOptions + */ + public static Builder from(ClientOptions clientOptions) { + Builder builder = new Builder(); + builder.environment = clientOptions.environment(); + builder.timeout = Optional.of(clientOptions.timeout(null)); + builder.httpClient = clientOptions.httpClient(); + builder.headers.putAll(clientOptions.headers); + builder.headerSuppliers.putAll(clientOptions.headerSuppliers); + builder.maxRetries = clientOptions.maxRetries(); + builder.logging = clientOptions.logging(); + return builder; + } + } +} From 6cceb433b30ed3bd11857ad9cff7062a1118446f Mon Sep 17 00:00:00 2001 From: Greg Holmes Date: Tue, 21 Apr 2026 16:18:28 +0100 Subject: [PATCH 3/5] chore(repo): ignore agent docs and Claude skills in fern regen --- .fernignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.fernignore b/.fernignore index 1470181..7b3c9e5 100644 --- a/.fernignore +++ b/.fernignore @@ -46,5 +46,10 @@ examples/ .github/ .gitignore +# Agent files +AGENTS.md +CLAUDE.md +.claude/ + # Build output target/ From 4ce0e90b5b156cd8ee2667eefeae8bfce25d0478 Mon Sep 17 00:00:00 2001 From: Greg Holmes Date: Wed, 22 Apr 2026 09:24:45 +0100 Subject: [PATCH 4/5] chore(regen): automate ClientOptions patch reapply --- .claude/scripts/fix_clientoptions.py | 111 +++++++++++++++++++++++++++ .claude/skills/review-regen.md | 2 +- AGENTS.md | 4 +- 3 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 .claude/scripts/fix_clientoptions.py diff --git a/.claude/scripts/fix_clientoptions.py b/.claude/scripts/fix_clientoptions.py new file mode 100644 index 0000000..644c4ab --- /dev/null +++ b/.claude/scripts/fix_clientoptions.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python3 + +import json +import re +import sys +from pathlib import Path + + +CLIENT_OPTIONS_PATH = Path("src/main/java/com/deepgram/core/ClientOptions.java") +CLIENT_OPTIONS_BAK_PATH = Path("src/main/java/com/deepgram/core/ClientOptions.java.bak") +BUILD_GRADLE_PATH = Path("build.gradle") +METADATA_PATH = Path(".fern/metadata.json") +SDK_NAME = "com.deepgram:deepgram-java-sdk" + + +def load_sdk_version(text: str) -> str: + if CLIENT_OPTIONS_BAK_PATH.exists(): + bak_text = CLIENT_OPTIONS_BAK_PATH.read_text() + match = re.search(r'put\("X-Fern-SDK-Version",\s*"([^"]+)"\)', bak_text) + if match: + return match.group(1) + + match = re.search(r'put\("User-Agent",\s*"[^"]*/([^"]+)"\)', bak_text) + if match: + return match.group(1) + + if BUILD_GRADLE_PATH.exists(): + build_gradle = BUILD_GRADLE_PATH.read_text() + match = re.search(r"^version\s*=\s*'([^']+)'", build_gradle, re.MULTILINE) + if match: + return match.group(1) + + match = re.search(r'put\("X-Fern-SDK-Version",\s*"([^"]+)"\)', text) + if match: + return match.group(1) + + match = re.search(r'put\("User-Agent",\s*"[^"]*/([^"]+)"\)', text) + if match: + return match.group(1) + + if METADATA_PATH.exists(): + metadata = json.loads(METADATA_PATH.read_text()) + sdk_version = metadata.get("sdkVersion") + if sdk_version: + return sdk_version + + raise RuntimeError("Unable to determine SDK version for ClientOptions.java") + + +def replace_header_line( + text: str, key: str, value: str, add_release_please: bool +) -> str: + pattern = re.compile( + rf'^(?P\s*)put\("{re.escape(key)}",\s*"[^"]*"\);(?:\s*// x-release-please-version)?\s*$', + re.MULTILINE, + ) + + def repl(match: re.Match[str]) -> str: + suffix = " // x-release-please-version" if add_release_please else "" + return f'{match.group("indent")}put("{key}", "{value}");{suffix}' + + updated_text, count = pattern.subn(repl, text, count=1) + if count != 1: + raise RuntimeError(f"Unable to locate header line for {key}") + return updated_text + + +def main() -> int: + if not CLIENT_OPTIONS_PATH.exists(): + raise RuntimeError(f"File not found: {CLIENT_OPTIONS_PATH}") + + original_text = CLIENT_OPTIONS_PATH.read_text() + sdk_version = load_sdk_version(original_text) + + updated_text = original_text + updated_text = replace_header_line( + updated_text, + "User-Agent", + f"{SDK_NAME}/{sdk_version}", + add_release_please=True, + ) + updated_text = replace_header_line( + updated_text, + "X-Fern-SDK-Name", + SDK_NAME, + add_release_please=False, + ) + updated_text = replace_header_line( + updated_text, + "X-Fern-SDK-Version", + sdk_version, + add_release_please=True, + ) + + if updated_text != original_text: + CLIENT_OPTIONS_PATH.write_text(updated_text) + print(f"Updated {CLIENT_OPTIONS_PATH} to {SDK_NAME}/{sdk_version}") + else: + print( + f"{CLIENT_OPTIONS_PATH} already has the expected Deepgram header constants" + ) + + return 0 + + +if __name__ == "__main__": + try: + raise SystemExit(main()) + except Exception as exc: + print(f"Error: {exc}", file=sys.stderr) + raise SystemExit(1) diff --git a/.claude/skills/review-regen.md b/.claude/skills/review-regen.md index af9c8c4..d9e35df 100644 --- a/.claude/skills/review-regen.md +++ b/.claude/skills/review-regen.md @@ -14,7 +14,7 @@ Read AGENTS.md for full context on the regeneration workflow and freeze classifi - Patches still needed (must be re-applied) - New changes from the generator worth noting 5. Wait for user direction on which patches to re-apply. -6. Re-apply confirmed patches to the generated files. +6. Re-apply confirmed patches to the generated files. If `src/main/java/com/deepgram/core/ClientOptions.java` was regenerated, run `python3 .claude/scripts/fix_clientoptions.py` to restore the Deepgram SDK header constants and `// x-release-please-version` markers. 7. In `.fernignore`, replace each `.bak` path back to the original path for files that still need patches. 8. Remove `.fernignore` entries entirely for files where patches are no longer needed. 9. Delete all `.bak` files. diff --git a/AGENTS.md b/AGENTS.md index 00ce830..e48874b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,7 +47,7 @@ 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 +- `src/main/java/com/deepgram/core/ClientOptions.java` - preserves release-please version markers and correct SDK header constants that Fern currently overwrites; re-apply with `python3 .claude/scripts/fix_clientoptions.py` during review regen ### Prepare repo for regeneration @@ -66,7 +66,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`, run `python3 .claude/scripts/fix_clientoptions.py` to restore 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. From 497ea08b51d5420e924afb310dd4e5fc33d485a1 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:19:14 +0000 Subject: [PATCH 5/5] SDK regeneration --- .fern/metadata.json | 12 +- context7.json | 4 - .../com/deepgram/AsyncDeepgramApiClient.java | 8 + .../java/com/deepgram/DeepgramApiClient.java | 8 + .../java/com/deepgram/core/ClientOptions.java | 6 +- .../com/deepgram/core/RetryInterceptor.java | 9 +- .../v1/types/AgentV1ConversationTextRole.java | 12 +- ...entV1FunctionCallRequestFunctionsItem.java | 58 +- ...gsAgentContextMessagesItemContentRole.java | 14 +- ...gesItemFunctionCallsFunctionCallsItem.java | 51 +- .../v1/types/AgentV1SettingsAgentSpeak.java | 18 +- .../AgentV1SettingsAgentSpeakEndpoint.java | 168 ---- ...tV1SettingsAgentSpeakEndpointEndpoint.java | 135 ---- ...ngsAgentSpeakEndpointProviderAwsPolly.java | 262 ------ ...akEndpointProviderAwsPollyCredentials.java | 240 ------ ...dpointProviderAwsPollyCredentialsType.java | 87 -- ...ntSpeakEndpointProviderAwsPollyEngine.java | 109 --- ...entSpeakEndpointProviderAwsPollyVoice.java | 152 ---- ...tSpeakEndpointProviderCartesiaModelId.java | 88 -- ...entSpeakEndpointProviderCartesiaVoice.java | 164 ---- ...entSpeakEndpointProviderDeepgramModel.java | 757 ------------------ ...peakEndpointProviderElevenLabsModelId.java | 100 --- ...tingsAgentSpeakEndpointProviderOpenAi.java | 210 ----- ...AgentSpeakEndpointProviderOpenAiModel.java | 86 -- ...AgentSpeakEndpointProviderOpenAiVoice.java | 130 --- .../AgentV1SettingsAgentSpeakOneItem.java | 168 ---- ...ntV1SettingsAgentSpeakOneItemEndpoint.java | 135 ---- ...ingsAgentSpeakOneItemProviderAwsPolly.java | 262 ------ ...eakOneItemProviderAwsPollyCredentials.java | 240 ------ ...neItemProviderAwsPollyCredentialsType.java | 87 -- ...entSpeakOneItemProviderAwsPollyEngine.java | 108 --- ...gentSpeakOneItemProviderAwsPollyVoice.java | 152 ---- ...ntSpeakOneItemProviderCartesiaModelId.java | 87 -- ...gentSpeakOneItemProviderCartesiaVoice.java | 164 ---- ...gentSpeakOneItemProviderDeepgramModel.java | 757 ------------------ ...SpeakOneItemProviderElevenLabsModelId.java | 100 --- ...ttingsAgentSpeakOneItemProviderOpenAi.java | 210 ----- ...sAgentSpeakOneItemProviderOpenAiModel.java | 86 -- ...sAgentSpeakOneItemProviderOpenAiVoice.java | 130 --- .../v1/types/AgentV1SettingsAgentThink.java | 9 +- .../AgentV1SettingsAgentThinkOneItem.java | 270 ------- ...ntV1SettingsAgentThinkOneItemProvider.java | 138 ---- .../v1/types/AgentV1SettingsAudioInput.java | 12 +- .../AgentV1SettingsAudioInputEncoding.java | 14 +- .../v1/types/AgentV1SettingsAudioOutput.java | 24 +- .../agent/v1/types/AgentV1ThinkUpdated.java | 78 ++ .../v1/types/AgentV1UpdateSpeakSpeak.java | 18 +- .../AgentV1UpdateSpeakSpeakEndpoint.java | 168 ---- ...entV1UpdateSpeakSpeakEndpointEndpoint.java | 135 ---- ...entV1UpdateSpeakSpeakEndpointProvider.java | 403 ---------- ...ateSpeakSpeakEndpointProviderAwsPolly.java | 262 ------ ...akEndpointProviderAwsPollyCredentials.java | 240 ------ ...akSpeakEndpointProviderAwsPollyEngine.java | 108 --- ...eakSpeakEndpointProviderAwsPollyVoice.java | 152 ---- ...ateSpeakSpeakEndpointProviderCartesia.java | 245 ------ ...kSpeakEndpointProviderCartesiaModelId.java | 86 -- ...eakSpeakEndpointProviderCartesiaVoice.java | 164 ---- ...ateSpeakSpeakEndpointProviderDeepgram.java | 176 ---- ...eakSpeakEndpointProviderDeepgramModel.java | 757 ------------------ ...eSpeakSpeakEndpointProviderElevenLabs.java | 264 ------ ...peakEndpointProviderElevenLabsModelId.java | 100 --- ...pdateSpeakSpeakEndpointProviderOpenAi.java | 210 ----- ...SpeakSpeakEndpointProviderOpenAiModel.java | 86 -- ...SpeakSpeakEndpointProviderOpenAiVoice.java | 130 --- .../types/AgentV1UpdateSpeakSpeakOneItem.java | 168 ---- ...gentV1UpdateSpeakSpeakOneItemProvider.java | 403 ---------- ...dateSpeakSpeakOneItemProviderAwsPolly.java | 261 ------ ...dateSpeakSpeakOneItemProviderCartesia.java | 245 ------ ...dateSpeakSpeakOneItemProviderDeepgram.java | 176 ---- ...teSpeakSpeakOneItemProviderElevenLabs.java | 264 ------ ...UpdateSpeakSpeakOneItemProviderOpenAi.java | 210 ----- .../agent/v1/types/AgentV1UpdateThink.java | 126 +++ .../v1/types/AgentV1UpdateThinkThink.java | 98 +++ .../resources/agent/v1/types/Cartesia.java | 243 ------ .../resources/agent/v1/types/Deepgram.java | 175 ---- .../resources/agent/v1/types/ElevenLabs.java | 262 ------ .../agent/v1/websocket/V1WebSocketClient.java | 29 + .../listen/v1/media/AsyncRawMediaClient.java | 216 ++--- .../listen/v1/media/RawMediaClient.java | 216 ++--- .../types/MediaTranscribeRequestModel.java | 166 ++-- .../v1/types/ListenV1CloseStreamType.java | 12 +- .../listen/v1/types/ListenV1FinalizeType.java | 12 +- .../v1/types/ListenV1KeepAliveType.java | 12 +- .../listen/v1/types/ListenV1Metadata.java | 12 +- .../listen/v1/types/ListenV1Results.java | 20 +- ...sultsChannelAlternativesItemWordsItem.java | 16 +- .../v1/types/ListenV1SpeechStarted.java | 20 +- .../listen/v1/types/ListenV1UtteranceEnd.java | 20 +- .../v2/types/ListenV2CloseStreamType.java | 12 +- .../listen/v2/types/ListenV2Configure.java | 183 +++++ .../v2/types/ListenV2ConfigureFailure.java | 178 ++++ .../v2/types/ListenV2ConfigureSuccess.java | 247 ++++++ .../ListenV2ConfigureSuccessThresholds.java | 160 ++++ .../v2/types/ListenV2ConfigureThresholds.java | 158 ++++ .../listen/v2/types/ListenV2Connected.java | 12 +- .../listen/v2/types/ListenV2FatalError.java | 12 +- .../listen/v2/types/ListenV2TurnInfo.java | 131 ++- .../listen/v2/websocket/V2ConnectOptions.java | 13 +- .../v2/websocket/V2WebSocketClient.java | 48 ++ .../types/RequestsListRequestEndpoint.java | 12 +- .../types/RequestsListRequestStatus.java | 12 +- .../types/BreakdownGetRequestEndpoint.java | 12 +- .../types/BreakdownGetRequestGrouping.java | 26 +- .../usage/types/UsageGetRequestEndpoint.java | 12 +- .../read/v1/text/AsyncRawTextClient.java | 24 +- .../resources/read/v1/text/RawTextClient.java | 24 +- ...ionCredentialsCreateRequestScopesItem.java | 68 +- .../speak/v1/audio/AsyncRawAudioClient.java | 6 +- .../speak/v1/audio/RawAudioClient.java | 6 +- .../types/AudioGenerateRequestEncoding.java | 12 +- .../types/AudioGenerateRequestModel.java | 628 +++++++-------- .../speak/v1/types/SpeakV1Cleared.java | 12 +- .../speak/v1/types/SpeakV1Flushed.java | 12 +- .../voiceagent/AsyncVoiceAgentClient.java | 32 + .../voiceagent/VoiceAgentClient.java | 32 + .../AsyncConfigurationsClient.java | 110 +++ .../AsyncRawConfigurationsClient.java | 417 ++++++++++ .../configurations/ConfigurationsClient.java | 105 +++ .../RawConfigurationsClient.java | 339 ++++++++ .../CreateAgentConfigurationV1Request.java | 217 +++++ .../UpdateAgentMetadataV1Request.java | 121 +++ .../variables/AsyncRawVariablesClient.java | 413 ++++++++++ .../variables/AsyncVariablesClient.java | 107 +++ .../variables/RawVariablesClient.java | 333 ++++++++ .../voiceagent/variables/VariablesClient.java | 104 +++ .../CreateAgentVariableV1Request.java | 195 +++++ .../UpdateAgentVariableV1Request.java | 117 +++ .../deepgram/types/AgentConfigurationV1.java | 324 ++++++++ ...ThinkModelsV1ResponseModelsItemZeroId.java | 38 +- .../com/deepgram/types/AgentVariableV1.java | 279 +++++++ .../java/com/deepgram/types/Anthropic.java | 213 ++++- .../types/AnthropicThinkProviderModel.java | 86 ++ .../types/AwsBedrockThinkProvider.java | 217 ++++- .../AwsBedrockThinkProviderCredentials.java | 235 ++++++ ...sBedrockThinkProviderCredentialsType.java} | 23 +- .../types/AwsBedrockThinkProviderModel.java | 88 ++ .../deepgram/types/AwsPollySpeakProvider.java | 256 +++++- .../AwsPollySpeakProviderCredentials.java} | 35 +- ...AwsPollySpeakProviderCredentialsType.java} | 23 +- .../AwsPollySpeakProviderEngine.java} | 37 +- .../AwsPollySpeakProviderVoice.java} | 54 +- .../java/com/deepgram/types/Cartesia.java | 282 ++++++- .../CartesiaSpeakProviderModelId.java} | 29 +- .../CartesiaSpeakProviderVoice.java} | 24 +- .../CreateAgentConfigurationV1Response.java | 236 ++++++ .../java/com/deepgram/types/Deepgram.java | 213 ++++- .../DeepgramSpeakProviderModel.java} | 642 +++++++-------- .../types/ElevenLabsSpeakProvider.java | 260 +++++- .../ElevenLabsSpeakProviderModelId.java} | 29 +- src/main/java/com/deepgram/types/Google.java | 213 ++++- .../types/GoogleThinkProviderModel.java | 97 +++ src/main/java/com/deepgram/types/Groq.java | 143 +++- .../ListAgentConfigurationsV1Response.java | 113 +++ .../types/ListAgentVariablesV1Response.java | 113 +++ ...illingFieldsV1ResponseDeploymentsItem.java | 14 +- .../types/ListenV1CallbackMethod.java | 12 +- .../com/deepgram/types/ListenV1Encoding.java | 12 +- .../com/deepgram/types/ListenV1Model.java | 146 ++-- .../com/deepgram/types/ListenV1Redact.java | 12 +- .../types/ListenV1ResponseMetadata.java | 12 +- .../ListenV1ResponseMetadataIntentsInfo.java | 24 +- ...ListenV1ResponseMetadataSentimentInfo.java | 24 +- .../ListenV1ResponseMetadataSummaryInfo.java | 24 +- .../ListenV1ResponseMetadataTopicsInfo.java | 24 +- ...ernativesItemParagraphsParagraphsItem.java | 24 +- ...ListenV1ResponseResultsUtterancesItem.java | 24 +- ...esponseResultsUtterancesItemWordsItem.java | 12 +- .../com/deepgram/types/ListenV2Model.java | 84 ++ .../deepgram/types/OpenAiSpeakProvider.java | 206 ++++- .../OpenAiSpeakProviderModel.java} | 20 +- .../OpenAiSpeakProviderVoice.java} | 40 +- .../deepgram/types/OpenAiThinkProvider.java | 214 ++++- .../types/OpenAiThinkProviderModel.java | 147 ++++ ...V1ResponseMetadataMetadataIntentsInfo.java | 24 +- ...ResponseMetadataMetadataSentimentInfo.java | 24 +- ...V1ResponseMetadataMetadataSummaryInfo.java | 24 +- ...dV1ResponseMetadataMetadataTopicsInfo.java | 24 +- .../com/deepgram/types/SpeakSettingsV1.java | 160 +++- .../SpeakSettingsV1Endpoint.java} | 19 +- .../SpeakSettingsV1Provider.java} | 67 +- .../java/com/deepgram/types/SpeakV1Model.java | 504 ++++++------ .../com/deepgram/types/SpeakV1SampleRate.java | 12 +- .../com/deepgram/types/ThinkSettingsV1.java | 188 ++++- .../ThinkSettingsV1ContextLength.java} | 33 +- .../ThinkSettingsV1Endpoint.java} | 19 +- .../ThinkSettingsV1FunctionsItem.java} | 32 +- ...ThinkSettingsV1FunctionsItemEndpoint.java} | 21 +- .../ThinkSettingsV1Provider.java} | 191 +++-- 188 files changed, 10323 insertions(+), 14263 deletions(-) delete mode 100644 context7.json delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpoint.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointEndpoint.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPolly.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAi.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItem.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemEndpoint.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAi.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItem.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemProvider.java create mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ThinkUpdated.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpoint.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointEndpoint.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProvider.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesia.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderDeepgram.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAi.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItem.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProvider.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesia.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderDeepgram.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAi.java create mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateThink.java create mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateThinkThink.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/Cartesia.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/Deepgram.java delete mode 100644 src/main/java/com/deepgram/resources/agent/v1/types/ElevenLabs.java create mode 100644 src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Configure.java create mode 100644 src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java create mode 100644 src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccess.java create mode 100644 src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccessThresholds.java create mode 100644 src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureThresholds.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/AsyncVoiceAgentClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/VoiceAgentClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncConfigurationsClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncRawConfigurationsClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/configurations/ConfigurationsClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/configurations/RawConfigurationsClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/configurations/requests/CreateAgentConfigurationV1Request.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/configurations/requests/UpdateAgentMetadataV1Request.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/variables/AsyncRawVariablesClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/variables/AsyncVariablesClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/variables/RawVariablesClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/variables/VariablesClient.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/variables/requests/CreateAgentVariableV1Request.java create mode 100644 src/main/java/com/deepgram/resources/voiceagent/variables/requests/UpdateAgentVariableV1Request.java create mode 100644 src/main/java/com/deepgram/types/AgentConfigurationV1.java create mode 100644 src/main/java/com/deepgram/types/AgentVariableV1.java create mode 100644 src/main/java/com/deepgram/types/AnthropicThinkProviderModel.java create mode 100644 src/main/java/com/deepgram/types/AwsBedrockThinkProviderCredentials.java rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType.java => types/AwsBedrockThinkProviderCredentialsType.java} (56%) create mode 100644 src/main/java/com/deepgram/types/AwsBedrockThinkProviderModel.java rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials.java => types/AwsPollySpeakProviderCredentials.java} (80%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType.java => types/AwsPollySpeakProviderCredentialsType.java} (56%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine.java => types/AwsPollySpeakProviderEngine.java} (57%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice.java => types/AwsPollySpeakProviderVoice.java} (54%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId.java => types/CartesiaSpeakProviderModelId.java} (60%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice.java => types/CartesiaSpeakProviderVoice.java} (79%) create mode 100644 src/main/java/com/deepgram/types/CreateAgentConfigurationV1Response.java rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel.java => types/DeepgramSpeakProviderModel.java} (52%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId.java => types/ElevenLabsSpeakProviderModelId.java} (57%) create mode 100644 src/main/java/com/deepgram/types/GoogleThinkProviderModel.java create mode 100644 src/main/java/com/deepgram/types/ListAgentConfigurationsV1Response.java create mode 100644 src/main/java/com/deepgram/types/ListAgentVariablesV1Response.java create mode 100644 src/main/java/com/deepgram/types/ListenV2Model.java rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel.java => types/OpenAiSpeakProviderModel.java} (60%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice.java => types/OpenAiSpeakProviderVoice.java} (56%) create mode 100644 src/main/java/com/deepgram/types/OpenAiThinkProviderModel.java rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemEndpoint.java => types/SpeakSettingsV1Endpoint.java} (84%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.java => types/SpeakSettingsV1Provider.java} (78%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemContextLength.java => types/ThinkSettingsV1ContextLength.java} (66%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemEndpoint.java => types/ThinkSettingsV1Endpoint.java} (83%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemFunctionsItem.java => types/ThinkSettingsV1FunctionsItem.java} (79%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint.java => types/ThinkSettingsV1FunctionsItemEndpoint.java} (83%) rename src/main/java/com/deepgram/{resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.java => types/ThinkSettingsV1Provider.java} (57%) diff --git a/.fern/metadata.json b/.fern/metadata.json index 624f954..b217d82 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { - "cliVersion": "4.46.0", + "cliVersion": "4.87.0", "generatorName": "fernapi/fern-java-sdk", - "generatorVersion": "4.0.4", + "generatorVersion": "4.4.0", "generatorConfig": { "package-prefix": "com.deepgram", "base-api-exception-class-name": "DeepgramHttpException", @@ -11,6 +11,10 @@ }, "enable-wire-tests": true }, - "originGitCommit": "e994b5ab79ae6fe3560daff055acdf80d315b48e", - "sdkVersion": "0.2.1" + "originGitCommit": "4730eb7243c9cfe73f3fceb335f2369ea17c8d45", + "originGitCommitIsDirty": true, + "invokedBy": "manual", + "requestedVersion": null, + "ciProvider": null, + "sdkVersion": "0.2.2" } \ No newline at end of file diff --git a/context7.json b/context7.json deleted file mode 100644 index 82e37f0..0000000 --- a/context7.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "url": "https://context7.com/deepgram/deepgram-java-sdk", - "public_key": "pk_hu7APZeIXQ14hNyaCBm0A" -} diff --git a/src/main/java/com/deepgram/AsyncDeepgramApiClient.java b/src/main/java/com/deepgram/AsyncDeepgramApiClient.java index d504345..19ed0cb 100644 --- a/src/main/java/com/deepgram/AsyncDeepgramApiClient.java +++ b/src/main/java/com/deepgram/AsyncDeepgramApiClient.java @@ -12,6 +12,7 @@ import com.deepgram.resources.read.AsyncReadClient; import com.deepgram.resources.selfhosted.AsyncSelfHostedClient; import com.deepgram.resources.speak.AsyncSpeakClient; +import com.deepgram.resources.voiceagent.AsyncVoiceAgentClient; import java.util.function.Supplier; public class AsyncDeepgramApiClient { @@ -31,6 +32,8 @@ public class AsyncDeepgramApiClient { protected final Supplier speakClient; + protected final Supplier voiceAgentClient; + public AsyncDeepgramApiClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.agentClient = Suppliers.memoize(() -> new AsyncAgentClient(clientOptions)); @@ -40,6 +43,7 @@ public AsyncDeepgramApiClient(ClientOptions clientOptions) { this.readClient = Suppliers.memoize(() -> new AsyncReadClient(clientOptions)); this.selfHostedClient = Suppliers.memoize(() -> new AsyncSelfHostedClient(clientOptions)); this.speakClient = Suppliers.memoize(() -> new AsyncSpeakClient(clientOptions)); + this.voiceAgentClient = Suppliers.memoize(() -> new AsyncVoiceAgentClient(clientOptions)); } public AsyncAgentClient agent() { @@ -70,6 +74,10 @@ public AsyncSpeakClient speak() { return this.speakClient.get(); } + public AsyncVoiceAgentClient voiceAgent() { + return this.voiceAgentClient.get(); + } + public static AsyncDeepgramApiClientBuilder builder() { return new AsyncDeepgramApiClientBuilder(); } diff --git a/src/main/java/com/deepgram/DeepgramApiClient.java b/src/main/java/com/deepgram/DeepgramApiClient.java index b62f6a7..d341ccd 100644 --- a/src/main/java/com/deepgram/DeepgramApiClient.java +++ b/src/main/java/com/deepgram/DeepgramApiClient.java @@ -12,6 +12,7 @@ import com.deepgram.resources.read.ReadClient; import com.deepgram.resources.selfhosted.SelfHostedClient; import com.deepgram.resources.speak.SpeakClient; +import com.deepgram.resources.voiceagent.VoiceAgentClient; import java.util.function.Supplier; public class DeepgramApiClient { @@ -31,6 +32,8 @@ public class DeepgramApiClient { protected final Supplier speakClient; + protected final Supplier voiceAgentClient; + public DeepgramApiClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.agentClient = Suppliers.memoize(() -> new AgentClient(clientOptions)); @@ -40,6 +43,7 @@ public DeepgramApiClient(ClientOptions clientOptions) { this.readClient = Suppliers.memoize(() -> new ReadClient(clientOptions)); this.selfHostedClient = Suppliers.memoize(() -> new SelfHostedClient(clientOptions)); this.speakClient = Suppliers.memoize(() -> new SpeakClient(clientOptions)); + this.voiceAgentClient = Suppliers.memoize(() -> new VoiceAgentClient(clientOptions)); } public AgentClient agent() { @@ -70,6 +74,10 @@ public SpeakClient speak() { return this.speakClient.get(); } + public VoiceAgentClient voiceAgent() { + return this.voiceAgentClient.get(); + } + public static DeepgramApiClientBuilder builder() { return new DeepgramApiClientBuilder(); } diff --git a/src/main/java/com/deepgram/core/ClientOptions.java b/src/main/java/com/deepgram/core/ClientOptions.java index c2e4ff8..169826c 100644 --- a/src/main/java/com/deepgram/core/ClientOptions.java +++ b/src/main/java/com/deepgram/core/ClientOptions.java @@ -41,10 +41,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.deepgram:deepgram-java-sdk/0.2.1"); // x-release-please-version + put("User-Agent", "com.deepgram:deepgram-sdk/0.2.2"); put("X-Fern-Language", "JAVA"); - put("X-Fern-SDK-Name", "com.deepgram:deepgram-java-sdk"); - put("X-Fern-SDK-Version", "0.2.1"); // x-release-please-version + put("X-Fern-SDK-Name", "com.deepgram.fern:api-sdk"); + put("X-Fern-SDK-Version", "0.2.2"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/deepgram/core/RetryInterceptor.java b/src/main/java/com/deepgram/core/RetryInterceptor.java index b48acb7..91e8e26 100644 --- a/src/main/java/com/deepgram/core/RetryInterceptor.java +++ b/src/main/java/com/deepgram/core/RetryInterceptor.java @@ -19,11 +19,11 @@ public class RetryInterceptor implements Interceptor { private static final Duration MAX_RETRY_DELAY = Duration.ofMillis(60000); private static final double JITTER_FACTOR = 0.2; - private final ExponentialBackoff backoff; + private final int maxRetries; private final Random random = new Random(); public RetryInterceptor(int maxRetries) { - this.backoff = new ExponentialBackoff(maxRetries); + this.maxRetries = maxRetries; } @Override @@ -38,7 +38,8 @@ public Response intercept(Chain chain) throws IOException { } private Response retryChain(Response response, Chain chain) throws IOException { - Optional nextBackoff = this.backoff.nextBackoff(response); + ExponentialBackoff backoff = new ExponentialBackoff(this.maxRetries); + Optional nextBackoff = backoff.nextBackoff(response); while (nextBackoff.isPresent()) { try { Thread.sleep(nextBackoff.get().toMillis()); @@ -48,7 +49,7 @@ private Response retryChain(Response response, Chain chain) throws IOException { response.close(); response = chain.proceed(chain.request()); if (shouldRetry(response.code())) { - nextBackoff = this.backoff.nextBackoff(response); + nextBackoff = backoff.nextBackoff(response); } else { return response; } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ConversationTextRole.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ConversationTextRole.java index d59439e..ca5e298 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ConversationTextRole.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ConversationTextRole.java @@ -7,11 +7,11 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class AgentV1ConversationTextRole { + public static final AgentV1ConversationTextRole USER = new AgentV1ConversationTextRole(Value.USER, "user"); + public static final AgentV1ConversationTextRole ASSISTANT = new AgentV1ConversationTextRole(Value.ASSISTANT, "assistant"); - public static final AgentV1ConversationTextRole USER = new AgentV1ConversationTextRole(Value.USER, "user"); - private final Value value; private final String string; @@ -45,10 +45,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case ASSISTANT: - return visitor.visitAssistant(); case USER: return visitor.visitUser(); + case ASSISTANT: + return visitor.visitAssistant(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -58,10 +58,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static AgentV1ConversationTextRole valueOf(String value) { switch (value) { - case "assistant": - return ASSISTANT; case "user": return USER; + case "assistant": + return ASSISTANT; default: return new AgentV1ConversationTextRole(Value.UNKNOWN, value); } 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 cba0f6b..d683b72 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 @@ -10,10 +10,12 @@ 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,14 +29,22 @@ public final class AgentV1FunctionCallRequestFunctionsItem { private final boolean clientSide; + private final Optional thoughtSignature; + private final Map additionalProperties; private AgentV1FunctionCallRequestFunctionsItem( - String id, String name, String arguments, boolean clientSide, Map additionalProperties) { + String id, + String name, + String arguments, + boolean clientSide, + Optional thoughtSignature, + Map additionalProperties) { this.id = id; this.name = name; this.arguments = arguments; this.clientSide = clientSide; + this.thoughtSignature = thoughtSignature; this.additionalProperties = additionalProperties; } @@ -70,6 +80,14 @@ public boolean getClientSide() { return clientSide; } + /** + * @return Some Gemini models require this as an additional function call identifier + */ + @JsonProperty("thought_signature") + public Optional getThoughtSignature() { + return thoughtSignature; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -86,12 +104,13 @@ private boolean equalTo(AgentV1FunctionCallRequestFunctionsItem other) { return id.equals(other.id) && name.equals(other.name) && arguments.equals(other.arguments) - && clientSide == other.clientSide; + && clientSide == other.clientSide + && thoughtSignature.equals(other.thoughtSignature); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.arguments, this.clientSide); + return Objects.hash(this.id, this.name, this.arguments, this.clientSide, this.thoughtSignature); } @java.lang.Override @@ -139,6 +158,13 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Some Gemini models require this as an additional function call identifier

+ */ + _FinalStage thoughtSignature(Optional thoughtSignature); + + _FinalStage thoughtSignature(String thoughtSignature); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -151,6 +177,8 @@ public static final class Builder implements IdStage, NameStage, ArgumentsStage, private boolean clientSide; + private Optional thoughtSignature = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -162,6 +190,7 @@ public Builder from(AgentV1FunctionCallRequestFunctionsItem other) { name(other.getName()); arguments(other.getArguments()); clientSide(other.getClientSide()); + thoughtSignature(other.getThoughtSignature()); return this; } @@ -213,9 +242,30 @@ public _FinalStage clientSide(boolean clientSide) { return this; } + /** + *

Some Gemini models require this as an additional function call identifier

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

Some Gemini models require this as an additional function call identifier

+ */ + @java.lang.Override + @JsonSetter(value = "thought_signature", nulls = Nulls.SKIP) + public _FinalStage thoughtSignature(Optional thoughtSignature) { + this.thoughtSignature = thoughtSignature; + return this; + } + @java.lang.Override public AgentV1FunctionCallRequestFunctionsItem build() { - return new AgentV1FunctionCallRequestFunctionsItem(id, name, arguments, clientSide, additionalProperties); + return new AgentV1FunctionCallRequestFunctionsItem( + id, name, arguments, clientSide, thoughtSignature, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextMessagesItemContentRole.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextMessagesItemContentRole.java index 7f9932f..2bb67b8 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextMessagesItemContentRole.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextMessagesItemContentRole.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class AgentV1SettingsAgentContextMessagesItemContentRole { - public static final AgentV1SettingsAgentContextMessagesItemContentRole ASSISTANT = - new AgentV1SettingsAgentContextMessagesItemContentRole(Value.ASSISTANT, "assistant"); - public static final AgentV1SettingsAgentContextMessagesItemContentRole USER = new AgentV1SettingsAgentContextMessagesItemContentRole(Value.USER, "user"); + public static final AgentV1SettingsAgentContextMessagesItemContentRole ASSISTANT = + new AgentV1SettingsAgentContextMessagesItemContentRole(Value.ASSISTANT, "assistant"); + private final Value value; private final String string; @@ -46,10 +46,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case ASSISTANT: - return visitor.visitAssistant(); case USER: return visitor.visitUser(); + case ASSISTANT: + return visitor.visitAssistant(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -59,10 +59,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static AgentV1SettingsAgentContextMessagesItemContentRole valueOf(String value) { switch (value) { - case "assistant": - return ASSISTANT; case "user": return USER; + case "assistant": + return ASSISTANT; default: return new AgentV1SettingsAgentContextMessagesItemContentRole(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem.java index 6da93e0..8de6017 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem.java @@ -10,10 +10,12 @@ 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) @@ -29,6 +31,8 @@ public final class AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionC private final String response; + private final Optional thoughtSignature; + private final Map additionalProperties; private AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem( @@ -37,12 +41,14 @@ private AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem( boolean clientSide, String arguments, String response, + Optional thoughtSignature, Map additionalProperties) { this.id = id; this.name = name; this.clientSide = clientSide; this.arguments = arguments; this.response = response; + this.thoughtSignature = thoughtSignature; this.additionalProperties = additionalProperties; } @@ -86,6 +92,14 @@ public String getResponse() { return response; } + /** + * @return Some Gemini models require this as an additional function call identifier + */ + @JsonProperty("thought_signature") + public Optional getThoughtSignature() { + return thoughtSignature; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -103,12 +117,13 @@ private boolean equalTo(AgentV1SettingsAgentContextMessagesItemFunctionCallsFunc && name.equals(other.name) && clientSide == other.clientSide && arguments.equals(other.arguments) - && response.equals(other.response); + && response.equals(other.response) + && thoughtSignature.equals(other.thoughtSignature); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.name, this.clientSide, this.arguments, this.response); + return Objects.hash(this.id, this.name, this.clientSide, this.arguments, this.response, this.thoughtSignature); } @java.lang.Override @@ -163,6 +178,13 @@ public interface _FinalStage { _FinalStage additionalProperty(String key, Object value); _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Some Gemini models require this as an additional function call identifier

+ */ + _FinalStage thoughtSignature(Optional thoughtSignature); + + _FinalStage thoughtSignature(String thoughtSignature); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -178,6 +200,8 @@ public static final class Builder private String response; + private Optional thoughtSignature = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -190,6 +214,7 @@ public Builder from(AgentV1SettingsAgentContextMessagesItemFunctionCallsFunction clientSide(other.getClientSide()); arguments(other.getArguments()); response(other.getResponse()); + thoughtSignature(other.getThoughtSignature()); return this; } @@ -253,10 +278,30 @@ public _FinalStage response(@NotNull String response) { return this; } + /** + *

Some Gemini models require this as an additional function call identifier

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

Some Gemini models require this as an additional function call identifier

+ */ + @java.lang.Override + @JsonSetter(value = "thought_signature", nulls = Nulls.SKIP) + public _FinalStage thoughtSignature(Optional thoughtSignature) { + this.thoughtSignature = thoughtSignature; + return this; + } + @java.lang.Override public AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem build() { return new AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem( - id, name, clientSide, arguments, response, additionalProperties); + id, name, clientSide, arguments, response, thoughtSignature, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeak.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeak.java index b71e5f8..8b982d5 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeak.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeak.java @@ -4,6 +4,7 @@ package com.deepgram.resources.agent.v1.types; import com.deepgram.core.ObjectMappers; +import com.deepgram.types.SpeakSettingsV1; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; @@ -34,9 +35,9 @@ public Object get() { @SuppressWarnings("unchecked") public T visit(Visitor visitor) { if (this.type == 0) { - return visitor.visit((AgentV1SettingsAgentSpeakEndpoint) this.value); + return visitor.visit((SpeakSettingsV1) this.value); } else if (this.type == 1) { - return visitor.visit((List) this.value); + return visitor.visit((List) this.value); } throw new IllegalStateException("Failed to visit value. This should never happen."); } @@ -61,18 +62,18 @@ public String toString() { return this.value.toString(); } - public static AgentV1SettingsAgentSpeak of(AgentV1SettingsAgentSpeakEndpoint value) { + public static AgentV1SettingsAgentSpeak of(SpeakSettingsV1 value) { return new AgentV1SettingsAgentSpeak(value, 0); } - public static AgentV1SettingsAgentSpeak of(List value) { + public static AgentV1SettingsAgentSpeak of(List value) { return new AgentV1SettingsAgentSpeak(value, 1); } public interface Visitor { - T visit(AgentV1SettingsAgentSpeakEndpoint value); + T visit(SpeakSettingsV1 value); - T visit(List value); + T visit(List value); } static final class Deserializer extends StdDeserializer { @@ -84,12 +85,11 @@ static final class Deserializer extends StdDeserializer>() {})); + return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); } catch (RuntimeException e) { } throw new JsonParseException(p, "Failed to deserialize"); diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpoint.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpoint.java deleted file mode 100644 index 5f95e82..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpoint.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakEndpoint.Builder.class) -public final class AgentV1SettingsAgentSpeakEndpoint { - private final AgentV1SettingsAgentSpeakEndpointProvider provider; - - private final Optional endpoint; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakEndpoint( - AgentV1SettingsAgentSpeakEndpointProvider provider, - Optional endpoint, - Map additionalProperties) { - this.provider = provider; - this.endpoint = endpoint; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public AgentV1SettingsAgentSpeakEndpointProvider getProvider() { - return provider; - } - - /** - * @return Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs. - */ - @JsonProperty("endpoint") - public Optional getEndpoint() { - return endpoint; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakEndpoint && equalTo((AgentV1SettingsAgentSpeakEndpoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakEndpoint other) { - return provider.equals(other.provider) && endpoint.equals(other.endpoint); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider, this.endpoint); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ProviderStage builder() { - return new Builder(); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull AgentV1SettingsAgentSpeakEndpointProvider provider); - - Builder from(AgentV1SettingsAgentSpeakEndpoint other); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakEndpoint build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

- */ - _FinalStage endpoint(Optional endpoint); - - _FinalStage endpoint(AgentV1SettingsAgentSpeakEndpointEndpoint endpoint); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ProviderStage, _FinalStage { - private AgentV1SettingsAgentSpeakEndpointProvider provider; - - private Optional endpoint = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakEndpoint other) { - provider(other.getProvider()); - endpoint(other.getEndpoint()); - return this; - } - - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull AgentV1SettingsAgentSpeakEndpointProvider provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - /** - *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

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

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

- */ - @java.lang.Override - @JsonSetter(value = "endpoint", nulls = Nulls.SKIP) - public _FinalStage endpoint(Optional endpoint) { - this.endpoint = endpoint; - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakEndpoint build() { - return new AgentV1SettingsAgentSpeakEndpoint(provider, endpoint, 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/agent/v1/types/AgentV1SettingsAgentSpeakEndpointEndpoint.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointEndpoint.java deleted file mode 100644 index 3f573f1..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointEndpoint.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakEndpointEndpoint.Builder.class) -public final class AgentV1SettingsAgentSpeakEndpointEndpoint { - private final Optional url; - - private final Optional> headers; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakEndpointEndpoint( - Optional url, Optional> headers, Map additionalProperties) { - this.url = url; - this.headers = headers; - this.additionalProperties = additionalProperties; - } - - /** - * @return Custom TTS endpoint URL. Cannot contain output_format or model_id query parameters when the provider is Eleven Labs. - */ - @JsonProperty("url") - public Optional getUrl() { - return url; - } - - @JsonProperty("headers") - public Optional> getHeaders() { - return headers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakEndpointEndpoint - && equalTo((AgentV1SettingsAgentSpeakEndpointEndpoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakEndpointEndpoint other) { - return url.equals(other.url) && headers.equals(other.headers); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.url, this.headers); - } - - @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 { - private Optional url = Optional.empty(); - - private Optional> headers = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AgentV1SettingsAgentSpeakEndpointEndpoint other) { - url(other.getUrl()); - headers(other.getHeaders()); - return this; - } - - /** - *

Custom TTS endpoint URL. Cannot contain output_format or model_id query parameters when the provider is Eleven Labs.

- */ - @JsonSetter(value = "url", nulls = Nulls.SKIP) - public Builder url(Optional url) { - this.url = url; - return this; - } - - public Builder url(String url) { - this.url = Optional.ofNullable(url); - return this; - } - - @JsonSetter(value = "headers", nulls = Nulls.SKIP) - public Builder headers(Optional> headers) { - this.headers = headers; - return this; - } - - public Builder headers(Map headers) { - this.headers = Optional.ofNullable(headers); - return this; - } - - public AgentV1SettingsAgentSpeakEndpointEndpoint build() { - return new AgentV1SettingsAgentSpeakEndpointEndpoint(url, headers, 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/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPolly.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPolly.java deleted file mode 100644 index 1aaf900..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPolly.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakEndpointProviderAwsPolly.Builder.class) -public final class AgentV1SettingsAgentSpeakEndpointProviderAwsPolly { - private final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice voice; - - private final String language; - - private final Optional languageCode; - - private final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine engine; - - private final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials credentials; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakEndpointProviderAwsPolly( - AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice voice, - String language, - Optional languageCode, - AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine engine, - AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials credentials, - Map additionalProperties) { - this.voice = voice; - this.language = language; - this.languageCode = languageCode; - this.engine = engine; - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - /** - * @return AWS Polly voice name - */ - @JsonProperty("voice") - public AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice getVoice() { - return voice; - } - - /** - * @return Language code to use, e.g. 'en-US'. Corresponds to the language_code parameter in the AWS Polly API - */ - @JsonProperty("language") - public String getLanguage() { - return language; - } - - /** - * @return Use the language field instead. - */ - @JsonProperty("language_code") - public Optional getLanguageCode() { - return languageCode; - } - - @JsonProperty("engine") - public AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine getEngine() { - return engine; - } - - @JsonProperty("credentials") - public AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakEndpointProviderAwsPolly - && equalTo((AgentV1SettingsAgentSpeakEndpointProviderAwsPolly) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakEndpointProviderAwsPolly other) { - return voice.equals(other.voice) - && language.equals(other.language) - && languageCode.equals(other.languageCode) - && engine.equals(other.engine) - && credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.voice, this.language, this.languageCode, this.engine, this.credentials); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static VoiceStage builder() { - return new Builder(); - } - - public interface VoiceStage { - /** - *

AWS Polly voice name

- */ - LanguageStage voice(@NotNull AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice voice); - - Builder from(AgentV1SettingsAgentSpeakEndpointProviderAwsPolly other); - } - - public interface LanguageStage { - /** - *

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

- */ - EngineStage language(@NotNull String language); - } - - public interface EngineStage { - CredentialsStage engine(@NotNull AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine engine); - } - - public interface CredentialsStage { - _FinalStage credentials(@NotNull AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials credentials); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakEndpointProviderAwsPolly build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Use the language field instead.

- */ - _FinalStage languageCode(Optional languageCode); - - _FinalStage languageCode(String languageCode); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements VoiceStage, LanguageStage, EngineStage, CredentialsStage, _FinalStage { - private AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice voice; - - private String language; - - private AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine engine; - - private AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials credentials; - - private Optional languageCode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakEndpointProviderAwsPolly other) { - voice(other.getVoice()); - language(other.getLanguage()); - languageCode(other.getLanguageCode()); - engine(other.getEngine()); - credentials(other.getCredentials()); - return this; - } - - /** - *

AWS Polly voice name

- *

AWS Polly voice name

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

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. - */ - @java.lang.Override - @JsonSetter("language") - public EngineStage language(@NotNull String language) { - this.language = Objects.requireNonNull(language, "language must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("engine") - public CredentialsStage engine(@NotNull AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine engine) { - this.engine = Objects.requireNonNull(engine, "engine must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("credentials") - public _FinalStage credentials( - @NotNull AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials credentials) { - this.credentials = Objects.requireNonNull(credentials, "credentials must not be null"); - return this; - } - - /** - *

Use the language field instead.

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

Use the language field instead.

- */ - @java.lang.Override - @JsonSetter(value = "language_code", nulls = Nulls.SKIP) - public _FinalStage languageCode(Optional languageCode) { - this.languageCode = languageCode; - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakEndpointProviderAwsPolly build() { - return new AgentV1SettingsAgentSpeakEndpointProviderAwsPolly( - voice, language, languageCode, engine, credentials, 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/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials.java deleted file mode 100644 index de1986a..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials.java +++ /dev/null @@ -1,240 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials.Builder.class) -public final class AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials { - private final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType type; - - private final String region; - - private final String accessKeyId; - - private final String secretAccessKey; - - private final Optional sessionToken; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials( - AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType type, - String region, - String accessKeyId, - String secretAccessKey, - Optional sessionToken, - Map additionalProperties) { - this.type = type; - this.region = region; - this.accessKeyId = accessKeyId; - this.secretAccessKey = secretAccessKey; - this.sessionToken = sessionToken; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType getType() { - return type; - } - - @JsonProperty("region") - public String getRegion() { - return region; - } - - @JsonProperty("access_key_id") - public String getAccessKeyId() { - return accessKeyId; - } - - @JsonProperty("secret_access_key") - public String getSecretAccessKey() { - return secretAccessKey; - } - - /** - * @return Required for STS only - */ - @JsonProperty("session_token") - public Optional getSessionToken() { - return sessionToken; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials - && equalTo((AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials other) { - return type.equals(other.type) - && region.equals(other.region) - && accessKeyId.equals(other.accessKeyId) - && secretAccessKey.equals(other.secretAccessKey) - && sessionToken.equals(other.sessionToken); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.region, this.accessKeyId, this.secretAccessKey, this.sessionToken); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - RegionStage type(@NotNull AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType type); - - Builder from(AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials other); - } - - public interface RegionStage { - AccessKeyIdStage region(@NotNull String region); - } - - public interface AccessKeyIdStage { - SecretAccessKeyStage accessKeyId(@NotNull String accessKeyId); - } - - public interface SecretAccessKeyStage { - _FinalStage secretAccessKey(@NotNull String secretAccessKey); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Required for STS only

- */ - _FinalStage sessionToken(Optional sessionToken); - - _FinalStage sessionToken(String sessionToken); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements TypeStage, RegionStage, AccessKeyIdStage, SecretAccessKeyStage, _FinalStage { - private AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType type; - - private String region; - - private String accessKeyId; - - private String secretAccessKey; - - private Optional sessionToken = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials other) { - type(other.getType()); - region(other.getRegion()); - accessKeyId(other.getAccessKeyId()); - secretAccessKey(other.getSecretAccessKey()); - sessionToken(other.getSessionToken()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public RegionStage type(@NotNull AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("region") - public AccessKeyIdStage region(@NotNull String region) { - this.region = Objects.requireNonNull(region, "region must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("access_key_id") - public SecretAccessKeyStage accessKeyId(@NotNull String accessKeyId) { - this.accessKeyId = Objects.requireNonNull(accessKeyId, "accessKeyId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("secret_access_key") - public _FinalStage secretAccessKey(@NotNull String secretAccessKey) { - this.secretAccessKey = Objects.requireNonNull(secretAccessKey, "secretAccessKey must not be null"); - return this; - } - - /** - *

Required for STS only

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

Required for STS only

- */ - @java.lang.Override - @JsonSetter(value = "session_token", nulls = Nulls.SKIP) - public _FinalStage sessionToken(Optional sessionToken) { - this.sessionToken = sessionToken; - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials build() { - return new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentials( - type, region, accessKeyId, secretAccessKey, sessionToken, 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/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType.java deleted file mode 100644 index fd36d2c..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType { - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType IAM = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType(Value.IAM, "iam"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType STS = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType(Value.STS, "sts"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType(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 AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType - && this.string.equals( - ((AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case IAM: - return visitor.visitIam(); - case STS: - return visitor.visitSts(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType valueOf(String value) { - switch (value) { - case "iam": - return IAM; - case "sts": - return STS; - default: - return new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyCredentialsType(Value.UNKNOWN, value); - } - } - - public enum Value { - STS, - - IAM, - - UNKNOWN - } - - public interface Visitor { - T visitSts(); - - T visitIam(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine.java deleted file mode 100644 index 90b4971..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine { - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine LONG_FORM = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine(Value.LONG_FORM, "long-form"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine STANDARD = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine(Value.STANDARD, "standard"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine GENERATIVE = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine(Value.GENERATIVE, "generative"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine NEURAL = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine(Value.NEURAL, "neural"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine(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 AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine - && this.string.equals( - ((AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LONG_FORM: - return visitor.visitLongForm(); - case STANDARD: - return visitor.visitStandard(); - case GENERATIVE: - return visitor.visitGenerative(); - case NEURAL: - return visitor.visitNeural(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine valueOf(String value) { - switch (value) { - case "long-form": - return LONG_FORM; - case "standard": - return STANDARD; - case "generative": - return GENERATIVE; - case "neural": - return NEURAL; - default: - return new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyEngine(Value.UNKNOWN, value); - } - } - - public enum Value { - GENERATIVE, - - LONG_FORM, - - STANDARD, - - NEURAL, - - UNKNOWN - } - - public interface Visitor { - T visitGenerative(); - - T visitLongForm(); - - T visitStandard(); - - T visitNeural(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice.java deleted file mode 100644 index 426453f..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice { - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice ARTHUR = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(Value.ARTHUR, "Arthur"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice JOANNA = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(Value.JOANNA, "Joanna"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice BRIAN = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(Value.BRIAN, "Brian"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice AMY = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(Value.AMY, "Amy"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice EMMA = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(Value.EMMA, "Emma"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice MATTHEW = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(Value.MATTHEW, "Matthew"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice ARIA = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(Value.ARIA, "Aria"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice AYANDA = - new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(Value.AYANDA, "Ayanda"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(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 AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice - && this.string.equals(((AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ARTHUR: - return visitor.visitArthur(); - case JOANNA: - return visitor.visitJoanna(); - case BRIAN: - return visitor.visitBrian(); - case AMY: - return visitor.visitAmy(); - case EMMA: - return visitor.visitEmma(); - case MATTHEW: - return visitor.visitMatthew(); - case ARIA: - return visitor.visitAria(); - case AYANDA: - return visitor.visitAyanda(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice valueOf(String value) { - switch (value) { - case "Arthur": - return ARTHUR; - case "Joanna": - return JOANNA; - case "Brian": - return BRIAN; - case "Amy": - return AMY; - case "Emma": - return EMMA; - case "Matthew": - return MATTHEW; - case "Aria": - return ARIA; - case "Ayanda": - return AYANDA; - default: - return new AgentV1SettingsAgentSpeakEndpointProviderAwsPollyVoice(Value.UNKNOWN, value); - } - } - - public enum Value { - MATTHEW, - - JOANNA, - - AMY, - - EMMA, - - BRIAN, - - ARTHUR, - - ARIA, - - AYANDA, - - UNKNOWN - } - - public interface Visitor { - T visitMatthew(); - - T visitJoanna(); - - T visitAmy(); - - T visitEmma(); - - T visitBrian(); - - T visitArthur(); - - T visitAria(); - - T visitAyanda(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId.java deleted file mode 100644 index 49931a6..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId { - public static final AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId SONIC_MULTILINGUAL = - new AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId( - Value.SONIC_MULTILINGUAL, "sonic-multilingual"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId SONIC2 = - new AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId(Value.SONIC2, "sonic-2"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId(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 AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId - && this.string.equals( - ((AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SONIC_MULTILINGUAL: - return visitor.visitSonicMultilingual(); - case SONIC2: - return visitor.visitSonic2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId valueOf(String value) { - switch (value) { - case "sonic-multilingual": - return SONIC_MULTILINGUAL; - case "sonic-2": - return SONIC2; - default: - return new AgentV1SettingsAgentSpeakEndpointProviderCartesiaModelId(Value.UNKNOWN, value); - } - } - - public enum Value { - SONIC2, - - SONIC_MULTILINGUAL, - - UNKNOWN - } - - public interface Visitor { - T visitSonic2(); - - T visitSonicMultilingual(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice.java deleted file mode 100644 index 9e06b01..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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 = AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice.Builder.class) -public final class AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice { - private final String mode; - - private final String id; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice( - String mode, String id, Map additionalProperties) { - this.mode = mode; - this.id = id; - this.additionalProperties = additionalProperties; - } - - /** - * @return Cartesia voice mode - */ - @JsonProperty("mode") - public String getMode() { - return mode; - } - - /** - * @return Cartesia voice ID - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice - && equalTo((AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice other) { - return mode.equals(other.mode) && id.equals(other.id); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mode, this.id); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModeStage builder() { - return new Builder(); - } - - public interface ModeStage { - /** - *

Cartesia voice mode

- */ - IdStage mode(@NotNull String mode); - - Builder from(AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice other); - } - - public interface IdStage { - /** - *

Cartesia voice ID

- */ - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModeStage, IdStage, _FinalStage { - private String mode; - - private String id; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice other) { - mode(other.getMode()); - id(other.getId()); - return this; - } - - /** - *

Cartesia voice mode

- *

Cartesia voice mode

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

Cartesia voice ID

- *

Cartesia voice ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public _FinalStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice build() { - return new AgentV1SettingsAgentSpeakEndpointProviderCartesiaVoice(mode, id, 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/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel.java deleted file mode 100644 index 4b7bf99..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel.java +++ /dev/null @@ -1,757 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel { - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_ANGUS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_ANGUS_EN, "aura-angus-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2JUPITER_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2CORA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2CORA_EN, "aura-2-cora-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_STELLA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_STELLA_EN, "aura-stella-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2HELENA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2HELENA_EN, "aura-2-helena-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2AQUILA_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ATLAS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ORION_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ORION_EN, "aura-2-orion-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2DRACO_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2DRACO_EN, "aura-2-draco-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2HYPERION_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2JANUS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2JANUS_EN, "aura-2-janus-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_HELIOS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_HELIOS_EN, "aura-helios-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2PLUTO_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ARCAS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2NESTOR_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2NEPTUNE_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2MINERVA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ALVARO_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_ATHENA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_ATHENA_EN, "aura-athena-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_PERSEUS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_PERSEUS_EN, "aura-perseus-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ODYSSEUS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2PANDORA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ZEUS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ELECTRA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ORPHEUS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2THALIA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2THALIA_EN, "aura-2-thalia-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2CELESTE_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_ASTERIA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_ASTERIA_EN, "aura-asteria-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ESTRELLA_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2HERA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2HERA_EN, "aura-2-hera-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2MARS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2MARS_EN, "aura-2-mars-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2SIRIO_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ASTERIA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2HERMES_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2HERMES_EN, "aura-2-hermes-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2VESTA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2VESTA_EN, "aura-2-vesta-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2CARINA_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2CARINA_ES, "aura-2-carina-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2CALLISTA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2HARMONIA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2SELENA_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2SELENA_ES, "aura-2-selena-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2AURORA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2AURORA_EN, "aura-2-aurora-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_ZEUS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_ZEUS_EN, "aura-zeus-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2OPHELIA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2AMALTHEA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_ORPHEUS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2DELIA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2DELIA_EN, "aura-2-delia-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_LUNA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_LUNA_EN, "aura-luna-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2APOLLO_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2SELENE_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2SELENE_EN, "aura-2-selene-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2THEIA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2THEIA_EN, "aura-2-theia-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_HERA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_HERA_EN, "aura-hera-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2CORDELIA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ANDROMEDA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ARIES_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ARIES_EN, "aura-2-aries-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2JUNO_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2JUNO_EN, "aura-2-juno-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2LUNA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2LUNA_EN, "aura-2-luna-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2DIANA_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2DIANA_ES, "aura-2-diana-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2JAVIER_ES = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2JAVIER_ES, "aura-2-javier-es"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_ORION_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_ORION_EN, "aura-orion-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA_ARCAS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA_ARCAS_EN, "aura-arcas-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2IRIS_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2IRIS_EN, "aura-2-iris-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2ATHENA_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2ATHENA_EN, "aura-2-athena-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2SATURN_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2SATURN_EN, "aura-2-saturn-en"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel AURA2PHOEBE_EN = - new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(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 AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel - && this.string.equals(((AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AURA_ANGUS_EN: - return visitor.visitAuraAngusEn(); - case AURA2JUPITER_EN: - return visitor.visitAura2JupiterEn(); - case AURA2CORA_EN: - return visitor.visitAura2CoraEn(); - case AURA_STELLA_EN: - return visitor.visitAuraStellaEn(); - case AURA2HELENA_EN: - return visitor.visitAura2HelenaEn(); - case AURA2AQUILA_ES: - return visitor.visitAura2AquilaEs(); - case AURA2ATLAS_EN: - return visitor.visitAura2AtlasEn(); - case AURA2ORION_EN: - return visitor.visitAura2OrionEn(); - case AURA2DRACO_EN: - return visitor.visitAura2DracoEn(); - case AURA2HYPERION_EN: - return visitor.visitAura2HyperionEn(); - case AURA2JANUS_EN: - return visitor.visitAura2JanusEn(); - case AURA_HELIOS_EN: - return visitor.visitAuraHeliosEn(); - case AURA2PLUTO_EN: - return visitor.visitAura2PlutoEn(); - case AURA2ARCAS_EN: - return visitor.visitAura2ArcasEn(); - case AURA2NESTOR_ES: - return visitor.visitAura2NestorEs(); - case AURA2NEPTUNE_EN: - return visitor.visitAura2NeptuneEn(); - case AURA2MINERVA_EN: - return visitor.visitAura2MinervaEn(); - case AURA2ALVARO_ES: - return visitor.visitAura2AlvaroEs(); - case AURA_ATHENA_EN: - return visitor.visitAuraAthenaEn(); - case AURA_PERSEUS_EN: - return visitor.visitAuraPerseusEn(); - case AURA2ODYSSEUS_EN: - return visitor.visitAura2OdysseusEn(); - case AURA2PANDORA_EN: - return visitor.visitAura2PandoraEn(); - case AURA2ZEUS_EN: - return visitor.visitAura2ZeusEn(); - case AURA2ELECTRA_EN: - return visitor.visitAura2ElectraEn(); - case AURA2ORPHEUS_EN: - return visitor.visitAura2OrpheusEn(); - case AURA2THALIA_EN: - return visitor.visitAura2ThaliaEn(); - case AURA2CELESTE_ES: - return visitor.visitAura2CelesteEs(); - case AURA_ASTERIA_EN: - return visitor.visitAuraAsteriaEn(); - case AURA2ESTRELLA_ES: - return visitor.visitAura2EstrellaEs(); - case AURA2HERA_EN: - return visitor.visitAura2HeraEn(); - case AURA2MARS_EN: - return visitor.visitAura2MarsEn(); - case AURA2SIRIO_ES: - return visitor.visitAura2SirioEs(); - case AURA2ASTERIA_EN: - return visitor.visitAura2AsteriaEn(); - case AURA2HERMES_EN: - return visitor.visitAura2HermesEn(); - case AURA2VESTA_EN: - return visitor.visitAura2VestaEn(); - case AURA2CARINA_ES: - return visitor.visitAura2CarinaEs(); - case AURA2CALLISTA_EN: - return visitor.visitAura2CallistaEn(); - case AURA2HARMONIA_EN: - return visitor.visitAura2HarmoniaEn(); - case AURA2SELENA_ES: - return visitor.visitAura2SelenaEs(); - case AURA2AURORA_EN: - return visitor.visitAura2AuroraEn(); - case AURA_ZEUS_EN: - return visitor.visitAuraZeusEn(); - case AURA2OPHELIA_EN: - return visitor.visitAura2OpheliaEn(); - case AURA2AMALTHEA_EN: - return visitor.visitAura2AmaltheaEn(); - case AURA_ORPHEUS_EN: - return visitor.visitAuraOrpheusEn(); - case AURA2DELIA_EN: - return visitor.visitAura2DeliaEn(); - case AURA_LUNA_EN: - return visitor.visitAuraLunaEn(); - case AURA2APOLLO_EN: - return visitor.visitAura2ApolloEn(); - case AURA2SELENE_EN: - return visitor.visitAura2SeleneEn(); - case AURA2THEIA_EN: - return visitor.visitAura2TheiaEn(); - case AURA_HERA_EN: - return visitor.visitAuraHeraEn(); - case AURA2CORDELIA_EN: - return visitor.visitAura2CordeliaEn(); - case AURA2ANDROMEDA_EN: - return visitor.visitAura2AndromedaEn(); - case AURA2ARIES_EN: - return visitor.visitAura2AriesEn(); - case AURA2JUNO_EN: - return visitor.visitAura2JunoEn(); - case AURA2LUNA_EN: - return visitor.visitAura2LunaEn(); - case AURA2DIANA_ES: - return visitor.visitAura2DianaEs(); - case AURA2JAVIER_ES: - return visitor.visitAura2JavierEs(); - case AURA_ORION_EN: - return visitor.visitAuraOrionEn(); - case AURA_ARCAS_EN: - return visitor.visitAuraArcasEn(); - case AURA2IRIS_EN: - return visitor.visitAura2IrisEn(); - case AURA2ATHENA_EN: - return visitor.visitAura2AthenaEn(); - case AURA2SATURN_EN: - return visitor.visitAura2SaturnEn(); - case AURA2PHOEBE_EN: - return visitor.visitAura2PhoebeEn(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel valueOf(String value) { - switch (value) { - case "aura-angus-en": - return AURA_ANGUS_EN; - case "aura-2-jupiter-en": - return AURA2JUPITER_EN; - case "aura-2-cora-en": - return AURA2CORA_EN; - case "aura-stella-en": - return AURA_STELLA_EN; - case "aura-2-helena-en": - return AURA2HELENA_EN; - case "aura-2-aquila-es": - return AURA2AQUILA_ES; - case "aura-2-atlas-en": - return AURA2ATLAS_EN; - case "aura-2-orion-en": - return AURA2ORION_EN; - case "aura-2-draco-en": - return AURA2DRACO_EN; - case "aura-2-hyperion-en": - return AURA2HYPERION_EN; - case "aura-2-janus-en": - return AURA2JANUS_EN; - case "aura-helios-en": - return AURA_HELIOS_EN; - case "aura-2-pluto-en": - return AURA2PLUTO_EN; - case "aura-2-arcas-en": - return AURA2ARCAS_EN; - case "aura-2-nestor-es": - return AURA2NESTOR_ES; - case "aura-2-neptune-en": - return AURA2NEPTUNE_EN; - case "aura-2-minerva-en": - return AURA2MINERVA_EN; - case "aura-2-alvaro-es": - return AURA2ALVARO_ES; - case "aura-athena-en": - return AURA_ATHENA_EN; - case "aura-perseus-en": - return AURA_PERSEUS_EN; - case "aura-2-odysseus-en": - return AURA2ODYSSEUS_EN; - case "aura-2-pandora-en": - return AURA2PANDORA_EN; - case "aura-2-zeus-en": - return AURA2ZEUS_EN; - case "aura-2-electra-en": - return AURA2ELECTRA_EN; - case "aura-2-orpheus-en": - return AURA2ORPHEUS_EN; - case "aura-2-thalia-en": - return AURA2THALIA_EN; - case "aura-2-celeste-es": - return AURA2CELESTE_ES; - case "aura-asteria-en": - return AURA_ASTERIA_EN; - case "aura-2-estrella-es": - return AURA2ESTRELLA_ES; - case "aura-2-hera-en": - return AURA2HERA_EN; - case "aura-2-mars-en": - return AURA2MARS_EN; - case "aura-2-sirio-es": - return AURA2SIRIO_ES; - case "aura-2-asteria-en": - return AURA2ASTERIA_EN; - case "aura-2-hermes-en": - return AURA2HERMES_EN; - case "aura-2-vesta-en": - return AURA2VESTA_EN; - case "aura-2-carina-es": - return AURA2CARINA_ES; - case "aura-2-callista-en": - return AURA2CALLISTA_EN; - case "aura-2-harmonia-en": - return AURA2HARMONIA_EN; - case "aura-2-selena-es": - return AURA2SELENA_ES; - case "aura-2-aurora-en": - return AURA2AURORA_EN; - case "aura-zeus-en": - return AURA_ZEUS_EN; - case "aura-2-ophelia-en": - return AURA2OPHELIA_EN; - case "aura-2-amalthea-en": - return AURA2AMALTHEA_EN; - case "aura-orpheus-en": - return AURA_ORPHEUS_EN; - case "aura-2-delia-en": - return AURA2DELIA_EN; - case "aura-luna-en": - return AURA_LUNA_EN; - case "aura-2-apollo-en": - return AURA2APOLLO_EN; - case "aura-2-selene-en": - return AURA2SELENE_EN; - case "aura-2-theia-en": - return AURA2THEIA_EN; - case "aura-hera-en": - return AURA_HERA_EN; - case "aura-2-cordelia-en": - return AURA2CORDELIA_EN; - case "aura-2-andromeda-en": - return AURA2ANDROMEDA_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 "aura-2-diana-es": - return AURA2DIANA_ES; - case "aura-2-javier-es": - return AURA2JAVIER_ES; - case "aura-orion-en": - return AURA_ORION_EN; - case "aura-arcas-en": - return AURA_ARCAS_EN; - case "aura-2-iris-en": - return AURA2IRIS_EN; - case "aura-2-athena-en": - return AURA2ATHENA_EN; - case "aura-2-saturn-en": - return AURA2SATURN_EN; - case "aura-2-phoebe-en": - return AURA2PHOEBE_EN; - default: - return new AgentV1SettingsAgentSpeakEndpointProviderDeepgramModel(Value.UNKNOWN, value); - } - } - - public enum Value { - AURA_ASTERIA_EN, - - AURA_LUNA_EN, - - AURA_STELLA_EN, - - AURA_ATHENA_EN, - - AURA_HERA_EN, - - AURA_ORION_EN, - - AURA_ARCAS_EN, - - AURA_PERSEUS_EN, - - AURA_ANGUS_EN, - - AURA_ORPHEUS_EN, - - AURA_HELIOS_EN, - - AURA_ZEUS_EN, - - AURA2AMALTHEA_EN, - - AURA2ANDROMEDA_EN, - - AURA2APOLLO_EN, - - AURA2ARCAS_EN, - - AURA2ARIES_EN, - - AURA2ASTERIA_EN, - - AURA2ATHENA_EN, - - AURA2ATLAS_EN, - - AURA2AURORA_EN, - - AURA2CALLISTA_EN, - - AURA2CORA_EN, - - AURA2CORDELIA_EN, - - AURA2DELIA_EN, - - AURA2DRACO_EN, - - AURA2ELECTRA_EN, - - AURA2HARMONIA_EN, - - AURA2HELENA_EN, - - AURA2HERA_EN, - - AURA2HERMES_EN, - - AURA2HYPERION_EN, - - AURA2IRIS_EN, - - AURA2JANUS_EN, - - AURA2JUNO_EN, - - AURA2JUPITER_EN, - - AURA2LUNA_EN, - - AURA2MARS_EN, - - AURA2MINERVA_EN, - - AURA2NEPTUNE_EN, - - AURA2ODYSSEUS_EN, - - AURA2OPHELIA_EN, - - AURA2ORION_EN, - - AURA2ORPHEUS_EN, - - AURA2PANDORA_EN, - - AURA2PHOEBE_EN, - - AURA2PLUTO_EN, - - AURA2SATURN_EN, - - AURA2SELENE_EN, - - AURA2THALIA_EN, - - AURA2THEIA_EN, - - AURA2VESTA_EN, - - AURA2ZEUS_EN, - - AURA2SIRIO_ES, - - AURA2NESTOR_ES, - - AURA2CARINA_ES, - - AURA2CELESTE_ES, - - AURA2ALVARO_ES, - - AURA2DIANA_ES, - - AURA2AQUILA_ES, - - AURA2SELENA_ES, - - AURA2ESTRELLA_ES, - - AURA2JAVIER_ES, - - UNKNOWN - } - - public interface Visitor { - T visitAuraAsteriaEn(); - - T visitAuraLunaEn(); - - T visitAuraStellaEn(); - - T visitAuraAthenaEn(); - - T visitAuraHeraEn(); - - T visitAuraOrionEn(); - - T visitAuraArcasEn(); - - T visitAuraPerseusEn(); - - T visitAuraAngusEn(); - - T visitAuraOrpheusEn(); - - T visitAuraHeliosEn(); - - T visitAuraZeusEn(); - - T visitAura2AmaltheaEn(); - - T visitAura2AndromedaEn(); - - T visitAura2ApolloEn(); - - T visitAura2ArcasEn(); - - T visitAura2AriesEn(); - - T visitAura2AsteriaEn(); - - T visitAura2AthenaEn(); - - T visitAura2AtlasEn(); - - T visitAura2AuroraEn(); - - T visitAura2CallistaEn(); - - T visitAura2CoraEn(); - - T visitAura2CordeliaEn(); - - T visitAura2DeliaEn(); - - T visitAura2DracoEn(); - - T visitAura2ElectraEn(); - - T visitAura2HarmoniaEn(); - - T visitAura2HelenaEn(); - - T visitAura2HeraEn(); - - T visitAura2HermesEn(); - - T visitAura2HyperionEn(); - - T visitAura2IrisEn(); - - T visitAura2JanusEn(); - - T visitAura2JunoEn(); - - T visitAura2JupiterEn(); - - T visitAura2LunaEn(); - - T visitAura2MarsEn(); - - T visitAura2MinervaEn(); - - T visitAura2NeptuneEn(); - - T visitAura2OdysseusEn(); - - T visitAura2OpheliaEn(); - - T visitAura2OrionEn(); - - T visitAura2OrpheusEn(); - - T visitAura2PandoraEn(); - - T visitAura2PhoebeEn(); - - T visitAura2PlutoEn(); - - T visitAura2SaturnEn(); - - T visitAura2SeleneEn(); - - T visitAura2ThaliaEn(); - - T visitAura2TheiaEn(); - - T visitAura2VestaEn(); - - T visitAura2ZeusEn(); - - T visitAura2SirioEs(); - - T visitAura2NestorEs(); - - T visitAura2CarinaEs(); - - T visitAura2CelesteEs(); - - T visitAura2AlvaroEs(); - - T visitAura2DianaEs(); - - T visitAura2AquilaEs(); - - T visitAura2SelenaEs(); - - T visitAura2EstrellaEs(); - - T visitAura2JavierEs(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId.java deleted file mode 100644 index e0dad64..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId { - public static final AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId ELEVEN_TURBO_V25 = - new AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId(Value.ELEVEN_TURBO_V25, "eleven_turbo_v2_5"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId ELEVEN_MONOLINGUAL_V1 = - new AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId( - Value.ELEVEN_MONOLINGUAL_V1, "eleven_monolingual_v1"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId ELEVEN_MULTILINGUAL_V2 = - new AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId( - Value.ELEVEN_MULTILINGUAL_V2, "eleven_multilingual_v2"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId(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 AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId - && this.string.equals( - ((AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ELEVEN_TURBO_V25: - return visitor.visitElevenTurboV25(); - case ELEVEN_MONOLINGUAL_V1: - return visitor.visitElevenMonolingualV1(); - case ELEVEN_MULTILINGUAL_V2: - return visitor.visitElevenMultilingualV2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId valueOf(String value) { - switch (value) { - case "eleven_turbo_v2_5": - return ELEVEN_TURBO_V25; - case "eleven_monolingual_v1": - return ELEVEN_MONOLINGUAL_V1; - case "eleven_multilingual_v2": - return ELEVEN_MULTILINGUAL_V2; - default: - return new AgentV1SettingsAgentSpeakEndpointProviderElevenLabsModelId(Value.UNKNOWN, value); - } - } - - public enum Value { - ELEVEN_TURBO_V25, - - ELEVEN_MONOLINGUAL_V1, - - ELEVEN_MULTILINGUAL_V2, - - UNKNOWN - } - - public interface Visitor { - T visitElevenTurboV25(); - - T visitElevenMonolingualV1(); - - T visitElevenMultilingualV2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAi.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAi.java deleted file mode 100644 index ce688e6..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAi.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakEndpointProviderOpenAi.Builder.class) -public final class AgentV1SettingsAgentSpeakEndpointProviderOpenAi { - private final Optional version; - - private final AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel model; - - private final AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice voice; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakEndpointProviderOpenAi( - Optional version, - AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel model, - AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice voice, - Map additionalProperties) { - this.version = version; - this.model = model; - this.voice = voice; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the OpenAI text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return OpenAI TTS model - */ - @JsonProperty("model") - public AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel getModel() { - return model; - } - - /** - * @return OpenAI voice - */ - @JsonProperty("voice") - public AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice getVoice() { - return voice; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakEndpointProviderOpenAi - && equalTo((AgentV1SettingsAgentSpeakEndpointProviderOpenAi) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakEndpointProviderOpenAi other) { - return version.equals(other.version) && model.equals(other.model) && voice.equals(other.voice); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.model, this.voice); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelStage builder() { - return new Builder(); - } - - public interface ModelStage { - /** - *

OpenAI TTS model

- */ - VoiceStage model(@NotNull AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel model); - - Builder from(AgentV1SettingsAgentSpeakEndpointProviderOpenAi other); - } - - public interface VoiceStage { - /** - *

OpenAI voice

- */ - _FinalStage voice(@NotNull AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice voice); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakEndpointProviderOpenAi build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

- */ - _FinalStage version(Optional version); - - _FinalStage version(String version); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelStage, VoiceStage, _FinalStage { - private AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel model; - - private AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice voice; - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakEndpointProviderOpenAi other) { - version(other.getVersion()); - model(other.getModel()); - voice(other.getVoice()); - return this; - } - - /** - *

OpenAI TTS model

- *

OpenAI TTS model

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

OpenAI voice

- *

OpenAI voice

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakEndpointProviderOpenAi build() { - return new AgentV1SettingsAgentSpeakEndpointProviderOpenAi(version, model, voice, 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/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel.java deleted file mode 100644 index d2c7c1d..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel { - public static final AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel TTS1HD = - new AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel(Value.TTS1HD, "tts-1-hd"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel TTS1 = - new AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel(Value.TTS1, "tts-1"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel(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 AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel - && this.string.equals(((AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TTS1HD: - return visitor.visitTts1Hd(); - case TTS1: - return visitor.visitTts1(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel valueOf(String value) { - switch (value) { - case "tts-1-hd": - return TTS1HD; - case "tts-1": - return TTS1; - default: - return new AgentV1SettingsAgentSpeakEndpointProviderOpenAiModel(Value.UNKNOWN, value); - } - } - - public enum Value { - TTS1, - - TTS1HD, - - UNKNOWN - } - - public interface Visitor { - T visitTts1(); - - T visitTts1Hd(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice.java deleted file mode 100644 index 685f89c..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice { - public static final AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice SHIMMER = - new AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice(Value.SHIMMER, "shimmer"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice FABLE = - new AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice(Value.FABLE, "fable"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice ALLOY = - new AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice(Value.ALLOY, "alloy"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice ONYX = - new AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice(Value.ONYX, "onyx"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice NOVA = - new AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice(Value.NOVA, "nova"); - - public static final AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice ECHO = - new AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice(Value.ECHO, "echo"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice(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 AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice - && this.string.equals(((AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHIMMER: - return visitor.visitShimmer(); - case FABLE: - return visitor.visitFable(); - case ALLOY: - return visitor.visitAlloy(); - case ONYX: - return visitor.visitOnyx(); - case NOVA: - return visitor.visitNova(); - case ECHO: - return visitor.visitEcho(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice valueOf(String value) { - switch (value) { - case "shimmer": - return SHIMMER; - case "fable": - return FABLE; - case "alloy": - return ALLOY; - case "onyx": - return ONYX; - case "nova": - return NOVA; - case "echo": - return ECHO; - default: - return new AgentV1SettingsAgentSpeakEndpointProviderOpenAiVoice(Value.UNKNOWN, value); - } - } - - public enum Value { - ALLOY, - - ECHO, - - FABLE, - - ONYX, - - NOVA, - - SHIMMER, - - UNKNOWN - } - - public interface Visitor { - T visitAlloy(); - - T visitEcho(); - - T visitFable(); - - T visitOnyx(); - - T visitNova(); - - T visitShimmer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItem.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItem.java deleted file mode 100644 index c71e777..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItem.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakOneItem.Builder.class) -public final class AgentV1SettingsAgentSpeakOneItem { - private final AgentV1SettingsAgentSpeakOneItemProvider provider; - - private final Optional endpoint; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakOneItem( - AgentV1SettingsAgentSpeakOneItemProvider provider, - Optional endpoint, - Map additionalProperties) { - this.provider = provider; - this.endpoint = endpoint; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public AgentV1SettingsAgentSpeakOneItemProvider getProvider() { - return provider; - } - - /** - * @return Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs. - */ - @JsonProperty("endpoint") - public Optional getEndpoint() { - return endpoint; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakOneItem && equalTo((AgentV1SettingsAgentSpeakOneItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakOneItem other) { - return provider.equals(other.provider) && endpoint.equals(other.endpoint); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider, this.endpoint); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ProviderStage builder() { - return new Builder(); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull AgentV1SettingsAgentSpeakOneItemProvider provider); - - Builder from(AgentV1SettingsAgentSpeakOneItem other); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakOneItem build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

- */ - _FinalStage endpoint(Optional endpoint); - - _FinalStage endpoint(AgentV1SettingsAgentSpeakOneItemEndpoint endpoint); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ProviderStage, _FinalStage { - private AgentV1SettingsAgentSpeakOneItemProvider provider; - - private Optional endpoint = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakOneItem other) { - provider(other.getProvider()); - endpoint(other.getEndpoint()); - return this; - } - - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull AgentV1SettingsAgentSpeakOneItemProvider provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - /** - *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

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

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

- */ - @java.lang.Override - @JsonSetter(value = "endpoint", nulls = Nulls.SKIP) - public _FinalStage endpoint(Optional endpoint) { - this.endpoint = endpoint; - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakOneItem build() { - return new AgentV1SettingsAgentSpeakOneItem(provider, endpoint, 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/agent/v1/types/AgentV1SettingsAgentSpeakOneItemEndpoint.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemEndpoint.java deleted file mode 100644 index b64ce8c..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemEndpoint.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakOneItemEndpoint.Builder.class) -public final class AgentV1SettingsAgentSpeakOneItemEndpoint { - private final Optional url; - - private final Optional> headers; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakOneItemEndpoint( - Optional url, Optional> headers, Map additionalProperties) { - this.url = url; - this.headers = headers; - this.additionalProperties = additionalProperties; - } - - /** - * @return Custom TTS endpoint URL. Cannot contain output_format or model_id query parameters when the provider is Eleven Labs. - */ - @JsonProperty("url") - public Optional getUrl() { - return url; - } - - @JsonProperty("headers") - public Optional> getHeaders() { - return headers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakOneItemEndpoint - && equalTo((AgentV1SettingsAgentSpeakOneItemEndpoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakOneItemEndpoint other) { - return url.equals(other.url) && headers.equals(other.headers); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.url, this.headers); - } - - @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 { - private Optional url = Optional.empty(); - - private Optional> headers = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AgentV1SettingsAgentSpeakOneItemEndpoint other) { - url(other.getUrl()); - headers(other.getHeaders()); - return this; - } - - /** - *

Custom TTS endpoint URL. Cannot contain output_format or model_id query parameters when the provider is Eleven Labs.

- */ - @JsonSetter(value = "url", nulls = Nulls.SKIP) - public Builder url(Optional url) { - this.url = url; - return this; - } - - public Builder url(String url) { - this.url = Optional.ofNullable(url); - return this; - } - - @JsonSetter(value = "headers", nulls = Nulls.SKIP) - public Builder headers(Optional> headers) { - this.headers = headers; - return this; - } - - public Builder headers(Map headers) { - this.headers = Optional.ofNullable(headers); - return this; - } - - public AgentV1SettingsAgentSpeakOneItemEndpoint build() { - return new AgentV1SettingsAgentSpeakOneItemEndpoint(url, headers, 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/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.java deleted file mode 100644 index dddef28..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.Builder.class) -public final class AgentV1SettingsAgentSpeakOneItemProviderAwsPolly { - private final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice voice; - - private final String language; - - private final Optional languageCode; - - private final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine engine; - - private final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials credentials; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakOneItemProviderAwsPolly( - AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice voice, - String language, - Optional languageCode, - AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine engine, - AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials credentials, - Map additionalProperties) { - this.voice = voice; - this.language = language; - this.languageCode = languageCode; - this.engine = engine; - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - /** - * @return AWS Polly voice name - */ - @JsonProperty("voice") - public AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice getVoice() { - return voice; - } - - /** - * @return Language code to use, e.g. 'en-US'. Corresponds to the language_code parameter in the AWS Polly API - */ - @JsonProperty("language") - public String getLanguage() { - return language; - } - - /** - * @return Use the language field instead. - */ - @JsonProperty("language_code") - public Optional getLanguageCode() { - return languageCode; - } - - @JsonProperty("engine") - public AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine getEngine() { - return engine; - } - - @JsonProperty("credentials") - public AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakOneItemProviderAwsPolly - && equalTo((AgentV1SettingsAgentSpeakOneItemProviderAwsPolly) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakOneItemProviderAwsPolly other) { - return voice.equals(other.voice) - && language.equals(other.language) - && languageCode.equals(other.languageCode) - && engine.equals(other.engine) - && credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.voice, this.language, this.languageCode, this.engine, this.credentials); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static VoiceStage builder() { - return new Builder(); - } - - public interface VoiceStage { - /** - *

AWS Polly voice name

- */ - LanguageStage voice(@NotNull AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice voice); - - Builder from(AgentV1SettingsAgentSpeakOneItemProviderAwsPolly other); - } - - public interface LanguageStage { - /** - *

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

- */ - EngineStage language(@NotNull String language); - } - - public interface EngineStage { - CredentialsStage engine(@NotNull AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine engine); - } - - public interface CredentialsStage { - _FinalStage credentials(@NotNull AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials credentials); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakOneItemProviderAwsPolly build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Use the language field instead.

- */ - _FinalStage languageCode(Optional languageCode); - - _FinalStage languageCode(String languageCode); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements VoiceStage, LanguageStage, EngineStage, CredentialsStage, _FinalStage { - private AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice voice; - - private String language; - - private AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine engine; - - private AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials credentials; - - private Optional languageCode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakOneItemProviderAwsPolly other) { - voice(other.getVoice()); - language(other.getLanguage()); - languageCode(other.getLanguageCode()); - engine(other.getEngine()); - credentials(other.getCredentials()); - return this; - } - - /** - *

AWS Polly voice name

- *

AWS Polly voice name

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

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. - */ - @java.lang.Override - @JsonSetter("language") - public EngineStage language(@NotNull String language) { - this.language = Objects.requireNonNull(language, "language must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("engine") - public CredentialsStage engine(@NotNull AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine engine) { - this.engine = Objects.requireNonNull(engine, "engine must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("credentials") - public _FinalStage credentials( - @NotNull AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials credentials) { - this.credentials = Objects.requireNonNull(credentials, "credentials must not be null"); - return this; - } - - /** - *

Use the language field instead.

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

Use the language field instead.

- */ - @java.lang.Override - @JsonSetter(value = "language_code", nulls = Nulls.SKIP) - public _FinalStage languageCode(Optional languageCode) { - this.languageCode = languageCode; - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakOneItemProviderAwsPolly build() { - return new AgentV1SettingsAgentSpeakOneItemProviderAwsPolly( - voice, language, languageCode, engine, credentials, 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/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials.java deleted file mode 100644 index 909cdb6..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials.java +++ /dev/null @@ -1,240 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials.Builder.class) -public final class AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials { - private final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType type; - - private final String region; - - private final String accessKeyId; - - private final String secretAccessKey; - - private final Optional sessionToken; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials( - AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType type, - String region, - String accessKeyId, - String secretAccessKey, - Optional sessionToken, - Map additionalProperties) { - this.type = type; - this.region = region; - this.accessKeyId = accessKeyId; - this.secretAccessKey = secretAccessKey; - this.sessionToken = sessionToken; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType getType() { - return type; - } - - @JsonProperty("region") - public String getRegion() { - return region; - } - - @JsonProperty("access_key_id") - public String getAccessKeyId() { - return accessKeyId; - } - - @JsonProperty("secret_access_key") - public String getSecretAccessKey() { - return secretAccessKey; - } - - /** - * @return Required for STS only - */ - @JsonProperty("session_token") - public Optional getSessionToken() { - return sessionToken; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials - && equalTo((AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials other) { - return type.equals(other.type) - && region.equals(other.region) - && accessKeyId.equals(other.accessKeyId) - && secretAccessKey.equals(other.secretAccessKey) - && sessionToken.equals(other.sessionToken); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.region, this.accessKeyId, this.secretAccessKey, this.sessionToken); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - RegionStage type(@NotNull AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType type); - - Builder from(AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials other); - } - - public interface RegionStage { - AccessKeyIdStage region(@NotNull String region); - } - - public interface AccessKeyIdStage { - SecretAccessKeyStage accessKeyId(@NotNull String accessKeyId); - } - - public interface SecretAccessKeyStage { - _FinalStage secretAccessKey(@NotNull String secretAccessKey); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Required for STS only

- */ - _FinalStage sessionToken(Optional sessionToken); - - _FinalStage sessionToken(String sessionToken); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements TypeStage, RegionStage, AccessKeyIdStage, SecretAccessKeyStage, _FinalStage { - private AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType type; - - private String region; - - private String accessKeyId; - - private String secretAccessKey; - - private Optional sessionToken = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials other) { - type(other.getType()); - region(other.getRegion()); - accessKeyId(other.getAccessKeyId()); - secretAccessKey(other.getSecretAccessKey()); - sessionToken(other.getSessionToken()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public RegionStage type(@NotNull AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("region") - public AccessKeyIdStage region(@NotNull String region) { - this.region = Objects.requireNonNull(region, "region must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("access_key_id") - public SecretAccessKeyStage accessKeyId(@NotNull String accessKeyId) { - this.accessKeyId = Objects.requireNonNull(accessKeyId, "accessKeyId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("secret_access_key") - public _FinalStage secretAccessKey(@NotNull String secretAccessKey) { - this.secretAccessKey = Objects.requireNonNull(secretAccessKey, "secretAccessKey must not be null"); - return this; - } - - /** - *

Required for STS only

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

Required for STS only

- */ - @java.lang.Override - @JsonSetter(value = "session_token", nulls = Nulls.SKIP) - public _FinalStage sessionToken(Optional sessionToken) { - this.sessionToken = sessionToken; - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials build() { - return new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentials( - type, region, accessKeyId, secretAccessKey, sessionToken, 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/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType.java deleted file mode 100644 index ee66d77..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType { - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType IAM = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType(Value.IAM, "iam"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType STS = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType(Value.STS, "sts"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType(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 AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType - && this.string.equals( - ((AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case IAM: - return visitor.visitIam(); - case STS: - return visitor.visitSts(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType valueOf(String value) { - switch (value) { - case "iam": - return IAM; - case "sts": - return STS; - default: - return new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyCredentialsType(Value.UNKNOWN, value); - } - } - - public enum Value { - STS, - - IAM, - - UNKNOWN - } - - public interface Visitor { - T visitSts(); - - T visitIam(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine.java deleted file mode 100644 index 19fe132..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine { - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine LONG_FORM = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine(Value.LONG_FORM, "long-form"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine STANDARD = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine(Value.STANDARD, "standard"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine GENERATIVE = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine(Value.GENERATIVE, "generative"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine NEURAL = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine(Value.NEURAL, "neural"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine(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 AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine - && this.string.equals(((AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LONG_FORM: - return visitor.visitLongForm(); - case STANDARD: - return visitor.visitStandard(); - case GENERATIVE: - return visitor.visitGenerative(); - case NEURAL: - return visitor.visitNeural(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine valueOf(String value) { - switch (value) { - case "long-form": - return LONG_FORM; - case "standard": - return STANDARD; - case "generative": - return GENERATIVE; - case "neural": - return NEURAL; - default: - return new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyEngine(Value.UNKNOWN, value); - } - } - - public enum Value { - GENERATIVE, - - LONG_FORM, - - STANDARD, - - NEURAL, - - UNKNOWN - } - - public interface Visitor { - T visitGenerative(); - - T visitLongForm(); - - T visitStandard(); - - T visitNeural(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice.java deleted file mode 100644 index 58fc312..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice { - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice ARTHUR = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(Value.ARTHUR, "Arthur"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice JOANNA = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(Value.JOANNA, "Joanna"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice BRIAN = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(Value.BRIAN, "Brian"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice AMY = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(Value.AMY, "Amy"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice EMMA = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(Value.EMMA, "Emma"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice MATTHEW = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(Value.MATTHEW, "Matthew"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice ARIA = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(Value.ARIA, "Aria"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice AYANDA = - new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(Value.AYANDA, "Ayanda"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(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 AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice - && this.string.equals(((AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ARTHUR: - return visitor.visitArthur(); - case JOANNA: - return visitor.visitJoanna(); - case BRIAN: - return visitor.visitBrian(); - case AMY: - return visitor.visitAmy(); - case EMMA: - return visitor.visitEmma(); - case MATTHEW: - return visitor.visitMatthew(); - case ARIA: - return visitor.visitAria(); - case AYANDA: - return visitor.visitAyanda(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice valueOf(String value) { - switch (value) { - case "Arthur": - return ARTHUR; - case "Joanna": - return JOANNA; - case "Brian": - return BRIAN; - case "Amy": - return AMY; - case "Emma": - return EMMA; - case "Matthew": - return MATTHEW; - case "Aria": - return ARIA; - case "Ayanda": - return AYANDA; - default: - return new AgentV1SettingsAgentSpeakOneItemProviderAwsPollyVoice(Value.UNKNOWN, value); - } - } - - public enum Value { - MATTHEW, - - JOANNA, - - AMY, - - EMMA, - - BRIAN, - - ARTHUR, - - ARIA, - - AYANDA, - - UNKNOWN - } - - public interface Visitor { - T visitMatthew(); - - T visitJoanna(); - - T visitAmy(); - - T visitEmma(); - - T visitBrian(); - - T visitArthur(); - - T visitAria(); - - T visitAyanda(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId.java deleted file mode 100644 index d7c3a32..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId { - public static final AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId SONIC_MULTILINGUAL = - new AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId(Value.SONIC_MULTILINGUAL, "sonic-multilingual"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId SONIC2 = - new AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId(Value.SONIC2, "sonic-2"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId(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 AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId - && this.string.equals( - ((AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SONIC_MULTILINGUAL: - return visitor.visitSonicMultilingual(); - case SONIC2: - return visitor.visitSonic2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId valueOf(String value) { - switch (value) { - case "sonic-multilingual": - return SONIC_MULTILINGUAL; - case "sonic-2": - return SONIC2; - default: - return new AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId(Value.UNKNOWN, value); - } - } - - public enum Value { - SONIC2, - - SONIC_MULTILINGUAL, - - UNKNOWN - } - - public interface Visitor { - T visitSonic2(); - - T visitSonicMultilingual(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice.java deleted file mode 100644 index aafe663..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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 = AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice.Builder.class) -public final class AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice { - private final String mode; - - private final String id; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice( - String mode, String id, Map additionalProperties) { - this.mode = mode; - this.id = id; - this.additionalProperties = additionalProperties; - } - - /** - * @return Cartesia voice mode - */ - @JsonProperty("mode") - public String getMode() { - return mode; - } - - /** - * @return Cartesia voice ID - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice - && equalTo((AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice other) { - return mode.equals(other.mode) && id.equals(other.id); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mode, this.id); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModeStage builder() { - return new Builder(); - } - - public interface ModeStage { - /** - *

Cartesia voice mode

- */ - IdStage mode(@NotNull String mode); - - Builder from(AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice other); - } - - public interface IdStage { - /** - *

Cartesia voice ID

- */ - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModeStage, IdStage, _FinalStage { - private String mode; - - private String id; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice other) { - mode(other.getMode()); - id(other.getId()); - return this; - } - - /** - *

Cartesia voice mode

- *

Cartesia voice mode

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

Cartesia voice ID

- *

Cartesia voice ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public _FinalStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice build() { - return new AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice(mode, id, 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/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel.java deleted file mode 100644 index 0d9c18a..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel.java +++ /dev/null @@ -1,757 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel { - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_ANGUS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_ANGUS_EN, "aura-angus-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2JUPITER_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2CORA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2CORA_EN, "aura-2-cora-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_STELLA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_STELLA_EN, "aura-stella-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2HELENA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2HELENA_EN, "aura-2-helena-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2AQUILA_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ATLAS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ORION_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ORION_EN, "aura-2-orion-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2DRACO_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2DRACO_EN, "aura-2-draco-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2HYPERION_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2JANUS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2JANUS_EN, "aura-2-janus-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_HELIOS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_HELIOS_EN, "aura-helios-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2PLUTO_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ARCAS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2NESTOR_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2NEPTUNE_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2MINERVA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ALVARO_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_ATHENA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_ATHENA_EN, "aura-athena-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_PERSEUS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_PERSEUS_EN, "aura-perseus-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ODYSSEUS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2PANDORA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ZEUS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ELECTRA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ORPHEUS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2THALIA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2THALIA_EN, "aura-2-thalia-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2CELESTE_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_ASTERIA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_ASTERIA_EN, "aura-asteria-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ESTRELLA_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2HERA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2HERA_EN, "aura-2-hera-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2MARS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2MARS_EN, "aura-2-mars-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2SIRIO_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ASTERIA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2HERMES_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2HERMES_EN, "aura-2-hermes-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2VESTA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2VESTA_EN, "aura-2-vesta-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2CARINA_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2CARINA_ES, "aura-2-carina-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2CALLISTA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2HARMONIA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2SELENA_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2SELENA_ES, "aura-2-selena-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2AURORA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2AURORA_EN, "aura-2-aurora-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_ZEUS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_ZEUS_EN, "aura-zeus-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2OPHELIA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2AMALTHEA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_ORPHEUS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2DELIA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2DELIA_EN, "aura-2-delia-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_LUNA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_LUNA_EN, "aura-luna-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2APOLLO_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2SELENE_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2SELENE_EN, "aura-2-selene-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2THEIA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2THEIA_EN, "aura-2-theia-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_HERA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_HERA_EN, "aura-hera-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2CORDELIA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ANDROMEDA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ARIES_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ARIES_EN, "aura-2-aries-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2JUNO_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2JUNO_EN, "aura-2-juno-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2LUNA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2LUNA_EN, "aura-2-luna-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2DIANA_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2DIANA_ES, "aura-2-diana-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2JAVIER_ES = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2JAVIER_ES, "aura-2-javier-es"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_ORION_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_ORION_EN, "aura-orion-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA_ARCAS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA_ARCAS_EN, "aura-arcas-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2IRIS_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2IRIS_EN, "aura-2-iris-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2ATHENA_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2ATHENA_EN, "aura-2-athena-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2SATURN_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2SATURN_EN, "aura-2-saturn-en"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel AURA2PHOEBE_EN = - new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(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 AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel - && this.string.equals(((AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AURA_ANGUS_EN: - return visitor.visitAuraAngusEn(); - case AURA2JUPITER_EN: - return visitor.visitAura2JupiterEn(); - case AURA2CORA_EN: - return visitor.visitAura2CoraEn(); - case AURA_STELLA_EN: - return visitor.visitAuraStellaEn(); - case AURA2HELENA_EN: - return visitor.visitAura2HelenaEn(); - case AURA2AQUILA_ES: - return visitor.visitAura2AquilaEs(); - case AURA2ATLAS_EN: - return visitor.visitAura2AtlasEn(); - case AURA2ORION_EN: - return visitor.visitAura2OrionEn(); - case AURA2DRACO_EN: - return visitor.visitAura2DracoEn(); - case AURA2HYPERION_EN: - return visitor.visitAura2HyperionEn(); - case AURA2JANUS_EN: - return visitor.visitAura2JanusEn(); - case AURA_HELIOS_EN: - return visitor.visitAuraHeliosEn(); - case AURA2PLUTO_EN: - return visitor.visitAura2PlutoEn(); - case AURA2ARCAS_EN: - return visitor.visitAura2ArcasEn(); - case AURA2NESTOR_ES: - return visitor.visitAura2NestorEs(); - case AURA2NEPTUNE_EN: - return visitor.visitAura2NeptuneEn(); - case AURA2MINERVA_EN: - return visitor.visitAura2MinervaEn(); - case AURA2ALVARO_ES: - return visitor.visitAura2AlvaroEs(); - case AURA_ATHENA_EN: - return visitor.visitAuraAthenaEn(); - case AURA_PERSEUS_EN: - return visitor.visitAuraPerseusEn(); - case AURA2ODYSSEUS_EN: - return visitor.visitAura2OdysseusEn(); - case AURA2PANDORA_EN: - return visitor.visitAura2PandoraEn(); - case AURA2ZEUS_EN: - return visitor.visitAura2ZeusEn(); - case AURA2ELECTRA_EN: - return visitor.visitAura2ElectraEn(); - case AURA2ORPHEUS_EN: - return visitor.visitAura2OrpheusEn(); - case AURA2THALIA_EN: - return visitor.visitAura2ThaliaEn(); - case AURA2CELESTE_ES: - return visitor.visitAura2CelesteEs(); - case AURA_ASTERIA_EN: - return visitor.visitAuraAsteriaEn(); - case AURA2ESTRELLA_ES: - return visitor.visitAura2EstrellaEs(); - case AURA2HERA_EN: - return visitor.visitAura2HeraEn(); - case AURA2MARS_EN: - return visitor.visitAura2MarsEn(); - case AURA2SIRIO_ES: - return visitor.visitAura2SirioEs(); - case AURA2ASTERIA_EN: - return visitor.visitAura2AsteriaEn(); - case AURA2HERMES_EN: - return visitor.visitAura2HermesEn(); - case AURA2VESTA_EN: - return visitor.visitAura2VestaEn(); - case AURA2CARINA_ES: - return visitor.visitAura2CarinaEs(); - case AURA2CALLISTA_EN: - return visitor.visitAura2CallistaEn(); - case AURA2HARMONIA_EN: - return visitor.visitAura2HarmoniaEn(); - case AURA2SELENA_ES: - return visitor.visitAura2SelenaEs(); - case AURA2AURORA_EN: - return visitor.visitAura2AuroraEn(); - case AURA_ZEUS_EN: - return visitor.visitAuraZeusEn(); - case AURA2OPHELIA_EN: - return visitor.visitAura2OpheliaEn(); - case AURA2AMALTHEA_EN: - return visitor.visitAura2AmaltheaEn(); - case AURA_ORPHEUS_EN: - return visitor.visitAuraOrpheusEn(); - case AURA2DELIA_EN: - return visitor.visitAura2DeliaEn(); - case AURA_LUNA_EN: - return visitor.visitAuraLunaEn(); - case AURA2APOLLO_EN: - return visitor.visitAura2ApolloEn(); - case AURA2SELENE_EN: - return visitor.visitAura2SeleneEn(); - case AURA2THEIA_EN: - return visitor.visitAura2TheiaEn(); - case AURA_HERA_EN: - return visitor.visitAuraHeraEn(); - case AURA2CORDELIA_EN: - return visitor.visitAura2CordeliaEn(); - case AURA2ANDROMEDA_EN: - return visitor.visitAura2AndromedaEn(); - case AURA2ARIES_EN: - return visitor.visitAura2AriesEn(); - case AURA2JUNO_EN: - return visitor.visitAura2JunoEn(); - case AURA2LUNA_EN: - return visitor.visitAura2LunaEn(); - case AURA2DIANA_ES: - return visitor.visitAura2DianaEs(); - case AURA2JAVIER_ES: - return visitor.visitAura2JavierEs(); - case AURA_ORION_EN: - return visitor.visitAuraOrionEn(); - case AURA_ARCAS_EN: - return visitor.visitAuraArcasEn(); - case AURA2IRIS_EN: - return visitor.visitAura2IrisEn(); - case AURA2ATHENA_EN: - return visitor.visitAura2AthenaEn(); - case AURA2SATURN_EN: - return visitor.visitAura2SaturnEn(); - case AURA2PHOEBE_EN: - return visitor.visitAura2PhoebeEn(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel valueOf(String value) { - switch (value) { - case "aura-angus-en": - return AURA_ANGUS_EN; - case "aura-2-jupiter-en": - return AURA2JUPITER_EN; - case "aura-2-cora-en": - return AURA2CORA_EN; - case "aura-stella-en": - return AURA_STELLA_EN; - case "aura-2-helena-en": - return AURA2HELENA_EN; - case "aura-2-aquila-es": - return AURA2AQUILA_ES; - case "aura-2-atlas-en": - return AURA2ATLAS_EN; - case "aura-2-orion-en": - return AURA2ORION_EN; - case "aura-2-draco-en": - return AURA2DRACO_EN; - case "aura-2-hyperion-en": - return AURA2HYPERION_EN; - case "aura-2-janus-en": - return AURA2JANUS_EN; - case "aura-helios-en": - return AURA_HELIOS_EN; - case "aura-2-pluto-en": - return AURA2PLUTO_EN; - case "aura-2-arcas-en": - return AURA2ARCAS_EN; - case "aura-2-nestor-es": - return AURA2NESTOR_ES; - case "aura-2-neptune-en": - return AURA2NEPTUNE_EN; - case "aura-2-minerva-en": - return AURA2MINERVA_EN; - case "aura-2-alvaro-es": - return AURA2ALVARO_ES; - case "aura-athena-en": - return AURA_ATHENA_EN; - case "aura-perseus-en": - return AURA_PERSEUS_EN; - case "aura-2-odysseus-en": - return AURA2ODYSSEUS_EN; - case "aura-2-pandora-en": - return AURA2PANDORA_EN; - case "aura-2-zeus-en": - return AURA2ZEUS_EN; - case "aura-2-electra-en": - return AURA2ELECTRA_EN; - case "aura-2-orpheus-en": - return AURA2ORPHEUS_EN; - case "aura-2-thalia-en": - return AURA2THALIA_EN; - case "aura-2-celeste-es": - return AURA2CELESTE_ES; - case "aura-asteria-en": - return AURA_ASTERIA_EN; - case "aura-2-estrella-es": - return AURA2ESTRELLA_ES; - case "aura-2-hera-en": - return AURA2HERA_EN; - case "aura-2-mars-en": - return AURA2MARS_EN; - case "aura-2-sirio-es": - return AURA2SIRIO_ES; - case "aura-2-asteria-en": - return AURA2ASTERIA_EN; - case "aura-2-hermes-en": - return AURA2HERMES_EN; - case "aura-2-vesta-en": - return AURA2VESTA_EN; - case "aura-2-carina-es": - return AURA2CARINA_ES; - case "aura-2-callista-en": - return AURA2CALLISTA_EN; - case "aura-2-harmonia-en": - return AURA2HARMONIA_EN; - case "aura-2-selena-es": - return AURA2SELENA_ES; - case "aura-2-aurora-en": - return AURA2AURORA_EN; - case "aura-zeus-en": - return AURA_ZEUS_EN; - case "aura-2-ophelia-en": - return AURA2OPHELIA_EN; - case "aura-2-amalthea-en": - return AURA2AMALTHEA_EN; - case "aura-orpheus-en": - return AURA_ORPHEUS_EN; - case "aura-2-delia-en": - return AURA2DELIA_EN; - case "aura-luna-en": - return AURA_LUNA_EN; - case "aura-2-apollo-en": - return AURA2APOLLO_EN; - case "aura-2-selene-en": - return AURA2SELENE_EN; - case "aura-2-theia-en": - return AURA2THEIA_EN; - case "aura-hera-en": - return AURA_HERA_EN; - case "aura-2-cordelia-en": - return AURA2CORDELIA_EN; - case "aura-2-andromeda-en": - return AURA2ANDROMEDA_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 "aura-2-diana-es": - return AURA2DIANA_ES; - case "aura-2-javier-es": - return AURA2JAVIER_ES; - case "aura-orion-en": - return AURA_ORION_EN; - case "aura-arcas-en": - return AURA_ARCAS_EN; - case "aura-2-iris-en": - return AURA2IRIS_EN; - case "aura-2-athena-en": - return AURA2ATHENA_EN; - case "aura-2-saturn-en": - return AURA2SATURN_EN; - case "aura-2-phoebe-en": - return AURA2PHOEBE_EN; - default: - return new AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel(Value.UNKNOWN, value); - } - } - - public enum Value { - AURA_ASTERIA_EN, - - AURA_LUNA_EN, - - AURA_STELLA_EN, - - AURA_ATHENA_EN, - - AURA_HERA_EN, - - AURA_ORION_EN, - - AURA_ARCAS_EN, - - AURA_PERSEUS_EN, - - AURA_ANGUS_EN, - - AURA_ORPHEUS_EN, - - AURA_HELIOS_EN, - - AURA_ZEUS_EN, - - AURA2AMALTHEA_EN, - - AURA2ANDROMEDA_EN, - - AURA2APOLLO_EN, - - AURA2ARCAS_EN, - - AURA2ARIES_EN, - - AURA2ASTERIA_EN, - - AURA2ATHENA_EN, - - AURA2ATLAS_EN, - - AURA2AURORA_EN, - - AURA2CALLISTA_EN, - - AURA2CORA_EN, - - AURA2CORDELIA_EN, - - AURA2DELIA_EN, - - AURA2DRACO_EN, - - AURA2ELECTRA_EN, - - AURA2HARMONIA_EN, - - AURA2HELENA_EN, - - AURA2HERA_EN, - - AURA2HERMES_EN, - - AURA2HYPERION_EN, - - AURA2IRIS_EN, - - AURA2JANUS_EN, - - AURA2JUNO_EN, - - AURA2JUPITER_EN, - - AURA2LUNA_EN, - - AURA2MARS_EN, - - AURA2MINERVA_EN, - - AURA2NEPTUNE_EN, - - AURA2ODYSSEUS_EN, - - AURA2OPHELIA_EN, - - AURA2ORION_EN, - - AURA2ORPHEUS_EN, - - AURA2PANDORA_EN, - - AURA2PHOEBE_EN, - - AURA2PLUTO_EN, - - AURA2SATURN_EN, - - AURA2SELENE_EN, - - AURA2THALIA_EN, - - AURA2THEIA_EN, - - AURA2VESTA_EN, - - AURA2ZEUS_EN, - - AURA2SIRIO_ES, - - AURA2NESTOR_ES, - - AURA2CARINA_ES, - - AURA2CELESTE_ES, - - AURA2ALVARO_ES, - - AURA2DIANA_ES, - - AURA2AQUILA_ES, - - AURA2SELENA_ES, - - AURA2ESTRELLA_ES, - - AURA2JAVIER_ES, - - UNKNOWN - } - - public interface Visitor { - T visitAuraAsteriaEn(); - - T visitAuraLunaEn(); - - T visitAuraStellaEn(); - - T visitAuraAthenaEn(); - - T visitAuraHeraEn(); - - T visitAuraOrionEn(); - - T visitAuraArcasEn(); - - T visitAuraPerseusEn(); - - T visitAuraAngusEn(); - - T visitAuraOrpheusEn(); - - T visitAuraHeliosEn(); - - T visitAuraZeusEn(); - - T visitAura2AmaltheaEn(); - - T visitAura2AndromedaEn(); - - T visitAura2ApolloEn(); - - T visitAura2ArcasEn(); - - T visitAura2AriesEn(); - - T visitAura2AsteriaEn(); - - T visitAura2AthenaEn(); - - T visitAura2AtlasEn(); - - T visitAura2AuroraEn(); - - T visitAura2CallistaEn(); - - T visitAura2CoraEn(); - - T visitAura2CordeliaEn(); - - T visitAura2DeliaEn(); - - T visitAura2DracoEn(); - - T visitAura2ElectraEn(); - - T visitAura2HarmoniaEn(); - - T visitAura2HelenaEn(); - - T visitAura2HeraEn(); - - T visitAura2HermesEn(); - - T visitAura2HyperionEn(); - - T visitAura2IrisEn(); - - T visitAura2JanusEn(); - - T visitAura2JunoEn(); - - T visitAura2JupiterEn(); - - T visitAura2LunaEn(); - - T visitAura2MarsEn(); - - T visitAura2MinervaEn(); - - T visitAura2NeptuneEn(); - - T visitAura2OdysseusEn(); - - T visitAura2OpheliaEn(); - - T visitAura2OrionEn(); - - T visitAura2OrpheusEn(); - - T visitAura2PandoraEn(); - - T visitAura2PhoebeEn(); - - T visitAura2PlutoEn(); - - T visitAura2SaturnEn(); - - T visitAura2SeleneEn(); - - T visitAura2ThaliaEn(); - - T visitAura2TheiaEn(); - - T visitAura2VestaEn(); - - T visitAura2ZeusEn(); - - T visitAura2SirioEs(); - - T visitAura2NestorEs(); - - T visitAura2CarinaEs(); - - T visitAura2CelesteEs(); - - T visitAura2AlvaroEs(); - - T visitAura2DianaEs(); - - T visitAura2AquilaEs(); - - T visitAura2SelenaEs(); - - T visitAura2EstrellaEs(); - - T visitAura2JavierEs(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId.java deleted file mode 100644 index 2eba0e3..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId { - public static final AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId ELEVEN_TURBO_V25 = - new AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId(Value.ELEVEN_TURBO_V25, "eleven_turbo_v2_5"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId ELEVEN_MONOLINGUAL_V1 = - new AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId( - Value.ELEVEN_MONOLINGUAL_V1, "eleven_monolingual_v1"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId ELEVEN_MULTILINGUAL_V2 = - new AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId( - Value.ELEVEN_MULTILINGUAL_V2, "eleven_multilingual_v2"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId(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 AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId - && this.string.equals( - ((AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ELEVEN_TURBO_V25: - return visitor.visitElevenTurboV25(); - case ELEVEN_MONOLINGUAL_V1: - return visitor.visitElevenMonolingualV1(); - case ELEVEN_MULTILINGUAL_V2: - return visitor.visitElevenMultilingualV2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId valueOf(String value) { - switch (value) { - case "eleven_turbo_v2_5": - return ELEVEN_TURBO_V25; - case "eleven_monolingual_v1": - return ELEVEN_MONOLINGUAL_V1; - case "eleven_multilingual_v2": - return ELEVEN_MULTILINGUAL_V2; - default: - return new AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId(Value.UNKNOWN, value); - } - } - - public enum Value { - ELEVEN_TURBO_V25, - - ELEVEN_MONOLINGUAL_V1, - - ELEVEN_MULTILINGUAL_V2, - - UNKNOWN - } - - public interface Visitor { - T visitElevenTurboV25(); - - T visitElevenMonolingualV1(); - - T visitElevenMultilingualV2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAi.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAi.java deleted file mode 100644 index 64893ff..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAi.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1SettingsAgentSpeakOneItemProviderOpenAi.Builder.class) -public final class AgentV1SettingsAgentSpeakOneItemProviderOpenAi { - private final Optional version; - - private final AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel model; - - private final AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice voice; - - private final Map additionalProperties; - - private AgentV1SettingsAgentSpeakOneItemProviderOpenAi( - Optional version, - AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel model, - AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice voice, - Map additionalProperties) { - this.version = version; - this.model = model; - this.voice = voice; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the OpenAI text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return OpenAI TTS model - */ - @JsonProperty("model") - public AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel getModel() { - return model; - } - - /** - * @return OpenAI voice - */ - @JsonProperty("voice") - public AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice getVoice() { - return voice; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakOneItemProviderOpenAi - && equalTo((AgentV1SettingsAgentSpeakOneItemProviderOpenAi) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentSpeakOneItemProviderOpenAi other) { - return version.equals(other.version) && model.equals(other.model) && voice.equals(other.voice); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.model, this.voice); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelStage builder() { - return new Builder(); - } - - public interface ModelStage { - /** - *

OpenAI TTS model

- */ - VoiceStage model(@NotNull AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel model); - - Builder from(AgentV1SettingsAgentSpeakOneItemProviderOpenAi other); - } - - public interface VoiceStage { - /** - *

OpenAI voice

- */ - _FinalStage voice(@NotNull AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice voice); - } - - public interface _FinalStage { - AgentV1SettingsAgentSpeakOneItemProviderOpenAi build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

- */ - _FinalStage version(Optional version); - - _FinalStage version(String version); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelStage, VoiceStage, _FinalStage { - private AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel model; - - private AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice voice; - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentSpeakOneItemProviderOpenAi other) { - version(other.getVersion()); - model(other.getModel()); - voice(other.getVoice()); - return this; - } - - /** - *

OpenAI TTS model

- *

OpenAI TTS model

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

OpenAI voice

- *

OpenAI voice

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentSpeakOneItemProviderOpenAi build() { - return new AgentV1SettingsAgentSpeakOneItemProviderOpenAi(version, model, voice, 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/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel.java deleted file mode 100644 index 29cf255..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel { - public static final AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel TTS1HD = - new AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel(Value.TTS1HD, "tts-1-hd"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel TTS1 = - new AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel(Value.TTS1, "tts-1"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel(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 AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel - && this.string.equals(((AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TTS1HD: - return visitor.visitTts1Hd(); - case TTS1: - return visitor.visitTts1(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel valueOf(String value) { - switch (value) { - case "tts-1-hd": - return TTS1HD; - case "tts-1": - return TTS1; - default: - return new AgentV1SettingsAgentSpeakOneItemProviderOpenAiModel(Value.UNKNOWN, value); - } - } - - public enum Value { - TTS1, - - TTS1HD, - - UNKNOWN - } - - public interface Visitor { - T visitTts1(); - - T visitTts1Hd(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice.java deleted file mode 100644 index dbd6f7e..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice { - public static final AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice SHIMMER = - new AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice(Value.SHIMMER, "shimmer"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice FABLE = - new AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice(Value.FABLE, "fable"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice ALLOY = - new AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice(Value.ALLOY, "alloy"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice ONYX = - new AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice(Value.ONYX, "onyx"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice NOVA = - new AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice(Value.NOVA, "nova"); - - public static final AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice ECHO = - new AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice(Value.ECHO, "echo"); - - private final Value value; - - private final String string; - - AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice(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 AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice - && this.string.equals(((AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHIMMER: - return visitor.visitShimmer(); - case FABLE: - return visitor.visitFable(); - case ALLOY: - return visitor.visitAlloy(); - case ONYX: - return visitor.visitOnyx(); - case NOVA: - return visitor.visitNova(); - case ECHO: - return visitor.visitEcho(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice valueOf(String value) { - switch (value) { - case "shimmer": - return SHIMMER; - case "fable": - return FABLE; - case "alloy": - return ALLOY; - case "onyx": - return ONYX; - case "nova": - return NOVA; - case "echo": - return ECHO; - default: - return new AgentV1SettingsAgentSpeakOneItemProviderOpenAiVoice(Value.UNKNOWN, value); - } - } - - public enum Value { - ALLOY, - - ECHO, - - FABLE, - - ONYX, - - NOVA, - - SHIMMER, - - UNKNOWN - } - - public interface Visitor { - T visitAlloy(); - - T visitEcho(); - - T visitFable(); - - T visitOnyx(); - - T visitNova(); - - T visitShimmer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThink.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThink.java index 4e53619..351823f 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThink.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThink.java @@ -37,7 +37,7 @@ public T visit(Visitor visitor) { if (this.type == 0) { return visitor.visit((ThinkSettingsV1) this.value); } else if (this.type == 1) { - return visitor.visit((List) this.value); + return visitor.visit((List) this.value); } throw new IllegalStateException("Failed to visit value. This should never happen."); } @@ -66,14 +66,14 @@ public static AgentV1SettingsAgentThink of(ThinkSettingsV1 value) { return new AgentV1SettingsAgentThink(value, 0); } - public static AgentV1SettingsAgentThink of(List value) { + public static AgentV1SettingsAgentThink of(List value) { return new AgentV1SettingsAgentThink(value, 1); } public interface Visitor { T visit(ThinkSettingsV1 value); - T visit(List value); + T visit(List value); } static final class Deserializer extends StdDeserializer { @@ -89,8 +89,7 @@ public AgentV1SettingsAgentThink deserialize(JsonParser p, DeserializationContex } catch (RuntimeException e) { } try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, new TypeReference>() {})); + return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); } catch (RuntimeException e) { } throw new JsonParseException(p, "Failed to deserialize"); diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItem.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItem.java deleted file mode 100644 index f14c149..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItem.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1SettingsAgentThinkOneItem.Builder.class) -public final class AgentV1SettingsAgentThinkOneItem { - private final AgentV1SettingsAgentThinkOneItemProvider provider; - - private final Optional endpoint; - - private final Optional> functions; - - private final Optional prompt; - - private final Optional contextLength; - - private final Map additionalProperties; - - private AgentV1SettingsAgentThinkOneItem( - AgentV1SettingsAgentThinkOneItemProvider provider, - Optional endpoint, - Optional> functions, - Optional prompt, - Optional contextLength, - Map additionalProperties) { - this.provider = provider; - this.endpoint = endpoint; - this.functions = functions; - this.prompt = prompt; - this.contextLength = contextLength; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public AgentV1SettingsAgentThinkOneItemProvider getProvider() { - return provider; - } - - /** - * @return Optional for non-Deepgram LLM providers. When present, must include url field and headers object - */ - @JsonProperty("endpoint") - public Optional getEndpoint() { - return endpoint; - } - - @JsonProperty("functions") - public Optional> getFunctions() { - return functions; - } - - @JsonProperty("prompt") - public Optional getPrompt() { - return prompt; - } - - /** - * @return Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used - */ - @JsonProperty("context_length") - public Optional getContextLength() { - return contextLength; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentThinkOneItem && equalTo((AgentV1SettingsAgentThinkOneItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1SettingsAgentThinkOneItem other) { - return provider.equals(other.provider) - && endpoint.equals(other.endpoint) - && functions.equals(other.functions) - && prompt.equals(other.prompt) - && contextLength.equals(other.contextLength); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider, this.endpoint, this.functions, this.prompt, this.contextLength); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ProviderStage builder() { - return new Builder(); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull AgentV1SettingsAgentThinkOneItemProvider provider); - - Builder from(AgentV1SettingsAgentThinkOneItem other); - } - - public interface _FinalStage { - AgentV1SettingsAgentThinkOneItem build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Optional for non-Deepgram LLM providers. When present, must include url field and headers object

- */ - _FinalStage endpoint(Optional endpoint); - - _FinalStage endpoint(AgentV1SettingsAgentThinkOneItemEndpoint endpoint); - - _FinalStage functions(Optional> functions); - - _FinalStage functions(List functions); - - _FinalStage prompt(Optional prompt); - - _FinalStage prompt(String prompt); - - /** - *

Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used

- */ - _FinalStage contextLength(Optional contextLength); - - _FinalStage contextLength(AgentV1SettingsAgentThinkOneItemContextLength contextLength); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ProviderStage, _FinalStage { - private AgentV1SettingsAgentThinkOneItemProvider provider; - - private Optional contextLength = Optional.empty(); - - private Optional prompt = Optional.empty(); - - private Optional> functions = Optional.empty(); - - private Optional endpoint = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1SettingsAgentThinkOneItem other) { - provider(other.getProvider()); - endpoint(other.getEndpoint()); - functions(other.getFunctions()); - prompt(other.getPrompt()); - contextLength(other.getContextLength()); - return this; - } - - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull AgentV1SettingsAgentThinkOneItemProvider provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - /** - *

Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used

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

Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used

- */ - @java.lang.Override - @JsonSetter(value = "context_length", nulls = Nulls.SKIP) - public _FinalStage contextLength(Optional contextLength) { - this.contextLength = contextLength; - return this; - } - - @java.lang.Override - public _FinalStage prompt(String prompt) { - this.prompt = Optional.ofNullable(prompt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "prompt", nulls = Nulls.SKIP) - public _FinalStage prompt(Optional prompt) { - this.prompt = prompt; - return this; - } - - @java.lang.Override - public _FinalStage functions(List functions) { - this.functions = Optional.ofNullable(functions); - return this; - } - - @java.lang.Override - @JsonSetter(value = "functions", nulls = Nulls.SKIP) - public _FinalStage functions(Optional> functions) { - this.functions = functions; - return this; - } - - /** - *

Optional for non-Deepgram LLM providers. When present, must include url field and headers object

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

Optional for non-Deepgram LLM providers. When present, must include url field and headers object

- */ - @java.lang.Override - @JsonSetter(value = "endpoint", nulls = Nulls.SKIP) - public _FinalStage endpoint(Optional endpoint) { - this.endpoint = endpoint; - return this; - } - - @java.lang.Override - public AgentV1SettingsAgentThinkOneItem build() { - return new AgentV1SettingsAgentThinkOneItem( - provider, endpoint, functions, prompt, contextLength, 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/agent/v1/types/AgentV1SettingsAgentThinkOneItemProvider.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemProvider.java deleted file mode 100644 index 2747dff..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemProvider.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.deepgram.core.ObjectMappers; -import com.deepgram.types.Anthropic; -import com.deepgram.types.AwsBedrockThinkProvider; -import com.deepgram.types.Google; -import com.deepgram.types.Groq; -import com.deepgram.types.OpenAiThinkProvider; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import java.io.IOException; -import java.util.Objects; - -@JsonDeserialize(using = AgentV1SettingsAgentThinkOneItemProvider.Deserializer.class) -public final class AgentV1SettingsAgentThinkOneItemProvider { - private final Object value; - - private final int type; - - private AgentV1SettingsAgentThinkOneItemProvider(Object value, int type) { - this.value = value; - this.type = type; - } - - @JsonValue - public Object get() { - return this.value; - } - - @SuppressWarnings("unchecked") - public T visit(Visitor visitor) { - if (this.type == 0) { - return visitor.visit((OpenAiThinkProvider) this.value); - } else if (this.type == 1) { - return visitor.visit((AwsBedrockThinkProvider) this.value); - } else if (this.type == 2) { - return visitor.visit((Anthropic) this.value); - } else if (this.type == 3) { - return visitor.visit((Google) this.value); - } else if (this.type == 4) { - return visitor.visit((Groq) this.value); - } - throw new IllegalStateException("Failed to visit value. This should never happen."); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1SettingsAgentThinkOneItemProvider - && equalTo((AgentV1SettingsAgentThinkOneItemProvider) other); - } - - private boolean equalTo(AgentV1SettingsAgentThinkOneItemProvider other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return this.value.toString(); - } - - public static AgentV1SettingsAgentThinkOneItemProvider of(OpenAiThinkProvider value) { - return new AgentV1SettingsAgentThinkOneItemProvider(value, 0); - } - - public static AgentV1SettingsAgentThinkOneItemProvider of(AwsBedrockThinkProvider value) { - return new AgentV1SettingsAgentThinkOneItemProvider(value, 1); - } - - public static AgentV1SettingsAgentThinkOneItemProvider of(Anthropic value) { - return new AgentV1SettingsAgentThinkOneItemProvider(value, 2); - } - - public static AgentV1SettingsAgentThinkOneItemProvider of(Google value) { - return new AgentV1SettingsAgentThinkOneItemProvider(value, 3); - } - - public static AgentV1SettingsAgentThinkOneItemProvider of(Groq value) { - return new AgentV1SettingsAgentThinkOneItemProvider(value, 4); - } - - public interface Visitor { - T visit(OpenAiThinkProvider value); - - T visit(AwsBedrockThinkProvider value); - - T visit(Anthropic value); - - T visit(Google value); - - T visit(Groq value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(AgentV1SettingsAgentThinkOneItemProvider.class); - } - - @java.lang.Override - public AgentV1SettingsAgentThinkOneItemProvider deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, OpenAiThinkProvider.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AwsBedrockThinkProvider.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, Anthropic.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, Google.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, Groq.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} 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 65d7ae3..714c93d 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 @@ -21,12 +21,12 @@ public final class AgentV1SettingsAudioInput { private final AgentV1SettingsAudioInputEncoding encoding; - private final double sampleRate; + private final int sampleRate; private final Map additionalProperties; private AgentV1SettingsAudioInput( - AgentV1SettingsAudioInputEncoding encoding, double sampleRate, Map additionalProperties) { + AgentV1SettingsAudioInputEncoding encoding, int sampleRate, Map additionalProperties) { this.encoding = encoding; this.sampleRate = sampleRate; this.additionalProperties = additionalProperties; @@ -44,7 +44,7 @@ public AgentV1SettingsAudioInputEncoding getEncoding() { * @return Sample rate in Hz. Common values are 16000, 24000, 44100, 48000 */ @JsonProperty("sample_rate") - public double getSampleRate() { + public int getSampleRate() { return sampleRate; } @@ -90,7 +90,7 @@ public interface SampleRateStage { /** *

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

*/ - _FinalStage sampleRate(double sampleRate); + _FinalStage sampleRate(int sampleRate); } public interface _FinalStage { @@ -105,7 +105,7 @@ public interface _FinalStage { public static final class Builder implements EncodingStage, SampleRateStage, _FinalStage { private AgentV1SettingsAudioInputEncoding encoding; - private double sampleRate; + private int sampleRate; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -138,7 +138,7 @@ public SampleRateStage encoding(@NotNull AgentV1SettingsAudioInputEncoding encod */ @java.lang.Override @JsonSetter("sample_rate") - public _FinalStage sampleRate(double sampleRate) { + public _FinalStage sampleRate(int sampleRate) { this.sampleRate = sampleRate; return this; } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioInputEncoding.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioInputEncoding.java index a80a2b3..d36688d 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioInputEncoding.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioInputEncoding.java @@ -16,12 +16,12 @@ public final class AgentV1SettingsAudioInputEncoding { public static final AgentV1SettingsAudioInputEncoding LINEAR32 = new AgentV1SettingsAudioInputEncoding(Value.LINEAR32, "linear32"); - public static final AgentV1SettingsAudioInputEncoding OGG_OPUS = - new AgentV1SettingsAudioInputEncoding(Value.OGG_OPUS, "ogg-opus"); - public static final AgentV1SettingsAudioInputEncoding FLAC = new AgentV1SettingsAudioInputEncoding(Value.FLAC, "flac"); + public static final AgentV1SettingsAudioInputEncoding OGG_OPUS = + new AgentV1SettingsAudioInputEncoding(Value.OGG_OPUS, "ogg-opus"); + public static final AgentV1SettingsAudioInputEncoding SPEEX = new AgentV1SettingsAudioInputEncoding(Value.SPEEX, "speex"); @@ -79,10 +79,10 @@ public T visit(Visitor visitor) { return visitor.visitAmrWb(); case LINEAR32: return visitor.visitLinear32(); - case OGG_OPUS: - return visitor.visitOggOpus(); case FLAC: return visitor.visitFlac(); + case OGG_OPUS: + return visitor.visitOggOpus(); case SPEEX: return visitor.visitSpeex(); case LINEAR16: @@ -110,10 +110,10 @@ public static AgentV1SettingsAudioInputEncoding valueOf(String value) { return AMR_WB; case "linear32": return LINEAR32; - case "ogg-opus": - return OGG_OPUS; case "flac": return FLAC; + case "ogg-opus": + return OGG_OPUS; case "speex": return SPEEX; case "linear16": diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioOutput.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioOutput.java index 560236d..ef3e247 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioOutput.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAudioOutput.java @@ -22,9 +22,9 @@ public final class AgentV1SettingsAudioOutput { private final Optional encoding; - private final Optional sampleRate; + private final Optional sampleRate; - private final Optional bitrate; + private final Optional bitrate; private final Optional container; @@ -32,8 +32,8 @@ public final class AgentV1SettingsAudioOutput { private AgentV1SettingsAudioOutput( Optional encoding, - Optional sampleRate, - Optional bitrate, + Optional sampleRate, + Optional bitrate, Optional container, Map additionalProperties) { this.encoding = encoding; @@ -55,7 +55,7 @@ public Optional getEncoding() { * @return Sample rate in Hz */ @JsonProperty("sample_rate") - public Optional getSampleRate() { + public Optional getSampleRate() { return sampleRate; } @@ -63,7 +63,7 @@ public Optional getSampleRate() { * @return Audio bitrate in bits per second */ @JsonProperty("bitrate") - public Optional getBitrate() { + public Optional getBitrate() { return bitrate; } @@ -111,9 +111,9 @@ public static Builder builder() { public static final class Builder { private Optional encoding = Optional.empty(); - private Optional sampleRate = Optional.empty(); + private Optional sampleRate = Optional.empty(); - private Optional bitrate = Optional.empty(); + private Optional bitrate = Optional.empty(); private Optional container = Optional.empty(); @@ -148,12 +148,12 @@ public Builder encoding(AgentV1SettingsAudioOutputEncoding encoding) { *

Sample rate in Hz

*/ @JsonSetter(value = "sample_rate", nulls = Nulls.SKIP) - public Builder sampleRate(Optional sampleRate) { + public Builder sampleRate(Optional sampleRate) { this.sampleRate = sampleRate; return this; } - public Builder sampleRate(Double sampleRate) { + public Builder sampleRate(Integer sampleRate) { this.sampleRate = Optional.ofNullable(sampleRate); return this; } @@ -162,12 +162,12 @@ public Builder sampleRate(Double sampleRate) { *

Audio bitrate in bits per second

*/ @JsonSetter(value = "bitrate", nulls = Nulls.SKIP) - public Builder bitrate(Optional bitrate) { + public Builder bitrate(Optional bitrate) { this.bitrate = bitrate; return this; } - public Builder bitrate(Double bitrate) { + public Builder bitrate(Integer bitrate) { this.bitrate = Optional.ofNullable(bitrate); return this; } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ThinkUpdated.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ThinkUpdated.java new file mode 100644 index 0000000..5668a71 --- /dev/null +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1ThinkUpdated.java @@ -0,0 +1,78 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.agent.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.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AgentV1ThinkUpdated.Builder.class) +public final class AgentV1ThinkUpdated { + private final Map additionalProperties; + + private AgentV1ThinkUpdated(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + + /** + * @return Message type identifier for think update confirmation + */ + @JsonProperty("type") + public String getType() { + return "ThinkUpdated"; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AgentV1ThinkUpdated; + } + + @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(AgentV1ThinkUpdated other) { + return this; + } + + public AgentV1ThinkUpdated build() { + return new AgentV1ThinkUpdated(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/agent/v1/types/AgentV1UpdateSpeakSpeak.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeak.java index 7fc43b5..d261079 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeak.java +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeak.java @@ -4,6 +4,7 @@ package com.deepgram.resources.agent.v1.types; import com.deepgram.core.ObjectMappers; +import com.deepgram.types.SpeakSettingsV1; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; @@ -34,9 +35,9 @@ public Object get() { @SuppressWarnings("unchecked") public T visit(Visitor visitor) { if (this.type == 0) { - return visitor.visit((AgentV1UpdateSpeakSpeakEndpoint) this.value); + return visitor.visit((SpeakSettingsV1) this.value); } else if (this.type == 1) { - return visitor.visit((List) this.value); + return visitor.visit((List) this.value); } throw new IllegalStateException("Failed to visit value. This should never happen."); } @@ -61,18 +62,18 @@ public String toString() { return this.value.toString(); } - public static AgentV1UpdateSpeakSpeak of(AgentV1UpdateSpeakSpeakEndpoint value) { + public static AgentV1UpdateSpeakSpeak of(SpeakSettingsV1 value) { return new AgentV1UpdateSpeakSpeak(value, 0); } - public static AgentV1UpdateSpeakSpeak of(List value) { + public static AgentV1UpdateSpeakSpeak of(List value) { return new AgentV1UpdateSpeakSpeak(value, 1); } public interface Visitor { - T visit(AgentV1UpdateSpeakSpeakEndpoint value); + T visit(SpeakSettingsV1 value); - T visit(List value); + T visit(List value); } static final class Deserializer extends StdDeserializer { @@ -84,12 +85,11 @@ static final class Deserializer extends StdDeserializer public AgentV1UpdateSpeakSpeak deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AgentV1UpdateSpeakSpeakEndpoint.class)); + return of(ObjectMappers.JSON_MAPPER.convertValue(value, SpeakSettingsV1.class)); } catch (RuntimeException e) { } try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, new TypeReference>() {})); + return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); } catch (RuntimeException e) { } throw new JsonParseException(p, "Failed to deserialize"); diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpoint.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpoint.java deleted file mode 100644 index 107312f..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpoint.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakEndpoint.Builder.class) -public final class AgentV1UpdateSpeakSpeakEndpoint { - private final AgentV1UpdateSpeakSpeakEndpointProvider provider; - - private final Optional endpoint; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakEndpoint( - AgentV1UpdateSpeakSpeakEndpointProvider provider, - Optional endpoint, - Map additionalProperties) { - this.provider = provider; - this.endpoint = endpoint; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public AgentV1UpdateSpeakSpeakEndpointProvider getProvider() { - return provider; - } - - /** - * @return Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs. - */ - @JsonProperty("endpoint") - public Optional getEndpoint() { - return endpoint; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakEndpoint && equalTo((AgentV1UpdateSpeakSpeakEndpoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakEndpoint other) { - return provider.equals(other.provider) && endpoint.equals(other.endpoint); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider, this.endpoint); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ProviderStage builder() { - return new Builder(); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull AgentV1UpdateSpeakSpeakEndpointProvider provider); - - Builder from(AgentV1UpdateSpeakSpeakEndpoint other); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakEndpoint build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

- */ - _FinalStage endpoint(Optional endpoint); - - _FinalStage endpoint(AgentV1UpdateSpeakSpeakEndpointEndpoint endpoint); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ProviderStage, _FinalStage { - private AgentV1UpdateSpeakSpeakEndpointProvider provider; - - private Optional endpoint = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakEndpoint other) { - provider(other.getProvider()); - endpoint(other.getEndpoint()); - return this; - } - - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull AgentV1UpdateSpeakSpeakEndpointProvider provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - /** - *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

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

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

- */ - @java.lang.Override - @JsonSetter(value = "endpoint", nulls = Nulls.SKIP) - public _FinalStage endpoint(Optional endpoint) { - this.endpoint = endpoint; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakEndpoint build() { - return new AgentV1UpdateSpeakSpeakEndpoint(provider, endpoint, 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/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointEndpoint.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointEndpoint.java deleted file mode 100644 index 4f40542..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointEndpoint.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakEndpointEndpoint.Builder.class) -public final class AgentV1UpdateSpeakSpeakEndpointEndpoint { - private final Optional url; - - private final Optional> headers; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakEndpointEndpoint( - Optional url, Optional> headers, Map additionalProperties) { - this.url = url; - this.headers = headers; - this.additionalProperties = additionalProperties; - } - - /** - * @return Custom TTS endpoint URL. Cannot contain output_format or model_id query parameters when the provider is Eleven Labs. - */ - @JsonProperty("url") - public Optional getUrl() { - return url; - } - - @JsonProperty("headers") - public Optional> getHeaders() { - return headers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakEndpointEndpoint - && equalTo((AgentV1UpdateSpeakSpeakEndpointEndpoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakEndpointEndpoint other) { - return url.equals(other.url) && headers.equals(other.headers); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.url, this.headers); - } - - @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 { - private Optional url = Optional.empty(); - - private Optional> headers = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AgentV1UpdateSpeakSpeakEndpointEndpoint other) { - url(other.getUrl()); - headers(other.getHeaders()); - return this; - } - - /** - *

Custom TTS endpoint URL. Cannot contain output_format or model_id query parameters when the provider is Eleven Labs.

- */ - @JsonSetter(value = "url", nulls = Nulls.SKIP) - public Builder url(Optional url) { - this.url = url; - return this; - } - - public Builder url(String url) { - this.url = Optional.ofNullable(url); - return this; - } - - @JsonSetter(value = "headers", nulls = Nulls.SKIP) - public Builder headers(Optional> headers) { - this.headers = headers; - return this; - } - - public Builder headers(Map headers) { - this.headers = Optional.ofNullable(headers); - return this; - } - - public AgentV1UpdateSpeakSpeakEndpointEndpoint build() { - return new AgentV1UpdateSpeakSpeakEndpointEndpoint(url, headers, 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/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProvider.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProvider.java deleted file mode 100644 index 5fd9d94..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProvider.java +++ /dev/null @@ -1,403 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -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 AgentV1UpdateSpeakSpeakEndpointProvider { - private final Value value; - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private AgentV1UpdateSpeakSpeakEndpointProvider(Value value) { - this.value = value; - } - - public T visit(Visitor visitor) { - return value.visit(visitor); - } - - public static AgentV1UpdateSpeakSpeakEndpointProvider deepgram( - AgentV1UpdateSpeakSpeakEndpointProviderDeepgram value) { - return new AgentV1UpdateSpeakSpeakEndpointProvider(new DeepgramValue(value)); - } - - public static AgentV1UpdateSpeakSpeakEndpointProvider elevenLabs( - AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs value) { - return new AgentV1UpdateSpeakSpeakEndpointProvider(new ElevenLabsValue(value)); - } - - public static AgentV1UpdateSpeakSpeakEndpointProvider cartesia( - AgentV1UpdateSpeakSpeakEndpointProviderCartesia value) { - return new AgentV1UpdateSpeakSpeakEndpointProvider(new CartesiaValue(value)); - } - - public static AgentV1UpdateSpeakSpeakEndpointProvider openAi(AgentV1UpdateSpeakSpeakEndpointProviderOpenAi value) { - return new AgentV1UpdateSpeakSpeakEndpointProvider(new OpenAiValue(value)); - } - - public static AgentV1UpdateSpeakSpeakEndpointProvider awsPolly( - AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly value) { - return new AgentV1UpdateSpeakSpeakEndpointProvider(new AwsPollyValue(value)); - } - - public boolean isDeepgram() { - return value instanceof DeepgramValue; - } - - public boolean isElevenLabs() { - return value instanceof ElevenLabsValue; - } - - public boolean isCartesia() { - return value instanceof CartesiaValue; - } - - public boolean isOpenAi() { - return value instanceof OpenAiValue; - } - - public boolean isAwsPolly() { - return value instanceof AwsPollyValue; - } - - public boolean _isUnknown() { - return value instanceof _UnknownValue; - } - - public Optional getDeepgram() { - if (isDeepgram()) { - return Optional.of(((DeepgramValue) value).value); - } - return Optional.empty(); - } - - public Optional getElevenLabs() { - if (isElevenLabs()) { - return Optional.of(((ElevenLabsValue) value).value); - } - return Optional.empty(); - } - - public Optional getCartesia() { - if (isCartesia()) { - return Optional.of(((CartesiaValue) value).value); - } - return Optional.empty(); - } - - public Optional getOpenAi() { - if (isOpenAi()) { - return Optional.of(((OpenAiValue) value).value); - } - return Optional.empty(); - } - - public Optional getAwsPolly() { - if (isAwsPolly()) { - return Optional.of(((AwsPollyValue) 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 AgentV1UpdateSpeakSpeakEndpointProvider - && value.equals(((AgentV1UpdateSpeakSpeakEndpointProvider) 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 visitDeepgram(AgentV1UpdateSpeakSpeakEndpointProviderDeepgram deepgram); - - T visitElevenLabs(AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs elevenLabs); - - T visitCartesia(AgentV1UpdateSpeakSpeakEndpointProviderCartesia cartesia); - - T visitOpenAi(AgentV1UpdateSpeakSpeakEndpointProviderOpenAi openAi); - - T visitAwsPolly(AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly awsPolly); - - T _visitUnknown(Object unknownType); - } - - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) - @JsonSubTypes({ - @JsonSubTypes.Type(DeepgramValue.class), - @JsonSubTypes.Type(ElevenLabsValue.class), - @JsonSubTypes.Type(CartesiaValue.class), - @JsonSubTypes.Type(OpenAiValue.class), - @JsonSubTypes.Type(AwsPollyValue.class) - }) - @JsonIgnoreProperties(ignoreUnknown = true) - private interface Value { - T visit(Visitor visitor); - } - - @JsonTypeName("deepgram") - @JsonIgnoreProperties("type") - private static final class DeepgramValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakEndpointProviderDeepgram value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private DeepgramValue() {} - - private DeepgramValue(AgentV1UpdateSpeakSpeakEndpointProviderDeepgram value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitDeepgram(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeepgramValue && equalTo((DeepgramValue) other); - } - - private boolean equalTo(DeepgramValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakEndpointProvider{" + "value: " + value + "}"; - } - } - - @JsonTypeName("eleven_labs") - @JsonIgnoreProperties("type") - private static final class ElevenLabsValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private ElevenLabsValue() {} - - private ElevenLabsValue(AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitElevenLabs(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ElevenLabsValue && equalTo((ElevenLabsValue) other); - } - - private boolean equalTo(ElevenLabsValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakEndpointProvider{" + "value: " + value + "}"; - } - } - - @JsonTypeName("cartesia") - @JsonIgnoreProperties("type") - private static final class CartesiaValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakEndpointProviderCartesia value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private CartesiaValue() {} - - private CartesiaValue(AgentV1UpdateSpeakSpeakEndpointProviderCartesia value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitCartesia(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CartesiaValue && equalTo((CartesiaValue) other); - } - - private boolean equalTo(CartesiaValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakEndpointProvider{" + "value: " + value + "}"; - } - } - - @JsonTypeName("open_ai") - @JsonIgnoreProperties("type") - private static final class OpenAiValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakEndpointProviderOpenAi value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private OpenAiValue() {} - - private OpenAiValue(AgentV1UpdateSpeakSpeakEndpointProviderOpenAi value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitOpenAi(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OpenAiValue && equalTo((OpenAiValue) other); - } - - private boolean equalTo(OpenAiValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakEndpointProvider{" + "value: " + value + "}"; - } - } - - @JsonTypeName("aws_polly") - @JsonIgnoreProperties("type") - private static final class AwsPollyValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private AwsPollyValue() {} - - private AwsPollyValue(AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitAwsPolly(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AwsPollyValue && equalTo((AwsPollyValue) other); - } - - private boolean equalTo(AwsPollyValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakEndpointProvider{" + "value: " + value + "}"; - } - } - - @JsonIgnoreProperties("type") - 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 "AgentV1UpdateSpeakSpeakEndpointProvider{" + "type: " + type + ", value: " + value + "}"; - } - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly.java deleted file mode 100644 index 43e8831..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly.Builder.class) -public final class AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly { - private final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice voice; - - private final String language; - - private final Optional languageCode; - - private final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine engine; - - private final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials credentials; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly( - AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice voice, - String language, - Optional languageCode, - AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine engine, - AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials credentials, - Map additionalProperties) { - this.voice = voice; - this.language = language; - this.languageCode = languageCode; - this.engine = engine; - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - /** - * @return AWS Polly voice name - */ - @JsonProperty("voice") - public AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice getVoice() { - return voice; - } - - /** - * @return Language code to use, e.g. 'en-US'. Corresponds to the language_code parameter in the AWS Polly API - */ - @JsonProperty("language") - public String getLanguage() { - return language; - } - - /** - * @return Use the language field instead. - */ - @JsonProperty("language_code") - public Optional getLanguageCode() { - return languageCode; - } - - @JsonProperty("engine") - public AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine getEngine() { - return engine; - } - - @JsonProperty("credentials") - public AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly - && equalTo((AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly other) { - return voice.equals(other.voice) - && language.equals(other.language) - && languageCode.equals(other.languageCode) - && engine.equals(other.engine) - && credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.voice, this.language, this.languageCode, this.engine, this.credentials); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static VoiceStage builder() { - return new Builder(); - } - - public interface VoiceStage { - /** - *

AWS Polly voice name

- */ - LanguageStage voice(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice voice); - - Builder from(AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly other); - } - - public interface LanguageStage { - /** - *

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

- */ - EngineStage language(@NotNull String language); - } - - public interface EngineStage { - CredentialsStage engine(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine engine); - } - - public interface CredentialsStage { - _FinalStage credentials(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials credentials); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Use the language field instead.

- */ - _FinalStage languageCode(Optional languageCode); - - _FinalStage languageCode(String languageCode); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements VoiceStage, LanguageStage, EngineStage, CredentialsStage, _FinalStage { - private AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice voice; - - private String language; - - private AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine engine; - - private AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials credentials; - - private Optional languageCode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly other) { - voice(other.getVoice()); - language(other.getLanguage()); - languageCode(other.getLanguageCode()); - engine(other.getEngine()); - credentials(other.getCredentials()); - return this; - } - - /** - *

AWS Polly voice name

- *

AWS Polly voice name

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

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. - */ - @java.lang.Override - @JsonSetter("language") - public EngineStage language(@NotNull String language) { - this.language = Objects.requireNonNull(language, "language must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("engine") - public CredentialsStage engine(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine engine) { - this.engine = Objects.requireNonNull(engine, "engine must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("credentials") - public _FinalStage credentials( - @NotNull AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials credentials) { - this.credentials = Objects.requireNonNull(credentials, "credentials must not be null"); - return this; - } - - /** - *

Use the language field instead.

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

Use the language field instead.

- */ - @java.lang.Override - @JsonSetter(value = "language_code", nulls = Nulls.SKIP) - public _FinalStage languageCode(Optional languageCode) { - this.languageCode = languageCode; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly build() { - return new AgentV1UpdateSpeakSpeakEndpointProviderAwsPolly( - voice, language, languageCode, engine, credentials, 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/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials.java deleted file mode 100644 index 41e6438..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials.java +++ /dev/null @@ -1,240 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials.Builder.class) -public final class AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials { - private final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType type; - - private final String region; - - private final String accessKeyId; - - private final String secretAccessKey; - - private final Optional sessionToken; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials( - AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType type, - String region, - String accessKeyId, - String secretAccessKey, - Optional sessionToken, - Map additionalProperties) { - this.type = type; - this.region = region; - this.accessKeyId = accessKeyId; - this.secretAccessKey = secretAccessKey; - this.sessionToken = sessionToken; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType getType() { - return type; - } - - @JsonProperty("region") - public String getRegion() { - return region; - } - - @JsonProperty("access_key_id") - public String getAccessKeyId() { - return accessKeyId; - } - - @JsonProperty("secret_access_key") - public String getSecretAccessKey() { - return secretAccessKey; - } - - /** - * @return Required for STS only - */ - @JsonProperty("session_token") - public Optional getSessionToken() { - return sessionToken; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials - && equalTo((AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials other) { - return type.equals(other.type) - && region.equals(other.region) - && accessKeyId.equals(other.accessKeyId) - && secretAccessKey.equals(other.secretAccessKey) - && sessionToken.equals(other.sessionToken); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.region, this.accessKeyId, this.secretAccessKey, this.sessionToken); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - RegionStage type(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType type); - - Builder from(AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials other); - } - - public interface RegionStage { - AccessKeyIdStage region(@NotNull String region); - } - - public interface AccessKeyIdStage { - SecretAccessKeyStage accessKeyId(@NotNull String accessKeyId); - } - - public interface SecretAccessKeyStage { - _FinalStage secretAccessKey(@NotNull String secretAccessKey); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Required for STS only

- */ - _FinalStage sessionToken(Optional sessionToken); - - _FinalStage sessionToken(String sessionToken); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements TypeStage, RegionStage, AccessKeyIdStage, SecretAccessKeyStage, _FinalStage { - private AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType type; - - private String region; - - private String accessKeyId; - - private String secretAccessKey; - - private Optional sessionToken = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials other) { - type(other.getType()); - region(other.getRegion()); - accessKeyId(other.getAccessKeyId()); - secretAccessKey(other.getSecretAccessKey()); - sessionToken(other.getSessionToken()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public RegionStage type(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("region") - public AccessKeyIdStage region(@NotNull String region) { - this.region = Objects.requireNonNull(region, "region must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("access_key_id") - public SecretAccessKeyStage accessKeyId(@NotNull String accessKeyId) { - this.accessKeyId = Objects.requireNonNull(accessKeyId, "accessKeyId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("secret_access_key") - public _FinalStage secretAccessKey(@NotNull String secretAccessKey) { - this.secretAccessKey = Objects.requireNonNull(secretAccessKey, "secretAccessKey must not be null"); - return this; - } - - /** - *

Required for STS only

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

Required for STS only

- */ - @java.lang.Override - @JsonSetter(value = "session_token", nulls = Nulls.SKIP) - public _FinalStage sessionToken(Optional sessionToken) { - this.sessionToken = sessionToken; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials build() { - return new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentials( - type, region, accessKeyId, secretAccessKey, sessionToken, 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/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine.java deleted file mode 100644 index 06ed8d8..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine { - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine LONG_FORM = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine(Value.LONG_FORM, "long-form"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine STANDARD = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine(Value.STANDARD, "standard"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine GENERATIVE = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine(Value.GENERATIVE, "generative"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine NEURAL = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine(Value.NEURAL, "neural"); - - private final Value value; - - private final String string; - - AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine(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 AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine - && this.string.equals(((AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LONG_FORM: - return visitor.visitLongForm(); - case STANDARD: - return visitor.visitStandard(); - case GENERATIVE: - return visitor.visitGenerative(); - case NEURAL: - return visitor.visitNeural(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine valueOf(String value) { - switch (value) { - case "long-form": - return LONG_FORM; - case "standard": - return STANDARD; - case "generative": - return GENERATIVE; - case "neural": - return NEURAL; - default: - return new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyEngine(Value.UNKNOWN, value); - } - } - - public enum Value { - GENERATIVE, - - LONG_FORM, - - STANDARD, - - NEURAL, - - UNKNOWN - } - - public interface Visitor { - T visitGenerative(); - - T visitLongForm(); - - T visitStandard(); - - T visitNeural(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice.java deleted file mode 100644 index 39fdec6..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice { - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice ARTHUR = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(Value.ARTHUR, "Arthur"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice JOANNA = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(Value.JOANNA, "Joanna"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice BRIAN = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(Value.BRIAN, "Brian"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice AMY = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(Value.AMY, "Amy"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice EMMA = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(Value.EMMA, "Emma"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice MATTHEW = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(Value.MATTHEW, "Matthew"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice ARIA = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(Value.ARIA, "Aria"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice AYANDA = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(Value.AYANDA, "Ayanda"); - - private final Value value; - - private final String string; - - AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(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 AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice - && this.string.equals(((AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ARTHUR: - return visitor.visitArthur(); - case JOANNA: - return visitor.visitJoanna(); - case BRIAN: - return visitor.visitBrian(); - case AMY: - return visitor.visitAmy(); - case EMMA: - return visitor.visitEmma(); - case MATTHEW: - return visitor.visitMatthew(); - case ARIA: - return visitor.visitAria(); - case AYANDA: - return visitor.visitAyanda(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice valueOf(String value) { - switch (value) { - case "Arthur": - return ARTHUR; - case "Joanna": - return JOANNA; - case "Brian": - return BRIAN; - case "Amy": - return AMY; - case "Emma": - return EMMA; - case "Matthew": - return MATTHEW; - case "Aria": - return ARIA; - case "Ayanda": - return AYANDA; - default: - return new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyVoice(Value.UNKNOWN, value); - } - } - - public enum Value { - MATTHEW, - - JOANNA, - - AMY, - - EMMA, - - BRIAN, - - ARTHUR, - - ARIA, - - AYANDA, - - UNKNOWN - } - - public interface Visitor { - T visitMatthew(); - - T visitJoanna(); - - T visitAmy(); - - T visitEmma(); - - T visitBrian(); - - T visitArthur(); - - T visitAria(); - - T visitAyanda(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesia.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesia.java deleted file mode 100644 index f35c958..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesia.java +++ /dev/null @@ -1,245 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakEndpointProviderCartesia.Builder.class) -public final class AgentV1UpdateSpeakSpeakEndpointProviderCartesia { - private final Optional version; - - private final AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId modelId; - - private final AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice voice; - - private final Optional language; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakEndpointProviderCartesia( - Optional version, - AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId modelId, - AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice voice, - Optional language, - Map additionalProperties) { - this.version = version; - this.modelId = modelId; - this.voice = voice; - this.language = language; - this.additionalProperties = additionalProperties; - } - - /** - * @return The API version header for the Cartesia text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return Cartesia model ID - */ - @JsonProperty("model_id") - public AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId getModelId() { - return modelId; - } - - @JsonProperty("voice") - public AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice getVoice() { - return voice; - } - - /** - * @return Cartesia language code - */ - @JsonProperty("language") - public Optional getLanguage() { - return language; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakEndpointProviderCartesia - && equalTo((AgentV1UpdateSpeakSpeakEndpointProviderCartesia) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakEndpointProviderCartesia other) { - return version.equals(other.version) - && modelId.equals(other.modelId) - && voice.equals(other.voice) - && language.equals(other.language); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.modelId, this.voice, this.language); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelIdStage builder() { - return new Builder(); - } - - public interface ModelIdStage { - /** - *

Cartesia model ID

- */ - VoiceStage modelId(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId modelId); - - Builder from(AgentV1UpdateSpeakSpeakEndpointProviderCartesia other); - } - - public interface VoiceStage { - _FinalStage voice(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice voice); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakEndpointProviderCartesia build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

The API version header for the Cartesia text-to-speech API

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

Cartesia language code

- */ - _FinalStage language(Optional language); - - _FinalStage language(String language); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelIdStage, VoiceStage, _FinalStage { - private AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId modelId; - - private AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice voice; - - private Optional language = Optional.empty(); - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakEndpointProviderCartesia other) { - version(other.getVersion()); - modelId(other.getModelId()); - voice(other.getVoice()); - language(other.getLanguage()); - return this; - } - - /** - *

Cartesia model ID

- *

Cartesia model ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("model_id") - public VoiceStage modelId(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId modelId) { - this.modelId = Objects.requireNonNull(modelId, "modelId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("voice") - public _FinalStage voice(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice voice) { - this.voice = Objects.requireNonNull(voice, "voice must not be null"); - return this; - } - - /** - *

Cartesia language code

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

Cartesia language code

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

The API version header for the Cartesia text-to-speech API

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

The API version header for the Cartesia text-to-speech API

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakEndpointProviderCartesia build() { - return new AgentV1UpdateSpeakSpeakEndpointProviderCartesia( - version, modelId, voice, language, 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/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId.java deleted file mode 100644 index dbd6547..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId { - public static final AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId SONIC_MULTILINGUAL = - new AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId(Value.SONIC_MULTILINGUAL, "sonic-multilingual"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId SONIC2 = - new AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId(Value.SONIC2, "sonic-2"); - - private final Value value; - - private final String string; - - AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId(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 AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId - && this.string.equals(((AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SONIC_MULTILINGUAL: - return visitor.visitSonicMultilingual(); - case SONIC2: - return visitor.visitSonic2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId valueOf(String value) { - switch (value) { - case "sonic-multilingual": - return SONIC_MULTILINGUAL; - case "sonic-2": - return SONIC2; - default: - return new AgentV1UpdateSpeakSpeakEndpointProviderCartesiaModelId(Value.UNKNOWN, value); - } - } - - public enum Value { - SONIC2, - - SONIC_MULTILINGUAL, - - UNKNOWN - } - - public interface Visitor { - T visitSonic2(); - - T visitSonicMultilingual(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice.java deleted file mode 100644 index fbb9642..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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 = AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice.Builder.class) -public final class AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice { - private final String mode; - - private final String id; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice( - String mode, String id, Map additionalProperties) { - this.mode = mode; - this.id = id; - this.additionalProperties = additionalProperties; - } - - /** - * @return Cartesia voice mode - */ - @JsonProperty("mode") - public String getMode() { - return mode; - } - - /** - * @return Cartesia voice ID - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice - && equalTo((AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice other) { - return mode.equals(other.mode) && id.equals(other.id); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mode, this.id); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModeStage builder() { - return new Builder(); - } - - public interface ModeStage { - /** - *

Cartesia voice mode

- */ - IdStage mode(@NotNull String mode); - - Builder from(AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice other); - } - - public interface IdStage { - /** - *

Cartesia voice ID

- */ - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModeStage, IdStage, _FinalStage { - private String mode; - - private String id; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice other) { - mode(other.getMode()); - id(other.getId()); - return this; - } - - /** - *

Cartesia voice mode

- *

Cartesia voice mode

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

Cartesia voice ID

- *

Cartesia voice ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public _FinalStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice build() { - return new AgentV1UpdateSpeakSpeakEndpointProviderCartesiaVoice(mode, id, 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/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderDeepgram.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderDeepgram.java deleted file mode 100644 index 073fb1a..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderDeepgram.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakEndpointProviderDeepgram.Builder.class) -public final class AgentV1UpdateSpeakSpeakEndpointProviderDeepgram { - private final Optional version; - - private final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel model; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakEndpointProviderDeepgram( - Optional version, - AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel model, - Map additionalProperties) { - this.version = version; - this.model = model; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the Deepgram text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return Deepgram TTS model - */ - @JsonProperty("model") - public AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel getModel() { - return model; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakEndpointProviderDeepgram - && equalTo((AgentV1UpdateSpeakSpeakEndpointProviderDeepgram) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakEndpointProviderDeepgram other) { - return version.equals(other.version) && model.equals(other.model); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.model); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelStage builder() { - return new Builder(); - } - - public interface ModelStage { - /** - *

Deepgram TTS model

- */ - _FinalStage model(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel model); - - Builder from(AgentV1UpdateSpeakSpeakEndpointProviderDeepgram other); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakEndpointProviderDeepgram build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

- */ - _FinalStage version(Optional version); - - _FinalStage version(String version); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelStage, _FinalStage { - private AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel model; - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakEndpointProviderDeepgram other) { - version(other.getVersion()); - model(other.getModel()); - return this; - } - - /** - *

Deepgram TTS model

- *

Deepgram TTS model

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

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 - public _FinalStage version(String version) { - this.version = Optional.ofNullable(version); - return this; - } - - /** - *

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakEndpointProviderDeepgram build() { - return new AgentV1UpdateSpeakSpeakEndpointProviderDeepgram(version, model, 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/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel.java deleted file mode 100644 index 166a133..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel.java +++ /dev/null @@ -1,757 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel { - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_ANGUS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_ANGUS_EN, "aura-angus-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2JUPITER_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2CORA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2CORA_EN, "aura-2-cora-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_STELLA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_STELLA_EN, "aura-stella-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2HELENA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2HELENA_EN, "aura-2-helena-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2AQUILA_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ATLAS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ORION_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ORION_EN, "aura-2-orion-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2DRACO_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2DRACO_EN, "aura-2-draco-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2HYPERION_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2JANUS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2JANUS_EN, "aura-2-janus-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_HELIOS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_HELIOS_EN, "aura-helios-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2PLUTO_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ARCAS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2NESTOR_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2NEPTUNE_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2MINERVA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ALVARO_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_ATHENA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_ATHENA_EN, "aura-athena-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_PERSEUS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_PERSEUS_EN, "aura-perseus-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ODYSSEUS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2PANDORA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ZEUS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ELECTRA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ORPHEUS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2THALIA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2THALIA_EN, "aura-2-thalia-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2CELESTE_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_ASTERIA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_ASTERIA_EN, "aura-asteria-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ESTRELLA_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2HERA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2HERA_EN, "aura-2-hera-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2MARS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2MARS_EN, "aura-2-mars-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2SIRIO_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ASTERIA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2HERMES_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2HERMES_EN, "aura-2-hermes-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2VESTA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2VESTA_EN, "aura-2-vesta-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2CARINA_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2CARINA_ES, "aura-2-carina-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2CALLISTA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2HARMONIA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2SELENA_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2SELENA_ES, "aura-2-selena-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2AURORA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2AURORA_EN, "aura-2-aurora-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_ZEUS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_ZEUS_EN, "aura-zeus-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2OPHELIA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2AMALTHEA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_ORPHEUS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2DELIA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2DELIA_EN, "aura-2-delia-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_LUNA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_LUNA_EN, "aura-luna-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2APOLLO_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2SELENE_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2SELENE_EN, "aura-2-selene-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2THEIA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2THEIA_EN, "aura-2-theia-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_HERA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_HERA_EN, "aura-hera-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2CORDELIA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ANDROMEDA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ARIES_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ARIES_EN, "aura-2-aries-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2JUNO_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2JUNO_EN, "aura-2-juno-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2LUNA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2LUNA_EN, "aura-2-luna-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2DIANA_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2DIANA_ES, "aura-2-diana-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2JAVIER_ES = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2JAVIER_ES, "aura-2-javier-es"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_ORION_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_ORION_EN, "aura-orion-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA_ARCAS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA_ARCAS_EN, "aura-arcas-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2IRIS_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2IRIS_EN, "aura-2-iris-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2ATHENA_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2ATHENA_EN, "aura-2-athena-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2SATURN_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2SATURN_EN, "aura-2-saturn-en"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel AURA2PHOEBE_EN = - new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); - - private final Value value; - - private final String string; - - AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(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 AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel - && this.string.equals(((AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AURA_ANGUS_EN: - return visitor.visitAuraAngusEn(); - case AURA2JUPITER_EN: - return visitor.visitAura2JupiterEn(); - case AURA2CORA_EN: - return visitor.visitAura2CoraEn(); - case AURA_STELLA_EN: - return visitor.visitAuraStellaEn(); - case AURA2HELENA_EN: - return visitor.visitAura2HelenaEn(); - case AURA2AQUILA_ES: - return visitor.visitAura2AquilaEs(); - case AURA2ATLAS_EN: - return visitor.visitAura2AtlasEn(); - case AURA2ORION_EN: - return visitor.visitAura2OrionEn(); - case AURA2DRACO_EN: - return visitor.visitAura2DracoEn(); - case AURA2HYPERION_EN: - return visitor.visitAura2HyperionEn(); - case AURA2JANUS_EN: - return visitor.visitAura2JanusEn(); - case AURA_HELIOS_EN: - return visitor.visitAuraHeliosEn(); - case AURA2PLUTO_EN: - return visitor.visitAura2PlutoEn(); - case AURA2ARCAS_EN: - return visitor.visitAura2ArcasEn(); - case AURA2NESTOR_ES: - return visitor.visitAura2NestorEs(); - case AURA2NEPTUNE_EN: - return visitor.visitAura2NeptuneEn(); - case AURA2MINERVA_EN: - return visitor.visitAura2MinervaEn(); - case AURA2ALVARO_ES: - return visitor.visitAura2AlvaroEs(); - case AURA_ATHENA_EN: - return visitor.visitAuraAthenaEn(); - case AURA_PERSEUS_EN: - return visitor.visitAuraPerseusEn(); - case AURA2ODYSSEUS_EN: - return visitor.visitAura2OdysseusEn(); - case AURA2PANDORA_EN: - return visitor.visitAura2PandoraEn(); - case AURA2ZEUS_EN: - return visitor.visitAura2ZeusEn(); - case AURA2ELECTRA_EN: - return visitor.visitAura2ElectraEn(); - case AURA2ORPHEUS_EN: - return visitor.visitAura2OrpheusEn(); - case AURA2THALIA_EN: - return visitor.visitAura2ThaliaEn(); - case AURA2CELESTE_ES: - return visitor.visitAura2CelesteEs(); - case AURA_ASTERIA_EN: - return visitor.visitAuraAsteriaEn(); - case AURA2ESTRELLA_ES: - return visitor.visitAura2EstrellaEs(); - case AURA2HERA_EN: - return visitor.visitAura2HeraEn(); - case AURA2MARS_EN: - return visitor.visitAura2MarsEn(); - case AURA2SIRIO_ES: - return visitor.visitAura2SirioEs(); - case AURA2ASTERIA_EN: - return visitor.visitAura2AsteriaEn(); - case AURA2HERMES_EN: - return visitor.visitAura2HermesEn(); - case AURA2VESTA_EN: - return visitor.visitAura2VestaEn(); - case AURA2CARINA_ES: - return visitor.visitAura2CarinaEs(); - case AURA2CALLISTA_EN: - return visitor.visitAura2CallistaEn(); - case AURA2HARMONIA_EN: - return visitor.visitAura2HarmoniaEn(); - case AURA2SELENA_ES: - return visitor.visitAura2SelenaEs(); - case AURA2AURORA_EN: - return visitor.visitAura2AuroraEn(); - case AURA_ZEUS_EN: - return visitor.visitAuraZeusEn(); - case AURA2OPHELIA_EN: - return visitor.visitAura2OpheliaEn(); - case AURA2AMALTHEA_EN: - return visitor.visitAura2AmaltheaEn(); - case AURA_ORPHEUS_EN: - return visitor.visitAuraOrpheusEn(); - case AURA2DELIA_EN: - return visitor.visitAura2DeliaEn(); - case AURA_LUNA_EN: - return visitor.visitAuraLunaEn(); - case AURA2APOLLO_EN: - return visitor.visitAura2ApolloEn(); - case AURA2SELENE_EN: - return visitor.visitAura2SeleneEn(); - case AURA2THEIA_EN: - return visitor.visitAura2TheiaEn(); - case AURA_HERA_EN: - return visitor.visitAuraHeraEn(); - case AURA2CORDELIA_EN: - return visitor.visitAura2CordeliaEn(); - case AURA2ANDROMEDA_EN: - return visitor.visitAura2AndromedaEn(); - case AURA2ARIES_EN: - return visitor.visitAura2AriesEn(); - case AURA2JUNO_EN: - return visitor.visitAura2JunoEn(); - case AURA2LUNA_EN: - return visitor.visitAura2LunaEn(); - case AURA2DIANA_ES: - return visitor.visitAura2DianaEs(); - case AURA2JAVIER_ES: - return visitor.visitAura2JavierEs(); - case AURA_ORION_EN: - return visitor.visitAuraOrionEn(); - case AURA_ARCAS_EN: - return visitor.visitAuraArcasEn(); - case AURA2IRIS_EN: - return visitor.visitAura2IrisEn(); - case AURA2ATHENA_EN: - return visitor.visitAura2AthenaEn(); - case AURA2SATURN_EN: - return visitor.visitAura2SaturnEn(); - case AURA2PHOEBE_EN: - return visitor.visitAura2PhoebeEn(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel valueOf(String value) { - switch (value) { - case "aura-angus-en": - return AURA_ANGUS_EN; - case "aura-2-jupiter-en": - return AURA2JUPITER_EN; - case "aura-2-cora-en": - return AURA2CORA_EN; - case "aura-stella-en": - return AURA_STELLA_EN; - case "aura-2-helena-en": - return AURA2HELENA_EN; - case "aura-2-aquila-es": - return AURA2AQUILA_ES; - case "aura-2-atlas-en": - return AURA2ATLAS_EN; - case "aura-2-orion-en": - return AURA2ORION_EN; - case "aura-2-draco-en": - return AURA2DRACO_EN; - case "aura-2-hyperion-en": - return AURA2HYPERION_EN; - case "aura-2-janus-en": - return AURA2JANUS_EN; - case "aura-helios-en": - return AURA_HELIOS_EN; - case "aura-2-pluto-en": - return AURA2PLUTO_EN; - case "aura-2-arcas-en": - return AURA2ARCAS_EN; - case "aura-2-nestor-es": - return AURA2NESTOR_ES; - case "aura-2-neptune-en": - return AURA2NEPTUNE_EN; - case "aura-2-minerva-en": - return AURA2MINERVA_EN; - case "aura-2-alvaro-es": - return AURA2ALVARO_ES; - case "aura-athena-en": - return AURA_ATHENA_EN; - case "aura-perseus-en": - return AURA_PERSEUS_EN; - case "aura-2-odysseus-en": - return AURA2ODYSSEUS_EN; - case "aura-2-pandora-en": - return AURA2PANDORA_EN; - case "aura-2-zeus-en": - return AURA2ZEUS_EN; - case "aura-2-electra-en": - return AURA2ELECTRA_EN; - case "aura-2-orpheus-en": - return AURA2ORPHEUS_EN; - case "aura-2-thalia-en": - return AURA2THALIA_EN; - case "aura-2-celeste-es": - return AURA2CELESTE_ES; - case "aura-asteria-en": - return AURA_ASTERIA_EN; - case "aura-2-estrella-es": - return AURA2ESTRELLA_ES; - case "aura-2-hera-en": - return AURA2HERA_EN; - case "aura-2-mars-en": - return AURA2MARS_EN; - case "aura-2-sirio-es": - return AURA2SIRIO_ES; - case "aura-2-asteria-en": - return AURA2ASTERIA_EN; - case "aura-2-hermes-en": - return AURA2HERMES_EN; - case "aura-2-vesta-en": - return AURA2VESTA_EN; - case "aura-2-carina-es": - return AURA2CARINA_ES; - case "aura-2-callista-en": - return AURA2CALLISTA_EN; - case "aura-2-harmonia-en": - return AURA2HARMONIA_EN; - case "aura-2-selena-es": - return AURA2SELENA_ES; - case "aura-2-aurora-en": - return AURA2AURORA_EN; - case "aura-zeus-en": - return AURA_ZEUS_EN; - case "aura-2-ophelia-en": - return AURA2OPHELIA_EN; - case "aura-2-amalthea-en": - return AURA2AMALTHEA_EN; - case "aura-orpheus-en": - return AURA_ORPHEUS_EN; - case "aura-2-delia-en": - return AURA2DELIA_EN; - case "aura-luna-en": - return AURA_LUNA_EN; - case "aura-2-apollo-en": - return AURA2APOLLO_EN; - case "aura-2-selene-en": - return AURA2SELENE_EN; - case "aura-2-theia-en": - return AURA2THEIA_EN; - case "aura-hera-en": - return AURA_HERA_EN; - case "aura-2-cordelia-en": - return AURA2CORDELIA_EN; - case "aura-2-andromeda-en": - return AURA2ANDROMEDA_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 "aura-2-diana-es": - return AURA2DIANA_ES; - case "aura-2-javier-es": - return AURA2JAVIER_ES; - case "aura-orion-en": - return AURA_ORION_EN; - case "aura-arcas-en": - return AURA_ARCAS_EN; - case "aura-2-iris-en": - return AURA2IRIS_EN; - case "aura-2-athena-en": - return AURA2ATHENA_EN; - case "aura-2-saturn-en": - return AURA2SATURN_EN; - case "aura-2-phoebe-en": - return AURA2PHOEBE_EN; - default: - return new AgentV1UpdateSpeakSpeakEndpointProviderDeepgramModel(Value.UNKNOWN, value); - } - } - - public enum Value { - AURA_ASTERIA_EN, - - AURA_LUNA_EN, - - AURA_STELLA_EN, - - AURA_ATHENA_EN, - - AURA_HERA_EN, - - AURA_ORION_EN, - - AURA_ARCAS_EN, - - AURA_PERSEUS_EN, - - AURA_ANGUS_EN, - - AURA_ORPHEUS_EN, - - AURA_HELIOS_EN, - - AURA_ZEUS_EN, - - AURA2AMALTHEA_EN, - - AURA2ANDROMEDA_EN, - - AURA2APOLLO_EN, - - AURA2ARCAS_EN, - - AURA2ARIES_EN, - - AURA2ASTERIA_EN, - - AURA2ATHENA_EN, - - AURA2ATLAS_EN, - - AURA2AURORA_EN, - - AURA2CALLISTA_EN, - - AURA2CORA_EN, - - AURA2CORDELIA_EN, - - AURA2DELIA_EN, - - AURA2DRACO_EN, - - AURA2ELECTRA_EN, - - AURA2HARMONIA_EN, - - AURA2HELENA_EN, - - AURA2HERA_EN, - - AURA2HERMES_EN, - - AURA2HYPERION_EN, - - AURA2IRIS_EN, - - AURA2JANUS_EN, - - AURA2JUNO_EN, - - AURA2JUPITER_EN, - - AURA2LUNA_EN, - - AURA2MARS_EN, - - AURA2MINERVA_EN, - - AURA2NEPTUNE_EN, - - AURA2ODYSSEUS_EN, - - AURA2OPHELIA_EN, - - AURA2ORION_EN, - - AURA2ORPHEUS_EN, - - AURA2PANDORA_EN, - - AURA2PHOEBE_EN, - - AURA2PLUTO_EN, - - AURA2SATURN_EN, - - AURA2SELENE_EN, - - AURA2THALIA_EN, - - AURA2THEIA_EN, - - AURA2VESTA_EN, - - AURA2ZEUS_EN, - - AURA2SIRIO_ES, - - AURA2NESTOR_ES, - - AURA2CARINA_ES, - - AURA2CELESTE_ES, - - AURA2ALVARO_ES, - - AURA2DIANA_ES, - - AURA2AQUILA_ES, - - AURA2SELENA_ES, - - AURA2ESTRELLA_ES, - - AURA2JAVIER_ES, - - UNKNOWN - } - - public interface Visitor { - T visitAuraAsteriaEn(); - - T visitAuraLunaEn(); - - T visitAuraStellaEn(); - - T visitAuraAthenaEn(); - - T visitAuraHeraEn(); - - T visitAuraOrionEn(); - - T visitAuraArcasEn(); - - T visitAuraPerseusEn(); - - T visitAuraAngusEn(); - - T visitAuraOrpheusEn(); - - T visitAuraHeliosEn(); - - T visitAuraZeusEn(); - - T visitAura2AmaltheaEn(); - - T visitAura2AndromedaEn(); - - T visitAura2ApolloEn(); - - T visitAura2ArcasEn(); - - T visitAura2AriesEn(); - - T visitAura2AsteriaEn(); - - T visitAura2AthenaEn(); - - T visitAura2AtlasEn(); - - T visitAura2AuroraEn(); - - T visitAura2CallistaEn(); - - T visitAura2CoraEn(); - - T visitAura2CordeliaEn(); - - T visitAura2DeliaEn(); - - T visitAura2DracoEn(); - - T visitAura2ElectraEn(); - - T visitAura2HarmoniaEn(); - - T visitAura2HelenaEn(); - - T visitAura2HeraEn(); - - T visitAura2HermesEn(); - - T visitAura2HyperionEn(); - - T visitAura2IrisEn(); - - T visitAura2JanusEn(); - - T visitAura2JunoEn(); - - T visitAura2JupiterEn(); - - T visitAura2LunaEn(); - - T visitAura2MarsEn(); - - T visitAura2MinervaEn(); - - T visitAura2NeptuneEn(); - - T visitAura2OdysseusEn(); - - T visitAura2OpheliaEn(); - - T visitAura2OrionEn(); - - T visitAura2OrpheusEn(); - - T visitAura2PandoraEn(); - - T visitAura2PhoebeEn(); - - T visitAura2PlutoEn(); - - T visitAura2SaturnEn(); - - T visitAura2SeleneEn(); - - T visitAura2ThaliaEn(); - - T visitAura2TheiaEn(); - - T visitAura2VestaEn(); - - T visitAura2ZeusEn(); - - T visitAura2SirioEs(); - - T visitAura2NestorEs(); - - T visitAura2CarinaEs(); - - T visitAura2CelesteEs(); - - T visitAura2AlvaroEs(); - - T visitAura2DianaEs(); - - T visitAura2AquilaEs(); - - T visitAura2SelenaEs(); - - T visitAura2EstrellaEs(); - - T visitAura2JavierEs(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs.java deleted file mode 100644 index 442b57a..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs.java +++ /dev/null @@ -1,264 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs.Builder.class) -public final class AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs { - private final Optional version; - - private final AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId modelId; - - private final Optional language; - - private final Optional languageCode; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs( - Optional version, - AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId modelId, - Optional language, - Optional languageCode, - Map additionalProperties) { - this.version = version; - this.modelId = modelId; - this.language = language; - this.languageCode = languageCode; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the ElevenLabs text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return Eleven Labs model ID - */ - @JsonProperty("model_id") - public AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId getModelId() { - return modelId; - } - - /** - * @return Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API - */ - @JsonProperty("language") - public Optional getLanguage() { - return language; - } - - /** - * @return Use the language field instead. - */ - @JsonProperty("language_code") - public Optional getLanguageCode() { - return languageCode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs - && equalTo((AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs other) { - return version.equals(other.version) - && modelId.equals(other.modelId) - && language.equals(other.language) - && languageCode.equals(other.languageCode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.modelId, this.language, this.languageCode); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelIdStage builder() { - return new Builder(); - } - - public interface ModelIdStage { - /** - *

Eleven Labs model ID

- */ - _FinalStage modelId(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId modelId); - - Builder from(AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs other); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

Use the language field instead.

- */ - _FinalStage languageCode(Optional languageCode); - - _FinalStage languageCode(String languageCode); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelIdStage, _FinalStage { - private AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId modelId; - - private Optional languageCode = Optional.empty(); - - private Optional language = Optional.empty(); - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs other) { - version(other.getVersion()); - modelId(other.getModelId()); - language(other.getLanguage()); - languageCode(other.getLanguageCode()); - return this; - } - - /** - *

Eleven Labs model ID

- *

Eleven Labs model ID

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

Use the language field instead.

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

Use the language field instead.

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs build() { - return new AgentV1UpdateSpeakSpeakEndpointProviderElevenLabs( - version, modelId, language, languageCode, 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/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId.java deleted file mode 100644 index 87aa009..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId { - public static final AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId ELEVEN_TURBO_V25 = - new AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId(Value.ELEVEN_TURBO_V25, "eleven_turbo_v2_5"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId ELEVEN_MONOLINGUAL_V1 = - new AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId( - Value.ELEVEN_MONOLINGUAL_V1, "eleven_monolingual_v1"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId ELEVEN_MULTILINGUAL_V2 = - new AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId( - Value.ELEVEN_MULTILINGUAL_V2, "eleven_multilingual_v2"); - - private final Value value; - - private final String string; - - AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId(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 AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId - && this.string.equals( - ((AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ELEVEN_TURBO_V25: - return visitor.visitElevenTurboV25(); - case ELEVEN_MONOLINGUAL_V1: - return visitor.visitElevenMonolingualV1(); - case ELEVEN_MULTILINGUAL_V2: - return visitor.visitElevenMultilingualV2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId valueOf(String value) { - switch (value) { - case "eleven_turbo_v2_5": - return ELEVEN_TURBO_V25; - case "eleven_monolingual_v1": - return ELEVEN_MONOLINGUAL_V1; - case "eleven_multilingual_v2": - return ELEVEN_MULTILINGUAL_V2; - default: - return new AgentV1UpdateSpeakSpeakEndpointProviderElevenLabsModelId(Value.UNKNOWN, value); - } - } - - public enum Value { - ELEVEN_TURBO_V25, - - ELEVEN_MONOLINGUAL_V1, - - ELEVEN_MULTILINGUAL_V2, - - UNKNOWN - } - - public interface Visitor { - T visitElevenTurboV25(); - - T visitElevenMonolingualV1(); - - T visitElevenMultilingualV2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAi.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAi.java deleted file mode 100644 index 7782900..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAi.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakEndpointProviderOpenAi.Builder.class) -public final class AgentV1UpdateSpeakSpeakEndpointProviderOpenAi { - private final Optional version; - - private final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel model; - - private final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice voice; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakEndpointProviderOpenAi( - Optional version, - AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel model, - AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice voice, - Map additionalProperties) { - this.version = version; - this.model = model; - this.voice = voice; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the OpenAI text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return OpenAI TTS model - */ - @JsonProperty("model") - public AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel getModel() { - return model; - } - - /** - * @return OpenAI voice - */ - @JsonProperty("voice") - public AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice getVoice() { - return voice; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakEndpointProviderOpenAi - && equalTo((AgentV1UpdateSpeakSpeakEndpointProviderOpenAi) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakEndpointProviderOpenAi other) { - return version.equals(other.version) && model.equals(other.model) && voice.equals(other.voice); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.model, this.voice); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelStage builder() { - return new Builder(); - } - - public interface ModelStage { - /** - *

OpenAI TTS model

- */ - VoiceStage model(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel model); - - Builder from(AgentV1UpdateSpeakSpeakEndpointProviderOpenAi other); - } - - public interface VoiceStage { - /** - *

OpenAI voice

- */ - _FinalStage voice(@NotNull AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice voice); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakEndpointProviderOpenAi build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

- */ - _FinalStage version(Optional version); - - _FinalStage version(String version); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelStage, VoiceStage, _FinalStage { - private AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel model; - - private AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice voice; - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakEndpointProviderOpenAi other) { - version(other.getVersion()); - model(other.getModel()); - voice(other.getVoice()); - return this; - } - - /** - *

OpenAI TTS model

- *

OpenAI TTS model

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

OpenAI voice

- *

OpenAI voice

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakEndpointProviderOpenAi build() { - return new AgentV1UpdateSpeakSpeakEndpointProviderOpenAi(version, model, voice, 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/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel.java deleted file mode 100644 index 890ac90..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel { - public static final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel TTS1HD = - new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel(Value.TTS1HD, "tts-1-hd"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel TTS1 = - new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel(Value.TTS1, "tts-1"); - - private final Value value; - - private final String string; - - AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel(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 AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel - && this.string.equals(((AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TTS1HD: - return visitor.visitTts1Hd(); - case TTS1: - return visitor.visitTts1(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel valueOf(String value) { - switch (value) { - case "tts-1-hd": - return TTS1HD; - case "tts-1": - return TTS1; - default: - return new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiModel(Value.UNKNOWN, value); - } - } - - public enum Value { - TTS1, - - TTS1HD, - - UNKNOWN - } - - public interface Visitor { - T visitTts1(); - - T visitTts1Hd(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice.java deleted file mode 100644 index 300da31..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice { - public static final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice SHIMMER = - new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice(Value.SHIMMER, "shimmer"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice FABLE = - new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice(Value.FABLE, "fable"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice ALLOY = - new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice(Value.ALLOY, "alloy"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice ONYX = - new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice(Value.ONYX, "onyx"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice NOVA = - new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice(Value.NOVA, "nova"); - - public static final AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice ECHO = - new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice(Value.ECHO, "echo"); - - private final Value value; - - private final String string; - - AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice(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 AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice - && this.string.equals(((AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHIMMER: - return visitor.visitShimmer(); - case FABLE: - return visitor.visitFable(); - case ALLOY: - return visitor.visitAlloy(); - case ONYX: - return visitor.visitOnyx(); - case NOVA: - return visitor.visitNova(); - case ECHO: - return visitor.visitEcho(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice valueOf(String value) { - switch (value) { - case "shimmer": - return SHIMMER; - case "fable": - return FABLE; - case "alloy": - return ALLOY; - case "onyx": - return ONYX; - case "nova": - return NOVA; - case "echo": - return ECHO; - default: - return new AgentV1UpdateSpeakSpeakEndpointProviderOpenAiVoice(Value.UNKNOWN, value); - } - } - - public enum Value { - ALLOY, - - ECHO, - - FABLE, - - ONYX, - - NOVA, - - SHIMMER, - - UNKNOWN - } - - public interface Visitor { - T visitAlloy(); - - T visitEcho(); - - T visitFable(); - - T visitOnyx(); - - T visitNova(); - - T visitShimmer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItem.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItem.java deleted file mode 100644 index 40d5ae4..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItem.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakOneItem.Builder.class) -public final class AgentV1UpdateSpeakSpeakOneItem { - private final AgentV1UpdateSpeakSpeakOneItemProvider provider; - - private final Optional endpoint; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakOneItem( - AgentV1UpdateSpeakSpeakOneItemProvider provider, - Optional endpoint, - Map additionalProperties) { - this.provider = provider; - this.endpoint = endpoint; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public AgentV1UpdateSpeakSpeakOneItemProvider getProvider() { - return provider; - } - - /** - * @return Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs. - */ - @JsonProperty("endpoint") - public Optional getEndpoint() { - return endpoint; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakOneItem && equalTo((AgentV1UpdateSpeakSpeakOneItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakOneItem other) { - return provider.equals(other.provider) && endpoint.equals(other.endpoint); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider, this.endpoint); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ProviderStage builder() { - return new Builder(); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull AgentV1UpdateSpeakSpeakOneItemProvider provider); - - Builder from(AgentV1UpdateSpeakSpeakOneItem other); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakOneItem build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

- */ - _FinalStage endpoint(Optional endpoint); - - _FinalStage endpoint(AgentV1UpdateSpeakSpeakOneItemEndpoint endpoint); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ProviderStage, _FinalStage { - private AgentV1UpdateSpeakSpeakOneItemProvider provider; - - private Optional endpoint = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakOneItem other) { - provider(other.getProvider()); - endpoint(other.getEndpoint()); - return this; - } - - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull AgentV1UpdateSpeakSpeakOneItemProvider provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - /** - *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

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

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. - * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

- */ - @java.lang.Override - @JsonSetter(value = "endpoint", nulls = Nulls.SKIP) - public _FinalStage endpoint(Optional endpoint) { - this.endpoint = endpoint; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakOneItem build() { - return new AgentV1UpdateSpeakSpeakOneItem(provider, endpoint, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProvider.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProvider.java deleted file mode 100644 index c208bd5..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProvider.java +++ /dev/null @@ -1,403 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.v1.types; - -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 AgentV1UpdateSpeakSpeakOneItemProvider { - private final Value value; - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private AgentV1UpdateSpeakSpeakOneItemProvider(Value value) { - this.value = value; - } - - public T visit(Visitor visitor) { - return value.visit(visitor); - } - - public static AgentV1UpdateSpeakSpeakOneItemProvider deepgram( - AgentV1UpdateSpeakSpeakOneItemProviderDeepgram value) { - return new AgentV1UpdateSpeakSpeakOneItemProvider(new DeepgramValue(value)); - } - - public static AgentV1UpdateSpeakSpeakOneItemProvider elevenLabs( - AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs value) { - return new AgentV1UpdateSpeakSpeakOneItemProvider(new ElevenLabsValue(value)); - } - - public static AgentV1UpdateSpeakSpeakOneItemProvider cartesia( - AgentV1UpdateSpeakSpeakOneItemProviderCartesia value) { - return new AgentV1UpdateSpeakSpeakOneItemProvider(new CartesiaValue(value)); - } - - public static AgentV1UpdateSpeakSpeakOneItemProvider openAi(AgentV1UpdateSpeakSpeakOneItemProviderOpenAi value) { - return new AgentV1UpdateSpeakSpeakOneItemProvider(new OpenAiValue(value)); - } - - public static AgentV1UpdateSpeakSpeakOneItemProvider awsPolly( - AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly value) { - return new AgentV1UpdateSpeakSpeakOneItemProvider(new AwsPollyValue(value)); - } - - public boolean isDeepgram() { - return value instanceof DeepgramValue; - } - - public boolean isElevenLabs() { - return value instanceof ElevenLabsValue; - } - - public boolean isCartesia() { - return value instanceof CartesiaValue; - } - - public boolean isOpenAi() { - return value instanceof OpenAiValue; - } - - public boolean isAwsPolly() { - return value instanceof AwsPollyValue; - } - - public boolean _isUnknown() { - return value instanceof _UnknownValue; - } - - public Optional getDeepgram() { - if (isDeepgram()) { - return Optional.of(((DeepgramValue) value).value); - } - return Optional.empty(); - } - - public Optional getElevenLabs() { - if (isElevenLabs()) { - return Optional.of(((ElevenLabsValue) value).value); - } - return Optional.empty(); - } - - public Optional getCartesia() { - if (isCartesia()) { - return Optional.of(((CartesiaValue) value).value); - } - return Optional.empty(); - } - - public Optional getOpenAi() { - if (isOpenAi()) { - return Optional.of(((OpenAiValue) value).value); - } - return Optional.empty(); - } - - public Optional getAwsPolly() { - if (isAwsPolly()) { - return Optional.of(((AwsPollyValue) 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 AgentV1UpdateSpeakSpeakOneItemProvider - && value.equals(((AgentV1UpdateSpeakSpeakOneItemProvider) 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 visitDeepgram(AgentV1UpdateSpeakSpeakOneItemProviderDeepgram deepgram); - - T visitElevenLabs(AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs elevenLabs); - - T visitCartesia(AgentV1UpdateSpeakSpeakOneItemProviderCartesia cartesia); - - T visitOpenAi(AgentV1UpdateSpeakSpeakOneItemProviderOpenAi openAi); - - T visitAwsPolly(AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly awsPolly); - - T _visitUnknown(Object unknownType); - } - - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) - @JsonSubTypes({ - @JsonSubTypes.Type(DeepgramValue.class), - @JsonSubTypes.Type(ElevenLabsValue.class), - @JsonSubTypes.Type(CartesiaValue.class), - @JsonSubTypes.Type(OpenAiValue.class), - @JsonSubTypes.Type(AwsPollyValue.class) - }) - @JsonIgnoreProperties(ignoreUnknown = true) - private interface Value { - T visit(Visitor visitor); - } - - @JsonTypeName("deepgram") - @JsonIgnoreProperties("type") - private static final class DeepgramValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakOneItemProviderDeepgram value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private DeepgramValue() {} - - private DeepgramValue(AgentV1UpdateSpeakSpeakOneItemProviderDeepgram value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitDeepgram(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeepgramValue && equalTo((DeepgramValue) other); - } - - private boolean equalTo(DeepgramValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakOneItemProvider{" + "value: " + value + "}"; - } - } - - @JsonTypeName("eleven_labs") - @JsonIgnoreProperties("type") - private static final class ElevenLabsValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private ElevenLabsValue() {} - - private ElevenLabsValue(AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitElevenLabs(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ElevenLabsValue && equalTo((ElevenLabsValue) other); - } - - private boolean equalTo(ElevenLabsValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakOneItemProvider{" + "value: " + value + "}"; - } - } - - @JsonTypeName("cartesia") - @JsonIgnoreProperties("type") - private static final class CartesiaValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakOneItemProviderCartesia value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private CartesiaValue() {} - - private CartesiaValue(AgentV1UpdateSpeakSpeakOneItemProviderCartesia value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitCartesia(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CartesiaValue && equalTo((CartesiaValue) other); - } - - private boolean equalTo(CartesiaValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakOneItemProvider{" + "value: " + value + "}"; - } - } - - @JsonTypeName("open_ai") - @JsonIgnoreProperties("type") - private static final class OpenAiValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakOneItemProviderOpenAi value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private OpenAiValue() {} - - private OpenAiValue(AgentV1UpdateSpeakSpeakOneItemProviderOpenAi value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitOpenAi(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OpenAiValue && equalTo((OpenAiValue) other); - } - - private boolean equalTo(OpenAiValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakOneItemProvider{" + "value: " + value + "}"; - } - } - - @JsonTypeName("aws_polly") - @JsonIgnoreProperties("type") - private static final class AwsPollyValue implements Value { - @JsonUnwrapped - @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private AwsPollyValue() {} - - private AwsPollyValue(AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitAwsPolly(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AwsPollyValue && equalTo((AwsPollyValue) other); - } - - private boolean equalTo(AwsPollyValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "AgentV1UpdateSpeakSpeakOneItemProvider{" + "value: " + value + "}"; - } - } - - @JsonIgnoreProperties("type") - 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 "AgentV1UpdateSpeakSpeakOneItemProvider{" + "type: " + type + ", value: " + value + "}"; - } - } -} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly.java deleted file mode 100644 index b11159a..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly.java +++ /dev/null @@ -1,261 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly.Builder.class) -public final class AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly { - private final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice voice; - - private final String language; - - private final Optional languageCode; - - private final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine engine; - - private final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials credentials; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly( - AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice voice, - String language, - Optional languageCode, - AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine engine, - AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials credentials, - Map additionalProperties) { - this.voice = voice; - this.language = language; - this.languageCode = languageCode; - this.engine = engine; - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - /** - * @return AWS Polly voice name - */ - @JsonProperty("voice") - public AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice getVoice() { - return voice; - } - - /** - * @return Language code to use, e.g. 'en-US'. Corresponds to the language_code parameter in the AWS Polly API - */ - @JsonProperty("language") - public String getLanguage() { - return language; - } - - /** - * @return Use the language field instead. - */ - @JsonProperty("language_code") - public Optional getLanguageCode() { - return languageCode; - } - - @JsonProperty("engine") - public AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine getEngine() { - return engine; - } - - @JsonProperty("credentials") - public AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly - && equalTo((AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly other) { - return voice.equals(other.voice) - && language.equals(other.language) - && languageCode.equals(other.languageCode) - && engine.equals(other.engine) - && credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.voice, this.language, this.languageCode, this.engine, this.credentials); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static VoiceStage builder() { - return new Builder(); - } - - public interface VoiceStage { - /** - *

AWS Polly voice name

- */ - LanguageStage voice(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice voice); - - Builder from(AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly other); - } - - public interface LanguageStage { - /** - *

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

- */ - EngineStage language(@NotNull String language); - } - - public interface EngineStage { - CredentialsStage engine(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine engine); - } - - public interface CredentialsStage { - _FinalStage credentials(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials credentials); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

Use the language field instead.

- */ - _FinalStage languageCode(Optional languageCode); - - _FinalStage languageCode(String languageCode); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements VoiceStage, LanguageStage, EngineStage, CredentialsStage, _FinalStage { - private AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice voice; - - private String language; - - private AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine engine; - - private AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials credentials; - - private Optional languageCode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly other) { - voice(other.getVoice()); - language(other.getLanguage()); - languageCode(other.getLanguageCode()); - engine(other.getEngine()); - credentials(other.getCredentials()); - return this; - } - - /** - *

AWS Polly voice name

- *

AWS Polly voice name

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

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. - */ - @java.lang.Override - @JsonSetter("language") - public EngineStage language(@NotNull String language) { - this.language = Objects.requireNonNull(language, "language must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("engine") - public CredentialsStage engine(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine engine) { - this.engine = Objects.requireNonNull(engine, "engine must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("credentials") - public _FinalStage credentials(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials credentials) { - this.credentials = Objects.requireNonNull(credentials, "credentials must not be null"); - return this; - } - - /** - *

Use the language field instead.

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

Use the language field instead.

- */ - @java.lang.Override - @JsonSetter(value = "language_code", nulls = Nulls.SKIP) - public _FinalStage languageCode(Optional languageCode) { - this.languageCode = languageCode; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly build() { - return new AgentV1UpdateSpeakSpeakOneItemProviderAwsPolly( - voice, language, languageCode, engine, credentials, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesia.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesia.java deleted file mode 100644 index c4509cb..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesia.java +++ /dev/null @@ -1,245 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakOneItemProviderCartesia.Builder.class) -public final class AgentV1UpdateSpeakSpeakOneItemProviderCartesia { - private final Optional version; - - private final AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId modelId; - - private final AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice voice; - - private final Optional language; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakOneItemProviderCartesia( - Optional version, - AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId modelId, - AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice voice, - Optional language, - Map additionalProperties) { - this.version = version; - this.modelId = modelId; - this.voice = voice; - this.language = language; - this.additionalProperties = additionalProperties; - } - - /** - * @return The API version header for the Cartesia text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return Cartesia model ID - */ - @JsonProperty("model_id") - public AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId getModelId() { - return modelId; - } - - @JsonProperty("voice") - public AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice getVoice() { - return voice; - } - - /** - * @return Cartesia language code - */ - @JsonProperty("language") - public Optional getLanguage() { - return language; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakOneItemProviderCartesia - && equalTo((AgentV1UpdateSpeakSpeakOneItemProviderCartesia) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakOneItemProviderCartesia other) { - return version.equals(other.version) - && modelId.equals(other.modelId) - && voice.equals(other.voice) - && language.equals(other.language); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.modelId, this.voice, this.language); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelIdStage builder() { - return new Builder(); - } - - public interface ModelIdStage { - /** - *

Cartesia model ID

- */ - VoiceStage modelId(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId modelId); - - Builder from(AgentV1UpdateSpeakSpeakOneItemProviderCartesia other); - } - - public interface VoiceStage { - _FinalStage voice(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice voice); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakOneItemProviderCartesia build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

The API version header for the Cartesia text-to-speech API

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

Cartesia language code

- */ - _FinalStage language(Optional language); - - _FinalStage language(String language); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelIdStage, VoiceStage, _FinalStage { - private AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId modelId; - - private AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice voice; - - private Optional language = Optional.empty(); - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakOneItemProviderCartesia other) { - version(other.getVersion()); - modelId(other.getModelId()); - voice(other.getVoice()); - language(other.getLanguage()); - return this; - } - - /** - *

Cartesia model ID

- *

Cartesia model ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("model_id") - public VoiceStage modelId(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId modelId) { - this.modelId = Objects.requireNonNull(modelId, "modelId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("voice") - public _FinalStage voice(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice voice) { - this.voice = Objects.requireNonNull(voice, "voice must not be null"); - return this; - } - - /** - *

Cartesia language code

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

Cartesia language code

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

The API version header for the Cartesia text-to-speech API

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

The API version header for the Cartesia text-to-speech API

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakOneItemProviderCartesia build() { - return new AgentV1UpdateSpeakSpeakOneItemProviderCartesia( - version, modelId, voice, language, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderDeepgram.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderDeepgram.java deleted file mode 100644 index 47ec66d..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderDeepgram.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakOneItemProviderDeepgram.Builder.class) -public final class AgentV1UpdateSpeakSpeakOneItemProviderDeepgram { - private final Optional version; - - private final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel model; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakOneItemProviderDeepgram( - Optional version, - AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel model, - Map additionalProperties) { - this.version = version; - this.model = model; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the Deepgram text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return Deepgram TTS model - */ - @JsonProperty("model") - public AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel getModel() { - return model; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakOneItemProviderDeepgram - && equalTo((AgentV1UpdateSpeakSpeakOneItemProviderDeepgram) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakOneItemProviderDeepgram other) { - return version.equals(other.version) && model.equals(other.model); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.model); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelStage builder() { - return new Builder(); - } - - public interface ModelStage { - /** - *

Deepgram TTS model

- */ - _FinalStage model(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel model); - - Builder from(AgentV1UpdateSpeakSpeakOneItemProviderDeepgram other); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakOneItemProviderDeepgram build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

- */ - _FinalStage version(Optional version); - - _FinalStage version(String version); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelStage, _FinalStage { - private AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel model; - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakOneItemProviderDeepgram other) { - version(other.getVersion()); - model(other.getModel()); - return this; - } - - /** - *

Deepgram TTS model

- *

Deepgram TTS model

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

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 - public _FinalStage version(String version) { - this.version = Optional.ofNullable(version); - return this; - } - - /** - *

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakOneItemProviderDeepgram build() { - return new AgentV1UpdateSpeakSpeakOneItemProviderDeepgram(version, model, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs.java deleted file mode 100644 index 5755ded..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs.java +++ /dev/null @@ -1,264 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs.Builder.class) -public final class AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs { - private final Optional version; - - private final AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId modelId; - - private final Optional language; - - private final Optional languageCode; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs( - Optional version, - AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId modelId, - Optional language, - Optional languageCode, - Map additionalProperties) { - this.version = version; - this.modelId = modelId; - this.language = language; - this.languageCode = languageCode; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the ElevenLabs text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return Eleven Labs model ID - */ - @JsonProperty("model_id") - public AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId getModelId() { - return modelId; - } - - /** - * @return Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API - */ - @JsonProperty("language") - public Optional getLanguage() { - return language; - } - - /** - * @return Use the language field instead. - */ - @JsonProperty("language_code") - public Optional getLanguageCode() { - return languageCode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs - && equalTo((AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs other) { - return version.equals(other.version) - && modelId.equals(other.modelId) - && language.equals(other.language) - && languageCode.equals(other.languageCode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.modelId, this.language, this.languageCode); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelIdStage builder() { - return new Builder(); - } - - public interface ModelIdStage { - /** - *

Eleven Labs model ID

- */ - _FinalStage modelId(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId modelId); - - Builder from(AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs other); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

Use the language field instead.

- */ - _FinalStage languageCode(Optional languageCode); - - _FinalStage languageCode(String languageCode); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelIdStage, _FinalStage { - private AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId modelId; - - private Optional languageCode = Optional.empty(); - - private Optional language = Optional.empty(); - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs other) { - version(other.getVersion()); - modelId(other.getModelId()); - language(other.getLanguage()); - languageCode(other.getLanguageCode()); - return this; - } - - /** - *

Eleven Labs model ID

- *

Eleven Labs model ID

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

Use the language field instead.

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

Use the language field instead.

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs build() { - return new AgentV1UpdateSpeakSpeakOneItemProviderElevenLabs( - version, modelId, language, languageCode, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAi.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAi.java deleted file mode 100644 index 846594a..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAi.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakOneItemProviderOpenAi.Builder.class) -public final class AgentV1UpdateSpeakSpeakOneItemProviderOpenAi { - private final Optional version; - - private final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel model; - - private final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice voice; - - private final Map additionalProperties; - - private AgentV1UpdateSpeakSpeakOneItemProviderOpenAi( - Optional version, - AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel model, - AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice voice, - Map additionalProperties) { - this.version = version; - this.model = model; - this.voice = voice; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the OpenAI text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return OpenAI TTS model - */ - @JsonProperty("model") - public AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel getModel() { - return model; - } - - /** - * @return OpenAI voice - */ - @JsonProperty("voice") - public AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice getVoice() { - return voice; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakOneItemProviderOpenAi - && equalTo((AgentV1UpdateSpeakSpeakOneItemProviderOpenAi) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AgentV1UpdateSpeakSpeakOneItemProviderOpenAi other) { - return version.equals(other.version) && model.equals(other.model) && voice.equals(other.voice); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.model, this.voice); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelStage builder() { - return new Builder(); - } - - public interface ModelStage { - /** - *

OpenAI TTS model

- */ - VoiceStage model(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel model); - - Builder from(AgentV1UpdateSpeakSpeakOneItemProviderOpenAi other); - } - - public interface VoiceStage { - /** - *

OpenAI voice

- */ - _FinalStage voice(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice voice); - } - - public interface _FinalStage { - AgentV1UpdateSpeakSpeakOneItemProviderOpenAi build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

- */ - _FinalStage version(Optional version); - - _FinalStage version(String version); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelStage, VoiceStage, _FinalStage { - private AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel model; - - private AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice voice; - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakOneItemProviderOpenAi other) { - version(other.getVersion()); - model(other.getModel()); - voice(other.getVoice()); - return this; - } - - /** - *

OpenAI TTS model

- *

OpenAI TTS model

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

OpenAI voice

- *

OpenAI voice

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public AgentV1UpdateSpeakSpeakOneItemProviderOpenAi build() { - return new AgentV1UpdateSpeakSpeakOneItemProviderOpenAi(version, model, voice, 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/agent/v1/types/AgentV1UpdateThink.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateThink.java new file mode 100644 index 0000000..dd78f07 --- /dev/null +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateThink.java @@ -0,0 +1,126 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.agent.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 = AgentV1UpdateThink.Builder.class) +public final class AgentV1UpdateThink { + private final AgentV1UpdateThinkThink think; + + private final Map additionalProperties; + + private AgentV1UpdateThink(AgentV1UpdateThinkThink think, Map additionalProperties) { + this.think = think; + this.additionalProperties = additionalProperties; + } + + /** + * @return Message type identifier for updating the think model + */ + @JsonProperty("type") + public String getType() { + return "UpdateThink"; + } + + @JsonProperty("think") + public AgentV1UpdateThinkThink getThink() { + return think; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AgentV1UpdateThink && equalTo((AgentV1UpdateThink) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AgentV1UpdateThink other) { + return think.equals(other.think); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.think); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ThinkStage builder() { + return new Builder(); + } + + public interface ThinkStage { + _FinalStage think(@NotNull AgentV1UpdateThinkThink think); + + Builder from(AgentV1UpdateThink other); + } + + public interface _FinalStage { + AgentV1UpdateThink build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ThinkStage, _FinalStage { + private AgentV1UpdateThinkThink think; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AgentV1UpdateThink other) { + think(other.getThink()); + return this; + } + + @java.lang.Override + @JsonSetter("think") + public _FinalStage think(@NotNull AgentV1UpdateThinkThink think) { + this.think = Objects.requireNonNull(think, "think must not be null"); + return this; + } + + @java.lang.Override + public AgentV1UpdateThink build() { + return new AgentV1UpdateThink(think, 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/agent/v1/types/AgentV1UpdateThinkThink.java b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateThinkThink.java new file mode 100644 index 0000000..421d70e --- /dev/null +++ b/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateThinkThink.java @@ -0,0 +1,98 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.agent.v1.types; + +import com.deepgram.core.ObjectMappers; +import com.deepgram.types.ThinkSettingsV1; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import java.io.IOException; +import java.util.List; +import java.util.Objects; + +@JsonDeserialize(using = AgentV1UpdateThinkThink.Deserializer.class) +public final class AgentV1UpdateThinkThink { + private final Object value; + + private final int type; + + private AgentV1UpdateThinkThink(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ThinkSettingsV1) this.value); + } else if (this.type == 1) { + return visitor.visit((List) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AgentV1UpdateThinkThink && equalTo((AgentV1UpdateThinkThink) other); + } + + private boolean equalTo(AgentV1UpdateThinkThink other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AgentV1UpdateThinkThink of(ThinkSettingsV1 value) { + return new AgentV1UpdateThinkThink(value, 0); + } + + public static AgentV1UpdateThinkThink of(List value) { + return new AgentV1UpdateThinkThink(value, 1); + } + + public interface Visitor { + T visit(ThinkSettingsV1 value); + + T visit(List value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AgentV1UpdateThinkThink.class); + } + + @java.lang.Override + public AgentV1UpdateThinkThink deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ThinkSettingsV1.class)); + } catch (RuntimeException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); + } catch (RuntimeException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/Cartesia.java b/src/main/java/com/deepgram/resources/agent/v1/types/Cartesia.java deleted file mode 100644 index e6ea755..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/Cartesia.java +++ /dev/null @@ -1,243 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = Cartesia.Builder.class) -public final class Cartesia { - private final Optional version; - - private final AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId modelId; - - private final AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice voice; - - private final Optional language; - - private final Map additionalProperties; - - private Cartesia( - Optional version, - AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId modelId, - AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice voice, - Optional language, - Map additionalProperties) { - this.version = version; - this.modelId = modelId; - this.voice = voice; - this.language = language; - this.additionalProperties = additionalProperties; - } - - /** - * @return The API version header for the Cartesia text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return Cartesia model ID - */ - @JsonProperty("model_id") - public AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId getModelId() { - return modelId; - } - - @JsonProperty("voice") - public AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice getVoice() { - return voice; - } - - /** - * @return Cartesia language code - */ - @JsonProperty("language") - public Optional getLanguage() { - return language; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Cartesia && equalTo((Cartesia) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Cartesia other) { - return version.equals(other.version) - && modelId.equals(other.modelId) - && voice.equals(other.voice) - && language.equals(other.language); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.modelId, this.voice, this.language); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelIdStage builder() { - return new Builder(); - } - - public interface ModelIdStage { - /** - *

Cartesia model ID

- */ - VoiceStage modelId(@NotNull AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId modelId); - - Builder from(Cartesia other); - } - - public interface VoiceStage { - _FinalStage voice(@NotNull AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice voice); - } - - public interface _FinalStage { - Cartesia build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

The API version header for the Cartesia text-to-speech API

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

Cartesia language code

- */ - _FinalStage language(Optional language); - - _FinalStage language(String language); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelIdStage, VoiceStage, _FinalStage { - private AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId modelId; - - private AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice voice; - - private Optional language = Optional.empty(); - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(Cartesia other) { - version(other.getVersion()); - modelId(other.getModelId()); - voice(other.getVoice()); - language(other.getLanguage()); - return this; - } - - /** - *

Cartesia model ID

- *

Cartesia model ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("model_id") - public VoiceStage modelId(@NotNull AgentV1SettingsAgentSpeakOneItemProviderCartesiaModelId modelId) { - this.modelId = Objects.requireNonNull(modelId, "modelId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("voice") - public _FinalStage voice(@NotNull AgentV1SettingsAgentSpeakOneItemProviderCartesiaVoice voice) { - this.voice = Objects.requireNonNull(voice, "voice must not be null"); - return this; - } - - /** - *

Cartesia language code

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

Cartesia language code

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

The API version header for the Cartesia text-to-speech API

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

The API version header for the Cartesia text-to-speech API

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public Cartesia build() { - return new Cartesia(version, modelId, voice, language, 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/agent/v1/types/Deepgram.java b/src/main/java/com/deepgram/resources/agent/v1/types/Deepgram.java deleted file mode 100644 index f69db3f..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/Deepgram.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = Deepgram.Builder.class) -public final class Deepgram { - private final Optional version; - - private final AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel model; - - private final Map additionalProperties; - - private Deepgram( - Optional version, - AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel model, - Map additionalProperties) { - this.version = version; - this.model = model; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the Deepgram text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return Deepgram TTS model - */ - @JsonProperty("model") - public AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel getModel() { - return model; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Deepgram && equalTo((Deepgram) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Deepgram other) { - return version.equals(other.version) && model.equals(other.model); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.model); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelStage builder() { - return new Builder(); - } - - public interface ModelStage { - /** - *

Deepgram TTS model

- */ - _FinalStage model(@NotNull AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel model); - - Builder from(Deepgram other); - } - - public interface _FinalStage { - Deepgram build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

- */ - _FinalStage version(Optional version); - - _FinalStage version(String version); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelStage, _FinalStage { - private AgentV1SettingsAgentSpeakOneItemProviderDeepgramModel model; - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(Deepgram other) { - version(other.getVersion()); - model(other.getModel()); - return this; - } - - /** - *

Deepgram TTS model

- *

Deepgram TTS model

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

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 - public _FinalStage version(String version) { - this.version = Optional.ofNullable(version); - return this; - } - - /** - *

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public Deepgram build() { - return new Deepgram(version, model, 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/agent/v1/types/ElevenLabs.java b/src/main/java/com/deepgram/resources/agent/v1/types/ElevenLabs.java deleted file mode 100644 index b6d2faf..0000000 --- a/src/main/java/com/deepgram/resources/agent/v1/types/ElevenLabs.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.deepgram.resources.agent.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.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) -@JsonDeserialize(builder = ElevenLabs.Builder.class) -public final class ElevenLabs { - private final Optional version; - - private final AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId modelId; - - private final Optional language; - - private final Optional languageCode; - - private final Map additionalProperties; - - private ElevenLabs( - Optional version, - AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId modelId, - Optional language, - Optional languageCode, - Map additionalProperties) { - this.version = version; - this.modelId = modelId; - this.language = language; - this.languageCode = languageCode; - this.additionalProperties = additionalProperties; - } - - /** - * @return The REST API version for the ElevenLabs text-to-speech API - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return Eleven Labs model ID - */ - @JsonProperty("model_id") - public AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId getModelId() { - return modelId; - } - - /** - * @return Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API - */ - @JsonProperty("language") - public Optional getLanguage() { - return language; - } - - /** - * @return Use the language field instead. - */ - @JsonProperty("language_code") - public Optional getLanguageCode() { - return languageCode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ElevenLabs && equalTo((ElevenLabs) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ElevenLabs other) { - return version.equals(other.version) - && modelId.equals(other.modelId) - && language.equals(other.language) - && languageCode.equals(other.languageCode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.version, this.modelId, this.language, this.languageCode); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModelIdStage builder() { - return new Builder(); - } - - public interface ModelIdStage { - /** - *

Eleven Labs model ID

- */ - _FinalStage modelId(@NotNull AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId modelId); - - Builder from(ElevenLabs other); - } - - public interface _FinalStage { - ElevenLabs build(); - - _FinalStage additionalProperty(String key, Object value); - - _FinalStage additionalProperties(Map additionalProperties); - - /** - *

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

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

Use the language field instead.

- */ - _FinalStage languageCode(Optional languageCode); - - _FinalStage languageCode(String languageCode); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModelIdStage, _FinalStage { - private AgentV1SettingsAgentSpeakOneItemProviderElevenLabsModelId modelId; - - private Optional languageCode = Optional.empty(); - - private Optional language = Optional.empty(); - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ElevenLabs other) { - version(other.getVersion()); - modelId(other.getModelId()); - language(other.getLanguage()); - languageCode(other.getLanguageCode()); - return this; - } - - /** - *

Eleven Labs model ID

- *

Eleven Labs model ID

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

Use the language field instead.

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

Use the language field instead.

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public ElevenLabs build() { - return new ElevenLabs(version, modelId, language, languageCode, 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/agent/v1/websocket/V1WebSocketClient.java b/src/main/java/com/deepgram/resources/agent/v1/websocket/V1WebSocketClient.java index 5e78613..5add524 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/websocket/V1WebSocketClient.java +++ b/src/main/java/com/deepgram/resources/agent/v1/websocket/V1WebSocketClient.java @@ -24,8 +24,10 @@ import com.deepgram.resources.agent.v1.types.AgentV1Settings; import com.deepgram.resources.agent.v1.types.AgentV1SettingsApplied; import com.deepgram.resources.agent.v1.types.AgentV1SpeakUpdated; +import com.deepgram.resources.agent.v1.types.AgentV1ThinkUpdated; import com.deepgram.resources.agent.v1.types.AgentV1UpdatePrompt; import com.deepgram.resources.agent.v1.types.AgentV1UpdateSpeak; +import com.deepgram.resources.agent.v1.types.AgentV1UpdateThink; import com.deepgram.resources.agent.v1.types.AgentV1UserStartedSpeaking; import com.deepgram.resources.agent.v1.types.AgentV1Warning; import com.deepgram.resources.agent.v1.types.AgentV1Welcome; @@ -76,6 +78,8 @@ public class V1WebSocketClient implements AutoCloseable { private volatile Consumer speakUpdatedHandler; + private volatile Consumer thinkUpdatedHandler; + private volatile Consumer injectionRefusedHandler; private volatile Consumer welcomeHandler; @@ -275,6 +279,15 @@ public CompletableFuture sendUpdatePrompt(AgentV1UpdatePrompt message) { return sendMessage(message); } + /** + * Sends an AgentV1UpdateThink message to the server asynchronously. + * @param message the message to send + * @return a CompletableFuture that completes when the message is sent + */ + public CompletableFuture sendUpdateThink(AgentV1UpdateThink message) { + return sendMessage(message); + } + /** * Sends an AgentV1Media message to the server asynchronously. * @param message the message to send @@ -317,6 +330,14 @@ public void onSpeakUpdated(Consumer handler) { this.speakUpdatedHandler = handler; } + /** + * Registers a handler for AgentV1ThinkUpdated messages from the server. + * @param handler the handler to invoke when a message is received + */ + public void onThinkUpdated(Consumer handler) { + this.thinkUpdatedHandler = handler; + } + /** * Registers a handler for AgentV1InjectionRefused messages from the server. * @param handler the handler to invoke when a message is received @@ -533,6 +554,14 @@ private void handleIncomingMessage(String json) { } } break; + case "ThinkUpdated": + if (thinkUpdatedHandler != null) { + AgentV1ThinkUpdated event = objectMapper.treeToValue(node, AgentV1ThinkUpdated.class); + if (event != null) { + thinkUpdatedHandler.accept(event); + } + } + break; case "InjectionRefused": if (injectionRefusedHandler != null) { AgentV1InjectionRefused event = objectMapper.treeToValue(node, AgentV1InjectionRefused.class); 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 5bdd368..c8de213 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 @@ -63,98 +63,64 @@ public CompletableFuture> trans QueryStringMapper.addQueryParameter( httpUrl, "callback_method", request.getCallbackMethod().get(), false); } - if (request.getSentiment().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sentiment", request.getSentiment().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "sentiment", request.getSentiment().orElse(false), false); if (request.getSummarize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "summarize", request.getSummarize().get(), false); } - if (request.getTopics().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "topics", request.getTopics().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "topics", request.getTopics().orElse(false), false); if (request.getCustomTopicMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_topic_mode", request.getCustomTopicMode().get(), false); } - if (request.getIntents().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "intents", request.getIntents().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "intents", request.getIntents().orElse(false), false); if (request.getCustomIntentMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_intent_mode", request.getCustomIntentMode().get(), false); } - if (request.getDetectEntities().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "detect_entities", request.getDetectEntities().get(), false); - } - if (request.getDetectLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "detect_language", request.getDetectLanguage().get(), false); - } - if (request.getDiarize().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "diarize", request.getDiarize().get(), false); - } - if (request.getDictation().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "dictation", request.getDictation().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "detect_entities", request.getDetectEntities().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "detect_language", request.getDetectLanguage().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "diarize", request.getDiarize().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "dictation", request.getDictation().orElse(false), false); if (request.getEncoding().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "encoding", request.getEncoding().get(), false); } - if (request.getFillerWords().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "filler_words", request.getFillerWords().get(), false); - } - if (request.getLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "language", request.getLanguage().get(), false); - } - if (request.getMeasurements().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "measurements", request.getMeasurements().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "filler_words", request.getFillerWords().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "language", request.getLanguage().orElse("en"), false); + QueryStringMapper.addQueryParameter( + httpUrl, "measurements", request.getMeasurements().orElse(false), false); if (request.getModel().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "model", request.getModel().get(), false); } - if (request.getMultichannel().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "multichannel", request.getMultichannel().get(), false); - } - if (request.getNumerals().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "numerals", request.getNumerals().get(), false); - } - if (request.getParagraphs().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "paragraphs", request.getParagraphs().get(), false); - } - if (request.getProfanityFilter().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "profanity_filter", request.getProfanityFilter().get(), false); - } - if (request.getPunctuate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "punctuate", request.getPunctuate().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "multichannel", request.getMultichannel().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "numerals", request.getNumerals().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "paragraphs", request.getParagraphs().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "profanity_filter", request.getProfanityFilter().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "punctuate", request.getPunctuate().orElse(false), false); if (request.getRedact().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "redact", request.getRedact().get(), false); } - if (request.getSmartFormat().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "smart_format", request.getSmartFormat().get(), false); - } - if (request.getUtterances().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "utterances", request.getUtterances().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "smart_format", request.getSmartFormat().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "utterances", request.getUtterances().orElse(false), false); if (request.getUttSplit().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "utt_split", request.getUttSplit().get(), false); @@ -163,10 +129,8 @@ public CompletableFuture> trans QueryStringMapper.addQueryParameter( httpUrl, "version", request.getVersion().get(), false); } - if (request.getMipOptOut().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "mip_opt_out", request.getMipOptOut().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "mip_opt_out", request.getMipOptOut().orElse(false), false); if (request.getExtra().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "extra", request.getExtra().get(), true); @@ -300,98 +264,64 @@ public CompletableFuture> trans QueryStringMapper.addQueryParameter( httpUrl, "callback_method", request.getCallbackMethod().get(), false); } - if (request.getSentiment().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sentiment", request.getSentiment().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "sentiment", request.getSentiment().orElse(false), false); if (request.getSummarize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "summarize", request.getSummarize().get(), false); } - if (request.getTopics().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "topics", request.getTopics().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "topics", request.getTopics().orElse(false), false); if (request.getCustomTopicMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_topic_mode", request.getCustomTopicMode().get(), false); } - if (request.getIntents().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "intents", request.getIntents().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "intents", request.getIntents().orElse(false), false); if (request.getCustomIntentMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_intent_mode", request.getCustomIntentMode().get(), false); } - if (request.getDetectEntities().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "detect_entities", request.getDetectEntities().get(), false); - } - if (request.getDetectLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "detect_language", request.getDetectLanguage().get(), false); - } - if (request.getDiarize().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "diarize", request.getDiarize().get(), false); - } - if (request.getDictation().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "dictation", request.getDictation().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "detect_entities", request.getDetectEntities().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "detect_language", request.getDetectLanguage().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "diarize", request.getDiarize().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "dictation", request.getDictation().orElse(false), false); if (request.getEncoding().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "encoding", request.getEncoding().get(), false); } - if (request.getFillerWords().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "filler_words", request.getFillerWords().get(), false); - } - if (request.getLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "language", request.getLanguage().get(), false); - } - if (request.getMeasurements().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "measurements", request.getMeasurements().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "filler_words", request.getFillerWords().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "language", request.getLanguage().orElse("en"), false); + QueryStringMapper.addQueryParameter( + httpUrl, "measurements", request.getMeasurements().orElse(false), false); if (request.getModel().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "model", request.getModel().get(), false); } - if (request.getMultichannel().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "multichannel", request.getMultichannel().get(), false); - } - if (request.getNumerals().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "numerals", request.getNumerals().get(), false); - } - if (request.getParagraphs().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "paragraphs", request.getParagraphs().get(), false); - } - if (request.getProfanityFilter().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "profanity_filter", request.getProfanityFilter().get(), false); - } - if (request.getPunctuate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "punctuate", request.getPunctuate().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "multichannel", request.getMultichannel().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "numerals", request.getNumerals().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "paragraphs", request.getParagraphs().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "profanity_filter", request.getProfanityFilter().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "punctuate", request.getPunctuate().orElse(false), false); if (request.getRedact().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "redact", request.getRedact().get(), false); } - if (request.getSmartFormat().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "smart_format", request.getSmartFormat().get(), false); - } - if (request.getUtterances().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "utterances", request.getUtterances().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "smart_format", request.getSmartFormat().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "utterances", request.getUtterances().orElse(false), false); if (request.getUttSplit().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "utt_split", request.getUttSplit().get(), false); @@ -400,10 +330,8 @@ public CompletableFuture> trans QueryStringMapper.addQueryParameter( httpUrl, "version", request.getVersion().get(), false); } - if (request.getMipOptOut().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "mip_opt_out", request.getMipOptOut().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "mip_opt_out", request.getMipOptOut().orElse(false), false); if (request.getExtra().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "extra", request.getExtra().get(), true); 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 7dbd0fb..58dc810 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 @@ -58,98 +58,64 @@ public DeepgramApiHttpResponse transcribeUrl( QueryStringMapper.addQueryParameter( httpUrl, "callback_method", request.getCallbackMethod().get(), false); } - if (request.getSentiment().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sentiment", request.getSentiment().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "sentiment", request.getSentiment().orElse(false), false); if (request.getSummarize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "summarize", request.getSummarize().get(), false); } - if (request.getTopics().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "topics", request.getTopics().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "topics", request.getTopics().orElse(false), false); if (request.getCustomTopicMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_topic_mode", request.getCustomTopicMode().get(), false); } - if (request.getIntents().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "intents", request.getIntents().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "intents", request.getIntents().orElse(false), false); if (request.getCustomIntentMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_intent_mode", request.getCustomIntentMode().get(), false); } - if (request.getDetectEntities().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "detect_entities", request.getDetectEntities().get(), false); - } - if (request.getDetectLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "detect_language", request.getDetectLanguage().get(), false); - } - if (request.getDiarize().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "diarize", request.getDiarize().get(), false); - } - if (request.getDictation().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "dictation", request.getDictation().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "detect_entities", request.getDetectEntities().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "detect_language", request.getDetectLanguage().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "diarize", request.getDiarize().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "dictation", request.getDictation().orElse(false), false); if (request.getEncoding().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "encoding", request.getEncoding().get(), false); } - if (request.getFillerWords().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "filler_words", request.getFillerWords().get(), false); - } - if (request.getLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "language", request.getLanguage().get(), false); - } - if (request.getMeasurements().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "measurements", request.getMeasurements().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "filler_words", request.getFillerWords().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "language", request.getLanguage().orElse("en"), false); + QueryStringMapper.addQueryParameter( + httpUrl, "measurements", request.getMeasurements().orElse(false), false); if (request.getModel().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "model", request.getModel().get(), false); } - if (request.getMultichannel().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "multichannel", request.getMultichannel().get(), false); - } - if (request.getNumerals().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "numerals", request.getNumerals().get(), false); - } - if (request.getParagraphs().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "paragraphs", request.getParagraphs().get(), false); - } - if (request.getProfanityFilter().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "profanity_filter", request.getProfanityFilter().get(), false); - } - if (request.getPunctuate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "punctuate", request.getPunctuate().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "multichannel", request.getMultichannel().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "numerals", request.getNumerals().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "paragraphs", request.getParagraphs().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "profanity_filter", request.getProfanityFilter().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "punctuate", request.getPunctuate().orElse(false), false); if (request.getRedact().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "redact", request.getRedact().get(), false); } - if (request.getSmartFormat().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "smart_format", request.getSmartFormat().get(), false); - } - if (request.getUtterances().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "utterances", request.getUtterances().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "smart_format", request.getSmartFormat().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "utterances", request.getUtterances().orElse(false), false); if (request.getUttSplit().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "utt_split", request.getUttSplit().get(), false); @@ -158,10 +124,8 @@ public DeepgramApiHttpResponse transcribeUrl( QueryStringMapper.addQueryParameter( httpUrl, "version", request.getVersion().get(), false); } - if (request.getMipOptOut().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "mip_opt_out", request.getMipOptOut().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "mip_opt_out", request.getMipOptOut().orElse(false), false); if (request.getExtra().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "extra", request.getExtra().get(), true); @@ -279,98 +243,64 @@ public DeepgramApiHttpResponse transcribeFile( QueryStringMapper.addQueryParameter( httpUrl, "callback_method", request.getCallbackMethod().get(), false); } - if (request.getSentiment().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sentiment", request.getSentiment().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "sentiment", request.getSentiment().orElse(false), false); if (request.getSummarize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "summarize", request.getSummarize().get(), false); } - if (request.getTopics().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "topics", request.getTopics().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "topics", request.getTopics().orElse(false), false); if (request.getCustomTopicMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_topic_mode", request.getCustomTopicMode().get(), false); } - if (request.getIntents().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "intents", request.getIntents().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "intents", request.getIntents().orElse(false), false); if (request.getCustomIntentMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_intent_mode", request.getCustomIntentMode().get(), false); } - if (request.getDetectEntities().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "detect_entities", request.getDetectEntities().get(), false); - } - if (request.getDetectLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "detect_language", request.getDetectLanguage().get(), false); - } - if (request.getDiarize().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "diarize", request.getDiarize().get(), false); - } - if (request.getDictation().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "dictation", request.getDictation().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "detect_entities", request.getDetectEntities().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "detect_language", request.getDetectLanguage().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "diarize", request.getDiarize().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "dictation", request.getDictation().orElse(false), false); if (request.getEncoding().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "encoding", request.getEncoding().get(), false); } - if (request.getFillerWords().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "filler_words", request.getFillerWords().get(), false); - } - if (request.getLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "language", request.getLanguage().get(), false); - } - if (request.getMeasurements().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "measurements", request.getMeasurements().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "filler_words", request.getFillerWords().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "language", request.getLanguage().orElse("en"), false); + QueryStringMapper.addQueryParameter( + httpUrl, "measurements", request.getMeasurements().orElse(false), false); if (request.getModel().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "model", request.getModel().get(), false); } - if (request.getMultichannel().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "multichannel", request.getMultichannel().get(), false); - } - if (request.getNumerals().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "numerals", request.getNumerals().get(), false); - } - if (request.getParagraphs().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "paragraphs", request.getParagraphs().get(), false); - } - if (request.getProfanityFilter().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "profanity_filter", request.getProfanityFilter().get(), false); - } - if (request.getPunctuate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "punctuate", request.getPunctuate().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "multichannel", request.getMultichannel().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "numerals", request.getNumerals().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "paragraphs", request.getParagraphs().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "profanity_filter", request.getProfanityFilter().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "punctuate", request.getPunctuate().orElse(false), false); if (request.getRedact().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "redact", request.getRedact().get(), false); } - if (request.getSmartFormat().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "smart_format", request.getSmartFormat().get(), false); - } - if (request.getUtterances().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "utterances", request.getUtterances().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "smart_format", request.getSmartFormat().orElse(false), false); + QueryStringMapper.addQueryParameter( + httpUrl, "utterances", request.getUtterances().orElse(false), false); if (request.getUttSplit().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "utt_split", request.getUttSplit().get(), false); @@ -379,10 +309,8 @@ public DeepgramApiHttpResponse transcribeFile( QueryStringMapper.addQueryParameter( httpUrl, "version", request.getVersion().get(), false); } - if (request.getMipOptOut().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "mip_opt_out", request.getMipOptOut().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "mip_opt_out", request.getMipOptOut().orElse(false), false); if (request.getExtra().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "extra", request.getExtra().get(), true); diff --git a/src/main/java/com/deepgram/resources/listen/v1/media/types/MediaTranscribeRequestModel.java b/src/main/java/com/deepgram/resources/listen/v1/media/types/MediaTranscribeRequestModel.java index 175ccdb..de18fe5 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/media/types/MediaTranscribeRequestModel.java +++ b/src/main/java/com/deepgram/resources/listen/v1/media/types/MediaTranscribeRequestModel.java @@ -7,85 +7,85 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class MediaTranscribeRequestModel { - public static final MediaTranscribeRequestModel NOVA2VOICEMAIL = - new MediaTranscribeRequestModel(Value.NOVA2VOICEMAIL, "nova-2-voicemail"); - - public static final MediaTranscribeRequestModel NOVA3 = new MediaTranscribeRequestModel(Value.NOVA3, "nova-3"); - public static final MediaTranscribeRequestModel FINANCE = new MediaTranscribeRequestModel(Value.FINANCE, "finance"); + public static final MediaTranscribeRequestModel ENHANCED_MEETING = + new MediaTranscribeRequestModel(Value.ENHANCED_MEETING, "enhanced-meeting"); + public static final MediaTranscribeRequestModel NOVA_MEDICAL = new MediaTranscribeRequestModel(Value.NOVA_MEDICAL, "nova-medical"); - public static final MediaTranscribeRequestModel ENHANCED_GENERAL = - new MediaTranscribeRequestModel(Value.ENHANCED_GENERAL, "enhanced-general"); + public static final MediaTranscribeRequestModel NOVA2VOICEMAIL = + new MediaTranscribeRequestModel(Value.NOVA2VOICEMAIL, "nova-2-voicemail"); - public static final MediaTranscribeRequestModel NOVA_GENERAL = - new MediaTranscribeRequestModel(Value.NOVA_GENERAL, "nova-general"); + public static final MediaTranscribeRequestModel NOVA3 = new MediaTranscribeRequestModel(Value.NOVA3, "nova-3"); public static final MediaTranscribeRequestModel NOVA3MEDICAL = new MediaTranscribeRequestModel(Value.NOVA3MEDICAL, "nova-3-medical"); public static final MediaTranscribeRequestModel NOVA2 = new MediaTranscribeRequestModel(Value.NOVA2, "nova-2"); + public static final MediaTranscribeRequestModel NOVA_GENERAL = + new MediaTranscribeRequestModel(Value.NOVA_GENERAL, "nova-general"); + public static final MediaTranscribeRequestModel VOICEMAIL = new MediaTranscribeRequestModel(Value.VOICEMAIL, "voicemail"); - public static final MediaTranscribeRequestModel ENHANCED_FINANCE = - new MediaTranscribeRequestModel(Value.ENHANCED_FINANCE, "enhanced-finance"); + public static final MediaTranscribeRequestModel ENHANCED_PHONECALL = + new MediaTranscribeRequestModel(Value.ENHANCED_PHONECALL, "enhanced-phonecall"); public static final MediaTranscribeRequestModel NOVA2FINANCE = new MediaTranscribeRequestModel(Value.NOVA2FINANCE, "nova-2-finance"); + public static final MediaTranscribeRequestModel NOVA2CONVERSATIONALAI = + new MediaTranscribeRequestModel(Value.NOVA2CONVERSATIONALAI, "nova-2-conversationalai"); + public static final MediaTranscribeRequestModel MEETING = new MediaTranscribeRequestModel(Value.MEETING, "meeting"); public static final MediaTranscribeRequestModel PHONECALL = new MediaTranscribeRequestModel(Value.PHONECALL, "phonecall"); - public static final MediaTranscribeRequestModel NOVA2CONVERSATIONALAI = - new MediaTranscribeRequestModel(Value.NOVA2CONVERSATIONALAI, "nova-2-conversationalai"); - public static final MediaTranscribeRequestModel VIDEO = new MediaTranscribeRequestModel(Value.VIDEO, "video"); public static final MediaTranscribeRequestModel CONVERSATIONALAI = new MediaTranscribeRequestModel(Value.CONVERSATIONALAI, "conversationalai"); - public static final MediaTranscribeRequestModel NOVA2VIDEO = - new MediaTranscribeRequestModel(Value.NOVA2VIDEO, "nova-2-video"); + public static final MediaTranscribeRequestModel NOVA2GENERAL = + new MediaTranscribeRequestModel(Value.NOVA2GENERAL, "nova-2-general"); public static final MediaTranscribeRequestModel NOVA2DRIVETHRU = new MediaTranscribeRequestModel(Value.NOVA2DRIVETHRU, "nova-2-drivethru"); public static final MediaTranscribeRequestModel BASE = new MediaTranscribeRequestModel(Value.BASE, "base"); - public static final MediaTranscribeRequestModel NOVA2GENERAL = - new MediaTranscribeRequestModel(Value.NOVA2GENERAL, "nova-2-general"); + public static final MediaTranscribeRequestModel NOVA2VIDEO = + new MediaTranscribeRequestModel(Value.NOVA2VIDEO, "nova-2-video"); public static final MediaTranscribeRequestModel NOVA = new MediaTranscribeRequestModel(Value.NOVA, "nova"); - public static final MediaTranscribeRequestModel ENHANCED_PHONECALL = - new MediaTranscribeRequestModel(Value.ENHANCED_PHONECALL, "enhanced-phonecall"); + public static final MediaTranscribeRequestModel ENHANCED_FINANCE = + new MediaTranscribeRequestModel(Value.ENHANCED_FINANCE, "enhanced-finance"); - public static final MediaTranscribeRequestModel NOVA2MEDICAL = - new MediaTranscribeRequestModel(Value.NOVA2MEDICAL, "nova-2-medical"); + public static final MediaTranscribeRequestModel NOVA2AUTOMOTIVE = + new MediaTranscribeRequestModel(Value.NOVA2AUTOMOTIVE, "nova-2-automotive"); public static final MediaTranscribeRequestModel NOVA3GENERAL = new MediaTranscribeRequestModel(Value.NOVA3GENERAL, "nova-3-general"); - public static final MediaTranscribeRequestModel ENHANCED = - new MediaTranscribeRequestModel(Value.ENHANCED, "enhanced"); - - public static final MediaTranscribeRequestModel NOVA_PHONECALL = - new MediaTranscribeRequestModel(Value.NOVA_PHONECALL, "nova-phonecall"); + public static final MediaTranscribeRequestModel NOVA2MEDICAL = + new MediaTranscribeRequestModel(Value.NOVA2MEDICAL, "nova-2-medical"); public static final MediaTranscribeRequestModel NOVA2MEETING = new MediaTranscribeRequestModel(Value.NOVA2MEETING, "nova-2-meeting"); - public static final MediaTranscribeRequestModel NOVA2AUTOMOTIVE = - new MediaTranscribeRequestModel(Value.NOVA2AUTOMOTIVE, "nova-2-automotive"); + public static final MediaTranscribeRequestModel ENHANCED_GENERAL = + new MediaTranscribeRequestModel(Value.ENHANCED_GENERAL, "enhanced-general"); - public static final MediaTranscribeRequestModel ENHANCED_MEETING = - new MediaTranscribeRequestModel(Value.ENHANCED_MEETING, "enhanced-meeting"); + public static final MediaTranscribeRequestModel ENHANCED = + new MediaTranscribeRequestModel(Value.ENHANCED, "enhanced"); + + public static final MediaTranscribeRequestModel NOVA_PHONECALL = + new MediaTranscribeRequestModel(Value.NOVA_PHONECALL, "nova-phonecall"); private final Value value; @@ -120,64 +120,64 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case NOVA2VOICEMAIL: - return visitor.visitNova2Voicemail(); - case NOVA3: - return visitor.visitNova3(); case FINANCE: return visitor.visitFinance(); + case ENHANCED_MEETING: + return visitor.visitEnhancedMeeting(); case NOVA_MEDICAL: return visitor.visitNovaMedical(); - case ENHANCED_GENERAL: - return visitor.visitEnhancedGeneral(); - case NOVA_GENERAL: - return visitor.visitNovaGeneral(); + case NOVA2VOICEMAIL: + return visitor.visitNova2Voicemail(); + case NOVA3: + return visitor.visitNova3(); case NOVA3MEDICAL: return visitor.visitNova3Medical(); case NOVA2: return visitor.visitNova2(); + case NOVA_GENERAL: + return visitor.visitNovaGeneral(); case VOICEMAIL: return visitor.visitVoicemail(); - case ENHANCED_FINANCE: - return visitor.visitEnhancedFinance(); + case ENHANCED_PHONECALL: + return visitor.visitEnhancedPhonecall(); case NOVA2FINANCE: return visitor.visitNova2Finance(); + case NOVA2CONVERSATIONALAI: + return visitor.visitNova2Conversationalai(); case MEETING: return visitor.visitMeeting(); case PHONECALL: return visitor.visitPhonecall(); - case NOVA2CONVERSATIONALAI: - return visitor.visitNova2Conversationalai(); case VIDEO: return visitor.visitVideo(); case CONVERSATIONALAI: return visitor.visitConversationalai(); - case NOVA2VIDEO: - return visitor.visitNova2Video(); + case NOVA2GENERAL: + return visitor.visitNova2General(); case NOVA2DRIVETHRU: return visitor.visitNova2Drivethru(); case BASE: return visitor.visitBase(); - case NOVA2GENERAL: - return visitor.visitNova2General(); + case NOVA2VIDEO: + return visitor.visitNova2Video(); case NOVA: return visitor.visitNova(); - case ENHANCED_PHONECALL: - return visitor.visitEnhancedPhonecall(); - case NOVA2MEDICAL: - return visitor.visitNova2Medical(); + case ENHANCED_FINANCE: + return visitor.visitEnhancedFinance(); + case NOVA2AUTOMOTIVE: + return visitor.visitNova2Automotive(); case NOVA3GENERAL: return visitor.visitNova3General(); + case NOVA2MEDICAL: + return visitor.visitNova2Medical(); + case NOVA2MEETING: + return visitor.visitNova2Meeting(); + case ENHANCED_GENERAL: + return visitor.visitEnhancedGeneral(); case ENHANCED: return visitor.visitEnhanced(); case NOVA_PHONECALL: return visitor.visitNovaPhonecall(); - case NOVA2MEETING: - return visitor.visitNova2Meeting(); - case NOVA2AUTOMOTIVE: - return visitor.visitNova2Automotive(); - case ENHANCED_MEETING: - return visitor.visitEnhancedMeeting(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -187,64 +187,64 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static MediaTranscribeRequestModel valueOf(String value) { switch (value) { - case "nova-2-voicemail": - return NOVA2VOICEMAIL; - case "nova-3": - return NOVA3; case "finance": return FINANCE; + case "enhanced-meeting": + return ENHANCED_MEETING; case "nova-medical": return NOVA_MEDICAL; - case "enhanced-general": - return ENHANCED_GENERAL; - case "nova-general": - return NOVA_GENERAL; + case "nova-2-voicemail": + return NOVA2VOICEMAIL; + case "nova-3": + return NOVA3; case "nova-3-medical": return NOVA3MEDICAL; case "nova-2": return NOVA2; + case "nova-general": + return NOVA_GENERAL; case "voicemail": return VOICEMAIL; - case "enhanced-finance": - return ENHANCED_FINANCE; + case "enhanced-phonecall": + return ENHANCED_PHONECALL; case "nova-2-finance": return NOVA2FINANCE; + case "nova-2-conversationalai": + return NOVA2CONVERSATIONALAI; case "meeting": return MEETING; case "phonecall": return PHONECALL; - case "nova-2-conversationalai": - return NOVA2CONVERSATIONALAI; case "video": return VIDEO; case "conversationalai": return CONVERSATIONALAI; - case "nova-2-video": - return NOVA2VIDEO; + case "nova-2-general": + return NOVA2GENERAL; case "nova-2-drivethru": return NOVA2DRIVETHRU; case "base": return BASE; - case "nova-2-general": - return NOVA2GENERAL; + case "nova-2-video": + return NOVA2VIDEO; case "nova": return NOVA; - case "enhanced-phonecall": - return ENHANCED_PHONECALL; - case "nova-2-medical": - return NOVA2MEDICAL; + case "enhanced-finance": + return ENHANCED_FINANCE; + case "nova-2-automotive": + return NOVA2AUTOMOTIVE; case "nova-3-general": return NOVA3GENERAL; + case "nova-2-medical": + return NOVA2MEDICAL; + case "nova-2-meeting": + return NOVA2MEETING; + case "enhanced-general": + return ENHANCED_GENERAL; case "enhanced": return ENHANCED; case "nova-phonecall": return NOVA_PHONECALL; - case "nova-2-meeting": - return NOVA2MEETING; - case "nova-2-automotive": - return NOVA2AUTOMOTIVE; - case "enhanced-meeting": - return ENHANCED_MEETING; default: return new MediaTranscribeRequestModel(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1CloseStreamType.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1CloseStreamType.java index af723e7..9a9c8d5 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1CloseStreamType.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1CloseStreamType.java @@ -10,10 +10,10 @@ public final class ListenV1CloseStreamType { public static final ListenV1CloseStreamType CLOSE_STREAM = new ListenV1CloseStreamType(Value.CLOSE_STREAM, "CloseStream"); - public static final ListenV1CloseStreamType FINALIZE = new ListenV1CloseStreamType(Value.FINALIZE, "Finalize"); - public static final ListenV1CloseStreamType KEEP_ALIVE = new ListenV1CloseStreamType(Value.KEEP_ALIVE, "KeepAlive"); + public static final ListenV1CloseStreamType FINALIZE = new ListenV1CloseStreamType(Value.FINALIZE, "Finalize"); + private final Value value; private final String string; @@ -49,10 +49,10 @@ public T visit(Visitor visitor) { switch (value) { case CLOSE_STREAM: return visitor.visitCloseStream(); - case FINALIZE: - return visitor.visitFinalize(); case KEEP_ALIVE: return visitor.visitKeepAlive(); + case FINALIZE: + return visitor.visitFinalize(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -64,10 +64,10 @@ public static ListenV1CloseStreamType valueOf(String value) { switch (value) { case "CloseStream": return CLOSE_STREAM; - case "Finalize": - return FINALIZE; case "KeepAlive": return KEEP_ALIVE; + case "Finalize": + return FINALIZE; default: return new ListenV1CloseStreamType(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1FinalizeType.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1FinalizeType.java index 1bf7cd1..0131b54 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1FinalizeType.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1FinalizeType.java @@ -9,10 +9,10 @@ public final class ListenV1FinalizeType { public static final ListenV1FinalizeType CLOSE_STREAM = new ListenV1FinalizeType(Value.CLOSE_STREAM, "CloseStream"); - public static final ListenV1FinalizeType FINALIZE = new ListenV1FinalizeType(Value.FINALIZE, "Finalize"); - public static final ListenV1FinalizeType KEEP_ALIVE = new ListenV1FinalizeType(Value.KEEP_ALIVE, "KeepAlive"); + public static final ListenV1FinalizeType FINALIZE = new ListenV1FinalizeType(Value.FINALIZE, "Finalize"); + private final Value value; private final String string; @@ -47,10 +47,10 @@ public T visit(Visitor visitor) { switch (value) { case CLOSE_STREAM: return visitor.visitCloseStream(); - case FINALIZE: - return visitor.visitFinalize(); case KEEP_ALIVE: return visitor.visitKeepAlive(); + case FINALIZE: + return visitor.visitFinalize(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -62,10 +62,10 @@ public static ListenV1FinalizeType valueOf(String value) { switch (value) { case "CloseStream": return CLOSE_STREAM; - case "Finalize": - return FINALIZE; case "KeepAlive": return KEEP_ALIVE; + case "Finalize": + return FINALIZE; default: return new ListenV1FinalizeType(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1KeepAliveType.java b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1KeepAliveType.java index 5e168b9..0a2ce82 100644 --- a/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1KeepAliveType.java +++ b/src/main/java/com/deepgram/resources/listen/v1/types/ListenV1KeepAliveType.java @@ -10,10 +10,10 @@ public final class ListenV1KeepAliveType { public static final ListenV1KeepAliveType CLOSE_STREAM = new ListenV1KeepAliveType(Value.CLOSE_STREAM, "CloseStream"); - public static final ListenV1KeepAliveType FINALIZE = new ListenV1KeepAliveType(Value.FINALIZE, "Finalize"); - public static final ListenV1KeepAliveType KEEP_ALIVE = new ListenV1KeepAliveType(Value.KEEP_ALIVE, "KeepAlive"); + public static final ListenV1KeepAliveType FINALIZE = new ListenV1KeepAliveType(Value.FINALIZE, "Finalize"); + private final Value value; private final String string; @@ -49,10 +49,10 @@ public T visit(Visitor visitor) { switch (value) { case CLOSE_STREAM: return visitor.visitCloseStream(); - case FINALIZE: - return visitor.visitFinalize(); case KEEP_ALIVE: return visitor.visitKeepAlive(); + case FINALIZE: + return visitor.visitFinalize(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -64,10 +64,10 @@ public static ListenV1KeepAliveType valueOf(String value) { switch (value) { case "CloseStream": return CLOSE_STREAM; - case "Finalize": - return FINALIZE; case "KeepAlive": return KEEP_ALIVE; + case "Finalize": + return FINALIZE; default: return new ListenV1KeepAliveType(Value.UNKNOWN, value); } 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 7883331..b11bbe6 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 @@ -29,7 +29,7 @@ public final class ListenV1Metadata { private final double duration; - private final double channels; + private final int channels; private final Map additionalProperties; @@ -39,7 +39,7 @@ private ListenV1Metadata( String sha256, String created, double duration, - double channels, + int channels, Map additionalProperties) { this.transactionKey = transactionKey; this.requestId = requestId; @@ -102,7 +102,7 @@ public double getDuration() { * @return The channels */ @JsonProperty("channels") - public double getChannels() { + public int getChannels() { return channels; } @@ -182,7 +182,7 @@ public interface ChannelsStage { /** *

The channels

*/ - _FinalStage channels(double channels); + _FinalStage channels(int channels); } public interface _FinalStage { @@ -212,7 +212,7 @@ public static final class Builder private double duration; - private double channels; + private int channels; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -297,7 +297,7 @@ public ChannelsStage duration(double duration) { */ @java.lang.Override @JsonSetter("channels") - public _FinalStage channels(double channels) { + public _FinalStage channels(int channels) { this.channels = channels; return this; } 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 c545d70..242edde 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 @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListenV1Results.Builder.class) public final class ListenV1Results { - private final List channelIndex; + private final List channelIndex; private final double duration; @@ -44,7 +44,7 @@ public final class ListenV1Results { private final Map additionalProperties; private ListenV1Results( - List channelIndex, + List channelIndex, double duration, double start, Optional isFinal, @@ -78,7 +78,7 @@ public String getType() { * @return The index of the channel */ @JsonProperty("channel_index") - public List getChannelIndex() { + public List getChannelIndex() { return channelIndex; } @@ -220,11 +220,11 @@ public interface _FinalStage { /** *

The index of the channel

*/ - _FinalStage channelIndex(List channelIndex); + _FinalStage channelIndex(List channelIndex); - _FinalStage addChannelIndex(Double channelIndex); + _FinalStage addChannelIndex(Integer channelIndex); - _FinalStage addAllChannelIndex(List channelIndex); + _FinalStage addAllChannelIndex(List channelIndex); /** *

Whether the transcription is final

@@ -273,7 +273,7 @@ public static final class Builder implements DurationStage, StartStage, ChannelS private Optional isFinal = Optional.empty(); - private List channelIndex = new ArrayList<>(); + private List channelIndex = new ArrayList<>(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -417,7 +417,7 @@ public _FinalStage isFinal(Optional isFinal) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage addAllChannelIndex(List channelIndex) { + public _FinalStage addAllChannelIndex(List channelIndex) { if (channelIndex != null) { this.channelIndex.addAll(channelIndex); } @@ -429,7 +429,7 @@ public _FinalStage addAllChannelIndex(List channelIndex) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage addChannelIndex(Double channelIndex) { + public _FinalStage addChannelIndex(Integer channelIndex) { this.channelIndex.add(channelIndex); return this; } @@ -439,7 +439,7 @@ public _FinalStage addChannelIndex(Double channelIndex) { */ @java.lang.Override @JsonSetter(value = "channel_index", nulls = Nulls.SKIP) - public _FinalStage channelIndex(List channelIndex) { + public _FinalStage channelIndex(List channelIndex) { this.channelIndex.clear(); if (channelIndex != null) { this.channelIndex.addAll(channelIndex); 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 e846397..159504a 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 @@ -33,7 +33,7 @@ public final class ListenV1ResultsChannelAlternativesItemWordsItem { private final Optional punctuatedWord; - private final Optional speaker; + private final Optional speaker; private final Map additionalProperties; @@ -44,7 +44,7 @@ private ListenV1ResultsChannelAlternativesItemWordsItem( double confidence, Optional language, Optional punctuatedWord, - Optional speaker, + Optional speaker, Map additionalProperties) { this.word = word; this.start = start; @@ -108,7 +108,7 @@ public Optional getPunctuatedWord() { * @return The speaker of the word */ @JsonProperty("speaker") - public Optional getSpeaker() { + public Optional getSpeaker() { return speaker; } @@ -203,9 +203,9 @@ public interface _FinalStage { /** *

The speaker of the word

*/ - _FinalStage speaker(Optional speaker); + _FinalStage speaker(Optional speaker); - _FinalStage speaker(Double speaker); + _FinalStage speaker(Integer speaker); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -218,7 +218,7 @@ public static final class Builder implements WordStage, StartStage, EndStage, Co private double confidence; - private Optional speaker = Optional.empty(); + private Optional speaker = Optional.empty(); private Optional punctuatedWord = Optional.empty(); @@ -294,7 +294,7 @@ public _FinalStage confidence(double confidence) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage speaker(Double speaker) { + public _FinalStage speaker(Integer speaker) { this.speaker = Optional.ofNullable(speaker); return this; } @@ -304,7 +304,7 @@ public _FinalStage speaker(Double speaker) { */ @java.lang.Override @JsonSetter(value = "speaker", nulls = Nulls.SKIP) - public _FinalStage speaker(Optional speaker) { + public _FinalStage speaker(Optional speaker) { this.speaker = speaker; return this; } 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 e03b1fc..ce614e3 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 @@ -21,13 +21,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListenV1SpeechStarted.Builder.class) public final class ListenV1SpeechStarted { - private final List channel; + private final List channel; private final double timestamp; private final Map additionalProperties; - private ListenV1SpeechStarted(List channel, double timestamp, Map additionalProperties) { + private ListenV1SpeechStarted(List channel, double timestamp, Map additionalProperties) { this.channel = channel; this.timestamp = timestamp; this.additionalProperties = additionalProperties; @@ -45,7 +45,7 @@ public String getType() { * @return The channel */ @JsonProperty("channel") - public List getChannel() { + public List getChannel() { return channel; } @@ -105,18 +105,18 @@ public interface _FinalStage { /** *

The channel

*/ - _FinalStage channel(List channel); + _FinalStage channel(List channel); - _FinalStage addChannel(Double channel); + _FinalStage addChannel(Integer channel); - _FinalStage addAllChannel(List channel); + _FinalStage addAllChannel(List channel); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements TimestampStage, _FinalStage { private double timestamp; - private List channel = new ArrayList<>(); + private List channel = new ArrayList<>(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -147,7 +147,7 @@ public _FinalStage timestamp(double timestamp) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage addAllChannel(List channel) { + public _FinalStage addAllChannel(List channel) { if (channel != null) { this.channel.addAll(channel); } @@ -159,7 +159,7 @@ public _FinalStage addAllChannel(List channel) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage addChannel(Double channel) { + public _FinalStage addChannel(Integer channel) { this.channel.add(channel); return this; } @@ -169,7 +169,7 @@ public _FinalStage addChannel(Double channel) { */ @java.lang.Override @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(List channel) { + public _FinalStage channel(List channel) { this.channel.clear(); if (channel != null) { this.channel.addAll(channel); 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 22d0364..df76d55 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 @@ -21,13 +21,13 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListenV1UtteranceEnd.Builder.class) public final class ListenV1UtteranceEnd { - private final List channel; + private final List channel; private final double lastWordEnd; private final Map additionalProperties; - private ListenV1UtteranceEnd(List channel, double lastWordEnd, Map additionalProperties) { + private ListenV1UtteranceEnd(List channel, double lastWordEnd, Map additionalProperties) { this.channel = channel; this.lastWordEnd = lastWordEnd; this.additionalProperties = additionalProperties; @@ -45,7 +45,7 @@ public String getType() { * @return The channel */ @JsonProperty("channel") - public List getChannel() { + public List getChannel() { return channel; } @@ -105,18 +105,18 @@ public interface _FinalStage { /** *

The channel

*/ - _FinalStage channel(List channel); + _FinalStage channel(List channel); - _FinalStage addChannel(Double channel); + _FinalStage addChannel(Integer channel); - _FinalStage addAllChannel(List channel); + _FinalStage addAllChannel(List channel); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements LastWordEndStage, _FinalStage { private double lastWordEnd; - private List channel = new ArrayList<>(); + private List channel = new ArrayList<>(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -147,7 +147,7 @@ public _FinalStage lastWordEnd(double lastWordEnd) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage addAllChannel(List channel) { + public _FinalStage addAllChannel(List channel) { if (channel != null) { this.channel.addAll(channel); } @@ -159,7 +159,7 @@ public _FinalStage addAllChannel(List channel) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage addChannel(Double channel) { + public _FinalStage addChannel(Integer channel) { this.channel.add(channel); return this; } @@ -169,7 +169,7 @@ public _FinalStage addChannel(Double channel) { */ @java.lang.Override @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(List channel) { + public _FinalStage channel(List channel) { this.channel.clear(); if (channel != null) { this.channel.addAll(channel); diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2CloseStreamType.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2CloseStreamType.java index 326bc2a..7882b21 100644 --- a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2CloseStreamType.java +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2CloseStreamType.java @@ -10,10 +10,10 @@ public final class ListenV2CloseStreamType { public static final ListenV2CloseStreamType CLOSE_STREAM = new ListenV2CloseStreamType(Value.CLOSE_STREAM, "CloseStream"); - public static final ListenV2CloseStreamType FINALIZE = new ListenV2CloseStreamType(Value.FINALIZE, "Finalize"); - public static final ListenV2CloseStreamType KEEP_ALIVE = new ListenV2CloseStreamType(Value.KEEP_ALIVE, "KeepAlive"); + public static final ListenV2CloseStreamType FINALIZE = new ListenV2CloseStreamType(Value.FINALIZE, "Finalize"); + private final Value value; private final String string; @@ -49,10 +49,10 @@ public T visit(Visitor visitor) { switch (value) { case CLOSE_STREAM: return visitor.visitCloseStream(); - case FINALIZE: - return visitor.visitFinalize(); case KEEP_ALIVE: return visitor.visitKeepAlive(); + case FINALIZE: + return visitor.visitFinalize(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -64,10 +64,10 @@ public static ListenV2CloseStreamType valueOf(String value) { switch (value) { case "CloseStream": return CLOSE_STREAM; - case "Finalize": - return FINALIZE; case "KeepAlive": return KEEP_ALIVE; + case "Finalize": + return FINALIZE; default: return new ListenV2CloseStreamType(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Configure.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Configure.java new file mode 100644 index 0000000..c52f887 --- /dev/null +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Configure.java @@ -0,0 +1,183 @@ +/** + * 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.deepgram.types.ListenV2Keyterm; +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.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListenV2Configure.Builder.class) +public final class ListenV2Configure { + private final Optional thresholds; + + private final Optional keyterms; + + private final Optional> languageHints; + + private final Map additionalProperties; + + private ListenV2Configure( + Optional thresholds, + Optional keyterms, + Optional> languageHints, + Map additionalProperties) { + this.thresholds = thresholds; + this.keyterms = keyterms; + this.languageHints = languageHints; + this.additionalProperties = additionalProperties; + } + + /** + * @return Message type identifier + */ + @JsonProperty("type") + public String getType() { + return "Configure"; + } + + /** + * @return Updates each parameter, if it is supplied. If a particular threshold parameter + * is not supplied, the configuration continues using the currently configured value. + */ + @JsonProperty("thresholds") + public Optional getThresholds() { + return thresholds; + } + + @JsonProperty("keyterms") + public Optional getKeyterms() { + return keyterms; + } + + /** + * @return Language hints to constrain and prioritize language detection. + * Only valid when the model is flux-general-multi. If this field is not supplied, + * the session will continue to use the currently configured value. + */ + @JsonProperty("language_hints") + public Optional> getLanguageHints() { + return languageHints; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListenV2Configure && equalTo((ListenV2Configure) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListenV2Configure other) { + return thresholds.equals(other.thresholds) + && keyterms.equals(other.keyterms) + && languageHints.equals(other.languageHints); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.thresholds, this.keyterms, this.languageHints); + } + + @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 { + private Optional thresholds = Optional.empty(); + + private Optional keyterms = Optional.empty(); + + private Optional> languageHints = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListenV2Configure other) { + thresholds(other.getThresholds()); + keyterms(other.getKeyterms()); + languageHints(other.getLanguageHints()); + return this; + } + + /** + *

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

+ */ + @JsonSetter(value = "thresholds", nulls = Nulls.SKIP) + public Builder thresholds(Optional thresholds) { + this.thresholds = thresholds; + return this; + } + + public Builder thresholds(ListenV2ConfigureThresholds thresholds) { + this.thresholds = Optional.ofNullable(thresholds); + return this; + } + + @JsonSetter(value = "keyterms", nulls = Nulls.SKIP) + public Builder keyterms(Optional keyterms) { + this.keyterms = keyterms; + return this; + } + + public Builder keyterms(ListenV2Keyterm keyterms) { + this.keyterms = Optional.ofNullable(keyterms); + return this; + } + + /** + *

Language hints to constrain and prioritize language detection. + * Only valid when the model is flux-general-multi. If this field is not supplied, + * the session will continue to use the currently configured value.

+ */ + @JsonSetter(value = "language_hints", nulls = Nulls.SKIP) + public Builder languageHints(Optional> languageHints) { + this.languageHints = languageHints; + return this; + } + + public Builder languageHints(List languageHints) { + this.languageHints = Optional.ofNullable(languageHints); + return this; + } + + public ListenV2Configure build() { + return new ListenV2Configure(thresholds, keyterms, languageHints, 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/ListenV2ConfigureFailure.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java new file mode 100644 index 0000000..5f482fb --- /dev/null +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureFailure.java @@ -0,0 +1,178 @@ +/** + * 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.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 = ListenV2ConfigureFailure.Builder.class) +public final class ListenV2ConfigureFailure { + private final String requestId; + + private final int sequenceId; + + private final Map additionalProperties; + + private ListenV2ConfigureFailure(String requestId, int sequenceId, Map additionalProperties) { + this.requestId = requestId; + this.sequenceId = sequenceId; + this.additionalProperties = additionalProperties; + } + + /** + * @return Message type identifier + */ + @JsonProperty("type") + public String getType() { + return "ConfigureFailure"; + } + + /** + * @return The unique identifier of the request + */ + @JsonProperty("request_id") + public String getRequestId() { + return requestId; + } + + /** + * @return Starts at 0 and increments for each message the server sends + * to the client. This includes messages of other types, like + * TurnInfo messages. + */ + @JsonProperty("sequence_id") + public int getSequenceId() { + return sequenceId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListenV2ConfigureFailure && equalTo((ListenV2ConfigureFailure) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListenV2ConfigureFailure other) { + return requestId.equals(other.requestId) && sequenceId == other.sequenceId; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.requestId, this.sequenceId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static RequestIdStage builder() { + return new Builder(); + } + + public interface RequestIdStage { + /** + *

The unique identifier of the request

+ */ + SequenceIdStage requestId(@NotNull String requestId); + + Builder from(ListenV2ConfigureFailure other); + } + + public interface SequenceIdStage { + /** + *

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

+ */ + _FinalStage sequenceId(int sequenceId); + } + + public interface _FinalStage { + ListenV2ConfigureFailure build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements RequestIdStage, SequenceIdStage, _FinalStage { + private String requestId; + + private int sequenceId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ListenV2ConfigureFailure other) { + requestId(other.getRequestId()); + sequenceId(other.getSequenceId()); + 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. + */ + @java.lang.Override + @JsonSetter("request_id") + public SequenceIdStage requestId(@NotNull String requestId) { + this.requestId = Objects.requireNonNull(requestId, "requestId must not be null"); + return this; + } + + /** + *

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.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("sequence_id") + public _FinalStage sequenceId(int sequenceId) { + this.sequenceId = sequenceId; + return this; + } + + @java.lang.Override + public ListenV2ConfigureFailure build() { + return new ListenV2ConfigureFailure(requestId, sequenceId, 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/v2/types/ListenV2ConfigureSuccess.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccess.java new file mode 100644 index 0000000..61b5c07 --- /dev/null +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccess.java @@ -0,0 +1,247 @@ +/** + * 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.deepgram.types.ListenV2Keyterm; +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 = ListenV2ConfigureSuccess.Builder.class) +public final class ListenV2ConfigureSuccess { + private final String requestId; + + private final ListenV2ConfigureSuccessThresholds thresholds; + + private final ListenV2Keyterm keyterms; + + private final int sequenceId; + + private final Map additionalProperties; + + private ListenV2ConfigureSuccess( + String requestId, + ListenV2ConfigureSuccessThresholds thresholds, + ListenV2Keyterm keyterms, + int sequenceId, + Map additionalProperties) { + this.requestId = requestId; + this.thresholds = thresholds; + this.keyterms = keyterms; + this.sequenceId = sequenceId; + this.additionalProperties = additionalProperties; + } + + /** + * @return Message type identifier + */ + @JsonProperty("type") + public String getType() { + return "ConfigureSuccess"; + } + + /** + * @return The unique identifier of the request + */ + @JsonProperty("request_id") + public String getRequestId() { + return requestId; + } + + /** + * @return Updates each parameter, if it is supplied. If a particular threshold parameter + * is not supplied, the configuration continues using the currently configured value. + */ + @JsonProperty("thresholds") + public ListenV2ConfigureSuccessThresholds getThresholds() { + return thresholds; + } + + @JsonProperty("keyterms") + public ListenV2Keyterm getKeyterms() { + return keyterms; + } + + /** + * @return Starts at 0 and increments for each message the server sends + * to the client. This includes messages of other types, like + * TurnInfo messages. + */ + @JsonProperty("sequence_id") + public int getSequenceId() { + return sequenceId; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListenV2ConfigureSuccess && equalTo((ListenV2ConfigureSuccess) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListenV2ConfigureSuccess other) { + return requestId.equals(other.requestId) + && thresholds.equals(other.thresholds) + && keyterms.equals(other.keyterms) + && sequenceId == other.sequenceId; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.requestId, this.thresholds, this.keyterms, this.sequenceId); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static RequestIdStage builder() { + return new Builder(); + } + + public interface RequestIdStage { + /** + *

The unique identifier of the request

+ */ + ThresholdsStage requestId(@NotNull String requestId); + + Builder from(ListenV2ConfigureSuccess other); + } + + public interface ThresholdsStage { + /** + *

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

+ */ + KeytermsStage thresholds(@NotNull ListenV2ConfigureSuccessThresholds thresholds); + } + + public interface KeytermsStage { + SequenceIdStage keyterms(@NotNull ListenV2Keyterm keyterms); + } + + public interface SequenceIdStage { + /** + *

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

+ */ + _FinalStage sequenceId(int sequenceId); + } + + public interface _FinalStage { + ListenV2ConfigureSuccess build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements RequestIdStage, ThresholdsStage, KeytermsStage, SequenceIdStage, _FinalStage { + private String requestId; + + private ListenV2ConfigureSuccessThresholds thresholds; + + private ListenV2Keyterm keyterms; + + private int sequenceId; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ListenV2ConfigureSuccess other) { + requestId(other.getRequestId()); + thresholds(other.getThresholds()); + keyterms(other.getKeyterms()); + sequenceId(other.getSequenceId()); + 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. + */ + @java.lang.Override + @JsonSetter("request_id") + public ThresholdsStage requestId(@NotNull String requestId) { + this.requestId = Objects.requireNonNull(requestId, "requestId must not be null"); + return this; + } + + /** + *

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. + */ + @java.lang.Override + @JsonSetter("thresholds") + public KeytermsStage thresholds(@NotNull ListenV2ConfigureSuccessThresholds thresholds) { + this.thresholds = Objects.requireNonNull(thresholds, "thresholds must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("keyterms") + public SequenceIdStage keyterms(@NotNull ListenV2Keyterm keyterms) { + this.keyterms = Objects.requireNonNull(keyterms, "keyterms must not be null"); + return this; + } + + /** + *

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.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("sequence_id") + public _FinalStage sequenceId(int sequenceId) { + this.sequenceId = sequenceId; + return this; + } + + @java.lang.Override + public ListenV2ConfigureSuccess build() { + return new ListenV2ConfigureSuccess(requestId, thresholds, keyterms, sequenceId, 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/v2/types/ListenV2ConfigureSuccessThresholds.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccessThresholds.java new file mode 100644 index 0000000..6959a80 --- /dev/null +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureSuccessThresholds.java @@ -0,0 +1,160 @@ +/** + * 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.deepgram.types.ListenV2EagerEotThreshold; +import com.deepgram.types.ListenV2EotThreshold; +import com.deepgram.types.ListenV2EotTimeoutMs; +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.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListenV2ConfigureSuccessThresholds.Builder.class) +public final class ListenV2ConfigureSuccessThresholds { + private final Optional eagerEotThreshold; + + private final Optional eotThreshold; + + private final Optional eotTimeoutMs; + + private final Map additionalProperties; + + private ListenV2ConfigureSuccessThresholds( + Optional eagerEotThreshold, + Optional eotThreshold, + Optional eotTimeoutMs, + Map additionalProperties) { + this.eagerEotThreshold = eagerEotThreshold; + this.eotThreshold = eotThreshold; + this.eotTimeoutMs = eotTimeoutMs; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("eager_eot_threshold") + public Optional getEagerEotThreshold() { + return eagerEotThreshold; + } + + @JsonProperty("eot_threshold") + public Optional getEotThreshold() { + return eotThreshold; + } + + @JsonProperty("eot_timeout_ms") + public Optional getEotTimeoutMs() { + return eotTimeoutMs; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListenV2ConfigureSuccessThresholds + && equalTo((ListenV2ConfigureSuccessThresholds) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListenV2ConfigureSuccessThresholds other) { + return eagerEotThreshold.equals(other.eagerEotThreshold) + && eotThreshold.equals(other.eotThreshold) + && eotTimeoutMs.equals(other.eotTimeoutMs); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.eagerEotThreshold, this.eotThreshold, this.eotTimeoutMs); + } + + @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 { + private Optional eagerEotThreshold = Optional.empty(); + + private Optional eotThreshold = Optional.empty(); + + private Optional eotTimeoutMs = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListenV2ConfigureSuccessThresholds other) { + eagerEotThreshold(other.getEagerEotThreshold()); + eotThreshold(other.getEotThreshold()); + eotTimeoutMs(other.getEotTimeoutMs()); + return this; + } + + @JsonSetter(value = "eager_eot_threshold", nulls = Nulls.SKIP) + public Builder eagerEotThreshold(Optional eagerEotThreshold) { + this.eagerEotThreshold = eagerEotThreshold; + return this; + } + + public Builder eagerEotThreshold(ListenV2EagerEotThreshold eagerEotThreshold) { + this.eagerEotThreshold = Optional.ofNullable(eagerEotThreshold); + return this; + } + + @JsonSetter(value = "eot_threshold", nulls = Nulls.SKIP) + public Builder eotThreshold(Optional eotThreshold) { + this.eotThreshold = eotThreshold; + return this; + } + + public Builder eotThreshold(ListenV2EotThreshold eotThreshold) { + this.eotThreshold = Optional.ofNullable(eotThreshold); + return this; + } + + @JsonSetter(value = "eot_timeout_ms", nulls = Nulls.SKIP) + public Builder eotTimeoutMs(Optional eotTimeoutMs) { + this.eotTimeoutMs = eotTimeoutMs; + return this; + } + + public Builder eotTimeoutMs(ListenV2EotTimeoutMs eotTimeoutMs) { + this.eotTimeoutMs = Optional.ofNullable(eotTimeoutMs); + return this; + } + + public ListenV2ConfigureSuccessThresholds build() { + return new ListenV2ConfigureSuccessThresholds( + eagerEotThreshold, eotThreshold, eotTimeoutMs, 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/ListenV2ConfigureThresholds.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureThresholds.java new file mode 100644 index 0000000..31c78ad --- /dev/null +++ b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2ConfigureThresholds.java @@ -0,0 +1,158 @@ +/** + * 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.deepgram.types.ListenV2EagerEotThreshold; +import com.deepgram.types.ListenV2EotThreshold; +import com.deepgram.types.ListenV2EotTimeoutMs; +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.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListenV2ConfigureThresholds.Builder.class) +public final class ListenV2ConfigureThresholds { + private final Optional eagerEotThreshold; + + private final Optional eotThreshold; + + private final Optional eotTimeoutMs; + + private final Map additionalProperties; + + private ListenV2ConfigureThresholds( + Optional eagerEotThreshold, + Optional eotThreshold, + Optional eotTimeoutMs, + Map additionalProperties) { + this.eagerEotThreshold = eagerEotThreshold; + this.eotThreshold = eotThreshold; + this.eotTimeoutMs = eotTimeoutMs; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("eager_eot_threshold") + public Optional getEagerEotThreshold() { + return eagerEotThreshold; + } + + @JsonProperty("eot_threshold") + public Optional getEotThreshold() { + return eotThreshold; + } + + @JsonProperty("eot_timeout_ms") + public Optional getEotTimeoutMs() { + return eotTimeoutMs; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListenV2ConfigureThresholds && equalTo((ListenV2ConfigureThresholds) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListenV2ConfigureThresholds other) { + return eagerEotThreshold.equals(other.eagerEotThreshold) + && eotThreshold.equals(other.eotThreshold) + && eotTimeoutMs.equals(other.eotTimeoutMs); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.eagerEotThreshold, this.eotThreshold, this.eotTimeoutMs); + } + + @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 { + private Optional eagerEotThreshold = Optional.empty(); + + private Optional eotThreshold = Optional.empty(); + + private Optional eotTimeoutMs = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListenV2ConfigureThresholds other) { + eagerEotThreshold(other.getEagerEotThreshold()); + eotThreshold(other.getEotThreshold()); + eotTimeoutMs(other.getEotTimeoutMs()); + return this; + } + + @JsonSetter(value = "eager_eot_threshold", nulls = Nulls.SKIP) + public Builder eagerEotThreshold(Optional eagerEotThreshold) { + this.eagerEotThreshold = eagerEotThreshold; + return this; + } + + public Builder eagerEotThreshold(ListenV2EagerEotThreshold eagerEotThreshold) { + this.eagerEotThreshold = Optional.ofNullable(eagerEotThreshold); + return this; + } + + @JsonSetter(value = "eot_threshold", nulls = Nulls.SKIP) + public Builder eotThreshold(Optional eotThreshold) { + this.eotThreshold = eotThreshold; + return this; + } + + public Builder eotThreshold(ListenV2EotThreshold eotThreshold) { + this.eotThreshold = Optional.ofNullable(eotThreshold); + return this; + } + + @JsonSetter(value = "eot_timeout_ms", nulls = Nulls.SKIP) + public Builder eotTimeoutMs(Optional eotTimeoutMs) { + this.eotTimeoutMs = eotTimeoutMs; + return this; + } + + public Builder eotTimeoutMs(ListenV2EotTimeoutMs eotTimeoutMs) { + this.eotTimeoutMs = Optional.ofNullable(eotTimeoutMs); + return this; + } + + public ListenV2ConfigureThresholds build() { + return new ListenV2ConfigureThresholds(eagerEotThreshold, eotThreshold, eotTimeoutMs, 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/ListenV2Connected.java b/src/main/java/com/deepgram/resources/listen/v2/types/ListenV2Connected.java index fab5bf9..56e09a8 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 @@ -21,11 +21,11 @@ public final class ListenV2Connected { private final String requestId; - private final double sequenceId; + private final int sequenceId; private final Map additionalProperties; - private ListenV2Connected(String requestId, double sequenceId, Map additionalProperties) { + private ListenV2Connected(String requestId, int sequenceId, Map additionalProperties) { this.requestId = requestId; this.sequenceId = sequenceId; this.additionalProperties = additionalProperties; @@ -53,7 +53,7 @@ public String getRequestId() { * TurnInfo messages. */ @JsonProperty("sequence_id") - public double getSequenceId() { + public int getSequenceId() { return sequenceId; } @@ -101,7 +101,7 @@ public interface SequenceIdStage { * to the client. This includes messages of other types, like * TurnInfo messages.

*/ - _FinalStage sequenceId(double sequenceId); + _FinalStage sequenceId(int sequenceId); } public interface _FinalStage { @@ -116,7 +116,7 @@ public interface _FinalStage { public static final class Builder implements RequestIdStage, SequenceIdStage, _FinalStage { private String requestId; - private double sequenceId; + private int sequenceId; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -153,7 +153,7 @@ public SequenceIdStage requestId(@NotNull String requestId) { */ @java.lang.Override @JsonSetter("sequence_id") - public _FinalStage sequenceId(double sequenceId) { + public _FinalStage sequenceId(int sequenceId) { this.sequenceId = sequenceId; return this; } 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 eb41ddb..1bd208b 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 @@ -19,7 +19,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ListenV2FatalError.Builder.class) public final class ListenV2FatalError { - private final double sequenceId; + private final int sequenceId; private final String code; @@ -28,7 +28,7 @@ public final class ListenV2FatalError { private final Map additionalProperties; private ListenV2FatalError( - double sequenceId, String code, String description, Map additionalProperties) { + int sequenceId, String code, String description, Map additionalProperties) { this.sequenceId = sequenceId; this.code = code; this.description = description; @@ -49,7 +49,7 @@ public String getType() { * Connected messages. */ @JsonProperty("sequence_id") - public double getSequenceId() { + public int getSequenceId() { return sequenceId; } @@ -104,7 +104,7 @@ public interface SequenceIdStage { * to the client. This includes messages of other types, like * Connected messages.

*/ - CodeStage sequenceId(double sequenceId); + CodeStage sequenceId(int sequenceId); Builder from(ListenV2FatalError other); } @@ -133,7 +133,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements SequenceIdStage, CodeStage, DescriptionStage, _FinalStage { - private double sequenceId; + private int sequenceId; private String code; @@ -163,7 +163,7 @@ public Builder from(ListenV2FatalError other) { */ @java.lang.Override @JsonSetter("sequence_id") - public CodeStage sequenceId(double sequenceId) { + public CodeStage sequenceId(int sequenceId) { this.sequenceId = sequenceId; 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 819533d..5cb7195 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 @@ -17,6 +17,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.Optional; import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @@ -24,11 +25,11 @@ public final class ListenV2TurnInfo { private final String requestId; - private final double sequenceId; + private final int sequenceId; private final ListenV2TurnInfoEvent event; - private final double turnIndex; + private final int turnIndex; private final float audioWindowStart; @@ -40,18 +41,24 @@ public final class ListenV2TurnInfo { private final float endOfTurnConfidence; + private final Optional> languages; + + private final Optional> languagesHinted; + private final Map additionalProperties; private ListenV2TurnInfo( String requestId, - double sequenceId, + int sequenceId, ListenV2TurnInfoEvent event, - double turnIndex, + int turnIndex, float audioWindowStart, float audioWindowEnd, String transcript, List words, float endOfTurnConfidence, + Optional> languages, + Optional> languagesHinted, Map additionalProperties) { this.requestId = requestId; this.sequenceId = sequenceId; @@ -62,6 +69,8 @@ private ListenV2TurnInfo( this.transcript = transcript; this.words = words; this.endOfTurnConfidence = endOfTurnConfidence; + this.languages = languages; + this.languagesHinted = languagesHinted; this.additionalProperties = additionalProperties; } @@ -82,7 +91,7 @@ public String getRequestId() { * @return Starts at 0 and increments for each message the server sends to the client. This includes messages of other types, like Connected messages. */ @JsonProperty("sequence_id") - public double getSequenceId() { + public int getSequenceId() { return sequenceId; } @@ -105,7 +114,7 @@ public ListenV2TurnInfoEvent getEvent() { * @return The index of the current turn */ @JsonProperty("turn_index") - public double getTurnIndex() { + public int getTurnIndex() { return turnIndex; } @@ -149,6 +158,25 @@ public float getEndOfTurnConfidence() { return endOfTurnConfidence; } + /** + * @return Detected languages sorted by descending frequency in the + * transcript. Only present when the flux-general-multi model + * detects languages in the audio. + */ + @JsonProperty("languages") + public Optional> getLanguages() { + return languages; + } + + /** + * @return The language hints that were supplied for this turn. Only + * present when language hints are configured. + */ + @JsonProperty("languages_hinted") + public Optional> getLanguagesHinted() { + return languagesHinted; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -169,7 +197,9 @@ private boolean equalTo(ListenV2TurnInfo other) { && audioWindowEnd == other.audioWindowEnd && transcript.equals(other.transcript) && words.equals(other.words) - && endOfTurnConfidence == other.endOfTurnConfidence; + && endOfTurnConfidence == other.endOfTurnConfidence + && languages.equals(other.languages) + && languagesHinted.equals(other.languagesHinted); } @java.lang.Override @@ -183,7 +213,9 @@ public int hashCode() { this.audioWindowEnd, this.transcript, this.words, - this.endOfTurnConfidence); + this.endOfTurnConfidence, + this.languages, + this.languagesHinted); } @java.lang.Override @@ -208,7 +240,7 @@ public interface SequenceIdStage { /** *

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

*/ - EventStage sequenceId(double sequenceId); + EventStage sequenceId(int sequenceId); } public interface EventStage { @@ -229,7 +261,7 @@ public interface TurnIndexStage { /** *

The index of the current turn

*/ - AudioWindowStartStage turnIndex(double turnIndex); + AudioWindowStartStage turnIndex(int turnIndex); } public interface AudioWindowStartStage { @@ -275,6 +307,23 @@ public interface _FinalStage { _FinalStage addWords(ListenV2TurnInfoWordsItem words); _FinalStage addAllWords(List words); + + /** + *

Detected languages sorted by descending frequency in the + * transcript. Only present when the flux-general-multi model + * detects languages in the audio.

+ */ + _FinalStage languages(Optional> languages); + + _FinalStage languages(List languages); + + /** + *

The language hints that were supplied for this turn. Only + * present when language hints are configured.

+ */ + _FinalStage languagesHinted(Optional> languagesHinted); + + _FinalStage languagesHinted(List languagesHinted); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -290,11 +339,11 @@ public static final class Builder _FinalStage { private String requestId; - private double sequenceId; + private int sequenceId; private ListenV2TurnInfoEvent event; - private double turnIndex; + private int turnIndex; private float audioWindowStart; @@ -304,6 +353,10 @@ public static final class Builder private float endOfTurnConfidence; + private Optional> languagesHinted = Optional.empty(); + + private Optional> languages = Optional.empty(); + private List words = new ArrayList<>(); @JsonAnySetter @@ -322,6 +375,8 @@ public Builder from(ListenV2TurnInfo other) { transcript(other.getTranscript()); words(other.getWords()); endOfTurnConfidence(other.getEndOfTurnConfidence()); + languages(other.getLanguages()); + languagesHinted(other.getLanguagesHinted()); return this; } @@ -344,7 +399,7 @@ public SequenceIdStage requestId(@NotNull String requestId) { */ @java.lang.Override @JsonSetter("sequence_id") - public EventStage sequenceId(double sequenceId) { + public EventStage sequenceId(int sequenceId) { this.sequenceId = sequenceId; return this; } @@ -382,7 +437,7 @@ public TurnIndexStage event(@NotNull ListenV2TurnInfoEvent event) { */ @java.lang.Override @JsonSetter("turn_index") - public AudioWindowStartStage turnIndex(double turnIndex) { + public AudioWindowStartStage turnIndex(int turnIndex) { this.turnIndex = turnIndex; return this; } @@ -435,6 +490,52 @@ public _FinalStage endOfTurnConfidence(float endOfTurnConfidence) { return this; } + /** + *

The language hints that were supplied for this turn. Only + * present when language hints are configured.

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

The language hints that were supplied for this turn. Only + * present when language hints are configured.

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

Detected languages sorted by descending frequency in the + * transcript. Only present when the flux-general-multi model + * detects languages in the audio.

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

Detected languages sorted by descending frequency in the + * transcript. Only present when the flux-general-multi model + * detects languages in the audio.

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

The words in the transcript

* @return Reference to {@code this} so that method calls can be chained together. @@ -482,6 +583,8 @@ public ListenV2TurnInfo build() { transcript, words, endOfTurnConfidence, + languages, + languagesHinted, additionalProperties); } 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 5e7060f..516a151 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 @@ -10,6 +10,7 @@ import com.deepgram.types.ListenV2EotTimeoutMs; import com.deepgram.types.ListenV2Keyterm; import com.deepgram.types.ListenV2MipOptOut; +import com.deepgram.types.ListenV2Model; import com.deepgram.types.ListenV2SampleRate; import com.deepgram.types.ListenV2Tag; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -29,7 +30,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = V2ConnectOptions.Builder.class) public final class V2ConnectOptions { - private final String model; + private final ListenV2Model model; private final Optional encoding; @@ -50,7 +51,7 @@ public final class V2ConnectOptions { private final Map additionalProperties; private V2ConnectOptions( - String model, + ListenV2Model model, Optional encoding, Optional sampleRate, Optional eagerEotThreshold, @@ -73,7 +74,7 @@ private V2ConnectOptions( } @JsonProperty("model") - public String getModel() { + public ListenV2Model getModel() { return model; } @@ -164,7 +165,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(@NotNull String model); + _FinalStage model(@NotNull ListenV2Model model); Builder from(V2ConnectOptions other); } @@ -211,7 +212,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ModelStage, _FinalStage { - private String model; + private ListenV2Model model; private Optional tag = Optional.empty(); @@ -250,7 +251,7 @@ public Builder from(V2ConnectOptions other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(@NotNull String model) { + public _FinalStage model(@NotNull ListenV2Model model) { this.model = Objects.requireNonNull(model, "model must not be null"); return this; } 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 7de5666..7e0c1a7 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 @@ -9,6 +9,9 @@ import com.deepgram.core.ReconnectingWebSocketListener; import com.deepgram.core.WebSocketReadyState; import com.deepgram.resources.listen.v2.types.ListenV2CloseStream; +import com.deepgram.resources.listen.v2.types.ListenV2Configure; +import com.deepgram.resources.listen.v2.types.ListenV2ConfigureFailure; +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.ListenV2TurnInfo; @@ -57,6 +60,10 @@ public class V2WebSocketClient implements AutoCloseable { private volatile Consumer turnInfoHandler; + private volatile Consumer configureSuccessHandler; + + private volatile Consumer configureFailureHandler; + private volatile Consumer errorHandler; /** @@ -229,6 +236,15 @@ public CompletableFuture sendCloseStream(ListenV2CloseStream message) { return sendMessage(message); } + /** + * Sends a ListenV2Configure message to the server asynchronously. + * @param message the message to send + * @return a CompletableFuture that completes when the message is sent + */ + public CompletableFuture sendConfigure(ListenV2Configure message) { + return sendMessage(message); + } + /** * Registers a handler for ListenV2Connected messages from the server. * @param handler the handler to invoke when a message is received @@ -245,6 +261,22 @@ public void onTurnInfo(Consumer handler) { this.turnInfoHandler = handler; } + /** + * Registers a handler for ListenV2ConfigureSuccess messages from the server. + * @param handler the handler to invoke when a message is received + */ + public void onConfigureSuccess(Consumer handler) { + this.configureSuccessHandler = handler; + } + + /** + * Registers a handler for ListenV2ConfigureFailure messages from the server. + * @param handler the handler to invoke when a message is received + */ + public void onConfigureFailure(Consumer handler) { + this.configureFailureHandler = handler; + } + /** * Registers a handler for ListenV2FatalError messages from the server. * @param handler the handler to invoke when a message is received @@ -364,6 +396,22 @@ private void handleIncomingMessage(String json) { } } break; + case "ConfigureSuccess": + if (configureSuccessHandler != null) { + ListenV2ConfigureSuccess event = objectMapper.treeToValue(node, ListenV2ConfigureSuccess.class); + if (event != null) { + configureSuccessHandler.accept(event); + } + } + break; + case "ConfigureFailure": + if (configureFailureHandler != null) { + ListenV2ConfigureFailure event = objectMapper.treeToValue(node, ListenV2ConfigureFailure.class); + if (event != null) { + configureFailureHandler.accept(event); + } + } + break; case "Error": if (errorHandler != null) { ListenV2FatalError event = objectMapper.treeToValue(node, ListenV2FatalError.class); diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/requests/types/RequestsListRequestEndpoint.java b/src/main/java/com/deepgram/resources/manage/v1/projects/requests/types/RequestsListRequestEndpoint.java index c431f1d..a0f2f30 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/requests/types/RequestsListRequestEndpoint.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/requests/types/RequestsListRequestEndpoint.java @@ -11,10 +11,10 @@ public final class RequestsListRequestEndpoint { public static final RequestsListRequestEndpoint READ = new RequestsListRequestEndpoint(Value.READ, "read"); - public static final RequestsListRequestEndpoint LISTEN = new RequestsListRequestEndpoint(Value.LISTEN, "listen"); - public static final RequestsListRequestEndpoint SPEAK = new RequestsListRequestEndpoint(Value.SPEAK, "speak"); + public static final RequestsListRequestEndpoint LISTEN = new RequestsListRequestEndpoint(Value.LISTEN, "listen"); + private final Value value; private final String string; @@ -52,10 +52,10 @@ public T visit(Visitor visitor) { return visitor.visitAgent(); case READ: return visitor.visitRead(); - case LISTEN: - return visitor.visitListen(); case SPEAK: return visitor.visitSpeak(); + case LISTEN: + return visitor.visitListen(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -69,10 +69,10 @@ public static RequestsListRequestEndpoint valueOf(String value) { return AGENT; case "read": return READ; - case "listen": - return LISTEN; case "speak": return SPEAK; + case "listen": + return LISTEN; default: return new RequestsListRequestEndpoint(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/requests/types/RequestsListRequestStatus.java b/src/main/java/com/deepgram/resources/manage/v1/projects/requests/types/RequestsListRequestStatus.java index c58d250..8cad7b3 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/requests/types/RequestsListRequestStatus.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/requests/types/RequestsListRequestStatus.java @@ -7,11 +7,11 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class RequestsListRequestStatus { + public static final RequestsListRequestStatus FAILED = new RequestsListRequestStatus(Value.FAILED, "failed"); + public static final RequestsListRequestStatus SUCCEEDED = new RequestsListRequestStatus(Value.SUCCEEDED, "succeeded"); - public static final RequestsListRequestStatus FAILED = new RequestsListRequestStatus(Value.FAILED, "failed"); - private final Value value; private final String string; @@ -45,10 +45,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case SUCCEEDED: - return visitor.visitSucceeded(); case FAILED: return visitor.visitFailed(); + case SUCCEEDED: + return visitor.visitSucceeded(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -58,10 +58,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static RequestsListRequestStatus valueOf(String value) { switch (value) { - case "succeeded": - return SUCCEEDED; case "failed": return FAILED; + case "succeeded": + return SUCCEEDED; default: return new RequestsListRequestStatus(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/types/BreakdownGetRequestEndpoint.java b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/types/BreakdownGetRequestEndpoint.java index 4381cfb..ff99c40 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/types/BreakdownGetRequestEndpoint.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/types/BreakdownGetRequestEndpoint.java @@ -11,10 +11,10 @@ public final class BreakdownGetRequestEndpoint { public static final BreakdownGetRequestEndpoint READ = new BreakdownGetRequestEndpoint(Value.READ, "read"); - public static final BreakdownGetRequestEndpoint LISTEN = new BreakdownGetRequestEndpoint(Value.LISTEN, "listen"); - public static final BreakdownGetRequestEndpoint SPEAK = new BreakdownGetRequestEndpoint(Value.SPEAK, "speak"); + public static final BreakdownGetRequestEndpoint LISTEN = new BreakdownGetRequestEndpoint(Value.LISTEN, "listen"); + private final Value value; private final String string; @@ -52,10 +52,10 @@ public T visit(Visitor visitor) { return visitor.visitAgent(); case READ: return visitor.visitRead(); - case LISTEN: - return visitor.visitListen(); case SPEAK: return visitor.visitSpeak(); + case LISTEN: + return visitor.visitListen(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -69,10 +69,10 @@ public static BreakdownGetRequestEndpoint valueOf(String value) { return AGENT; case "read": return READ; - case "listen": - return LISTEN; case "speak": return SPEAK; + case "listen": + return LISTEN; default: return new BreakdownGetRequestEndpoint(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/types/BreakdownGetRequestGrouping.java b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/types/BreakdownGetRequestGrouping.java index e144a26..55e5cc8 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/types/BreakdownGetRequestGrouping.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/breakdown/types/BreakdownGetRequestGrouping.java @@ -9,16 +9,16 @@ public final class BreakdownGetRequestGrouping { public static final BreakdownGetRequestGrouping METHOD = new BreakdownGetRequestGrouping(Value.METHOD, "method"); - public static final BreakdownGetRequestGrouping MODELS = new BreakdownGetRequestGrouping(Value.MODELS, "models"); - - public static final BreakdownGetRequestGrouping ENDPOINT = - new BreakdownGetRequestGrouping(Value.ENDPOINT, "endpoint"); - public static final BreakdownGetRequestGrouping TAGS = new BreakdownGetRequestGrouping(Value.TAGS, "tags"); public static final BreakdownGetRequestGrouping ACCESSOR = new BreakdownGetRequestGrouping(Value.ACCESSOR, "accessor"); + public static final BreakdownGetRequestGrouping MODELS = new BreakdownGetRequestGrouping(Value.MODELS, "models"); + + public static final BreakdownGetRequestGrouping ENDPOINT = + new BreakdownGetRequestGrouping(Value.ENDPOINT, "endpoint"); + public static final BreakdownGetRequestGrouping FEATURE_SET = new BreakdownGetRequestGrouping(Value.FEATURE_SET, "feature_set"); @@ -60,14 +60,14 @@ public T visit(Visitor visitor) { switch (value) { case METHOD: return visitor.visitMethod(); - case MODELS: - return visitor.visitModels(); - case ENDPOINT: - return visitor.visitEndpoint(); case TAGS: return visitor.visitTags(); case ACCESSOR: return visitor.visitAccessor(); + case MODELS: + return visitor.visitModels(); + case ENDPOINT: + return visitor.visitEndpoint(); case FEATURE_SET: return visitor.visitFeatureSet(); case DEPLOYMENT: @@ -83,14 +83,14 @@ public static BreakdownGetRequestGrouping valueOf(String value) { switch (value) { case "method": return METHOD; - case "models": - return MODELS; - case "endpoint": - return ENDPOINT; case "tags": return TAGS; case "accessor": return ACCESSOR; + case "models": + return MODELS; + case "endpoint": + return ENDPOINT; case "feature_set": return FEATURE_SET; case "deployment": diff --git a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/types/UsageGetRequestEndpoint.java b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/types/UsageGetRequestEndpoint.java index 41f335b..3e59c2e 100644 --- a/src/main/java/com/deepgram/resources/manage/v1/projects/usage/types/UsageGetRequestEndpoint.java +++ b/src/main/java/com/deepgram/resources/manage/v1/projects/usage/types/UsageGetRequestEndpoint.java @@ -11,10 +11,10 @@ public final class UsageGetRequestEndpoint { public static final UsageGetRequestEndpoint READ = new UsageGetRequestEndpoint(Value.READ, "read"); - public static final UsageGetRequestEndpoint LISTEN = new UsageGetRequestEndpoint(Value.LISTEN, "listen"); - public static final UsageGetRequestEndpoint SPEAK = new UsageGetRequestEndpoint(Value.SPEAK, "speak"); + public static final UsageGetRequestEndpoint LISTEN = new UsageGetRequestEndpoint(Value.LISTEN, "listen"); + private final Value value; private final String string; @@ -52,10 +52,10 @@ public T visit(Visitor visitor) { return visitor.visitAgent(); case READ: return visitor.visitRead(); - case LISTEN: - return visitor.visitListen(); case SPEAK: return visitor.visitSpeak(); + case LISTEN: + return visitor.visitListen(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -69,10 +69,10 @@ public static UsageGetRequestEndpoint valueOf(String value) { return AGENT; case "read": return READ; - case "listen": - return LISTEN; case "speak": return SPEAK; + case "listen": + return LISTEN; default: return new UsageGetRequestEndpoint(Value.UNKNOWN, value); } 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 06d0609..9603776 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 @@ -74,34 +74,26 @@ public CompletableFuture> analyze( QueryStringMapper.addQueryParameter( httpUrl, "callback_method", request.getCallbackMethod().get(), false); } - if (request.getSentiment().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sentiment", request.getSentiment().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "sentiment", request.getSentiment().orElse(false), false); if (request.getSummarize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "summarize", request.getSummarize().get(), false); } - if (request.getTopics().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "topics", request.getTopics().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "topics", request.getTopics().orElse(false), false); if (request.getCustomTopicMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_topic_mode", request.getCustomTopicMode().get(), false); } - if (request.getIntents().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "intents", request.getIntents().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "intents", request.getIntents().orElse(false), false); if (request.getCustomIntentMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_intent_mode", request.getCustomIntentMode().get(), false); } - if (request.getLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "language", request.getLanguage().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "language", request.getLanguage().orElse("en"), false); if (request.getTag().isPresent()) { QueryStringMapper.addQueryParameter(httpUrl, "tag", request.getTag().get(), true); } 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 c244be9..ffea27f 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 @@ -68,34 +68,26 @@ public DeepgramApiHttpResponse analyze(TextAnalyzeRequest reques QueryStringMapper.addQueryParameter( httpUrl, "callback_method", request.getCallbackMethod().get(), false); } - if (request.getSentiment().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sentiment", request.getSentiment().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "sentiment", request.getSentiment().orElse(false), false); if (request.getSummarize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "summarize", request.getSummarize().get(), false); } - if (request.getTopics().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "topics", request.getTopics().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "topics", request.getTopics().orElse(false), false); if (request.getCustomTopicMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_topic_mode", request.getCustomTopicMode().get(), false); } - if (request.getIntents().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "intents", request.getIntents().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "intents", request.getIntents().orElse(false), false); if (request.getCustomIntentMode().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "custom_intent_mode", request.getCustomIntentMode().get(), false); } - if (request.getLanguage().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "language", request.getLanguage().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "language", request.getLanguage().orElse("en"), false); if (request.getTag().isPresent()) { QueryStringMapper.addQueryParameter(httpUrl, "tag", request.getTag().get(), true); } diff --git a/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/types/DistributionCredentialsCreateRequestScopesItem.java b/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/types/DistributionCredentialsCreateRequestScopesItem.java index 5568d6c..72c2672 100644 --- a/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/types/DistributionCredentialsCreateRequestScopesItem.java +++ b/src/main/java/com/deepgram/resources/selfhosted/v1/distributioncredentials/types/DistributionCredentialsCreateRequestScopesItem.java @@ -7,36 +7,36 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class DistributionCredentialsCreateRequestScopesItem { - public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCTS = - new DistributionCredentialsCreateRequestScopesItem(Value.SELF_HOSTED_PRODUCTS, "self-hosted:products"); + public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_BILLING = + new DistributionCredentialsCreateRequestScopesItem( + Value.SELF_HOSTED_PRODUCT_BILLING, "self-hosted:product:billing"); - public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_DGTOOLS = + public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_API = new DistributionCredentialsCreateRequestScopesItem( - Value.SELF_HOSTED_PRODUCT_DGTOOLS, "self-hosted:product:dgtools"); + Value.SELF_HOSTED_PRODUCT_API, "self-hosted:product:api"); public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_HOTPEPPER = new DistributionCredentialsCreateRequestScopesItem( Value.SELF_HOSTED_PRODUCT_HOTPEPPER, "self-hosted:product:hotpepper"); - public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_API = - new DistributionCredentialsCreateRequestScopesItem( - Value.SELF_HOSTED_PRODUCT_API, "self-hosted:product:api"); - public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_ENGINE = new DistributionCredentialsCreateRequestScopesItem( Value.SELF_HOSTED_PRODUCT_ENGINE, "self-hosted:product:engine"); - public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_LICENSE_PROXY = + public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_METRICS_SERVER = new DistributionCredentialsCreateRequestScopesItem( - Value.SELF_HOSTED_PRODUCT_LICENSE_PROXY, "self-hosted:product:license-proxy"); + Value.SELF_HOSTED_PRODUCT_METRICS_SERVER, "self-hosted:product:metrics-server"); - public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_BILLING = + public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCTS = + new DistributionCredentialsCreateRequestScopesItem(Value.SELF_HOSTED_PRODUCTS, "self-hosted:products"); + + public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_LICENSE_PROXY = new DistributionCredentialsCreateRequestScopesItem( - Value.SELF_HOSTED_PRODUCT_BILLING, "self-hosted:product:billing"); + Value.SELF_HOSTED_PRODUCT_LICENSE_PROXY, "self-hosted:product:license-proxy"); - public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_METRICS_SERVER = + public static final DistributionCredentialsCreateRequestScopesItem SELF_HOSTED_PRODUCT_DGTOOLS = new DistributionCredentialsCreateRequestScopesItem( - Value.SELF_HOSTED_PRODUCT_METRICS_SERVER, "self-hosted:product:metrics-server"); + Value.SELF_HOSTED_PRODUCT_DGTOOLS, "self-hosted:product:dgtools"); private final Value value; @@ -71,22 +71,22 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case SELF_HOSTED_PRODUCTS: - return visitor.visitSelfHostedProducts(); - case SELF_HOSTED_PRODUCT_DGTOOLS: - return visitor.visitSelfHostedProductDgtools(); - case SELF_HOSTED_PRODUCT_HOTPEPPER: - return visitor.visitSelfHostedProductHotpepper(); + case SELF_HOSTED_PRODUCT_BILLING: + return visitor.visitSelfHostedProductBilling(); case SELF_HOSTED_PRODUCT_API: return visitor.visitSelfHostedProductApi(); + case SELF_HOSTED_PRODUCT_HOTPEPPER: + return visitor.visitSelfHostedProductHotpepper(); case SELF_HOSTED_PRODUCT_ENGINE: return visitor.visitSelfHostedProductEngine(); - case SELF_HOSTED_PRODUCT_LICENSE_PROXY: - return visitor.visitSelfHostedProductLicenseProxy(); - case SELF_HOSTED_PRODUCT_BILLING: - return visitor.visitSelfHostedProductBilling(); case SELF_HOSTED_PRODUCT_METRICS_SERVER: return visitor.visitSelfHostedProductMetricsServer(); + case SELF_HOSTED_PRODUCTS: + return visitor.visitSelfHostedProducts(); + case SELF_HOSTED_PRODUCT_LICENSE_PROXY: + return visitor.visitSelfHostedProductLicenseProxy(); + case SELF_HOSTED_PRODUCT_DGTOOLS: + return visitor.visitSelfHostedProductDgtools(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -96,22 +96,22 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static DistributionCredentialsCreateRequestScopesItem valueOf(String value) { switch (value) { - case "self-hosted:products": - return SELF_HOSTED_PRODUCTS; - case "self-hosted:product:dgtools": - return SELF_HOSTED_PRODUCT_DGTOOLS; - case "self-hosted:product:hotpepper": - return SELF_HOSTED_PRODUCT_HOTPEPPER; + case "self-hosted:product:billing": + return SELF_HOSTED_PRODUCT_BILLING; case "self-hosted:product:api": return SELF_HOSTED_PRODUCT_API; + case "self-hosted:product:hotpepper": + return SELF_HOSTED_PRODUCT_HOTPEPPER; case "self-hosted:product:engine": return SELF_HOSTED_PRODUCT_ENGINE; - case "self-hosted:product:license-proxy": - return SELF_HOSTED_PRODUCT_LICENSE_PROXY; - case "self-hosted:product:billing": - return SELF_HOSTED_PRODUCT_BILLING; case "self-hosted:product:metrics-server": return SELF_HOSTED_PRODUCT_METRICS_SERVER; + case "self-hosted:products": + return SELF_HOSTED_PRODUCTS; + case "self-hosted:product:license-proxy": + return SELF_HOSTED_PRODUCT_LICENSE_PROXY; + case "self-hosted:product:dgtools": + return SELF_HOSTED_PRODUCT_DGTOOLS; default: return new DistributionCredentialsCreateRequestScopesItem(Value.UNKNOWN, value); } 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 528456c..5880f41 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 @@ -59,10 +59,8 @@ public CompletableFuture> generate( QueryStringMapper.addQueryParameter( httpUrl, "callback_method", request.getCallbackMethod().get(), false); } - if (request.getMipOptOut().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "mip_opt_out", request.getMipOptOut().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "mip_opt_out", request.getMipOptOut().orElse(false), false); if (request.getBitRate().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "bit_rate", request.getBitRate().get(), false); 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 90dab8b..f0ecf39 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 @@ -54,10 +54,8 @@ public DeepgramApiHttpResponse generate(SpeakV1Request request, Req QueryStringMapper.addQueryParameter( httpUrl, "callback_method", request.getCallbackMethod().get(), false); } - if (request.getMipOptOut().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "mip_opt_out", request.getMipOptOut().get(), false); - } + QueryStringMapper.addQueryParameter( + httpUrl, "mip_opt_out", request.getMipOptOut().orElse(false), false); if (request.getBitRate().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "bit_rate", request.getBitRate().get(), false); diff --git a/src/main/java/com/deepgram/resources/speak/v1/audio/types/AudioGenerateRequestEncoding.java b/src/main/java/com/deepgram/resources/speak/v1/audio/types/AudioGenerateRequestEncoding.java index f66e2f6..f8520f6 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/audio/types/AudioGenerateRequestEncoding.java +++ b/src/main/java/com/deepgram/resources/speak/v1/audio/types/AudioGenerateRequestEncoding.java @@ -7,10 +7,10 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class AudioGenerateRequestEncoding { - public static final AudioGenerateRequestEncoding MULAW = new AudioGenerateRequestEncoding(Value.MULAW, "mulaw"); - public static final AudioGenerateRequestEncoding AAC = new AudioGenerateRequestEncoding(Value.AAC, "aac"); + public static final AudioGenerateRequestEncoding MULAW = new AudioGenerateRequestEncoding(Value.MULAW, "mulaw"); + public static final AudioGenerateRequestEncoding FLAC = new AudioGenerateRequestEncoding(Value.FLAC, "flac"); public static final AudioGenerateRequestEncoding MP3 = new AudioGenerateRequestEncoding(Value.MP3, "mp3"); @@ -55,10 +55,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case MULAW: - return visitor.visitMulaw(); case AAC: return visitor.visitAac(); + case MULAW: + return visitor.visitMulaw(); case FLAC: return visitor.visitFlac(); case MP3: @@ -78,10 +78,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static AudioGenerateRequestEncoding valueOf(String value) { switch (value) { - case "mulaw": - return MULAW; case "aac": return AAC; + case "mulaw": + return MULAW; case "flac": return FLAC; case "mp3": diff --git a/src/main/java/com/deepgram/resources/speak/v1/audio/types/AudioGenerateRequestModel.java b/src/main/java/com/deepgram/resources/speak/v1/audio/types/AudioGenerateRequestModel.java index df49c8d..368444d 100644 --- a/src/main/java/com/deepgram/resources/speak/v1/audio/types/AudioGenerateRequestModel.java +++ b/src/main/java/com/deepgram/resources/speak/v1/audio/types/AudioGenerateRequestModel.java @@ -7,194 +7,194 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class AudioGenerateRequestModel { - public static final AudioGenerateRequestModel AURA_ANGUS_EN = - new AudioGenerateRequestModel(Value.AURA_ANGUS_EN, "aura-angus-en"); + public static final AudioGenerateRequestModel AURA2SIRIO_ES = + new AudioGenerateRequestModel(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); - public static final AudioGenerateRequestModel AURA2JUPITER_EN = - new AudioGenerateRequestModel(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); + public static final AudioGenerateRequestModel AURA2HERA_EN = + new AudioGenerateRequestModel(Value.AURA2HERA_EN, "aura-2-hera-en"); - public static final AudioGenerateRequestModel AURA2CORA_EN = - new AudioGenerateRequestModel(Value.AURA2CORA_EN, "aura-2-cora-en"); + public static final AudioGenerateRequestModel AURA2ASTERIA_EN = + new AudioGenerateRequestModel(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); - public static final AudioGenerateRequestModel AURA_STELLA_EN = - new AudioGenerateRequestModel(Value.AURA_STELLA_EN, "aura-stella-en"); + public static final AudioGenerateRequestModel AURA2HARMONIA_EN = + new AudioGenerateRequestModel(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); - public static final AudioGenerateRequestModel AURA2HELENA_EN = - new AudioGenerateRequestModel(Value.AURA2HELENA_EN, "aura-2-helena-en"); + public static final AudioGenerateRequestModel AURA2CARINA_ES = + new AudioGenerateRequestModel(Value.AURA2CARINA_ES, "aura-2-carina-es"); - public static final AudioGenerateRequestModel AURA2AQUILA_ES = - new AudioGenerateRequestModel(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); + public static final AudioGenerateRequestModel AURA_ZEUS_EN = + new AudioGenerateRequestModel(Value.AURA_ZEUS_EN, "aura-zeus-en"); - public static final AudioGenerateRequestModel AURA2ATLAS_EN = - new AudioGenerateRequestModel(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); + public static final AudioGenerateRequestModel AURA2HERMES_EN = + new AudioGenerateRequestModel(Value.AURA2HERMES_EN, "aura-2-hermes-en"); - public static final AudioGenerateRequestModel AURA2ORION_EN = - new AudioGenerateRequestModel(Value.AURA2ORION_EN, "aura-2-orion-en"); + public static final AudioGenerateRequestModel AURA2SELENA_ES = + new AudioGenerateRequestModel(Value.AURA2SELENA_ES, "aura-2-selena-es"); - public static final AudioGenerateRequestModel AURA2DRACO_EN = - new AudioGenerateRequestModel(Value.AURA2DRACO_EN, "aura-2-draco-en"); + public static final AudioGenerateRequestModel AURA2NEPTUNE_EN = + new AudioGenerateRequestModel(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); - public static final AudioGenerateRequestModel AURA2HYPERION_EN = - new AudioGenerateRequestModel(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); + public static final AudioGenerateRequestModel AURA2CALLISTA_EN = + new AudioGenerateRequestModel(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); - public static final AudioGenerateRequestModel AURA2JANUS_EN = - new AudioGenerateRequestModel(Value.AURA2JANUS_EN, "aura-2-janus-en"); + public static final AudioGenerateRequestModel AURA2AURORA_EN = + new AudioGenerateRequestModel(Value.AURA2AURORA_EN, "aura-2-aurora-en"); - public static final AudioGenerateRequestModel AURA_HELIOS_EN = - new AudioGenerateRequestModel(Value.AURA_HELIOS_EN, "aura-helios-en"); + public static final AudioGenerateRequestModel AURA2OPHELIA_EN = + new AudioGenerateRequestModel(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); - public static final AudioGenerateRequestModel AURA2PLUTO_EN = - new AudioGenerateRequestModel(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); + public static final AudioGenerateRequestModel AURA2APOLLO_EN = + new AudioGenerateRequestModel(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); - public static final AudioGenerateRequestModel AURA2ARCAS_EN = - new AudioGenerateRequestModel(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); + public static final AudioGenerateRequestModel AURA_LUNA_EN = + new AudioGenerateRequestModel(Value.AURA_LUNA_EN, "aura-luna-en"); - public static final AudioGenerateRequestModel AURA2NESTOR_ES = - new AudioGenerateRequestModel(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); + public static final AudioGenerateRequestModel AURA_ORPHEUS_EN = + new AudioGenerateRequestModel(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); - public static final AudioGenerateRequestModel AURA2NEPTUNE_EN = - new AudioGenerateRequestModel(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); + public static final AudioGenerateRequestModel AURA2DELIA_EN = + new AudioGenerateRequestModel(Value.AURA2DELIA_EN, "aura-2-delia-en"); - public static final AudioGenerateRequestModel AURA2MINERVA_EN = - new AudioGenerateRequestModel(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); + public static final AudioGenerateRequestModel AURA2MARS_EN = + new AudioGenerateRequestModel(Value.AURA2MARS_EN, "aura-2-mars-en"); - public static final AudioGenerateRequestModel AURA2ALVARO_ES = - new AudioGenerateRequestModel(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); + public static final AudioGenerateRequestModel AURA2AMALTHEA_EN = + new AudioGenerateRequestModel(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); - public static final AudioGenerateRequestModel AURA_ATHENA_EN = - new AudioGenerateRequestModel(Value.AURA_ATHENA_EN, "aura-athena-en"); + public static final AudioGenerateRequestModel AURA_HERA_EN = + new AudioGenerateRequestModel(Value.AURA_HERA_EN, "aura-hera-en"); - public static final AudioGenerateRequestModel AURA_PERSEUS_EN = - new AudioGenerateRequestModel(Value.AURA_PERSEUS_EN, "aura-perseus-en"); + public static final AudioGenerateRequestModel AURA2SELENE_EN = + new AudioGenerateRequestModel(Value.AURA2SELENE_EN, "aura-2-selene-en"); - public static final AudioGenerateRequestModel AURA2ODYSSEUS_EN = - new AudioGenerateRequestModel(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); + public static final AudioGenerateRequestModel AURA2ARIES_EN = + new AudioGenerateRequestModel(Value.AURA2ARIES_EN, "aura-2-aries-en"); - public static final AudioGenerateRequestModel AURA2PANDORA_EN = - new AudioGenerateRequestModel(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); + public static final AudioGenerateRequestModel AURA2JUNO_EN = + new AudioGenerateRequestModel(Value.AURA2JUNO_EN, "aura-2-juno-en"); - public static final AudioGenerateRequestModel AURA2ZEUS_EN = - new AudioGenerateRequestModel(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); + public static final AudioGenerateRequestModel AURA2LUNA_EN = + new AudioGenerateRequestModel(Value.AURA2LUNA_EN, "aura-2-luna-en"); - public static final AudioGenerateRequestModel AURA2ELECTRA_EN = - new AudioGenerateRequestModel(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); + public static final AudioGenerateRequestModel AURA2JAVIER_ES = + new AudioGenerateRequestModel(Value.AURA2JAVIER_ES, "aura-2-javier-es"); - public static final AudioGenerateRequestModel AURA2ORPHEUS_EN = - new AudioGenerateRequestModel(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); + public static final AudioGenerateRequestModel AURA2PHOEBE_EN = + new AudioGenerateRequestModel(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); - public static final AudioGenerateRequestModel AURA2THALIA_EN = - new AudioGenerateRequestModel(Value.AURA2THALIA_EN, "aura-2-thalia-en"); + public static final AudioGenerateRequestModel AURA2DIANA_ES = + new AudioGenerateRequestModel(Value.AURA2DIANA_ES, "aura-2-diana-es"); - public static final AudioGenerateRequestModel AURA2CELESTE_ES = - new AudioGenerateRequestModel(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); + public static final AudioGenerateRequestModel AURA_ORION_EN = + new AudioGenerateRequestModel(Value.AURA_ORION_EN, "aura-orion-en"); - public static final AudioGenerateRequestModel AURA_ASTERIA_EN = - new AudioGenerateRequestModel(Value.AURA_ASTERIA_EN, "aura-asteria-en"); + public static final AudioGenerateRequestModel AURA2ANDROMEDA_EN = + new AudioGenerateRequestModel(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); - public static final AudioGenerateRequestModel AURA2ESTRELLA_ES = - new AudioGenerateRequestModel(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); + public static final AudioGenerateRequestModel AURA2ATHENA_EN = + new AudioGenerateRequestModel(Value.AURA2ATHENA_EN, "aura-2-athena-en"); - public static final AudioGenerateRequestModel AURA2HERA_EN = - new AudioGenerateRequestModel(Value.AURA2HERA_EN, "aura-2-hera-en"); + public static final AudioGenerateRequestModel AURA2SATURN_EN = + new AudioGenerateRequestModel(Value.AURA2SATURN_EN, "aura-2-saturn-en"); - public static final AudioGenerateRequestModel AURA2MARS_EN = - new AudioGenerateRequestModel(Value.AURA2MARS_EN, "aura-2-mars-en"); + public static final AudioGenerateRequestModel AURA_ARCAS_EN = + new AudioGenerateRequestModel(Value.AURA_ARCAS_EN, "aura-arcas-en"); - public static final AudioGenerateRequestModel AURA2SIRIO_ES = - new AudioGenerateRequestModel(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); + public static final AudioGenerateRequestModel AURA2THEIA_EN = + new AudioGenerateRequestModel(Value.AURA2THEIA_EN, "aura-2-theia-en"); - public static final AudioGenerateRequestModel AURA2ASTERIA_EN = - new AudioGenerateRequestModel(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); + public static final AudioGenerateRequestModel AURA2IRIS_EN = + new AudioGenerateRequestModel(Value.AURA2IRIS_EN, "aura-2-iris-en"); - public static final AudioGenerateRequestModel AURA2HERMES_EN = - new AudioGenerateRequestModel(Value.AURA2HERMES_EN, "aura-2-hermes-en"); + public static final AudioGenerateRequestModel AURA_ANGUS_EN = + new AudioGenerateRequestModel(Value.AURA_ANGUS_EN, "aura-angus-en"); - public static final AudioGenerateRequestModel AURA2VESTA_EN = - new AudioGenerateRequestModel(Value.AURA2VESTA_EN, "aura-2-vesta-en"); + public static final AudioGenerateRequestModel AURA2JUPITER_EN = + new AudioGenerateRequestModel(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); - public static final AudioGenerateRequestModel AURA2CARINA_ES = - new AudioGenerateRequestModel(Value.AURA2CARINA_ES, "aura-2-carina-es"); + public static final AudioGenerateRequestModel AURA2AQUILA_ES = + new AudioGenerateRequestModel(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); - public static final AudioGenerateRequestModel AURA2CALLISTA_EN = - new AudioGenerateRequestModel(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); + public static final AudioGenerateRequestModel AURA2CORA_EN = + new AudioGenerateRequestModel(Value.AURA2CORA_EN, "aura-2-cora-en"); - public static final AudioGenerateRequestModel AURA2HARMONIA_EN = - new AudioGenerateRequestModel(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); + public static final AudioGenerateRequestModel AURA2CORDELIA_EN = + new AudioGenerateRequestModel(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); - public static final AudioGenerateRequestModel AURA2SELENA_ES = - new AudioGenerateRequestModel(Value.AURA2SELENA_ES, "aura-2-selena-es"); + public static final AudioGenerateRequestModel AURA2ATLAS_EN = + new AudioGenerateRequestModel(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); - public static final AudioGenerateRequestModel AURA2AURORA_EN = - new AudioGenerateRequestModel(Value.AURA2AURORA_EN, "aura-2-aurora-en"); + public static final AudioGenerateRequestModel AURA2HELENA_EN = + new AudioGenerateRequestModel(Value.AURA2HELENA_EN, "aura-2-helena-en"); - public static final AudioGenerateRequestModel AURA_ZEUS_EN = - new AudioGenerateRequestModel(Value.AURA_ZEUS_EN, "aura-zeus-en"); + public static final AudioGenerateRequestModel AURA_STELLA_EN = + new AudioGenerateRequestModel(Value.AURA_STELLA_EN, "aura-stella-en"); - public static final AudioGenerateRequestModel AURA2OPHELIA_EN = - new AudioGenerateRequestModel(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); + public static final AudioGenerateRequestModel AURA2DRACO_EN = + new AudioGenerateRequestModel(Value.AURA2DRACO_EN, "aura-2-draco-en"); - public static final AudioGenerateRequestModel AURA2AMALTHEA_EN = - new AudioGenerateRequestModel(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); + public static final AudioGenerateRequestModel AURA2HYPERION_EN = + new AudioGenerateRequestModel(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); - public static final AudioGenerateRequestModel AURA_ORPHEUS_EN = - new AudioGenerateRequestModel(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); + public static final AudioGenerateRequestModel AURA2CELESTE_ES = + new AudioGenerateRequestModel(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); - public static final AudioGenerateRequestModel AURA2DELIA_EN = - new AudioGenerateRequestModel(Value.AURA2DELIA_EN, "aura-2-delia-en"); + public static final AudioGenerateRequestModel AURA_HELIOS_EN = + new AudioGenerateRequestModel(Value.AURA_HELIOS_EN, "aura-helios-en"); - public static final AudioGenerateRequestModel AURA_LUNA_EN = - new AudioGenerateRequestModel(Value.AURA_LUNA_EN, "aura-luna-en"); + public static final AudioGenerateRequestModel AURA2PLUTO_EN = + new AudioGenerateRequestModel(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); - public static final AudioGenerateRequestModel AURA2APOLLO_EN = - new AudioGenerateRequestModel(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); + public static final AudioGenerateRequestModel AURA2JANUS_EN = + new AudioGenerateRequestModel(Value.AURA2JANUS_EN, "aura-2-janus-en"); - public static final AudioGenerateRequestModel AURA2SELENE_EN = - new AudioGenerateRequestModel(Value.AURA2SELENE_EN, "aura-2-selene-en"); + public static final AudioGenerateRequestModel AURA2NESTOR_ES = + new AudioGenerateRequestModel(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); - public static final AudioGenerateRequestModel AURA2THEIA_EN = - new AudioGenerateRequestModel(Value.AURA2THEIA_EN, "aura-2-theia-en"); + public static final AudioGenerateRequestModel AURA2ARCAS_EN = + new AudioGenerateRequestModel(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); - public static final AudioGenerateRequestModel AURA_HERA_EN = - new AudioGenerateRequestModel(Value.AURA_HERA_EN, "aura-hera-en"); + public static final AudioGenerateRequestModel AURA2ORION_EN = + new AudioGenerateRequestModel(Value.AURA2ORION_EN, "aura-2-orion-en"); - public static final AudioGenerateRequestModel AURA2CORDELIA_EN = - new AudioGenerateRequestModel(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); + public static final AudioGenerateRequestModel AURA_ATHENA_EN = + new AudioGenerateRequestModel(Value.AURA_ATHENA_EN, "aura-athena-en"); - public static final AudioGenerateRequestModel AURA2ANDROMEDA_EN = - new AudioGenerateRequestModel(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); + public static final AudioGenerateRequestModel AURA2ODYSSEUS_EN = + new AudioGenerateRequestModel(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); - public static final AudioGenerateRequestModel AURA2ARIES_EN = - new AudioGenerateRequestModel(Value.AURA2ARIES_EN, "aura-2-aries-en"); + public static final AudioGenerateRequestModel AURA2PANDORA_EN = + new AudioGenerateRequestModel(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); - public static final AudioGenerateRequestModel AURA2JUNO_EN = - new AudioGenerateRequestModel(Value.AURA2JUNO_EN, "aura-2-juno-en"); + public static final AudioGenerateRequestModel AURA2MINERVA_EN = + new AudioGenerateRequestModel(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); - public static final AudioGenerateRequestModel AURA2LUNA_EN = - new AudioGenerateRequestModel(Value.AURA2LUNA_EN, "aura-2-luna-en"); + public static final AudioGenerateRequestModel AURA2ALVARO_ES = + new AudioGenerateRequestModel(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); - public static final AudioGenerateRequestModel AURA2DIANA_ES = - new AudioGenerateRequestModel(Value.AURA2DIANA_ES, "aura-2-diana-es"); + public static final AudioGenerateRequestModel AURA_PERSEUS_EN = + new AudioGenerateRequestModel(Value.AURA_PERSEUS_EN, "aura-perseus-en"); - public static final AudioGenerateRequestModel AURA2JAVIER_ES = - new AudioGenerateRequestModel(Value.AURA2JAVIER_ES, "aura-2-javier-es"); + public static final AudioGenerateRequestModel AURA2VESTA_EN = + new AudioGenerateRequestModel(Value.AURA2VESTA_EN, "aura-2-vesta-en"); - public static final AudioGenerateRequestModel AURA_ORION_EN = - new AudioGenerateRequestModel(Value.AURA_ORION_EN, "aura-orion-en"); + public static final AudioGenerateRequestModel AURA_ASTERIA_EN = + new AudioGenerateRequestModel(Value.AURA_ASTERIA_EN, "aura-asteria-en"); - public static final AudioGenerateRequestModel AURA_ARCAS_EN = - new AudioGenerateRequestModel(Value.AURA_ARCAS_EN, "aura-arcas-en"); + public static final AudioGenerateRequestModel AURA2ZEUS_EN = + new AudioGenerateRequestModel(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); - public static final AudioGenerateRequestModel AURA2IRIS_EN = - new AudioGenerateRequestModel(Value.AURA2IRIS_EN, "aura-2-iris-en"); + public static final AudioGenerateRequestModel AURA2ELECTRA_EN = + new AudioGenerateRequestModel(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); - public static final AudioGenerateRequestModel AURA2ATHENA_EN = - new AudioGenerateRequestModel(Value.AURA2ATHENA_EN, "aura-2-athena-en"); + public static final AudioGenerateRequestModel AURA2ORPHEUS_EN = + new AudioGenerateRequestModel(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); - public static final AudioGenerateRequestModel AURA2SATURN_EN = - new AudioGenerateRequestModel(Value.AURA2SATURN_EN, "aura-2-saturn-en"); + public static final AudioGenerateRequestModel AURA2ESTRELLA_ES = + new AudioGenerateRequestModel(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); - public static final AudioGenerateRequestModel AURA2PHOEBE_EN = - new AudioGenerateRequestModel(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); + public static final AudioGenerateRequestModel AURA2THALIA_EN = + new AudioGenerateRequestModel(Value.AURA2THALIA_EN, "aura-2-thalia-en"); private final Value value; @@ -229,132 +229,132 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case AURA_ANGUS_EN: - return visitor.visitAuraAngusEn(); - case AURA2JUPITER_EN: - return visitor.visitAura2JupiterEn(); - case AURA2CORA_EN: - return visitor.visitAura2CoraEn(); - case AURA_STELLA_EN: - return visitor.visitAuraStellaEn(); - case AURA2HELENA_EN: - return visitor.visitAura2HelenaEn(); - case AURA2AQUILA_ES: - return visitor.visitAura2AquilaEs(); - case AURA2ATLAS_EN: - return visitor.visitAura2AtlasEn(); - case AURA2ORION_EN: - return visitor.visitAura2OrionEn(); - case AURA2DRACO_EN: - return visitor.visitAura2DracoEn(); - case AURA2HYPERION_EN: - return visitor.visitAura2HyperionEn(); - case AURA2JANUS_EN: - return visitor.visitAura2JanusEn(); - case AURA_HELIOS_EN: - return visitor.visitAuraHeliosEn(); - case AURA2PLUTO_EN: - return visitor.visitAura2PlutoEn(); - case AURA2ARCAS_EN: - return visitor.visitAura2ArcasEn(); - case AURA2NESTOR_ES: - return visitor.visitAura2NestorEs(); - case AURA2NEPTUNE_EN: - return visitor.visitAura2NeptuneEn(); - case AURA2MINERVA_EN: - return visitor.visitAura2MinervaEn(); - case AURA2ALVARO_ES: - return visitor.visitAura2AlvaroEs(); - case AURA_ATHENA_EN: - return visitor.visitAuraAthenaEn(); - case AURA_PERSEUS_EN: - return visitor.visitAuraPerseusEn(); - case AURA2ODYSSEUS_EN: - return visitor.visitAura2OdysseusEn(); - case AURA2PANDORA_EN: - return visitor.visitAura2PandoraEn(); - case AURA2ZEUS_EN: - return visitor.visitAura2ZeusEn(); - case AURA2ELECTRA_EN: - return visitor.visitAura2ElectraEn(); - case AURA2ORPHEUS_EN: - return visitor.visitAura2OrpheusEn(); - case AURA2THALIA_EN: - return visitor.visitAura2ThaliaEn(); - case AURA2CELESTE_ES: - return visitor.visitAura2CelesteEs(); - case AURA_ASTERIA_EN: - return visitor.visitAuraAsteriaEn(); - case AURA2ESTRELLA_ES: - return visitor.visitAura2EstrellaEs(); - case AURA2HERA_EN: - return visitor.visitAura2HeraEn(); - case AURA2MARS_EN: - return visitor.visitAura2MarsEn(); case AURA2SIRIO_ES: return visitor.visitAura2SirioEs(); + case AURA2HERA_EN: + return visitor.visitAura2HeraEn(); case AURA2ASTERIA_EN: return visitor.visitAura2AsteriaEn(); - case AURA2HERMES_EN: - return visitor.visitAura2HermesEn(); - case AURA2VESTA_EN: - return visitor.visitAura2VestaEn(); - case AURA2CARINA_ES: - return visitor.visitAura2CarinaEs(); - case AURA2CALLISTA_EN: - return visitor.visitAura2CallistaEn(); case AURA2HARMONIA_EN: return visitor.visitAura2HarmoniaEn(); + case AURA2CARINA_ES: + return visitor.visitAura2CarinaEs(); + case AURA_ZEUS_EN: + return visitor.visitAuraZeusEn(); + case AURA2HERMES_EN: + return visitor.visitAura2HermesEn(); case AURA2SELENA_ES: return visitor.visitAura2SelenaEs(); + case AURA2NEPTUNE_EN: + return visitor.visitAura2NeptuneEn(); + case AURA2CALLISTA_EN: + return visitor.visitAura2CallistaEn(); case AURA2AURORA_EN: return visitor.visitAura2AuroraEn(); - case AURA_ZEUS_EN: - return visitor.visitAuraZeusEn(); case AURA2OPHELIA_EN: return visitor.visitAura2OpheliaEn(); - case AURA2AMALTHEA_EN: - return visitor.visitAura2AmaltheaEn(); + case AURA2APOLLO_EN: + return visitor.visitAura2ApolloEn(); + case AURA_LUNA_EN: + return visitor.visitAuraLunaEn(); case AURA_ORPHEUS_EN: return visitor.visitAuraOrpheusEn(); case AURA2DELIA_EN: return visitor.visitAura2DeliaEn(); - case AURA_LUNA_EN: - return visitor.visitAuraLunaEn(); - case AURA2APOLLO_EN: - return visitor.visitAura2ApolloEn(); - case AURA2SELENE_EN: - return visitor.visitAura2SeleneEn(); - case AURA2THEIA_EN: - return visitor.visitAura2TheiaEn(); + case AURA2MARS_EN: + return visitor.visitAura2MarsEn(); + case AURA2AMALTHEA_EN: + return visitor.visitAura2AmaltheaEn(); case AURA_HERA_EN: return visitor.visitAuraHeraEn(); - case AURA2CORDELIA_EN: - return visitor.visitAura2CordeliaEn(); - case AURA2ANDROMEDA_EN: - return visitor.visitAura2AndromedaEn(); + case AURA2SELENE_EN: + return visitor.visitAura2SeleneEn(); case AURA2ARIES_EN: return visitor.visitAura2AriesEn(); case AURA2JUNO_EN: return visitor.visitAura2JunoEn(); case AURA2LUNA_EN: return visitor.visitAura2LunaEn(); - case AURA2DIANA_ES: - return visitor.visitAura2DianaEs(); case AURA2JAVIER_ES: return visitor.visitAura2JavierEs(); + case AURA2PHOEBE_EN: + return visitor.visitAura2PhoebeEn(); + case AURA2DIANA_ES: + return visitor.visitAura2DianaEs(); case AURA_ORION_EN: return visitor.visitAuraOrionEn(); - case AURA_ARCAS_EN: - return visitor.visitAuraArcasEn(); - case AURA2IRIS_EN: - return visitor.visitAura2IrisEn(); + case AURA2ANDROMEDA_EN: + return visitor.visitAura2AndromedaEn(); case AURA2ATHENA_EN: return visitor.visitAura2AthenaEn(); case AURA2SATURN_EN: return visitor.visitAura2SaturnEn(); - case AURA2PHOEBE_EN: - return visitor.visitAura2PhoebeEn(); + case AURA_ARCAS_EN: + return visitor.visitAuraArcasEn(); + case AURA2THEIA_EN: + return visitor.visitAura2TheiaEn(); + case AURA2IRIS_EN: + return visitor.visitAura2IrisEn(); + case AURA_ANGUS_EN: + return visitor.visitAuraAngusEn(); + case AURA2JUPITER_EN: + return visitor.visitAura2JupiterEn(); + case AURA2AQUILA_ES: + return visitor.visitAura2AquilaEs(); + case AURA2CORA_EN: + return visitor.visitAura2CoraEn(); + case AURA2CORDELIA_EN: + return visitor.visitAura2CordeliaEn(); + case AURA2ATLAS_EN: + return visitor.visitAura2AtlasEn(); + case AURA2HELENA_EN: + return visitor.visitAura2HelenaEn(); + case AURA_STELLA_EN: + return visitor.visitAuraStellaEn(); + case AURA2DRACO_EN: + return visitor.visitAura2DracoEn(); + case AURA2HYPERION_EN: + return visitor.visitAura2HyperionEn(); + case AURA2CELESTE_ES: + return visitor.visitAura2CelesteEs(); + case AURA_HELIOS_EN: + return visitor.visitAuraHeliosEn(); + case AURA2PLUTO_EN: + return visitor.visitAura2PlutoEn(); + case AURA2JANUS_EN: + return visitor.visitAura2JanusEn(); + case AURA2NESTOR_ES: + return visitor.visitAura2NestorEs(); + case AURA2ARCAS_EN: + return visitor.visitAura2ArcasEn(); + case AURA2ORION_EN: + return visitor.visitAura2OrionEn(); + case AURA_ATHENA_EN: + return visitor.visitAuraAthenaEn(); + case AURA2ODYSSEUS_EN: + return visitor.visitAura2OdysseusEn(); + case AURA2PANDORA_EN: + return visitor.visitAura2PandoraEn(); + case AURA2MINERVA_EN: + return visitor.visitAura2MinervaEn(); + case AURA2ALVARO_ES: + return visitor.visitAura2AlvaroEs(); + case AURA_PERSEUS_EN: + return visitor.visitAuraPerseusEn(); + case AURA2VESTA_EN: + return visitor.visitAura2VestaEn(); + case AURA_ASTERIA_EN: + return visitor.visitAuraAsteriaEn(); + case AURA2ZEUS_EN: + return visitor.visitAura2ZeusEn(); + case AURA2ELECTRA_EN: + return visitor.visitAura2ElectraEn(); + case AURA2ORPHEUS_EN: + return visitor.visitAura2OrpheusEn(); + case AURA2ESTRELLA_ES: + return visitor.visitAura2EstrellaEs(); + case AURA2THALIA_EN: + return visitor.visitAura2ThaliaEn(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -364,132 +364,132 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static AudioGenerateRequestModel valueOf(String value) { switch (value) { - case "aura-angus-en": - return AURA_ANGUS_EN; - case "aura-2-jupiter-en": - return AURA2JUPITER_EN; - case "aura-2-cora-en": - return AURA2CORA_EN; - case "aura-stella-en": - return AURA_STELLA_EN; - case "aura-2-helena-en": - return AURA2HELENA_EN; - case "aura-2-aquila-es": - return AURA2AQUILA_ES; - case "aura-2-atlas-en": - return AURA2ATLAS_EN; - case "aura-2-orion-en": - return AURA2ORION_EN; - case "aura-2-draco-en": - return AURA2DRACO_EN; - case "aura-2-hyperion-en": - return AURA2HYPERION_EN; - case "aura-2-janus-en": - return AURA2JANUS_EN; - case "aura-helios-en": - return AURA_HELIOS_EN; - case "aura-2-pluto-en": - return AURA2PLUTO_EN; - case "aura-2-arcas-en": - return AURA2ARCAS_EN; - case "aura-2-nestor-es": - return AURA2NESTOR_ES; - case "aura-2-neptune-en": - return AURA2NEPTUNE_EN; - case "aura-2-minerva-en": - return AURA2MINERVA_EN; - case "aura-2-alvaro-es": - return AURA2ALVARO_ES; - case "aura-athena-en": - return AURA_ATHENA_EN; - case "aura-perseus-en": - return AURA_PERSEUS_EN; - case "aura-2-odysseus-en": - return AURA2ODYSSEUS_EN; - case "aura-2-pandora-en": - return AURA2PANDORA_EN; - case "aura-2-zeus-en": - return AURA2ZEUS_EN; - case "aura-2-electra-en": - return AURA2ELECTRA_EN; - case "aura-2-orpheus-en": - return AURA2ORPHEUS_EN; - case "aura-2-thalia-en": - return AURA2THALIA_EN; - case "aura-2-celeste-es": - return AURA2CELESTE_ES; - case "aura-asteria-en": - return AURA_ASTERIA_EN; - case "aura-2-estrella-es": - return AURA2ESTRELLA_ES; - case "aura-2-hera-en": - return AURA2HERA_EN; - case "aura-2-mars-en": - return AURA2MARS_EN; case "aura-2-sirio-es": return AURA2SIRIO_ES; + case "aura-2-hera-en": + return AURA2HERA_EN; case "aura-2-asteria-en": return AURA2ASTERIA_EN; - case "aura-2-hermes-en": - return AURA2HERMES_EN; - case "aura-2-vesta-en": - return AURA2VESTA_EN; - case "aura-2-carina-es": - return AURA2CARINA_ES; - case "aura-2-callista-en": - return AURA2CALLISTA_EN; case "aura-2-harmonia-en": return AURA2HARMONIA_EN; + case "aura-2-carina-es": + return AURA2CARINA_ES; + case "aura-zeus-en": + return AURA_ZEUS_EN; + case "aura-2-hermes-en": + return AURA2HERMES_EN; case "aura-2-selena-es": return AURA2SELENA_ES; + case "aura-2-neptune-en": + return AURA2NEPTUNE_EN; + case "aura-2-callista-en": + return AURA2CALLISTA_EN; case "aura-2-aurora-en": return AURA2AURORA_EN; - case "aura-zeus-en": - return AURA_ZEUS_EN; case "aura-2-ophelia-en": return AURA2OPHELIA_EN; - case "aura-2-amalthea-en": - return AURA2AMALTHEA_EN; + case "aura-2-apollo-en": + return AURA2APOLLO_EN; + case "aura-luna-en": + return AURA_LUNA_EN; case "aura-orpheus-en": return AURA_ORPHEUS_EN; case "aura-2-delia-en": return AURA2DELIA_EN; - case "aura-luna-en": - return AURA_LUNA_EN; - case "aura-2-apollo-en": - return AURA2APOLLO_EN; - case "aura-2-selene-en": - return AURA2SELENE_EN; - case "aura-2-theia-en": - return AURA2THEIA_EN; + case "aura-2-mars-en": + return AURA2MARS_EN; + case "aura-2-amalthea-en": + return AURA2AMALTHEA_EN; case "aura-hera-en": return AURA_HERA_EN; - case "aura-2-cordelia-en": - return AURA2CORDELIA_EN; - case "aura-2-andromeda-en": - return AURA2ANDROMEDA_EN; + case "aura-2-selene-en": + return AURA2SELENE_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 "aura-2-diana-es": - return AURA2DIANA_ES; case "aura-2-javier-es": return AURA2JAVIER_ES; + case "aura-2-phoebe-en": + return AURA2PHOEBE_EN; + case "aura-2-diana-es": + return AURA2DIANA_ES; case "aura-orion-en": return AURA_ORION_EN; - case "aura-arcas-en": - return AURA_ARCAS_EN; - case "aura-2-iris-en": - return AURA2IRIS_EN; + case "aura-2-andromeda-en": + return AURA2ANDROMEDA_EN; case "aura-2-athena-en": return AURA2ATHENA_EN; case "aura-2-saturn-en": return AURA2SATURN_EN; - case "aura-2-phoebe-en": - return AURA2PHOEBE_EN; + case "aura-arcas-en": + return AURA_ARCAS_EN; + case "aura-2-theia-en": + return AURA2THEIA_EN; + case "aura-2-iris-en": + return AURA2IRIS_EN; + case "aura-angus-en": + return AURA_ANGUS_EN; + case "aura-2-jupiter-en": + return AURA2JUPITER_EN; + case "aura-2-aquila-es": + return AURA2AQUILA_ES; + case "aura-2-cora-en": + return AURA2CORA_EN; + case "aura-2-cordelia-en": + return AURA2CORDELIA_EN; + case "aura-2-atlas-en": + return AURA2ATLAS_EN; + case "aura-2-helena-en": + return AURA2HELENA_EN; + case "aura-stella-en": + return AURA_STELLA_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 "aura-helios-en": + return AURA_HELIOS_EN; + case "aura-2-pluto-en": + return AURA2PLUTO_EN; + case "aura-2-janus-en": + return AURA2JANUS_EN; + case "aura-2-nestor-es": + return AURA2NESTOR_ES; + case "aura-2-arcas-en": + return AURA2ARCAS_EN; + case "aura-2-orion-en": + return AURA2ORION_EN; + case "aura-athena-en": + return AURA_ATHENA_EN; + case "aura-2-odysseus-en": + return AURA2ODYSSEUS_EN; + case "aura-2-pandora-en": + return AURA2PANDORA_EN; + case "aura-2-minerva-en": + return AURA2MINERVA_EN; + case "aura-2-alvaro-es": + return AURA2ALVARO_ES; + case "aura-perseus-en": + return AURA_PERSEUS_EN; + case "aura-2-vesta-en": + return AURA2VESTA_EN; + case "aura-asteria-en": + return AURA_ASTERIA_EN; + case "aura-2-zeus-en": + return AURA2ZEUS_EN; + case "aura-2-electra-en": + return AURA2ELECTRA_EN; + case "aura-2-orpheus-en": + return AURA2ORPHEUS_EN; + case "aura-2-estrella-es": + return AURA2ESTRELLA_ES; + case "aura-2-thalia-en": + return AURA2THALIA_EN; default: return new AudioGenerateRequestModel(Value.UNKNOWN, value); } 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 b381236..b494af8 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 @@ -21,11 +21,11 @@ public final class SpeakV1Cleared { private final SpeakV1ClearedType type; - private final double sequenceId; + private final int sequenceId; private final Map additionalProperties; - private SpeakV1Cleared(SpeakV1ClearedType type, double sequenceId, Map additionalProperties) { + private SpeakV1Cleared(SpeakV1ClearedType type, int sequenceId, Map additionalProperties) { this.type = type; this.sequenceId = sequenceId; this.additionalProperties = additionalProperties; @@ -43,7 +43,7 @@ public SpeakV1ClearedType getType() { * @return The sequence ID of the response */ @JsonProperty("sequence_id") - public double getSequenceId() { + public int getSequenceId() { return sequenceId; } @@ -89,7 +89,7 @@ public interface SequenceIdStage { /** *

The sequence ID of the response

*/ - _FinalStage sequenceId(double sequenceId); + _FinalStage sequenceId(int sequenceId); } public interface _FinalStage { @@ -104,7 +104,7 @@ public interface _FinalStage { public static final class Builder implements TypeStage, SequenceIdStage, _FinalStage { private SpeakV1ClearedType type; - private double sequenceId; + private int sequenceId; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -137,7 +137,7 @@ public SequenceIdStage type(@NotNull SpeakV1ClearedType type) { */ @java.lang.Override @JsonSetter("sequence_id") - public _FinalStage sequenceId(double sequenceId) { + public _FinalStage sequenceId(int sequenceId) { this.sequenceId = sequenceId; return this; } 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 ba4139b..442d656 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 @@ -21,11 +21,11 @@ public final class SpeakV1Flushed { private final SpeakV1FlushedType type; - private final double sequenceId; + private final int sequenceId; private final Map additionalProperties; - private SpeakV1Flushed(SpeakV1FlushedType type, double sequenceId, Map additionalProperties) { + private SpeakV1Flushed(SpeakV1FlushedType type, int sequenceId, Map additionalProperties) { this.type = type; this.sequenceId = sequenceId; this.additionalProperties = additionalProperties; @@ -43,7 +43,7 @@ public SpeakV1FlushedType getType() { * @return The sequence ID of the response */ @JsonProperty("sequence_id") - public double getSequenceId() { + public int getSequenceId() { return sequenceId; } @@ -89,7 +89,7 @@ public interface SequenceIdStage { /** *

The sequence ID of the response

*/ - _FinalStage sequenceId(double sequenceId); + _FinalStage sequenceId(int sequenceId); } public interface _FinalStage { @@ -104,7 +104,7 @@ public interface _FinalStage { public static final class Builder implements TypeStage, SequenceIdStage, _FinalStage { private SpeakV1FlushedType type; - private double sequenceId; + private int sequenceId; @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -137,7 +137,7 @@ public SequenceIdStage type(@NotNull SpeakV1FlushedType type) { */ @java.lang.Override @JsonSetter("sequence_id") - public _FinalStage sequenceId(double sequenceId) { + public _FinalStage sequenceId(int sequenceId) { this.sequenceId = sequenceId; return this; } diff --git a/src/main/java/com/deepgram/resources/voiceagent/AsyncVoiceAgentClient.java b/src/main/java/com/deepgram/resources/voiceagent/AsyncVoiceAgentClient.java new file mode 100644 index 0000000..c6d829b --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/AsyncVoiceAgentClient.java @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.Suppliers; +import com.deepgram.resources.voiceagent.configurations.AsyncConfigurationsClient; +import com.deepgram.resources.voiceagent.variables.AsyncVariablesClient; +import java.util.function.Supplier; + +public class AsyncVoiceAgentClient { + protected final ClientOptions clientOptions; + + protected final Supplier configurationsClient; + + protected final Supplier variablesClient; + + public AsyncVoiceAgentClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.configurationsClient = Suppliers.memoize(() -> new AsyncConfigurationsClient(clientOptions)); + this.variablesClient = Suppliers.memoize(() -> new AsyncVariablesClient(clientOptions)); + } + + public AsyncConfigurationsClient configurations() { + return this.configurationsClient.get(); + } + + public AsyncVariablesClient variables() { + return this.variablesClient.get(); + } +} diff --git a/src/main/java/com/deepgram/resources/voiceagent/VoiceAgentClient.java b/src/main/java/com/deepgram/resources/voiceagent/VoiceAgentClient.java new file mode 100644 index 0000000..a58b1e1 --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/VoiceAgentClient.java @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.Suppliers; +import com.deepgram.resources.voiceagent.configurations.ConfigurationsClient; +import com.deepgram.resources.voiceagent.variables.VariablesClient; +import java.util.function.Supplier; + +public class VoiceAgentClient { + protected final ClientOptions clientOptions; + + protected final Supplier configurationsClient; + + protected final Supplier variablesClient; + + public VoiceAgentClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.configurationsClient = Suppliers.memoize(() -> new ConfigurationsClient(clientOptions)); + this.variablesClient = Suppliers.memoize(() -> new VariablesClient(clientOptions)); + } + + public ConfigurationsClient configurations() { + return this.configurationsClient.get(); + } + + public VariablesClient variables() { + return this.variablesClient.get(); + } +} diff --git a/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncConfigurationsClient.java b/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncConfigurationsClient.java new file mode 100644 index 0000000..9fbdf3a --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncConfigurationsClient.java @@ -0,0 +1,110 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.configurations; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.RequestOptions; +import com.deepgram.resources.voiceagent.configurations.requests.CreateAgentConfigurationV1Request; +import com.deepgram.resources.voiceagent.configurations.requests.UpdateAgentMetadataV1Request; +import com.deepgram.types.AgentConfigurationV1; +import com.deepgram.types.CreateAgentConfigurationV1Response; +import com.deepgram.types.ListAgentConfigurationsV1Response; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +public class AsyncConfigurationsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawConfigurationsClient rawClient; + + public AsyncConfigurationsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawConfigurationsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawConfigurationsClient withRawResponse() { + return this.rawClient; + } + + /** + * Returns all agent configurations for the specified project. Configurations are returned in their uninterpolated form—template variable placeholders appear as-is rather than with their substituted values. + */ + public CompletableFuture list(String projectId) { + return this.rawClient.list(projectId).thenApply(response -> response.body()); + } + + /** + * Returns all agent configurations for the specified project. Configurations are returned in their uninterpolated form—template variable placeholders appear as-is rather than with their substituted values. + */ + public CompletableFuture list(String projectId, RequestOptions requestOptions) { + return this.rawClient.list(projectId, requestOptions).thenApply(response -> response.body()); + } + + /** + * Creates a new reusable agent configuration. The config field must be a valid JSON string representing the agent block of a Settings message. The returned agent_id can be passed in place of the full agent object in future Settings messages. + */ + public CompletableFuture create( + String projectId, CreateAgentConfigurationV1Request request) { + return this.rawClient.create(projectId, request).thenApply(response -> response.body()); + } + + /** + * Creates a new reusable agent configuration. The config field must be a valid JSON string representing the agent block of a Settings message. The returned agent_id can be passed in place of the full agent object in future Settings messages. + */ + public CompletableFuture create( + String projectId, CreateAgentConfigurationV1Request request, RequestOptions requestOptions) { + return this.rawClient.create(projectId, request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Returns the specified agent configuration in its uninterpolated form + */ + public CompletableFuture get(String projectId, String agentId) { + return this.rawClient.get(projectId, agentId).thenApply(response -> response.body()); + } + + /** + * Returns the specified agent configuration in its uninterpolated form + */ + public CompletableFuture get( + String projectId, String agentId, RequestOptions requestOptions) { + return this.rawClient.get(projectId, agentId, requestOptions).thenApply(response -> response.body()); + } + + /** + * Updates the metadata associated with an agent configuration. The config itself is immutable—to change the configuration, delete the existing agent and create a new one. + */ + public CompletableFuture update( + String projectId, String agentId, UpdateAgentMetadataV1Request request) { + return this.rawClient.update(projectId, agentId, request).thenApply(response -> response.body()); + } + + /** + * Updates the metadata associated with an agent configuration. The config itself is immutable—to change the configuration, delete the existing agent and create a new one. + */ + public CompletableFuture update( + String projectId, String agentId, UpdateAgentMetadataV1Request request, RequestOptions requestOptions) { + return this.rawClient + .update(projectId, agentId, request, requestOptions) + .thenApply(response -> response.body()); + } + + /** + * Deletes the specified agent configuration. Deleting an agent configuration can cause a production outage if your service references this agent UUID. Migrate all active sessions to a new configuration before deleting. + */ + public CompletableFuture> delete(String projectId, String agentId) { + return this.rawClient.delete(projectId, agentId).thenApply(response -> response.body()); + } + + /** + * Deletes the specified agent configuration. Deleting an agent configuration can cause a production outage if your service references this agent UUID. Migrate all active sessions to a new configuration before deleting. + */ + public CompletableFuture> delete( + String projectId, String agentId, RequestOptions requestOptions) { + return this.rawClient.delete(projectId, agentId, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncRawConfigurationsClient.java b/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncRawConfigurationsClient.java new file mode 100644 index 0000000..9f2dc29 --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/configurations/AsyncRawConfigurationsClient.java @@ -0,0 +1,417 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.configurations; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.DeepgramApiException; +import com.deepgram.core.DeepgramApiHttpResponse; +import com.deepgram.core.DeepgramHttpException; +import com.deepgram.core.MediaTypes; +import com.deepgram.core.ObjectMappers; +import com.deepgram.core.RequestOptions; +import com.deepgram.errors.BadRequestError; +import com.deepgram.resources.voiceagent.configurations.requests.CreateAgentConfigurationV1Request; +import com.deepgram.resources.voiceagent.configurations.requests.UpdateAgentMetadataV1Request; +import com.deepgram.types.AgentConfigurationV1; +import com.deepgram.types.CreateAgentConfigurationV1Response; +import com.deepgram.types.ListAgentConfigurationsV1Response; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawConfigurationsClient { + protected final ClientOptions clientOptions; + + public AsyncRawConfigurationsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Returns all agent configurations for the specified project. Configurations are returned in their uninterpolated form—template variable placeholders appear as-is rather than with their substituted values. + */ + public CompletableFuture> list(String projectId) { + return list(projectId, null); + } + + /** + * Returns all agent configurations for the specified project. Configurations are returned in their uninterpolated form—template variable placeholders appear as-is rather than with their substituted values. + */ + public CompletableFuture> list( + String projectId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListAgentConfigurationsV1Response.class), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Creates a new reusable agent configuration. The config field must be a valid JSON string representing the agent block of a Settings message. The returned agent_id can be passed in place of the full agent object in future Settings messages. + */ + public CompletableFuture> create( + String projectId, CreateAgentConfigurationV1Request request) { + return create(projectId, request, null); + } + + /** + * Creates a new reusable agent configuration. The config field must be a valid JSON string representing the agent block of a Settings message. The returned agent_id can be passed in place of the full agent object in future Settings messages. + */ + public CompletableFuture> create( + String projectId, CreateAgentConfigurationV1Request request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new DeepgramApiException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = + new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, CreateAgentConfigurationV1Response.class), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Returns the specified agent configuration in its uninterpolated form + */ + public CompletableFuture> get(String projectId, String agentId) { + return get(projectId, agentId, null); + } + + /** + * Returns the specified agent configuration in its uninterpolated form + */ + public CompletableFuture> get( + String projectId, String agentId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents") + .addPathSegment(agentId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentConfigurationV1.class), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Updates the metadata associated with an agent configuration. The config itself is immutable—to change the configuration, delete the existing agent and create a new one. + */ + public CompletableFuture> update( + String projectId, String agentId, UpdateAgentMetadataV1Request request) { + return update(projectId, agentId, request, null); + } + + /** + * Updates the metadata associated with an agent configuration. The config itself is immutable—to change the configuration, delete the existing agent and create a new one. + */ + public CompletableFuture> update( + String projectId, String agentId, UpdateAgentMetadataV1Request request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents") + .addPathSegment(agentId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new DeepgramApiException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PUT", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentConfigurationV1.class), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Deletes the specified agent configuration. Deleting an agent configuration can cause a production outage if your service references this agent UUID. Migrate all active sessions to a new configuration before deleting. + */ + public CompletableFuture>> delete(String projectId, String agentId) { + return delete(projectId, agentId, null); + } + + /** + * Deletes the specified agent configuration. Deleting an agent configuration can cause a production outage if your service references this agent UUID. Migrate all active sessions to a new configuration before deleting. + */ + public CompletableFuture>> delete( + String projectId, String agentId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents") + .addPathSegment(agentId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/deepgram/resources/voiceagent/configurations/ConfigurationsClient.java b/src/main/java/com/deepgram/resources/voiceagent/configurations/ConfigurationsClient.java new file mode 100644 index 0000000..7d0cfa9 --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/configurations/ConfigurationsClient.java @@ -0,0 +1,105 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.configurations; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.RequestOptions; +import com.deepgram.resources.voiceagent.configurations.requests.CreateAgentConfigurationV1Request; +import com.deepgram.resources.voiceagent.configurations.requests.UpdateAgentMetadataV1Request; +import com.deepgram.types.AgentConfigurationV1; +import com.deepgram.types.CreateAgentConfigurationV1Response; +import com.deepgram.types.ListAgentConfigurationsV1Response; +import java.util.Map; + +public class ConfigurationsClient { + protected final ClientOptions clientOptions; + + private final RawConfigurationsClient rawClient; + + public ConfigurationsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawConfigurationsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawConfigurationsClient withRawResponse() { + return this.rawClient; + } + + /** + * Returns all agent configurations for the specified project. Configurations are returned in their uninterpolated form—template variable placeholders appear as-is rather than with their substituted values. + */ + public ListAgentConfigurationsV1Response list(String projectId) { + return this.rawClient.list(projectId).body(); + } + + /** + * Returns all agent configurations for the specified project. Configurations are returned in their uninterpolated form—template variable placeholders appear as-is rather than with their substituted values. + */ + public ListAgentConfigurationsV1Response list(String projectId, RequestOptions requestOptions) { + return this.rawClient.list(projectId, requestOptions).body(); + } + + /** + * Creates a new reusable agent configuration. The config field must be a valid JSON string representing the agent block of a Settings message. The returned agent_id can be passed in place of the full agent object in future Settings messages. + */ + public CreateAgentConfigurationV1Response create(String projectId, CreateAgentConfigurationV1Request request) { + return this.rawClient.create(projectId, request).body(); + } + + /** + * Creates a new reusable agent configuration. The config field must be a valid JSON string representing the agent block of a Settings message. The returned agent_id can be passed in place of the full agent object in future Settings messages. + */ + public CreateAgentConfigurationV1Response create( + String projectId, CreateAgentConfigurationV1Request request, RequestOptions requestOptions) { + return this.rawClient.create(projectId, request, requestOptions).body(); + } + + /** + * Returns the specified agent configuration in its uninterpolated form + */ + public AgentConfigurationV1 get(String projectId, String agentId) { + return this.rawClient.get(projectId, agentId).body(); + } + + /** + * Returns the specified agent configuration in its uninterpolated form + */ + public AgentConfigurationV1 get(String projectId, String agentId, RequestOptions requestOptions) { + return this.rawClient.get(projectId, agentId, requestOptions).body(); + } + + /** + * Updates the metadata associated with an agent configuration. The config itself is immutable—to change the configuration, delete the existing agent and create a new one. + */ + public AgentConfigurationV1 update(String projectId, String agentId, UpdateAgentMetadataV1Request request) { + return this.rawClient.update(projectId, agentId, request).body(); + } + + /** + * Updates the metadata associated with an agent configuration. The config itself is immutable—to change the configuration, delete the existing agent and create a new one. + */ + public AgentConfigurationV1 update( + String projectId, String agentId, UpdateAgentMetadataV1Request request, RequestOptions requestOptions) { + return this.rawClient + .update(projectId, agentId, request, requestOptions) + .body(); + } + + /** + * Deletes the specified agent configuration. Deleting an agent configuration can cause a production outage if your service references this agent UUID. Migrate all active sessions to a new configuration before deleting. + */ + public Map delete(String projectId, String agentId) { + return this.rawClient.delete(projectId, agentId).body(); + } + + /** + * Deletes the specified agent configuration. Deleting an agent configuration can cause a production outage if your service references this agent UUID. Migrate all active sessions to a new configuration before deleting. + */ + public Map delete(String projectId, String agentId, RequestOptions requestOptions) { + return this.rawClient.delete(projectId, agentId, requestOptions).body(); + } +} diff --git a/src/main/java/com/deepgram/resources/voiceagent/configurations/RawConfigurationsClient.java b/src/main/java/com/deepgram/resources/voiceagent/configurations/RawConfigurationsClient.java new file mode 100644 index 0000000..d15fe0f --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/configurations/RawConfigurationsClient.java @@ -0,0 +1,339 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.configurations; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.DeepgramApiException; +import com.deepgram.core.DeepgramApiHttpResponse; +import com.deepgram.core.DeepgramHttpException; +import com.deepgram.core.MediaTypes; +import com.deepgram.core.ObjectMappers; +import com.deepgram.core.RequestOptions; +import com.deepgram.errors.BadRequestError; +import com.deepgram.resources.voiceagent.configurations.requests.CreateAgentConfigurationV1Request; +import com.deepgram.resources.voiceagent.configurations.requests.UpdateAgentMetadataV1Request; +import com.deepgram.types.AgentConfigurationV1; +import com.deepgram.types.CreateAgentConfigurationV1Response; +import com.deepgram.types.ListAgentConfigurationsV1Response; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.IOException; +import java.util.Map; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawConfigurationsClient { + protected final ClientOptions clientOptions; + + public RawConfigurationsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Returns all agent configurations for the specified project. Configurations are returned in their uninterpolated form—template variable placeholders appear as-is rather than with their substituted values. + */ + public DeepgramApiHttpResponse list(String projectId) { + return list(projectId, null); + } + + /** + * Returns all agent configurations for the specified project. Configurations are returned in their uninterpolated form—template variable placeholders appear as-is rather than with their substituted values. + */ + public DeepgramApiHttpResponse list( + String projectId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListAgentConfigurationsV1Response.class), + response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new DeepgramApiException("Network error executing HTTP request", e); + } + } + + /** + * Creates a new reusable agent configuration. The config field must be a valid JSON string representing the agent block of a Settings message. The returned agent_id can be passed in place of the full agent object in future Settings messages. + */ + public DeepgramApiHttpResponse create( + String projectId, CreateAgentConfigurationV1Request request) { + return create(projectId, request, null); + } + + /** + * Creates a new reusable agent configuration. The config field must be a valid JSON string representing the agent block of a Settings message. The returned agent_id can be passed in place of the full agent object in future Settings messages. + */ + public DeepgramApiHttpResponse create( + String projectId, CreateAgentConfigurationV1Request request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new DeepgramApiException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, CreateAgentConfigurationV1Response.class), + response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new DeepgramApiException("Network error executing HTTP request", e); + } + } + + /** + * Returns the specified agent configuration in its uninterpolated form + */ + public DeepgramApiHttpResponse get(String projectId, String agentId) { + return get(projectId, agentId, null); + } + + /** + * Returns the specified agent configuration in its uninterpolated form + */ + public DeepgramApiHttpResponse get( + String projectId, String agentId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents") + .addPathSegment(agentId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentConfigurationV1.class), response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new DeepgramApiException("Network error executing HTTP request", e); + } + } + + /** + * Updates the metadata associated with an agent configuration. The config itself is immutable—to change the configuration, delete the existing agent and create a new one. + */ + public DeepgramApiHttpResponse update( + String projectId, String agentId, UpdateAgentMetadataV1Request request) { + return update(projectId, agentId, request, null); + } + + /** + * Updates the metadata associated with an agent configuration. The config itself is immutable—to change the configuration, delete the existing agent and create a new one. + */ + public DeepgramApiHttpResponse update( + String projectId, String agentId, UpdateAgentMetadataV1Request request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents") + .addPathSegment(agentId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new DeepgramApiException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PUT", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentConfigurationV1.class), response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new DeepgramApiException("Network error executing HTTP request", e); + } + } + + /** + * Deletes the specified agent configuration. Deleting an agent configuration can cause a production outage if your service references this agent UUID. Migrate all active sessions to a new configuration before deleting. + */ + public DeepgramApiHttpResponse> delete(String projectId, String agentId) { + return delete(projectId, agentId, null); + } + + /** + * Deletes the specified agent configuration. Deleting an agent configuration can cause a production outage if your service references this agent UUID. Migrate all active sessions to a new configuration before deleting. + */ + public DeepgramApiHttpResponse> delete( + String projectId, String agentId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agents") + .addPathSegment(agentId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } 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 new file mode 100644 index 0000000..8c6f444 --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/configurations/requests/CreateAgentConfigurationV1Request.java @@ -0,0 +1,217 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.configurations.requests; + +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.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) +@JsonDeserialize(builder = CreateAgentConfigurationV1Request.Builder.class) +public final class CreateAgentConfigurationV1Request { + private final String config; + + private final Optional> metadata; + + private final Optional apiVersion; + + private final Map additionalProperties; + + private CreateAgentConfigurationV1Request( + String config, + Optional> metadata, + Optional apiVersion, + Map additionalProperties) { + this.config = config; + this.metadata = metadata; + this.apiVersion = apiVersion; + this.additionalProperties = additionalProperties; + } + + /** + * @return A valid JSON string representing the agent block of a Settings message + */ + @JsonProperty("config") + public String getConfig() { + return config; + } + + /** + * @return A map of arbitrary key-value pairs for labeling or organizing the agent configuration + */ + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + /** + * @return API version. Defaults to 1 + */ + @JsonProperty("api_version") + public Optional getApiVersion() { + return apiVersion; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateAgentConfigurationV1Request && equalTo((CreateAgentConfigurationV1Request) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateAgentConfigurationV1Request other) { + return config.equals(other.config) && metadata.equals(other.metadata) && apiVersion.equals(other.apiVersion); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.config, this.metadata, this.apiVersion); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ConfigStage builder() { + return new Builder(); + } + + public interface ConfigStage { + /** + *

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

+ */ + _FinalStage config(@NotNull String config); + + Builder from(CreateAgentConfigurationV1Request other); + } + + public interface _FinalStage { + CreateAgentConfigurationV1Request build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

A map of arbitrary key-value pairs for labeling or organizing the agent configuration

+ */ + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + + /** + *

API version. Defaults to 1

+ */ + _FinalStage apiVersion(Optional apiVersion); + + _FinalStage apiVersion(Integer apiVersion); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ConfigStage, _FinalStage { + private String config; + + private Optional apiVersion = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateAgentConfigurationV1Request other) { + config(other.getConfig()); + metadata(other.getMetadata()); + apiVersion(other.getApiVersion()); + return this; + } + + /** + *

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. + */ + @java.lang.Override + @JsonSetter("config") + public _FinalStage config(@NotNull String config) { + this.config = Objects.requireNonNull(config, "config must not be null"); + return this; + } + + /** + *

API version. Defaults to 1

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

API version. Defaults to 1

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

A map of arbitrary key-value pairs for labeling or organizing the agent configuration

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

A map of arbitrary key-value pairs for labeling or organizing the agent configuration

+ */ + @java.lang.Override + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public _FinalStage metadata(Optional> metadata) { + this.metadata = metadata; + return this; + } + + @java.lang.Override + public CreateAgentConfigurationV1Request build() { + return new CreateAgentConfigurationV1Request(config, metadata, apiVersion, 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/voiceagent/configurations/requests/UpdateAgentMetadataV1Request.java b/src/main/java/com/deepgram/resources/voiceagent/configurations/requests/UpdateAgentMetadataV1Request.java new file mode 100644 index 0000000..7319ebe --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/configurations/requests/UpdateAgentMetadataV1Request.java @@ -0,0 +1,121 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.configurations.requests; + +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.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateAgentMetadataV1Request.Builder.class) +public final class UpdateAgentMetadataV1Request { + private final Map metadata; + + private final Map additionalProperties; + + private UpdateAgentMetadataV1Request(Map metadata, Map additionalProperties) { + this.metadata = metadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return A map of string key-value pairs to associate with this agent configuration + */ + @JsonProperty("metadata") + public Map getMetadata() { + return metadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateAgentMetadataV1Request && equalTo((UpdateAgentMetadataV1Request) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateAgentMetadataV1Request other) { + return metadata.equals(other.metadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.metadata); + } + + @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 { + private Map metadata = new LinkedHashMap<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(UpdateAgentMetadataV1Request other) { + metadata(other.getMetadata()); + return this; + } + + /** + *

A map of string key-value pairs to associate with this agent configuration

+ */ + @JsonSetter(value = "metadata", nulls = Nulls.SKIP) + public Builder metadata(Map metadata) { + this.metadata.clear(); + if (metadata != null) { + this.metadata.putAll(metadata); + } + return this; + } + + public Builder putAllMetadata(Map metadata) { + if (metadata != null) { + this.metadata.putAll(metadata); + } + return this; + } + + public Builder metadata(String key, String value) { + this.metadata.put(key, value); + return this; + } + + public UpdateAgentMetadataV1Request build() { + return new UpdateAgentMetadataV1Request(metadata, 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/voiceagent/variables/AsyncRawVariablesClient.java b/src/main/java/com/deepgram/resources/voiceagent/variables/AsyncRawVariablesClient.java new file mode 100644 index 0000000..6ae084d --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/variables/AsyncRawVariablesClient.java @@ -0,0 +1,413 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.variables; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.DeepgramApiException; +import com.deepgram.core.DeepgramApiHttpResponse; +import com.deepgram.core.DeepgramHttpException; +import com.deepgram.core.MediaTypes; +import com.deepgram.core.ObjectMappers; +import com.deepgram.core.RequestOptions; +import com.deepgram.errors.BadRequestError; +import com.deepgram.resources.voiceagent.variables.requests.CreateAgentVariableV1Request; +import com.deepgram.resources.voiceagent.variables.requests.UpdateAgentVariableV1Request; +import com.deepgram.types.AgentVariableV1; +import com.deepgram.types.ListAgentVariablesV1Response; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawVariablesClient { + protected final ClientOptions clientOptions; + + public AsyncRawVariablesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Returns all template variables for the specified project + */ + public CompletableFuture> list(String projectId) { + return list(projectId, null); + } + + /** + * Returns all template variables for the specified project + */ + public CompletableFuture> list( + String projectId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, ListAgentVariablesV1Response.class), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Creates a new template variable. Variables follow the DG_<VARIABLE_NAME> naming format and can substitute any JSON value in an agent configuration. + */ + public CompletableFuture> create( + String projectId, CreateAgentVariableV1Request request) { + return create(projectId, request, null); + } + + /** + * Creates a new template variable. Variables follow the DG_<VARIABLE_NAME> naming format and can substitute any JSON value in an agent configuration. + */ + public CompletableFuture> create( + String projectId, CreateAgentVariableV1Request request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new DeepgramApiException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentVariableV1.class), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Returns the specified template variable + */ + public CompletableFuture> get(String projectId, String variableId) { + return get(projectId, variableId, null); + } + + /** + * Returns the specified template variable + */ + public CompletableFuture> get( + String projectId, String variableId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables") + .addPathSegment(variableId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentVariableV1.class), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Deletes the specified template variable + */ + public CompletableFuture>> delete(String projectId, String variableId) { + return delete(projectId, variableId, null); + } + + /** + * Deletes the specified template variable + */ + public CompletableFuture>> delete( + String projectId, String variableId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables") + .addPathSegment(variableId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Updates the value of an existing template variable + */ + public CompletableFuture> update( + String projectId, String variableId, UpdateAgentVariableV1Request request) { + return update(projectId, variableId, request, null); + } + + /** + * Updates the value of an existing template variable + */ + public CompletableFuture> update( + String projectId, String variableId, UpdateAgentVariableV1Request request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables") + .addPathSegment(variableId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new DeepgramApiException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentVariableV1.class), + response)); + return; + } + try { + if (response.code() == 400) { + future.completeExceptionally(new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); + return; + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new DeepgramApiException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/deepgram/resources/voiceagent/variables/AsyncVariablesClient.java b/src/main/java/com/deepgram/resources/voiceagent/variables/AsyncVariablesClient.java new file mode 100644 index 0000000..e19090f --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/variables/AsyncVariablesClient.java @@ -0,0 +1,107 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.variables; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.RequestOptions; +import com.deepgram.resources.voiceagent.variables.requests.CreateAgentVariableV1Request; +import com.deepgram.resources.voiceagent.variables.requests.UpdateAgentVariableV1Request; +import com.deepgram.types.AgentVariableV1; +import com.deepgram.types.ListAgentVariablesV1Response; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +public class AsyncVariablesClient { + protected final ClientOptions clientOptions; + + private final AsyncRawVariablesClient rawClient; + + public AsyncVariablesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawVariablesClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawVariablesClient withRawResponse() { + return this.rawClient; + } + + /** + * Returns all template variables for the specified project + */ + public CompletableFuture list(String projectId) { + return this.rawClient.list(projectId).thenApply(response -> response.body()); + } + + /** + * Returns all template variables for the specified project + */ + public CompletableFuture list(String projectId, RequestOptions requestOptions) { + return this.rawClient.list(projectId, requestOptions).thenApply(response -> response.body()); + } + + /** + * Creates a new template variable. Variables follow the DG_<VARIABLE_NAME> naming format and can substitute any JSON value in an agent configuration. + */ + public CompletableFuture create(String projectId, CreateAgentVariableV1Request request) { + return this.rawClient.create(projectId, request).thenApply(response -> response.body()); + } + + /** + * Creates a new template variable. Variables follow the DG_<VARIABLE_NAME> naming format and can substitute any JSON value in an agent configuration. + */ + public CompletableFuture create( + String projectId, CreateAgentVariableV1Request request, RequestOptions requestOptions) { + return this.rawClient.create(projectId, request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Returns the specified template variable + */ + public CompletableFuture get(String projectId, String variableId) { + return this.rawClient.get(projectId, variableId).thenApply(response -> response.body()); + } + + /** + * Returns the specified template variable + */ + public CompletableFuture get(String projectId, String variableId, RequestOptions requestOptions) { + return this.rawClient.get(projectId, variableId, requestOptions).thenApply(response -> response.body()); + } + + /** + * Deletes the specified template variable + */ + public CompletableFuture> delete(String projectId, String variableId) { + return this.rawClient.delete(projectId, variableId).thenApply(response -> response.body()); + } + + /** + * Deletes the specified template variable + */ + public CompletableFuture> delete( + String projectId, String variableId, RequestOptions requestOptions) { + return this.rawClient.delete(projectId, variableId, requestOptions).thenApply(response -> response.body()); + } + + /** + * Updates the value of an existing template variable + */ + public CompletableFuture update( + String projectId, String variableId, UpdateAgentVariableV1Request request) { + return this.rawClient.update(projectId, variableId, request).thenApply(response -> response.body()); + } + + /** + * Updates the value of an existing template variable + */ + public CompletableFuture update( + String projectId, String variableId, UpdateAgentVariableV1Request request, RequestOptions requestOptions) { + return this.rawClient + .update(projectId, variableId, request, requestOptions) + .thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/deepgram/resources/voiceagent/variables/RawVariablesClient.java b/src/main/java/com/deepgram/resources/voiceagent/variables/RawVariablesClient.java new file mode 100644 index 0000000..745e3d5 --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/variables/RawVariablesClient.java @@ -0,0 +1,333 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.variables; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.DeepgramApiException; +import com.deepgram.core.DeepgramApiHttpResponse; +import com.deepgram.core.DeepgramHttpException; +import com.deepgram.core.MediaTypes; +import com.deepgram.core.ObjectMappers; +import com.deepgram.core.RequestOptions; +import com.deepgram.errors.BadRequestError; +import com.deepgram.resources.voiceagent.variables.requests.CreateAgentVariableV1Request; +import com.deepgram.resources.voiceagent.variables.requests.UpdateAgentVariableV1Request; +import com.deepgram.types.AgentVariableV1; +import com.deepgram.types.ListAgentVariablesV1Response; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.IOException; +import java.util.Map; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawVariablesClient { + protected final ClientOptions clientOptions; + + public RawVariablesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Returns all template variables for the specified project + */ + public DeepgramApiHttpResponse list(String projectId) { + return list(projectId, null); + } + + /** + * Returns all template variables for the specified project + */ + public DeepgramApiHttpResponse list(String projectId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ListAgentVariablesV1Response.class), + response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new DeepgramApiException("Network error executing HTTP request", e); + } + } + + /** + * Creates a new template variable. Variables follow the DG_<VARIABLE_NAME> naming format and can substitute any JSON value in an agent configuration. + */ + public DeepgramApiHttpResponse create(String projectId, CreateAgentVariableV1Request request) { + return create(projectId, request, null); + } + + /** + * Creates a new template variable. Variables follow the DG_<VARIABLE_NAME> naming format and can substitute any JSON value in an agent configuration. + */ + public DeepgramApiHttpResponse create( + String projectId, CreateAgentVariableV1Request request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new DeepgramApiException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentVariableV1.class), response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new DeepgramApiException("Network error executing HTTP request", e); + } + } + + /** + * Returns the specified template variable + */ + public DeepgramApiHttpResponse get(String projectId, String variableId) { + return get(projectId, variableId, null); + } + + /** + * Returns the specified template variable + */ + public DeepgramApiHttpResponse get( + String projectId, String variableId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables") + .addPathSegment(variableId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentVariableV1.class), response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new DeepgramApiException("Network error executing HTTP request", e); + } + } + + /** + * Deletes the specified template variable + */ + public DeepgramApiHttpResponse> delete(String projectId, String variableId) { + return delete(projectId, variableId, null); + } + + /** + * Deletes the specified template variable + */ + public DeepgramApiHttpResponse> delete( + String projectId, String variableId, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables") + .addPathSegment(variableId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("DELETE", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new DeepgramApiException("Network error executing HTTP request", e); + } + } + + /** + * Updates the value of an existing template variable + */ + public DeepgramApiHttpResponse update( + String projectId, String variableId, UpdateAgentVariableV1Request request) { + return update(projectId, variableId, request, null); + } + + /** + * Updates the value of an existing template variable + */ + public DeepgramApiHttpResponse update( + String projectId, String variableId, UpdateAgentVariableV1Request request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getBaseURL()) + .newBuilder() + .addPathSegments("v1/projects") + .addPathSegment(projectId) + .addPathSegments("agent-variables") + .addPathSegment(variableId); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new DeepgramApiException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new DeepgramApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, AgentVariableV1.class), response); + } + try { + if (response.code() == 400) { + throw new BadRequestError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new DeepgramHttpException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new DeepgramApiException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/com/deepgram/resources/voiceagent/variables/VariablesClient.java b/src/main/java/com/deepgram/resources/voiceagent/variables/VariablesClient.java new file mode 100644 index 0000000..19d6ad1 --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/variables/VariablesClient.java @@ -0,0 +1,104 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.variables; + +import com.deepgram.core.ClientOptions; +import com.deepgram.core.RequestOptions; +import com.deepgram.resources.voiceagent.variables.requests.CreateAgentVariableV1Request; +import com.deepgram.resources.voiceagent.variables.requests.UpdateAgentVariableV1Request; +import com.deepgram.types.AgentVariableV1; +import com.deepgram.types.ListAgentVariablesV1Response; +import java.util.Map; + +public class VariablesClient { + protected final ClientOptions clientOptions; + + private final RawVariablesClient rawClient; + + public VariablesClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawVariablesClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawVariablesClient withRawResponse() { + return this.rawClient; + } + + /** + * Returns all template variables for the specified project + */ + public ListAgentVariablesV1Response list(String projectId) { + return this.rawClient.list(projectId).body(); + } + + /** + * Returns all template variables for the specified project + */ + public ListAgentVariablesV1Response list(String projectId, RequestOptions requestOptions) { + return this.rawClient.list(projectId, requestOptions).body(); + } + + /** + * Creates a new template variable. Variables follow the DG_<VARIABLE_NAME> naming format and can substitute any JSON value in an agent configuration. + */ + public AgentVariableV1 create(String projectId, CreateAgentVariableV1Request request) { + return this.rawClient.create(projectId, request).body(); + } + + /** + * Creates a new template variable. Variables follow the DG_<VARIABLE_NAME> naming format and can substitute any JSON value in an agent configuration. + */ + public AgentVariableV1 create( + String projectId, CreateAgentVariableV1Request request, RequestOptions requestOptions) { + return this.rawClient.create(projectId, request, requestOptions).body(); + } + + /** + * Returns the specified template variable + */ + public AgentVariableV1 get(String projectId, String variableId) { + return this.rawClient.get(projectId, variableId).body(); + } + + /** + * Returns the specified template variable + */ + public AgentVariableV1 get(String projectId, String variableId, RequestOptions requestOptions) { + return this.rawClient.get(projectId, variableId, requestOptions).body(); + } + + /** + * Deletes the specified template variable + */ + public Map delete(String projectId, String variableId) { + return this.rawClient.delete(projectId, variableId).body(); + } + + /** + * Deletes the specified template variable + */ + public Map delete(String projectId, String variableId, RequestOptions requestOptions) { + return this.rawClient.delete(projectId, variableId, requestOptions).body(); + } + + /** + * Updates the value of an existing template variable + */ + public AgentVariableV1 update(String projectId, String variableId, UpdateAgentVariableV1Request request) { + return this.rawClient.update(projectId, variableId, request).body(); + } + + /** + * Updates the value of an existing template variable + */ + public AgentVariableV1 update( + String projectId, String variableId, UpdateAgentVariableV1Request request, RequestOptions requestOptions) { + return this.rawClient + .update(projectId, variableId, request, requestOptions) + .body(); + } +} 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 new file mode 100644 index 0000000..e8d8ece --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/variables/requests/CreateAgentVariableV1Request.java @@ -0,0 +1,195 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.variables.requests; + +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.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) +@JsonDeserialize(builder = CreateAgentVariableV1Request.Builder.class) +public final class CreateAgentVariableV1Request { + private final String key; + + private final Object value; + + private final Optional apiVersion; + + private final Map additionalProperties; + + private CreateAgentVariableV1Request( + String key, Object value, Optional apiVersion, Map additionalProperties) { + this.key = key; + this.value = value; + this.apiVersion = apiVersion; + this.additionalProperties = additionalProperties; + } + + /** + * @return The variable name, following the DG_<VARIABLE_NAME> format + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + @JsonProperty("value") + public Object getValue() { + return value; + } + + /** + * @return API version. Defaults to 1 + */ + @JsonProperty("api_version") + public Optional getApiVersion() { + return apiVersion; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateAgentVariableV1Request && equalTo((CreateAgentVariableV1Request) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateAgentVariableV1Request other) { + return key.equals(other.key) && value.equals(other.value) && apiVersion.equals(other.apiVersion); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.key, this.value, this.apiVersion); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static KeyStage builder() { + return new Builder(); + } + + public interface KeyStage { + /** + *

The variable name, following the DG_<VARIABLE_NAME> format

+ */ + ValueStage key(@NotNull String key); + + Builder from(CreateAgentVariableV1Request other); + } + + public interface ValueStage { + _FinalStage value(Object value); + } + + public interface _FinalStage { + CreateAgentVariableV1Request build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

API version. Defaults to 1

+ */ + _FinalStage apiVersion(Optional apiVersion); + + _FinalStage apiVersion(Integer apiVersion); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements KeyStage, ValueStage, _FinalStage { + private String key; + + private Object value; + + private Optional apiVersion = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateAgentVariableV1Request other) { + key(other.getKey()); + value(other.getValue()); + apiVersion(other.getApiVersion()); + return this; + } + + /** + *

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. + */ + @java.lang.Override + @JsonSetter("key") + public ValueStage key(@NotNull String key) { + this.key = Objects.requireNonNull(key, "key must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("value") + public _FinalStage value(Object value) { + this.value = value; + return this; + } + + /** + *

API version. Defaults to 1

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

API version. Defaults to 1

+ */ + @java.lang.Override + @JsonSetter(value = "api_version", nulls = Nulls.SKIP) + public _FinalStage apiVersion(Optional apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + @java.lang.Override + public CreateAgentVariableV1Request build() { + return new CreateAgentVariableV1Request(key, value, apiVersion, 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/voiceagent/variables/requests/UpdateAgentVariableV1Request.java b/src/main/java/com/deepgram/resources/voiceagent/variables/requests/UpdateAgentVariableV1Request.java new file mode 100644 index 0000000..fe52317 --- /dev/null +++ b/src/main/java/com/deepgram/resources/voiceagent/variables/requests/UpdateAgentVariableV1Request.java @@ -0,0 +1,117 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.deepgram.resources.voiceagent.variables.requests; + +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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = UpdateAgentVariableV1Request.Builder.class) +public final class UpdateAgentVariableV1Request { + private final Object value; + + private final Map additionalProperties; + + private UpdateAgentVariableV1Request(Object value, Map additionalProperties) { + this.value = value; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("value") + public Object getValue() { + return value; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UpdateAgentVariableV1Request && equalTo((UpdateAgentVariableV1Request) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(UpdateAgentVariableV1Request other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ValueStage builder() { + return new Builder(); + } + + public interface ValueStage { + _FinalStage value(Object value); + + Builder from(UpdateAgentVariableV1Request other); + } + + public interface _FinalStage { + UpdateAgentVariableV1Request build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ValueStage, _FinalStage { + private Object value; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(UpdateAgentVariableV1Request other) { + value(other.getValue()); + return this; + } + + @java.lang.Override + @JsonSetter("value") + public _FinalStage value(Object value) { + this.value = value; + return this; + } + + @java.lang.Override + public UpdateAgentVariableV1Request build() { + return new UpdateAgentVariableV1Request(value, 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/AgentConfigurationV1.java b/src/main/java/com/deepgram/types/AgentConfigurationV1.java new file mode 100644 index 0000000..610baba --- /dev/null +++ b/src/main/java/com/deepgram/types/AgentConfigurationV1.java @@ -0,0 +1,324 @@ +/** + * 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.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AgentConfigurationV1.Builder.class) +public final class AgentConfigurationV1 { + private final String agentId; + + private final Map config; + + private final Optional> metadata; + + private final Optional createdAt; + + private final Optional updatedAt; + + private final Map additionalProperties; + + private AgentConfigurationV1( + String agentId, + Map config, + Optional> metadata, + Optional createdAt, + Optional updatedAt, + Map additionalProperties) { + this.agentId = agentId; + this.config = config; + this.metadata = metadata; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier of the agent configuration + */ + @JsonProperty("agent_id") + public String getAgentId() { + return agentId; + } + + /** + * @return The agent configuration object + */ + @JsonProperty("config") + public Map getConfig() { + return config; + } + + /** + * @return A map of arbitrary key-value pairs for labeling or organizing the agent configuration + */ + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + /** + * @return Timestamp when the configuration was created + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return Timestamp when the configuration was last updated + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AgentConfigurationV1 && equalTo((AgentConfigurationV1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AgentConfigurationV1 other) { + return agentId.equals(other.agentId) + && config.equals(other.config) + && metadata.equals(other.metadata) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.agentId, this.config, this.metadata, this.createdAt, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AgentIdStage builder() { + return new Builder(); + } + + public interface AgentIdStage { + /** + *

The unique identifier of the agent configuration

+ */ + _FinalStage agentId(@NotNull String agentId); + + Builder from(AgentConfigurationV1 other); + } + + public interface _FinalStage { + AgentConfigurationV1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The agent configuration object

+ */ + _FinalStage config(Map config); + + _FinalStage putAllConfig(Map config); + + _FinalStage config(String key, Object value); + + /** + *

A map of arbitrary key-value pairs for labeling or organizing the agent configuration

+ */ + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + + /** + *

Timestamp when the configuration was created

+ */ + _FinalStage createdAt(Optional createdAt); + + _FinalStage createdAt(OffsetDateTime createdAt); + + /** + *

Timestamp when the configuration was last updated

+ */ + _FinalStage updatedAt(Optional updatedAt); + + _FinalStage updatedAt(OffsetDateTime updatedAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AgentIdStage, _FinalStage { + private String agentId; + + private Optional updatedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional> metadata = Optional.empty(); + + private Map config = new LinkedHashMap<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AgentConfigurationV1 other) { + agentId(other.getAgentId()); + config(other.getConfig()); + metadata(other.getMetadata()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

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. + */ + @java.lang.Override + @JsonSetter("agent_id") + public _FinalStage agentId(@NotNull String agentId) { + this.agentId = Objects.requireNonNull(agentId, "agentId must not be null"); + return this; + } + + /** + *

Timestamp when the configuration was last updated

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

Timestamp when the configuration was last updated

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

Timestamp when the configuration was created

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

Timestamp when the configuration was created

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

A map of arbitrary key-value pairs for labeling or organizing the agent configuration

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

A map of arbitrary key-value pairs for labeling or organizing the agent configuration

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

The agent configuration object

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage config(String key, Object value) { + this.config.put(key, value); + return this; + } + + /** + *

The agent configuration object

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage putAllConfig(Map config) { + if (config != null) { + this.config.putAll(config); + } + return this; + } + + /** + *

The agent configuration object

+ */ + @java.lang.Override + @JsonSetter(value = "config", nulls = Nulls.SKIP) + public _FinalStage config(Map config) { + this.config.clear(); + if (config != null) { + this.config.putAll(config); + } + return this; + } + + @java.lang.Override + public AgentConfigurationV1 build() { + return new AgentConfigurationV1(agentId, config, metadata, createdAt, updatedAt, 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/AgentThinkModelsV1ResponseModelsItemZeroId.java b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemZeroId.java index 1bab642..4696d0a 100644 --- a/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemZeroId.java +++ b/src/main/java/com/deepgram/types/AgentThinkModelsV1ResponseModelsItemZeroId.java @@ -10,20 +10,20 @@ public final class AgentThinkModelsV1ResponseModelsItemZeroId { public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT5MINI = new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT5MINI, "gpt-5-mini"); + public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT41NANO = + new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT41NANO, "gpt-4.1-nano"); + public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT4O_MINI = new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT4O_MINI, "gpt-4o-mini"); - public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT4O = - new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT4O, "gpt-4o"); - - public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT41NANO = - new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT41NANO, "gpt-4.1-nano"); + public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT41MINI = + new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT41MINI, "gpt-4.1-mini"); public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT5 = new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT5, "gpt-5"); - public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT41MINI = - new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT41MINI, "gpt-4.1-mini"); + public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT4O = + new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT4O, "gpt-4o"); public static final AgentThinkModelsV1ResponseModelsItemZeroId GPT5NANO = new AgentThinkModelsV1ResponseModelsItemZeroId(Value.GPT5NANO, "gpt-5-nano"); @@ -66,16 +66,16 @@ public T visit(Visitor visitor) { switch (value) { case GPT5MINI: return visitor.visitGpt5Mini(); - case GPT4O_MINI: - return visitor.visitGpt4OMini(); - case GPT4O: - return visitor.visitGpt4O(); case GPT41NANO: return visitor.visitGpt41Nano(); - case GPT5: - return visitor.visitGpt5(); + case GPT4O_MINI: + return visitor.visitGpt4OMini(); case GPT41MINI: return visitor.visitGpt41Mini(); + case GPT5: + return visitor.visitGpt5(); + case GPT4O: + return visitor.visitGpt4O(); case GPT5NANO: return visitor.visitGpt5Nano(); case GPT41: @@ -91,16 +91,16 @@ public static AgentThinkModelsV1ResponseModelsItemZeroId valueOf(String value) { switch (value) { case "gpt-5-mini": return GPT5MINI; - case "gpt-4o-mini": - return GPT4O_MINI; - case "gpt-4o": - return GPT4O; case "gpt-4.1-nano": return GPT41NANO; - case "gpt-5": - return GPT5; + case "gpt-4o-mini": + return GPT4O_MINI; case "gpt-4.1-mini": return GPT41MINI; + case "gpt-5": + return GPT5; + case "gpt-4o": + return GPT4O; case "gpt-5-nano": return GPT5NANO; case "gpt-4.1": diff --git a/src/main/java/com/deepgram/types/AgentVariableV1.java b/src/main/java/com/deepgram/types/AgentVariableV1.java new file mode 100644 index 0000000..6f09f2f --- /dev/null +++ b/src/main/java/com/deepgram/types/AgentVariableV1.java @@ -0,0 +1,279 @@ +/** + * 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.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.time.OffsetDateTime; +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) +@JsonDeserialize(builder = AgentVariableV1.Builder.class) +public final class AgentVariableV1 { + private final String variableId; + + private final String key; + + private final Object value; + + private final Optional createdAt; + + private final Optional updatedAt; + + private final Map additionalProperties; + + private AgentVariableV1( + String variableId, + String key, + Object value, + Optional createdAt, + Optional updatedAt, + Map additionalProperties) { + this.variableId = variableId; + this.key = key; + this.value = value; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier of the variable + */ + @JsonProperty("variable_id") + public String getVariableId() { + return variableId; + } + + /** + * @return The variable name, following the DG_<VARIABLE_NAME> format + */ + @JsonProperty("key") + public String getKey() { + return key; + } + + @JsonProperty("value") + public Object getValue() { + return value; + } + + /** + * @return Timestamp when the variable was created + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return Timestamp when the variable was last updated + */ + @JsonProperty("updated_at") + public Optional getUpdatedAt() { + return updatedAt; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AgentVariableV1 && equalTo((AgentVariableV1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AgentVariableV1 other) { + return variableId.equals(other.variableId) + && key.equals(other.key) + && value.equals(other.value) + && createdAt.equals(other.createdAt) + && updatedAt.equals(other.updatedAt); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.variableId, this.key, this.value, this.createdAt, this.updatedAt); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static VariableIdStage builder() { + return new Builder(); + } + + public interface VariableIdStage { + /** + *

The unique identifier of the variable

+ */ + KeyStage variableId(@NotNull String variableId); + + Builder from(AgentVariableV1 other); + } + + public interface KeyStage { + /** + *

The variable name, following the DG_<VARIABLE_NAME> format

+ */ + ValueStage key(@NotNull String key); + } + + public interface ValueStage { + _FinalStage value(Object value); + } + + public interface _FinalStage { + AgentVariableV1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Timestamp when the variable was created

+ */ + _FinalStage createdAt(Optional createdAt); + + _FinalStage createdAt(OffsetDateTime createdAt); + + /** + *

Timestamp when the variable was last updated

+ */ + _FinalStage updatedAt(Optional updatedAt); + + _FinalStage updatedAt(OffsetDateTime updatedAt); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements VariableIdStage, KeyStage, ValueStage, _FinalStage { + private String variableId; + + private String key; + + private Object value; + + private Optional updatedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AgentVariableV1 other) { + variableId(other.getVariableId()); + key(other.getKey()); + value(other.getValue()); + createdAt(other.getCreatedAt()); + updatedAt(other.getUpdatedAt()); + return this; + } + + /** + *

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. + */ + @java.lang.Override + @JsonSetter("variable_id") + public KeyStage variableId(@NotNull String variableId) { + this.variableId = Objects.requireNonNull(variableId, "variableId must not be null"); + return this; + } + + /** + *

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. + */ + @java.lang.Override + @JsonSetter("key") + public ValueStage key(@NotNull String key) { + this.key = Objects.requireNonNull(key, "key must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("value") + public _FinalStage value(Object value) { + this.value = value; + return this; + } + + /** + *

Timestamp when the variable was last updated

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

Timestamp when the variable was last updated

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

Timestamp when the variable was created

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

Timestamp when the variable was created

+ */ + @java.lang.Override + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public _FinalStage createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + @java.lang.Override + public AgentVariableV1 build() { + return new AgentVariableV1(variableId, key, value, createdAt, updatedAt, 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/Anthropic.java b/src/main/java/com/deepgram/types/Anthropic.java index 9cb3fad..0221486 100644 --- a/src/main/java/com/deepgram/types/Anthropic.java +++ b/src/main/java/com/deepgram/types/Anthropic.java @@ -3,39 +3,220 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class Anthropic implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Anthropic.Builder.class) +public final class Anthropic { + private final Optional version; - private Anthropic(Object value) { - this.value = value; + private final AnthropicThinkProviderModel model; + + private final Optional temperature; + + private final Map additionalProperties; + + private Anthropic( + Optional version, + AnthropicThinkProviderModel model, + Optional temperature, + Map additionalProperties) { + this.version = version; + this.model = model; + this.temperature = temperature; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "anthropic"; } - @JsonValue - public Object get() { - return this.value; + /** + * @return The REST API version for the Anthropic Messages API + */ + @JsonProperty("version") + public Optional getVersion() { + return version; + } + + /** + * @return Anthropic model to use + */ + @JsonProperty("model") + public AnthropicThinkProviderModel getModel() { + return model; + } + + /** + * @return Anthropic temperature (0-1) + */ + @JsonProperty("temperature") + public Optional getTemperature() { + return temperature; } @java.lang.Override public boolean equals(Object other) { - return this == other || (other instanceof Anthropic && this.value.equals(((Anthropic) other).value)); + if (this == other) return true; + return other instanceof Anthropic && equalTo((Anthropic) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Anthropic other) { + return version.equals(other.version) && model.equals(other.model) && temperature.equals(other.temperature); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.version, this.model, this.temperature); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); + } + + public static ModelStage builder() { + return new Builder(); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static Anthropic of(Object value) { - return new Anthropic(value); + public interface ModelStage { + /** + *

Anthropic model to use

+ */ + _FinalStage model(@NotNull AnthropicThinkProviderModel model); + + Builder from(Anthropic other); + } + + public interface _FinalStage { + Anthropic build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The REST API version for the Anthropic Messages API

+ */ + _FinalStage version(Optional version); + + _FinalStage version(String version); + + /** + *

Anthropic temperature (0-1)

+ */ + _FinalStage temperature(Optional temperature); + + _FinalStage temperature(Double temperature); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelStage, _FinalStage { + private AnthropicThinkProviderModel model; + + private Optional temperature = Optional.empty(); + + private Optional version = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Anthropic other) { + version(other.getVersion()); + model(other.getModel()); + temperature(other.getTemperature()); + return this; + } + + /** + *

Anthropic model to use

+ *

Anthropic model to use

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

Anthropic temperature (0-1)

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

Anthropic temperature (0-1)

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

The REST API version for the Anthropic Messages API

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

The REST API version for the Anthropic Messages API

+ */ + @java.lang.Override + @JsonSetter(value = "version", nulls = Nulls.SKIP) + public _FinalStage version(Optional version) { + this.version = version; + return this; + } + + @java.lang.Override + public Anthropic build() { + return new Anthropic(version, model, temperature, 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/AnthropicThinkProviderModel.java b/src/main/java/com/deepgram/types/AnthropicThinkProviderModel.java new file mode 100644 index 0000000..9aa4608 --- /dev/null +++ b/src/main/java/com/deepgram/types/AnthropicThinkProviderModel.java @@ -0,0 +1,86 @@ +/** + * 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 AnthropicThinkProviderModel { + public static final AnthropicThinkProviderModel CLAUDE_SONNET420250514 = + new AnthropicThinkProviderModel(Value.CLAUDE_SONNET420250514, "claude-sonnet-4-20250514"); + + public static final AnthropicThinkProviderModel CLAUDE35HAIKU_LATEST = + new AnthropicThinkProviderModel(Value.CLAUDE35HAIKU_LATEST, "claude-3-5-haiku-latest"); + + private final Value value; + + private final String string; + + AnthropicThinkProviderModel(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 AnthropicThinkProviderModel + && this.string.equals(((AnthropicThinkProviderModel) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case CLAUDE_SONNET420250514: + return visitor.visitClaudeSonnet420250514(); + case CLAUDE35HAIKU_LATEST: + return visitor.visitClaude35HaikuLatest(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static AnthropicThinkProviderModel valueOf(String value) { + switch (value) { + case "claude-sonnet-4-20250514": + return CLAUDE_SONNET420250514; + case "claude-3-5-haiku-latest": + return CLAUDE35HAIKU_LATEST; + default: + return new AnthropicThinkProviderModel(Value.UNKNOWN, value); + } + } + + public enum Value { + CLAUDE35HAIKU_LATEST, + + CLAUDE_SONNET420250514, + + UNKNOWN + } + + public interface Visitor { + T visitClaude35HaikuLatest(); + + T visitClaudeSonnet420250514(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/deepgram/types/AwsBedrockThinkProvider.java b/src/main/java/com/deepgram/types/AwsBedrockThinkProvider.java index f66186e..3cc3fae 100644 --- a/src/main/java/com/deepgram/types/AwsBedrockThinkProvider.java +++ b/src/main/java/com/deepgram/types/AwsBedrockThinkProvider.java @@ -3,41 +3,222 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class AwsBedrockThinkProvider implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AwsBedrockThinkProvider.Builder.class) +public final class AwsBedrockThinkProvider { + private final AwsBedrockThinkProviderModel model; - private AwsBedrockThinkProvider(Object value) { - this.value = value; + private final Optional temperature; + + private final Optional credentials; + + private final Map additionalProperties; + + private AwsBedrockThinkProvider( + AwsBedrockThinkProviderModel model, + Optional temperature, + Optional credentials, + Map additionalProperties) { + this.model = model; + this.temperature = temperature; + this.credentials = credentials; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "aws_bedrock"; } - @JsonValue - public Object get() { - return this.value; + /** + * @return AWS Bedrock model to use + */ + @JsonProperty("model") + public AwsBedrockThinkProviderModel getModel() { + return model; + } + + /** + * @return AWS Bedrock temperature (0-2) + */ + @JsonProperty("temperature") + public Optional getTemperature() { + return temperature; + } + + /** + * @return AWS credentials type (STS short-lived or IAM long-lived) + */ + @JsonProperty("credentials") + public Optional getCredentials() { + return credentials; } @java.lang.Override public boolean equals(Object other) { - return this == other - || (other instanceof AwsBedrockThinkProvider - && this.value.equals(((AwsBedrockThinkProvider) other).value)); + if (this == other) return true; + return other instanceof AwsBedrockThinkProvider && equalTo((AwsBedrockThinkProvider) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AwsBedrockThinkProvider other) { + return model.equals(other.model) + && temperature.equals(other.temperature) + && credentials.equals(other.credentials); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.model, this.temperature, this.credentials); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); + } + + public static ModelStage builder() { + return new Builder(); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AwsBedrockThinkProvider of(Object value) { - return new AwsBedrockThinkProvider(value); + public interface ModelStage { + /** + *

AWS Bedrock model to use

+ */ + _FinalStage model(@NotNull AwsBedrockThinkProviderModel model); + + Builder from(AwsBedrockThinkProvider other); + } + + public interface _FinalStage { + AwsBedrockThinkProvider build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

AWS Bedrock temperature (0-2)

+ */ + _FinalStage temperature(Optional temperature); + + _FinalStage temperature(Double temperature); + + /** + *

AWS credentials type (STS short-lived or IAM long-lived)

+ */ + _FinalStage credentials(Optional credentials); + + _FinalStage credentials(AwsBedrockThinkProviderCredentials credentials); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelStage, _FinalStage { + private AwsBedrockThinkProviderModel model; + + private Optional credentials = Optional.empty(); + + private Optional temperature = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AwsBedrockThinkProvider other) { + model(other.getModel()); + temperature(other.getTemperature()); + credentials(other.getCredentials()); + return this; + } + + /** + *

AWS Bedrock model to use

+ *

AWS Bedrock model to use

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

AWS credentials type (STS short-lived or IAM long-lived)

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

AWS credentials type (STS short-lived or IAM long-lived)

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

AWS Bedrock temperature (0-2)

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

AWS Bedrock temperature (0-2)

+ */ + @java.lang.Override + @JsonSetter(value = "temperature", nulls = Nulls.SKIP) + public _FinalStage temperature(Optional temperature) { + this.temperature = temperature; + return this; + } + + @java.lang.Override + public AwsBedrockThinkProvider build() { + return new AwsBedrockThinkProvider(model, temperature, credentials, 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/AwsBedrockThinkProviderCredentials.java b/src/main/java/com/deepgram/types/AwsBedrockThinkProviderCredentials.java new file mode 100644 index 0000000..0ffbcc7 --- /dev/null +++ b/src/main/java/com/deepgram/types/AwsBedrockThinkProviderCredentials.java @@ -0,0 +1,235 @@ +/** + * 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.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; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AwsBedrockThinkProviderCredentials.Builder.class) +public final class AwsBedrockThinkProviderCredentials { + private final Optional type; + + private final Optional region; + + private final Optional accessKeyId; + + private final Optional secretAccessKey; + + private final Optional sessionToken; + + private final Map additionalProperties; + + private AwsBedrockThinkProviderCredentials( + Optional type, + Optional region, + Optional accessKeyId, + Optional secretAccessKey, + Optional sessionToken, + Map additionalProperties) { + this.type = type; + this.region = region; + this.accessKeyId = accessKeyId; + this.secretAccessKey = secretAccessKey; + this.sessionToken = sessionToken; + this.additionalProperties = additionalProperties; + } + + /** + * @return AWS credentials type (STS short-lived or IAM long-lived) + */ + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return AWS region + */ + @JsonProperty("region") + public Optional getRegion() { + return region; + } + + /** + * @return AWS access key + */ + @JsonProperty("access_key_id") + public Optional getAccessKeyId() { + return accessKeyId; + } + + /** + * @return AWS secret access key + */ + @JsonProperty("secret_access_key") + public Optional getSecretAccessKey() { + return secretAccessKey; + } + + /** + * @return AWS session token (required for STS only) + */ + @JsonProperty("session_token") + public Optional getSessionToken() { + return sessionToken; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AwsBedrockThinkProviderCredentials + && equalTo((AwsBedrockThinkProviderCredentials) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AwsBedrockThinkProviderCredentials other) { + return type.equals(other.type) + && region.equals(other.region) + && accessKeyId.equals(other.accessKeyId) + && secretAccessKey.equals(other.secretAccessKey) + && sessionToken.equals(other.sessionToken); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type, this.region, this.accessKeyId, this.secretAccessKey, this.sessionToken); + } + + @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 { + private Optional type = Optional.empty(); + + private Optional region = Optional.empty(); + + private Optional accessKeyId = Optional.empty(); + + private Optional secretAccessKey = Optional.empty(); + + private Optional sessionToken = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(AwsBedrockThinkProviderCredentials other) { + type(other.getType()); + region(other.getRegion()); + accessKeyId(other.getAccessKeyId()); + secretAccessKey(other.getSecretAccessKey()); + sessionToken(other.getSessionToken()); + return this; + } + + /** + *

AWS credentials type (STS short-lived or IAM long-lived)

+ */ + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(AwsBedrockThinkProviderCredentialsType type) { + this.type = Optional.ofNullable(type); + return this; + } + + /** + *

AWS region

+ */ + @JsonSetter(value = "region", nulls = Nulls.SKIP) + public Builder region(Optional region) { + this.region = region; + return this; + } + + public Builder region(String region) { + this.region = Optional.ofNullable(region); + return this; + } + + /** + *

AWS access key

+ */ + @JsonSetter(value = "access_key_id", nulls = Nulls.SKIP) + public Builder accessKeyId(Optional accessKeyId) { + this.accessKeyId = accessKeyId; + return this; + } + + public Builder accessKeyId(String accessKeyId) { + this.accessKeyId = Optional.ofNullable(accessKeyId); + return this; + } + + /** + *

AWS secret access key

+ */ + @JsonSetter(value = "secret_access_key", nulls = Nulls.SKIP) + public Builder secretAccessKey(Optional secretAccessKey) { + this.secretAccessKey = secretAccessKey; + return this; + } + + public Builder secretAccessKey(String secretAccessKey) { + this.secretAccessKey = Optional.ofNullable(secretAccessKey); + return this; + } + + /** + *

AWS session token (required for STS only)

+ */ + @JsonSetter(value = "session_token", nulls = Nulls.SKIP) + public Builder sessionToken(Optional sessionToken) { + this.sessionToken = sessionToken; + return this; + } + + public Builder sessionToken(String sessionToken) { + this.sessionToken = Optional.ofNullable(sessionToken); + return this; + } + + public AwsBedrockThinkProviderCredentials build() { + return new AwsBedrockThinkProviderCredentials( + type, region, accessKeyId, secretAccessKey, sessionToken, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType.java b/src/main/java/com/deepgram/types/AwsBedrockThinkProviderCredentialsType.java similarity index 56% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType.java rename to src/main/java/com/deepgram/types/AwsBedrockThinkProviderCredentialsType.java index 89ae0b0..0a05d88 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType.java +++ b/src/main/java/com/deepgram/types/AwsBedrockThinkProviderCredentialsType.java @@ -1,23 +1,23 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType { - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType IAM = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType(Value.IAM, "iam"); +public final class AwsBedrockThinkProviderCredentialsType { + public static final AwsBedrockThinkProviderCredentialsType IAM = + new AwsBedrockThinkProviderCredentialsType(Value.IAM, "iam"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType STS = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType(Value.STS, "sts"); + public static final AwsBedrockThinkProviderCredentialsType STS = + new AwsBedrockThinkProviderCredentialsType(Value.STS, "sts"); private final Value value; private final String string; - AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType(Value value, String string) { + AwsBedrockThinkProviderCredentialsType(Value value, String string) { this.value = value; this.string = string; } @@ -35,9 +35,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType - && this.string.equals( - ((AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType) other).string)); + || (other instanceof AwsBedrockThinkProviderCredentialsType + && this.string.equals(((AwsBedrockThinkProviderCredentialsType) other).string)); } @java.lang.Override @@ -58,14 +57,14 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType valueOf(String value) { + public static AwsBedrockThinkProviderCredentialsType valueOf(String value) { switch (value) { case "iam": return IAM; case "sts": return STS; default: - return new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType(Value.UNKNOWN, value); + return new AwsBedrockThinkProviderCredentialsType(Value.UNKNOWN, value); } } diff --git a/src/main/java/com/deepgram/types/AwsBedrockThinkProviderModel.java b/src/main/java/com/deepgram/types/AwsBedrockThinkProviderModel.java new file mode 100644 index 0000000..97a64f7 --- /dev/null +++ b/src/main/java/com/deepgram/types/AwsBedrockThinkProviderModel.java @@ -0,0 +1,88 @@ +/** + * 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 AwsBedrockThinkProviderModel { + public static final AwsBedrockThinkProviderModel ANTHROPIC_CLAUDE35SONNET20240620V10 = + new AwsBedrockThinkProviderModel( + Value.ANTHROPIC_CLAUDE35SONNET20240620V10, "anthropic/claude-3-5-sonnet-20240620-v1:0"); + + public static final AwsBedrockThinkProviderModel ANTHROPIC_CLAUDE35HAIKU20240307V10 = + new AwsBedrockThinkProviderModel( + Value.ANTHROPIC_CLAUDE35HAIKU20240307V10, "anthropic/claude-3-5-haiku-20240307-v1:0"); + + private final Value value; + + private final String string; + + AwsBedrockThinkProviderModel(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 AwsBedrockThinkProviderModel + && this.string.equals(((AwsBedrockThinkProviderModel) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case ANTHROPIC_CLAUDE35SONNET20240620V10: + return visitor.visitAnthropicClaude35Sonnet20240620V10(); + case ANTHROPIC_CLAUDE35HAIKU20240307V10: + return visitor.visitAnthropicClaude35Haiku20240307V10(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static AwsBedrockThinkProviderModel valueOf(String value) { + switch (value) { + case "anthropic/claude-3-5-sonnet-20240620-v1:0": + return ANTHROPIC_CLAUDE35SONNET20240620V10; + case "anthropic/claude-3-5-haiku-20240307-v1:0": + return ANTHROPIC_CLAUDE35HAIKU20240307V10; + default: + return new AwsBedrockThinkProviderModel(Value.UNKNOWN, value); + } + } + + public enum Value { + ANTHROPIC_CLAUDE35SONNET20240620V10, + + ANTHROPIC_CLAUDE35HAIKU20240307V10, + + UNKNOWN + } + + public interface Visitor { + T visitAnthropicClaude35Sonnet20240620V10(); + + T visitAnthropicClaude35Haiku20240307V10(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/deepgram/types/AwsPollySpeakProvider.java b/src/main/java/com/deepgram/types/AwsPollySpeakProvider.java index ea8e77e..0e5f4ef 100644 --- a/src/main/java/com/deepgram/types/AwsPollySpeakProvider.java +++ b/src/main/java/com/deepgram/types/AwsPollySpeakProvider.java @@ -3,40 +3,262 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class AwsPollySpeakProvider implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = AwsPollySpeakProvider.Builder.class) +public final class AwsPollySpeakProvider { + private final AwsPollySpeakProviderVoice voice; - private AwsPollySpeakProvider(Object value) { - this.value = value; + private final String language; + + private final Optional languageCode; + + private final AwsPollySpeakProviderEngine engine; + + private final AwsPollySpeakProviderCredentials credentials; + + private final Map additionalProperties; + + private AwsPollySpeakProvider( + AwsPollySpeakProviderVoice voice, + String language, + Optional languageCode, + AwsPollySpeakProviderEngine engine, + AwsPollySpeakProviderCredentials credentials, + Map additionalProperties) { + this.voice = voice; + this.language = language; + this.languageCode = languageCode; + this.engine = engine; + this.credentials = credentials; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "aws_polly"; + } + + /** + * @return AWS Polly voice name + */ + @JsonProperty("voice") + public AwsPollySpeakProviderVoice getVoice() { + return voice; + } + + /** + * @return Language code to use, e.g. 'en-US'. Corresponds to the language_code parameter in the AWS Polly API + */ + @JsonProperty("language") + public String getLanguage() { + return language; + } + + /** + * @return Use the language field instead. + */ + @JsonProperty("language_code") + public Optional getLanguageCode() { + return languageCode; } - @JsonValue - public Object get() { - return this.value; + @JsonProperty("engine") + public AwsPollySpeakProviderEngine getEngine() { + return engine; + } + + @JsonProperty("credentials") + public AwsPollySpeakProviderCredentials getCredentials() { + return credentials; } @java.lang.Override public boolean equals(Object other) { - return this == other - || (other instanceof AwsPollySpeakProvider && this.value.equals(((AwsPollySpeakProvider) other).value)); + if (this == other) return true; + return other instanceof AwsPollySpeakProvider && equalTo((AwsPollySpeakProvider) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(AwsPollySpeakProvider other) { + return voice.equals(other.voice) + && language.equals(other.language) + && languageCode.equals(other.languageCode) + && engine.equals(other.engine) + && credentials.equals(other.credentials); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.voice, this.language, this.languageCode, this.engine, this.credentials); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); + } + + public static VoiceStage builder() { + return new Builder(); + } + + public interface VoiceStage { + /** + *

AWS Polly voice name

+ */ + LanguageStage voice(@NotNull AwsPollySpeakProviderVoice voice); + + Builder from(AwsPollySpeakProvider other); + } + + public interface LanguageStage { + /** + *

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

+ */ + EngineStage language(@NotNull String language); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AwsPollySpeakProvider of(Object value) { - return new AwsPollySpeakProvider(value); + public interface EngineStage { + CredentialsStage engine(@NotNull AwsPollySpeakProviderEngine engine); + } + + public interface CredentialsStage { + _FinalStage credentials(@NotNull AwsPollySpeakProviderCredentials credentials); + } + + public interface _FinalStage { + AwsPollySpeakProvider build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Use the language field instead.

+ */ + _FinalStage languageCode(Optional languageCode); + + _FinalStage languageCode(String languageCode); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements VoiceStage, LanguageStage, EngineStage, CredentialsStage, _FinalStage { + private AwsPollySpeakProviderVoice voice; + + private String language; + + private AwsPollySpeakProviderEngine engine; + + private AwsPollySpeakProviderCredentials credentials; + + private Optional languageCode = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(AwsPollySpeakProvider other) { + voice(other.getVoice()); + language(other.getLanguage()); + languageCode(other.getLanguageCode()); + engine(other.getEngine()); + credentials(other.getCredentials()); + return this; + } + + /** + *

AWS Polly voice name

+ *

AWS Polly voice name

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

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. + */ + @java.lang.Override + @JsonSetter("language") + public EngineStage language(@NotNull String language) { + this.language = Objects.requireNonNull(language, "language must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("engine") + public CredentialsStage engine(@NotNull AwsPollySpeakProviderEngine engine) { + this.engine = Objects.requireNonNull(engine, "engine must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("credentials") + public _FinalStage credentials(@NotNull AwsPollySpeakProviderCredentials credentials) { + this.credentials = Objects.requireNonNull(credentials, "credentials must not be null"); + return this; + } + + /** + *

Use the language field instead.

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

Use the language field instead.

+ */ + @java.lang.Override + @JsonSetter(value = "language_code", nulls = Nulls.SKIP) + public _FinalStage languageCode(Optional languageCode) { + this.languageCode = languageCode; + return this; + } + + @java.lang.Override + public AwsPollySpeakProvider build() { + return new AwsPollySpeakProvider(voice, language, languageCode, engine, credentials, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials.java b/src/main/java/com/deepgram/types/AwsPollySpeakProviderCredentials.java similarity index 80% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials.java rename to src/main/java/com/deepgram/types/AwsPollySpeakProviderCredentials.java index 3437a9c..94f7684 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials.java +++ b/src/main/java/com/deepgram/types/AwsPollySpeakProviderCredentials.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.deepgram.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -19,9 +19,9 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials.Builder.class) -public final class AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials { - private final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType type; +@JsonDeserialize(builder = AwsPollySpeakProviderCredentials.Builder.class) +public final class AwsPollySpeakProviderCredentials { + private final AwsPollySpeakProviderCredentialsType type; private final String region; @@ -33,8 +33,8 @@ public final class AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials { private final Map additionalProperties; - private AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials( - AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType type, + private AwsPollySpeakProviderCredentials( + AwsPollySpeakProviderCredentialsType type, String region, String accessKeyId, String secretAccessKey, @@ -49,7 +49,7 @@ private AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials( } @JsonProperty("type") - public AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType getType() { + public AwsPollySpeakProviderCredentialsType getType() { return type; } @@ -79,8 +79,7 @@ public Optional getSessionToken() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials - && equalTo((AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials) other); + return other instanceof AwsPollySpeakProviderCredentials && equalTo((AwsPollySpeakProviderCredentials) other); } @JsonAnyGetter @@ -88,7 +87,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials other) { + private boolean equalTo(AwsPollySpeakProviderCredentials other) { return type.equals(other.type) && region.equals(other.region) && accessKeyId.equals(other.accessKeyId) @@ -111,9 +110,9 @@ public static TypeStage builder() { } public interface TypeStage { - RegionStage type(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType type); + RegionStage type(@NotNull AwsPollySpeakProviderCredentialsType type); - Builder from(AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials other); + Builder from(AwsPollySpeakProviderCredentials other); } public interface RegionStage { @@ -129,7 +128,7 @@ public interface SecretAccessKeyStage { } public interface _FinalStage { - AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials build(); + AwsPollySpeakProviderCredentials build(); _FinalStage additionalProperty(String key, Object value); @@ -146,7 +145,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements TypeStage, RegionStage, AccessKeyIdStage, SecretAccessKeyStage, _FinalStage { - private AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType type; + private AwsPollySpeakProviderCredentialsType type; private String region; @@ -162,7 +161,7 @@ public static final class Builder private Builder() {} @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials other) { + public Builder from(AwsPollySpeakProviderCredentials other) { type(other.getType()); region(other.getRegion()); accessKeyId(other.getAccessKeyId()); @@ -173,7 +172,7 @@ public Builder from(AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials ot @java.lang.Override @JsonSetter("type") - public RegionStage type(@NotNull AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentialsType type) { + public RegionStage type(@NotNull AwsPollySpeakProviderCredentialsType type) { this.type = Objects.requireNonNull(type, "type must not be null"); return this; } @@ -220,8 +219,8 @@ public _FinalStage sessionToken(Optional sessionToken) { } @java.lang.Override - public AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials build() { - return new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyCredentials( + public AwsPollySpeakProviderCredentials build() { + return new AwsPollySpeakProviderCredentials( type, region, accessKeyId, secretAccessKey, sessionToken, additionalProperties); } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType.java b/src/main/java/com/deepgram/types/AwsPollySpeakProviderCredentialsType.java similarity index 56% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType.java rename to src/main/java/com/deepgram/types/AwsPollySpeakProviderCredentialsType.java index 0c36aaf..3a26597 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType.java +++ b/src/main/java/com/deepgram/types/AwsPollySpeakProviderCredentialsType.java @@ -1,23 +1,23 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType { - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType IAM = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType(Value.IAM, "iam"); +public final class AwsPollySpeakProviderCredentialsType { + public static final AwsPollySpeakProviderCredentialsType IAM = + new AwsPollySpeakProviderCredentialsType(Value.IAM, "iam"); - public static final AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType STS = - new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType(Value.STS, "sts"); + public static final AwsPollySpeakProviderCredentialsType STS = + new AwsPollySpeakProviderCredentialsType(Value.STS, "sts"); private final Value value; private final String string; - AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType(Value value, String string) { + AwsPollySpeakProviderCredentialsType(Value value, String string) { this.value = value; this.string = string; } @@ -35,9 +35,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType - && this.string.equals( - ((AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType) other).string)); + || (other instanceof AwsPollySpeakProviderCredentialsType + && this.string.equals(((AwsPollySpeakProviderCredentialsType) other).string)); } @java.lang.Override @@ -58,14 +57,14 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType valueOf(String value) { + public static AwsPollySpeakProviderCredentialsType valueOf(String value) { switch (value) { case "iam": return IAM; case "sts": return STS; default: - return new AgentV1UpdateSpeakSpeakEndpointProviderAwsPollyCredentialsType(Value.UNKNOWN, value); + return new AwsPollySpeakProviderCredentialsType(Value.UNKNOWN, value); } } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine.java b/src/main/java/com/deepgram/types/AwsPollySpeakProviderEngine.java similarity index 57% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine.java rename to src/main/java/com/deepgram/types/AwsPollySpeakProviderEngine.java index 8ac142f..56ac6d2 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine.java +++ b/src/main/java/com/deepgram/types/AwsPollySpeakProviderEngine.java @@ -1,29 +1,28 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine { - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine LONG_FORM = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine(Value.LONG_FORM, "long-form"); +public final class AwsPollySpeakProviderEngine { + public static final AwsPollySpeakProviderEngine LONG_FORM = + new AwsPollySpeakProviderEngine(Value.LONG_FORM, "long-form"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine STANDARD = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine(Value.STANDARD, "standard"); + public static final AwsPollySpeakProviderEngine NEURAL = new AwsPollySpeakProviderEngine(Value.NEURAL, "neural"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine GENERATIVE = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine(Value.GENERATIVE, "generative"); + public static final AwsPollySpeakProviderEngine STANDARD = + new AwsPollySpeakProviderEngine(Value.STANDARD, "standard"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine NEURAL = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine(Value.NEURAL, "neural"); + public static final AwsPollySpeakProviderEngine GENERATIVE = + new AwsPollySpeakProviderEngine(Value.GENERATIVE, "generative"); private final Value value; private final String string; - AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine(Value value, String string) { + AwsPollySpeakProviderEngine(Value value, String string) { this.value = value; this.string = string; } @@ -41,8 +40,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine - && this.string.equals(((AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine) other).string)); + || (other instanceof AwsPollySpeakProviderEngine + && this.string.equals(((AwsPollySpeakProviderEngine) other).string)); } @java.lang.Override @@ -54,12 +53,12 @@ public T visit(Visitor visitor) { switch (value) { case LONG_FORM: return visitor.visitLongForm(); + case NEURAL: + return visitor.visitNeural(); case STANDARD: return visitor.visitStandard(); case GENERATIVE: return visitor.visitGenerative(); - case NEURAL: - return visitor.visitNeural(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -67,18 +66,18 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine valueOf(String value) { + public static AwsPollySpeakProviderEngine valueOf(String value) { switch (value) { case "long-form": return LONG_FORM; + case "neural": + return NEURAL; case "standard": return STANDARD; case "generative": return GENERATIVE; - case "neural": - return NEURAL; default: - return new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyEngine(Value.UNKNOWN, value); + return new AwsPollySpeakProviderEngine(Value.UNKNOWN, value); } } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice.java b/src/main/java/com/deepgram/types/AwsPollySpeakProviderVoice.java similarity index 54% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice.java rename to src/main/java/com/deepgram/types/AwsPollySpeakProviderVoice.java index 9768429..beb373e 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice.java +++ b/src/main/java/com/deepgram/types/AwsPollySpeakProviderVoice.java @@ -1,41 +1,33 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice { - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice ARTHUR = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value.ARTHUR, "Arthur"); +public final class AwsPollySpeakProviderVoice { + public static final AwsPollySpeakProviderVoice JOANNA = new AwsPollySpeakProviderVoice(Value.JOANNA, "Joanna"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice JOANNA = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value.JOANNA, "Joanna"); + public static final AwsPollySpeakProviderVoice ARTHUR = new AwsPollySpeakProviderVoice(Value.ARTHUR, "Arthur"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice BRIAN = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value.BRIAN, "Brian"); + public static final AwsPollySpeakProviderVoice BRIAN = new AwsPollySpeakProviderVoice(Value.BRIAN, "Brian"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice AMY = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value.AMY, "Amy"); + public static final AwsPollySpeakProviderVoice AMY = new AwsPollySpeakProviderVoice(Value.AMY, "Amy"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice EMMA = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value.EMMA, "Emma"); + public static final AwsPollySpeakProviderVoice EMMA = new AwsPollySpeakProviderVoice(Value.EMMA, "Emma"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice MATTHEW = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value.MATTHEW, "Matthew"); + public static final AwsPollySpeakProviderVoice ARIA = new AwsPollySpeakProviderVoice(Value.ARIA, "Aria"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice ARIA = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value.ARIA, "Aria"); + public static final AwsPollySpeakProviderVoice MATTHEW = new AwsPollySpeakProviderVoice(Value.MATTHEW, "Matthew"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice AYANDA = - new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value.AYANDA, "Ayanda"); + public static final AwsPollySpeakProviderVoice AYANDA = new AwsPollySpeakProviderVoice(Value.AYANDA, "Ayanda"); private final Value value; private final String string; - AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value value, String string) { + AwsPollySpeakProviderVoice(Value value, String string) { this.value = value; this.string = string; } @@ -53,8 +45,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice - && this.string.equals(((AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice) other).string)); + || (other instanceof AwsPollySpeakProviderVoice + && this.string.equals(((AwsPollySpeakProviderVoice) other).string)); } @java.lang.Override @@ -64,20 +56,20 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case ARTHUR: - return visitor.visitArthur(); case JOANNA: return visitor.visitJoanna(); + case ARTHUR: + return visitor.visitArthur(); case BRIAN: return visitor.visitBrian(); case AMY: return visitor.visitAmy(); case EMMA: return visitor.visitEmma(); - case MATTHEW: - return visitor.visitMatthew(); case ARIA: return visitor.visitAria(); + case MATTHEW: + return visitor.visitMatthew(); case AYANDA: return visitor.visitAyanda(); case UNKNOWN: @@ -87,26 +79,26 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice valueOf(String value) { + public static AwsPollySpeakProviderVoice valueOf(String value) { switch (value) { - case "Arthur": - return ARTHUR; case "Joanna": return JOANNA; + case "Arthur": + return ARTHUR; case "Brian": return BRIAN; case "Amy": return AMY; case "Emma": return EMMA; - case "Matthew": - return MATTHEW; case "Aria": return ARIA; + case "Matthew": + return MATTHEW; case "Ayanda": return AYANDA; default: - return new AgentV1UpdateSpeakSpeakOneItemProviderAwsPollyVoice(Value.UNKNOWN, value); + return new AwsPollySpeakProviderVoice(Value.UNKNOWN, value); } } diff --git a/src/main/java/com/deepgram/types/Cartesia.java b/src/main/java/com/deepgram/types/Cartesia.java index a223933..8ca8847 100644 --- a/src/main/java/com/deepgram/types/Cartesia.java +++ b/src/main/java/com/deepgram/types/Cartesia.java @@ -3,39 +3,289 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class Cartesia implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Cartesia.Builder.class) +public final class Cartesia { + private final Optional version; - private Cartesia(Object value) { - this.value = value; + private final CartesiaSpeakProviderModelId modelId; + + private final CartesiaSpeakProviderVoice voice; + + private final Optional language; + + private final Optional volume; + + private final Map additionalProperties; + + private Cartesia( + Optional version, + CartesiaSpeakProviderModelId modelId, + CartesiaSpeakProviderVoice voice, + Optional language, + Optional volume, + Map additionalProperties) { + this.version = version; + this.modelId = modelId; + this.voice = voice; + this.language = language; + this.volume = volume; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "cartesia"; } - @JsonValue - public Object get() { - return this.value; + /** + * @return The API version header for the Cartesia text-to-speech API + */ + @JsonProperty("version") + public Optional getVersion() { + return version; + } + + /** + * @return Cartesia model ID + */ + @JsonProperty("model_id") + public CartesiaSpeakProviderModelId getModelId() { + return modelId; + } + + @JsonProperty("voice") + public CartesiaSpeakProviderVoice getVoice() { + return voice; + } + + /** + * @return Cartesia language code + */ + @JsonProperty("language") + public Optional getLanguage() { + return language; + } + + /** + * @return Volume level for Cartesia TTS output. Valid range: 0.5 to 2.0. See Cartesia documentation. + */ + @JsonProperty("volume") + public Optional getVolume() { + return volume; } @java.lang.Override public boolean equals(Object other) { - return this == other || (other instanceof Cartesia && this.value.equals(((Cartesia) other).value)); + if (this == other) return true; + return other instanceof Cartesia && equalTo((Cartesia) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Cartesia other) { + return version.equals(other.version) + && modelId.equals(other.modelId) + && voice.equals(other.voice) + && language.equals(other.language) + && volume.equals(other.volume); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.version, this.modelId, this.voice, this.language, this.volume); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); + } + + public static ModelIdStage builder() { + return new Builder(); + } + + public interface ModelIdStage { + /** + *

Cartesia model ID

+ */ + VoiceStage modelId(@NotNull CartesiaSpeakProviderModelId modelId); + + Builder from(Cartesia other); + } + + public interface VoiceStage { + _FinalStage voice(@NotNull CartesiaSpeakProviderVoice voice); + } + + public interface _FinalStage { + Cartesia build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The API version header for the Cartesia text-to-speech API

+ */ + _FinalStage version(Optional version); + + _FinalStage version(String version); + + /** + *

Cartesia language code

+ */ + _FinalStage language(Optional language); + + _FinalStage language(String language); + + /** + *

Volume level for Cartesia TTS output. Valid range: 0.5 to 2.0. See Cartesia documentation.

+ */ + _FinalStage volume(Optional volume); + + _FinalStage volume(Double volume); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static Cartesia of(Object value) { - return new Cartesia(value); + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelIdStage, VoiceStage, _FinalStage { + private CartesiaSpeakProviderModelId modelId; + + private CartesiaSpeakProviderVoice voice; + + private Optional volume = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional version = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Cartesia other) { + version(other.getVersion()); + modelId(other.getModelId()); + voice(other.getVoice()); + language(other.getLanguage()); + volume(other.getVolume()); + return this; + } + + /** + *

Cartesia model ID

+ *

Cartesia model ID

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("model_id") + public VoiceStage modelId(@NotNull CartesiaSpeakProviderModelId modelId) { + this.modelId = Objects.requireNonNull(modelId, "modelId must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("voice") + public _FinalStage voice(@NotNull CartesiaSpeakProviderVoice voice) { + this.voice = Objects.requireNonNull(voice, "voice must not be null"); + return this; + } + + /** + *

Volume level for Cartesia TTS output. Valid range: 0.5 to 2.0. See Cartesia documentation.

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

Volume level for Cartesia TTS output. Valid range: 0.5 to 2.0. See Cartesia documentation.

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

Cartesia language code

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

Cartesia language code

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

The API version header for the Cartesia text-to-speech API

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

The API version header for the Cartesia text-to-speech API

+ */ + @java.lang.Override + @JsonSetter(value = "version", nulls = Nulls.SKIP) + public _FinalStage version(Optional version) { + this.version = version; + return this; + } + + @java.lang.Override + public Cartesia build() { + return new Cartesia(version, modelId, voice, language, volume, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId.java b/src/main/java/com/deepgram/types/CartesiaSpeakProviderModelId.java similarity index 60% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId.java rename to src/main/java/com/deepgram/types/CartesiaSpeakProviderModelId.java index e276fea..fddf607 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId.java +++ b/src/main/java/com/deepgram/types/CartesiaSpeakProviderModelId.java @@ -1,23 +1,22 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId { - public static final AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId SONIC_MULTILINGUAL = - new AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId(Value.SONIC_MULTILINGUAL, "sonic-multilingual"); +public final class CartesiaSpeakProviderModelId { + public static final CartesiaSpeakProviderModelId SONIC2 = new CartesiaSpeakProviderModelId(Value.SONIC2, "sonic-2"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId SONIC2 = - new AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId(Value.SONIC2, "sonic-2"); + public static final CartesiaSpeakProviderModelId SONIC_MULTILINGUAL = + new CartesiaSpeakProviderModelId(Value.SONIC_MULTILINGUAL, "sonic-multilingual"); private final Value value; private final String string; - AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId(Value value, String string) { + CartesiaSpeakProviderModelId(Value value, String string) { this.value = value; this.string = string; } @@ -35,8 +34,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId - && this.string.equals(((AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId) other).string)); + || (other instanceof CartesiaSpeakProviderModelId + && this.string.equals(((CartesiaSpeakProviderModelId) other).string)); } @java.lang.Override @@ -46,10 +45,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case SONIC_MULTILINGUAL: - return visitor.visitSonicMultilingual(); case SONIC2: return visitor.visitSonic2(); + case SONIC_MULTILINGUAL: + return visitor.visitSonicMultilingual(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -57,14 +56,14 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId valueOf(String value) { + public static CartesiaSpeakProviderModelId valueOf(String value) { switch (value) { - case "sonic-multilingual": - return SONIC_MULTILINGUAL; case "sonic-2": return SONIC2; + case "sonic-multilingual": + return SONIC_MULTILINGUAL; default: - return new AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId(Value.UNKNOWN, value); + return new CartesiaSpeakProviderModelId(Value.UNKNOWN, value); } } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice.java b/src/main/java/com/deepgram/types/CartesiaSpeakProviderVoice.java similarity index 79% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice.java rename to src/main/java/com/deepgram/types/CartesiaSpeakProviderVoice.java index 35e747d..9d7168f 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice.java +++ b/src/main/java/com/deepgram/types/CartesiaSpeakProviderVoice.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.deepgram.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -17,16 +17,15 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice.Builder.class) -public final class AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice { +@JsonDeserialize(builder = CartesiaSpeakProviderVoice.Builder.class) +public final class CartesiaSpeakProviderVoice { private final String mode; private final String id; private final Map additionalProperties; - private AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice( - String mode, String id, Map additionalProperties) { + private CartesiaSpeakProviderVoice(String mode, String id, Map additionalProperties) { this.mode = mode; this.id = id; this.additionalProperties = additionalProperties; @@ -51,8 +50,7 @@ public String getId() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice - && equalTo((AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice) other); + return other instanceof CartesiaSpeakProviderVoice && equalTo((CartesiaSpeakProviderVoice) other); } @JsonAnyGetter @@ -60,7 +58,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice other) { + private boolean equalTo(CartesiaSpeakProviderVoice other) { return mode.equals(other.mode) && id.equals(other.id); } @@ -84,7 +82,7 @@ public interface ModeStage { */ IdStage mode(@NotNull String mode); - Builder from(AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice other); + Builder from(CartesiaSpeakProviderVoice other); } public interface IdStage { @@ -95,7 +93,7 @@ public interface IdStage { } public interface _FinalStage { - AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice build(); + CartesiaSpeakProviderVoice build(); _FinalStage additionalProperty(String key, Object value); @@ -114,7 +112,7 @@ public static final class Builder implements ModeStage, IdStage, _FinalStage { private Builder() {} @java.lang.Override - public Builder from(AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice other) { + public Builder from(CartesiaSpeakProviderVoice other) { mode(other.getMode()); id(other.getId()); return this; @@ -145,8 +143,8 @@ public _FinalStage id(@NotNull String id) { } @java.lang.Override - public AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice build() { - return new AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice(mode, id, additionalProperties); + public CartesiaSpeakProviderVoice build() { + return new CartesiaSpeakProviderVoice(mode, id, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/deepgram/types/CreateAgentConfigurationV1Response.java b/src/main/java/com/deepgram/types/CreateAgentConfigurationV1Response.java new file mode 100644 index 0000000..aed9a45 --- /dev/null +++ b/src/main/java/com/deepgram/types/CreateAgentConfigurationV1Response.java @@ -0,0 +1,236 @@ +/** + * 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.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateAgentConfigurationV1Response.Builder.class) +public final class CreateAgentConfigurationV1Response { + private final String agentId; + + private final Map config; + + private final Optional> metadata; + + private final Map additionalProperties; + + private CreateAgentConfigurationV1Response( + String agentId, + Map config, + Optional> metadata, + Map additionalProperties) { + this.agentId = agentId; + this.config = config; + this.metadata = metadata; + this.additionalProperties = additionalProperties; + } + + /** + * @return The unique identifier of the newly created agent configuration + */ + @JsonProperty("agent_id") + public String getAgentId() { + return agentId; + } + + /** + * @return The parsed agent configuration object + */ + @JsonProperty("config") + public Map getConfig() { + return config; + } + + /** + * @return Metadata associated with the agent configuration + */ + @JsonProperty("metadata") + public Optional> getMetadata() { + return metadata; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateAgentConfigurationV1Response + && equalTo((CreateAgentConfigurationV1Response) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateAgentConfigurationV1Response other) { + return agentId.equals(other.agentId) && config.equals(other.config) && metadata.equals(other.metadata); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.agentId, this.config, this.metadata); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static AgentIdStage builder() { + return new Builder(); + } + + public interface AgentIdStage { + /** + *

The unique identifier of the newly created agent configuration

+ */ + _FinalStage agentId(@NotNull String agentId); + + Builder from(CreateAgentConfigurationV1Response other); + } + + public interface _FinalStage { + CreateAgentConfigurationV1Response build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The parsed agent configuration object

+ */ + _FinalStage config(Map config); + + _FinalStage putAllConfig(Map config); + + _FinalStage config(String key, Object value); + + /** + *

Metadata associated with the agent configuration

+ */ + _FinalStage metadata(Optional> metadata); + + _FinalStage metadata(Map metadata); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements AgentIdStage, _FinalStage { + private String agentId; + + private Optional> metadata = Optional.empty(); + + private Map config = new LinkedHashMap<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateAgentConfigurationV1Response other) { + agentId(other.getAgentId()); + config(other.getConfig()); + metadata(other.getMetadata()); + return this; + } + + /** + *

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. + */ + @java.lang.Override + @JsonSetter("agent_id") + public _FinalStage agentId(@NotNull String agentId) { + this.agentId = Objects.requireNonNull(agentId, "agentId must not be null"); + return this; + } + + /** + *

Metadata associated with the agent configuration

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

Metadata associated with the agent configuration

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

The parsed agent configuration object

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage config(String key, Object value) { + this.config.put(key, value); + return this; + } + + /** + *

The parsed agent configuration object

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage putAllConfig(Map config) { + if (config != null) { + this.config.putAll(config); + } + return this; + } + + /** + *

The parsed agent configuration object

+ */ + @java.lang.Override + @JsonSetter(value = "config", nulls = Nulls.SKIP) + public _FinalStage config(Map config) { + this.config.clear(); + if (config != null) { + this.config.putAll(config); + } + return this; + } + + @java.lang.Override + public CreateAgentConfigurationV1Response build() { + return new CreateAgentConfigurationV1Response(agentId, config, metadata, 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/Deepgram.java b/src/main/java/com/deepgram/types/Deepgram.java index 75bf033..28ba235 100644 --- a/src/main/java/com/deepgram/types/Deepgram.java +++ b/src/main/java/com/deepgram/types/Deepgram.java @@ -3,39 +3,220 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class Deepgram implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Deepgram.Builder.class) +public final class Deepgram { + private final Optional version; - private Deepgram(Object value) { - this.value = value; + private final DeepgramSpeakProviderModel model; + + private final Optional speed; + + private final Map additionalProperties; + + private Deepgram( + Optional version, + DeepgramSpeakProviderModel model, + Optional speed, + Map additionalProperties) { + this.version = version; + this.model = model; + this.speed = speed; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "deepgram"; } - @JsonValue - public Object get() { - return this.value; + /** + * @return The REST API version for the Deepgram text-to-speech API + */ + @JsonProperty("version") + public Optional getVersion() { + return version; + } + + /** + * @return Deepgram TTS model + */ + @JsonProperty("model") + public DeepgramSpeakProviderModel getModel() { + return model; + } + + /** + * @return Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Not yet supported in all languages. + */ + @JsonProperty("speed") + public Optional getSpeed() { + return speed; } @java.lang.Override public boolean equals(Object other) { - return this == other || (other instanceof Deepgram && this.value.equals(((Deepgram) other).value)); + if (this == other) return true; + return other instanceof Deepgram && equalTo((Deepgram) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Deepgram other) { + return version.equals(other.version) && model.equals(other.model) && speed.equals(other.speed); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.version, this.model, this.speed); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); + } + + public static ModelStage builder() { + return new Builder(); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static Deepgram of(Object value) { - return new Deepgram(value); + public interface ModelStage { + /** + *

Deepgram TTS model

+ */ + _FinalStage model(@NotNull DeepgramSpeakProviderModel model); + + Builder from(Deepgram other); + } + + public interface _FinalStage { + Deepgram build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

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

+ */ + _FinalStage version(Optional version); + + _FinalStage version(String version); + + /** + *

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Not yet supported in all languages.

+ */ + _FinalStage speed(Optional speed); + + _FinalStage speed(Double speed); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelStage, _FinalStage { + private DeepgramSpeakProviderModel model; + + private Optional speed = Optional.empty(); + + private Optional version = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Deepgram other) { + version(other.getVersion()); + model(other.getModel()); + speed(other.getSpeed()); + return this; + } + + /** + *

Deepgram TTS model

+ *

Deepgram TTS model

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

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Not yet supported in all languages.

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

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Not yet supported in all languages.

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

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 + public _FinalStage version(String version) { + this.version = Optional.ofNullable(version); + return this; + } + + /** + *

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

+ */ + @java.lang.Override + @JsonSetter(value = "version", nulls = Nulls.SKIP) + public _FinalStage version(Optional version) { + this.version = version; + return this; + } + + @java.lang.Override + public Deepgram build() { + return new Deepgram(version, model, speed, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel.java b/src/main/java/com/deepgram/types/DeepgramSpeakProviderModel.java similarity index 52% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel.java rename to src/main/java/com/deepgram/types/DeepgramSpeakProviderModel.java index 1a5b35a..897ac16 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel.java +++ b/src/main/java/com/deepgram/types/DeepgramSpeakProviderModel.java @@ -1,206 +1,206 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel { - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_ANGUS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_ANGUS_EN, "aura-angus-en"); +public final class DeepgramSpeakProviderModel { + public static final DeepgramSpeakProviderModel AURA2SIRIO_ES = + new DeepgramSpeakProviderModel(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2JUPITER_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); + public static final DeepgramSpeakProviderModel AURA2HERA_EN = + new DeepgramSpeakProviderModel(Value.AURA2HERA_EN, "aura-2-hera-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2CORA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2CORA_EN, "aura-2-cora-en"); + public static final DeepgramSpeakProviderModel AURA2ASTERIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_STELLA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_STELLA_EN, "aura-stella-en"); + public static final DeepgramSpeakProviderModel AURA2HARMONIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2HELENA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2HELENA_EN, "aura-2-helena-en"); + public static final DeepgramSpeakProviderModel AURA2CARINA_ES = + new DeepgramSpeakProviderModel(Value.AURA2CARINA_ES, "aura-2-carina-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2AQUILA_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); + public static final DeepgramSpeakProviderModel AURA_ZEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA_ZEUS_EN, "aura-zeus-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ATLAS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); + public static final DeepgramSpeakProviderModel AURA2HERMES_EN = + new DeepgramSpeakProviderModel(Value.AURA2HERMES_EN, "aura-2-hermes-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ORION_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ORION_EN, "aura-2-orion-en"); + public static final DeepgramSpeakProviderModel AURA2SELENA_ES = + new DeepgramSpeakProviderModel(Value.AURA2SELENA_ES, "aura-2-selena-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2DRACO_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2DRACO_EN, "aura-2-draco-en"); + public static final DeepgramSpeakProviderModel AURA2NEPTUNE_EN = + new DeepgramSpeakProviderModel(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2HYPERION_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); + public static final DeepgramSpeakProviderModel AURA2CALLISTA_EN = + new DeepgramSpeakProviderModel(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2JANUS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2JANUS_EN, "aura-2-janus-en"); + public static final DeepgramSpeakProviderModel AURA2AURORA_EN = + new DeepgramSpeakProviderModel(Value.AURA2AURORA_EN, "aura-2-aurora-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_HELIOS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_HELIOS_EN, "aura-helios-en"); + public static final DeepgramSpeakProviderModel AURA2OPHELIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2PLUTO_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); + public static final DeepgramSpeakProviderModel AURA2APOLLO_EN = + new DeepgramSpeakProviderModel(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ARCAS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); + public static final DeepgramSpeakProviderModel AURA_LUNA_EN = + new DeepgramSpeakProviderModel(Value.AURA_LUNA_EN, "aura-luna-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2NESTOR_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); + public static final DeepgramSpeakProviderModel AURA_ORPHEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2NEPTUNE_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); + public static final DeepgramSpeakProviderModel AURA2DELIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2DELIA_EN, "aura-2-delia-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2MINERVA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); + public static final DeepgramSpeakProviderModel AURA2MARS_EN = + new DeepgramSpeakProviderModel(Value.AURA2MARS_EN, "aura-2-mars-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ALVARO_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); + public static final DeepgramSpeakProviderModel AURA2AMALTHEA_EN = + new DeepgramSpeakProviderModel(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_ATHENA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_ATHENA_EN, "aura-athena-en"); + public static final DeepgramSpeakProviderModel AURA_HERA_EN = + new DeepgramSpeakProviderModel(Value.AURA_HERA_EN, "aura-hera-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_PERSEUS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_PERSEUS_EN, "aura-perseus-en"); + public static final DeepgramSpeakProviderModel AURA2SELENE_EN = + new DeepgramSpeakProviderModel(Value.AURA2SELENE_EN, "aura-2-selene-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ODYSSEUS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); + public static final DeepgramSpeakProviderModel AURA2ARIES_EN = + new DeepgramSpeakProviderModel(Value.AURA2ARIES_EN, "aura-2-aries-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2PANDORA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); + public static final DeepgramSpeakProviderModel AURA2JUNO_EN = + new DeepgramSpeakProviderModel(Value.AURA2JUNO_EN, "aura-2-juno-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ZEUS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); + public static final DeepgramSpeakProviderModel AURA2LUNA_EN = + new DeepgramSpeakProviderModel(Value.AURA2LUNA_EN, "aura-2-luna-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ELECTRA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); + public static final DeepgramSpeakProviderModel AURA2JAVIER_ES = + new DeepgramSpeakProviderModel(Value.AURA2JAVIER_ES, "aura-2-javier-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ORPHEUS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); + public static final DeepgramSpeakProviderModel AURA2PHOEBE_EN = + new DeepgramSpeakProviderModel(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2THALIA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2THALIA_EN, "aura-2-thalia-en"); + public static final DeepgramSpeakProviderModel AURA2DIANA_ES = + new DeepgramSpeakProviderModel(Value.AURA2DIANA_ES, "aura-2-diana-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2CELESTE_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); + public static final DeepgramSpeakProviderModel AURA_ORION_EN = + new DeepgramSpeakProviderModel(Value.AURA_ORION_EN, "aura-orion-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_ASTERIA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_ASTERIA_EN, "aura-asteria-en"); + public static final DeepgramSpeakProviderModel AURA2ANDROMEDA_EN = + new DeepgramSpeakProviderModel(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ESTRELLA_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); + public static final DeepgramSpeakProviderModel AURA2ATHENA_EN = + new DeepgramSpeakProviderModel(Value.AURA2ATHENA_EN, "aura-2-athena-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2HERA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2HERA_EN, "aura-2-hera-en"); + public static final DeepgramSpeakProviderModel AURA2SATURN_EN = + new DeepgramSpeakProviderModel(Value.AURA2SATURN_EN, "aura-2-saturn-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2MARS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2MARS_EN, "aura-2-mars-en"); + public static final DeepgramSpeakProviderModel AURA_ARCAS_EN = + new DeepgramSpeakProviderModel(Value.AURA_ARCAS_EN, "aura-arcas-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2SIRIO_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); + public static final DeepgramSpeakProviderModel AURA2THEIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2THEIA_EN, "aura-2-theia-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ASTERIA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); + public static final DeepgramSpeakProviderModel AURA2IRIS_EN = + new DeepgramSpeakProviderModel(Value.AURA2IRIS_EN, "aura-2-iris-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2HERMES_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2HERMES_EN, "aura-2-hermes-en"); + public static final DeepgramSpeakProviderModel AURA_ANGUS_EN = + new DeepgramSpeakProviderModel(Value.AURA_ANGUS_EN, "aura-angus-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2VESTA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2VESTA_EN, "aura-2-vesta-en"); + public static final DeepgramSpeakProviderModel AURA2JUPITER_EN = + new DeepgramSpeakProviderModel(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2CARINA_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2CARINA_ES, "aura-2-carina-es"); + public static final DeepgramSpeakProviderModel AURA2AQUILA_ES = + new DeepgramSpeakProviderModel(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2CALLISTA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); + public static final DeepgramSpeakProviderModel AURA2CORA_EN = + new DeepgramSpeakProviderModel(Value.AURA2CORA_EN, "aura-2-cora-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2HARMONIA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); + public static final DeepgramSpeakProviderModel AURA2CORDELIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2SELENA_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2SELENA_ES, "aura-2-selena-es"); + public static final DeepgramSpeakProviderModel AURA2ATLAS_EN = + new DeepgramSpeakProviderModel(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2AURORA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2AURORA_EN, "aura-2-aurora-en"); + public static final DeepgramSpeakProviderModel AURA2HELENA_EN = + new DeepgramSpeakProviderModel(Value.AURA2HELENA_EN, "aura-2-helena-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_ZEUS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_ZEUS_EN, "aura-zeus-en"); + public static final DeepgramSpeakProviderModel AURA_STELLA_EN = + new DeepgramSpeakProviderModel(Value.AURA_STELLA_EN, "aura-stella-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2OPHELIA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); + public static final DeepgramSpeakProviderModel AURA2DRACO_EN = + new DeepgramSpeakProviderModel(Value.AURA2DRACO_EN, "aura-2-draco-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2AMALTHEA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); + public static final DeepgramSpeakProviderModel AURA2HYPERION_EN = + new DeepgramSpeakProviderModel(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_ORPHEUS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); + public static final DeepgramSpeakProviderModel AURA2CELESTE_ES = + new DeepgramSpeakProviderModel(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2DELIA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2DELIA_EN, "aura-2-delia-en"); + public static final DeepgramSpeakProviderModel AURA_HELIOS_EN = + new DeepgramSpeakProviderModel(Value.AURA_HELIOS_EN, "aura-helios-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_LUNA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_LUNA_EN, "aura-luna-en"); + public static final DeepgramSpeakProviderModel AURA2PLUTO_EN = + new DeepgramSpeakProviderModel(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2APOLLO_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); + public static final DeepgramSpeakProviderModel AURA2JANUS_EN = + new DeepgramSpeakProviderModel(Value.AURA2JANUS_EN, "aura-2-janus-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2SELENE_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2SELENE_EN, "aura-2-selene-en"); + public static final DeepgramSpeakProviderModel AURA2NESTOR_ES = + new DeepgramSpeakProviderModel(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2THEIA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2THEIA_EN, "aura-2-theia-en"); + public static final DeepgramSpeakProviderModel AURA2ARCAS_EN = + new DeepgramSpeakProviderModel(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_HERA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_HERA_EN, "aura-hera-en"); + public static final DeepgramSpeakProviderModel AURA2ORION_EN = + new DeepgramSpeakProviderModel(Value.AURA2ORION_EN, "aura-2-orion-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2CORDELIA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); + public static final DeepgramSpeakProviderModel AURA_ATHENA_EN = + new DeepgramSpeakProviderModel(Value.AURA_ATHENA_EN, "aura-athena-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ANDROMEDA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); + public static final DeepgramSpeakProviderModel AURA2ODYSSEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ARIES_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ARIES_EN, "aura-2-aries-en"); + public static final DeepgramSpeakProviderModel AURA2PANDORA_EN = + new DeepgramSpeakProviderModel(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2JUNO_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2JUNO_EN, "aura-2-juno-en"); + public static final DeepgramSpeakProviderModel AURA2MINERVA_EN = + new DeepgramSpeakProviderModel(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2LUNA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2LUNA_EN, "aura-2-luna-en"); + public static final DeepgramSpeakProviderModel AURA2ALVARO_ES = + new DeepgramSpeakProviderModel(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2DIANA_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2DIANA_ES, "aura-2-diana-es"); + public static final DeepgramSpeakProviderModel AURA_PERSEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA_PERSEUS_EN, "aura-perseus-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2JAVIER_ES = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2JAVIER_ES, "aura-2-javier-es"); + public static final DeepgramSpeakProviderModel AURA2VESTA_EN = + new DeepgramSpeakProviderModel(Value.AURA2VESTA_EN, "aura-2-vesta-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_ORION_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_ORION_EN, "aura-orion-en"); + public static final DeepgramSpeakProviderModel AURA_ASTERIA_EN = + new DeepgramSpeakProviderModel(Value.AURA_ASTERIA_EN, "aura-asteria-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA_ARCAS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA_ARCAS_EN, "aura-arcas-en"); + public static final DeepgramSpeakProviderModel AURA2ZEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2IRIS_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2IRIS_EN, "aura-2-iris-en"); + public static final DeepgramSpeakProviderModel AURA2ELECTRA_EN = + new DeepgramSpeakProviderModel(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2ATHENA_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2ATHENA_EN, "aura-2-athena-en"); + public static final DeepgramSpeakProviderModel AURA2ORPHEUS_EN = + new DeepgramSpeakProviderModel(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2SATURN_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2SATURN_EN, "aura-2-saturn-en"); + public static final DeepgramSpeakProviderModel AURA2ESTRELLA_ES = + new DeepgramSpeakProviderModel(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel AURA2PHOEBE_EN = - new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); + public static final DeepgramSpeakProviderModel AURA2THALIA_EN = + new DeepgramSpeakProviderModel(Value.AURA2THALIA_EN, "aura-2-thalia-en"); private final Value value; private final String string; - AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value value, String string) { + DeepgramSpeakProviderModel(Value value, String string) { this.value = value; this.string = string; } @@ -218,8 +218,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel - && this.string.equals(((AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel) other).string)); + || (other instanceof DeepgramSpeakProviderModel + && this.string.equals(((DeepgramSpeakProviderModel) other).string)); } @java.lang.Override @@ -229,132 +229,132 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case AURA_ANGUS_EN: - return visitor.visitAuraAngusEn(); - case AURA2JUPITER_EN: - return visitor.visitAura2JupiterEn(); - case AURA2CORA_EN: - return visitor.visitAura2CoraEn(); - case AURA_STELLA_EN: - return visitor.visitAuraStellaEn(); - case AURA2HELENA_EN: - return visitor.visitAura2HelenaEn(); - case AURA2AQUILA_ES: - return visitor.visitAura2AquilaEs(); - case AURA2ATLAS_EN: - return visitor.visitAura2AtlasEn(); - case AURA2ORION_EN: - return visitor.visitAura2OrionEn(); - case AURA2DRACO_EN: - return visitor.visitAura2DracoEn(); - case AURA2HYPERION_EN: - return visitor.visitAura2HyperionEn(); - case AURA2JANUS_EN: - return visitor.visitAura2JanusEn(); - case AURA_HELIOS_EN: - return visitor.visitAuraHeliosEn(); - case AURA2PLUTO_EN: - return visitor.visitAura2PlutoEn(); - case AURA2ARCAS_EN: - return visitor.visitAura2ArcasEn(); - case AURA2NESTOR_ES: - return visitor.visitAura2NestorEs(); - case AURA2NEPTUNE_EN: - return visitor.visitAura2NeptuneEn(); - case AURA2MINERVA_EN: - return visitor.visitAura2MinervaEn(); - case AURA2ALVARO_ES: - return visitor.visitAura2AlvaroEs(); - case AURA_ATHENA_EN: - return visitor.visitAuraAthenaEn(); - case AURA_PERSEUS_EN: - return visitor.visitAuraPerseusEn(); - case AURA2ODYSSEUS_EN: - return visitor.visitAura2OdysseusEn(); - case AURA2PANDORA_EN: - return visitor.visitAura2PandoraEn(); - case AURA2ZEUS_EN: - return visitor.visitAura2ZeusEn(); - case AURA2ELECTRA_EN: - return visitor.visitAura2ElectraEn(); - case AURA2ORPHEUS_EN: - return visitor.visitAura2OrpheusEn(); - case AURA2THALIA_EN: - return visitor.visitAura2ThaliaEn(); - case AURA2CELESTE_ES: - return visitor.visitAura2CelesteEs(); - case AURA_ASTERIA_EN: - return visitor.visitAuraAsteriaEn(); - case AURA2ESTRELLA_ES: - return visitor.visitAura2EstrellaEs(); - case AURA2HERA_EN: - return visitor.visitAura2HeraEn(); - case AURA2MARS_EN: - return visitor.visitAura2MarsEn(); case AURA2SIRIO_ES: return visitor.visitAura2SirioEs(); + case AURA2HERA_EN: + return visitor.visitAura2HeraEn(); case AURA2ASTERIA_EN: return visitor.visitAura2AsteriaEn(); - case AURA2HERMES_EN: - return visitor.visitAura2HermesEn(); - case AURA2VESTA_EN: - return visitor.visitAura2VestaEn(); - case AURA2CARINA_ES: - return visitor.visitAura2CarinaEs(); - case AURA2CALLISTA_EN: - return visitor.visitAura2CallistaEn(); case AURA2HARMONIA_EN: return visitor.visitAura2HarmoniaEn(); + case AURA2CARINA_ES: + return visitor.visitAura2CarinaEs(); + case AURA_ZEUS_EN: + return visitor.visitAuraZeusEn(); + case AURA2HERMES_EN: + return visitor.visitAura2HermesEn(); case AURA2SELENA_ES: return visitor.visitAura2SelenaEs(); + case AURA2NEPTUNE_EN: + return visitor.visitAura2NeptuneEn(); + case AURA2CALLISTA_EN: + return visitor.visitAura2CallistaEn(); case AURA2AURORA_EN: return visitor.visitAura2AuroraEn(); - case AURA_ZEUS_EN: - return visitor.visitAuraZeusEn(); case AURA2OPHELIA_EN: return visitor.visitAura2OpheliaEn(); - case AURA2AMALTHEA_EN: - return visitor.visitAura2AmaltheaEn(); + case AURA2APOLLO_EN: + return visitor.visitAura2ApolloEn(); + case AURA_LUNA_EN: + return visitor.visitAuraLunaEn(); case AURA_ORPHEUS_EN: return visitor.visitAuraOrpheusEn(); case AURA2DELIA_EN: return visitor.visitAura2DeliaEn(); - case AURA_LUNA_EN: - return visitor.visitAuraLunaEn(); - case AURA2APOLLO_EN: - return visitor.visitAura2ApolloEn(); - case AURA2SELENE_EN: - return visitor.visitAura2SeleneEn(); - case AURA2THEIA_EN: - return visitor.visitAura2TheiaEn(); + case AURA2MARS_EN: + return visitor.visitAura2MarsEn(); + case AURA2AMALTHEA_EN: + return visitor.visitAura2AmaltheaEn(); case AURA_HERA_EN: return visitor.visitAuraHeraEn(); - case AURA2CORDELIA_EN: - return visitor.visitAura2CordeliaEn(); - case AURA2ANDROMEDA_EN: - return visitor.visitAura2AndromedaEn(); + case AURA2SELENE_EN: + return visitor.visitAura2SeleneEn(); case AURA2ARIES_EN: return visitor.visitAura2AriesEn(); case AURA2JUNO_EN: return visitor.visitAura2JunoEn(); case AURA2LUNA_EN: return visitor.visitAura2LunaEn(); - case AURA2DIANA_ES: - return visitor.visitAura2DianaEs(); case AURA2JAVIER_ES: return visitor.visitAura2JavierEs(); + case AURA2PHOEBE_EN: + return visitor.visitAura2PhoebeEn(); + case AURA2DIANA_ES: + return visitor.visitAura2DianaEs(); case AURA_ORION_EN: return visitor.visitAuraOrionEn(); - case AURA_ARCAS_EN: - return visitor.visitAuraArcasEn(); - case AURA2IRIS_EN: - return visitor.visitAura2IrisEn(); + case AURA2ANDROMEDA_EN: + return visitor.visitAura2AndromedaEn(); case AURA2ATHENA_EN: return visitor.visitAura2AthenaEn(); case AURA2SATURN_EN: return visitor.visitAura2SaturnEn(); - case AURA2PHOEBE_EN: - return visitor.visitAura2PhoebeEn(); + case AURA_ARCAS_EN: + return visitor.visitAuraArcasEn(); + case AURA2THEIA_EN: + return visitor.visitAura2TheiaEn(); + case AURA2IRIS_EN: + return visitor.visitAura2IrisEn(); + case AURA_ANGUS_EN: + return visitor.visitAuraAngusEn(); + case AURA2JUPITER_EN: + return visitor.visitAura2JupiterEn(); + case AURA2AQUILA_ES: + return visitor.visitAura2AquilaEs(); + case AURA2CORA_EN: + return visitor.visitAura2CoraEn(); + case AURA2CORDELIA_EN: + return visitor.visitAura2CordeliaEn(); + case AURA2ATLAS_EN: + return visitor.visitAura2AtlasEn(); + case AURA2HELENA_EN: + return visitor.visitAura2HelenaEn(); + case AURA_STELLA_EN: + return visitor.visitAuraStellaEn(); + case AURA2DRACO_EN: + return visitor.visitAura2DracoEn(); + case AURA2HYPERION_EN: + return visitor.visitAura2HyperionEn(); + case AURA2CELESTE_ES: + return visitor.visitAura2CelesteEs(); + case AURA_HELIOS_EN: + return visitor.visitAuraHeliosEn(); + case AURA2PLUTO_EN: + return visitor.visitAura2PlutoEn(); + case AURA2JANUS_EN: + return visitor.visitAura2JanusEn(); + case AURA2NESTOR_ES: + return visitor.visitAura2NestorEs(); + case AURA2ARCAS_EN: + return visitor.visitAura2ArcasEn(); + case AURA2ORION_EN: + return visitor.visitAura2OrionEn(); + case AURA_ATHENA_EN: + return visitor.visitAuraAthenaEn(); + case AURA2ODYSSEUS_EN: + return visitor.visitAura2OdysseusEn(); + case AURA2PANDORA_EN: + return visitor.visitAura2PandoraEn(); + case AURA2MINERVA_EN: + return visitor.visitAura2MinervaEn(); + case AURA2ALVARO_ES: + return visitor.visitAura2AlvaroEs(); + case AURA_PERSEUS_EN: + return visitor.visitAuraPerseusEn(); + case AURA2VESTA_EN: + return visitor.visitAura2VestaEn(); + case AURA_ASTERIA_EN: + return visitor.visitAuraAsteriaEn(); + case AURA2ZEUS_EN: + return visitor.visitAura2ZeusEn(); + case AURA2ELECTRA_EN: + return visitor.visitAura2ElectraEn(); + case AURA2ORPHEUS_EN: + return visitor.visitAura2OrpheusEn(); + case AURA2ESTRELLA_ES: + return visitor.visitAura2EstrellaEs(); + case AURA2THALIA_EN: + return visitor.visitAura2ThaliaEn(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -362,136 +362,136 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel valueOf(String value) { + public static DeepgramSpeakProviderModel valueOf(String value) { switch (value) { - case "aura-angus-en": - return AURA_ANGUS_EN; - case "aura-2-jupiter-en": - return AURA2JUPITER_EN; - case "aura-2-cora-en": - return AURA2CORA_EN; - case "aura-stella-en": - return AURA_STELLA_EN; - case "aura-2-helena-en": - return AURA2HELENA_EN; - case "aura-2-aquila-es": - return AURA2AQUILA_ES; - case "aura-2-atlas-en": - return AURA2ATLAS_EN; - case "aura-2-orion-en": - return AURA2ORION_EN; - case "aura-2-draco-en": - return AURA2DRACO_EN; - case "aura-2-hyperion-en": - return AURA2HYPERION_EN; - case "aura-2-janus-en": - return AURA2JANUS_EN; - case "aura-helios-en": - return AURA_HELIOS_EN; - case "aura-2-pluto-en": - return AURA2PLUTO_EN; - case "aura-2-arcas-en": - return AURA2ARCAS_EN; - case "aura-2-nestor-es": - return AURA2NESTOR_ES; - case "aura-2-neptune-en": - return AURA2NEPTUNE_EN; - case "aura-2-minerva-en": - return AURA2MINERVA_EN; - case "aura-2-alvaro-es": - return AURA2ALVARO_ES; - case "aura-athena-en": - return AURA_ATHENA_EN; - case "aura-perseus-en": - return AURA_PERSEUS_EN; - case "aura-2-odysseus-en": - return AURA2ODYSSEUS_EN; - case "aura-2-pandora-en": - return AURA2PANDORA_EN; - case "aura-2-zeus-en": - return AURA2ZEUS_EN; - case "aura-2-electra-en": - return AURA2ELECTRA_EN; - case "aura-2-orpheus-en": - return AURA2ORPHEUS_EN; - case "aura-2-thalia-en": - return AURA2THALIA_EN; - case "aura-2-celeste-es": - return AURA2CELESTE_ES; - case "aura-asteria-en": - return AURA_ASTERIA_EN; - case "aura-2-estrella-es": - return AURA2ESTRELLA_ES; - case "aura-2-hera-en": - return AURA2HERA_EN; - case "aura-2-mars-en": - return AURA2MARS_EN; case "aura-2-sirio-es": return AURA2SIRIO_ES; + case "aura-2-hera-en": + return AURA2HERA_EN; case "aura-2-asteria-en": return AURA2ASTERIA_EN; - case "aura-2-hermes-en": - return AURA2HERMES_EN; - case "aura-2-vesta-en": - return AURA2VESTA_EN; - case "aura-2-carina-es": - return AURA2CARINA_ES; - case "aura-2-callista-en": - return AURA2CALLISTA_EN; case "aura-2-harmonia-en": return AURA2HARMONIA_EN; + case "aura-2-carina-es": + return AURA2CARINA_ES; + case "aura-zeus-en": + return AURA_ZEUS_EN; + case "aura-2-hermes-en": + return AURA2HERMES_EN; case "aura-2-selena-es": return AURA2SELENA_ES; + case "aura-2-neptune-en": + return AURA2NEPTUNE_EN; + case "aura-2-callista-en": + return AURA2CALLISTA_EN; case "aura-2-aurora-en": return AURA2AURORA_EN; - case "aura-zeus-en": - return AURA_ZEUS_EN; case "aura-2-ophelia-en": return AURA2OPHELIA_EN; - case "aura-2-amalthea-en": - return AURA2AMALTHEA_EN; + case "aura-2-apollo-en": + return AURA2APOLLO_EN; + case "aura-luna-en": + return AURA_LUNA_EN; case "aura-orpheus-en": return AURA_ORPHEUS_EN; case "aura-2-delia-en": return AURA2DELIA_EN; - case "aura-luna-en": - return AURA_LUNA_EN; - case "aura-2-apollo-en": - return AURA2APOLLO_EN; - case "aura-2-selene-en": - return AURA2SELENE_EN; - case "aura-2-theia-en": - return AURA2THEIA_EN; + case "aura-2-mars-en": + return AURA2MARS_EN; + case "aura-2-amalthea-en": + return AURA2AMALTHEA_EN; case "aura-hera-en": return AURA_HERA_EN; - case "aura-2-cordelia-en": - return AURA2CORDELIA_EN; - case "aura-2-andromeda-en": - return AURA2ANDROMEDA_EN; + case "aura-2-selene-en": + return AURA2SELENE_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 "aura-2-diana-es": - return AURA2DIANA_ES; case "aura-2-javier-es": return AURA2JAVIER_ES; + case "aura-2-phoebe-en": + return AURA2PHOEBE_EN; + case "aura-2-diana-es": + return AURA2DIANA_ES; case "aura-orion-en": return AURA_ORION_EN; - case "aura-arcas-en": - return AURA_ARCAS_EN; - case "aura-2-iris-en": - return AURA2IRIS_EN; + case "aura-2-andromeda-en": + return AURA2ANDROMEDA_EN; case "aura-2-athena-en": return AURA2ATHENA_EN; case "aura-2-saturn-en": return AURA2SATURN_EN; - case "aura-2-phoebe-en": - return AURA2PHOEBE_EN; + case "aura-arcas-en": + return AURA_ARCAS_EN; + case "aura-2-theia-en": + return AURA2THEIA_EN; + case "aura-2-iris-en": + return AURA2IRIS_EN; + case "aura-angus-en": + return AURA_ANGUS_EN; + case "aura-2-jupiter-en": + return AURA2JUPITER_EN; + case "aura-2-aquila-es": + return AURA2AQUILA_ES; + case "aura-2-cora-en": + return AURA2CORA_EN; + case "aura-2-cordelia-en": + return AURA2CORDELIA_EN; + case "aura-2-atlas-en": + return AURA2ATLAS_EN; + case "aura-2-helena-en": + return AURA2HELENA_EN; + case "aura-stella-en": + return AURA_STELLA_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 "aura-helios-en": + return AURA_HELIOS_EN; + case "aura-2-pluto-en": + return AURA2PLUTO_EN; + case "aura-2-janus-en": + return AURA2JANUS_EN; + case "aura-2-nestor-es": + return AURA2NESTOR_ES; + case "aura-2-arcas-en": + return AURA2ARCAS_EN; + case "aura-2-orion-en": + return AURA2ORION_EN; + case "aura-athena-en": + return AURA_ATHENA_EN; + case "aura-2-odysseus-en": + return AURA2ODYSSEUS_EN; + case "aura-2-pandora-en": + return AURA2PANDORA_EN; + case "aura-2-minerva-en": + return AURA2MINERVA_EN; + case "aura-2-alvaro-es": + return AURA2ALVARO_ES; + case "aura-perseus-en": + return AURA_PERSEUS_EN; + case "aura-2-vesta-en": + return AURA2VESTA_EN; + case "aura-asteria-en": + return AURA_ASTERIA_EN; + case "aura-2-zeus-en": + return AURA2ZEUS_EN; + case "aura-2-electra-en": + return AURA2ELECTRA_EN; + case "aura-2-orpheus-en": + return AURA2ORPHEUS_EN; + case "aura-2-estrella-es": + return AURA2ESTRELLA_ES; + case "aura-2-thalia-en": + return AURA2THALIA_EN; default: - return new AgentV1UpdateSpeakSpeakOneItemProviderDeepgramModel(Value.UNKNOWN, value); + return new DeepgramSpeakProviderModel(Value.UNKNOWN, value); } } diff --git a/src/main/java/com/deepgram/types/ElevenLabsSpeakProvider.java b/src/main/java/com/deepgram/types/ElevenLabsSpeakProvider.java index 8dc5a3f..b530f1f 100644 --- a/src/main/java/com/deepgram/types/ElevenLabsSpeakProvider.java +++ b/src/main/java/com/deepgram/types/ElevenLabsSpeakProvider.java @@ -3,41 +3,265 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class ElevenLabsSpeakProvider implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ElevenLabsSpeakProvider.Builder.class) +public final class ElevenLabsSpeakProvider { + private final Optional version; - private ElevenLabsSpeakProvider(Object value) { - this.value = value; + private final ElevenLabsSpeakProviderModelId modelId; + + private final Optional language; + + private final Optional languageCode; + + private final Map additionalProperties; + + private ElevenLabsSpeakProvider( + Optional version, + ElevenLabsSpeakProviderModelId modelId, + Optional language, + Optional languageCode, + Map additionalProperties) { + this.version = version; + this.modelId = modelId; + this.language = language; + this.languageCode = languageCode; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "eleven_labs"; + } + + /** + * @return The REST API version for the ElevenLabs text-to-speech API + */ + @JsonProperty("version") + public Optional getVersion() { + return version; + } + + /** + * @return Eleven Labs model ID + */ + @JsonProperty("model_id") + public ElevenLabsSpeakProviderModelId getModelId() { + return modelId; + } + + /** + * @return Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API + */ + @JsonProperty("language") + public Optional getLanguage() { + return language; } - @JsonValue - public Object get() { - return this.value; + /** + * @return Use the language field instead. + */ + @JsonProperty("language_code") + public Optional getLanguageCode() { + return languageCode; } @java.lang.Override public boolean equals(Object other) { - return this == other - || (other instanceof ElevenLabsSpeakProvider - && this.value.equals(((ElevenLabsSpeakProvider) other).value)); + if (this == other) return true; + return other instanceof ElevenLabsSpeakProvider && equalTo((ElevenLabsSpeakProvider) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ElevenLabsSpeakProvider other) { + return version.equals(other.version) + && modelId.equals(other.modelId) + && language.equals(other.language) + && languageCode.equals(other.languageCode); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.version, this.modelId, this.language, this.languageCode); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); + } + + public static ModelIdStage builder() { + return new Builder(); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ElevenLabsSpeakProvider of(Object value) { - return new ElevenLabsSpeakProvider(value); + public interface ModelIdStage { + /** + *

Eleven Labs model ID

+ */ + _FinalStage modelId(@NotNull ElevenLabsSpeakProviderModelId modelId); + + Builder from(ElevenLabsSpeakProvider other); + } + + public interface _FinalStage { + ElevenLabsSpeakProvider build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

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

+ */ + _FinalStage version(Optional version); + + _FinalStage version(String version); + + /** + *

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

+ */ + _FinalStage language(Optional language); + + _FinalStage language(String language); + + /** + *

Use the language field instead.

+ */ + _FinalStage languageCode(Optional languageCode); + + _FinalStage languageCode(String languageCode); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelIdStage, _FinalStage { + private ElevenLabsSpeakProviderModelId modelId; + + private Optional languageCode = Optional.empty(); + + private Optional language = Optional.empty(); + + private Optional version = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ElevenLabsSpeakProvider other) { + version(other.getVersion()); + modelId(other.getModelId()); + language(other.getLanguage()); + languageCode(other.getLanguageCode()); + return this; + } + + /** + *

Eleven Labs model ID

+ *

Eleven Labs model ID

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("model_id") + public _FinalStage modelId(@NotNull ElevenLabsSpeakProviderModelId modelId) { + this.modelId = Objects.requireNonNull(modelId, "modelId must not be null"); + return this; + } + + /** + *

Use the language field instead.

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

Use the language field instead.

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

Optional language to use, e.g. 'en-US'. Corresponds to the language_code parameter in the ElevenLabs API

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

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

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

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

+ */ + @java.lang.Override + @JsonSetter(value = "version", nulls = Nulls.SKIP) + public _FinalStage version(Optional version) { + this.version = version; + return this; + } + + @java.lang.Override + public ElevenLabsSpeakProvider build() { + return new ElevenLabsSpeakProvider(version, modelId, language, languageCode, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId.java b/src/main/java/com/deepgram/types/ElevenLabsSpeakProviderModelId.java similarity index 57% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId.java rename to src/main/java/com/deepgram/types/ElevenLabsSpeakProviderModelId.java index 663f07e..5963f48 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId.java +++ b/src/main/java/com/deepgram/types/ElevenLabsSpeakProviderModelId.java @@ -1,28 +1,26 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId { - public static final AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId ELEVEN_TURBO_V25 = - new AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId(Value.ELEVEN_TURBO_V25, "eleven_turbo_v2_5"); +public final class ElevenLabsSpeakProviderModelId { + public static final ElevenLabsSpeakProviderModelId ELEVEN_TURBO_V25 = + new ElevenLabsSpeakProviderModelId(Value.ELEVEN_TURBO_V25, "eleven_turbo_v2_5"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId ELEVEN_MONOLINGUAL_V1 = - new AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId( - Value.ELEVEN_MONOLINGUAL_V1, "eleven_monolingual_v1"); + public static final ElevenLabsSpeakProviderModelId ELEVEN_MONOLINGUAL_V1 = + new ElevenLabsSpeakProviderModelId(Value.ELEVEN_MONOLINGUAL_V1, "eleven_monolingual_v1"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId ELEVEN_MULTILINGUAL_V2 = - new AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId( - Value.ELEVEN_MULTILINGUAL_V2, "eleven_multilingual_v2"); + public static final ElevenLabsSpeakProviderModelId ELEVEN_MULTILINGUAL_V2 = + new ElevenLabsSpeakProviderModelId(Value.ELEVEN_MULTILINGUAL_V2, "eleven_multilingual_v2"); private final Value value; private final String string; - AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId(Value value, String string) { + ElevenLabsSpeakProviderModelId(Value value, String string) { this.value = value; this.string = string; } @@ -40,9 +38,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId - && this.string.equals( - ((AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId) other).string)); + || (other instanceof ElevenLabsSpeakProviderModelId + && this.string.equals(((ElevenLabsSpeakProviderModelId) other).string)); } @java.lang.Override @@ -65,7 +62,7 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId valueOf(String value) { + public static ElevenLabsSpeakProviderModelId valueOf(String value) { switch (value) { case "eleven_turbo_v2_5": return ELEVEN_TURBO_V25; @@ -74,7 +71,7 @@ public static AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId valueOf(St case "eleven_multilingual_v2": return ELEVEN_MULTILINGUAL_V2; default: - return new AgentV1UpdateSpeakSpeakOneItemProviderElevenLabsModelId(Value.UNKNOWN, value); + return new ElevenLabsSpeakProviderModelId(Value.UNKNOWN, value); } } diff --git a/src/main/java/com/deepgram/types/Google.java b/src/main/java/com/deepgram/types/Google.java index 234e8bf..fb6b2ef 100644 --- a/src/main/java/com/deepgram/types/Google.java +++ b/src/main/java/com/deepgram/types/Google.java @@ -3,39 +3,220 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class Google implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Google.Builder.class) +public final class Google { + private final Optional version; - private Google(Object value) { - this.value = value; + private final GoogleThinkProviderModel model; + + private final Optional temperature; + + private final Map additionalProperties; + + private Google( + Optional version, + GoogleThinkProviderModel model, + Optional temperature, + Map additionalProperties) { + this.version = version; + this.model = model; + this.temperature = temperature; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "google"; } - @JsonValue - public Object get() { - return this.value; + /** + * @return The REST API version for the Google generative language API + */ + @JsonProperty("version") + public Optional getVersion() { + return version; + } + + /** + * @return Google model to use + */ + @JsonProperty("model") + public GoogleThinkProviderModel getModel() { + return model; + } + + /** + * @return Google temperature (0-2) + */ + @JsonProperty("temperature") + public Optional getTemperature() { + return temperature; } @java.lang.Override public boolean equals(Object other) { - return this == other || (other instanceof Google && this.value.equals(((Google) other).value)); + if (this == other) return true; + return other instanceof Google && equalTo((Google) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Google other) { + return version.equals(other.version) && model.equals(other.model) && temperature.equals(other.temperature); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.version, this.model, this.temperature); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); + } + + public static ModelStage builder() { + return new Builder(); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static Google of(Object value) { - return new Google(value); + public interface ModelStage { + /** + *

Google model to use

+ */ + _FinalStage model(@NotNull GoogleThinkProviderModel model); + + Builder from(Google other); + } + + public interface _FinalStage { + Google build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The REST API version for the Google generative language API

+ */ + _FinalStage version(Optional version); + + _FinalStage version(String version); + + /** + *

Google temperature (0-2)

+ */ + _FinalStage temperature(Optional temperature); + + _FinalStage temperature(Double temperature); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelStage, _FinalStage { + private GoogleThinkProviderModel model; + + private Optional temperature = Optional.empty(); + + private Optional version = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Google other) { + version(other.getVersion()); + model(other.getModel()); + temperature(other.getTemperature()); + return this; + } + + /** + *

Google model to use

+ *

Google model to use

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

Google temperature (0-2)

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

Google temperature (0-2)

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

The REST API version for the Google generative language API

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

The REST API version for the Google generative language API

+ */ + @java.lang.Override + @JsonSetter(value = "version", nulls = Nulls.SKIP) + public _FinalStage version(Optional version) { + this.version = version; + return this; + } + + @java.lang.Override + public Google build() { + return new Google(version, model, temperature, 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/GoogleThinkProviderModel.java b/src/main/java/com/deepgram/types/GoogleThinkProviderModel.java new file mode 100644 index 0000000..c7d3a5e --- /dev/null +++ b/src/main/java/com/deepgram/types/GoogleThinkProviderModel.java @@ -0,0 +1,97 @@ +/** + * 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 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 GEMINI20FLASH = + new GoogleThinkProviderModel(Value.GEMINI20FLASH, "gemini-2.0-flash"); + + private final Value value; + + private final String string; + + GoogleThinkProviderModel(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 GoogleThinkProviderModel + && this.string.equals(((GoogleThinkProviderModel) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GEMINI20FLASH_LITE: + return visitor.visitGemini20FlashLite(); + case GEMINI25FLASH: + return visitor.visitGemini25Flash(); + case GEMINI20FLASH: + return visitor.visitGemini20Flash(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static GoogleThinkProviderModel valueOf(String value) { + switch (value) { + case "gemini-2.0-flash-lite": + return GEMINI20FLASH_LITE; + case "gemini-2.5-flash": + return GEMINI25FLASH; + case "gemini-2.0-flash": + return GEMINI20FLASH; + default: + return new GoogleThinkProviderModel(Value.UNKNOWN, value); + } + } + + public enum Value { + GEMINI20FLASH, + + GEMINI20FLASH_LITE, + + GEMINI25FLASH, + + UNKNOWN + } + + public interface Visitor { + T visitGemini20Flash(); + + T visitGemini20FlashLite(); + + T visitGemini25Flash(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/deepgram/types/Groq.java b/src/main/java/com/deepgram/types/Groq.java index 065c34a..769e32e 100644 --- a/src/main/java/com/deepgram/types/Groq.java +++ b/src/main/java/com/deepgram/types/Groq.java @@ -3,39 +3,150 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class Groq implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Groq.Builder.class) +public final class Groq { + private final Optional version; - private Groq(Object value) { - this.value = value; + private final Optional temperature; + + private final Map additionalProperties; + + private Groq(Optional version, Optional temperature, Map additionalProperties) { + this.version = version; + this.temperature = temperature; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "groq"; } - @JsonValue - public Object get() { - return this.value; + /** + * @return The REST API version for the Groq's chat completions API (mostly OpenAI-compatible) + */ + @JsonProperty("version") + public Optional getVersion() { + return version; + } + + /** + * @return Groq model to use + */ + @JsonProperty("model") + public String getModel() { + return "openai/gpt-oss-20b"; + } + + /** + * @return Groq temperature (0-2) + */ + @JsonProperty("temperature") + public Optional getTemperature() { + return temperature; } @java.lang.Override public boolean equals(Object other) { - return this == other || (other instanceof Groq && this.value.equals(((Groq) other).value)); + if (this == other) return true; + return other instanceof Groq && equalTo((Groq) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Groq other) { + return version.equals(other.version) && temperature.equals(other.temperature); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.version, this.temperature); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static Groq of(Object value) { - return new Groq(value); + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional version = Optional.empty(); + + private Optional temperature = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(Groq other) { + version(other.getVersion()); + temperature(other.getTemperature()); + return this; + } + + /** + *

The REST API version for the Groq's chat completions API (mostly OpenAI-compatible)

+ */ + @JsonSetter(value = "version", nulls = Nulls.SKIP) + public Builder version(Optional version) { + this.version = version; + return this; + } + + public Builder version(String version) { + this.version = Optional.ofNullable(version); + return this; + } + + /** + *

Groq temperature (0-2)

+ */ + @JsonSetter(value = "temperature", nulls = Nulls.SKIP) + public Builder temperature(Optional temperature) { + this.temperature = temperature; + return this; + } + + public Builder temperature(Double temperature) { + this.temperature = Optional.ofNullable(temperature); + return this; + } + + public Groq build() { + return new Groq(version, temperature, 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/types/ListAgentConfigurationsV1Response.java b/src/main/java/com/deepgram/types/ListAgentConfigurationsV1Response.java new file mode 100644 index 0000000..8ddf120 --- /dev/null +++ b/src/main/java/com/deepgram/types/ListAgentConfigurationsV1Response.java @@ -0,0 +1,113 @@ +/** + * 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.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListAgentConfigurationsV1Response.Builder.class) +public final class ListAgentConfigurationsV1Response { + private final Optional> agents; + + private final Map additionalProperties; + + private ListAgentConfigurationsV1Response( + Optional> agents, Map additionalProperties) { + this.agents = agents; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of agent configurations for the project + */ + @JsonProperty("agents") + public Optional> getAgents() { + return agents; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListAgentConfigurationsV1Response && equalTo((ListAgentConfigurationsV1Response) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListAgentConfigurationsV1Response other) { + return agents.equals(other.agents); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.agents); + } + + @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 { + private Optional> agents = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListAgentConfigurationsV1Response other) { + agents(other.getAgents()); + return this; + } + + /** + *

A list of agent configurations for the project

+ */ + @JsonSetter(value = "agents", nulls = Nulls.SKIP) + public Builder agents(Optional> agents) { + this.agents = agents; + return this; + } + + public Builder agents(List agents) { + this.agents = Optional.ofNullable(agents); + return this; + } + + public ListAgentConfigurationsV1Response build() { + return new ListAgentConfigurationsV1Response(agents, 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/types/ListAgentVariablesV1Response.java b/src/main/java/com/deepgram/types/ListAgentVariablesV1Response.java new file mode 100644 index 0000000..1a74579 --- /dev/null +++ b/src/main/java/com/deepgram/types/ListAgentVariablesV1Response.java @@ -0,0 +1,113 @@ +/** + * 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.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ListAgentVariablesV1Response.Builder.class) +public final class ListAgentVariablesV1Response { + private final Optional> variables; + + private final Map additionalProperties; + + private ListAgentVariablesV1Response( + Optional> variables, Map additionalProperties) { + this.variables = variables; + this.additionalProperties = additionalProperties; + } + + /** + * @return A list of agent variables for the project + */ + @JsonProperty("variables") + public Optional> getVariables() { + return variables; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ListAgentVariablesV1Response && equalTo((ListAgentVariablesV1Response) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ListAgentVariablesV1Response other) { + return variables.equals(other.variables); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.variables); + } + + @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 { + private Optional> variables = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ListAgentVariablesV1Response other) { + variables(other.getVariables()); + return this; + } + + /** + *

A list of agent variables for the project

+ */ + @JsonSetter(value = "variables", nulls = Nulls.SKIP) + public Builder variables(Optional> variables) { + this.variables = variables; + return this; + } + + public Builder variables(List variables) { + this.variables = Optional.ofNullable(variables); + return this; + } + + public ListAgentVariablesV1Response build() { + return new ListAgentVariablesV1Response(variables, 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/types/ListBillingFieldsV1ResponseDeploymentsItem.java b/src/main/java/com/deepgram/types/ListBillingFieldsV1ResponseDeploymentsItem.java index a8f60ab..b68bde2 100644 --- a/src/main/java/com/deepgram/types/ListBillingFieldsV1ResponseDeploymentsItem.java +++ b/src/main/java/com/deepgram/types/ListBillingFieldsV1ResponseDeploymentsItem.java @@ -13,12 +13,12 @@ public final class ListBillingFieldsV1ResponseDeploymentsItem { public static final ListBillingFieldsV1ResponseDeploymentsItem BETA = new ListBillingFieldsV1ResponseDeploymentsItem(Value.BETA, "beta"); - public static final ListBillingFieldsV1ResponseDeploymentsItem HOSTED = - new ListBillingFieldsV1ResponseDeploymentsItem(Value.HOSTED, "hosted"); - public static final ListBillingFieldsV1ResponseDeploymentsItem DEDICATED = new ListBillingFieldsV1ResponseDeploymentsItem(Value.DEDICATED, "dedicated"); + public static final ListBillingFieldsV1ResponseDeploymentsItem HOSTED = + new ListBillingFieldsV1ResponseDeploymentsItem(Value.HOSTED, "hosted"); + private final Value value; private final String string; @@ -56,10 +56,10 @@ public T visit(Visitor visitor) { return visitor.visitSelfHosted(); case BETA: return visitor.visitBeta(); - case HOSTED: - return visitor.visitHosted(); case DEDICATED: return visitor.visitDedicated(); + case HOSTED: + return visitor.visitHosted(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -73,10 +73,10 @@ public static ListBillingFieldsV1ResponseDeploymentsItem valueOf(String value) { return SELF_HOSTED; case "beta": return BETA; - case "hosted": - return HOSTED; case "dedicated": return DEDICATED; + case "hosted": + return HOSTED; default: return new ListBillingFieldsV1ResponseDeploymentsItem(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/types/ListenV1CallbackMethod.java b/src/main/java/com/deepgram/types/ListenV1CallbackMethod.java index ca0488d..63ded3e 100644 --- a/src/main/java/com/deepgram/types/ListenV1CallbackMethod.java +++ b/src/main/java/com/deepgram/types/ListenV1CallbackMethod.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ListenV1CallbackMethod { - public static final ListenV1CallbackMethod DELETE = new ListenV1CallbackMethod(Value.DELETE, "DELETE"); - public static final ListenV1CallbackMethod GET = new ListenV1CallbackMethod(Value.GET, "GET"); public static final ListenV1CallbackMethod PUT = new ListenV1CallbackMethod(Value.PUT, "PUT"); + public static final ListenV1CallbackMethod DELETE = new ListenV1CallbackMethod(Value.DELETE, "DELETE"); + public static final ListenV1CallbackMethod POST = new ListenV1CallbackMethod(Value.POST, "POST"); private final Value value; @@ -48,12 +48,12 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case DELETE: - return visitor.visitDelete(); case GET: return visitor.visitGet(); case PUT: return visitor.visitPut(); + case DELETE: + return visitor.visitDelete(); case POST: return visitor.visitPost(); case UNKNOWN: @@ -65,12 +65,12 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ListenV1CallbackMethod valueOf(String value) { switch (value) { - case "DELETE": - return DELETE; case "GET": return GET; case "PUT": return PUT; + case "DELETE": + return DELETE; case "POST": return POST; default: diff --git a/src/main/java/com/deepgram/types/ListenV1Encoding.java b/src/main/java/com/deepgram/types/ListenV1Encoding.java index 3562611..cb8e263 100644 --- a/src/main/java/com/deepgram/types/ListenV1Encoding.java +++ b/src/main/java/com/deepgram/types/ListenV1Encoding.java @@ -13,10 +13,10 @@ public final class ListenV1Encoding { public static final ListenV1Encoding LINEAR32 = new ListenV1Encoding(Value.LINEAR32, "linear32"); - public static final ListenV1Encoding OGG_OPUS = new ListenV1Encoding(Value.OGG_OPUS, "ogg-opus"); - public static final ListenV1Encoding FLAC = new ListenV1Encoding(Value.FLAC, "flac"); + public static final ListenV1Encoding OGG_OPUS = new ListenV1Encoding(Value.OGG_OPUS, "ogg-opus"); + public static final ListenV1Encoding SPEEX = new ListenV1Encoding(Value.SPEEX, "speex"); public static final ListenV1Encoding LINEAR16 = new ListenV1Encoding(Value.LINEAR16, "linear16"); @@ -67,10 +67,10 @@ public T visit(Visitor visitor) { return visitor.visitAmrWb(); case LINEAR32: return visitor.visitLinear32(); - case OGG_OPUS: - return visitor.visitOggOpus(); case FLAC: return visitor.visitFlac(); + case OGG_OPUS: + return visitor.visitOggOpus(); case SPEEX: return visitor.visitSpeex(); case LINEAR16: @@ -98,10 +98,10 @@ public static ListenV1Encoding valueOf(String value) { return AMR_WB; case "linear32": return LINEAR32; - case "ogg-opus": - return OGG_OPUS; case "flac": return FLAC; + case "ogg-opus": + return OGG_OPUS; case "speex": return SPEEX; case "linear16": diff --git a/src/main/java/com/deepgram/types/ListenV1Model.java b/src/main/java/com/deepgram/types/ListenV1Model.java index ff5ba06..df77422 100644 --- a/src/main/java/com/deepgram/types/ListenV1Model.java +++ b/src/main/java/com/deepgram/types/ListenV1Model.java @@ -7,67 +7,67 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class ListenV1Model { - public static final ListenV1Model NOVA2VOICEMAIL = new ListenV1Model(Value.NOVA2VOICEMAIL, "nova-2-voicemail"); - - public static final ListenV1Model NOVA3 = new ListenV1Model(Value.NOVA3, "nova-3"); - public static final ListenV1Model FINANCE = new ListenV1Model(Value.FINANCE, "finance"); + public static final ListenV1Model ENHANCED_MEETING = new ListenV1Model(Value.ENHANCED_MEETING, "enhanced-meeting"); + public static final ListenV1Model NOVA_MEDICAL = new ListenV1Model(Value.NOVA_MEDICAL, "nova-medical"); - public static final ListenV1Model ENHANCED_GENERAL = new ListenV1Model(Value.ENHANCED_GENERAL, "enhanced-general"); + public static final ListenV1Model NOVA2VOICEMAIL = new ListenV1Model(Value.NOVA2VOICEMAIL, "nova-2-voicemail"); - public static final ListenV1Model NOVA_GENERAL = new ListenV1Model(Value.NOVA_GENERAL, "nova-general"); + public static final ListenV1Model NOVA3 = new ListenV1Model(Value.NOVA3, "nova-3"); public static final ListenV1Model NOVA3MEDICAL = new ListenV1Model(Value.NOVA3MEDICAL, "nova-3-medical"); public static final ListenV1Model NOVA2 = new ListenV1Model(Value.NOVA2, "nova-2"); + public static final ListenV1Model NOVA_GENERAL = new ListenV1Model(Value.NOVA_GENERAL, "nova-general"); + public static final ListenV1Model VOICEMAIL = new ListenV1Model(Value.VOICEMAIL, "voicemail"); - public static final ListenV1Model ENHANCED_FINANCE = new ListenV1Model(Value.ENHANCED_FINANCE, "enhanced-finance"); + public static final ListenV1Model ENHANCED_PHONECALL = + new ListenV1Model(Value.ENHANCED_PHONECALL, "enhanced-phonecall"); public static final ListenV1Model NOVA2FINANCE = new ListenV1Model(Value.NOVA2FINANCE, "nova-2-finance"); + public static final ListenV1Model NOVA2CONVERSATIONALAI = + new ListenV1Model(Value.NOVA2CONVERSATIONALAI, "nova-2-conversationalai"); + public static final ListenV1Model MEETING = new ListenV1Model(Value.MEETING, "meeting"); public static final ListenV1Model PHONECALL = new ListenV1Model(Value.PHONECALL, "phonecall"); - public static final ListenV1Model NOVA2CONVERSATIONALAI = - new ListenV1Model(Value.NOVA2CONVERSATIONALAI, "nova-2-conversationalai"); - public static final ListenV1Model VIDEO = new ListenV1Model(Value.VIDEO, "video"); public static final ListenV1Model CONVERSATIONALAI = new ListenV1Model(Value.CONVERSATIONALAI, "conversationalai"); - public static final ListenV1Model NOVA2VIDEO = new ListenV1Model(Value.NOVA2VIDEO, "nova-2-video"); + public static final ListenV1Model NOVA2GENERAL = new ListenV1Model(Value.NOVA2GENERAL, "nova-2-general"); public static final ListenV1Model NOVA2DRIVETHRU = new ListenV1Model(Value.NOVA2DRIVETHRU, "nova-2-drivethru"); public static final ListenV1Model BASE = new ListenV1Model(Value.BASE, "base"); - public static final ListenV1Model NOVA2GENERAL = new ListenV1Model(Value.NOVA2GENERAL, "nova-2-general"); + public static final ListenV1Model NOVA2VIDEO = new ListenV1Model(Value.NOVA2VIDEO, "nova-2-video"); public static final ListenV1Model NOVA = new ListenV1Model(Value.NOVA, "nova"); - public static final ListenV1Model ENHANCED_PHONECALL = - new ListenV1Model(Value.ENHANCED_PHONECALL, "enhanced-phonecall"); - - public static final ListenV1Model NOVA2MEDICAL = new ListenV1Model(Value.NOVA2MEDICAL, "nova-2-medical"); + public static final ListenV1Model ENHANCED_FINANCE = new ListenV1Model(Value.ENHANCED_FINANCE, "enhanced-finance"); - public static final ListenV1Model CUSTOM = new ListenV1Model(Value.CUSTOM, "custom"); + public static final ListenV1Model NOVA2AUTOMOTIVE = new ListenV1Model(Value.NOVA2AUTOMOTIVE, "nova-2-automotive"); public static final ListenV1Model NOVA3GENERAL = new ListenV1Model(Value.NOVA3GENERAL, "nova-3-general"); - public static final ListenV1Model ENHANCED = new ListenV1Model(Value.ENHANCED, "enhanced"); + public static final ListenV1Model NOVA2MEDICAL = new ListenV1Model(Value.NOVA2MEDICAL, "nova-2-medical"); - public static final ListenV1Model NOVA_PHONECALL = new ListenV1Model(Value.NOVA_PHONECALL, "nova-phonecall"); + public static final ListenV1Model CUSTOM = new ListenV1Model(Value.CUSTOM, "custom"); public static final ListenV1Model NOVA2MEETING = new ListenV1Model(Value.NOVA2MEETING, "nova-2-meeting"); - public static final ListenV1Model NOVA2AUTOMOTIVE = new ListenV1Model(Value.NOVA2AUTOMOTIVE, "nova-2-automotive"); + public static final ListenV1Model ENHANCED_GENERAL = new ListenV1Model(Value.ENHANCED_GENERAL, "enhanced-general"); - public static final ListenV1Model ENHANCED_MEETING = new ListenV1Model(Value.ENHANCED_MEETING, "enhanced-meeting"); + public static final ListenV1Model ENHANCED = new ListenV1Model(Value.ENHANCED, "enhanced"); + + public static final ListenV1Model NOVA_PHONECALL = new ListenV1Model(Value.NOVA_PHONECALL, "nova-phonecall"); private final Value value; @@ -101,66 +101,66 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case NOVA2VOICEMAIL: - return visitor.visitNova2Voicemail(); - case NOVA3: - return visitor.visitNova3(); case FINANCE: return visitor.visitFinance(); + case ENHANCED_MEETING: + return visitor.visitEnhancedMeeting(); case NOVA_MEDICAL: return visitor.visitNovaMedical(); - case ENHANCED_GENERAL: - return visitor.visitEnhancedGeneral(); - case NOVA_GENERAL: - return visitor.visitNovaGeneral(); + case NOVA2VOICEMAIL: + return visitor.visitNova2Voicemail(); + case NOVA3: + return visitor.visitNova3(); case NOVA3MEDICAL: return visitor.visitNova3Medical(); case NOVA2: return visitor.visitNova2(); + case NOVA_GENERAL: + return visitor.visitNovaGeneral(); case VOICEMAIL: return visitor.visitVoicemail(); - case ENHANCED_FINANCE: - return visitor.visitEnhancedFinance(); + case ENHANCED_PHONECALL: + return visitor.visitEnhancedPhonecall(); case NOVA2FINANCE: return visitor.visitNova2Finance(); + case NOVA2CONVERSATIONALAI: + return visitor.visitNova2Conversationalai(); case MEETING: return visitor.visitMeeting(); case PHONECALL: return visitor.visitPhonecall(); - case NOVA2CONVERSATIONALAI: - return visitor.visitNova2Conversationalai(); case VIDEO: return visitor.visitVideo(); case CONVERSATIONALAI: return visitor.visitConversationalai(); - case NOVA2VIDEO: - return visitor.visitNova2Video(); + case NOVA2GENERAL: + return visitor.visitNova2General(); case NOVA2DRIVETHRU: return visitor.visitNova2Drivethru(); case BASE: return visitor.visitBase(); - case NOVA2GENERAL: - return visitor.visitNova2General(); + case NOVA2VIDEO: + return visitor.visitNova2Video(); case NOVA: return visitor.visitNova(); - case ENHANCED_PHONECALL: - return visitor.visitEnhancedPhonecall(); + case ENHANCED_FINANCE: + return visitor.visitEnhancedFinance(); + case NOVA2AUTOMOTIVE: + return visitor.visitNova2Automotive(); + case NOVA3GENERAL: + return visitor.visitNova3General(); case NOVA2MEDICAL: return visitor.visitNova2Medical(); case CUSTOM: return visitor.visitCustom(); - case NOVA3GENERAL: - return visitor.visitNova3General(); + case NOVA2MEETING: + return visitor.visitNova2Meeting(); + case ENHANCED_GENERAL: + return visitor.visitEnhancedGeneral(); case ENHANCED: return visitor.visitEnhanced(); case NOVA_PHONECALL: return visitor.visitNovaPhonecall(); - case NOVA2MEETING: - return visitor.visitNova2Meeting(); - case NOVA2AUTOMOTIVE: - return visitor.visitNova2Automotive(); - case ENHANCED_MEETING: - return visitor.visitEnhancedMeeting(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -170,66 +170,66 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static ListenV1Model valueOf(String value) { switch (value) { - case "nova-2-voicemail": - return NOVA2VOICEMAIL; - case "nova-3": - return NOVA3; case "finance": return FINANCE; + case "enhanced-meeting": + return ENHANCED_MEETING; case "nova-medical": return NOVA_MEDICAL; - case "enhanced-general": - return ENHANCED_GENERAL; - case "nova-general": - return NOVA_GENERAL; + case "nova-2-voicemail": + return NOVA2VOICEMAIL; + case "nova-3": + return NOVA3; case "nova-3-medical": return NOVA3MEDICAL; case "nova-2": return NOVA2; + case "nova-general": + return NOVA_GENERAL; case "voicemail": return VOICEMAIL; - case "enhanced-finance": - return ENHANCED_FINANCE; + case "enhanced-phonecall": + return ENHANCED_PHONECALL; case "nova-2-finance": return NOVA2FINANCE; + case "nova-2-conversationalai": + return NOVA2CONVERSATIONALAI; case "meeting": return MEETING; case "phonecall": return PHONECALL; - case "nova-2-conversationalai": - return NOVA2CONVERSATIONALAI; case "video": return VIDEO; case "conversationalai": return CONVERSATIONALAI; - case "nova-2-video": - return NOVA2VIDEO; + case "nova-2-general": + return NOVA2GENERAL; case "nova-2-drivethru": return NOVA2DRIVETHRU; case "base": return BASE; - case "nova-2-general": - return NOVA2GENERAL; + case "nova-2-video": + return NOVA2VIDEO; case "nova": return NOVA; - case "enhanced-phonecall": - return ENHANCED_PHONECALL; + case "enhanced-finance": + return ENHANCED_FINANCE; + case "nova-2-automotive": + return NOVA2AUTOMOTIVE; + case "nova-3-general": + return NOVA3GENERAL; case "nova-2-medical": return NOVA2MEDICAL; case "custom": return CUSTOM; - case "nova-3-general": - return NOVA3GENERAL; + case "nova-2-meeting": + return NOVA2MEETING; + case "enhanced-general": + return ENHANCED_GENERAL; case "enhanced": return ENHANCED; case "nova-phonecall": return NOVA_PHONECALL; - case "nova-2-meeting": - return NOVA2MEETING; - case "nova-2-automotive": - return NOVA2AUTOMOTIVE; - case "enhanced-meeting": - return ENHANCED_MEETING; default: return new ListenV1Model(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/types/ListenV1Redact.java b/src/main/java/com/deepgram/types/ListenV1Redact.java index 353f948..8c9c09a 100644 --- a/src/main/java/com/deepgram/types/ListenV1Redact.java +++ b/src/main/java/com/deepgram/types/ListenV1Redact.java @@ -11,8 +11,6 @@ public final class ListenV1Redact { public static final ListenV1Redact SSN = new ListenV1Redact(Value.SSN, "ssn"); - public static final ListenV1Redact TRUE = new ListenV1Redact(Value.TRUE, "true"); - public static final ListenV1Redact NUMBERS = new ListenV1Redact(Value.NUMBERS, "numbers"); public static final ListenV1Redact AGGRESSIVE_NUMBERS = @@ -20,6 +18,8 @@ public final class ListenV1Redact { public static final ListenV1Redact PCI = new ListenV1Redact(Value.PCI, "pci"); + public static final ListenV1Redact TRUE = new ListenV1Redact(Value.TRUE, "true"); + private final Value value; private final String string; @@ -56,14 +56,14 @@ public T visit(Visitor visitor) { return visitor.visitFalse(); case SSN: return visitor.visitSsn(); - case TRUE: - return visitor.visitTrue(); case NUMBERS: return visitor.visitNumbers(); case AGGRESSIVE_NUMBERS: return visitor.visitAggressiveNumbers(); case PCI: return visitor.visitPci(); + case TRUE: + return visitor.visitTrue(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -77,14 +77,14 @@ public static ListenV1Redact valueOf(String value) { return FALSE; case "ssn": return SSN; - case "true": - return TRUE; case "numbers": return NUMBERS; case "aggressive_numbers": return AGGRESSIVE_NUMBERS; case "pci": return PCI; + case "true": + return TRUE; default: return new ListenV1Redact(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseMetadata.java b/src/main/java/com/deepgram/types/ListenV1ResponseMetadata.java index 2be9bdc..25c4a9d 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseMetadata.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseMetadata.java @@ -35,7 +35,7 @@ public final class ListenV1ResponseMetadata { private final double duration; - private final double channels; + private final int channels; private final List models; @@ -59,7 +59,7 @@ private ListenV1ResponseMetadata( String sha256, OffsetDateTime created, double duration, - double channels, + int channels, List models, Map modelInfo, Optional summaryInfo, @@ -110,7 +110,7 @@ public double getDuration() { } @JsonProperty("channels") - public double getChannels() { + public int getChannels() { return channels; } @@ -222,7 +222,7 @@ public interface DurationStage { } public interface ChannelsStage { - _FinalStage channels(double channels); + _FinalStage channels(int channels); } public interface _FinalStage { @@ -280,7 +280,7 @@ public static final class Builder private double duration; - private double channels; + private int channels; private Optional> tags = Optional.empty(); @@ -351,7 +351,7 @@ public ChannelsStage duration(double duration) { @java.lang.Override @JsonSetter("channels") - public _FinalStage channels(double channels) { + public _FinalStage channels(int channels) { this.channels = channels; return this; } diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataIntentsInfo.java b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataIntentsInfo.java index c65f9c3..74ff279 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataIntentsInfo.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataIntentsInfo.java @@ -22,16 +22,16 @@ public final class ListenV1ResponseMetadataIntentsInfo { private final Optional modelUuid; - private final Optional inputTokens; + private final Optional inputTokens; - private final Optional outputTokens; + private final Optional outputTokens; private final Map additionalProperties; private ListenV1ResponseMetadataIntentsInfo( Optional modelUuid, - Optional inputTokens, - Optional outputTokens, + Optional inputTokens, + Optional outputTokens, Map additionalProperties) { this.modelUuid = modelUuid; this.inputTokens = inputTokens; @@ -45,12 +45,12 @@ public Optional getModelUuid() { } @JsonProperty("input_tokens") - public Optional getInputTokens() { + public Optional getInputTokens() { return inputTokens; } @JsonProperty("output_tokens") - public Optional getOutputTokens() { + public Optional getOutputTokens() { return outputTokens; } @@ -90,9 +90,9 @@ public static Builder builder() { public static final class Builder { private Optional modelUuid = Optional.empty(); - private Optional inputTokens = Optional.empty(); + private Optional inputTokens = Optional.empty(); - private Optional outputTokens = Optional.empty(); + private Optional outputTokens = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -118,23 +118,23 @@ public Builder modelUuid(String modelUuid) { } @JsonSetter(value = "input_tokens", nulls = Nulls.SKIP) - public Builder inputTokens(Optional inputTokens) { + public Builder inputTokens(Optional inputTokens) { this.inputTokens = inputTokens; return this; } - public Builder inputTokens(Double inputTokens) { + public Builder inputTokens(Integer inputTokens) { this.inputTokens = Optional.ofNullable(inputTokens); return this; } @JsonSetter(value = "output_tokens", nulls = Nulls.SKIP) - public Builder outputTokens(Optional outputTokens) { + public Builder outputTokens(Optional outputTokens) { this.outputTokens = outputTokens; return this; } - public Builder outputTokens(Double outputTokens) { + public Builder outputTokens(Integer outputTokens) { this.outputTokens = Optional.ofNullable(outputTokens); return this; } diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataSentimentInfo.java b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataSentimentInfo.java index 74bc0d3..6a29535 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataSentimentInfo.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataSentimentInfo.java @@ -22,16 +22,16 @@ public final class ListenV1ResponseMetadataSentimentInfo { private final Optional modelUuid; - private final Optional inputTokens; + private final Optional inputTokens; - private final Optional outputTokens; + private final Optional outputTokens; private final Map additionalProperties; private ListenV1ResponseMetadataSentimentInfo( Optional modelUuid, - Optional inputTokens, - Optional outputTokens, + Optional inputTokens, + Optional outputTokens, Map additionalProperties) { this.modelUuid = modelUuid; this.inputTokens = inputTokens; @@ -45,12 +45,12 @@ public Optional getModelUuid() { } @JsonProperty("input_tokens") - public Optional getInputTokens() { + public Optional getInputTokens() { return inputTokens; } @JsonProperty("output_tokens") - public Optional getOutputTokens() { + public Optional getOutputTokens() { return outputTokens; } @@ -90,9 +90,9 @@ public static Builder builder() { public static final class Builder { private Optional modelUuid = Optional.empty(); - private Optional inputTokens = Optional.empty(); + private Optional inputTokens = Optional.empty(); - private Optional outputTokens = Optional.empty(); + private Optional outputTokens = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -118,23 +118,23 @@ public Builder modelUuid(String modelUuid) { } @JsonSetter(value = "input_tokens", nulls = Nulls.SKIP) - public Builder inputTokens(Optional inputTokens) { + public Builder inputTokens(Optional inputTokens) { this.inputTokens = inputTokens; return this; } - public Builder inputTokens(Double inputTokens) { + public Builder inputTokens(Integer inputTokens) { this.inputTokens = Optional.ofNullable(inputTokens); return this; } @JsonSetter(value = "output_tokens", nulls = Nulls.SKIP) - public Builder outputTokens(Optional outputTokens) { + public Builder outputTokens(Optional outputTokens) { this.outputTokens = outputTokens; return this; } - public Builder outputTokens(Double outputTokens) { + public Builder outputTokens(Integer outputTokens) { this.outputTokens = Optional.ofNullable(outputTokens); return this; } diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataSummaryInfo.java b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataSummaryInfo.java index dbe312e..f356b3a 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataSummaryInfo.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataSummaryInfo.java @@ -22,16 +22,16 @@ public final class ListenV1ResponseMetadataSummaryInfo { private final Optional modelUuid; - private final Optional inputTokens; + private final Optional inputTokens; - private final Optional outputTokens; + private final Optional outputTokens; private final Map additionalProperties; private ListenV1ResponseMetadataSummaryInfo( Optional modelUuid, - Optional inputTokens, - Optional outputTokens, + Optional inputTokens, + Optional outputTokens, Map additionalProperties) { this.modelUuid = modelUuid; this.inputTokens = inputTokens; @@ -45,12 +45,12 @@ public Optional getModelUuid() { } @JsonProperty("input_tokens") - public Optional getInputTokens() { + public Optional getInputTokens() { return inputTokens; } @JsonProperty("output_tokens") - public Optional getOutputTokens() { + public Optional getOutputTokens() { return outputTokens; } @@ -90,9 +90,9 @@ public static Builder builder() { public static final class Builder { private Optional modelUuid = Optional.empty(); - private Optional inputTokens = Optional.empty(); + private Optional inputTokens = Optional.empty(); - private Optional outputTokens = Optional.empty(); + private Optional outputTokens = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -118,23 +118,23 @@ public Builder modelUuid(String modelUuid) { } @JsonSetter(value = "input_tokens", nulls = Nulls.SKIP) - public Builder inputTokens(Optional inputTokens) { + public Builder inputTokens(Optional inputTokens) { this.inputTokens = inputTokens; return this; } - public Builder inputTokens(Double inputTokens) { + public Builder inputTokens(Integer inputTokens) { this.inputTokens = Optional.ofNullable(inputTokens); return this; } @JsonSetter(value = "output_tokens", nulls = Nulls.SKIP) - public Builder outputTokens(Optional outputTokens) { + public Builder outputTokens(Optional outputTokens) { this.outputTokens = outputTokens; return this; } - public Builder outputTokens(Double outputTokens) { + public Builder outputTokens(Integer outputTokens) { this.outputTokens = Optional.ofNullable(outputTokens); return this; } diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataTopicsInfo.java b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataTopicsInfo.java index 955cf19..d00294a 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseMetadataTopicsInfo.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseMetadataTopicsInfo.java @@ -22,16 +22,16 @@ public final class ListenV1ResponseMetadataTopicsInfo { private final Optional modelUuid; - private final Optional inputTokens; + private final Optional inputTokens; - private final Optional outputTokens; + private final Optional outputTokens; private final Map additionalProperties; private ListenV1ResponseMetadataTopicsInfo( Optional modelUuid, - Optional inputTokens, - Optional outputTokens, + Optional inputTokens, + Optional outputTokens, Map additionalProperties) { this.modelUuid = modelUuid; this.inputTokens = inputTokens; @@ -45,12 +45,12 @@ public Optional getModelUuid() { } @JsonProperty("input_tokens") - public Optional getInputTokens() { + public Optional getInputTokens() { return inputTokens; } @JsonProperty("output_tokens") - public Optional getOutputTokens() { + public Optional getOutputTokens() { return outputTokens; } @@ -90,9 +90,9 @@ public static Builder builder() { public static final class Builder { private Optional modelUuid = Optional.empty(); - private Optional inputTokens = Optional.empty(); + private Optional inputTokens = Optional.empty(); - private Optional outputTokens = Optional.empty(); + private Optional outputTokens = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -118,23 +118,23 @@ public Builder modelUuid(String modelUuid) { } @JsonSetter(value = "input_tokens", nulls = Nulls.SKIP) - public Builder inputTokens(Optional inputTokens) { + public Builder inputTokens(Optional inputTokens) { this.inputTokens = inputTokens; return this; } - public Builder inputTokens(Double inputTokens) { + public Builder inputTokens(Integer inputTokens) { this.inputTokens = Optional.ofNullable(inputTokens); return this; } @JsonSetter(value = "output_tokens", nulls = Nulls.SKIP) - public Builder outputTokens(Optional outputTokens) { + public Builder outputTokens(Optional outputTokens) { this.outputTokens = outputTokens; return this; } - public Builder outputTokens(Double outputTokens) { + public Builder outputTokens(Integer outputTokens) { this.outputTokens = Optional.ofNullable(outputTokens); return this; } diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseResultsChannelsItemAlternativesItemParagraphsParagraphsItem.java b/src/main/java/com/deepgram/types/ListenV1ResponseResultsChannelsItemAlternativesItemParagraphsParagraphsItem.java index 51e4c84..3159d08 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseResultsChannelsItemAlternativesItemParagraphsParagraphsItem.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseResultsChannelsItemAlternativesItemParagraphsParagraphsItem.java @@ -25,9 +25,9 @@ public final class ListenV1ResponseResultsChannelsItemAlternativesItemParagraphs List> sentences; - private final Optional speaker; + private final Optional speaker; - private final Optional numWords; + private final Optional numWords; private final Optional start; @@ -38,8 +38,8 @@ public final class ListenV1ResponseResultsChannelsItemAlternativesItemParagraphs private ListenV1ResponseResultsChannelsItemAlternativesItemParagraphsParagraphsItem( Optional> sentences, - Optional speaker, - Optional numWords, + Optional speaker, + Optional numWords, Optional start, Optional end, Map additionalProperties) { @@ -58,12 +58,12 @@ private ListenV1ResponseResultsChannelsItemAlternativesItemParagraphsParagraphsI } @JsonProperty("speaker") - public Optional getSpeaker() { + public Optional getSpeaker() { return speaker; } @JsonProperty("num_words") - public Optional getNumWords() { + public Optional getNumWords() { return numWords; } @@ -116,9 +116,9 @@ public static final class Builder { private Optional> sentences = Optional.empty(); - private Optional speaker = Optional.empty(); + private Optional speaker = Optional.empty(); - private Optional numWords = Optional.empty(); + private Optional numWords = Optional.empty(); private Optional start = Optional.empty(); @@ -154,23 +154,23 @@ public Builder sentences( } @JsonSetter(value = "speaker", nulls = Nulls.SKIP) - public Builder speaker(Optional speaker) { + public Builder speaker(Optional speaker) { this.speaker = speaker; return this; } - public Builder speaker(Float speaker) { + public Builder speaker(Integer speaker) { this.speaker = Optional.ofNullable(speaker); return this; } @JsonSetter(value = "num_words", nulls = Nulls.SKIP) - public Builder numWords(Optional numWords) { + public Builder numWords(Optional numWords) { this.numWords = numWords; return this; } - public Builder numWords(Float numWords) { + public Builder numWords(Integer numWords) { this.numWords = Optional.ofNullable(numWords); return this; } diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseResultsUtterancesItem.java b/src/main/java/com/deepgram/types/ListenV1ResponseResultsUtterancesItem.java index 16115a3..dbee3b6 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseResultsUtterancesItem.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseResultsUtterancesItem.java @@ -27,13 +27,13 @@ public final class ListenV1ResponseResultsUtterancesItem { private final Optional confidence; - private final Optional channel; + private final Optional channel; private final Optional transcript; private final Optional> words; - private final Optional speaker; + private final Optional speaker; private final Optional id; @@ -43,10 +43,10 @@ private ListenV1ResponseResultsUtterancesItem( Optional start, Optional end, Optional confidence, - Optional channel, + Optional channel, Optional transcript, Optional> words, - Optional speaker, + Optional speaker, Optional id, Map additionalProperties) { this.start = start; @@ -76,7 +76,7 @@ public Optional getConfidence() { } @JsonProperty("channel") - public Optional getChannel() { + public Optional getChannel() { return channel; } @@ -91,7 +91,7 @@ public Optional> getWords() } @JsonProperty("speaker") - public Optional getSpeaker() { + public Optional getSpeaker() { return speaker; } @@ -153,13 +153,13 @@ public static final class Builder { private Optional confidence = Optional.empty(); - private Optional channel = Optional.empty(); + private Optional channel = Optional.empty(); private Optional transcript = Optional.empty(); private Optional> words = Optional.empty(); - private Optional speaker = Optional.empty(); + private Optional speaker = Optional.empty(); private Optional id = Optional.empty(); @@ -214,12 +214,12 @@ public Builder confidence(Float confidence) { } @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public Builder channel(Optional channel) { + public Builder channel(Optional channel) { this.channel = channel; return this; } - public Builder channel(Float channel) { + public Builder channel(Integer channel) { this.channel = Optional.ofNullable(channel); return this; } @@ -247,12 +247,12 @@ public Builder words(List words) } @JsonSetter(value = "speaker", nulls = Nulls.SKIP) - public Builder speaker(Optional speaker) { + public Builder speaker(Optional speaker) { this.speaker = speaker; return this; } - public Builder speaker(Float speaker) { + public Builder speaker(Integer speaker) { this.speaker = Optional.ofNullable(speaker); return this; } diff --git a/src/main/java/com/deepgram/types/ListenV1ResponseResultsUtterancesItemWordsItem.java b/src/main/java/com/deepgram/types/ListenV1ResponseResultsUtterancesItemWordsItem.java index 69f3016..d23ee8f 100644 --- a/src/main/java/com/deepgram/types/ListenV1ResponseResultsUtterancesItemWordsItem.java +++ b/src/main/java/com/deepgram/types/ListenV1ResponseResultsUtterancesItemWordsItem.java @@ -28,7 +28,7 @@ public final class ListenV1ResponseResultsUtterancesItemWordsItem { private final Optional confidence; - private final Optional speaker; + private final Optional speaker; private final Optional speakerConfidence; @@ -41,7 +41,7 @@ private ListenV1ResponseResultsUtterancesItemWordsItem( Optional start, Optional end, Optional confidence, - Optional speaker, + Optional speaker, Optional speakerConfidence, Optional punctuatedWord, Map additionalProperties) { @@ -76,7 +76,7 @@ public Optional getConfidence() { } @JsonProperty("speaker") - public Optional getSpeaker() { + public Optional getSpeaker() { return speaker; } @@ -143,7 +143,7 @@ public static final class Builder { private Optional confidence = Optional.empty(); - private Optional speaker = Optional.empty(); + private Optional speaker = Optional.empty(); private Optional speakerConfidence = Optional.empty(); @@ -210,12 +210,12 @@ public Builder confidence(Float confidence) { } @JsonSetter(value = "speaker", nulls = Nulls.SKIP) - public Builder speaker(Optional speaker) { + public Builder speaker(Optional speaker) { this.speaker = speaker; return this; } - public Builder speaker(Float speaker) { + public Builder speaker(Integer speaker) { this.speaker = Optional.ofNullable(speaker); return this; } diff --git a/src/main/java/com/deepgram/types/ListenV2Model.java b/src/main/java/com/deepgram/types/ListenV2Model.java new file mode 100644 index 0000000..2d7b9e6 --- /dev/null +++ b/src/main/java/com/deepgram/types/ListenV2Model.java @@ -0,0 +1,84 @@ +/** + * 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 ListenV2Model { + public static final ListenV2Model FLUX_GENERAL_EN = new ListenV2Model(Value.FLUX_GENERAL_EN, "flux-general-en"); + + public static final ListenV2Model FLUX_GENERAL_MULTI = + new ListenV2Model(Value.FLUX_GENERAL_MULTI, "flux-general-multi"); + + private final Value value; + + private final String string; + + ListenV2Model(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 ListenV2Model && this.string.equals(((ListenV2Model) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case FLUX_GENERAL_EN: + return visitor.visitFluxGeneralEn(); + case FLUX_GENERAL_MULTI: + return visitor.visitFluxGeneralMulti(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static ListenV2Model valueOf(String value) { + switch (value) { + case "flux-general-en": + return FLUX_GENERAL_EN; + case "flux-general-multi": + return FLUX_GENERAL_MULTI; + default: + return new ListenV2Model(Value.UNKNOWN, value); + } + } + + public enum Value { + FLUX_GENERAL_EN, + + FLUX_GENERAL_MULTI, + + UNKNOWN + } + + public interface Visitor { + T visitFluxGeneralEn(); + + T visitFluxGeneralMulti(); + + 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 9a6b9e1..7f6c48f 100644 --- a/src/main/java/com/deepgram/types/OpenAiSpeakProvider.java +++ b/src/main/java/com/deepgram/types/OpenAiSpeakProvider.java @@ -3,40 +3,212 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class OpenAiSpeakProvider implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OpenAiSpeakProvider.Builder.class) +public final class OpenAiSpeakProvider { + private final Optional version; - private OpenAiSpeakProvider(Object value) { - this.value = value; + private final OpenAiSpeakProviderModel model; + + private final OpenAiSpeakProviderVoice voice; + + private final Map additionalProperties; + + private OpenAiSpeakProvider( + Optional version, + OpenAiSpeakProviderModel model, + OpenAiSpeakProviderVoice voice, + Map additionalProperties) { + this.version = version; + this.model = model; + this.voice = voice; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "open_ai"; } - @JsonValue - public Object get() { - return this.value; + /** + * @return The REST API version for the OpenAI text-to-speech API + */ + @JsonProperty("version") + public Optional getVersion() { + return version; + } + + /** + * @return OpenAI TTS model + */ + @JsonProperty("model") + public OpenAiSpeakProviderModel getModel() { + return model; + } + + /** + * @return OpenAI voice + */ + @JsonProperty("voice") + public OpenAiSpeakProviderVoice getVoice() { + return voice; } @java.lang.Override public boolean equals(Object other) { - return this == other - || (other instanceof OpenAiSpeakProvider && this.value.equals(((OpenAiSpeakProvider) other).value)); + if (this == other) return true; + return other instanceof OpenAiSpeakProvider && equalTo((OpenAiSpeakProvider) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OpenAiSpeakProvider other) { + return version.equals(other.version) && model.equals(other.model) && voice.equals(other.voice); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.version, this.model, this.voice); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); + } + + public static ModelStage builder() { + return new Builder(); + } + + public interface ModelStage { + /** + *

OpenAI TTS model

+ */ + VoiceStage model(@NotNull OpenAiSpeakProviderModel model); + + Builder from(OpenAiSpeakProvider other); + } + + public interface VoiceStage { + /** + *

OpenAI voice

+ */ + _FinalStage voice(@NotNull OpenAiSpeakProviderVoice voice); + } + + public interface _FinalStage { + OpenAiSpeakProvider build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

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

+ */ + _FinalStage version(Optional version); + + _FinalStage version(String version); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static OpenAiSpeakProvider of(Object value) { - return new OpenAiSpeakProvider(value); + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelStage, VoiceStage, _FinalStage { + private OpenAiSpeakProviderModel model; + + private OpenAiSpeakProviderVoice voice; + + private Optional version = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(OpenAiSpeakProvider other) { + version(other.getVersion()); + model(other.getModel()); + voice(other.getVoice()); + return this; + } + + /** + *

OpenAI TTS model

+ *

OpenAI TTS model

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

OpenAI voice

+ *

OpenAI voice

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

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

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

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

+ */ + @java.lang.Override + @JsonSetter(value = "version", nulls = Nulls.SKIP) + public _FinalStage version(Optional version) { + this.version = version; + return this; + } + + @java.lang.Override + public OpenAiSpeakProvider build() { + return new OpenAiSpeakProvider(version, model, voice, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel.java b/src/main/java/com/deepgram/types/OpenAiSpeakProviderModel.java similarity index 60% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel.java rename to src/main/java/com/deepgram/types/OpenAiSpeakProviderModel.java index 5558df0..81f4714 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel.java +++ b/src/main/java/com/deepgram/types/OpenAiSpeakProviderModel.java @@ -1,23 +1,21 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel { - public static final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel TTS1HD = - new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel(Value.TTS1HD, "tts-1-hd"); +public final class OpenAiSpeakProviderModel { + public static final OpenAiSpeakProviderModel TTS1HD = new OpenAiSpeakProviderModel(Value.TTS1HD, "tts-1-hd"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel TTS1 = - new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel(Value.TTS1, "tts-1"); + public static final OpenAiSpeakProviderModel TTS1 = new OpenAiSpeakProviderModel(Value.TTS1, "tts-1"); private final Value value; private final String string; - AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel(Value value, String string) { + OpenAiSpeakProviderModel(Value value, String string) { this.value = value; this.string = string; } @@ -35,8 +33,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel - && this.string.equals(((AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel) other).string)); + || (other instanceof OpenAiSpeakProviderModel + && this.string.equals(((OpenAiSpeakProviderModel) other).string)); } @java.lang.Override @@ -57,14 +55,14 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel valueOf(String value) { + public static OpenAiSpeakProviderModel valueOf(String value) { switch (value) { case "tts-1-hd": return TTS1HD; case "tts-1": return TTS1; default: - return new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiModel(Value.UNKNOWN, value); + return new OpenAiSpeakProviderModel(Value.UNKNOWN, value); } } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice.java b/src/main/java/com/deepgram/types/OpenAiSpeakProviderVoice.java similarity index 56% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice.java rename to src/main/java/com/deepgram/types/OpenAiSpeakProviderVoice.java index b6abf14..15b45cc 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice.java +++ b/src/main/java/com/deepgram/types/OpenAiSpeakProviderVoice.java @@ -1,35 +1,29 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -public final class AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice { - public static final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice SHIMMER = - new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice(Value.SHIMMER, "shimmer"); +public final class OpenAiSpeakProviderVoice { + public static final OpenAiSpeakProviderVoice SHIMMER = new OpenAiSpeakProviderVoice(Value.SHIMMER, "shimmer"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice FABLE = - new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice(Value.FABLE, "fable"); + public static final OpenAiSpeakProviderVoice FABLE = new OpenAiSpeakProviderVoice(Value.FABLE, "fable"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice ALLOY = - new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice(Value.ALLOY, "alloy"); + public static final OpenAiSpeakProviderVoice NOVA = new OpenAiSpeakProviderVoice(Value.NOVA, "nova"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice ONYX = - new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice(Value.ONYX, "onyx"); + public static final OpenAiSpeakProviderVoice ALLOY = new OpenAiSpeakProviderVoice(Value.ALLOY, "alloy"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice NOVA = - new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice(Value.NOVA, "nova"); + public static final OpenAiSpeakProviderVoice ONYX = new OpenAiSpeakProviderVoice(Value.ONYX, "onyx"); - public static final AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice ECHO = - new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice(Value.ECHO, "echo"); + public static final OpenAiSpeakProviderVoice ECHO = new OpenAiSpeakProviderVoice(Value.ECHO, "echo"); private final Value value; private final String string; - AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice(Value value, String string) { + OpenAiSpeakProviderVoice(Value value, String string) { this.value = value; this.string = string; } @@ -47,8 +41,8 @@ public String toString() { @java.lang.Override public boolean equals(Object other) { return (this == other) - || (other instanceof AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice - && this.string.equals(((AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice) other).string)); + || (other instanceof OpenAiSpeakProviderVoice + && this.string.equals(((OpenAiSpeakProviderVoice) other).string)); } @java.lang.Override @@ -62,12 +56,12 @@ public T visit(Visitor visitor) { return visitor.visitShimmer(); case FABLE: return visitor.visitFable(); + case NOVA: + return visitor.visitNova(); case ALLOY: return visitor.visitAlloy(); case ONYX: return visitor.visitOnyx(); - case NOVA: - return visitor.visitNova(); case ECHO: return visitor.visitEcho(); case UNKNOWN: @@ -77,22 +71,22 @@ public T visit(Visitor visitor) { } @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice valueOf(String value) { + public static OpenAiSpeakProviderVoice valueOf(String value) { switch (value) { case "shimmer": return SHIMMER; case "fable": return FABLE; + case "nova": + return NOVA; case "alloy": return ALLOY; case "onyx": return ONYX; - case "nova": - return NOVA; case "echo": return ECHO; default: - return new AgentV1UpdateSpeakSpeakOneItemProviderOpenAiVoice(Value.UNKNOWN, value); + return new OpenAiSpeakProviderVoice(Value.UNKNOWN, value); } } diff --git a/src/main/java/com/deepgram/types/OpenAiThinkProvider.java b/src/main/java/com/deepgram/types/OpenAiThinkProvider.java index 2d8dce1..6f56f68 100644 --- a/src/main/java/com/deepgram/types/OpenAiThinkProvider.java +++ b/src/main/java/com/deepgram/types/OpenAiThinkProvider.java @@ -3,40 +3,220 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class OpenAiThinkProvider implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = OpenAiThinkProvider.Builder.class) +public final class OpenAiThinkProvider { + private final Optional version; - private OpenAiThinkProvider(Object value) { - this.value = value; + private final OpenAiThinkProviderModel model; + + private final Optional temperature; + + private final Map additionalProperties; + + private OpenAiThinkProvider( + Optional version, + OpenAiThinkProviderModel model, + Optional temperature, + Map additionalProperties) { + this.version = version; + this.model = model; + this.temperature = temperature; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("type") + public String getType() { + return "open_ai"; } - @JsonValue - public Object get() { - return this.value; + /** + * @return The REST API version for the OpenAI chat completions API + */ + @JsonProperty("version") + public Optional getVersion() { + return version; + } + + /** + * @return OpenAI model to use + */ + @JsonProperty("model") + public OpenAiThinkProviderModel getModel() { + return model; + } + + /** + * @return OpenAI temperature (0-2) + */ + @JsonProperty("temperature") + public Optional getTemperature() { + return temperature; } @java.lang.Override public boolean equals(Object other) { - return this == other - || (other instanceof OpenAiThinkProvider && this.value.equals(((OpenAiThinkProvider) other).value)); + if (this == other) return true; + return other instanceof OpenAiThinkProvider && equalTo((OpenAiThinkProvider) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(OpenAiThinkProvider other) { + return version.equals(other.version) && model.equals(other.model) && temperature.equals(other.temperature); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.version, this.model, this.temperature); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); + } + + public static ModelStage builder() { + return new Builder(); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static OpenAiThinkProvider of(Object value) { - return new OpenAiThinkProvider(value); + public interface ModelStage { + /** + *

OpenAI model to use

+ */ + _FinalStage model(@NotNull OpenAiThinkProviderModel model); + + Builder from(OpenAiThinkProvider other); + } + + public interface _FinalStage { + OpenAiThinkProvider build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

The REST API version for the OpenAI chat completions API

+ */ + _FinalStage version(Optional version); + + _FinalStage version(String version); + + /** + *

OpenAI temperature (0-2)

+ */ + _FinalStage temperature(Optional temperature); + + _FinalStage temperature(Double temperature); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelStage, _FinalStage { + private OpenAiThinkProviderModel model; + + private Optional temperature = Optional.empty(); + + private Optional version = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(OpenAiThinkProvider other) { + version(other.getVersion()); + model(other.getModel()); + temperature(other.getTemperature()); + return this; + } + + /** + *

OpenAI model to use

+ *

OpenAI model to use

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

OpenAI temperature (0-2)

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

OpenAI temperature (0-2)

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

The REST API version for the OpenAI chat completions API

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

The REST API version for the OpenAI chat completions API

+ */ + @java.lang.Override + @JsonSetter(value = "version", nulls = Nulls.SKIP) + public _FinalStage version(Optional version) { + this.version = version; + return this; + } + + @java.lang.Override + public OpenAiThinkProvider build() { + return new OpenAiThinkProvider(version, model, temperature, 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/OpenAiThinkProviderModel.java b/src/main/java/com/deepgram/types/OpenAiThinkProviderModel.java new file mode 100644 index 0000000..bab3323 --- /dev/null +++ b/src/main/java/com/deepgram/types/OpenAiThinkProviderModel.java @@ -0,0 +1,147 @@ +/** + * 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 OpenAiThinkProviderModel { + public static final OpenAiThinkProviderModel GPT5MINI = new OpenAiThinkProviderModel(Value.GPT5MINI, "gpt-5-mini"); + + public static final OpenAiThinkProviderModel GPT41NANO = + new OpenAiThinkProviderModel(Value.GPT41NANO, "gpt-4.1-nano"); + + public static final OpenAiThinkProviderModel GPT4O_MINI = + new OpenAiThinkProviderModel(Value.GPT4O_MINI, "gpt-4o-mini"); + + public static final OpenAiThinkProviderModel GPT41MINI = + new OpenAiThinkProviderModel(Value.GPT41MINI, "gpt-4.1-mini"); + + public static final OpenAiThinkProviderModel GPT5 = new OpenAiThinkProviderModel(Value.GPT5, "gpt-5"); + + public static final OpenAiThinkProviderModel GPT4O = new OpenAiThinkProviderModel(Value.GPT4O, "gpt-4o"); + + public static final OpenAiThinkProviderModel GPT5NANO = new OpenAiThinkProviderModel(Value.GPT5NANO, "gpt-5-nano"); + + public static final OpenAiThinkProviderModel GPT41 = new OpenAiThinkProviderModel(Value.GPT41, "gpt-4.1"); + + private final Value value; + + private final String string; + + OpenAiThinkProviderModel(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 OpenAiThinkProviderModel + && this.string.equals(((OpenAiThinkProviderModel) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case GPT5MINI: + return visitor.visitGpt5Mini(); + case GPT41NANO: + return visitor.visitGpt41Nano(); + case GPT4O_MINI: + return visitor.visitGpt4OMini(); + case GPT41MINI: + return visitor.visitGpt41Mini(); + case GPT5: + return visitor.visitGpt5(); + case GPT4O: + return visitor.visitGpt4O(); + case GPT5NANO: + return visitor.visitGpt5Nano(); + case GPT41: + return visitor.visitGpt41(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static OpenAiThinkProviderModel valueOf(String value) { + switch (value) { + case "gpt-5-mini": + return GPT5MINI; + case "gpt-4.1-nano": + return GPT41NANO; + case "gpt-4o-mini": + return GPT4O_MINI; + case "gpt-4.1-mini": + return GPT41MINI; + case "gpt-5": + return GPT5; + case "gpt-4o": + return GPT4O; + case "gpt-5-nano": + return GPT5NANO; + case "gpt-4.1": + return GPT41; + default: + return new OpenAiThinkProviderModel(Value.UNKNOWN, value); + } + } + + public enum Value { + GPT5, + + GPT5MINI, + + GPT5NANO, + + GPT41, + + GPT41MINI, + + GPT41NANO, + + GPT4O, + + GPT4O_MINI, + + UNKNOWN + } + + public interface Visitor { + T visitGpt5(); + + T visitGpt5Mini(); + + T visitGpt5Nano(); + + T visitGpt41(); + + T visitGpt41Mini(); + + T visitGpt41Nano(); + + T visitGpt4O(); + + T visitGpt4OMini(); + + T visitUnknown(String unknownType); + } +} diff --git a/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataIntentsInfo.java b/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataIntentsInfo.java index 2906fbd..6a9d855 100644 --- a/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataIntentsInfo.java +++ b/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataIntentsInfo.java @@ -22,16 +22,16 @@ public final class ReadV1ResponseMetadataMetadataIntentsInfo { private final Optional modelUuid; - private final Optional inputTokens; + private final Optional inputTokens; - private final Optional outputTokens; + private final Optional outputTokens; private final Map additionalProperties; private ReadV1ResponseMetadataMetadataIntentsInfo( Optional modelUuid, - Optional inputTokens, - Optional outputTokens, + Optional inputTokens, + Optional outputTokens, Map additionalProperties) { this.modelUuid = modelUuid; this.inputTokens = inputTokens; @@ -45,12 +45,12 @@ public Optional getModelUuid() { } @JsonProperty("input_tokens") - public Optional getInputTokens() { + public Optional getInputTokens() { return inputTokens; } @JsonProperty("output_tokens") - public Optional getOutputTokens() { + public Optional getOutputTokens() { return outputTokens; } @@ -90,9 +90,9 @@ public static Builder builder() { public static final class Builder { private Optional modelUuid = Optional.empty(); - private Optional inputTokens = Optional.empty(); + private Optional inputTokens = Optional.empty(); - private Optional outputTokens = Optional.empty(); + private Optional outputTokens = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -118,23 +118,23 @@ public Builder modelUuid(String modelUuid) { } @JsonSetter(value = "input_tokens", nulls = Nulls.SKIP) - public Builder inputTokens(Optional inputTokens) { + public Builder inputTokens(Optional inputTokens) { this.inputTokens = inputTokens; return this; } - public Builder inputTokens(Double inputTokens) { + public Builder inputTokens(Integer inputTokens) { this.inputTokens = Optional.ofNullable(inputTokens); return this; } @JsonSetter(value = "output_tokens", nulls = Nulls.SKIP) - public Builder outputTokens(Optional outputTokens) { + public Builder outputTokens(Optional outputTokens) { this.outputTokens = outputTokens; return this; } - public Builder outputTokens(Double outputTokens) { + public Builder outputTokens(Integer outputTokens) { this.outputTokens = Optional.ofNullable(outputTokens); return this; } diff --git a/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataSentimentInfo.java b/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataSentimentInfo.java index d836764..297a785 100644 --- a/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataSentimentInfo.java +++ b/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataSentimentInfo.java @@ -22,16 +22,16 @@ public final class ReadV1ResponseMetadataMetadataSentimentInfo { private final Optional modelUuid; - private final Optional inputTokens; + private final Optional inputTokens; - private final Optional outputTokens; + private final Optional outputTokens; private final Map additionalProperties; private ReadV1ResponseMetadataMetadataSentimentInfo( Optional modelUuid, - Optional inputTokens, - Optional outputTokens, + Optional inputTokens, + Optional outputTokens, Map additionalProperties) { this.modelUuid = modelUuid; this.inputTokens = inputTokens; @@ -45,12 +45,12 @@ public Optional getModelUuid() { } @JsonProperty("input_tokens") - public Optional getInputTokens() { + public Optional getInputTokens() { return inputTokens; } @JsonProperty("output_tokens") - public Optional getOutputTokens() { + public Optional getOutputTokens() { return outputTokens; } @@ -90,9 +90,9 @@ public static Builder builder() { public static final class Builder { private Optional modelUuid = Optional.empty(); - private Optional inputTokens = Optional.empty(); + private Optional inputTokens = Optional.empty(); - private Optional outputTokens = Optional.empty(); + private Optional outputTokens = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -118,23 +118,23 @@ public Builder modelUuid(String modelUuid) { } @JsonSetter(value = "input_tokens", nulls = Nulls.SKIP) - public Builder inputTokens(Optional inputTokens) { + public Builder inputTokens(Optional inputTokens) { this.inputTokens = inputTokens; return this; } - public Builder inputTokens(Double inputTokens) { + public Builder inputTokens(Integer inputTokens) { this.inputTokens = Optional.ofNullable(inputTokens); return this; } @JsonSetter(value = "output_tokens", nulls = Nulls.SKIP) - public Builder outputTokens(Optional outputTokens) { + public Builder outputTokens(Optional outputTokens) { this.outputTokens = outputTokens; return this; } - public Builder outputTokens(Double outputTokens) { + public Builder outputTokens(Integer outputTokens) { this.outputTokens = Optional.ofNullable(outputTokens); return this; } diff --git a/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataSummaryInfo.java b/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataSummaryInfo.java index 2377444..591ef44 100644 --- a/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataSummaryInfo.java +++ b/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataSummaryInfo.java @@ -22,16 +22,16 @@ public final class ReadV1ResponseMetadataMetadataSummaryInfo { private final Optional modelUuid; - private final Optional inputTokens; + private final Optional inputTokens; - private final Optional outputTokens; + private final Optional outputTokens; private final Map additionalProperties; private ReadV1ResponseMetadataMetadataSummaryInfo( Optional modelUuid, - Optional inputTokens, - Optional outputTokens, + Optional inputTokens, + Optional outputTokens, Map additionalProperties) { this.modelUuid = modelUuid; this.inputTokens = inputTokens; @@ -45,12 +45,12 @@ public Optional getModelUuid() { } @JsonProperty("input_tokens") - public Optional getInputTokens() { + public Optional getInputTokens() { return inputTokens; } @JsonProperty("output_tokens") - public Optional getOutputTokens() { + public Optional getOutputTokens() { return outputTokens; } @@ -90,9 +90,9 @@ public static Builder builder() { public static final class Builder { private Optional modelUuid = Optional.empty(); - private Optional inputTokens = Optional.empty(); + private Optional inputTokens = Optional.empty(); - private Optional outputTokens = Optional.empty(); + private Optional outputTokens = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -118,23 +118,23 @@ public Builder modelUuid(String modelUuid) { } @JsonSetter(value = "input_tokens", nulls = Nulls.SKIP) - public Builder inputTokens(Optional inputTokens) { + public Builder inputTokens(Optional inputTokens) { this.inputTokens = inputTokens; return this; } - public Builder inputTokens(Double inputTokens) { + public Builder inputTokens(Integer inputTokens) { this.inputTokens = Optional.ofNullable(inputTokens); return this; } @JsonSetter(value = "output_tokens", nulls = Nulls.SKIP) - public Builder outputTokens(Optional outputTokens) { + public Builder outputTokens(Optional outputTokens) { this.outputTokens = outputTokens; return this; } - public Builder outputTokens(Double outputTokens) { + public Builder outputTokens(Integer outputTokens) { this.outputTokens = Optional.ofNullable(outputTokens); return this; } diff --git a/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataTopicsInfo.java b/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataTopicsInfo.java index 1882f3d..e5c748d 100644 --- a/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataTopicsInfo.java +++ b/src/main/java/com/deepgram/types/ReadV1ResponseMetadataMetadataTopicsInfo.java @@ -22,16 +22,16 @@ public final class ReadV1ResponseMetadataMetadataTopicsInfo { private final Optional modelUuid; - private final Optional inputTokens; + private final Optional inputTokens; - private final Optional outputTokens; + private final Optional outputTokens; private final Map additionalProperties; private ReadV1ResponseMetadataMetadataTopicsInfo( Optional modelUuid, - Optional inputTokens, - Optional outputTokens, + Optional inputTokens, + Optional outputTokens, Map additionalProperties) { this.modelUuid = modelUuid; this.inputTokens = inputTokens; @@ -45,12 +45,12 @@ public Optional getModelUuid() { } @JsonProperty("input_tokens") - public Optional getInputTokens() { + public Optional getInputTokens() { return inputTokens; } @JsonProperty("output_tokens") - public Optional getOutputTokens() { + public Optional getOutputTokens() { return outputTokens; } @@ -90,9 +90,9 @@ public static Builder builder() { public static final class Builder { private Optional modelUuid = Optional.empty(); - private Optional inputTokens = Optional.empty(); + private Optional inputTokens = Optional.empty(); - private Optional outputTokens = Optional.empty(); + private Optional outputTokens = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -118,23 +118,23 @@ public Builder modelUuid(String modelUuid) { } @JsonSetter(value = "input_tokens", nulls = Nulls.SKIP) - public Builder inputTokens(Optional inputTokens) { + public Builder inputTokens(Optional inputTokens) { this.inputTokens = inputTokens; return this; } - public Builder inputTokens(Double inputTokens) { + public Builder inputTokens(Integer inputTokens) { this.inputTokens = Optional.ofNullable(inputTokens); return this; } @JsonSetter(value = "output_tokens", nulls = Nulls.SKIP) - public Builder outputTokens(Optional outputTokens) { + public Builder outputTokens(Optional outputTokens) { this.outputTokens = outputTokens; return this; } - public Builder outputTokens(Double outputTokens) { + public Builder outputTokens(Integer outputTokens) { this.outputTokens = Optional.ofNullable(outputTokens); return this; } diff --git a/src/main/java/com/deepgram/types/SpeakSettingsV1.java b/src/main/java/com/deepgram/types/SpeakSettingsV1.java index b2d411c..3448398 100644 --- a/src/main/java/com/deepgram/types/SpeakSettingsV1.java +++ b/src/main/java/com/deepgram/types/SpeakSettingsV1.java @@ -3,40 +3,166 @@ */ package com.deepgram.types; -import com.deepgram.core.WrappedAlias; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +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.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; -public final class SpeakSettingsV1 implements WrappedAlias { - private final Object value; +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = SpeakSettingsV1.Builder.class) +public final class SpeakSettingsV1 { + private final SpeakSettingsV1Provider provider; - private SpeakSettingsV1(Object value) { - this.value = value; + private final Optional endpoint; + + private final Map additionalProperties; + + private SpeakSettingsV1( + SpeakSettingsV1Provider provider, + Optional endpoint, + Map additionalProperties) { + this.provider = provider; + this.endpoint = endpoint; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("provider") + public SpeakSettingsV1Provider getProvider() { + return provider; } - @JsonValue - public Object get() { - return this.value; + /** + * @return Optional if provider is Deepgram. Required for non-Deepgram TTS providers. + * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs. + */ + @JsonProperty("endpoint") + public Optional getEndpoint() { + return endpoint; } @java.lang.Override public boolean equals(Object other) { - return this == other - || (other instanceof SpeakSettingsV1 && this.value.equals(((SpeakSettingsV1) other).value)); + if (this == other) return true; + return other instanceof SpeakSettingsV1 && equalTo((SpeakSettingsV1) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(SpeakSettingsV1 other) { + return provider.equals(other.provider) && endpoint.equals(other.endpoint); } @java.lang.Override public int hashCode() { - return value.hashCode(); + return Objects.hash(this.provider, this.endpoint); } @java.lang.Override public String toString() { - return value.toString(); + return ObjectMappers.stringify(this); } - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SpeakSettingsV1 of(Object value) { - return new SpeakSettingsV1(value); + public static ProviderStage builder() { + return new Builder(); + } + + public interface ProviderStage { + _FinalStage provider(@NotNull SpeakSettingsV1Provider provider); + + Builder from(SpeakSettingsV1 other); + } + + public interface _FinalStage { + SpeakSettingsV1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. + * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

+ */ + _FinalStage endpoint(Optional endpoint); + + _FinalStage endpoint(SpeakSettingsV1Endpoint endpoint); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ProviderStage, _FinalStage { + private SpeakSettingsV1Provider provider; + + private Optional endpoint = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(SpeakSettingsV1 other) { + provider(other.getProvider()); + endpoint(other.getEndpoint()); + return this; + } + + @java.lang.Override + @JsonSetter("provider") + public _FinalStage provider(@NotNull SpeakSettingsV1Provider provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + /** + *

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. + * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

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

Optional if provider is Deepgram. Required for non-Deepgram TTS providers. + * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.

+ */ + @java.lang.Override + @JsonSetter(value = "endpoint", nulls = Nulls.SKIP) + public _FinalStage endpoint(Optional endpoint) { + this.endpoint = endpoint; + return this; + } + + @java.lang.Override + public SpeakSettingsV1 build() { + return new SpeakSettingsV1(provider, endpoint, 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/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemEndpoint.java b/src/main/java/com/deepgram/types/SpeakSettingsV1Endpoint.java similarity index 84% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemEndpoint.java rename to src/main/java/com/deepgram/types/SpeakSettingsV1Endpoint.java index 5af2ddd..fa5d713 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1UpdateSpeakSpeakOneItemEndpoint.java +++ b/src/main/java/com/deepgram/types/SpeakSettingsV1Endpoint.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.deepgram.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,15 +18,15 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1UpdateSpeakSpeakOneItemEndpoint.Builder.class) -public final class AgentV1UpdateSpeakSpeakOneItemEndpoint { +@JsonDeserialize(builder = SpeakSettingsV1Endpoint.Builder.class) +public final class SpeakSettingsV1Endpoint { private final Optional url; private final Optional> headers; private final Map additionalProperties; - private AgentV1UpdateSpeakSpeakOneItemEndpoint( + private SpeakSettingsV1Endpoint( Optional url, Optional> headers, Map additionalProperties) { this.url = url; this.headers = headers; @@ -49,8 +49,7 @@ public Optional> getHeaders() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AgentV1UpdateSpeakSpeakOneItemEndpoint - && equalTo((AgentV1UpdateSpeakSpeakOneItemEndpoint) other); + return other instanceof SpeakSettingsV1Endpoint && equalTo((SpeakSettingsV1Endpoint) other); } @JsonAnyGetter @@ -58,7 +57,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(AgentV1UpdateSpeakSpeakOneItemEndpoint other) { + private boolean equalTo(SpeakSettingsV1Endpoint other) { return url.equals(other.url) && headers.equals(other.headers); } @@ -87,7 +86,7 @@ public static final class Builder { private Builder() {} - public Builder from(AgentV1UpdateSpeakSpeakOneItemEndpoint other) { + public Builder from(SpeakSettingsV1Endpoint other) { url(other.getUrl()); headers(other.getHeaders()); return this; @@ -118,8 +117,8 @@ public Builder headers(Map headers) { return this; } - public AgentV1UpdateSpeakSpeakOneItemEndpoint build() { - return new AgentV1UpdateSpeakSpeakOneItemEndpoint(url, headers, additionalProperties); + public SpeakSettingsV1Endpoint build() { + return new SpeakSettingsV1Endpoint(url, headers, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.java b/src/main/java/com/deepgram/types/SpeakSettingsV1Provider.java similarity index 78% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.java rename to src/main/java/com/deepgram/types/SpeakSettingsV1Provider.java index 3151bc2..fd5aa0e 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.java +++ b/src/main/java/com/deepgram/types/SpeakSettingsV1Provider.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -14,11 +14,11 @@ import java.util.Objects; import java.util.Optional; -public final class AgentV1SettingsAgentSpeakOneItemProvider { +public final class SpeakSettingsV1Provider { private final Value value; @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private AgentV1SettingsAgentSpeakOneItemProvider(Value value) { + private SpeakSettingsV1Provider(Value value) { this.value = value; } @@ -26,26 +26,24 @@ public T visit(Visitor visitor) { return value.visit(visitor); } - public static AgentV1SettingsAgentSpeakOneItemProvider deepgram(Deepgram value) { - return new AgentV1SettingsAgentSpeakOneItemProvider(new DeepgramValue(value)); + public static SpeakSettingsV1Provider deepgram(Deepgram value) { + return new SpeakSettingsV1Provider(new DeepgramValue(value)); } - public static AgentV1SettingsAgentSpeakOneItemProvider elevenLabs(ElevenLabs value) { - return new AgentV1SettingsAgentSpeakOneItemProvider(new ElevenLabsValue(value)); + public static SpeakSettingsV1Provider elevenLabs(ElevenLabsSpeakProvider value) { + return new SpeakSettingsV1Provider(new ElevenLabsValue(value)); } - public static AgentV1SettingsAgentSpeakOneItemProvider cartesia(Cartesia value) { - return new AgentV1SettingsAgentSpeakOneItemProvider(new CartesiaValue(value)); + public static SpeakSettingsV1Provider cartesia(Cartesia value) { + return new SpeakSettingsV1Provider(new CartesiaValue(value)); } - public static AgentV1SettingsAgentSpeakOneItemProvider openAi( - AgentV1SettingsAgentSpeakOneItemProviderOpenAi value) { - return new AgentV1SettingsAgentSpeakOneItemProvider(new OpenAiValue(value)); + public static SpeakSettingsV1Provider openAi(OpenAiSpeakProvider value) { + return new SpeakSettingsV1Provider(new OpenAiValue(value)); } - public static AgentV1SettingsAgentSpeakOneItemProvider awsPolly( - AgentV1SettingsAgentSpeakOneItemProviderAwsPolly value) { - return new AgentV1SettingsAgentSpeakOneItemProvider(new AwsPollyValue(value)); + public static SpeakSettingsV1Provider awsPolly(AwsPollySpeakProvider value) { + return new SpeakSettingsV1Provider(new AwsPollyValue(value)); } public boolean isDeepgram() { @@ -79,7 +77,7 @@ public Optional getDeepgram() { return Optional.empty(); } - public Optional getElevenLabs() { + public Optional getElevenLabs() { if (isElevenLabs()) { return Optional.of(((ElevenLabsValue) value).value); } @@ -93,14 +91,14 @@ public Optional getCartesia() { return Optional.empty(); } - public Optional getOpenAi() { + public Optional getOpenAi() { if (isOpenAi()) { return Optional.of(((OpenAiValue) value).value); } return Optional.empty(); } - public Optional getAwsPolly() { + public Optional getAwsPolly() { if (isAwsPolly()) { return Optional.of(((AwsPollyValue) value).value); } @@ -117,8 +115,7 @@ public Optional _getUnknown() { @Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakOneItemProvider - && value.equals(((AgentV1SettingsAgentSpeakOneItemProvider) other).value); + return other instanceof SpeakSettingsV1Provider && value.equals(((SpeakSettingsV1Provider) other).value); } @Override @@ -139,13 +136,13 @@ private Value getValue() { public interface Visitor { T visitDeepgram(Deepgram deepgram); - T visitElevenLabs(ElevenLabs elevenLabs); + T visitElevenLabs(ElevenLabsSpeakProvider elevenLabs); T visitCartesia(Cartesia cartesia); - T visitOpenAi(AgentV1SettingsAgentSpeakOneItemProviderOpenAi openAi); + T visitOpenAi(OpenAiSpeakProvider openAi); - T visitAwsPolly(AgentV1SettingsAgentSpeakOneItemProviderAwsPolly awsPolly); + T visitAwsPolly(AwsPollySpeakProvider awsPolly); T _visitUnknown(Object unknownType); } @@ -199,7 +196,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakOneItemProvider{" + "value: " + value + "}"; + return "SpeakSettingsV1Provider{" + "value: " + value + "}"; } } @@ -208,12 +205,12 @@ public String toString() { private static final class ElevenLabsValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "type", allowSetters = true) - private ElevenLabs value; + private ElevenLabsSpeakProvider value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private ElevenLabsValue() {} - private ElevenLabsValue(ElevenLabs value) { + private ElevenLabsValue(ElevenLabsSpeakProvider value) { this.value = value; } @@ -239,7 +236,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakOneItemProvider{" + "value: " + value + "}"; + return "SpeakSettingsV1Provider{" + "value: " + value + "}"; } } @@ -279,7 +276,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakOneItemProvider{" + "value: " + value + "}"; + return "SpeakSettingsV1Provider{" + "value: " + value + "}"; } } @@ -288,12 +285,12 @@ public String toString() { private static final class OpenAiValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1SettingsAgentSpeakOneItemProviderOpenAi value; + private OpenAiSpeakProvider value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private OpenAiValue() {} - private OpenAiValue(AgentV1SettingsAgentSpeakOneItemProviderOpenAi value) { + private OpenAiValue(OpenAiSpeakProvider value) { this.value = value; } @@ -319,7 +316,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakOneItemProvider{" + "value: " + value + "}"; + return "SpeakSettingsV1Provider{" + "value: " + value + "}"; } } @@ -328,12 +325,12 @@ public String toString() { private static final class AwsPollyValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1SettingsAgentSpeakOneItemProviderAwsPolly value; + private AwsPollySpeakProvider value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) private AwsPollyValue() {} - private AwsPollyValue(AgentV1SettingsAgentSpeakOneItemProviderAwsPolly value) { + private AwsPollyValue(AwsPollySpeakProvider value) { this.value = value; } @@ -359,7 +356,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakOneItemProvider{" + "value: " + value + "}"; + return "SpeakSettingsV1Provider{" + "value: " + value + "}"; } } @@ -395,7 +392,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakOneItemProvider{" + "type: " + type + ", value: " + value + "}"; + return "SpeakSettingsV1Provider{" + "type: " + type + ", value: " + value + "}"; } } } diff --git a/src/main/java/com/deepgram/types/SpeakV1Model.java b/src/main/java/com/deepgram/types/SpeakV1Model.java index 8e6bca7..9bdccc2 100644 --- a/src/main/java/com/deepgram/types/SpeakV1Model.java +++ b/src/main/java/com/deepgram/types/SpeakV1Model.java @@ -7,132 +7,132 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class SpeakV1Model { - public static final SpeakV1Model AURA_ANGUS_EN = new SpeakV1Model(Value.AURA_ANGUS_EN, "aura-angus-en"); + public static final SpeakV1Model AURA2SIRIO_ES = new SpeakV1Model(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); - public static final SpeakV1Model AURA2JUPITER_EN = new SpeakV1Model(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); + public static final SpeakV1Model AURA2HERA_EN = new SpeakV1Model(Value.AURA2HERA_EN, "aura-2-hera-en"); - public static final SpeakV1Model AURA2CORA_EN = new SpeakV1Model(Value.AURA2CORA_EN, "aura-2-cora-en"); + public static final SpeakV1Model AURA2ASTERIA_EN = new SpeakV1Model(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); - public static final SpeakV1Model AURA_STELLA_EN = new SpeakV1Model(Value.AURA_STELLA_EN, "aura-stella-en"); + public static final SpeakV1Model AURA2HARMONIA_EN = new SpeakV1Model(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); - public static final SpeakV1Model AURA2HELENA_EN = new SpeakV1Model(Value.AURA2HELENA_EN, "aura-2-helena-en"); + public static final SpeakV1Model AURA2CARINA_ES = new SpeakV1Model(Value.AURA2CARINA_ES, "aura-2-carina-es"); - public static final SpeakV1Model AURA2AQUILA_ES = new SpeakV1Model(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); + public static final SpeakV1Model AURA_ZEUS_EN = new SpeakV1Model(Value.AURA_ZEUS_EN, "aura-zeus-en"); - public static final SpeakV1Model AURA2ATLAS_EN = new SpeakV1Model(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); + public static final SpeakV1Model AURA2HERMES_EN = new SpeakV1Model(Value.AURA2HERMES_EN, "aura-2-hermes-en"); - public static final SpeakV1Model AURA2ORION_EN = new SpeakV1Model(Value.AURA2ORION_EN, "aura-2-orion-en"); + public static final SpeakV1Model AURA2SELENA_ES = new SpeakV1Model(Value.AURA2SELENA_ES, "aura-2-selena-es"); - public static final SpeakV1Model AURA2DRACO_EN = new SpeakV1Model(Value.AURA2DRACO_EN, "aura-2-draco-en"); + public static final SpeakV1Model AURA2NEPTUNE_EN = new SpeakV1Model(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); - public static final SpeakV1Model AURA2HYPERION_EN = new SpeakV1Model(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); + public static final SpeakV1Model AURA2CALLISTA_EN = new SpeakV1Model(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); - public static final SpeakV1Model AURA2JANUS_EN = new SpeakV1Model(Value.AURA2JANUS_EN, "aura-2-janus-en"); + public static final SpeakV1Model AURA2AURORA_EN = new SpeakV1Model(Value.AURA2AURORA_EN, "aura-2-aurora-en"); - public static final SpeakV1Model AURA_HELIOS_EN = new SpeakV1Model(Value.AURA_HELIOS_EN, "aura-helios-en"); + public static final SpeakV1Model AURA2OPHELIA_EN = new SpeakV1Model(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); - public static final SpeakV1Model AURA2PLUTO_EN = new SpeakV1Model(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); + public static final SpeakV1Model AURA2APOLLO_EN = new SpeakV1Model(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); - public static final SpeakV1Model AURA2ARCAS_EN = new SpeakV1Model(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); + public static final SpeakV1Model AURA_LUNA_EN = new SpeakV1Model(Value.AURA_LUNA_EN, "aura-luna-en"); - public static final SpeakV1Model AURA2NESTOR_ES = new SpeakV1Model(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); + public static final SpeakV1Model AURA_ORPHEUS_EN = new SpeakV1Model(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); - public static final SpeakV1Model AURA2NEPTUNE_EN = new SpeakV1Model(Value.AURA2NEPTUNE_EN, "aura-2-neptune-en"); + public static final SpeakV1Model AURA2DELIA_EN = new SpeakV1Model(Value.AURA2DELIA_EN, "aura-2-delia-en"); - public static final SpeakV1Model AURA2MINERVA_EN = new SpeakV1Model(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); + public static final SpeakV1Model AURA2MARS_EN = new SpeakV1Model(Value.AURA2MARS_EN, "aura-2-mars-en"); - public static final SpeakV1Model AURA2ALVARO_ES = new SpeakV1Model(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); + public static final SpeakV1Model AURA2AMALTHEA_EN = new SpeakV1Model(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); - public static final SpeakV1Model AURA_ATHENA_EN = new SpeakV1Model(Value.AURA_ATHENA_EN, "aura-athena-en"); + public static final SpeakV1Model AURA_HERA_EN = new SpeakV1Model(Value.AURA_HERA_EN, "aura-hera-en"); - public static final SpeakV1Model AURA_PERSEUS_EN = new SpeakV1Model(Value.AURA_PERSEUS_EN, "aura-perseus-en"); + public static final SpeakV1Model AURA2SELENE_EN = new SpeakV1Model(Value.AURA2SELENE_EN, "aura-2-selene-en"); - public static final SpeakV1Model AURA2ODYSSEUS_EN = new SpeakV1Model(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); + public static final SpeakV1Model AURA2ARIES_EN = new SpeakV1Model(Value.AURA2ARIES_EN, "aura-2-aries-en"); - public static final SpeakV1Model AURA2PANDORA_EN = new SpeakV1Model(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); + public static final SpeakV1Model AURA2JUNO_EN = new SpeakV1Model(Value.AURA2JUNO_EN, "aura-2-juno-en"); - public static final SpeakV1Model AURA2ZEUS_EN = new SpeakV1Model(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); + public static final SpeakV1Model AURA2LUNA_EN = new SpeakV1Model(Value.AURA2LUNA_EN, "aura-2-luna-en"); - public static final SpeakV1Model AURA2ELECTRA_EN = new SpeakV1Model(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); + public static final SpeakV1Model AURA2JAVIER_ES = new SpeakV1Model(Value.AURA2JAVIER_ES, "aura-2-javier-es"); - public static final SpeakV1Model AURA2ORPHEUS_EN = new SpeakV1Model(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); + public static final SpeakV1Model AURA2PHOEBE_EN = new SpeakV1Model(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); - public static final SpeakV1Model AURA2THALIA_EN = new SpeakV1Model(Value.AURA2THALIA_EN, "aura-2-thalia-en"); + public static final SpeakV1Model AURA2DIANA_ES = new SpeakV1Model(Value.AURA2DIANA_ES, "aura-2-diana-es"); - public static final SpeakV1Model AURA2CELESTE_ES = new SpeakV1Model(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); + public static final SpeakV1Model AURA_ORION_EN = new SpeakV1Model(Value.AURA_ORION_EN, "aura-orion-en"); - public static final SpeakV1Model AURA_ASTERIA_EN = new SpeakV1Model(Value.AURA_ASTERIA_EN, "aura-asteria-en"); + public static final SpeakV1Model AURA2ANDROMEDA_EN = + new SpeakV1Model(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); - public static final SpeakV1Model AURA2ESTRELLA_ES = new SpeakV1Model(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); + public static final SpeakV1Model AURA2ATHENA_EN = new SpeakV1Model(Value.AURA2ATHENA_EN, "aura-2-athena-en"); - public static final SpeakV1Model AURA2HERA_EN = new SpeakV1Model(Value.AURA2HERA_EN, "aura-2-hera-en"); + public static final SpeakV1Model AURA2SATURN_EN = new SpeakV1Model(Value.AURA2SATURN_EN, "aura-2-saturn-en"); - public static final SpeakV1Model AURA2MARS_EN = new SpeakV1Model(Value.AURA2MARS_EN, "aura-2-mars-en"); + public static final SpeakV1Model AURA_ARCAS_EN = new SpeakV1Model(Value.AURA_ARCAS_EN, "aura-arcas-en"); - public static final SpeakV1Model AURA2SIRIO_ES = new SpeakV1Model(Value.AURA2SIRIO_ES, "aura-2-sirio-es"); + public static final SpeakV1Model AURA2THEIA_EN = new SpeakV1Model(Value.AURA2THEIA_EN, "aura-2-theia-en"); - public static final SpeakV1Model AURA2ASTERIA_EN = new SpeakV1Model(Value.AURA2ASTERIA_EN, "aura-2-asteria-en"); + public static final SpeakV1Model AURA2IRIS_EN = new SpeakV1Model(Value.AURA2IRIS_EN, "aura-2-iris-en"); - public static final SpeakV1Model AURA2HERMES_EN = new SpeakV1Model(Value.AURA2HERMES_EN, "aura-2-hermes-en"); + public static final SpeakV1Model AURA_ANGUS_EN = new SpeakV1Model(Value.AURA_ANGUS_EN, "aura-angus-en"); - public static final SpeakV1Model AURA2VESTA_EN = new SpeakV1Model(Value.AURA2VESTA_EN, "aura-2-vesta-en"); + public static final SpeakV1Model AURA2JUPITER_EN = new SpeakV1Model(Value.AURA2JUPITER_EN, "aura-2-jupiter-en"); - public static final SpeakV1Model AURA2CARINA_ES = new SpeakV1Model(Value.AURA2CARINA_ES, "aura-2-carina-es"); + public static final SpeakV1Model AURA2AQUILA_ES = new SpeakV1Model(Value.AURA2AQUILA_ES, "aura-2-aquila-es"); - public static final SpeakV1Model AURA2CALLISTA_EN = new SpeakV1Model(Value.AURA2CALLISTA_EN, "aura-2-callista-en"); + public static final SpeakV1Model AURA2CORA_EN = new SpeakV1Model(Value.AURA2CORA_EN, "aura-2-cora-en"); - public static final SpeakV1Model AURA2HARMONIA_EN = new SpeakV1Model(Value.AURA2HARMONIA_EN, "aura-2-harmonia-en"); + public static final SpeakV1Model AURA2CORDELIA_EN = new SpeakV1Model(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); - public static final SpeakV1Model AURA2SELENA_ES = new SpeakV1Model(Value.AURA2SELENA_ES, "aura-2-selena-es"); + public static final SpeakV1Model AURA2ATLAS_EN = new SpeakV1Model(Value.AURA2ATLAS_EN, "aura-2-atlas-en"); - public static final SpeakV1Model AURA2AURORA_EN = new SpeakV1Model(Value.AURA2AURORA_EN, "aura-2-aurora-en"); + public static final SpeakV1Model AURA2HELENA_EN = new SpeakV1Model(Value.AURA2HELENA_EN, "aura-2-helena-en"); - public static final SpeakV1Model AURA_ZEUS_EN = new SpeakV1Model(Value.AURA_ZEUS_EN, "aura-zeus-en"); + public static final SpeakV1Model AURA_STELLA_EN = new SpeakV1Model(Value.AURA_STELLA_EN, "aura-stella-en"); - public static final SpeakV1Model AURA2OPHELIA_EN = new SpeakV1Model(Value.AURA2OPHELIA_EN, "aura-2-ophelia-en"); + public static final SpeakV1Model AURA2DRACO_EN = new SpeakV1Model(Value.AURA2DRACO_EN, "aura-2-draco-en"); - public static final SpeakV1Model AURA2AMALTHEA_EN = new SpeakV1Model(Value.AURA2AMALTHEA_EN, "aura-2-amalthea-en"); + public static final SpeakV1Model AURA2HYPERION_EN = new SpeakV1Model(Value.AURA2HYPERION_EN, "aura-2-hyperion-en"); - public static final SpeakV1Model AURA_ORPHEUS_EN = new SpeakV1Model(Value.AURA_ORPHEUS_EN, "aura-orpheus-en"); + public static final SpeakV1Model AURA2CELESTE_ES = new SpeakV1Model(Value.AURA2CELESTE_ES, "aura-2-celeste-es"); - public static final SpeakV1Model AURA2DELIA_EN = new SpeakV1Model(Value.AURA2DELIA_EN, "aura-2-delia-en"); + public static final SpeakV1Model AURA_HELIOS_EN = new SpeakV1Model(Value.AURA_HELIOS_EN, "aura-helios-en"); - public static final SpeakV1Model AURA_LUNA_EN = new SpeakV1Model(Value.AURA_LUNA_EN, "aura-luna-en"); + public static final SpeakV1Model AURA2PLUTO_EN = new SpeakV1Model(Value.AURA2PLUTO_EN, "aura-2-pluto-en"); - public static final SpeakV1Model AURA2APOLLO_EN = new SpeakV1Model(Value.AURA2APOLLO_EN, "aura-2-apollo-en"); + public static final SpeakV1Model AURA2JANUS_EN = new SpeakV1Model(Value.AURA2JANUS_EN, "aura-2-janus-en"); - public static final SpeakV1Model AURA2SELENE_EN = new SpeakV1Model(Value.AURA2SELENE_EN, "aura-2-selene-en"); + public static final SpeakV1Model AURA2NESTOR_ES = new SpeakV1Model(Value.AURA2NESTOR_ES, "aura-2-nestor-es"); - public static final SpeakV1Model AURA2THEIA_EN = new SpeakV1Model(Value.AURA2THEIA_EN, "aura-2-theia-en"); + public static final SpeakV1Model AURA2ARCAS_EN = new SpeakV1Model(Value.AURA2ARCAS_EN, "aura-2-arcas-en"); - public static final SpeakV1Model AURA_HERA_EN = new SpeakV1Model(Value.AURA_HERA_EN, "aura-hera-en"); + public static final SpeakV1Model AURA2ORION_EN = new SpeakV1Model(Value.AURA2ORION_EN, "aura-2-orion-en"); - public static final SpeakV1Model AURA2CORDELIA_EN = new SpeakV1Model(Value.AURA2CORDELIA_EN, "aura-2-cordelia-en"); + public static final SpeakV1Model AURA_ATHENA_EN = new SpeakV1Model(Value.AURA_ATHENA_EN, "aura-athena-en"); - public static final SpeakV1Model AURA2ANDROMEDA_EN = - new SpeakV1Model(Value.AURA2ANDROMEDA_EN, "aura-2-andromeda-en"); + public static final SpeakV1Model AURA2ODYSSEUS_EN = new SpeakV1Model(Value.AURA2ODYSSEUS_EN, "aura-2-odysseus-en"); - public static final SpeakV1Model AURA2ARIES_EN = new SpeakV1Model(Value.AURA2ARIES_EN, "aura-2-aries-en"); + public static final SpeakV1Model AURA2PANDORA_EN = new SpeakV1Model(Value.AURA2PANDORA_EN, "aura-2-pandora-en"); - public static final SpeakV1Model AURA2JUNO_EN = new SpeakV1Model(Value.AURA2JUNO_EN, "aura-2-juno-en"); + public static final SpeakV1Model AURA2MINERVA_EN = new SpeakV1Model(Value.AURA2MINERVA_EN, "aura-2-minerva-en"); - public static final SpeakV1Model AURA2LUNA_EN = new SpeakV1Model(Value.AURA2LUNA_EN, "aura-2-luna-en"); + public static final SpeakV1Model AURA2ALVARO_ES = new SpeakV1Model(Value.AURA2ALVARO_ES, "aura-2-alvaro-es"); - public static final SpeakV1Model AURA2DIANA_ES = new SpeakV1Model(Value.AURA2DIANA_ES, "aura-2-diana-es"); + public static final SpeakV1Model AURA_PERSEUS_EN = new SpeakV1Model(Value.AURA_PERSEUS_EN, "aura-perseus-en"); - public static final SpeakV1Model AURA2JAVIER_ES = new SpeakV1Model(Value.AURA2JAVIER_ES, "aura-2-javier-es"); + public static final SpeakV1Model AURA2VESTA_EN = new SpeakV1Model(Value.AURA2VESTA_EN, "aura-2-vesta-en"); - public static final SpeakV1Model AURA_ORION_EN = new SpeakV1Model(Value.AURA_ORION_EN, "aura-orion-en"); + public static final SpeakV1Model AURA_ASTERIA_EN = new SpeakV1Model(Value.AURA_ASTERIA_EN, "aura-asteria-en"); - public static final SpeakV1Model AURA_ARCAS_EN = new SpeakV1Model(Value.AURA_ARCAS_EN, "aura-arcas-en"); + public static final SpeakV1Model AURA2ZEUS_EN = new SpeakV1Model(Value.AURA2ZEUS_EN, "aura-2-zeus-en"); - public static final SpeakV1Model AURA2IRIS_EN = new SpeakV1Model(Value.AURA2IRIS_EN, "aura-2-iris-en"); + public static final SpeakV1Model AURA2ELECTRA_EN = new SpeakV1Model(Value.AURA2ELECTRA_EN, "aura-2-electra-en"); - public static final SpeakV1Model AURA2ATHENA_EN = new SpeakV1Model(Value.AURA2ATHENA_EN, "aura-2-athena-en"); + public static final SpeakV1Model AURA2ORPHEUS_EN = new SpeakV1Model(Value.AURA2ORPHEUS_EN, "aura-2-orpheus-en"); - public static final SpeakV1Model AURA2SATURN_EN = new SpeakV1Model(Value.AURA2SATURN_EN, "aura-2-saturn-en"); + public static final SpeakV1Model AURA2ESTRELLA_ES = new SpeakV1Model(Value.AURA2ESTRELLA_ES, "aura-2-estrella-es"); - public static final SpeakV1Model AURA2PHOEBE_EN = new SpeakV1Model(Value.AURA2PHOEBE_EN, "aura-2-phoebe-en"); + public static final SpeakV1Model AURA2THALIA_EN = new SpeakV1Model(Value.AURA2THALIA_EN, "aura-2-thalia-en"); private final Value value; @@ -165,132 +165,132 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case AURA_ANGUS_EN: - return visitor.visitAuraAngusEn(); - case AURA2JUPITER_EN: - return visitor.visitAura2JupiterEn(); - case AURA2CORA_EN: - return visitor.visitAura2CoraEn(); - case AURA_STELLA_EN: - return visitor.visitAuraStellaEn(); - case AURA2HELENA_EN: - return visitor.visitAura2HelenaEn(); - case AURA2AQUILA_ES: - return visitor.visitAura2AquilaEs(); - case AURA2ATLAS_EN: - return visitor.visitAura2AtlasEn(); - case AURA2ORION_EN: - return visitor.visitAura2OrionEn(); - case AURA2DRACO_EN: - return visitor.visitAura2DracoEn(); - case AURA2HYPERION_EN: - return visitor.visitAura2HyperionEn(); - case AURA2JANUS_EN: - return visitor.visitAura2JanusEn(); - case AURA_HELIOS_EN: - return visitor.visitAuraHeliosEn(); - case AURA2PLUTO_EN: - return visitor.visitAura2PlutoEn(); - case AURA2ARCAS_EN: - return visitor.visitAura2ArcasEn(); - case AURA2NESTOR_ES: - return visitor.visitAura2NestorEs(); - case AURA2NEPTUNE_EN: - return visitor.visitAura2NeptuneEn(); - case AURA2MINERVA_EN: - return visitor.visitAura2MinervaEn(); - case AURA2ALVARO_ES: - return visitor.visitAura2AlvaroEs(); - case AURA_ATHENA_EN: - return visitor.visitAuraAthenaEn(); - case AURA_PERSEUS_EN: - return visitor.visitAuraPerseusEn(); - case AURA2ODYSSEUS_EN: - return visitor.visitAura2OdysseusEn(); - case AURA2PANDORA_EN: - return visitor.visitAura2PandoraEn(); - case AURA2ZEUS_EN: - return visitor.visitAura2ZeusEn(); - case AURA2ELECTRA_EN: - return visitor.visitAura2ElectraEn(); - case AURA2ORPHEUS_EN: - return visitor.visitAura2OrpheusEn(); - case AURA2THALIA_EN: - return visitor.visitAura2ThaliaEn(); - case AURA2CELESTE_ES: - return visitor.visitAura2CelesteEs(); - case AURA_ASTERIA_EN: - return visitor.visitAuraAsteriaEn(); - case AURA2ESTRELLA_ES: - return visitor.visitAura2EstrellaEs(); - case AURA2HERA_EN: - return visitor.visitAura2HeraEn(); - case AURA2MARS_EN: - return visitor.visitAura2MarsEn(); case AURA2SIRIO_ES: return visitor.visitAura2SirioEs(); + case AURA2HERA_EN: + return visitor.visitAura2HeraEn(); case AURA2ASTERIA_EN: return visitor.visitAura2AsteriaEn(); - case AURA2HERMES_EN: - return visitor.visitAura2HermesEn(); - case AURA2VESTA_EN: - return visitor.visitAura2VestaEn(); - case AURA2CARINA_ES: - return visitor.visitAura2CarinaEs(); - case AURA2CALLISTA_EN: - return visitor.visitAura2CallistaEn(); case AURA2HARMONIA_EN: return visitor.visitAura2HarmoniaEn(); + case AURA2CARINA_ES: + return visitor.visitAura2CarinaEs(); + case AURA_ZEUS_EN: + return visitor.visitAuraZeusEn(); + case AURA2HERMES_EN: + return visitor.visitAura2HermesEn(); case AURA2SELENA_ES: return visitor.visitAura2SelenaEs(); + case AURA2NEPTUNE_EN: + return visitor.visitAura2NeptuneEn(); + case AURA2CALLISTA_EN: + return visitor.visitAura2CallistaEn(); case AURA2AURORA_EN: return visitor.visitAura2AuroraEn(); - case AURA_ZEUS_EN: - return visitor.visitAuraZeusEn(); case AURA2OPHELIA_EN: return visitor.visitAura2OpheliaEn(); - case AURA2AMALTHEA_EN: - return visitor.visitAura2AmaltheaEn(); + case AURA2APOLLO_EN: + return visitor.visitAura2ApolloEn(); + case AURA_LUNA_EN: + return visitor.visitAuraLunaEn(); case AURA_ORPHEUS_EN: return visitor.visitAuraOrpheusEn(); case AURA2DELIA_EN: return visitor.visitAura2DeliaEn(); - case AURA_LUNA_EN: - return visitor.visitAuraLunaEn(); - case AURA2APOLLO_EN: - return visitor.visitAura2ApolloEn(); - case AURA2SELENE_EN: - return visitor.visitAura2SeleneEn(); - case AURA2THEIA_EN: - return visitor.visitAura2TheiaEn(); + case AURA2MARS_EN: + return visitor.visitAura2MarsEn(); + case AURA2AMALTHEA_EN: + return visitor.visitAura2AmaltheaEn(); case AURA_HERA_EN: return visitor.visitAuraHeraEn(); - case AURA2CORDELIA_EN: - return visitor.visitAura2CordeliaEn(); - case AURA2ANDROMEDA_EN: - return visitor.visitAura2AndromedaEn(); + case AURA2SELENE_EN: + return visitor.visitAura2SeleneEn(); case AURA2ARIES_EN: return visitor.visitAura2AriesEn(); case AURA2JUNO_EN: return visitor.visitAura2JunoEn(); case AURA2LUNA_EN: return visitor.visitAura2LunaEn(); - case AURA2DIANA_ES: - return visitor.visitAura2DianaEs(); case AURA2JAVIER_ES: return visitor.visitAura2JavierEs(); + case AURA2PHOEBE_EN: + return visitor.visitAura2PhoebeEn(); + case AURA2DIANA_ES: + return visitor.visitAura2DianaEs(); case AURA_ORION_EN: return visitor.visitAuraOrionEn(); - case AURA_ARCAS_EN: - return visitor.visitAuraArcasEn(); - case AURA2IRIS_EN: - return visitor.visitAura2IrisEn(); + case AURA2ANDROMEDA_EN: + return visitor.visitAura2AndromedaEn(); case AURA2ATHENA_EN: return visitor.visitAura2AthenaEn(); case AURA2SATURN_EN: return visitor.visitAura2SaturnEn(); - case AURA2PHOEBE_EN: - return visitor.visitAura2PhoebeEn(); + case AURA_ARCAS_EN: + return visitor.visitAuraArcasEn(); + case AURA2THEIA_EN: + return visitor.visitAura2TheiaEn(); + case AURA2IRIS_EN: + return visitor.visitAura2IrisEn(); + case AURA_ANGUS_EN: + return visitor.visitAuraAngusEn(); + case AURA2JUPITER_EN: + return visitor.visitAura2JupiterEn(); + case AURA2AQUILA_ES: + return visitor.visitAura2AquilaEs(); + case AURA2CORA_EN: + return visitor.visitAura2CoraEn(); + case AURA2CORDELIA_EN: + return visitor.visitAura2CordeliaEn(); + case AURA2ATLAS_EN: + return visitor.visitAura2AtlasEn(); + case AURA2HELENA_EN: + return visitor.visitAura2HelenaEn(); + case AURA_STELLA_EN: + return visitor.visitAuraStellaEn(); + case AURA2DRACO_EN: + return visitor.visitAura2DracoEn(); + case AURA2HYPERION_EN: + return visitor.visitAura2HyperionEn(); + case AURA2CELESTE_ES: + return visitor.visitAura2CelesteEs(); + case AURA_HELIOS_EN: + return visitor.visitAuraHeliosEn(); + case AURA2PLUTO_EN: + return visitor.visitAura2PlutoEn(); + case AURA2JANUS_EN: + return visitor.visitAura2JanusEn(); + case AURA2NESTOR_ES: + return visitor.visitAura2NestorEs(); + case AURA2ARCAS_EN: + return visitor.visitAura2ArcasEn(); + case AURA2ORION_EN: + return visitor.visitAura2OrionEn(); + case AURA_ATHENA_EN: + return visitor.visitAuraAthenaEn(); + case AURA2ODYSSEUS_EN: + return visitor.visitAura2OdysseusEn(); + case AURA2PANDORA_EN: + return visitor.visitAura2PandoraEn(); + case AURA2MINERVA_EN: + return visitor.visitAura2MinervaEn(); + case AURA2ALVARO_ES: + return visitor.visitAura2AlvaroEs(); + case AURA_PERSEUS_EN: + return visitor.visitAuraPerseusEn(); + case AURA2VESTA_EN: + return visitor.visitAura2VestaEn(); + case AURA_ASTERIA_EN: + return visitor.visitAuraAsteriaEn(); + case AURA2ZEUS_EN: + return visitor.visitAura2ZeusEn(); + case AURA2ELECTRA_EN: + return visitor.visitAura2ElectraEn(); + case AURA2ORPHEUS_EN: + return visitor.visitAura2OrpheusEn(); + case AURA2ESTRELLA_ES: + return visitor.visitAura2EstrellaEs(); + case AURA2THALIA_EN: + return visitor.visitAura2ThaliaEn(); case UNKNOWN: default: return visitor.visitUnknown(string); @@ -300,132 +300,132 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static SpeakV1Model valueOf(String value) { switch (value) { - case "aura-angus-en": - return AURA_ANGUS_EN; - case "aura-2-jupiter-en": - return AURA2JUPITER_EN; - case "aura-2-cora-en": - return AURA2CORA_EN; - case "aura-stella-en": - return AURA_STELLA_EN; - case "aura-2-helena-en": - return AURA2HELENA_EN; - case "aura-2-aquila-es": - return AURA2AQUILA_ES; - case "aura-2-atlas-en": - return AURA2ATLAS_EN; - case "aura-2-orion-en": - return AURA2ORION_EN; - case "aura-2-draco-en": - return AURA2DRACO_EN; - case "aura-2-hyperion-en": - return AURA2HYPERION_EN; - case "aura-2-janus-en": - return AURA2JANUS_EN; - case "aura-helios-en": - return AURA_HELIOS_EN; - case "aura-2-pluto-en": - return AURA2PLUTO_EN; - case "aura-2-arcas-en": - return AURA2ARCAS_EN; - case "aura-2-nestor-es": - return AURA2NESTOR_ES; - case "aura-2-neptune-en": - return AURA2NEPTUNE_EN; - case "aura-2-minerva-en": - return AURA2MINERVA_EN; - case "aura-2-alvaro-es": - return AURA2ALVARO_ES; - case "aura-athena-en": - return AURA_ATHENA_EN; - case "aura-perseus-en": - return AURA_PERSEUS_EN; - case "aura-2-odysseus-en": - return AURA2ODYSSEUS_EN; - case "aura-2-pandora-en": - return AURA2PANDORA_EN; - case "aura-2-zeus-en": - return AURA2ZEUS_EN; - case "aura-2-electra-en": - return AURA2ELECTRA_EN; - case "aura-2-orpheus-en": - return AURA2ORPHEUS_EN; - case "aura-2-thalia-en": - return AURA2THALIA_EN; - case "aura-2-celeste-es": - return AURA2CELESTE_ES; - case "aura-asteria-en": - return AURA_ASTERIA_EN; - case "aura-2-estrella-es": - return AURA2ESTRELLA_ES; - case "aura-2-hera-en": - return AURA2HERA_EN; - case "aura-2-mars-en": - return AURA2MARS_EN; case "aura-2-sirio-es": return AURA2SIRIO_ES; + case "aura-2-hera-en": + return AURA2HERA_EN; case "aura-2-asteria-en": return AURA2ASTERIA_EN; - case "aura-2-hermes-en": - return AURA2HERMES_EN; - case "aura-2-vesta-en": - return AURA2VESTA_EN; - case "aura-2-carina-es": - return AURA2CARINA_ES; - case "aura-2-callista-en": - return AURA2CALLISTA_EN; case "aura-2-harmonia-en": return AURA2HARMONIA_EN; + case "aura-2-carina-es": + return AURA2CARINA_ES; + case "aura-zeus-en": + return AURA_ZEUS_EN; + case "aura-2-hermes-en": + return AURA2HERMES_EN; case "aura-2-selena-es": return AURA2SELENA_ES; + case "aura-2-neptune-en": + return AURA2NEPTUNE_EN; + case "aura-2-callista-en": + return AURA2CALLISTA_EN; case "aura-2-aurora-en": return AURA2AURORA_EN; - case "aura-zeus-en": - return AURA_ZEUS_EN; case "aura-2-ophelia-en": return AURA2OPHELIA_EN; - case "aura-2-amalthea-en": - return AURA2AMALTHEA_EN; + case "aura-2-apollo-en": + return AURA2APOLLO_EN; + case "aura-luna-en": + return AURA_LUNA_EN; case "aura-orpheus-en": return AURA_ORPHEUS_EN; case "aura-2-delia-en": return AURA2DELIA_EN; - case "aura-luna-en": - return AURA_LUNA_EN; - case "aura-2-apollo-en": - return AURA2APOLLO_EN; - case "aura-2-selene-en": - return AURA2SELENE_EN; - case "aura-2-theia-en": - return AURA2THEIA_EN; + case "aura-2-mars-en": + return AURA2MARS_EN; + case "aura-2-amalthea-en": + return AURA2AMALTHEA_EN; case "aura-hera-en": return AURA_HERA_EN; - case "aura-2-cordelia-en": - return AURA2CORDELIA_EN; - case "aura-2-andromeda-en": - return AURA2ANDROMEDA_EN; + case "aura-2-selene-en": + return AURA2SELENE_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 "aura-2-diana-es": - return AURA2DIANA_ES; case "aura-2-javier-es": return AURA2JAVIER_ES; + case "aura-2-phoebe-en": + return AURA2PHOEBE_EN; + case "aura-2-diana-es": + return AURA2DIANA_ES; case "aura-orion-en": return AURA_ORION_EN; - case "aura-arcas-en": - return AURA_ARCAS_EN; - case "aura-2-iris-en": - return AURA2IRIS_EN; + case "aura-2-andromeda-en": + return AURA2ANDROMEDA_EN; case "aura-2-athena-en": return AURA2ATHENA_EN; case "aura-2-saturn-en": return AURA2SATURN_EN; - case "aura-2-phoebe-en": - return AURA2PHOEBE_EN; + case "aura-arcas-en": + return AURA_ARCAS_EN; + case "aura-2-theia-en": + return AURA2THEIA_EN; + case "aura-2-iris-en": + return AURA2IRIS_EN; + case "aura-angus-en": + return AURA_ANGUS_EN; + case "aura-2-jupiter-en": + return AURA2JUPITER_EN; + case "aura-2-aquila-es": + return AURA2AQUILA_ES; + case "aura-2-cora-en": + return AURA2CORA_EN; + case "aura-2-cordelia-en": + return AURA2CORDELIA_EN; + case "aura-2-atlas-en": + return AURA2ATLAS_EN; + case "aura-2-helena-en": + return AURA2HELENA_EN; + case "aura-stella-en": + return AURA_STELLA_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 "aura-helios-en": + return AURA_HELIOS_EN; + case "aura-2-pluto-en": + return AURA2PLUTO_EN; + case "aura-2-janus-en": + return AURA2JANUS_EN; + case "aura-2-nestor-es": + return AURA2NESTOR_ES; + case "aura-2-arcas-en": + return AURA2ARCAS_EN; + case "aura-2-orion-en": + return AURA2ORION_EN; + case "aura-athena-en": + return AURA_ATHENA_EN; + case "aura-2-odysseus-en": + return AURA2ODYSSEUS_EN; + case "aura-2-pandora-en": + return AURA2PANDORA_EN; + case "aura-2-minerva-en": + return AURA2MINERVA_EN; + case "aura-2-alvaro-es": + return AURA2ALVARO_ES; + case "aura-perseus-en": + return AURA_PERSEUS_EN; + case "aura-2-vesta-en": + return AURA2VESTA_EN; + case "aura-asteria-en": + return AURA_ASTERIA_EN; + case "aura-2-zeus-en": + return AURA2ZEUS_EN; + case "aura-2-electra-en": + return AURA2ELECTRA_EN; + case "aura-2-orpheus-en": + return AURA2ORPHEUS_EN; + case "aura-2-estrella-es": + return AURA2ESTRELLA_ES; + case "aura-2-thalia-en": + return AURA2THALIA_EN; default: return new SpeakV1Model(Value.UNKNOWN, value); } diff --git a/src/main/java/com/deepgram/types/SpeakV1SampleRate.java b/src/main/java/com/deepgram/types/SpeakV1SampleRate.java index bfb4bdf..5481b28 100644 --- a/src/main/java/com/deepgram/types/SpeakV1SampleRate.java +++ b/src/main/java/com/deepgram/types/SpeakV1SampleRate.java @@ -7,10 +7,10 @@ import com.fasterxml.jackson.annotation.JsonValue; public final class SpeakV1SampleRate { - public static final SpeakV1SampleRate EIGHT_THOUSAND = new SpeakV1SampleRate(Value.EIGHT_THOUSAND, "8000"); - public static final SpeakV1SampleRate SIXTEEN_THOUSAND = new SpeakV1SampleRate(Value.SIXTEEN_THOUSAND, "16000"); + public static final SpeakV1SampleRate EIGHT_THOUSAND = new SpeakV1SampleRate(Value.EIGHT_THOUSAND, "8000"); + public static final SpeakV1SampleRate FORTY_EIGHT_THOUSAND = new SpeakV1SampleRate(Value.FORTY_EIGHT_THOUSAND, "48000"); @@ -52,10 +52,10 @@ public int hashCode() { public T visit(Visitor visitor) { switch (value) { - case EIGHT_THOUSAND: - return visitor.visitEightThousand(); case SIXTEEN_THOUSAND: return visitor.visitSixteenThousand(); + case EIGHT_THOUSAND: + return visitor.visitEightThousand(); case FORTY_EIGHT_THOUSAND: return visitor.visitFortyEightThousand(); case TWENTY_FOUR_THOUSAND: @@ -71,10 +71,10 @@ public T visit(Visitor visitor) { @JsonCreator(mode = JsonCreator.Mode.DELEGATING) public static SpeakV1SampleRate valueOf(String value) { switch (value) { - case "8000": - return EIGHT_THOUSAND; case "16000": return SIXTEEN_THOUSAND; + case "8000": + return EIGHT_THOUSAND; case "48000": return FORTY_EIGHT_THOUSAND; case "24000": diff --git a/src/main/java/com/deepgram/types/ThinkSettingsV1.java b/src/main/java/com/deepgram/types/ThinkSettingsV1.java index fcc4e16..70091e5 100644 --- a/src/main/java/com/deepgram/types/ThinkSettingsV1.java +++ b/src/main/java/com/deepgram/types/ThinkSettingsV1.java @@ -13,24 +13,70 @@ import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ThinkSettingsV1.Builder.class) public final class ThinkSettingsV1 { - private final Optional contextLength; + private final ThinkSettingsV1Provider provider; + + private final Optional endpoint; + + private final Optional> functions; + + private final Optional prompt; + + private final Optional contextLength; private final Map additionalProperties; - private ThinkSettingsV1(Optional contextLength, Map additionalProperties) { + private ThinkSettingsV1( + ThinkSettingsV1Provider provider, + Optional endpoint, + Optional> functions, + Optional prompt, + Optional contextLength, + Map additionalProperties) { + this.provider = provider; + this.endpoint = endpoint; + this.functions = functions; + this.prompt = prompt; this.contextLength = contextLength; this.additionalProperties = additionalProperties; } + @JsonProperty("provider") + public ThinkSettingsV1Provider getProvider() { + return provider; + } + + /** + * @return Optional for non-Deepgram LLM providers. When present, must include url field and headers object + */ + @JsonProperty("endpoint") + public Optional getEndpoint() { + return endpoint; + } + + @JsonProperty("functions") + public Optional> getFunctions() { + return functions; + } + + @JsonProperty("prompt") + public Optional getPrompt() { + return prompt; + } + + /** + * @return Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used + */ @JsonProperty("context_length") - public Optional getContextLength() { + public Optional getContextLength() { return contextLength; } @@ -46,12 +92,16 @@ public Map getAdditionalProperties() { } private boolean equalTo(ThinkSettingsV1 other) { - return contextLength.equals(other.contextLength); + return provider.equals(other.provider) + && endpoint.equals(other.endpoint) + && functions.equals(other.functions) + && prompt.equals(other.prompt) + && contextLength.equals(other.contextLength); } @java.lang.Override public int hashCode() { - return Objects.hash(this.contextLength); + return Objects.hash(this.provider, this.endpoint, this.functions, this.prompt, this.contextLength); } @java.lang.Override @@ -59,44 +109,158 @@ public String toString() { return ObjectMappers.stringify(this); } - public static Builder builder() { + public static ProviderStage builder() { return new Builder(); } + public interface ProviderStage { + _FinalStage provider(@NotNull ThinkSettingsV1Provider provider); + + Builder from(ThinkSettingsV1 other); + } + + public interface _FinalStage { + ThinkSettingsV1 build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(Map additionalProperties); + + /** + *

Optional for non-Deepgram LLM providers. When present, must include url field and headers object

+ */ + _FinalStage endpoint(Optional endpoint); + + _FinalStage endpoint(ThinkSettingsV1Endpoint endpoint); + + _FinalStage functions(Optional> functions); + + _FinalStage functions(List functions); + + _FinalStage prompt(Optional prompt); + + _FinalStage prompt(String prompt); + + /** + *

Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used

+ */ + _FinalStage contextLength(Optional contextLength); + + _FinalStage contextLength(ThinkSettingsV1ContextLength contextLength); + } + @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional contextLength = Optional.empty(); + public static final class Builder implements ProviderStage, _FinalStage { + private ThinkSettingsV1Provider provider; + + private Optional contextLength = Optional.empty(); + + private Optional prompt = Optional.empty(); + + private Optional> functions = Optional.empty(); + + private Optional endpoint = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} + @java.lang.Override public Builder from(ThinkSettingsV1 other) { + provider(other.getProvider()); + endpoint(other.getEndpoint()); + functions(other.getFunctions()); + prompt(other.getPrompt()); contextLength(other.getContextLength()); return this; } + @java.lang.Override + @JsonSetter("provider") + public _FinalStage provider(@NotNull ThinkSettingsV1Provider provider) { + this.provider = Objects.requireNonNull(provider, "provider must not be null"); + return this; + } + + /** + *

Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used

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

Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used

+ */ + @java.lang.Override @JsonSetter(value = "context_length", nulls = Nulls.SKIP) - public Builder contextLength(Optional contextLength) { + public _FinalStage contextLength(Optional contextLength) { this.contextLength = contextLength; return this; } - public Builder contextLength(Object contextLength) { - this.contextLength = Optional.ofNullable(contextLength); + @java.lang.Override + public _FinalStage prompt(String prompt) { + this.prompt = Optional.ofNullable(prompt); + return this; + } + + @java.lang.Override + @JsonSetter(value = "prompt", nulls = Nulls.SKIP) + public _FinalStage prompt(Optional prompt) { + this.prompt = prompt; + return this; + } + + @java.lang.Override + public _FinalStage functions(List functions) { + this.functions = Optional.ofNullable(functions); + return this; + } + + @java.lang.Override + @JsonSetter(value = "functions", nulls = Nulls.SKIP) + public _FinalStage functions(Optional> functions) { + this.functions = functions; + return this; + } + + /** + *

Optional for non-Deepgram LLM providers. When present, must include url field and headers object

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

Optional for non-Deepgram LLM providers. When present, must include url field and headers object

+ */ + @java.lang.Override + @JsonSetter(value = "endpoint", nulls = Nulls.SKIP) + public _FinalStage endpoint(Optional endpoint) { + this.endpoint = endpoint; return this; } + @java.lang.Override public ThinkSettingsV1 build() { - return new ThinkSettingsV1(contextLength, additionalProperties); + return new ThinkSettingsV1(provider, endpoint, functions, prompt, contextLength, 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/agent/v1/types/AgentV1SettingsAgentThinkOneItemContextLength.java b/src/main/java/com/deepgram/types/ThinkSettingsV1ContextLength.java similarity index 66% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemContextLength.java rename to src/main/java/com/deepgram/types/ThinkSettingsV1ContextLength.java index fc34f58..6d61970 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemContextLength.java +++ b/src/main/java/com/deepgram/types/ThinkSettingsV1ContextLength.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.deepgram.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonValue; @@ -13,13 +13,13 @@ import java.io.IOException; import java.util.Objects; -@JsonDeserialize(using = AgentV1SettingsAgentThinkOneItemContextLength.Deserializer.class) -public final class AgentV1SettingsAgentThinkOneItemContextLength { +@JsonDeserialize(using = ThinkSettingsV1ContextLength.Deserializer.class) +public final class ThinkSettingsV1ContextLength { private final Object value; private final int type; - private AgentV1SettingsAgentThinkOneItemContextLength(Object value, int type) { + private ThinkSettingsV1ContextLength(Object value, int type) { this.value = value; this.type = type; } @@ -42,11 +42,10 @@ public T visit(Visitor visitor) { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AgentV1SettingsAgentThinkOneItemContextLength - && equalTo((AgentV1SettingsAgentThinkOneItemContextLength) other); + return other instanceof ThinkSettingsV1ContextLength && equalTo((ThinkSettingsV1ContextLength) other); } - private boolean equalTo(AgentV1SettingsAgentThinkOneItemContextLength other) { + private boolean equalTo(ThinkSettingsV1ContextLength other) { return value.equals(other.value); } @@ -66,12 +65,12 @@ public String toString() { *
  • "max"
  • * */ - public static AgentV1SettingsAgentThinkOneItemContextLength of(String value) { - return new AgentV1SettingsAgentThinkOneItemContextLength(value, 0); + public static ThinkSettingsV1ContextLength of(String value) { + return new ThinkSettingsV1ContextLength(value, 0); } - public static AgentV1SettingsAgentThinkOneItemContextLength of(double value) { - return new AgentV1SettingsAgentThinkOneItemContextLength(value, 1); + public static ThinkSettingsV1ContextLength of(double value) { + return new ThinkSettingsV1ContextLength(value, 1); } public interface Visitor { @@ -86,22 +85,22 @@ public interface Visitor { T visit(double value); } - static final class Deserializer extends StdDeserializer { + static final class Deserializer extends StdDeserializer { Deserializer() { - super(AgentV1SettingsAgentThinkOneItemContextLength.class); + super(ThinkSettingsV1ContextLength.class); } @java.lang.Override - public AgentV1SettingsAgentThinkOneItemContextLength deserialize(JsonParser p, DeserializationContext context) + public ThinkSettingsV1ContextLength deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); + if (value instanceof Double) { + return of((Double) value); + } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); } catch (RuntimeException e) { } - if (value instanceof Double) { - return of((Double) value); - } throw new JsonParseException(p, "Failed to deserialize"); } } diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemEndpoint.java b/src/main/java/com/deepgram/types/ThinkSettingsV1Endpoint.java similarity index 83% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemEndpoint.java rename to src/main/java/com/deepgram/types/ThinkSettingsV1Endpoint.java index fcc2e7c..23a9235 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemEndpoint.java +++ b/src/main/java/com/deepgram/types/ThinkSettingsV1Endpoint.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.deepgram.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,15 +18,15 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1SettingsAgentThinkOneItemEndpoint.Builder.class) -public final class AgentV1SettingsAgentThinkOneItemEndpoint { +@JsonDeserialize(builder = ThinkSettingsV1Endpoint.Builder.class) +public final class ThinkSettingsV1Endpoint { private final Optional url; private final Optional> headers; private final Map additionalProperties; - private AgentV1SettingsAgentThinkOneItemEndpoint( + private ThinkSettingsV1Endpoint( Optional url, Optional> headers, Map additionalProperties) { this.url = url; this.headers = headers; @@ -52,8 +52,7 @@ public Optional> getHeaders() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AgentV1SettingsAgentThinkOneItemEndpoint - && equalTo((AgentV1SettingsAgentThinkOneItemEndpoint) other); + return other instanceof ThinkSettingsV1Endpoint && equalTo((ThinkSettingsV1Endpoint) other); } @JsonAnyGetter @@ -61,7 +60,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(AgentV1SettingsAgentThinkOneItemEndpoint other) { + private boolean equalTo(ThinkSettingsV1Endpoint other) { return url.equals(other.url) && headers.equals(other.headers); } @@ -90,7 +89,7 @@ public static final class Builder { private Builder() {} - public Builder from(AgentV1SettingsAgentThinkOneItemEndpoint other) { + public Builder from(ThinkSettingsV1Endpoint other) { url(other.getUrl()); headers(other.getHeaders()); return this; @@ -124,8 +123,8 @@ public Builder headers(Map headers) { return this; } - public AgentV1SettingsAgentThinkOneItemEndpoint build() { - return new AgentV1SettingsAgentThinkOneItemEndpoint(url, headers, additionalProperties); + public ThinkSettingsV1Endpoint build() { + return new ThinkSettingsV1Endpoint(url, headers, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemFunctionsItem.java b/src/main/java/com/deepgram/types/ThinkSettingsV1FunctionsItem.java similarity index 79% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemFunctionsItem.java rename to src/main/java/com/deepgram/types/ThinkSettingsV1FunctionsItem.java index a6393b5..94e54d1 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemFunctionsItem.java +++ b/src/main/java/com/deepgram/types/ThinkSettingsV1FunctionsItem.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.deepgram.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,23 +18,23 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1SettingsAgentThinkOneItemFunctionsItem.Builder.class) -public final class AgentV1SettingsAgentThinkOneItemFunctionsItem { +@JsonDeserialize(builder = ThinkSettingsV1FunctionsItem.Builder.class) +public final class ThinkSettingsV1FunctionsItem { private final Optional name; private final Optional description; private final Optional> parameters; - private final Optional endpoint; + private final Optional endpoint; private final Map additionalProperties; - private AgentV1SettingsAgentThinkOneItemFunctionsItem( + private ThinkSettingsV1FunctionsItem( Optional name, Optional description, Optional> parameters, - Optional endpoint, + Optional endpoint, Map additionalProperties) { this.name = name; this.description = description; @@ -71,15 +71,14 @@ public Optional> getParameters() { * @return The Function endpoint to call. if not passed, function is called client-side */ @JsonProperty("endpoint") - public Optional getEndpoint() { + public Optional getEndpoint() { return endpoint; } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AgentV1SettingsAgentThinkOneItemFunctionsItem - && equalTo((AgentV1SettingsAgentThinkOneItemFunctionsItem) other); + return other instanceof ThinkSettingsV1FunctionsItem && equalTo((ThinkSettingsV1FunctionsItem) other); } @JsonAnyGetter @@ -87,7 +86,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(AgentV1SettingsAgentThinkOneItemFunctionsItem other) { + private boolean equalTo(ThinkSettingsV1FunctionsItem other) { return name.equals(other.name) && description.equals(other.description) && parameters.equals(other.parameters) @@ -116,14 +115,14 @@ public static final class Builder { private Optional> parameters = Optional.empty(); - private Optional endpoint = Optional.empty(); + private Optional endpoint = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); private Builder() {} - public Builder from(AgentV1SettingsAgentThinkOneItemFunctionsItem other) { + public Builder from(ThinkSettingsV1FunctionsItem other) { name(other.getName()); description(other.getDescription()); parameters(other.getParameters()); @@ -177,19 +176,18 @@ public Builder parameters(Map parameters) { *

    The Function endpoint to call. if not passed, function is called client-side

    */ @JsonSetter(value = "endpoint", nulls = Nulls.SKIP) - public Builder endpoint(Optional endpoint) { + public Builder endpoint(Optional endpoint) { this.endpoint = endpoint; return this; } - public Builder endpoint(AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint endpoint) { + public Builder endpoint(ThinkSettingsV1FunctionsItemEndpoint endpoint) { this.endpoint = Optional.ofNullable(endpoint); return this; } - public AgentV1SettingsAgentThinkOneItemFunctionsItem build() { - return new AgentV1SettingsAgentThinkOneItemFunctionsItem( - name, description, parameters, endpoint, additionalProperties); + public ThinkSettingsV1FunctionsItem build() { + return new ThinkSettingsV1FunctionsItem(name, description, parameters, endpoint, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint.java b/src/main/java/com/deepgram/types/ThinkSettingsV1FunctionsItemEndpoint.java similarity index 83% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint.java rename to src/main/java/com/deepgram/types/ThinkSettingsV1FunctionsItemEndpoint.java index 389da57..1a210e1 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint.java +++ b/src/main/java/com/deepgram/types/ThinkSettingsV1FunctionsItemEndpoint.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.deepgram.core.ObjectMappers; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -18,8 +18,8 @@ import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint.Builder.class) -public final class AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint { +@JsonDeserialize(builder = ThinkSettingsV1FunctionsItemEndpoint.Builder.class) +public final class ThinkSettingsV1FunctionsItemEndpoint { private final Optional url; private final Optional method; @@ -28,7 +28,7 @@ public final class AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint { private final Map additionalProperties; - private AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint( + private ThinkSettingsV1FunctionsItemEndpoint( Optional url, Optional method, Optional> headers, @@ -63,8 +63,8 @@ public Optional> getHeaders() { @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint - && equalTo((AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint) other); + return other instanceof ThinkSettingsV1FunctionsItemEndpoint + && equalTo((ThinkSettingsV1FunctionsItemEndpoint) other); } @JsonAnyGetter @@ -72,7 +72,7 @@ public Map getAdditionalProperties() { return this.additionalProperties; } - private boolean equalTo(AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint other) { + private boolean equalTo(ThinkSettingsV1FunctionsItemEndpoint other) { return url.equals(other.url) && method.equals(other.method) && headers.equals(other.headers); } @@ -103,7 +103,7 @@ public static final class Builder { private Builder() {} - public Builder from(AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint other) { + public Builder from(ThinkSettingsV1FunctionsItemEndpoint other) { url(other.getUrl()); method(other.getMethod()); headers(other.getHeaders()); @@ -149,9 +149,8 @@ public Builder headers(Map headers) { return this; } - public AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint build() { - return new AgentV1SettingsAgentThinkOneItemFunctionsItemEndpoint( - url, method, headers, additionalProperties); + public ThinkSettingsV1FunctionsItemEndpoint build() { + return new ThinkSettingsV1FunctionsItemEndpoint(url, method, headers, additionalProperties); } public Builder additionalProperty(String key, Object value) { diff --git a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.java b/src/main/java/com/deepgram/types/ThinkSettingsV1Provider.java similarity index 57% rename from src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.java rename to src/main/java/com/deepgram/types/ThinkSettingsV1Provider.java index b9347be..c1f2b53 100644 --- a/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.java +++ b/src/main/java/com/deepgram/types/ThinkSettingsV1Provider.java @@ -1,7 +1,7 @@ /** * This file was auto-generated by Fern from our API Definition. */ -package com.deepgram.resources.agent.v1.types; +package com.deepgram.types; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -14,11 +14,11 @@ import java.util.Objects; import java.util.Optional; -public final class AgentV1SettingsAgentSpeakEndpointProvider { +public final class ThinkSettingsV1Provider { private final Value value; @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private AgentV1SettingsAgentSpeakEndpointProvider(Value value) { + private ThinkSettingsV1Provider(Value value) { this.value = value; } @@ -26,83 +26,81 @@ public T visit(Visitor visitor) { return value.visit(visitor); } - public static AgentV1SettingsAgentSpeakEndpointProvider deepgram(Deepgram value) { - return new AgentV1SettingsAgentSpeakEndpointProvider(new DeepgramValue(value)); + public static ThinkSettingsV1Provider openAi(OpenAiThinkProvider value) { + return new ThinkSettingsV1Provider(new OpenAiValue(value)); } - public static AgentV1SettingsAgentSpeakEndpointProvider elevenLabs(ElevenLabs value) { - return new AgentV1SettingsAgentSpeakEndpointProvider(new ElevenLabsValue(value)); + public static ThinkSettingsV1Provider awsBedrock(AwsBedrockThinkProvider value) { + return new ThinkSettingsV1Provider(new AwsBedrockValue(value)); } - public static AgentV1SettingsAgentSpeakEndpointProvider cartesia(Cartesia value) { - return new AgentV1SettingsAgentSpeakEndpointProvider(new CartesiaValue(value)); + public static ThinkSettingsV1Provider anthropic(Anthropic value) { + return new ThinkSettingsV1Provider(new AnthropicValue(value)); } - public static AgentV1SettingsAgentSpeakEndpointProvider openAi( - AgentV1SettingsAgentSpeakEndpointProviderOpenAi value) { - return new AgentV1SettingsAgentSpeakEndpointProvider(new OpenAiValue(value)); + public static ThinkSettingsV1Provider google(Google value) { + return new ThinkSettingsV1Provider(new GoogleValue(value)); } - public static AgentV1SettingsAgentSpeakEndpointProvider awsPolly( - AgentV1SettingsAgentSpeakEndpointProviderAwsPolly value) { - return new AgentV1SettingsAgentSpeakEndpointProvider(new AwsPollyValue(value)); + public static ThinkSettingsV1Provider groq(Groq value) { + return new ThinkSettingsV1Provider(new GroqValue(value)); } - public boolean isDeepgram() { - return value instanceof DeepgramValue; + public boolean isOpenAi() { + return value instanceof OpenAiValue; } - public boolean isElevenLabs() { - return value instanceof ElevenLabsValue; + public boolean isAwsBedrock() { + return value instanceof AwsBedrockValue; } - public boolean isCartesia() { - return value instanceof CartesiaValue; + public boolean isAnthropic() { + return value instanceof AnthropicValue; } - public boolean isOpenAi() { - return value instanceof OpenAiValue; + public boolean isGoogle() { + return value instanceof GoogleValue; } - public boolean isAwsPolly() { - return value instanceof AwsPollyValue; + public boolean isGroq() { + return value instanceof GroqValue; } public boolean _isUnknown() { return value instanceof _UnknownValue; } - public Optional getDeepgram() { - if (isDeepgram()) { - return Optional.of(((DeepgramValue) value).value); + public Optional getOpenAi() { + if (isOpenAi()) { + return Optional.of(((OpenAiValue) value).value); } return Optional.empty(); } - public Optional getElevenLabs() { - if (isElevenLabs()) { - return Optional.of(((ElevenLabsValue) value).value); + public Optional getAwsBedrock() { + if (isAwsBedrock()) { + return Optional.of(((AwsBedrockValue) value).value); } return Optional.empty(); } - public Optional getCartesia() { - if (isCartesia()) { - return Optional.of(((CartesiaValue) value).value); + public Optional getAnthropic() { + if (isAnthropic()) { + return Optional.of(((AnthropicValue) value).value); } return Optional.empty(); } - public Optional getOpenAi() { - if (isOpenAi()) { - return Optional.of(((OpenAiValue) value).value); + public Optional getGoogle() { + if (isGoogle()) { + return Optional.of(((GoogleValue) value).value); } return Optional.empty(); } - public Optional getAwsPolly() { - if (isAwsPolly()) { - return Optional.of(((AwsPollyValue) value).value); + public Optional getGroq() { + if (isGroq()) { + return Optional.of(((GroqValue) value).value); } return Optional.empty(); } @@ -117,8 +115,7 @@ public Optional _getUnknown() { @Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AgentV1SettingsAgentSpeakEndpointProvider - && value.equals(((AgentV1SettingsAgentSpeakEndpointProvider) other).value); + return other instanceof ThinkSettingsV1Provider && value.equals(((ThinkSettingsV1Provider) other).value); } @Override @@ -137,58 +134,58 @@ private Value getValue() { } public interface Visitor { - T visitDeepgram(Deepgram deepgram); + T visitOpenAi(OpenAiThinkProvider openAi); - T visitElevenLabs(ElevenLabs elevenLabs); + T visitAwsBedrock(AwsBedrockThinkProvider awsBedrock); - T visitCartesia(Cartesia cartesia); + T visitAnthropic(Anthropic anthropic); - T visitOpenAi(AgentV1SettingsAgentSpeakEndpointProviderOpenAi openAi); + T visitGoogle(Google google); - T visitAwsPolly(AgentV1SettingsAgentSpeakEndpointProviderAwsPolly awsPolly); + T visitGroq(Groq groq); T _visitUnknown(Object unknownType); } @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) @JsonSubTypes({ - @JsonSubTypes.Type(DeepgramValue.class), - @JsonSubTypes.Type(ElevenLabsValue.class), - @JsonSubTypes.Type(CartesiaValue.class), @JsonSubTypes.Type(OpenAiValue.class), - @JsonSubTypes.Type(AwsPollyValue.class) + @JsonSubTypes.Type(AwsBedrockValue.class), + @JsonSubTypes.Type(AnthropicValue.class), + @JsonSubTypes.Type(GoogleValue.class), + @JsonSubTypes.Type(GroqValue.class) }) @JsonIgnoreProperties(ignoreUnknown = true) private interface Value { T visit(Visitor visitor); } - @JsonTypeName("deepgram") + @JsonTypeName("open_ai") @JsonIgnoreProperties("type") - private static final class DeepgramValue implements Value { + private static final class OpenAiValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "type", allowSetters = true) - private Deepgram value; + private OpenAiThinkProvider value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private DeepgramValue() {} + private OpenAiValue() {} - private DeepgramValue(Deepgram value) { + private OpenAiValue(OpenAiThinkProvider value) { this.value = value; } @java.lang.Override public T visit(Visitor visitor) { - return visitor.visitDeepgram(value); + return visitor.visitOpenAi(value); } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof DeepgramValue && equalTo((DeepgramValue) other); + return other instanceof OpenAiValue && equalTo((OpenAiValue) other); } - private boolean equalTo(DeepgramValue other) { + private boolean equalTo(OpenAiValue other) { return value.equals(other.value); } @@ -199,36 +196,36 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakEndpointProvider{" + "value: " + value + "}"; + return "ThinkSettingsV1Provider{" + "value: " + value + "}"; } } - @JsonTypeName("eleven_labs") + @JsonTypeName("aws_bedrock") @JsonIgnoreProperties("type") - private static final class ElevenLabsValue implements Value { + private static final class AwsBedrockValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "type", allowSetters = true) - private ElevenLabs value; + private AwsBedrockThinkProvider value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private ElevenLabsValue() {} + private AwsBedrockValue() {} - private ElevenLabsValue(ElevenLabs value) { + private AwsBedrockValue(AwsBedrockThinkProvider value) { this.value = value; } @java.lang.Override public T visit(Visitor visitor) { - return visitor.visitElevenLabs(value); + return visitor.visitAwsBedrock(value); } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof ElevenLabsValue && equalTo((ElevenLabsValue) other); + return other instanceof AwsBedrockValue && equalTo((AwsBedrockValue) other); } - private boolean equalTo(ElevenLabsValue other) { + private boolean equalTo(AwsBedrockValue other) { return value.equals(other.value); } @@ -239,36 +236,36 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakEndpointProvider{" + "value: " + value + "}"; + return "ThinkSettingsV1Provider{" + "value: " + value + "}"; } } - @JsonTypeName("cartesia") + @JsonTypeName("anthropic") @JsonIgnoreProperties("type") - private static final class CartesiaValue implements Value { + private static final class AnthropicValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "type", allowSetters = true) - private Cartesia value; + private Anthropic value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private CartesiaValue() {} + private AnthropicValue() {} - private CartesiaValue(Cartesia value) { + private AnthropicValue(Anthropic value) { this.value = value; } @java.lang.Override public T visit(Visitor visitor) { - return visitor.visitCartesia(value); + return visitor.visitAnthropic(value); } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof CartesiaValue && equalTo((CartesiaValue) other); + return other instanceof AnthropicValue && equalTo((AnthropicValue) other); } - private boolean equalTo(CartesiaValue other) { + private boolean equalTo(AnthropicValue other) { return value.equals(other.value); } @@ -279,36 +276,36 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakEndpointProvider{" + "value: " + value + "}"; + return "ThinkSettingsV1Provider{" + "value: " + value + "}"; } } - @JsonTypeName("open_ai") + @JsonTypeName("google") @JsonIgnoreProperties("type") - private static final class OpenAiValue implements Value { + private static final class GoogleValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1SettingsAgentSpeakEndpointProviderOpenAi value; + private Google value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private OpenAiValue() {} + private GoogleValue() {} - private OpenAiValue(AgentV1SettingsAgentSpeakEndpointProviderOpenAi value) { + private GoogleValue(Google value) { this.value = value; } @java.lang.Override public T visit(Visitor visitor) { - return visitor.visitOpenAi(value); + return visitor.visitGoogle(value); } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof OpenAiValue && equalTo((OpenAiValue) other); + return other instanceof GoogleValue && equalTo((GoogleValue) other); } - private boolean equalTo(OpenAiValue other) { + private boolean equalTo(GoogleValue other) { return value.equals(other.value); } @@ -319,36 +316,36 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakEndpointProvider{" + "value: " + value + "}"; + return "ThinkSettingsV1Provider{" + "value: " + value + "}"; } } - @JsonTypeName("aws_polly") + @JsonTypeName("groq") @JsonIgnoreProperties("type") - private static final class AwsPollyValue implements Value { + private static final class GroqValue implements Value { @JsonUnwrapped @JsonIgnoreProperties(value = "type", allowSetters = true) - private AgentV1SettingsAgentSpeakEndpointProviderAwsPolly value; + private Groq value; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private AwsPollyValue() {} + private GroqValue() {} - private AwsPollyValue(AgentV1SettingsAgentSpeakEndpointProviderAwsPolly value) { + private GroqValue(Groq value) { this.value = value; } @java.lang.Override public T visit(Visitor visitor) { - return visitor.visitAwsPolly(value); + return visitor.visitGroq(value); } @java.lang.Override public boolean equals(Object other) { if (this == other) return true; - return other instanceof AwsPollyValue && equalTo((AwsPollyValue) other); + return other instanceof GroqValue && equalTo((GroqValue) other); } - private boolean equalTo(AwsPollyValue other) { + private boolean equalTo(GroqValue other) { return value.equals(other.value); } @@ -359,7 +356,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakEndpointProvider{" + "value: " + value + "}"; + return "ThinkSettingsV1Provider{" + "value: " + value + "}"; } } @@ -395,7 +392,7 @@ public int hashCode() { @java.lang.Override public String toString() { - return "AgentV1SettingsAgentSpeakEndpointProvider{" + "type: " + type + ", value: " + value + "}"; + return "ThinkSettingsV1Provider{" + "type: " + type + ", value: " + value + "}"; } } }