diff --git a/build.gradle b/build.gradle
index b88a74da..748905c1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -47,7 +47,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.assemblyai'
artifactId = 'assemblyai-java'
- version = '2.3.1'
+ version = '3.0.0'
from components.java
pom {
scm {
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 2c352119..a4b76b95 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 09523c0e..0aaefbca 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/sample-app/src/main/java/sample/App.java b/sample-app/src/main/java/sample/App.java
index 86c70235..5fe20740 100644
--- a/sample-app/src/main/java/sample/App.java
+++ b/sample-app/src/main/java/sample/App.java
@@ -128,7 +128,7 @@ public static void main(String... args) throws IOException, InterruptedException
System.out.println("Delete transcript. " + transcript);
File file = new File("sample-app/src/main/resources/nZP7pb_t4oA.mp3");
- UploadedFile uploadedFile = client.files().upload(Files.readAllBytes(file.toPath()));
+ UploadedFile uploadedFile = client.files().upload(file);
System.out.println("Uploaded file" + uploadedFile);
transcript = client.transcripts().submit(TranscriptParams.builder()
diff --git a/src/main/java/com/assemblyai/api/PollingTranscriptsClient.java b/src/main/java/com/assemblyai/api/PollingTranscriptsClient.java
index 91a01c8d..14a94efd 100644
--- a/src/main/java/com/assemblyai/api/PollingTranscriptsClient.java
+++ b/src/main/java/com/assemblyai/api/PollingTranscriptsClient.java
@@ -13,7 +13,7 @@
import java.io.File;
import java.io.IOException;
-import java.nio.file.Files;
+import java.io.InputStream;
import java.nio.file.Path;
import java.util.List;
@@ -29,6 +29,58 @@ public PollingTranscriptsClient(ClientOptions clientOptions, AssemblyAI client)
this.client = client;
}
+ /**
+ * Submits a transcription job for an audio file. This will not wait until the transcript status is "completed" or "error".
+ *
+ * @param file Audio file to transcribe
+ * @return Queued transcript
+ * @throws IOException The file will be read and an IOException may be thrown.
+ */
+ public Transcript submit(InputStream file) throws IOException {
+ return submit(file, EMPTY_PARAMS, null);
+ }
+
+ /**
+ * Submits a transcription job for an audio file. This will not wait until the transcript status is "completed" or "error".
+ *
+ * @param file Audio file to transcribe
+ * @param requestOptions The HTTP request options
+ * @return Queued transcript
+ * @throws IOException The file will be read and an IOException may be thrown.
+ */
+ public Transcript submit(InputStream file, RequestOptions requestOptions) throws IOException {
+ return submit(file, EMPTY_PARAMS, requestOptions);
+ }
+
+ /**
+ * Submits a transcription job for an audio file. This will not wait until the transcript status is "completed" or "error".
+ *
+ * @param file Audio file to transcribe
+ * @param transcriptParams The parameters to transcribe an audio file.
+ * @return Queued transcript
+ * @throws IOException The file will be read and an IOException may be thrown.
+ */
+ public Transcript submit(InputStream file, TranscriptOptionalParams transcriptParams) throws IOException {
+ return submit(file, transcriptParams, null);
+ }
+
+ /**
+ * Submits a transcription job for an audio file. This will not wait until the transcript status is "completed" or "error".
+ *
+ * @param file Audio file to transcribe
+ * @param transcriptParams The parameters to transcribe an audio file.
+ * @param requestOptions The HTTP request options
+ * @return Queued transcript
+ */
+ public Transcript submit(
+ InputStream file,
+ TranscriptOptionalParams transcriptParams,
+ RequestOptions requestOptions
+ ) {
+ UploadedFile uploadedFile = client.files().upload(file, requestOptions);
+ return submit(uploadedFile.getUploadUrl(), transcriptParams, requestOptions);
+ }
+
/**
* Submits a transcription job for an audio file. This will not wait until the transcript status is "completed" or "error".
*
@@ -245,6 +297,56 @@ public Transcript submit(String url, TranscriptOptionalParams transcriptParams,
return super.submit(fullTranscriptParams, requestOptions);
}
+ /**
+ * Transcribe an audio file. This will create a transcript and wait until the transcript status is "completed" or "error".
+ *
+ * @param file Audio file to transcribe
+ * @return A transcript with status "completed" or "error"
+ * @throws IOException The file will be read and an IOException may be thrown.
+ */
+ public Transcript transcribe(InputStream file) throws IOException {
+ return transcribe(file, EMPTY_PARAMS, null);
+ }
+
+ /**
+ * Transcribe an audio file. This will create a transcript and wait until the transcript status is "completed" or "error".
+ *
+ * @param file Audio file to transcribe
+ * @param requestOptions The HTTP request options
+ * @return A transcript with status "completed" or "error"
+ * @throws IOException The file will be read and an IOException may be thrown.
+ */
+ public Transcript transcribe(InputStream file, RequestOptions requestOptions) throws IOException {
+ return transcribe(file, EMPTY_PARAMS, requestOptions);
+ }
+
+ /**
+ * Transcribe an audio file. This will create a transcript and wait until the transcript status is "completed" or "error".
+ *
+ * @param file Audio file to transcribe
+ * @param transcriptParams The parameters to transcribe an audio file.
+ * @return A transcript with status "completed" or "error"
+ * @throws IOException The file will be read and an IOException may be thrown.
+ */
+ public Transcript transcribe(InputStream file, TranscriptOptionalParams transcriptParams) throws IOException {
+ UploadedFile uploadedFile = client.files().upload(file);
+ return transcribe(uploadedFile.getUploadUrl(), transcriptParams, null);
+ }
+
+ /**
+ * Transcribe an audio file. This will create a transcript and wait until the transcript status is "completed" or "error".
+ *
+ * @param file Audio file to transcribe
+ * @param transcriptParams The parameters to transcribe an audio file.
+ * @param requestOptions The HTTP request options
+ * @return A transcript with status "completed" or "error"
+ * @throws IOException The file will be read and an IOException may be thrown.
+ */
+ public Transcript transcribe(InputStream file, TranscriptOptionalParams transcriptParams, RequestOptions requestOptions) throws IOException {
+ UploadedFile uploadedFile = client.files().upload(file, requestOptions);
+ return transcribe(uploadedFile.getUploadUrl(), transcriptParams, requestOptions);
+ }
+
/**
* Transcribe an audio file. This will create a transcript and wait until the transcript status is "completed" or "error".
*
@@ -344,7 +446,7 @@ public Transcript transcribe(
TranscriptOptionalParams transcriptParams,
RequestOptions requestOptions
) throws IOException {
- UploadedFile uploadedFile = client.files().upload(Files.readAllBytes(file.toPath()), requestOptions);
+ UploadedFile uploadedFile = client.files().upload(file, requestOptions);
return transcribe(uploadedFile.getUploadUrl(), transcriptParams, requestOptions);
}
diff --git a/src/main/java/com/assemblyai/api/core/Constants.java b/src/main/java/com/assemblyai/api/core/Constants.java
index 074dca3a..ae9608ff 100644
--- a/src/main/java/com/assemblyai/api/core/Constants.java
+++ b/src/main/java/com/assemblyai/api/core/Constants.java
@@ -1,5 +1,5 @@
package com.assemblyai.api.core;
public class Constants {
- public static final String SDK_VERSION = "2.3.1";
+ public static final String SDK_VERSION = "3.0.0";
}
diff --git a/src/main/java/com/assemblyai/api/core/FileStream.java b/src/main/java/com/assemblyai/api/core/FileStream.java
new file mode 100644
index 00000000..f9eed113
--- /dev/null
+++ b/src/main/java/com/assemblyai/api/core/FileStream.java
@@ -0,0 +1,60 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.assemblyai.api.core;
+
+import java.io.InputStream;
+import java.util.Objects;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Represents a file stream with associated metadata for file uploads.
+ */
+public class FileStream {
+ private final InputStream inputStream;
+ private final String fileName;
+ private final MediaType contentType;
+
+ /**
+ * Constructs a FileStream with the given input stream and optional metadata.
+ *
+ * @param inputStream The input stream of the file content. Must not be null.
+ * @param fileName The name of the file, or null if unknown.
+ * @param contentType The MIME type of the file content, or null if unknown.
+ * @throws NullPointerException if inputStream is null
+ */
+ public FileStream(InputStream inputStream, @Nullable String fileName, @Nullable MediaType contentType) {
+ this.inputStream = Objects.requireNonNull(inputStream, "Input stream cannot be null");
+ this.fileName = fileName;
+ this.contentType = contentType;
+ }
+
+ public FileStream(InputStream inputStream) {
+ this(inputStream, null, null);
+ }
+
+ public InputStream getInputStream() {
+ return inputStream;
+ }
+
+ @Nullable
+ public String getFileName() {
+ return fileName;
+ }
+
+ @Nullable
+ public MediaType getContentType() {
+ return contentType;
+ }
+
+ /**
+ * Creates a RequestBody suitable for use with OkHttp client.
+ *
+ * @return A RequestBody instance representing this file stream.
+ */
+ public RequestBody toRequestBody() {
+ return new InputStreamRequestBody(contentType, inputStream);
+ }
+}
diff --git a/src/main/java/com/assemblyai/api/core/InputStreamRequestBody.java b/src/main/java/com/assemblyai/api/core/InputStreamRequestBody.java
new file mode 100644
index 00000000..1182fa44
--- /dev/null
+++ b/src/main/java/com/assemblyai/api/core/InputStreamRequestBody.java
@@ -0,0 +1,79 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.assemblyai.api.core;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Objects;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
+import okhttp3.internal.Util;
+import okio.BufferedSink;
+import okio.Okio;
+import okio.Source;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * A custom implementation of OkHttp's RequestBody that wraps an InputStream.
+ * This class allows streaming of data from an InputStream directly to an HTTP request body,
+ * which is useful for file uploads or sending large amounts of data without loading it all into memory.
+ */
+public class InputStreamRequestBody extends RequestBody {
+ private final InputStream inputStream;
+ private final MediaType contentType;
+
+ /**
+ * Constructs an InputStreamRequestBody with the specified content type and input stream.
+ *
+ * @param contentType the MediaType of the content, or null if not known
+ * @param inputStream the InputStream containing the data to be sent
+ * @throws NullPointerException if inputStream is null
+ */
+ public InputStreamRequestBody(@Nullable MediaType contentType, InputStream inputStream) {
+ this.contentType = contentType;
+ this.inputStream = Objects.requireNonNull(inputStream, "inputStream == null");
+ }
+
+ /**
+ * Returns the content type of this request body.
+ *
+ * @return the MediaType of the content, or null if not specified
+ */
+ @Nullable
+ @Override
+ public MediaType contentType() {
+ return contentType;
+ }
+
+ /**
+ * Returns the content length of this request body, if known.
+ * This method attempts to determine the length using the InputStream's available() method,
+ * which may not always accurately reflect the total length of the stream.
+ *
+ * @return the content length, or -1 if the length is unknown
+ * @throws IOException if an I/O error occurs
+ */
+ @Override
+ public long contentLength() throws IOException {
+ return inputStream.available() == 0 ? -1 : inputStream.available();
+ }
+
+ /**
+ * Writes the content of the InputStream to the given BufferedSink.
+ * This method is responsible for transferring the data from the InputStream to the network request.
+ *
+ * @param sink the BufferedSink to write the content to
+ * @throws IOException if an I/O error occurs during writing
+ */
+ @Override
+ public void writeTo(BufferedSink sink) throws IOException {
+ Source source = null;
+ try {
+ source = Okio.source(inputStream);
+ sink.writeAll(source);
+ } finally {
+ Util.closeQuietly(Objects.requireNonNull(source));
+ }
+ }
+}
diff --git a/src/main/java/com/assemblyai/api/resources/files/ExtendedFilesClient.java b/src/main/java/com/assemblyai/api/resources/files/ExtendedFilesClient.java
index 65f4db27..d821fdbc 100644
--- a/src/main/java/com/assemblyai/api/resources/files/ExtendedFilesClient.java
+++ b/src/main/java/com/assemblyai/api/resources/files/ExtendedFilesClient.java
@@ -7,6 +7,7 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.nio.file.StandardOpenOption;
public class ExtendedFilesClient extends FilesClient {
public ExtendedFilesClient(ClientOptions clientOptions) {
@@ -38,6 +39,6 @@ public UploadedFile upload(Path filePath) throws IOException {
* Upload a media file to AssemblyAI's servers.
*/
public UploadedFile upload(Path filePath, RequestOptions requestOptions) throws IOException {
- return upload(Files.readAllBytes(filePath), requestOptions);
+ return upload(Files.newInputStream(filePath, StandardOpenOption.READ), requestOptions);
}
}
diff --git a/src/main/java/com/assemblyai/api/resources/files/FilesClient.java b/src/main/java/com/assemblyai/api/resources/files/FilesClient.java
index 16650166..d7f73bcb 100644
--- a/src/main/java/com/assemblyai/api/resources/files/FilesClient.java
+++ b/src/main/java/com/assemblyai/api/resources/files/FilesClient.java
@@ -6,6 +6,7 @@
import com.assemblyai.api.core.AssemblyAIApiException;
import com.assemblyai.api.core.AssemblyAIException;
import com.assemblyai.api.core.ClientOptions;
+import com.assemblyai.api.core.InputStreamRequestBody;
import com.assemblyai.api.core.ObjectMappers;
import com.assemblyai.api.core.RequestOptions;
import com.assemblyai.api.errors.BadRequestError;
@@ -18,9 +19,12 @@
import com.assemblyai.api.resources.files.types.UploadedFile;
import com.assemblyai.api.types.Error;
import com.fasterxml.jackson.core.JsonProcessingException;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
+import java.io.InputStream;
import okhttp3.Headers;
import okhttp3.HttpUrl;
+import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
@@ -37,24 +41,23 @@ public FilesClient(ClientOptions clientOptions) {
/**
* Upload a media file to AssemblyAI's servers.
*/
- public UploadedFile upload(byte[] request) {
+ public UploadedFile upload(InputStream request) {
return upload(request, null);
}
/**
* Upload a media file to AssemblyAI's servers.
*/
- public UploadedFile upload(byte[] request, RequestOptions requestOptions) {
+ public UploadedFile upload(InputStream request, RequestOptions requestOptions) {
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
.addPathSegments("v2/upload")
.build();
- RequestBody body = RequestBody.create(request);
+ RequestBody body = new InputStreamRequestBody(MediaType.parse("application/octet-stream"), request);
Request okhttpRequest = new Request.Builder()
.url(httpUrl)
.method("POST", body)
.headers(Headers.of(clientOptions.headers(requestOptions)))
- .addHeader("Content-Type", "application/octet-stream")
.build();
OkHttpClient client = clientOptions.httpClient();
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -99,4 +102,18 @@ public UploadedFile upload(byte[] request, RequestOptions requestOptions) {
throw new AssemblyAIException("Network error executing HTTP request", e);
}
}
+
+ /**
+ * Upload a media file to AssemblyAI's servers.
+ */
+ public UploadedFile upload(byte[] request) {
+ return upload(new ByteArrayInputStream(request));
+ }
+
+ /**
+ * Upload a media file to AssemblyAI's servers.
+ */
+ public UploadedFile upload(byte[] request, RequestOptions requestOptions) {
+ return upload(new ByteArrayInputStream(request), requestOptions);
+ }
}
diff --git a/src/main/java/com/assemblyai/api/resources/files/types/UploadedFile.java b/src/main/java/com/assemblyai/api/resources/files/types/UploadedFile.java
index 0b6ae036..1a48822d 100644
--- a/src/main/java/com/assemblyai/api/resources/files/types/UploadedFile.java
+++ b/src/main/java/com/assemblyai/api/resources/files/types/UploadedFile.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = UploadedFile.Builder.class)
@@ -65,7 +66,7 @@ public static UploadUrlStage builder() {
}
public interface UploadUrlStage {
- _FinalStage uploadUrl(String uploadUrl);
+ _FinalStage uploadUrl(@NotNull String uploadUrl);
Builder from(UploadedFile other);
}
@@ -95,8 +96,8 @@ public Builder from(UploadedFile other) {
*/
@java.lang.Override
@JsonSetter("upload_url")
- public _FinalStage uploadUrl(String uploadUrl) {
- this.uploadUrl = uploadUrl;
+ public _FinalStage uploadUrl(@NotNull String uploadUrl) {
+ this.uploadUrl = Objects.requireNonNull(uploadUrl, "uploadUrl must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/requests/LemurTaskParams.java b/src/main/java/com/assemblyai/api/resources/lemur/requests/LemurTaskParams.java
index 7a5d6116..64abdb12 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/requests/LemurTaskParams.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/requests/LemurTaskParams.java
@@ -20,6 +20,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = LemurTaskParams.Builder.class)
@@ -168,7 +169,7 @@ public static PromptStage builder() {
}
public interface PromptStage {
- _FinalStage prompt(String prompt);
+ _FinalStage prompt(@NotNull String prompt);
Builder from(LemurTaskParams other);
}
@@ -240,8 +241,8 @@ public Builder from(LemurTaskParams other) {
*/
@java.lang.Override
@JsonSetter("prompt")
- public _FinalStage prompt(String prompt) {
- this.prompt = prompt;
+ public _FinalStage prompt(@NotNull String prompt) {
+ this.prompt = Objects.requireNonNull(prompt, "prompt must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurActionItemsResponse.java b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurActionItemsResponse.java
index 9aed7930..cc797436 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurActionItemsResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurActionItemsResponse.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = LemurActionItemsResponse.Builder.class)
@@ -91,17 +92,17 @@ public static ResponseStage builder() {
}
public interface ResponseStage {
- RequestIdStage response(String response);
+ RequestIdStage response(@NotNull String response);
Builder from(LemurActionItemsResponse other);
}
public interface RequestIdStage {
- UsageStage requestId(String requestId);
+ UsageStage requestId(@NotNull String requestId);
}
public interface UsageStage {
- _FinalStage usage(LemurUsage usage);
+ _FinalStage usage(@NotNull LemurUsage usage);
}
public interface _FinalStage {
@@ -135,8 +136,8 @@ public Builder from(LemurActionItemsResponse other) {
*/
@java.lang.Override
@JsonSetter("response")
- public RequestIdStage response(String response) {
- this.response = response;
+ public RequestIdStage response(@NotNull String response) {
+ this.response = Objects.requireNonNull(response, "response must not be null");
return this;
}
@@ -146,8 +147,8 @@ public RequestIdStage response(String response) {
*/
@java.lang.Override
@JsonSetter("request_id")
- public UsageStage requestId(String requestId) {
- this.requestId = requestId;
+ public UsageStage requestId(@NotNull String requestId) {
+ this.requestId = Objects.requireNonNull(requestId, "requestId must not be null");
return this;
}
@@ -157,8 +158,8 @@ public UsageStage requestId(String requestId) {
*/
@java.lang.Override
@JsonSetter("usage")
- public _FinalStage usage(LemurUsage usage) {
- this.usage = usage;
+ public _FinalStage usage(@NotNull LemurUsage usage) {
+ this.usage = Objects.requireNonNull(usage, "usage must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurBaseResponse.java b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurBaseResponse.java
index 899f4fb4..e439a3ea 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurBaseResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurBaseResponse.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = LemurBaseResponse.Builder.class)
@@ -78,13 +79,13 @@ public static RequestIdStage builder() {
}
public interface RequestIdStage {
- UsageStage requestId(String requestId);
+ UsageStage requestId(@NotNull String requestId);
Builder from(LemurBaseResponse other);
}
public interface UsageStage {
- _FinalStage usage(LemurUsage usage);
+ _FinalStage usage(@NotNull LemurUsage usage);
}
public interface _FinalStage {
@@ -115,8 +116,8 @@ public Builder from(LemurBaseResponse other) {
*/
@java.lang.Override
@JsonSetter("request_id")
- public UsageStage requestId(String requestId) {
- this.requestId = requestId;
+ public UsageStage requestId(@NotNull String requestId) {
+ this.requestId = Objects.requireNonNull(requestId, "requestId must not be null");
return this;
}
@@ -126,8 +127,8 @@ public UsageStage requestId(String requestId) {
*/
@java.lang.Override
@JsonSetter("usage")
- public _FinalStage usage(LemurUsage usage) {
- this.usage = usage;
+ public _FinalStage usage(@NotNull LemurUsage usage) {
+ this.usage = Objects.requireNonNull(usage, "usage must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurModel.java b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurModel.java
index e4491ba8..4893477b 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurModel.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurModel.java
@@ -7,33 +7,34 @@
import com.fasterxml.jackson.annotation.JsonValue;
public final class LemurModel {
- public static final LemurModel DEFAULT = new LemurModel(Value.DEFAULT, "default");
-
- public static final LemurModel ANTHROPIC_CLAUDE2 = new LemurModel(Value.ANTHROPIC_CLAUDE2, "anthropic/claude-2");
+ public static final LemurModel BASIC = new LemurModel(Value.BASIC, "basic");
public static final LemurModel ANTHROPIC_CLAUDE3_5_SONNET =
new LemurModel(Value.ANTHROPIC_CLAUDE3_5_SONNET, "anthropic/claude-3-5-sonnet");
+ public static final LemurModel ANTHROPIC_CLAUDE2_1 =
+ new LemurModel(Value.ANTHROPIC_CLAUDE2_1, "anthropic/claude-2-1");
+
+ public static final LemurModel ANTHROPIC_CLAUDE_INSTANT1_2 =
+ new LemurModel(Value.ANTHROPIC_CLAUDE_INSTANT1_2, "anthropic/claude-instant-1-2");
+
public static final LemurModel ANTHROPIC_CLAUDE3_SONNET =
new LemurModel(Value.ANTHROPIC_CLAUDE3_SONNET, "anthropic/claude-3-sonnet");
+ public static final LemurModel ANTHROPIC_CLAUDE2_0 =
+ new LemurModel(Value.ANTHROPIC_CLAUDE2_0, "anthropic/claude-2");
+
public static final LemurModel ASSEMBLYAI_MISTRAL7B =
new LemurModel(Value.ASSEMBLYAI_MISTRAL7B, "assemblyai/mistral-7b");
public static final LemurModel ANTHROPIC_CLAUDE3_HAIKU =
new LemurModel(Value.ANTHROPIC_CLAUDE3_HAIKU, "anthropic/claude-3-haiku");
- public static final LemurModel BASIC = new LemurModel(Value.BASIC, "basic");
+ public static final LemurModel DEFAULT = new LemurModel(Value.DEFAULT, "default");
public static final LemurModel ANTHROPIC_CLAUDE3_OPUS =
new LemurModel(Value.ANTHROPIC_CLAUDE3_OPUS, "anthropic/claude-3-opus");
- public static final LemurModel ANTHROPIC_CLAUDE2_1 =
- new LemurModel(Value.ANTHROPIC_CLAUDE2_1, "anthropic/claude-2-1");
-
- public static final LemurModel ANTHROPIC_CLAUDE_INSTANT1_2 =
- new LemurModel(Value.ANTHROPIC_CLAUDE_INSTANT1_2, "anthropic/claude-instant-1-2");
-
private final Value value;
private final String string;
@@ -65,26 +66,26 @@ public int hashCode() {
public T visit(Visitor visitor) {
switch (value) {
- case DEFAULT:
- return visitor.visitDefault();
- case ANTHROPIC_CLAUDE2:
- return visitor.visitAnthropicClaude2();
+ case BASIC:
+ return visitor.visitBasic();
case ANTHROPIC_CLAUDE3_5_SONNET:
return visitor.visitAnthropicClaude3_5_Sonnet();
+ case ANTHROPIC_CLAUDE2_1:
+ return visitor.visitAnthropicClaude2_1();
+ case ANTHROPIC_CLAUDE_INSTANT1_2:
+ return visitor.visitAnthropicClaudeInstant1_2();
case ANTHROPIC_CLAUDE3_SONNET:
return visitor.visitAnthropicClaude3_Sonnet();
+ case ANTHROPIC_CLAUDE2_0:
+ return visitor.visitAnthropicClaude2_0();
case ASSEMBLYAI_MISTRAL7B:
return visitor.visitAssemblyaiMistral7b();
case ANTHROPIC_CLAUDE3_HAIKU:
return visitor.visitAnthropicClaude3_Haiku();
- case BASIC:
- return visitor.visitBasic();
+ case DEFAULT:
+ return visitor.visitDefault();
case ANTHROPIC_CLAUDE3_OPUS:
return visitor.visitAnthropicClaude3_Opus();
- case ANTHROPIC_CLAUDE2_1:
- return visitor.visitAnthropicClaude2_1();
- case ANTHROPIC_CLAUDE_INSTANT1_2:
- return visitor.visitAnthropicClaudeInstant1_2();
case UNKNOWN:
default:
return visitor.visitUnknown(string);
@@ -94,26 +95,26 @@ public T visit(Visitor visitor) {
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static LemurModel valueOf(String value) {
switch (value) {
- case "default":
- return DEFAULT;
- case "anthropic/claude-2":
- return ANTHROPIC_CLAUDE2;
+ case "basic":
+ return BASIC;
case "anthropic/claude-3-5-sonnet":
return ANTHROPIC_CLAUDE3_5_SONNET;
+ case "anthropic/claude-2-1":
+ return ANTHROPIC_CLAUDE2_1;
+ case "anthropic/claude-instant-1-2":
+ return ANTHROPIC_CLAUDE_INSTANT1_2;
case "anthropic/claude-3-sonnet":
return ANTHROPIC_CLAUDE3_SONNET;
+ case "anthropic/claude-2":
+ return ANTHROPIC_CLAUDE2_0;
case "assemblyai/mistral-7b":
return ASSEMBLYAI_MISTRAL7B;
case "anthropic/claude-3-haiku":
return ANTHROPIC_CLAUDE3_HAIKU;
- case "basic":
- return BASIC;
+ case "default":
+ return DEFAULT;
case "anthropic/claude-3-opus":
return ANTHROPIC_CLAUDE3_OPUS;
- case "anthropic/claude-2-1":
- return ANTHROPIC_CLAUDE2_1;
- case "anthropic/claude-instant-1-2":
- return ANTHROPIC_CLAUDE_INSTANT1_2;
default:
return new LemurModel(Value.UNKNOWN, value);
}
@@ -130,7 +131,7 @@ public enum Value {
ANTHROPIC_CLAUDE2_1,
- ANTHROPIC_CLAUDE2,
+ ANTHROPIC_CLAUDE2_0,
DEFAULT,
@@ -154,7 +155,7 @@ public interface Visitor {
T visitAnthropicClaude2_1();
- T visitAnthropicClaude2();
+ T visitAnthropicClaude2_0();
T visitDefault();
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestion.java b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestion.java
index ac1857ce..c8d10f24 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestion.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestion.java
@@ -17,6 +17,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = LemurQuestion.Builder.class)
@@ -109,7 +110,7 @@ public static QuestionStage builder() {
}
public interface QuestionStage {
- _FinalStage question(String question);
+ _FinalStage question(@NotNull String question);
Builder from(LemurQuestion other);
}
@@ -160,8 +161,8 @@ public Builder from(LemurQuestion other) {
*/
@java.lang.Override
@JsonSetter("question")
- public _FinalStage question(String question) {
- this.question = question;
+ public _FinalStage question(@NotNull String question) {
+ this.question = Objects.requireNonNull(question, "question must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestionAnswer.java b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestionAnswer.java
index 565657b0..0d2068f2 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestionAnswer.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestionAnswer.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = LemurQuestionAnswer.Builder.class)
@@ -76,13 +77,13 @@ public static QuestionStage builder() {
}
public interface QuestionStage {
- AnswerStage question(String question);
+ AnswerStage question(@NotNull String question);
Builder from(LemurQuestionAnswer other);
}
public interface AnswerStage {
- _FinalStage answer(String answer);
+ _FinalStage answer(@NotNull String answer);
}
public interface _FinalStage {
@@ -113,8 +114,8 @@ public Builder from(LemurQuestionAnswer other) {
*/
@java.lang.Override
@JsonSetter("question")
- public AnswerStage question(String question) {
- this.question = question;
+ public AnswerStage question(@NotNull String question) {
+ this.question = Objects.requireNonNull(question, "question must not be null");
return this;
}
@@ -124,8 +125,8 @@ public AnswerStage question(String question) {
*/
@java.lang.Override
@JsonSetter("answer")
- public _FinalStage answer(String answer) {
- this.answer = answer;
+ public _FinalStage answer(@NotNull String answer) {
+ this.answer = Objects.requireNonNull(answer, "answer must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestionAnswerResponse.java b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestionAnswerResponse.java
index e4a51a1d..400c027d 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestionAnswerResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurQuestionAnswerResponse.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = LemurQuestionAnswerResponse.Builder.class)
@@ -96,13 +97,13 @@ public static RequestIdStage builder() {
}
public interface RequestIdStage {
- UsageStage requestId(String requestId);
+ UsageStage requestId(@NotNull String requestId);
Builder from(LemurQuestionAnswerResponse other);
}
public interface UsageStage {
- _FinalStage usage(LemurUsage usage);
+ _FinalStage usage(@NotNull LemurUsage usage);
}
public interface _FinalStage {
@@ -142,8 +143,8 @@ public Builder from(LemurQuestionAnswerResponse other) {
*/
@java.lang.Override
@JsonSetter("request_id")
- public UsageStage requestId(String requestId) {
- this.requestId = requestId;
+ public UsageStage requestId(@NotNull String requestId) {
+ this.requestId = Objects.requireNonNull(requestId, "requestId must not be null");
return this;
}
@@ -153,8 +154,8 @@ public UsageStage requestId(String requestId) {
*/
@java.lang.Override
@JsonSetter("usage")
- public _FinalStage usage(LemurUsage usage) {
- this.usage = usage;
+ public _FinalStage usage(@NotNull LemurUsage usage) {
+ this.usage = Objects.requireNonNull(usage, "usage must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurStringResponse.java b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurStringResponse.java
index 9090064d..5368b46d 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurStringResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurStringResponse.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = LemurStringResponse.Builder.class)
@@ -91,17 +92,17 @@ public static ResponseStage builder() {
}
public interface ResponseStage {
- RequestIdStage response(String response);
+ RequestIdStage response(@NotNull String response);
Builder from(LemurStringResponse other);
}
public interface RequestIdStage {
- UsageStage requestId(String requestId);
+ UsageStage requestId(@NotNull String requestId);
}
public interface UsageStage {
- _FinalStage usage(LemurUsage usage);
+ _FinalStage usage(@NotNull LemurUsage usage);
}
public interface _FinalStage {
@@ -135,8 +136,8 @@ public Builder from(LemurStringResponse other) {
*/
@java.lang.Override
@JsonSetter("response")
- public RequestIdStage response(String response) {
- this.response = response;
+ public RequestIdStage response(@NotNull String response) {
+ this.response = Objects.requireNonNull(response, "response must not be null");
return this;
}
@@ -146,8 +147,8 @@ public RequestIdStage response(String response) {
*/
@java.lang.Override
@JsonSetter("request_id")
- public UsageStage requestId(String requestId) {
- this.requestId = requestId;
+ public UsageStage requestId(@NotNull String requestId) {
+ this.requestId = Objects.requireNonNull(requestId, "requestId must not be null");
return this;
}
@@ -157,8 +158,8 @@ public UsageStage requestId(String requestId) {
*/
@java.lang.Override
@JsonSetter("usage")
- public _FinalStage usage(LemurUsage usage) {
- this.usage = usage;
+ public _FinalStage usage(@NotNull LemurUsage usage) {
+ this.usage = Objects.requireNonNull(usage, "usage must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurSummaryResponse.java b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurSummaryResponse.java
index c778ea4a..c679168f 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurSummaryResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurSummaryResponse.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = LemurSummaryResponse.Builder.class)
@@ -91,17 +92,17 @@ public static ResponseStage builder() {
}
public interface ResponseStage {
- RequestIdStage response(String response);
+ RequestIdStage response(@NotNull String response);
Builder from(LemurSummaryResponse other);
}
public interface RequestIdStage {
- UsageStage requestId(String requestId);
+ UsageStage requestId(@NotNull String requestId);
}
public interface UsageStage {
- _FinalStage usage(LemurUsage usage);
+ _FinalStage usage(@NotNull LemurUsage usage);
}
public interface _FinalStage {
@@ -135,8 +136,8 @@ public Builder from(LemurSummaryResponse other) {
*/
@java.lang.Override
@JsonSetter("response")
- public RequestIdStage response(String response) {
- this.response = response;
+ public RequestIdStage response(@NotNull String response) {
+ this.response = Objects.requireNonNull(response, "response must not be null");
return this;
}
@@ -146,8 +147,8 @@ public RequestIdStage response(String response) {
*/
@java.lang.Override
@JsonSetter("request_id")
- public UsageStage requestId(String requestId) {
- this.requestId = requestId;
+ public UsageStage requestId(@NotNull String requestId) {
+ this.requestId = Objects.requireNonNull(requestId, "requestId must not be null");
return this;
}
@@ -157,8 +158,8 @@ public UsageStage requestId(String requestId) {
*/
@java.lang.Override
@JsonSetter("usage")
- public _FinalStage usage(LemurUsage usage) {
- this.usage = usage;
+ public _FinalStage usage(@NotNull LemurUsage usage) {
+ this.usage = Objects.requireNonNull(usage, "usage must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurTaskResponse.java b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurTaskResponse.java
index b1c6d0b1..c3aaf143 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/LemurTaskResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/LemurTaskResponse.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = LemurTaskResponse.Builder.class)
@@ -91,17 +92,17 @@ public static ResponseStage builder() {
}
public interface ResponseStage {
- RequestIdStage response(String response);
+ RequestIdStage response(@NotNull String response);
Builder from(LemurTaskResponse other);
}
public interface RequestIdStage {
- UsageStage requestId(String requestId);
+ UsageStage requestId(@NotNull String requestId);
}
public interface UsageStage {
- _FinalStage usage(LemurUsage usage);
+ _FinalStage usage(@NotNull LemurUsage usage);
}
public interface _FinalStage {
@@ -135,8 +136,8 @@ public Builder from(LemurTaskResponse other) {
*/
@java.lang.Override
@JsonSetter("response")
- public RequestIdStage response(String response) {
- this.response = response;
+ public RequestIdStage response(@NotNull String response) {
+ this.response = Objects.requireNonNull(response, "response must not be null");
return this;
}
@@ -146,8 +147,8 @@ public RequestIdStage response(String response) {
*/
@java.lang.Override
@JsonSetter("request_id")
- public UsageStage requestId(String requestId) {
- this.requestId = requestId;
+ public UsageStage requestId(@NotNull String requestId) {
+ this.requestId = Objects.requireNonNull(requestId, "requestId must not be null");
return this;
}
@@ -157,8 +158,8 @@ public UsageStage requestId(String requestId) {
*/
@java.lang.Override
@JsonSetter("usage")
- public _FinalStage usage(LemurUsage usage) {
- this.usage = usage;
+ public _FinalStage usage(@NotNull LemurUsage usage) {
+ this.usage = Objects.requireNonNull(usage, "usage must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/lemur/types/PurgeLemurRequestDataResponse.java b/src/main/java/com/assemblyai/api/resources/lemur/types/PurgeLemurRequestDataResponse.java
index 0a58bd96..39c2fcfe 100644
--- a/src/main/java/com/assemblyai/api/resources/lemur/types/PurgeLemurRequestDataResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/lemur/types/PurgeLemurRequestDataResponse.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = PurgeLemurRequestDataResponse.Builder.class)
@@ -90,13 +91,13 @@ public static RequestIdStage builder() {
}
public interface RequestIdStage {
- RequestIdToPurgeStage requestId(String requestId);
+ RequestIdToPurgeStage requestId(@NotNull String requestId);
Builder from(PurgeLemurRequestDataResponse other);
}
public interface RequestIdToPurgeStage {
- DeletedStage requestIdToPurge(String requestIdToPurge);
+ DeletedStage requestIdToPurge(@NotNull String requestIdToPurge);
}
public interface DeletedStage {
@@ -134,8 +135,8 @@ public Builder from(PurgeLemurRequestDataResponse other) {
*/
@java.lang.Override
@JsonSetter("request_id")
- public RequestIdToPurgeStage requestId(String requestId) {
- this.requestId = requestId;
+ public RequestIdToPurgeStage requestId(@NotNull String requestId) {
+ this.requestId = Objects.requireNonNull(requestId, "requestId must not be null");
return this;
}
@@ -145,8 +146,8 @@ public RequestIdToPurgeStage requestId(String requestId) {
*/
@java.lang.Override
@JsonSetter("request_id_to_purge")
- public DeletedStage requestIdToPurge(String requestIdToPurge) {
- this.requestIdToPurge = requestIdToPurge;
+ public DeletedStage requestIdToPurge(@NotNull String requestIdToPurge) {
+ this.requestIdToPurge = Objects.requireNonNull(requestIdToPurge, "requestIdToPurge must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeBaseMessage.java b/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeBaseMessage.java
index 72eb0333..7d7d70fe 100644
--- a/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeBaseMessage.java
+++ b/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeBaseMessage.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = RealtimeBaseMessage.Builder.class)
@@ -65,7 +66,7 @@ public static MessageTypeStage builder() {
}
public interface MessageTypeStage {
- _FinalStage messageType(MessageType messageType);
+ _FinalStage messageType(@NotNull MessageType messageType);
Builder from(RealtimeBaseMessage other);
}
@@ -95,8 +96,8 @@ public Builder from(RealtimeBaseMessage other) {
*/
@java.lang.Override
@JsonSetter("message_type")
- public _FinalStage messageType(MessageType messageType) {
- this.messageType = messageType;
+ public _FinalStage messageType(@NotNull MessageType messageType) {
+ this.messageType = Objects.requireNonNull(messageType, "messageType must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeBaseTranscript.java b/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeBaseTranscript.java
index d1f43b2e..773965ac 100644
--- a/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeBaseTranscript.java
+++ b/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeBaseTranscript.java
@@ -18,6 +18,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = RealtimeBaseTranscript.Builder.class)
@@ -157,11 +158,11 @@ public interface ConfidenceStage {
}
public interface TextStage {
- CreatedStage text(String text);
+ CreatedStage text(@NotNull String text);
}
public interface CreatedStage {
- _FinalStage created(OffsetDateTime created);
+ _FinalStage created(@NotNull OffsetDateTime created);
}
public interface _FinalStage {
@@ -244,8 +245,8 @@ public TextStage confidence(double confidence) {
*/
@java.lang.Override
@JsonSetter("text")
- public CreatedStage text(String text) {
- this.text = text;
+ public CreatedStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
@@ -255,8 +256,8 @@ public CreatedStage text(String text) {
*/
@java.lang.Override
@JsonSetter("created")
- public _FinalStage created(OffsetDateTime created) {
- this.created = created;
+ public _FinalStage created(@NotNull OffsetDateTime created) {
+ this.created = Objects.requireNonNull(created, "created must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeError.java b/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeError.java
index 4ff09b97..eb1e2a29 100644
--- a/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeError.java
+++ b/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeError.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = RealtimeError.Builder.class)
@@ -62,7 +63,7 @@ public static ErrorStage builder() {
}
public interface ErrorStage {
- _FinalStage error(String error);
+ _FinalStage error(@NotNull String error);
Builder from(RealtimeError other);
}
@@ -88,8 +89,8 @@ public Builder from(RealtimeError other) {
@java.lang.Override
@JsonSetter("error")
- public _FinalStage error(String error) {
- this.error = error;
+ public _FinalStage error(@NotNull String error) {
+ this.error = Objects.requireNonNull(error, "error must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeTemporaryTokenResponse.java b/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeTemporaryTokenResponse.java
index 50d58c56..7cdcf605 100644
--- a/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeTemporaryTokenResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/realtime/types/RealtimeTemporaryTokenResponse.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = RealtimeTemporaryTokenResponse.Builder.class)
@@ -65,7 +66,7 @@ public static TokenStage builder() {
}
public interface TokenStage {
- _FinalStage token(String token);
+ _FinalStage token(@NotNull String token);
Builder from(RealtimeTemporaryTokenResponse other);
}
@@ -95,8 +96,8 @@ public Builder from(RealtimeTemporaryTokenResponse other) {
*/
@java.lang.Override
@JsonSetter("token")
- public _FinalStage token(String token) {
- this.token = token;
+ public _FinalStage token(@NotNull String token) {
+ this.token = Objects.requireNonNull(token, "token must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/realtime/types/Word.java b/src/main/java/com/assemblyai/api/resources/realtime/types/Word.java
index d35a00c0..7745db0e 100644
--- a/src/main/java/com/assemblyai/api/resources/realtime/types/Word.java
+++ b/src/main/java/com/assemblyai/api/resources/realtime/types/Word.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = Word.Builder.class)
@@ -112,7 +113,7 @@ public interface ConfidenceStage {
}
public interface TextStage {
- _FinalStage text(String text);
+ _FinalStage text(@NotNull String text);
}
public interface _FinalStage {
@@ -182,8 +183,8 @@ public TextStage confidence(double confidence) {
*/
@java.lang.Override
@JsonSetter("text")
- public _FinalStage text(String text) {
- this.text = text;
+ public _FinalStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/requests/TranscriptParams.java b/src/main/java/com/assemblyai/api/resources/transcripts/requests/TranscriptParams.java
index f7c27dab..4be2637f 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/requests/TranscriptParams.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/requests/TranscriptParams.java
@@ -27,6 +27,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TranscriptParams.Builder.class)
@@ -259,7 +260,9 @@ public Optional getDualChannel() {
}
/**
- * @return The URL to which we send webhook requests. We sends two different types of webhook requests. One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
+ * @return The URL to which we send webhook requests.
+ * We sends two different types of webhook requests.
+ * One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
*/
@JsonProperty("webhook_url")
@java.lang.Override
@@ -630,7 +633,7 @@ public static AudioUrlStage builder() {
}
public interface AudioUrlStage {
- _FinalStage audioUrl(String audioUrl);
+ _FinalStage audioUrl(@NotNull String audioUrl);
Builder from(TranscriptParams other);
}
@@ -919,8 +922,8 @@ public Builder from(TranscriptParams other) {
*/
@java.lang.Override
@JsonSetter("audio_url")
- public _FinalStage audioUrl(String audioUrl) {
- this.audioUrl = audioUrl;
+ public _FinalStage audioUrl(@NotNull String audioUrl) {
+ this.audioUrl = Objects.requireNonNull(audioUrl, "audioUrl must not be null");
return this;
}
@@ -1398,7 +1401,9 @@ public _FinalStage webhookAuthHeaderName(Optional webhookAuthHeaderName)
}
/**
- * The URL to which we send webhook requests. We sends two different types of webhook requests. One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
+ * The URL to which we send webhook requests.
+ * We sends two different types of webhook requests.
+ * One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightResult.java
index 3d1de8e8..070aeb8e 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightResult.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightResult.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = AutoHighlightResult.Builder.class)
@@ -115,7 +116,7 @@ public interface RankStage {
}
public interface TextStage {
- _FinalStage text(String text);
+ _FinalStage text(@NotNull String text);
}
public interface _FinalStage {
@@ -180,8 +181,8 @@ public TextStage rank(double rank) {
*/
@java.lang.Override
@JsonSetter("text")
- public _FinalStage text(String text) {
- this.text = text;
+ public _FinalStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightsResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightsResult.java
index 18966b5e..f59f439d 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightsResult.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/AutoHighlightsResult.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = AutoHighlightsResult.Builder.class)
@@ -82,7 +83,7 @@ public static StatusStage builder() {
}
public interface StatusStage {
- _FinalStage status(AudioIntelligenceModelStatus status);
+ _FinalStage status(@NotNull AudioIntelligenceModelStatus status);
Builder from(AutoHighlightsResult other);
}
@@ -121,8 +122,8 @@ public Builder from(AutoHighlightsResult other) {
*/
@java.lang.Override
@JsonSetter("status")
- public _FinalStage status(AudioIntelligenceModelStatus status) {
- this.status = status;
+ public _FinalStage status(@NotNull AudioIntelligenceModelStatus status) {
+ this.status = Objects.requireNonNull(status, "status must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/Chapter.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/Chapter.java
index c5ac605a..d91024c4 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/Chapter.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/Chapter.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = Chapter.Builder.class)
@@ -119,17 +120,17 @@ public static GistStage builder() {
}
public interface GistStage {
- HeadlineStage gist(String gist);
+ HeadlineStage gist(@NotNull String gist);
Builder from(Chapter other);
}
public interface HeadlineStage {
- SummaryStage headline(String headline);
+ SummaryStage headline(@NotNull String headline);
}
public interface SummaryStage {
- StartStage summary(String summary);
+ StartStage summary(@NotNull String summary);
}
public interface StartStage {
@@ -178,8 +179,8 @@ public Builder from(Chapter other) {
*/
@java.lang.Override
@JsonSetter("gist")
- public HeadlineStage gist(String gist) {
- this.gist = gist;
+ public HeadlineStage gist(@NotNull String gist) {
+ this.gist = Objects.requireNonNull(gist, "gist must not be null");
return this;
}
@@ -189,8 +190,8 @@ public HeadlineStage gist(String gist) {
*/
@java.lang.Override
@JsonSetter("headline")
- public SummaryStage headline(String headline) {
- this.headline = headline;
+ public SummaryStage headline(@NotNull String headline) {
+ this.headline = Objects.requireNonNull(headline, "headline must not be null");
return this;
}
@@ -200,8 +201,8 @@ public SummaryStage headline(String headline) {
*/
@java.lang.Override
@JsonSetter("summary")
- public StartStage summary(String summary) {
- this.summary = summary;
+ public StartStage summary(@NotNull String summary) {
+ this.summary = Objects.requireNonNull(summary, "summary must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabel.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabel.java
index ac64e0cb..d701e425 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabel.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabel.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = ContentSafetyLabel.Builder.class)
@@ -88,7 +89,7 @@ public static LabelStage builder() {
}
public interface LabelStage {
- ConfidenceStage label(String label);
+ ConfidenceStage label(@NotNull String label);
Builder from(ContentSafetyLabel other);
}
@@ -132,8 +133,8 @@ public Builder from(ContentSafetyLabel other) {
*/
@java.lang.Override
@JsonSetter("label")
- public ConfidenceStage label(String label) {
- this.label = label;
+ public ConfidenceStage label(@NotNull String label) {
+ this.label = Objects.requireNonNull(label, "label must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelResult.java
index 7e5239c1..1e0a445a 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelResult.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelResult.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = ContentSafetyLabelResult.Builder.class)
@@ -122,7 +123,7 @@ public static TextStage builder() {
}
public interface TextStage {
- SentencesIdxStartStage text(String text);
+ SentencesIdxStartStage text(@NotNull String text);
Builder from(ContentSafetyLabelResult other);
}
@@ -136,7 +137,7 @@ public interface SentencesIdxEndStage {
}
public interface TimestampStage {
- _FinalStage timestamp(Timestamp timestamp);
+ _FinalStage timestamp(@NotNull Timestamp timestamp);
}
public interface _FinalStage {
@@ -183,8 +184,8 @@ public Builder from(ContentSafetyLabelResult other) {
*/
@java.lang.Override
@JsonSetter("text")
- public SentencesIdxStartStage text(String text) {
- this.text = text;
+ public SentencesIdxStartStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
@@ -216,8 +217,8 @@ public TimestampStage sentencesIdxEnd(int sentencesIdxEnd) {
*/
@java.lang.Override
@JsonSetter("timestamp")
- public _FinalStage timestamp(Timestamp timestamp) {
- this.timestamp = timestamp;
+ public _FinalStage timestamp(@NotNull Timestamp timestamp) {
+ this.timestamp = Objects.requireNonNull(timestamp, "timestamp must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelsResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelsResult.java
index 0ea3051e..0ce23a23 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelsResult.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/ContentSafetyLabelsResult.java
@@ -18,6 +18,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = ContentSafetyLabelsResult.Builder.class)
@@ -107,7 +108,7 @@ public static StatusStage builder() {
}
public interface StatusStage {
- _FinalStage status(AudioIntelligenceModelStatus status);
+ _FinalStage status(@NotNull AudioIntelligenceModelStatus status);
Builder from(ContentSafetyLabelsResult other);
}
@@ -164,8 +165,8 @@ public Builder from(ContentSafetyLabelsResult other) {
*/
@java.lang.Override
@JsonSetter("status")
- public _FinalStage status(AudioIntelligenceModelStatus status) {
- this.status = status;
+ public _FinalStage status(@NotNull AudioIntelligenceModelStatus status) {
+ this.status = Objects.requireNonNull(status, "status must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/Entity.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/Entity.java
index e0363a32..2a1fdd5c 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/Entity.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/Entity.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = Entity.Builder.class)
@@ -101,13 +102,13 @@ public static EntityTypeStage builder() {
}
public interface EntityTypeStage {
- TextStage entityType(EntityType entityType);
+ TextStage entityType(@NotNull EntityType entityType);
Builder from(Entity other);
}
public interface TextStage {
- StartStage text(String text);
+ StartStage text(@NotNull String text);
}
public interface StartStage {
@@ -152,8 +153,8 @@ public Builder from(Entity other) {
*/
@java.lang.Override
@JsonSetter("entity_type")
- public TextStage entityType(EntityType entityType) {
- this.entityType = entityType;
+ public TextStage entityType(@NotNull EntityType entityType) {
+ this.entityType = Objects.requireNonNull(entityType, "entityType must not be null");
return this;
}
@@ -163,8 +164,8 @@ public TextStage entityType(EntityType entityType) {
*/
@java.lang.Override
@JsonSetter("text")
- public StartStage text(String text) {
- this.text = text;
+ public StartStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/PageDetails.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/PageDetails.java
index a32f3c77..99fcd7ba 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/PageDetails.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/PageDetails.java
@@ -16,6 +16,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = PageDetails.Builder.class)
@@ -131,7 +132,7 @@ public interface ResultCountStage {
}
public interface CurrentUrlStage {
- _FinalStage currentUrl(String currentUrl);
+ _FinalStage currentUrl(@NotNull String currentUrl);
}
public interface _FinalStage {
@@ -201,8 +202,8 @@ public CurrentUrlStage resultCount(int resultCount) {
*/
@java.lang.Override
@JsonSetter("current_url")
- public _FinalStage currentUrl(String currentUrl) {
- this.currentUrl = currentUrl;
+ public _FinalStage currentUrl(@NotNull String currentUrl) {
+ this.currentUrl = Objects.requireNonNull(currentUrl, "currentUrl must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/ParagraphsResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/ParagraphsResponse.java
index 0722070b..c7b09a34 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/ParagraphsResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/ParagraphsResponse.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = ParagraphsResponse.Builder.class)
@@ -97,7 +98,7 @@ public static IdStage builder() {
}
public interface IdStage {
- ConfidenceStage id(String id);
+ ConfidenceStage id(@NotNull String id);
Builder from(ParagraphsResponse other);
}
@@ -146,8 +147,8 @@ public Builder from(ParagraphsResponse other) {
@java.lang.Override
@JsonSetter("id")
- public ConfidenceStage id(String id) {
- this.id = id;
+ public ConfidenceStage id(@NotNull String id) {
+ this.id = Objects.requireNonNull(id, "id must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/RedactedAudioResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/RedactedAudioResponse.java
index 0e7d0028..affaf542 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/RedactedAudioResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/RedactedAudioResponse.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = RedactedAudioResponse.Builder.class)
@@ -76,13 +77,13 @@ public static StatusStage builder() {
}
public interface StatusStage {
- RedactedAudioUrlStage status(String status);
+ RedactedAudioUrlStage status(@NotNull String status);
Builder from(RedactedAudioResponse other);
}
public interface RedactedAudioUrlStage {
- _FinalStage redactedAudioUrl(String redactedAudioUrl);
+ _FinalStage redactedAudioUrl(@NotNull String redactedAudioUrl);
}
public interface _FinalStage {
@@ -113,8 +114,8 @@ public Builder from(RedactedAudioResponse other) {
*/
@java.lang.Override
@JsonSetter("status")
- public RedactedAudioUrlStage status(String status) {
- this.status = status;
+ public RedactedAudioUrlStage status(@NotNull String status) {
+ this.status = Objects.requireNonNull(status, "status must not be null");
return this;
}
@@ -124,8 +125,8 @@ public RedactedAudioUrlStage status(String status) {
*/
@java.lang.Override
@JsonSetter("redacted_audio_url")
- public _FinalStage redactedAudioUrl(String redactedAudioUrl) {
- this.redactedAudioUrl = redactedAudioUrl;
+ public _FinalStage redactedAudioUrl(@NotNull String redactedAudioUrl) {
+ this.redactedAudioUrl = Objects.requireNonNull(redactedAudioUrl, "redactedAudioUrl must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/SentencesResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/SentencesResponse.java
index 8149a139..d1c9ef7b 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/SentencesResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/SentencesResponse.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = SentencesResponse.Builder.class)
@@ -97,7 +98,7 @@ public static IdStage builder() {
}
public interface IdStage {
- ConfidenceStage id(String id);
+ ConfidenceStage id(@NotNull String id);
Builder from(SentencesResponse other);
}
@@ -146,8 +147,8 @@ public Builder from(SentencesResponse other) {
@java.lang.Override
@JsonSetter("id")
- public ConfidenceStage id(String id) {
- this.id = id;
+ public ConfidenceStage id(@NotNull String id) {
+ this.id = Objects.requireNonNull(id, "id must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/SentimentAnalysisResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/SentimentAnalysisResult.java
index aabe4072..7e413349 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/SentimentAnalysisResult.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/SentimentAnalysisResult.java
@@ -16,6 +16,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = SentimentAnalysisResult.Builder.class)
@@ -134,7 +135,7 @@ public static TextStage builder() {
}
public interface TextStage {
- StartStage text(String text);
+ StartStage text(@NotNull String text);
Builder from(SentimentAnalysisResult other);
}
@@ -148,7 +149,7 @@ public interface EndStage {
}
public interface SentimentStage {
- ConfidenceStage sentiment(Sentiment sentiment);
+ ConfidenceStage sentiment(@NotNull Sentiment sentiment);
}
public interface ConfidenceStage {
@@ -200,8 +201,8 @@ public Builder from(SentimentAnalysisResult other) {
*/
@java.lang.Override
@JsonSetter("text")
- public StartStage text(String text) {
- this.text = text;
+ public StartStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
@@ -233,8 +234,8 @@ public SentimentStage end(int end) {
*/
@java.lang.Override
@JsonSetter("sentiment")
- public ConfidenceStage sentiment(Sentiment sentiment) {
- this.sentiment = sentiment;
+ public ConfidenceStage sentiment(@NotNull Sentiment sentiment) {
+ this.sentiment = Objects.requireNonNull(sentiment, "sentiment must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionModelResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionModelResult.java
index 6dc59595..cb5d28e5 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionModelResult.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionModelResult.java
@@ -18,6 +18,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TopicDetectionModelResult.Builder.class)
@@ -95,7 +96,7 @@ public static StatusStage builder() {
}
public interface StatusStage {
- _FinalStage status(AudioIntelligenceModelStatus status);
+ _FinalStage status(@NotNull AudioIntelligenceModelStatus status);
Builder from(TopicDetectionModelResult other);
}
@@ -143,8 +144,8 @@ public Builder from(TopicDetectionModelResult other) {
*/
@java.lang.Override
@JsonSetter("status")
- public _FinalStage status(AudioIntelligenceModelStatus status) {
- this.status = status;
+ public _FinalStage status(@NotNull AudioIntelligenceModelStatus status) {
+ this.status = Objects.requireNonNull(status, "status must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResult.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResult.java
index 54fbe14c..df39ebc5 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResult.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResult.java
@@ -17,6 +17,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TopicDetectionResult.Builder.class)
@@ -88,7 +89,7 @@ public static TextStage builder() {
}
public interface TextStage {
- _FinalStage text(String text);
+ _FinalStage text(@NotNull String text);
Builder from(TopicDetectionResult other);
}
@@ -132,8 +133,8 @@ public Builder from(TopicDetectionResult other) {
*/
@java.lang.Override
@JsonSetter("text")
- public _FinalStage text(String text) {
- this.text = text;
+ public _FinalStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResultLabelsItem.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResultLabelsItem.java
index ecf37434..dc8a6a2a 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResultLabelsItem.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TopicDetectionResultLabelsItem.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TopicDetectionResultLabelsItem.Builder.class)
@@ -82,7 +83,7 @@ public interface RelevanceStage {
}
public interface LabelStage {
- _FinalStage label(String label);
+ _FinalStage label(@NotNull String label);
}
public interface _FinalStage {
@@ -124,8 +125,8 @@ public LabelStage relevance(double relevance) {
*/
@java.lang.Override
@JsonSetter("label")
- public _FinalStage label(String label) {
- this.label = label;
+ public _FinalStage label(@NotNull String label) {
+ this.label = Objects.requireNonNull(label, "label must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/Transcript.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/Transcript.java
index 37e947c7..1a44e3f1 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/Transcript.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/Transcript.java
@@ -17,6 +17,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = Transcript.Builder.class)
@@ -305,7 +306,6 @@ public Optional getLanguageDetection() {
/**
* @return The confidence threshold for the automatically detected language.
* An error will be returned if the language confidence is below this threshold.
- * Defaults to 0.
*/
@JsonProperty("language_confidence_threshold")
public Optional getLanguageConfidenceThreshold() {
@@ -868,17 +868,17 @@ public static IdStage builder() {
}
public interface IdStage {
- AudioUrlStage id(String id);
+ AudioUrlStage id(@NotNull String id);
Builder from(Transcript other);
}
public interface AudioUrlStage {
- StatusStage audioUrl(String audioUrl);
+ StatusStage audioUrl(@NotNull String audioUrl);
}
public interface StatusStage {
- WebhookAuthStage status(TranscriptStatus status);
+ WebhookAuthStage status(@NotNull TranscriptStatus status);
}
public interface WebhookAuthStage {
@@ -898,11 +898,11 @@ public interface SummarizationStage {
}
public interface LanguageModelStage {
- AcousticModelStage languageModel(String languageModel);
+ AcousticModelStage languageModel(@NotNull String languageModel);
}
public interface AcousticModelStage {
- _FinalStage acousticModel(String acousticModel);
+ _FinalStage acousticModel(@NotNull String acousticModel);
}
public interface _FinalStage {
@@ -1307,8 +1307,8 @@ public Builder from(Transcript other) {
*/
@java.lang.Override
@JsonSetter("id")
- public AudioUrlStage id(String id) {
- this.id = id;
+ public AudioUrlStage id(@NotNull String id) {
+ this.id = Objects.requireNonNull(id, "id must not be null");
return this;
}
@@ -1318,8 +1318,8 @@ public AudioUrlStage id(String id) {
*/
@java.lang.Override
@JsonSetter("audio_url")
- public StatusStage audioUrl(String audioUrl) {
- this.audioUrl = audioUrl;
+ public StatusStage audioUrl(@NotNull String audioUrl) {
+ this.audioUrl = Objects.requireNonNull(audioUrl, "audioUrl must not be null");
return this;
}
@@ -1329,8 +1329,8 @@ public StatusStage audioUrl(String audioUrl) {
*/
@java.lang.Override
@JsonSetter("status")
- public WebhookAuthStage status(TranscriptStatus status) {
- this.status = status;
+ public WebhookAuthStage status(@NotNull TranscriptStatus status) {
+ this.status = Objects.requireNonNull(status, "status must not be null");
return this;
}
@@ -1384,8 +1384,8 @@ public LanguageModelStage summarization(boolean summarization) {
*/
@java.lang.Override
@JsonSetter("language_model")
- public AcousticModelStage languageModel(String languageModel) {
- this.languageModel = languageModel;
+ public AcousticModelStage languageModel(@NotNull String languageModel) {
+ this.languageModel = Objects.requireNonNull(languageModel, "languageModel must not be null");
return this;
}
@@ -1395,8 +1395,8 @@ public AcousticModelStage languageModel(String languageModel) {
*/
@java.lang.Override
@JsonSetter("acoustic_model")
- public _FinalStage acousticModel(String acousticModel) {
- this.acousticModel = acousticModel;
+ public _FinalStage acousticModel(@NotNull String acousticModel) {
+ this.acousticModel = Objects.requireNonNull(acousticModel, "acousticModel must not be null");
return this;
}
@@ -2174,8 +2174,7 @@ public _FinalStage languageConfidence(Optional languageConfidence) {
/**
* The confidence threshold for the automatically detected language.
- * An error will be returned if the language confidence is below this threshold.
- * Defaults to 0.
+ * An error will be returned if the language confidence is below this threshold.
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptCustomSpelling.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptCustomSpelling.java
index 78fc5b7b..71d08e1f 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptCustomSpelling.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptCustomSpelling.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TranscriptCustomSpelling.Builder.class)
@@ -79,7 +80,7 @@ public static ToStage builder() {
}
public interface ToStage {
- _FinalStage to(String to);
+ _FinalStage to(@NotNull String to);
Builder from(TranscriptCustomSpelling other);
}
@@ -118,8 +119,8 @@ public Builder from(TranscriptCustomSpelling other) {
*/
@java.lang.Override
@JsonSetter("to")
- public _FinalStage to(String to) {
- this.to = to;
+ public _FinalStage to(@NotNull String to) {
+ this.to = Objects.requireNonNull(to, "to must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptList.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptList.java
index 6ee8c77c..a1f9f84f 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptList.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptList.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TranscriptList.Builder.class)
@@ -74,7 +75,7 @@ public static PageDetailsStage builder() {
}
public interface PageDetailsStage {
- _FinalStage pageDetails(PageDetails pageDetails);
+ _FinalStage pageDetails(@NotNull PageDetails pageDetails);
Builder from(TranscriptList other);
}
@@ -109,8 +110,8 @@ public Builder from(TranscriptList other) {
@java.lang.Override
@JsonSetter("page_details")
- public _FinalStage pageDetails(PageDetails pageDetails) {
- this.pageDetails = pageDetails;
+ public _FinalStage pageDetails(@NotNull PageDetails pageDetails) {
+ this.pageDetails = Objects.requireNonNull(pageDetails, "pageDetails must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptListItem.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptListItem.java
index ba88b075..6cf42e21 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptListItem.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptListItem.java
@@ -17,6 +17,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TranscriptListItem.Builder.class)
@@ -131,25 +132,25 @@ public static IdStage builder() {
}
public interface IdStage {
- ResourceUrlStage id(String id);
+ ResourceUrlStage id(@NotNull String id);
Builder from(TranscriptListItem other);
}
public interface ResourceUrlStage {
- StatusStage resourceUrl(String resourceUrl);
+ StatusStage resourceUrl(@NotNull String resourceUrl);
}
public interface StatusStage {
- CreatedStage status(TranscriptStatus status);
+ CreatedStage status(@NotNull TranscriptStatus status);
}
public interface CreatedStage {
- AudioUrlStage created(OffsetDateTime created);
+ AudioUrlStage created(@NotNull OffsetDateTime created);
}
public interface AudioUrlStage {
- _FinalStage audioUrl(String audioUrl);
+ _FinalStage audioUrl(@NotNull String audioUrl);
}
public interface _FinalStage {
@@ -200,36 +201,36 @@ public Builder from(TranscriptListItem other) {
@java.lang.Override
@JsonSetter("id")
- public ResourceUrlStage id(String id) {
- this.id = id;
+ public ResourceUrlStage id(@NotNull String id) {
+ this.id = Objects.requireNonNull(id, "id must not be null");
return this;
}
@java.lang.Override
@JsonSetter("resource_url")
- public StatusStage resourceUrl(String resourceUrl) {
- this.resourceUrl = resourceUrl;
+ public StatusStage resourceUrl(@NotNull String resourceUrl) {
+ this.resourceUrl = Objects.requireNonNull(resourceUrl, "resourceUrl must not be null");
return this;
}
@java.lang.Override
@JsonSetter("status")
- public CreatedStage status(TranscriptStatus status) {
- this.status = status;
+ public CreatedStage status(@NotNull TranscriptStatus status) {
+ this.status = Objects.requireNonNull(status, "status must not be null");
return this;
}
@java.lang.Override
@JsonSetter("created")
- public AudioUrlStage created(OffsetDateTime created) {
- this.created = created;
+ public AudioUrlStage created(@NotNull OffsetDateTime created) {
+ this.created = Objects.requireNonNull(created, "created must not be null");
return this;
}
@java.lang.Override
@JsonSetter("audio_url")
- public _FinalStage audioUrl(String audioUrl) {
- this.audioUrl = audioUrl;
+ public _FinalStage audioUrl(@NotNull String audioUrl) {
+ this.audioUrl = Objects.requireNonNull(audioUrl, "audioUrl must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptOptionalParams.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptOptionalParams.java
index 9bf423a0..bd2f691b 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptOptionalParams.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptOptionalParams.java
@@ -245,7 +245,9 @@ public Optional getDualChannel() {
}
/**
- * @return The URL to which we send webhook requests. We sends two different types of webhook requests. One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
+ * @return The URL to which we send webhook requests.
+ * We sends two different types of webhook requests.
+ * One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
*/
@JsonProperty("webhook_url")
@java.lang.Override
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptParagraph.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptParagraph.java
index 5647839f..4e32ce73 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptParagraph.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptParagraph.java
@@ -18,6 +18,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TranscriptParagraph.Builder.class)
@@ -121,7 +122,7 @@ public static TextStage builder() {
}
public interface TextStage {
- StartStage text(String text);
+ StartStage text(@NotNull String text);
Builder from(TranscriptParagraph other);
}
@@ -184,8 +185,8 @@ public Builder from(TranscriptParagraph other) {
@java.lang.Override
@JsonSetter("text")
- public StartStage text(String text) {
- this.text = text;
+ public StartStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptReadyNotification.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptReadyNotification.java
index dc87ec8f..772c8d07 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptReadyNotification.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptReadyNotification.java
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TranscriptReadyNotification.Builder.class)
@@ -77,13 +78,13 @@ public static TranscriptIdStage builder() {
}
public interface TranscriptIdStage {
- StatusStage transcriptId(String transcriptId);
+ StatusStage transcriptId(@NotNull String transcriptId);
Builder from(TranscriptReadyNotification other);
}
public interface StatusStage {
- _FinalStage status(TranscriptReadyStatus status);
+ _FinalStage status(@NotNull TranscriptReadyStatus status);
}
public interface _FinalStage {
@@ -114,8 +115,8 @@ public Builder from(TranscriptReadyNotification other) {
*/
@java.lang.Override
@JsonSetter("transcript_id")
- public StatusStage transcriptId(String transcriptId) {
- this.transcriptId = transcriptId;
+ public StatusStage transcriptId(@NotNull String transcriptId) {
+ this.transcriptId = Objects.requireNonNull(transcriptId, "transcriptId must not be null");
return this;
}
@@ -125,8 +126,8 @@ public StatusStage transcriptId(String transcriptId) {
*/
@java.lang.Override
@JsonSetter("status")
- public _FinalStage status(TranscriptReadyStatus status) {
- this.status = status;
+ public _FinalStage status(@NotNull TranscriptReadyStatus status) {
+ this.status = Objects.requireNonNull(status, "status must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptSentence.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptSentence.java
index da835722..b9fca84c 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptSentence.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptSentence.java
@@ -18,6 +18,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TranscriptSentence.Builder.class)
@@ -121,7 +122,7 @@ public static TextStage builder() {
}
public interface TextStage {
- StartStage text(String text);
+ StartStage text(@NotNull String text);
Builder from(TranscriptSentence other);
}
@@ -184,8 +185,8 @@ public Builder from(TranscriptSentence other) {
@java.lang.Override
@JsonSetter("text")
- public StartStage text(String text) {
- this.text = text;
+ public StartStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptUtterance.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptUtterance.java
index f556b5cf..fe1153a9 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptUtterance.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptUtterance.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TranscriptUtterance.Builder.class)
@@ -149,11 +150,11 @@ public interface EndStage {
}
public interface TextStage {
- SpeakerStage text(String text);
+ SpeakerStage text(@NotNull String text);
}
public interface SpeakerStage {
- _FinalStage speaker(String speaker);
+ _FinalStage speaker(@NotNull String speaker);
}
public interface _FinalStage {
@@ -236,8 +237,8 @@ public TextStage end(int end) {
*/
@java.lang.Override
@JsonSetter("text")
- public SpeakerStage text(String text) {
- this.text = text;
+ public SpeakerStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
@@ -247,8 +248,8 @@ public SpeakerStage text(String text) {
*/
@java.lang.Override
@JsonSetter("speaker")
- public _FinalStage speaker(String speaker) {
- this.speaker = speaker;
+ public _FinalStage speaker(@NotNull String speaker) {
+ this.speaker = Objects.requireNonNull(speaker, "speaker must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptWord.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptWord.java
index f6c63531..33796ddc 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptWord.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/TranscriptWord.java
@@ -16,6 +16,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = TranscriptWord.Builder.class)
@@ -123,7 +124,7 @@ public interface EndStage {
}
public interface TextStage {
- _FinalStage text(String text);
+ _FinalStage text(@NotNull String text);
}
public interface _FinalStage {
@@ -184,8 +185,8 @@ public TextStage end(int end) {
@java.lang.Override
@JsonSetter("text")
- public _FinalStage text(String text) {
- this.text = text;
+ public _FinalStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchMatch.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchMatch.java
index d158dfce..c6146fae 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchMatch.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchMatch.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = WordSearchMatch.Builder.class)
@@ -109,7 +110,7 @@ public static TextStage builder() {
}
public interface TextStage {
- CountStage text(String text);
+ CountStage text(@NotNull String text);
Builder from(WordSearchMatch other);
}
@@ -164,8 +165,8 @@ public Builder from(WordSearchMatch other) {
*/
@java.lang.Override
@JsonSetter("text")
- public CountStage text(String text) {
- this.text = text;
+ public CountStage text(@NotNull String text) {
+ this.text = Objects.requireNonNull(text, "text must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchResponse.java b/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchResponse.java
index 208692ba..a5cbb640 100644
--- a/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchResponse.java
+++ b/src/main/java/com/assemblyai/api/resources/transcripts/types/WordSearchResponse.java
@@ -17,6 +17,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = WordSearchResponse.Builder.class)
@@ -91,7 +92,7 @@ public static IdStage builder() {
}
public interface IdStage {
- TotalCountStage id(String id);
+ TotalCountStage id(@NotNull String id);
Builder from(WordSearchResponse other);
}
@@ -137,8 +138,8 @@ public Builder from(WordSearchResponse other) {
*/
@java.lang.Override
@JsonSetter("id")
- public TotalCountStage id(String id) {
- this.id = id;
+ public TotalCountStage id(@NotNull String id) {
+ this.id = Objects.requireNonNull(id, "id must not be null");
return this;
}
diff --git a/src/main/java/com/assemblyai/api/types/Error.java b/src/main/java/com/assemblyai/api/types/Error.java
index 626e8a08..8cab22ed 100644
--- a/src/main/java/com/assemblyai/api/types/Error.java
+++ b/src/main/java/com/assemblyai/api/types/Error.java
@@ -16,6 +16,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = Error.Builder.class)
@@ -75,7 +76,7 @@ public static ErrorStage builder() {
}
public interface ErrorStage {
- _FinalStage error(String error);
+ _FinalStage error(@NotNull String error);
Builder from(Error other);
}
@@ -112,8 +113,8 @@ public Builder from(Error other) {
*/
@java.lang.Override
@JsonSetter("error")
- public _FinalStage error(String error) {
- this.error = error;
+ public _FinalStage error(@NotNull String error) {
+ this.error = Objects.requireNonNull(error, "error must not be null");
return this;
}