ApiException class.
+ */
+@SuppressWarnings("serial")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class ApiException extends Exception {
+ private int code = 0;
+ private Map> responseHeaders = null;
+ private String responseBody = null;
+
+ /**
+ * Constructor for ApiException.
+ */
+ public ApiException() {}
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param throwable a {@link Throwable} object
+ */
+ public ApiException(Throwable throwable) {
+ super(throwable);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ */
+ public ApiException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param throwable a {@link Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) {
+ super(message, throwable);
+ this.code = code;
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param code HTTP status code
+ * @param responseHeaders a {@link Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(String message, int code, Map> responseHeaders, String responseBody) {
+ this(message, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param throwable a {@link Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link Map} of HTTP response headers
+ */
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) {
+ this(message, throwable, code, responseHeaders, null);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param responseHeaders a {@link Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(int code, Map> responseHeaders, String responseBody) {
+ this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param message a {@link String} object
+ */
+ public ApiException(int code, String message) {
+ super(message);
+ this.code = code;
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param message the error message
+ * @param responseHeaders a {@link Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(int code, String message, Map> responseHeaders, String responseBody) {
+ this(code, message);
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Get the HTTP status code.
+ *
+ * @return HTTP status code
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Get the HTTP response headers.
+ *
+ * @return A map of list of string
+ */
+ public Map> getResponseHeaders() {
+ return responseHeaders;
+ }
+
+ /**
+ * Get the HTTP response body.
+ *
+ * @return Response body in the form of string
+ */
+ public String getResponseBody() {
+ return responseBody;
+ }
+
+ /**
+ * Get the exception message including HTTP response data.
+ *
+ * @return The exception message
+ */
+ public String getMessage() {
+ return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s",
+ super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders());
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ApiResponse.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ApiResponse.java
new file mode 100644
index 0000000..7cfbbf0
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ApiResponse.java
@@ -0,0 +1,76 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * API response returned by API call.
+ */
+public class ApiResponse {
+ final private int statusCode;
+ final private Map> headers;
+ final private T data;
+
+ /**
+ * Constructor for ApiResponse.
+ *
+ * @param statusCode The status code of HTTP response
+ * @param headers The headers of HTTP response
+ */
+ public ApiResponse(int statusCode, Map> headers) {
+ this(statusCode, headers, null);
+ }
+
+ /**
+ * Constructor for ApiResponse.
+ *
+ * @param statusCode The status code of HTTP response
+ * @param headers The headers of HTTP response
+ * @param data The object deserialized from response bod
+ */
+ public ApiResponse(int statusCode, Map> headers, T data) {
+ this.statusCode = statusCode;
+ this.headers = headers;
+ this.data = data;
+ }
+
+ /**
+ * Get the status code.
+ *
+ * @return the status code
+ */
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ /**
+ * Get the headers.
+ *
+ * @return a {@link Map} of headers
+ */
+ public Map> getHeaders() {
+ return headers;
+ }
+
+ /**
+ * Get the data.
+ *
+ * @return the data
+ */
+ public T getData() {
+ return data;
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/Configuration.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/Configuration.java
new file mode 100644
index 0000000..18ade6d
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/Configuration.java
@@ -0,0 +1,41 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class Configuration {
+ public static final String VERSION = "0.1.0";
+
+ private static ApiClient defaultApiClient = new ApiClient();
+
+ /**
+ * Get the default API client, which would be used when creating API
+ * instances without providing an API client.
+ *
+ * @return Default API client
+ */
+ public static ApiClient getDefaultApiClient() {
+ return defaultApiClient;
+ }
+
+ /**
+ * Set the default API client, which would be used when creating API
+ * instances without providing an API client.
+ *
+ * @param apiClient API client
+ */
+ public static void setDefaultApiClient(ApiClient apiClient) {
+ defaultApiClient = apiClient;
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/GzipRequestInterceptor.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/GzipRequestInterceptor.java
new file mode 100644
index 0000000..ee348f8
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/GzipRequestInterceptor.java
@@ -0,0 +1,85 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker;
+
+import okhttp3.*;
+import okio.Buffer;
+import okio.BufferedSink;
+import okio.GzipSink;
+import okio.Okio;
+
+import java.io.IOException;
+
+/**
+ * Encodes request bodies using gzip.
+ *
+ * Taken from https://github.com/square/okhttp/issues/350
+ */
+class GzipRequestInterceptor implements Interceptor {
+ @Override
+ public Response intercept(Chain chain) throws IOException {
+ Request originalRequest = chain.request();
+ if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) {
+ return chain.proceed(originalRequest);
+ }
+
+ Request compressedRequest = originalRequest.newBuilder()
+ .header("Content-Encoding", "gzip")
+ .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body())))
+ .build();
+ return chain.proceed(compressedRequest);
+ }
+
+ private RequestBody forceContentLength(final RequestBody requestBody) throws IOException {
+ final Buffer buffer = new Buffer();
+ requestBody.writeTo(buffer);
+ return new RequestBody() {
+ @Override
+ public MediaType contentType() {
+ return requestBody.contentType();
+ }
+
+ @Override
+ public long contentLength() {
+ return buffer.size();
+ }
+
+ @Override
+ public void writeTo(BufferedSink sink) throws IOException {
+ sink.write(buffer.snapshot());
+ }
+ };
+ }
+
+ private RequestBody gzip(final RequestBody body) {
+ return new RequestBody() {
+ @Override
+ public MediaType contentType() {
+ return body.contentType();
+ }
+
+ @Override
+ public long contentLength() {
+ return -1; // We don't know the compressed length in advance!
+ }
+
+ @Override
+ public void writeTo(BufferedSink sink) throws IOException {
+ BufferedSink gzipSink = Okio.buffer(new GzipSink(sink));
+ body.writeTo(gzipSink);
+ gzipSink.close();
+ }
+ };
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/JSON.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/JSON.java
new file mode 100644
index 0000000..b130f5c
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/JSON.java
@@ -0,0 +1,485 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapter;
+import com.google.gson.internal.bind.util.ISO8601Utils;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import com.google.gson.JsonElement;
+import io.gsonfire.GsonFireBuilder;
+import io.gsonfire.TypeSelector;
+
+import okio.ByteString;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.lang.reflect.Type;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.ParsePosition;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Map;
+import java.util.HashMap;
+
+/*
+ * A JSON utility class
+ *
+ * NOTE: in the future, this class may be converted to static, which may break
+ * backward-compatibility
+ */
+public class JSON {
+ private static Gson gson;
+ private static boolean isLenientOnJson = false;
+ private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
+ private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
+ private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
+ private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
+ private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
+
+ @SuppressWarnings("unchecked")
+ public static GsonBuilder createGson() {
+ GsonFireBuilder fireBuilder = new GsonFireBuilder()
+ .registerTypeSelector(io.openkruise.agents.client.e2b.api.models.FromImageRegistry.class, new TypeSelector() {
+ @Override
+ public Class extends io.openkruise.agents.client.e2b.api.models.FromImageRegistry> getClassForElement(JsonElement readElement) {
+ Map classByDiscriminatorValue = new HashMap();
+ classByDiscriminatorValue.put("AWSRegistry", io.openkruise.agents.client.e2b.api.models.AWSRegistry.class);
+ classByDiscriminatorValue.put("GCPRegistry", io.openkruise.agents.client.e2b.api.models.GCPRegistry.class);
+ classByDiscriminatorValue.put("GeneralRegistry", io.openkruise.agents.client.e2b.api.models.GeneralRegistry.class);
+ classByDiscriminatorValue.put("aws", io.openkruise.agents.client.e2b.api.models.AWSRegistry.class);
+ classByDiscriminatorValue.put("gcp", io.openkruise.agents.client.e2b.api.models.GCPRegistry.class);
+ classByDiscriminatorValue.put("registry", io.openkruise.agents.client.e2b.api.models.GeneralRegistry.class);
+ classByDiscriminatorValue.put("FromImageRegistry", io.openkruise.agents.client.e2b.api.models.FromImageRegistry.class);
+ return getClassByDiscriminator(classByDiscriminatorValue,
+ getDiscriminatorValue(readElement, "type"));
+ }
+ })
+ ;
+ GsonBuilder builder = fireBuilder.createGsonBuilder();
+ return builder;
+ }
+
+ private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
+ JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
+ if (null == element) {
+ throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">");
+ }
+ return element.getAsString();
+ }
+
+ /**
+ * Returns the Java class that implements the OpenAPI schema for the specified discriminator value.
+ *
+ * @param classByDiscriminatorValue The map of discriminator values to Java classes.
+ * @param discriminatorValue The value of the OpenAPI discriminator in the input data.
+ * @return The Java class that implements the OpenAPI schema
+ */
+ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
+ Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue);
+ if (null == clazz) {
+ throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">");
+ }
+ return clazz;
+ }
+
+ {
+ GsonBuilder gsonBuilder = createGson();
+ gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter);
+ gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
+ gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.AWSRegistry.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.AdminSandboxKillResult.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.AssignTemplateTagsRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.AssignedTemplateTags.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.BuildLogEntry.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.BuildStatusReason.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.ConnectSandbox.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.CreatedAccessToken.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.CreatedTeamAPIKey.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.DeleteTemplateTagsRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.DiskMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.Error.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.FromImageRegistry.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.GCPRegistry.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.GeneralRegistry.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.IdentifierMaskingDetails.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.ListedSandbox.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.MachineInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.MaxTeamMetric.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.NewAccessToken.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.NewSandbox.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.NewTeamAPIKey.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.NewVolume.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.Node.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.NodeDetail.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.NodeMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.NodeStatusChange.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.NodesGet200ResponseInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.ResumedSandbox.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.Sandbox.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxAutoResumeConfig.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxDetail.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxLog.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxLogEntry.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxLogs.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxLogsV2Response.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxMetric.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxNetworkConfig.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxVolumeMount.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxesGet200ResponseInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxesSandboxIDRefreshesPostRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxesSandboxIDSnapshotsPostRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxesSandboxIDTimeoutPostRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SandboxesWithMetrics.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.SnapshotInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.Team.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TeamAPIKey.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TeamMetric.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TeamUser.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TeamsGet200ResponseInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.Template.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateAliasResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateBuild.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateBuildFileUpload.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateBuildInfo.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateBuildLogsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateBuildRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateBuildRequestV2.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateBuildRequestV3.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateBuildStartV2.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateLegacy.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateRequestResponseV3.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateStep.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateTag.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateUpdateRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateUpdateResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplateWithBuilds.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.TemplatesGet200ResponseInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.UpdateTeamAPIKey.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new io.openkruise.agents.client.e2b.api.models.Volume.CustomTypeAdapterFactory());
+ gson = gsonBuilder.create();
+ }
+
+ /**
+ * Get Gson.
+ *
+ * @return Gson
+ */
+ public static Gson getGson() {
+ return gson;
+ }
+
+ /**
+ * Set Gson.
+ *
+ * @param gson Gson
+ */
+ public static void setGson(Gson gson) {
+ JSON.gson = gson;
+ }
+
+ public static void setLenientOnJson(boolean lenientOnJson) {
+ isLenientOnJson = lenientOnJson;
+ }
+
+ /**
+ * Serialize the given Java object into JSON string.
+ *
+ * @param obj Object
+ * @return String representation of the JSON
+ */
+ public static String serialize(Object obj) {
+ return gson.toJson(obj);
+ }
+
+ /**
+ * Deserialize the given JSON string to Java object.
+ *
+ * @param Type
+ * @param body The JSON string
+ * @param returnType The type to deserialize into
+ * @return The deserialized Java object
+ */
+ @SuppressWarnings("unchecked")
+ public static T deserialize(String body, Type returnType) {
+ try {
+ if (isLenientOnJson) {
+ JsonReader jsonReader = new JsonReader(new StringReader(body));
+ // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
+ jsonReader.setLenient(true);
+ return gson.fromJson(jsonReader, returnType);
+ } else {
+ return gson.fromJson(body, returnType);
+ }
+ } catch (JsonParseException e) {
+ // Fallback processing when failed to parse JSON form response body:
+ // return the response body string directly for the String return type;
+ if (returnType.equals(String.class)) {
+ return (T) body;
+ } else {
+ throw (e);
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for Byte Array type
+ */
+ public static class ByteArrayAdapter extends TypeAdapter {
+
+ @Override
+ public void write(JsonWriter out, byte[] value) throws IOException {
+ if (value == null) {
+ out.nullValue();
+ } else {
+ out.value(ByteString.of(value).base64());
+ }
+ }
+
+ @Override
+ public byte[] read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String bytesAsBase64 = in.nextString();
+ ByteString byteString = ByteString.decodeBase64(bytesAsBase64);
+ return byteString.toByteArray();
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for JSR310 OffsetDateTime type
+ */
+ public static class OffsetDateTimeTypeAdapter extends TypeAdapter {
+
+ private DateTimeFormatter formatter;
+
+ public OffsetDateTimeTypeAdapter() {
+ this(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
+ }
+
+ public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) {
+ this.formatter = formatter;
+ }
+
+ public void setFormat(DateTimeFormatter dateFormat) {
+ this.formatter = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, OffsetDateTime date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ out.value(formatter.format(date));
+ }
+ }
+
+ @Override
+ public OffsetDateTime read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ if (date.endsWith("+0000")) {
+ date = date.substring(0, date.length()-5) + "Z";
+ }
+ return OffsetDateTime.parse(date, formatter);
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for JSR310 LocalDate type
+ */
+ public static class LocalDateTypeAdapter extends TypeAdapter {
+
+ private DateTimeFormatter formatter;
+
+ public LocalDateTypeAdapter() {
+ this(DateTimeFormatter.ISO_LOCAL_DATE);
+ }
+
+ public LocalDateTypeAdapter(DateTimeFormatter formatter) {
+ this.formatter = formatter;
+ }
+
+ public void setFormat(DateTimeFormatter dateFormat) {
+ this.formatter = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, LocalDate date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ out.value(formatter.format(date));
+ }
+ }
+
+ @Override
+ public LocalDate read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ return LocalDate.parse(date, formatter);
+ }
+ }
+ }
+
+ public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
+ offsetDateTimeTypeAdapter.setFormat(dateFormat);
+ }
+
+ public static void setLocalDateFormat(DateTimeFormatter dateFormat) {
+ localDateTypeAdapter.setFormat(dateFormat);
+ }
+
+ /**
+ * Gson TypeAdapter for java.sql.Date type
+ * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used
+ * (more efficient than SimpleDateFormat).
+ */
+ public static class SqlDateTypeAdapter extends TypeAdapter {
+
+ private DateFormat dateFormat;
+
+ public SqlDateTypeAdapter() {}
+
+ public SqlDateTypeAdapter(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ public void setFormat(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, java.sql.Date date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ String value;
+ if (dateFormat != null) {
+ value = dateFormat.format(date);
+ } else {
+ value = date.toString();
+ }
+ out.value(value);
+ }
+ }
+
+ @Override
+ public java.sql.Date read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return new java.sql.Date(dateFormat.parse(date).getTime());
+ }
+ return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for java.util.Date type
+ * If the dateFormat is null, ISO8601Utils will be used.
+ */
+ public static class DateTypeAdapter extends TypeAdapter {
+
+ private DateFormat dateFormat;
+
+ public DateTypeAdapter() {}
+
+ public DateTypeAdapter(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ public void setFormat(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, Date date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ String value;
+ if (dateFormat != null) {
+ value = dateFormat.format(date);
+ } else {
+ value = ISO8601Utils.format(date, true);
+ }
+ out.value(value);
+ }
+ }
+
+ @Override
+ public Date read(JsonReader in) throws IOException {
+ try {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return dateFormat.parse(date);
+ }
+ return ISO8601Utils.parse(date, new ParsePosition(0));
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ } catch (IllegalArgumentException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ }
+
+ public static void setDateFormat(DateFormat dateFormat) {
+ dateTypeAdapter.setFormat(dateFormat);
+ }
+
+ public static void setSqlDateFormat(DateFormat dateFormat) {
+ sqlDateTypeAdapter.setFormat(dateFormat);
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/Pair.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/Pair.java
new file mode 100644
index 0000000..daf8c54
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/Pair.java
@@ -0,0 +1,57 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class Pair {
+ private String name = "";
+ private String value = "";
+
+ public Pair (String name, String value) {
+ setName(name);
+ setValue(value);
+ }
+
+ private void setName(String name) {
+ if (!isValidString(name)) {
+ return;
+ }
+
+ this.name = name;
+ }
+
+ private void setValue(String value) {
+ if (!isValidString(value)) {
+ return;
+ }
+
+ this.value = value;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ private boolean isValidString(String arg) {
+ if (arg == null) {
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ProgressRequestBody.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ProgressRequestBody.java
new file mode 100644
index 0000000..60c8d83
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ProgressRequestBody.java
@@ -0,0 +1,73 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker;
+
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
+
+import java.io.IOException;
+
+import okio.Buffer;
+import okio.BufferedSink;
+import okio.ForwardingSink;
+import okio.Okio;
+import okio.Sink;
+
+public class ProgressRequestBody extends RequestBody {
+
+ private final RequestBody requestBody;
+
+ private final ApiCallback callback;
+
+ public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) {
+ this.requestBody = requestBody;
+ this.callback = callback;
+ }
+
+ @Override
+ public MediaType contentType() {
+ return requestBody.contentType();
+ }
+
+ @Override
+ public long contentLength() throws IOException {
+ return requestBody.contentLength();
+ }
+
+ @Override
+ public void writeTo(BufferedSink sink) throws IOException {
+ BufferedSink bufferedSink = Okio.buffer(sink(sink));
+ requestBody.writeTo(bufferedSink);
+ bufferedSink.flush();
+ }
+
+ private Sink sink(Sink sink) {
+ return new ForwardingSink(sink) {
+
+ long bytesWritten = 0L;
+ long contentLength = 0L;
+
+ @Override
+ public void write(Buffer source, long byteCount) throws IOException {
+ super.write(source, byteCount);
+ if (contentLength == 0) {
+ contentLength = contentLength();
+ }
+
+ bytesWritten += byteCount;
+ callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength);
+ }
+ };
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ProgressResponseBody.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ProgressResponseBody.java
new file mode 100644
index 0000000..fa126cd
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ProgressResponseBody.java
@@ -0,0 +1,70 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker;
+
+import okhttp3.MediaType;
+import okhttp3.ResponseBody;
+
+import java.io.IOException;
+
+import okio.Buffer;
+import okio.BufferedSource;
+import okio.ForwardingSource;
+import okio.Okio;
+import okio.Source;
+
+public class ProgressResponseBody extends ResponseBody {
+
+ private final ResponseBody responseBody;
+ private final ApiCallback callback;
+ private BufferedSource bufferedSource;
+
+ public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) {
+ this.responseBody = responseBody;
+ this.callback = callback;
+ }
+
+ @Override
+ public MediaType contentType() {
+ return responseBody.contentType();
+ }
+
+ @Override
+ public long contentLength() {
+ return responseBody.contentLength();
+ }
+
+ @Override
+ public BufferedSource source() {
+ if (bufferedSource == null) {
+ bufferedSource = Okio.buffer(source(responseBody.source()));
+ }
+ return bufferedSource;
+ }
+
+ private Source source(Source source) {
+ return new ForwardingSource(source) {
+ long totalBytesRead = 0L;
+
+ @Override
+ public long read(Buffer sink, long byteCount) throws IOException {
+ long bytesRead = super.read(sink, byteCount);
+ // read() returns the number of bytes read, or -1 if this source is exhausted.
+ totalBytesRead += bytesRead != -1 ? bytesRead : 0;
+ callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
+ return bytesRead;
+ }
+ };
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ServerConfiguration.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ServerConfiguration.java
new file mode 100644
index 0000000..5ce1af1
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ServerConfiguration.java
@@ -0,0 +1,58 @@
+package io.openkruise.agents.client.e2b.api.invoker;
+
+import java.util.Map;
+
+/**
+ * Representing a Server configuration.
+ */
+public class ServerConfiguration {
+ public String URL;
+ public String description;
+ public Map variables;
+
+ /**
+ * @param URL A URL to the target host.
+ * @param description A description of the host designated by the URL.
+ * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
+ */
+ public ServerConfiguration(String URL, String description, Map variables) {
+ this.URL = URL;
+ this.description = description;
+ this.variables = variables;
+ }
+
+ /**
+ * Format URL template using given variables.
+ *
+ * @param variables A map between a variable name and its value.
+ * @return Formatted URL.
+ */
+ public String URL(Map variables) {
+ String url = this.URL;
+
+ // go through variables and replace placeholders
+ for (Map.Entry variable: this.variables.entrySet()) {
+ String name = variable.getKey();
+ ServerVariable serverVariable = variable.getValue();
+ String value = serverVariable.defaultValue;
+
+ if (variables != null && variables.containsKey(name)) {
+ value = variables.get(name);
+ if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
+ throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
+ }
+ }
+ url = url.replace("{" + name + "}", value);
+ }
+ return url;
+ }
+
+ /**
+ * Format URL template using default server variables.
+ *
+ * @return Formatted URL.
+ */
+ public String URL() {
+ return URL(null);
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ServerVariable.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ServerVariable.java
new file mode 100644
index 0000000..1c49f75
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/ServerVariable.java
@@ -0,0 +1,23 @@
+package io.openkruise.agents.client.e2b.api.invoker;
+
+import java.util.HashSet;
+
+/**
+ * Representing a Server Variable for server URL template substitution.
+ */
+public class ServerVariable {
+ public String description;
+ public String defaultValue;
+ public HashSet enumValues = null;
+
+ /**
+ * @param description A description for the server variable.
+ * @param defaultValue The default value to use for substitution.
+ * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set.
+ */
+ public ServerVariable(String description, String defaultValue, HashSet enumValues) {
+ this.description = description;
+ this.defaultValue = defaultValue;
+ this.enumValues = enumValues;
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/StringUtil.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/StringUtil.java
new file mode 100644
index 0000000..d989c0d
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/StringUtil.java
@@ -0,0 +1,83 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class StringUtil {
+ /**
+ * Check if the given array contains the given value (with case-insensitive comparison).
+ *
+ * @param array The array
+ * @param value The value to search
+ * @return true if the array contains the value
+ */
+ public static boolean containsIgnoreCase(String[] array, String value) {
+ for (String str : array) {
+ if (value == null && str == null) {
+ return true;
+ }
+ if (value != null && value.equalsIgnoreCase(str)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Join an array of strings with the given separator.
+ *
+ * Note: This might be replaced by utility method from commons-lang or guava someday
+ * if one of those libraries is added as dependency.
+ *
+ *
+ * @param array The array of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(String[] array, String separator) {
+ int len = array.length;
+ if (len == 0) {
+ return "";
+ }
+
+ StringBuilder out = new StringBuilder();
+ out.append(array[0]);
+ for (int i = 1; i < len; i++) {
+ out.append(separator).append(array[i]);
+ }
+ return out.toString();
+ }
+
+ /**
+ * Join a list of strings with the given separator.
+ *
+ * @param list The list of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(Collection list, String separator) {
+ Iterator iterator = list.iterator();
+ StringBuilder out = new StringBuilder();
+ if (iterator.hasNext()) {
+ out.append(iterator.next());
+ }
+ while (iterator.hasNext()) {
+ out.append(separator).append(iterator.next());
+ }
+ return out.toString();
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/ApiKeyAuth.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/ApiKeyAuth.java
new file mode 100644
index 0000000..ee65c94
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/ApiKeyAuth.java
@@ -0,0 +1,80 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker.auth;
+
+import io.openkruise.agents.client.e2b.api.invoker.ApiException;
+import io.openkruise.agents.client.e2b.api.invoker.Pair;
+
+import java.net.URI;
+import java.util.Map;
+import java.util.List;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class ApiKeyAuth implements Authentication {
+ private final String location;
+ private final String paramName;
+
+ private String apiKey;
+ private String apiKeyPrefix;
+
+ public ApiKeyAuth(String location, String paramName) {
+ this.location = location;
+ this.paramName = paramName;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getParamName() {
+ return paramName;
+ }
+
+ public String getApiKey() {
+ return apiKey;
+ }
+
+ public void setApiKey(String apiKey) {
+ this.apiKey = apiKey;
+ }
+
+ public String getApiKeyPrefix() {
+ return apiKeyPrefix;
+ }
+
+ public void setApiKeyPrefix(String apiKeyPrefix) {
+ this.apiKeyPrefix = apiKeyPrefix;
+ }
+
+ @Override
+ public void applyToParams(List queryParams, Map headerParams, Map cookieParams,
+ String payload, String method, URI uri) throws ApiException {
+ if (apiKey == null) {
+ return;
+ }
+ String value;
+ if (apiKeyPrefix != null) {
+ value = apiKeyPrefix + " " + apiKey;
+ } else {
+ value = apiKey;
+ }
+ if ("query".equals(location)) {
+ queryParams.add(new Pair(paramName, value));
+ } else if ("header".equals(location)) {
+ headerParams.put(paramName, value);
+ } else if ("cookie".equals(location)) {
+ cookieParams.put(paramName, value);
+ }
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/Authentication.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/Authentication.java
new file mode 100644
index 0000000..8abe0d6
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/Authentication.java
@@ -0,0 +1,36 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker.auth;
+
+import io.openkruise.agents.client.e2b.api.invoker.Pair;
+import io.openkruise.agents.client.e2b.api.invoker.ApiException;
+
+import java.net.URI;
+import java.util.Map;
+import java.util.List;
+
+public interface Authentication {
+ /**
+ * Apply authentication settings to header and query params.
+ *
+ * @param queryParams List of query parameters
+ * @param headerParams Map of header parameters
+ * @param cookieParams Map of cookie parameters
+ * @param payload HTTP request body
+ * @param method HTTP method
+ * @param uri URI
+ * @throws ApiException if failed to update the parameters
+ */
+ void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException;
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/HttpBasicAuth.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/HttpBasicAuth.java
new file mode 100644
index 0000000..d6b12ab
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/HttpBasicAuth.java
@@ -0,0 +1,57 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker.auth;
+
+import io.openkruise.agents.client.e2b.api.invoker.Pair;
+import io.openkruise.agents.client.e2b.api.invoker.ApiException;
+
+import okhttp3.Credentials;
+
+import java.net.URI;
+import java.util.Map;
+import java.util.List;
+
+import java.io.UnsupportedEncodingException;
+
+public class HttpBasicAuth implements Authentication {
+ private String username;
+ private String password;
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ @Override
+ public void applyToParams(List queryParams, Map headerParams, Map cookieParams,
+ String payload, String method, URI uri) throws ApiException {
+ if (username == null && password == null) {
+ return;
+ }
+ headerParams.put("Authorization", Credentials.basic(
+ username == null ? "" : username,
+ password == null ? "" : password));
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/HttpBearerAuth.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/HttpBearerAuth.java
new file mode 100644
index 0000000..ae64b7a
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/invoker/auth/HttpBearerAuth.java
@@ -0,0 +1,63 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.invoker.auth;
+
+import io.openkruise.agents.client.e2b.api.invoker.ApiException;
+import io.openkruise.agents.client.e2b.api.invoker.Pair;
+
+import java.net.URI;
+import java.util.Map;
+import java.util.List;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class HttpBearerAuth implements Authentication {
+ private final String scheme;
+ private String bearerToken;
+
+ public HttpBearerAuth(String scheme) {
+ this.scheme = scheme;
+ }
+
+ /**
+ * Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @return The bearer token
+ */
+ public String getBearerToken() {
+ return bearerToken;
+ }
+
+ /**
+ * Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @param bearerToken The bearer token to send in the Authorization header
+ */
+ public void setBearerToken(String bearerToken) {
+ this.bearerToken = bearerToken;
+ }
+
+ @Override
+ public void applyToParams(List queryParams, Map headerParams, Map cookieParams,
+ String payload, String method, URI uri) throws ApiException {
+ if (bearerToken == null) {
+ return;
+ }
+
+ headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
+ }
+
+ private static String upperCaseBearer(String scheme) {
+ return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
+ }
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AWSRegistry.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AWSRegistry.java
new file mode 100644
index 0000000..736ae23
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AWSRegistry.java
@@ -0,0 +1,432 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import io.openkruise.agents.client.e2b.api.invoker.JSON;
+
+/**
+ * AWSRegistry
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class AWSRegistry {
+ /**
+ * Type of registry authentication
+ */
+ @JsonAdapter(TypeEnum.Adapter.class)
+ public enum TypeEnum {
+ AWS("aws");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TypeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TypeEnum.fromValue(value);
+ }
+ }
+ }
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ private TypeEnum type;
+
+ public static final String SERIALIZED_NAME_AWS_ACCESS_KEY_ID = "awsAccessKeyId";
+ @SerializedName(SERIALIZED_NAME_AWS_ACCESS_KEY_ID)
+ private String awsAccessKeyId;
+
+ public static final String SERIALIZED_NAME_AWS_SECRET_ACCESS_KEY = "awsSecretAccessKey";
+ @SerializedName(SERIALIZED_NAME_AWS_SECRET_ACCESS_KEY)
+ private String awsSecretAccessKey;
+
+ public static final String SERIALIZED_NAME_AWS_REGION = "awsRegion";
+ @SerializedName(SERIALIZED_NAME_AWS_REGION)
+ private String awsRegion;
+
+ public AWSRegistry() {
+ }
+
+ public AWSRegistry type(TypeEnum type) {
+
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Type of registry authentication
+ * @return type
+ **/
+ @javax.annotation.Nonnull
+ public TypeEnum getType() {
+ return type;
+ }
+
+
+ public void setType(TypeEnum type) {
+ this.type = type;
+ }
+
+
+ public AWSRegistry awsAccessKeyId(String awsAccessKeyId) {
+
+ this.awsAccessKeyId = awsAccessKeyId;
+ return this;
+ }
+
+ /**
+ * AWS Access Key ID for ECR authentication
+ * @return awsAccessKeyId
+ **/
+ @javax.annotation.Nonnull
+ public String getAwsAccessKeyId() {
+ return awsAccessKeyId;
+ }
+
+
+ public void setAwsAccessKeyId(String awsAccessKeyId) {
+ this.awsAccessKeyId = awsAccessKeyId;
+ }
+
+
+ public AWSRegistry awsSecretAccessKey(String awsSecretAccessKey) {
+
+ this.awsSecretAccessKey = awsSecretAccessKey;
+ return this;
+ }
+
+ /**
+ * AWS Secret Access Key for ECR authentication
+ * @return awsSecretAccessKey
+ **/
+ @javax.annotation.Nonnull
+ public String getAwsSecretAccessKey() {
+ return awsSecretAccessKey;
+ }
+
+
+ public void setAwsSecretAccessKey(String awsSecretAccessKey) {
+ this.awsSecretAccessKey = awsSecretAccessKey;
+ }
+
+
+ public AWSRegistry awsRegion(String awsRegion) {
+
+ this.awsRegion = awsRegion;
+ return this;
+ }
+
+ /**
+ * AWS Region where the ECR registry is located
+ * @return awsRegion
+ **/
+ @javax.annotation.Nonnull
+ public String getAwsRegion() {
+ return awsRegion;
+ }
+
+
+ public void setAwsRegion(String awsRegion) {
+ this.awsRegion = awsRegion;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the AWSRegistry instance itself
+ */
+ public AWSRegistry putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSRegistry awSRegistry = (AWSRegistry) o;
+ return Objects.equals(this.type, awSRegistry.type) &&
+ Objects.equals(this.awsAccessKeyId, awSRegistry.awsAccessKeyId) &&
+ Objects.equals(this.awsSecretAccessKey, awSRegistry.awsSecretAccessKey) &&
+ Objects.equals(this.awsRegion, awSRegistry.awsRegion)&&
+ Objects.equals(this.additionalProperties, awSRegistry.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type, awsAccessKeyId, awsSecretAccessKey, awsRegion, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSRegistry {\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" awsAccessKeyId: ").append(toIndentedString(awsAccessKeyId)).append("\n");
+ sb.append(" awsSecretAccessKey: ").append(toIndentedString(awsSecretAccessKey)).append("\n");
+ sb.append(" awsRegion: ").append(toIndentedString(awsRegion)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("type");
+ openapiFields.add("awsAccessKeyId");
+ openapiFields.add("awsSecretAccessKey");
+ openapiFields.add("awsRegion");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("type");
+ openapiRequiredFields.add("awsAccessKeyId");
+ openapiRequiredFields.add("awsSecretAccessKey");
+ openapiRequiredFields.add("awsRegion");
+ }
+
+ /**
+ * Validates the JSON Object and throws an exception if issues found
+ *
+ * @param jsonObj JSON Object
+ * @throws IOException if the JSON Object is invalid with respect to AWSRegistry
+ */
+ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
+ if (jsonObj == null) {
+ if (!AWSRegistry.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in AWSRegistry is not found in the empty JSON string", AWSRegistry.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : AWSRegistry.openapiRequiredFields) {
+ if (jsonObj.get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ }
+ }
+ if (!jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ if (!jsonObj.get("awsAccessKeyId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `awsAccessKeyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("awsAccessKeyId").toString()));
+ }
+ if (!jsonObj.get("awsSecretAccessKey").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `awsSecretAccessKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("awsSecretAccessKey").toString()));
+ }
+ if (!jsonObj.get("awsRegion").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `awsRegion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("awsRegion").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AWSRegistry.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AWSRegistry' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(AWSRegistry.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AWSRegistry value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AWSRegistry read(JsonReader in) throws IOException {
+ JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
+ validateJsonObject(jsonObj);
+ // store additional fields in the deserialized instance
+ AWSRegistry instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AWSRegistry given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AWSRegistry
+ * @throws IOException if the JSON string is invalid with respect to AWSRegistry
+ */
+ public static AWSRegistry fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AWSRegistry.class);
+ }
+
+ /**
+ * Convert an instance of AWSRegistry to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AbstractOpenApiSchema.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AbstractOpenApiSchema.java
new file mode 100644
index 0000000..2a2b5fa
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AbstractOpenApiSchema.java
@@ -0,0 +1,149 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.models;
+
+import io.openkruise.agents.client.e2b.api.invoker.ApiException;
+import java.util.Objects;
+import java.lang.reflect.Type;
+import java.util.Map;
+import javax.ws.rs.core.GenericType;
+
+//import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public abstract class AbstractOpenApiSchema {
+
+ // store the actual instance of the schema/object
+ private Object instance;
+
+ // is nullable
+ private Boolean isNullable;
+
+ // schema type (e.g. oneOf, anyOf)
+ private final String schemaType;
+
+ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
+ this.schemaType = schemaType;
+ this.isNullable = isNullable;
+ }
+
+ /**
+ * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object
+ *
+ * @return an instance of the actual schema/object
+ */
+ public abstract Map getSchemas();
+
+ /**
+ * Get the actual instance
+ *
+ * @return an instance of the actual schema/object
+ */
+ //@JsonValue
+ public Object getActualInstance() {return instance;}
+
+ /**
+ * Set the actual instance
+ *
+ * @param instance the actual instance of the schema/object
+ */
+ public void setActualInstance(Object instance) {this.instance = instance;}
+
+ /**
+ * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well
+ *
+ * @return an instance of the actual schema/object
+ */
+ public Object getActualInstanceRecursively() {
+ return getActualInstanceRecursively(this);
+ }
+
+ private Object getActualInstanceRecursively(AbstractOpenApiSchema object) {
+ if (object.getActualInstance() == null) {
+ return null;
+ } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) {
+ return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance());
+ } else {
+ return object.getActualInstance();
+ }
+ }
+
+ /**
+ * Get the schema type (e.g. anyOf, oneOf)
+ *
+ * @return the schema type
+ */
+ public String getSchemaType() {
+ return schemaType;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ").append(getClass()).append(" {\n");
+ sb.append(" instance: ").append(toIndentedString(instance)).append("\n");
+ sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n");
+ sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AbstractOpenApiSchema a = (AbstractOpenApiSchema) o;
+ return Objects.equals(this.instance, a.instance) &&
+ Objects.equals(this.isNullable, a.isNullable) &&
+ Objects.equals(this.schemaType, a.schemaType);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(instance, isNullable, schemaType);
+ }
+
+ /**
+ * Is nullable
+ *
+ * @return true if it's nullable
+ */
+ public Boolean isNullable() {
+ if (Boolean.TRUE.equals(isNullable)) {
+ return Boolean.TRUE;
+ } else {
+ return Boolean.FALSE;
+ }
+ }
+
+
+
+}
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AdminSandboxKillResult.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AdminSandboxKillResult.java
new file mode 100644
index 0000000..6f81994
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AdminSandboxKillResult.java
@@ -0,0 +1,317 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import io.openkruise.agents.client.e2b.api.invoker.JSON;
+
+/**
+ * AdminSandboxKillResult
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class AdminSandboxKillResult {
+ public static final String SERIALIZED_NAME_KILLED_COUNT = "killedCount";
+ @SerializedName(SERIALIZED_NAME_KILLED_COUNT)
+ private Integer killedCount;
+
+ public static final String SERIALIZED_NAME_FAILED_COUNT = "failedCount";
+ @SerializedName(SERIALIZED_NAME_FAILED_COUNT)
+ private Integer failedCount;
+
+ public AdminSandboxKillResult() {
+ }
+
+ public AdminSandboxKillResult killedCount(Integer killedCount) {
+
+ this.killedCount = killedCount;
+ return this;
+ }
+
+ /**
+ * Number of sandboxes successfully killed
+ * @return killedCount
+ **/
+ @javax.annotation.Nonnull
+ public Integer getKilledCount() {
+ return killedCount;
+ }
+
+
+ public void setKilledCount(Integer killedCount) {
+ this.killedCount = killedCount;
+ }
+
+
+ public AdminSandboxKillResult failedCount(Integer failedCount) {
+
+ this.failedCount = failedCount;
+ return this;
+ }
+
+ /**
+ * Number of sandboxes that failed to kill
+ * @return failedCount
+ **/
+ @javax.annotation.Nonnull
+ public Integer getFailedCount() {
+ return failedCount;
+ }
+
+
+ public void setFailedCount(Integer failedCount) {
+ this.failedCount = failedCount;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the AdminSandboxKillResult instance itself
+ */
+ public AdminSandboxKillResult putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdminSandboxKillResult adminSandboxKillResult = (AdminSandboxKillResult) o;
+ return Objects.equals(this.killedCount, adminSandboxKillResult.killedCount) &&
+ Objects.equals(this.failedCount, adminSandboxKillResult.failedCount)&&
+ Objects.equals(this.additionalProperties, adminSandboxKillResult.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(killedCount, failedCount, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdminSandboxKillResult {\n");
+ sb.append(" killedCount: ").append(toIndentedString(killedCount)).append("\n");
+ sb.append(" failedCount: ").append(toIndentedString(failedCount)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("killedCount");
+ openapiFields.add("failedCount");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("killedCount");
+ openapiRequiredFields.add("failedCount");
+ }
+
+ /**
+ * Validates the JSON Object and throws an exception if issues found
+ *
+ * @param jsonObj JSON Object
+ * @throws IOException if the JSON Object is invalid with respect to AdminSandboxKillResult
+ */
+ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
+ if (jsonObj == null) {
+ if (!AdminSandboxKillResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in AdminSandboxKillResult is not found in the empty JSON string", AdminSandboxKillResult.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : AdminSandboxKillResult.openapiRequiredFields) {
+ if (jsonObj.get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ }
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AdminSandboxKillResult.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AdminSandboxKillResult' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(AdminSandboxKillResult.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AdminSandboxKillResult value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AdminSandboxKillResult read(JsonReader in) throws IOException {
+ JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
+ validateJsonObject(jsonObj);
+ // store additional fields in the deserialized instance
+ AdminSandboxKillResult instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AdminSandboxKillResult given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AdminSandboxKillResult
+ * @throws IOException if the JSON string is invalid with respect to AdminSandboxKillResult
+ */
+ public static AdminSandboxKillResult fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AdminSandboxKillResult.class);
+ }
+
+ /**
+ * Convert an instance of AdminSandboxKillResult to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AssignTemplateTagsRequest.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AssignTemplateTagsRequest.java
new file mode 100644
index 0000000..f22fea7
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AssignTemplateTagsRequest.java
@@ -0,0 +1,336 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import io.openkruise.agents.client.e2b.api.invoker.JSON;
+
+/**
+ * AssignTemplateTagsRequest
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class AssignTemplateTagsRequest {
+ public static final String SERIALIZED_NAME_TARGET = "target";
+ @SerializedName(SERIALIZED_NAME_TARGET)
+ private String target;
+
+ public static final String SERIALIZED_NAME_TAGS = "tags";
+ @SerializedName(SERIALIZED_NAME_TAGS)
+ private List tags = new ArrayList<>();
+
+ public AssignTemplateTagsRequest() {
+ }
+
+ public AssignTemplateTagsRequest target(String target) {
+
+ this.target = target;
+ return this;
+ }
+
+ /**
+ * Target template in \"name:tag\" format
+ * @return target
+ **/
+ @javax.annotation.Nonnull
+ public String getTarget() {
+ return target;
+ }
+
+
+ public void setTarget(String target) {
+ this.target = target;
+ }
+
+
+ public AssignTemplateTagsRequest tags(List tags) {
+
+ this.tags = tags;
+ return this;
+ }
+
+ public AssignTemplateTagsRequest addTagsItem(String tagsItem) {
+ if (this.tags == null) {
+ this.tags = new ArrayList<>();
+ }
+ this.tags.add(tagsItem);
+ return this;
+ }
+
+ /**
+ * Tags to assign to the template
+ * @return tags
+ **/
+ @javax.annotation.Nonnull
+ public List getTags() {
+ return tags;
+ }
+
+
+ public void setTags(List tags) {
+ this.tags = tags;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the AssignTemplateTagsRequest instance itself
+ */
+ public AssignTemplateTagsRequest putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AssignTemplateTagsRequest assignTemplateTagsRequest = (AssignTemplateTagsRequest) o;
+ return Objects.equals(this.target, assignTemplateTagsRequest.target) &&
+ Objects.equals(this.tags, assignTemplateTagsRequest.tags)&&
+ Objects.equals(this.additionalProperties, assignTemplateTagsRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(target, tags, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AssignTemplateTagsRequest {\n");
+ sb.append(" target: ").append(toIndentedString(target)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("target");
+ openapiFields.add("tags");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("target");
+ openapiRequiredFields.add("tags");
+ }
+
+ /**
+ * Validates the JSON Object and throws an exception if issues found
+ *
+ * @param jsonObj JSON Object
+ * @throws IOException if the JSON Object is invalid with respect to AssignTemplateTagsRequest
+ */
+ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
+ if (jsonObj == null) {
+ if (!AssignTemplateTagsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in AssignTemplateTagsRequest is not found in the empty JSON string", AssignTemplateTagsRequest.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : AssignTemplateTagsRequest.openapiRequiredFields) {
+ if (jsonObj.get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ }
+ }
+ if (!jsonObj.get("target").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `target` to be a primitive type in the JSON string but got `%s`", jsonObj.get("target").toString()));
+ }
+ // ensure the required json array is present
+ if (jsonObj.get("tags") == null) {
+ throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`");
+ } else if (!jsonObj.get("tags").isJsonArray()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AssignTemplateTagsRequest.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AssignTemplateTagsRequest' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(AssignTemplateTagsRequest.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AssignTemplateTagsRequest value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AssignTemplateTagsRequest read(JsonReader in) throws IOException {
+ JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
+ validateJsonObject(jsonObj);
+ // store additional fields in the deserialized instance
+ AssignTemplateTagsRequest instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AssignTemplateTagsRequest given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AssignTemplateTagsRequest
+ * @throws IOException if the JSON string is invalid with respect to AssignTemplateTagsRequest
+ */
+ public static AssignTemplateTagsRequest fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AssignTemplateTagsRequest.class);
+ }
+
+ /**
+ * Convert an instance of AssignTemplateTagsRequest to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AssignedTemplateTags.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AssignedTemplateTags.java
new file mode 100644
index 0000000..8be3a11
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/AssignedTemplateTags.java
@@ -0,0 +1,337 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import io.openkruise.agents.client.e2b.api.invoker.JSON;
+
+/**
+ * AssignedTemplateTags
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class AssignedTemplateTags {
+ public static final String SERIALIZED_NAME_TAGS = "tags";
+ @SerializedName(SERIALIZED_NAME_TAGS)
+ private List tags = new ArrayList<>();
+
+ public static final String SERIALIZED_NAME_BUILD_I_D = "buildID";
+ @SerializedName(SERIALIZED_NAME_BUILD_I_D)
+ private UUID buildID;
+
+ public AssignedTemplateTags() {
+ }
+
+ public AssignedTemplateTags tags(List tags) {
+
+ this.tags = tags;
+ return this;
+ }
+
+ public AssignedTemplateTags addTagsItem(String tagsItem) {
+ if (this.tags == null) {
+ this.tags = new ArrayList<>();
+ }
+ this.tags.add(tagsItem);
+ return this;
+ }
+
+ /**
+ * Assigned tags of the template
+ * @return tags
+ **/
+ @javax.annotation.Nonnull
+ public List getTags() {
+ return tags;
+ }
+
+
+ public void setTags(List tags) {
+ this.tags = tags;
+ }
+
+
+ public AssignedTemplateTags buildID(UUID buildID) {
+
+ this.buildID = buildID;
+ return this;
+ }
+
+ /**
+ * Identifier of the build associated with these tags
+ * @return buildID
+ **/
+ @javax.annotation.Nonnull
+ public UUID getBuildID() {
+ return buildID;
+ }
+
+
+ public void setBuildID(UUID buildID) {
+ this.buildID = buildID;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the AssignedTemplateTags instance itself
+ */
+ public AssignedTemplateTags putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AssignedTemplateTags assignedTemplateTags = (AssignedTemplateTags) o;
+ return Objects.equals(this.tags, assignedTemplateTags.tags) &&
+ Objects.equals(this.buildID, assignedTemplateTags.buildID)&&
+ Objects.equals(this.additionalProperties, assignedTemplateTags.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(tags, buildID, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AssignedTemplateTags {\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
+ sb.append(" buildID: ").append(toIndentedString(buildID)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("tags");
+ openapiFields.add("buildID");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("tags");
+ openapiRequiredFields.add("buildID");
+ }
+
+ /**
+ * Validates the JSON Object and throws an exception if issues found
+ *
+ * @param jsonObj JSON Object
+ * @throws IOException if the JSON Object is invalid with respect to AssignedTemplateTags
+ */
+ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
+ if (jsonObj == null) {
+ if (!AssignedTemplateTags.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in AssignedTemplateTags is not found in the empty JSON string", AssignedTemplateTags.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : AssignedTemplateTags.openapiRequiredFields) {
+ if (jsonObj.get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ }
+ }
+ // ensure the required json array is present
+ if (jsonObj.get("tags") == null) {
+ throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`");
+ } else if (!jsonObj.get("tags").isJsonArray()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString()));
+ }
+ if (!jsonObj.get("buildID").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `buildID` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buildID").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AssignedTemplateTags.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AssignedTemplateTags' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(AssignedTemplateTags.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AssignedTemplateTags value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public AssignedTemplateTags read(JsonReader in) throws IOException {
+ JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
+ validateJsonObject(jsonObj);
+ // store additional fields in the deserialized instance
+ AssignedTemplateTags instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of AssignedTemplateTags given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AssignedTemplateTags
+ * @throws IOException if the JSON string is invalid with respect to AssignedTemplateTags
+ */
+ public static AssignedTemplateTags fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AssignedTemplateTags.class);
+ }
+
+ /**
+ * Convert an instance of AssignedTemplateTags to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/BuildLogEntry.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/BuildLogEntry.java
new file mode 100644
index 0000000..3b3336f
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/BuildLogEntry.java
@@ -0,0 +1,382 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.openkruise.agents.client.e2b.api.models.LogLevel;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import io.openkruise.agents.client.e2b.api.invoker.JSON;
+
+/**
+ * BuildLogEntry
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class BuildLogEntry {
+ public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp";
+ @SerializedName(SERIALIZED_NAME_TIMESTAMP)
+ private OffsetDateTime timestamp;
+
+ public static final String SERIALIZED_NAME_MESSAGE = "message";
+ @SerializedName(SERIALIZED_NAME_MESSAGE)
+ private String message;
+
+ public static final String SERIALIZED_NAME_LEVEL = "level";
+ @SerializedName(SERIALIZED_NAME_LEVEL)
+ private LogLevel level;
+
+ public static final String SERIALIZED_NAME_STEP = "step";
+ @SerializedName(SERIALIZED_NAME_STEP)
+ private String step;
+
+ public BuildLogEntry() {
+ }
+
+ public BuildLogEntry timestamp(OffsetDateTime timestamp) {
+
+ this.timestamp = timestamp;
+ return this;
+ }
+
+ /**
+ * Timestamp of the log entry
+ * @return timestamp
+ **/
+ @javax.annotation.Nonnull
+ public OffsetDateTime getTimestamp() {
+ return timestamp;
+ }
+
+
+ public void setTimestamp(OffsetDateTime timestamp) {
+ this.timestamp = timestamp;
+ }
+
+
+ public BuildLogEntry message(String message) {
+
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Log message content
+ * @return message
+ **/
+ @javax.annotation.Nonnull
+ public String getMessage() {
+ return message;
+ }
+
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+
+ public BuildLogEntry level(LogLevel level) {
+
+ this.level = level;
+ return this;
+ }
+
+ /**
+ * Get level
+ * @return level
+ **/
+ @javax.annotation.Nonnull
+ public LogLevel getLevel() {
+ return level;
+ }
+
+
+ public void setLevel(LogLevel level) {
+ this.level = level;
+ }
+
+
+ public BuildLogEntry step(String step) {
+
+ this.step = step;
+ return this;
+ }
+
+ /**
+ * Step in the build process related to the log entry
+ * @return step
+ **/
+ @javax.annotation.Nullable
+ public String getStep() {
+ return step;
+ }
+
+
+ public void setStep(String step) {
+ this.step = step;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the BuildLogEntry instance itself
+ */
+ public BuildLogEntry putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BuildLogEntry buildLogEntry = (BuildLogEntry) o;
+ return Objects.equals(this.timestamp, buildLogEntry.timestamp) &&
+ Objects.equals(this.message, buildLogEntry.message) &&
+ Objects.equals(this.level, buildLogEntry.level) &&
+ Objects.equals(this.step, buildLogEntry.step)&&
+ Objects.equals(this.additionalProperties, buildLogEntry.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(timestamp, message, level, step, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BuildLogEntry {\n");
+ sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" level: ").append(toIndentedString(level)).append("\n");
+ sb.append(" step: ").append(toIndentedString(step)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("timestamp");
+ openapiFields.add("message");
+ openapiFields.add("level");
+ openapiFields.add("step");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("timestamp");
+ openapiRequiredFields.add("message");
+ openapiRequiredFields.add("level");
+ }
+
+ /**
+ * Validates the JSON Object and throws an exception if issues found
+ *
+ * @param jsonObj JSON Object
+ * @throws IOException if the JSON Object is invalid with respect to BuildLogEntry
+ */
+ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
+ if (jsonObj == null) {
+ if (!BuildLogEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in BuildLogEntry is not found in the empty JSON string", BuildLogEntry.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : BuildLogEntry.openapiRequiredFields) {
+ if (jsonObj.get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ }
+ }
+ if (!jsonObj.get("message").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString()));
+ }
+ if ((jsonObj.get("step") != null && !jsonObj.get("step").isJsonNull()) && !jsonObj.get("step").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `step` to be a primitive type in the JSON string but got `%s`", jsonObj.get("step").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!BuildLogEntry.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'BuildLogEntry' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(BuildLogEntry.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, BuildLogEntry value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public BuildLogEntry read(JsonReader in) throws IOException {
+ JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
+ validateJsonObject(jsonObj);
+ // store additional fields in the deserialized instance
+ BuildLogEntry instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of BuildLogEntry given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of BuildLogEntry
+ * @throws IOException if the JSON string is invalid with respect to BuildLogEntry
+ */
+ public static BuildLogEntry fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, BuildLogEntry.class);
+ }
+
+ /**
+ * Convert an instance of BuildLogEntry to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/BuildStatusReason.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/BuildStatusReason.java
new file mode 100644
index 0000000..a0cf89a
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/BuildStatusReason.java
@@ -0,0 +1,375 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.openkruise.agents.client.e2b.api.models.BuildLogEntry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import io.openkruise.agents.client.e2b.api.invoker.JSON;
+
+/**
+ * BuildStatusReason
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class BuildStatusReason {
+ public static final String SERIALIZED_NAME_MESSAGE = "message";
+ @SerializedName(SERIALIZED_NAME_MESSAGE)
+ private String message;
+
+ public static final String SERIALIZED_NAME_STEP = "step";
+ @SerializedName(SERIALIZED_NAME_STEP)
+ private String step;
+
+ public static final String SERIALIZED_NAME_LOG_ENTRIES = "logEntries";
+ @SerializedName(SERIALIZED_NAME_LOG_ENTRIES)
+ private List logEntries = null;
+
+ public BuildStatusReason() {
+ }
+
+ public BuildStatusReason message(String message) {
+
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Message with the status reason, currently reporting only for error status
+ * @return message
+ **/
+ @javax.annotation.Nonnull
+ public String getMessage() {
+ return message;
+ }
+
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+
+ public BuildStatusReason step(String step) {
+
+ this.step = step;
+ return this;
+ }
+
+ /**
+ * Step that failed
+ * @return step
+ **/
+ @javax.annotation.Nullable
+ public String getStep() {
+ return step;
+ }
+
+
+ public void setStep(String step) {
+ this.step = step;
+ }
+
+
+ public BuildStatusReason logEntries(List logEntries) {
+
+ this.logEntries = logEntries;
+ return this;
+ }
+
+ public BuildStatusReason addLogEntriesItem(BuildLogEntry logEntriesItem) {
+ if (this.logEntries == null) {
+ this.logEntries = null;
+ }
+ this.logEntries.add(logEntriesItem);
+ return this;
+ }
+
+ /**
+ * Log entries related to the status reason
+ * @return logEntries
+ **/
+ @javax.annotation.Nullable
+ public List getLogEntries() {
+ return logEntries;
+ }
+
+
+ public void setLogEntries(List logEntries) {
+ this.logEntries = logEntries;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the BuildStatusReason instance itself
+ */
+ public BuildStatusReason putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BuildStatusReason buildStatusReason = (BuildStatusReason) o;
+ return Objects.equals(this.message, buildStatusReason.message) &&
+ Objects.equals(this.step, buildStatusReason.step) &&
+ Objects.equals(this.logEntries, buildStatusReason.logEntries)&&
+ Objects.equals(this.additionalProperties, buildStatusReason.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(message, step, logEntries, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BuildStatusReason {\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" step: ").append(toIndentedString(step)).append("\n");
+ sb.append(" logEntries: ").append(toIndentedString(logEntries)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("message");
+ openapiFields.add("step");
+ openapiFields.add("logEntries");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("message");
+ }
+
+ /**
+ * Validates the JSON Object and throws an exception if issues found
+ *
+ * @param jsonObj JSON Object
+ * @throws IOException if the JSON Object is invalid with respect to BuildStatusReason
+ */
+ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
+ if (jsonObj == null) {
+ if (!BuildStatusReason.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in BuildStatusReason is not found in the empty JSON string", BuildStatusReason.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : BuildStatusReason.openapiRequiredFields) {
+ if (jsonObj.get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ }
+ }
+ if (!jsonObj.get("message").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString()));
+ }
+ if ((jsonObj.get("step") != null && !jsonObj.get("step").isJsonNull()) && !jsonObj.get("step").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `step` to be a primitive type in the JSON string but got `%s`", jsonObj.get("step").toString()));
+ }
+ if (jsonObj.get("logEntries") != null && !jsonObj.get("logEntries").isJsonNull()) {
+ JsonArray jsonArraylogEntries = jsonObj.getAsJsonArray("logEntries");
+ if (jsonArraylogEntries != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("logEntries").isJsonArray()) {
+ throw new IllegalArgumentException(String.format("Expected the field `logEntries` to be an array in the JSON string but got `%s`", jsonObj.get("logEntries").toString()));
+ }
+
+ // validate the optional field `logEntries` (array)
+ for (int i = 0; i < jsonArraylogEntries.size(); i++) {
+ BuildLogEntry.validateJsonObject(jsonArraylogEntries.get(i).getAsJsonObject());
+ };
+ }
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!BuildStatusReason.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'BuildStatusReason' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(BuildStatusReason.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, BuildStatusReason value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public BuildStatusReason read(JsonReader in) throws IOException {
+ JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
+ validateJsonObject(jsonObj);
+ // store additional fields in the deserialized instance
+ BuildStatusReason instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of BuildStatusReason given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of BuildStatusReason
+ * @throws IOException if the JSON string is invalid with respect to BuildStatusReason
+ */
+ public static BuildStatusReason fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, BuildStatusReason.class);
+ }
+
+ /**
+ * Convert an instance of BuildStatusReason to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/ConnectSandbox.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/ConnectSandbox.java
new file mode 100644
index 0000000..2abc6fa
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/ConnectSandbox.java
@@ -0,0 +1,289 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import io.openkruise.agents.client.e2b.api.invoker.JSON;
+
+/**
+ * ConnectSandbox
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class ConnectSandbox {
+ public static final String SERIALIZED_NAME_TIMEOUT = "timeout";
+ @SerializedName(SERIALIZED_NAME_TIMEOUT)
+ private Integer timeout;
+
+ public ConnectSandbox() {
+ }
+
+ public ConnectSandbox timeout(Integer timeout) {
+
+ this.timeout = timeout;
+ return this;
+ }
+
+ /**
+ * Timeout in seconds from the current time after which the sandbox should expire
+ * minimum: 0
+ * @return timeout
+ **/
+ @javax.annotation.Nonnull
+ public Integer getTimeout() {
+ return timeout;
+ }
+
+
+ public void setTimeout(Integer timeout) {
+ this.timeout = timeout;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the ConnectSandbox instance itself
+ */
+ public ConnectSandbox putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ConnectSandbox connectSandbox = (ConnectSandbox) o;
+ return Objects.equals(this.timeout, connectSandbox.timeout)&&
+ Objects.equals(this.additionalProperties, connectSandbox.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(timeout, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ConnectSandbox {\n");
+ sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("timeout");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("timeout");
+ }
+
+ /**
+ * Validates the JSON Object and throws an exception if issues found
+ *
+ * @param jsonObj JSON Object
+ * @throws IOException if the JSON Object is invalid with respect to ConnectSandbox
+ */
+ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
+ if (jsonObj == null) {
+ if (!ConnectSandbox.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in ConnectSandbox is not found in the empty JSON string", ConnectSandbox.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : ConnectSandbox.openapiRequiredFields) {
+ if (jsonObj.get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ }
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!ConnectSandbox.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'ConnectSandbox' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(ConnectSandbox.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, ConnectSandbox value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
+ }
+ }
+ }
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public ConnectSandbox read(JsonReader in) throws IOException {
+ JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
+ validateJsonObject(jsonObj);
+ // store additional fields in the deserialized instance
+ ConnectSandbox instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of ConnectSandbox given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of ConnectSandbox
+ * @throws IOException if the JSON string is invalid with respect to ConnectSandbox
+ */
+ public static ConnectSandbox fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, ConnectSandbox.class);
+ }
+
+ /**
+ * Convert an instance of ConnectSandbox to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/CreatedAccessToken.java b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/CreatedAccessToken.java
new file mode 100644
index 0000000..583803f
--- /dev/null
+++ b/clients/java/src/main/java/io/openkruise/agents/client/e2b/api/models/CreatedAccessToken.java
@@ -0,0 +1,418 @@
+/*
+ * E2B API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package io.openkruise.agents.client.e2b.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.openkruise.agents.client.e2b.api.models.IdentifierMaskingDetails;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.util.UUID;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import io.openkruise.agents.client.e2b.api.invoker.JSON;
+
+/**
+ * CreatedAccessToken
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-13T16:02:01.263+08:00[Asia/Shanghai]")
+public class CreatedAccessToken {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private UUID id;
+
+ public static final String SERIALIZED_NAME_NAME = "name";
+ @SerializedName(SERIALIZED_NAME_NAME)
+ private String name;
+
+ public static final String SERIALIZED_NAME_TOKEN = "token";
+ @SerializedName(SERIALIZED_NAME_TOKEN)
+ private String token;
+
+ public static final String SERIALIZED_NAME_MASK = "mask";
+ @SerializedName(SERIALIZED_NAME_MASK)
+ private IdentifierMaskingDetails mask;
+
+ public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
+ @SerializedName(SERIALIZED_NAME_CREATED_AT)
+ private OffsetDateTime createdAt;
+
+ public CreatedAccessToken() {
+ }
+
+ public CreatedAccessToken id(UUID id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Identifier of the access token
+ * @return id
+ **/
+ @javax.annotation.Nonnull
+ public UUID getId() {
+ return id;
+ }
+
+
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+
+ public CreatedAccessToken name(String name) {
+
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Name of the access token
+ * @return name
+ **/
+ @javax.annotation.Nonnull
+ public String getName() {
+ return name;
+ }
+
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ public CreatedAccessToken token(String token) {
+
+ this.token = token;
+ return this;
+ }
+
+ /**
+ * The fully created access token
+ * @return token
+ **/
+ @javax.annotation.Nonnull
+ public String getToken() {
+ return token;
+ }
+
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+
+ public CreatedAccessToken mask(IdentifierMaskingDetails mask) {
+
+ this.mask = mask;
+ return this;
+ }
+
+ /**
+ * Get mask
+ * @return mask
+ **/
+ @javax.annotation.Nonnull
+ public IdentifierMaskingDetails getMask() {
+ return mask;
+ }
+
+
+ public void setMask(IdentifierMaskingDetails mask) {
+ this.mask = mask;
+ }
+
+
+ public CreatedAccessToken createdAt(OffsetDateTime createdAt) {
+
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * Timestamp of access token creation
+ * @return createdAt
+ **/
+ @javax.annotation.Nonnull
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the CreatedAccessToken instance itself
+ */
+ public CreatedAccessToken putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreatedAccessToken createdAccessToken = (CreatedAccessToken) o;
+ return Objects.equals(this.id, createdAccessToken.id) &&
+ Objects.equals(this.name, createdAccessToken.name) &&
+ Objects.equals(this.token, createdAccessToken.token) &&
+ Objects.equals(this.mask, createdAccessToken.mask) &&
+ Objects.equals(this.createdAt, createdAccessToken.createdAt)&&
+ Objects.equals(this.additionalProperties, createdAccessToken.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, token, mask, createdAt, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreatedAccessToken {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" token: ").append(toIndentedString(token)).append("\n");
+ sb.append(" mask: ").append(toIndentedString(mask)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("id");
+ openapiFields.add("name");
+ openapiFields.add("token");
+ openapiFields.add("mask");
+ openapiFields.add("createdAt");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("id");
+ openapiRequiredFields.add("name");
+ openapiRequiredFields.add("token");
+ openapiRequiredFields.add("mask");
+ openapiRequiredFields.add("createdAt");
+ }
+
+ /**
+ * Validates the JSON Object and throws an exception if issues found
+ *
+ * @param jsonObj JSON Object
+ * @throws IOException if the JSON Object is invalid with respect to CreatedAccessToken
+ */
+ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
+ if (jsonObj == null) {
+ if (!CreatedAccessToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in CreatedAccessToken is not found in the empty JSON string", CreatedAccessToken.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : CreatedAccessToken.openapiRequiredFields) {
+ if (jsonObj.get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ }
+ }
+ if (!jsonObj.get("id").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
+ }
+ if (!jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if (!jsonObj.get("token").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString()));
+ }
+ // validate the required field `mask`
+ IdentifierMaskingDetails.validateJsonObject(jsonObj.getAsJsonObject("mask"));
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!CreatedAccessToken.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CreatedAccessToken' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(CreatedAccessToken.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, CreatedAccessToken value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Entry