ApiException class.
+ */
+@SuppressWarnings("serial")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
+public class ApiException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ private int code = 0;
+ private Map> responseHeaders = null;
+ private String responseBody = null;
+
+ /**
+ * Constructor for ApiException.
+ */
+ public ApiException() {}
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param throwable a {@link java.lang.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 java.lang.Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.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 java.util.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 java.lang.Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.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 java.util.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 java.lang.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 java.util.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/src/main/java/LiltConnectorSDK/ApiResponse.java b/src/main/java/LiltConnectorSDK/ApiResponse.java
new file mode 100644
index 0000000..541547c
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/ApiResponse.java
@@ -0,0 +1,76 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK;
+
+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 java.util.Map} of headers
+ */
+ public Map> getHeaders() {
+ return headers;
+ }
+
+ /**
+ * Get the data
.
+ *
+ * @return the data
+ */
+ public T getData() {
+ return data;
+ }
+}
diff --git a/src/main/java/LiltConnectorSDK/Configuration.java b/src/main/java/LiltConnectorSDK/Configuration.java
new file mode 100644
index 0000000..02e2593
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/Configuration.java
@@ -0,0 +1,41 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
+public class Configuration {
+ public static final String VERSION = "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/src/main/java/LiltConnectorSDK/GzipRequestInterceptor.java b/src/main/java/LiltConnectorSDK/GzipRequestInterceptor.java
new file mode 100644
index 0000000..7bf6e02
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/GzipRequestInterceptor.java
@@ -0,0 +1,85 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK;
+
+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/src/main/java/LiltConnectorSDK/JSON.java b/src/main/java/LiltConnectorSDK/JSON.java
new file mode 100644
index 0000000..33f8878
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/JSON.java
@@ -0,0 +1,420 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK;
+
+import com.fasterxml.jackson.databind.util.StdDateFormat;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapter;
+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.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.TimeZone;
+
+/*
+ * 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();
+
+ private static final StdDateFormat sdf = new StdDateFormat()
+ .withTimeZone(TimeZone.getTimeZone(ZoneId.systemDefault()))
+ .withColonInTimeZone(true);
+ private static final DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
+
+ @SuppressWarnings("unchecked")
+ public static GsonBuilder createGson() {
+ GsonFireBuilder fireBuilder = new GsonFireBuilder()
+ ;
+ 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;
+ }
+
+ static {
+ 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 org.openapitools.client.model.ErrorResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.JobResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.JobsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NewJobOptions.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NewOrganizationOptions.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OrganizationResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PreviewTranslationResponseInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ServicesApiCreditTransactionCreateCreditTransactionRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SettingsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TranslationResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TranslationsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateDeliveryOptions.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateJobOptions.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(sdf.parse(date).getTime());
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for java.util.Date type
+ * If the dateFormat is null, DateTimeFormatter 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 = date.toInstant().atOffset(ZoneOffset.UTC).format(dtf);
+ }
+ 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 sdf.parse(date);
+ } 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/src/main/java/LiltConnectorSDK/Pair.java b/src/main/java/LiltConnectorSDK/Pair.java
new file mode 100644
index 0000000..d318495
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/Pair.java
@@ -0,0 +1,57 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
+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/src/main/java/LiltConnectorSDK/ProgressRequestBody.java b/src/main/java/LiltConnectorSDK/ProgressRequestBody.java
new file mode 100644
index 0000000..317f463
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/ProgressRequestBody.java
@@ -0,0 +1,73 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK;
+
+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/src/main/java/LiltConnectorSDK/ProgressResponseBody.java b/src/main/java/LiltConnectorSDK/ProgressResponseBody.java
new file mode 100644
index 0000000..f0104a9
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/ProgressResponseBody.java
@@ -0,0 +1,70 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK;
+
+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/src/main/java/LiltConnectorSDK/ServerConfiguration.java b/src/main/java/LiltConnectorSDK/ServerConfiguration.java
new file mode 100644
index 0000000..da7295e
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/ServerConfiguration.java
@@ -0,0 +1,59 @@
+package LiltConnectorSDK;
+
+import java.util.Map;
+
+/**
+ * Representing a Server configuration.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
+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/src/main/java/LiltConnectorSDK/ServerVariable.java b/src/main/java/LiltConnectorSDK/ServerVariable.java
new file mode 100644
index 0000000..5799f59
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/ServerVariable.java
@@ -0,0 +1,24 @@
+package LiltConnectorSDK;
+
+import java.util.HashSet;
+
+/**
+ * Representing a Server Variable for server URL template substitution.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
+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/src/main/java/LiltConnectorSDK/StringUtil.java b/src/main/java/LiltConnectorSDK/StringUtil.java
new file mode 100644
index 0000000..58ed631
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/StringUtil.java
@@ -0,0 +1,83 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
+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/src/main/java/LiltConnectorSDK/auth/ApiKeyAuth.java b/src/main/java/LiltConnectorSDK/auth/ApiKeyAuth.java
new file mode 100644
index 0000000..cd3488a
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/auth/ApiKeyAuth.java
@@ -0,0 +1,80 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK.auth;
+
+import LiltConnectorSDK.ApiException;
+import LiltConnectorSDK.Pair;
+
+import java.net.URI;
+import java.util.Map;
+import java.util.List;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
+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/src/main/java/LiltConnectorSDK/auth/Authentication.java b/src/main/java/LiltConnectorSDK/auth/Authentication.java
new file mode 100644
index 0000000..a23d99d
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/auth/Authentication.java
@@ -0,0 +1,36 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK.auth;
+
+import LiltConnectorSDK.Pair;
+import LiltConnectorSDK.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/src/main/java/LiltConnectorSDK/auth/HttpBasicAuth.java b/src/main/java/LiltConnectorSDK/auth/HttpBasicAuth.java
new file mode 100644
index 0000000..4c6eb89
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/auth/HttpBasicAuth.java
@@ -0,0 +1,57 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK.auth;
+
+import LiltConnectorSDK.Pair;
+import LiltConnectorSDK.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/src/main/java/LiltConnectorSDK/auth/HttpBearerAuth.java b/src/main/java/LiltConnectorSDK/auth/HttpBearerAuth.java
new file mode 100644
index 0000000..7f0c7a7
--- /dev/null
+++ b/src/main/java/LiltConnectorSDK/auth/HttpBearerAuth.java
@@ -0,0 +1,75 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 LiltConnectorSDK.auth;
+
+import LiltConnectorSDK.ApiException;
+import LiltConnectorSDK.Pair;
+
+import java.net.URI;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Supplier;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
+public class HttpBearerAuth implements Authentication {
+ private final String scheme;
+ private Supplier tokenSupplier;
+
+ 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 tokenSupplier.get();
+ }
+
+ /**
+ * 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.tokenSupplier = () -> bearerToken;
+ }
+
+ /**
+ * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header
+ */
+ public void setBearerToken(Supplier tokenSupplier) {
+ this.tokenSupplier = tokenSupplier;
+ }
+
+ @Override
+ public void applyToParams(List queryParams, Map headerParams, Map cookieParams,
+ String payload, String method, URI uri) throws ApiException {
+ String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null);
+ 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/src/main/java/org/openapitools/client/api/CreditTransactionsApi.java b/src/main/java/org/openapitools/client/api/CreditTransactionsApi.java
new file mode 100644
index 0000000..c264d5b
--- /dev/null
+++ b/src/main/java/org/openapitools/client/api/CreditTransactionsApi.java
@@ -0,0 +1,206 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 org.openapitools.client.api;
+
+import LiltConnectorSDK.ApiCallback;
+import LiltConnectorSDK.ApiClient;
+import LiltConnectorSDK.ApiException;
+import LiltConnectorSDK.ApiResponse;
+import LiltConnectorSDK.Configuration;
+import LiltConnectorSDK.Pair;
+import LiltConnectorSDK.ProgressRequestBody;
+import LiltConnectorSDK.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import org.openapitools.client.model.ErrorResponse;
+import org.openapitools.client.model.ServicesApiCreditTransactionCreateCreditTransactionRequest;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CreditTransactionsApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public CreditTransactionsApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public CreditTransactionsApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for servicesApiCreditTransactionCreateCreditTransaction
+ * @param servicesApiCreditTransactionCreateCreditTransactionRequest (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiCreditTransactionCreateCreditTransactionCall(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = servicesApiCreditTransactionCreateCreditTransactionRequest;
+
+ // create path and map variables
+ String localVarPath = "/credit-transaction";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiCreditTransactionCreateCreditTransactionValidateBeforeCall(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest, final ApiCallback _callback) throws ApiException {
+ return servicesApiCreditTransactionCreateCreditTransactionCall(servicesApiCreditTransactionCreateCreditTransactionRequest, _callback);
+
+ }
+
+ /**
+ * Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration.
+ *
+ * @param servicesApiCreditTransactionCreateCreditTransactionRequest (optional)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public void servicesApiCreditTransactionCreateCreditTransaction(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest) throws ApiException {
+ servicesApiCreditTransactionCreateCreditTransactionWithHttpInfo(servicesApiCreditTransactionCreateCreditTransactionRequest);
+ }
+
+ /**
+ * Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration.
+ *
+ * @param servicesApiCreditTransactionCreateCreditTransactionRequest (optional)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public ApiResponse servicesApiCreditTransactionCreateCreditTransactionWithHttpInfo(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest) throws ApiException {
+ okhttp3.Call localVarCall = servicesApiCreditTransactionCreateCreditTransactionValidateBeforeCall(servicesApiCreditTransactionCreateCreditTransactionRequest, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration. (asynchronously)
+ *
+ * @param servicesApiCreditTransactionCreateCreditTransactionRequest (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiCreditTransactionCreateCreditTransactionAsync(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = servicesApiCreditTransactionCreateCreditTransactionValidateBeforeCall(servicesApiCreditTransactionCreateCreditTransactionRequest, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+}
diff --git a/src/main/java/org/openapitools/client/api/JobsApi.java b/src/main/java/org/openapitools/client/api/JobsApi.java
new file mode 100644
index 0000000..1e15249
--- /dev/null
+++ b/src/main/java/org/openapitools/client/api/JobsApi.java
@@ -0,0 +1,1435 @@
+/*
+ * Lilt Connector Plugin API
+ * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui).
+ *
+ * The version of the OpenAPI document: 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 org.openapitools.client.api;
+
+import LiltConnectorSDK.ApiCallback;
+import LiltConnectorSDK.ApiClient;
+import LiltConnectorSDK.ApiException;
+import LiltConnectorSDK.ApiResponse;
+import LiltConnectorSDK.Configuration;
+import LiltConnectorSDK.Pair;
+import LiltConnectorSDK.ProgressRequestBody;
+import LiltConnectorSDK.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import org.openapitools.client.model.ErrorResponse;
+import java.io.File;
+import org.openapitools.client.model.JobResponse;
+import org.openapitools.client.model.JobsResponse;
+import org.openapitools.client.model.NewJobOptions;
+import java.time.OffsetDateTime;
+import org.openapitools.client.model.UpdateJobOptions;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class JobsApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public JobsApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public JobsApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for servicesApiJobsAddFile
+ * @param id The Job ID. (required)
+ * @param name The file name. (required)
+ * @param trglang The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. (required)
+ * @param srclang The source language. (optional, default to en-US)
+ * @param due The due date for the file as an ISO-8601 string. (optional)
+ * @param body (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsAddFileCall(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = body;
+
+ // create path and map variables
+ String localVarPath = "/jobs/{id}/files"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (name != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name));
+ }
+
+ if (srclang != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("srclang", srclang));
+ }
+
+ if (trglang != null) {
+ localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "trglang", trglang));
+ }
+
+ if (due != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("due", due));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/octet-stream"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "BearerAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiJobsAddFileValidateBeforeCall(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsAddFile(Async)");
+ }
+
+ // verify the required parameter 'name' is set
+ if (name == null) {
+ throw new ApiException("Missing the required parameter 'name' when calling servicesApiJobsAddFile(Async)");
+ }
+
+ // verify the required parameter 'trglang' is set
+ if (trglang == null) {
+ throw new ApiException("Missing the required parameter 'trglang' when calling servicesApiJobsAddFile(Async)");
+ }
+
+ return servicesApiJobsAddFileCall(id, name, trglang, srclang, due, body, _callback);
+
+ }
+
+ /**
+ * Add a file to a Job.
+ * Add files to a job to submit them for translation.
+ * @param id The Job ID. (required)
+ * @param name The file name. (required)
+ * @param trglang The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. (required)
+ * @param srclang The source language. (optional, default to en-US)
+ * @param due The due date for the file as an ISO-8601 string. (optional)
+ * @param body (optional)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public void servicesApiJobsAddFile(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body) throws ApiException {
+ servicesApiJobsAddFileWithHttpInfo(id, name, trglang, srclang, due, body);
+ }
+
+ /**
+ * Add a file to a Job.
+ * Add files to a job to submit them for translation.
+ * @param id The Job ID. (required)
+ * @param name The file name. (required)
+ * @param trglang The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. (required)
+ * @param srclang The source language. (optional, default to en-US)
+ * @param due The due date for the file as an ISO-8601 string. (optional)
+ * @param body (optional)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public ApiResponse servicesApiJobsAddFileWithHttpInfo(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body) throws ApiException {
+ okhttp3.Call localVarCall = servicesApiJobsAddFileValidateBeforeCall(id, name, trglang, srclang, due, body, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Add a file to a Job. (asynchronously)
+ * Add files to a job to submit them for translation.
+ * @param id The Job ID. (required)
+ * @param name The file name. (required)
+ * @param trglang The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. (required)
+ * @param srclang The source language. (optional, default to en-US)
+ * @param due The due date for the file as an ISO-8601 string. (optional)
+ * @param body (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsAddFileAsync(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = servicesApiJobsAddFileValidateBeforeCall(id, name, trglang, srclang, due, body, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for servicesApiJobsCreateJob
+ * @param newJobOptions (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 201 | The job response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsCreateJobCall(NewJobOptions newJobOptions, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = newJobOptions;
+
+ // create path and map variables
+ String localVarPath = "/jobs";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "BearerAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiJobsCreateJobValidateBeforeCall(NewJobOptions newJobOptions, final ApiCallback _callback) throws ApiException {
+ return servicesApiJobsCreateJobCall(newJobOptions, _callback);
+
+ }
+
+ /**
+ * Create a Connector Job.
+ * The general workflow for a job is as follows. 1. Create a job. 1. Add files to a job. 1. Start the job. 1. Poll for translation completion. 1. Download the translated files.
+ * @param newJobOptions (optional)
+ * @return JobResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 201 | The job response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public JobResponse servicesApiJobsCreateJob(NewJobOptions newJobOptions) throws ApiException {
+ ApiResponse localVarResp = servicesApiJobsCreateJobWithHttpInfo(newJobOptions);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Create a Connector Job.
+ * The general workflow for a job is as follows. 1. Create a job. 1. Add files to a job. 1. Start the job. 1. Poll for translation completion. 1. Download the translated files.
+ * @param newJobOptions (optional)
+ * @return ApiResponse<JobResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 201 | The job response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public ApiResponse servicesApiJobsCreateJobWithHttpInfo(NewJobOptions newJobOptions) throws ApiException {
+ okhttp3.Call localVarCall = servicesApiJobsCreateJobValidateBeforeCall(newJobOptions, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Create a Connector Job. (asynchronously)
+ * The general workflow for a job is as follows. 1. Create a job. 1. Add files to a job. 1. Start the job. 1. Poll for translation completion. 1. Download the translated files.
+ * @param newJobOptions (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 201 | The job response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsCreateJobAsync(NewJobOptions newJobOptions, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = servicesApiJobsCreateJobValidateBeforeCall(newJobOptions, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for servicesApiJobsDeleteJobById
+ * @param id The Job ID. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsDeleteJobByIdCall(Integer id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/jobs/{id}"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "BearerAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiJobsDeleteJobByIdValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsDeleteJobById(Async)");
+ }
+
+ return servicesApiJobsDeleteJobByIdCall(id, _callback);
+
+ }
+
+ /**
+ * Delete a Connector Job.
+ *
+ * @param id The Job ID. (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public void servicesApiJobsDeleteJobById(Integer id) throws ApiException {
+ servicesApiJobsDeleteJobByIdWithHttpInfo(id);
+ }
+
+ /**
+ * Delete a Connector Job.
+ *
+ * @param id The Job ID. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public ApiResponse servicesApiJobsDeleteJobByIdWithHttpInfo(Integer id) throws ApiException {
+ okhttp3.Call localVarCall = servicesApiJobsDeleteJobByIdValidateBeforeCall(id, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Delete a Connector Job. (asynchronously)
+ *
+ * @param id The Job ID. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsDeleteJobByIdAsync(Integer id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = servicesApiJobsDeleteJobByIdValidateBeforeCall(id, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for servicesApiJobsGetJobById
+ * @param id The Job ID. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The job response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsGetJobByIdCall(Integer id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/jobs/{id}"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "BearerAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiJobsGetJobByIdValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsGetJobById(Async)");
+ }
+
+ return servicesApiJobsGetJobByIdCall(id, _callback);
+
+ }
+
+ /**
+ * Retrieve a Connector Job.
+ *
+ * @param id The Job ID. (required)
+ * @return JobResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The job response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public JobResponse servicesApiJobsGetJobById(Integer id) throws ApiException {
+ ApiResponse localVarResp = servicesApiJobsGetJobByIdWithHttpInfo(id);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Retrieve a Connector Job.
+ *
+ * @param id The Job ID. (required)
+ * @return ApiResponse<JobResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The job response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public ApiResponse servicesApiJobsGetJobByIdWithHttpInfo(Integer id) throws ApiException {
+ okhttp3.Call localVarCall = servicesApiJobsGetJobByIdValidateBeforeCall(id, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Retrieve a Connector Job. (asynchronously)
+ *
+ * @param id The Job ID. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The job response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsGetJobByIdAsync(Integer id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = servicesApiJobsGetJobByIdValidateBeforeCall(id, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for servicesApiJobsGetJobTranslations
+ * @param limit the query limit (optional, default to 25)
+ * @param start where to start (optional, default to 0)
+ * @param order how to order the returned results (optional, default to asc)
+ * @param filterOutCompleted Weather it should filter out completed translations (optional, default to false)
+ * @param liltTranslationWorkflow Filter by selected translation workflow (optional)
+ * @param orderStatus Filter by list of order level statuses (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The jobs response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsGetJobTranslationsCall(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/jobs/translations";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (limit != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
+ }
+
+ if (start != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start));
+ }
+
+ if (order != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order));
+ }
+
+ if (filterOutCompleted != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter_out_completed", filterOutCompleted));
+ }
+
+ if (liltTranslationWorkflow != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("lilt_translation_workflow", liltTranslationWorkflow));
+ }
+
+ if (orderStatus != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_status", orderStatus));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "BearerAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiJobsGetJobTranslationsValidateBeforeCall(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus, final ApiCallback _callback) throws ApiException {
+ return servicesApiJobsGetJobTranslationsCall(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus, _callback);
+
+ }
+
+ /**
+ * Retrieve a list of Translations with their Job information.
+ *
+ * @param limit the query limit (optional, default to 25)
+ * @param start where to start (optional, default to 0)
+ * @param order how to order the returned results (optional, default to asc)
+ * @param filterOutCompleted Weather it should filter out completed translations (optional, default to false)
+ * @param liltTranslationWorkflow Filter by selected translation workflow (optional)
+ * @param orderStatus Filter by list of order level statuses (optional)
+ * @return JobsResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The jobs response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public JobsResponse servicesApiJobsGetJobTranslations(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus) throws ApiException {
+ ApiResponse localVarResp = servicesApiJobsGetJobTranslationsWithHttpInfo(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Retrieve a list of Translations with their Job information.
+ *
+ * @param limit the query limit (optional, default to 25)
+ * @param start where to start (optional, default to 0)
+ * @param order how to order the returned results (optional, default to asc)
+ * @param filterOutCompleted Weather it should filter out completed translations (optional, default to false)
+ * @param liltTranslationWorkflow Filter by selected translation workflow (optional)
+ * @param orderStatus Filter by list of order level statuses (optional)
+ * @return ApiResponse<JobsResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The jobs response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public ApiResponse servicesApiJobsGetJobTranslationsWithHttpInfo(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus) throws ApiException {
+ okhttp3.Call localVarCall = servicesApiJobsGetJobTranslationsValidateBeforeCall(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Retrieve a list of Translations with their Job information. (asynchronously)
+ *
+ * @param limit the query limit (optional, default to 25)
+ * @param start where to start (optional, default to 0)
+ * @param order how to order the returned results (optional, default to asc)
+ * @param filterOutCompleted Weather it should filter out completed translations (optional, default to false)
+ * @param liltTranslationWorkflow Filter by selected translation workflow (optional)
+ * @param orderStatus Filter by list of order level statuses (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The jobs response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsGetJobTranslationsAsync(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = servicesApiJobsGetJobTranslationsValidateBeforeCall(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for servicesApiJobsGetJobs
+ * @param limit the query limit (optional, default to 25)
+ * @param start where to start (optional, default to 0)
+ * @param order how to order the returned results (optional, default to asc)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The jobs response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsGetJobsCall(Integer limit, Integer start, String order, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/jobs";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (limit != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
+ }
+
+ if (start != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start));
+ }
+
+ if (order != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "BearerAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiJobsGetJobsValidateBeforeCall(Integer limit, Integer start, String order, final ApiCallback _callback) throws ApiException {
+ return servicesApiJobsGetJobsCall(limit, start, order, _callback);
+
+ }
+
+ /**
+ * Retrieve a list of Connector Jobs.
+ *
+ * @param limit the query limit (optional, default to 25)
+ * @param start where to start (optional, default to 0)
+ * @param order how to order the returned results (optional, default to asc)
+ * @return JobsResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The jobs response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public JobsResponse servicesApiJobsGetJobs(Integer limit, Integer start, String order) throws ApiException {
+ ApiResponse localVarResp = servicesApiJobsGetJobsWithHttpInfo(limit, start, order);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Retrieve a list of Connector Jobs.
+ *
+ * @param limit the query limit (optional, default to 25)
+ * @param start where to start (optional, default to 0)
+ * @param order how to order the returned results (optional, default to asc)
+ * @return ApiResponse<JobsResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The jobs response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public ApiResponse servicesApiJobsGetJobsWithHttpInfo(Integer limit, Integer start, String order) throws ApiException {
+ okhttp3.Call localVarCall = servicesApiJobsGetJobsValidateBeforeCall(limit, start, order, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Retrieve a list of Connector Jobs. (asynchronously)
+ *
+ * @param limit the query limit (optional, default to 25)
+ * @param start where to start (optional, default to 0)
+ * @param order how to order the returned results (optional, default to asc)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The jobs response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsGetJobsAsync(Integer limit, Integer start, String order, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = servicesApiJobsGetJobsValidateBeforeCall(limit, start, order, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for servicesApiJobsStartJob
+ * @param id The Job ID. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsStartJobCall(Integer id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/jobs/{id}/start"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "BearerAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiJobsStartJobValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsStartJob(Async)");
+ }
+
+ return servicesApiJobsStartJobCall(id, _callback);
+
+ }
+
+ /**
+ * Start a Job.
+ * Start a job once all of the source files have been added. Use the Job ID to poll for completion to ensure everything has been well received by Lilt.
+ * @param id The Job ID. (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public void servicesApiJobsStartJob(Integer id) throws ApiException {
+ servicesApiJobsStartJobWithHttpInfo(id);
+ }
+
+ /**
+ * Start a Job.
+ * Start a job once all of the source files have been added. Use the Job ID to poll for completion to ensure everything has been well received by Lilt.
+ * @param id The Job ID. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public ApiResponse servicesApiJobsStartJobWithHttpInfo(Integer id) throws ApiException {
+ okhttp3.Call localVarCall = servicesApiJobsStartJobValidateBeforeCall(id, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Start a Job. (asynchronously)
+ * Start a job once all of the source files have been added. Use the Job ID to poll for completion to ensure everything has been well received by Lilt.
+ * @param id The Job ID. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsStartJobAsync(Integer id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = servicesApiJobsStartJobValidateBeforeCall(id, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for servicesApiJobsSyncJob
+ * @param id The Job ID. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsSyncJobCall(Integer id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/jobs/{id}/sync"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "BearerAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiJobsSyncJobValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsSyncJob(Async)");
+ }
+
+ return servicesApiJobsSyncJobCall(id, _callback);
+
+ }
+
+ /**
+ * Start a Sync.
+ * Checks for updates to the translations. Use the Job ID to poll for successful completion of the sync. When the sync is complete the translations endpoint can be used to view the translation status for the job.
+ * @param id The Job ID. (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public void servicesApiJobsSyncJob(Integer id) throws ApiException {
+ servicesApiJobsSyncJobWithHttpInfo(id);
+ }
+
+ /**
+ * Start a Sync.
+ * Checks for updates to the translations. Use the Job ID to poll for successful completion of the sync. When the sync is complete the translations endpoint can be used to view the translation status for the job.
+ * @param id The Job ID. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public ApiResponse servicesApiJobsSyncJobWithHttpInfo(Integer id) throws ApiException {
+ okhttp3.Call localVarCall = servicesApiJobsSyncJobValidateBeforeCall(id, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Start a Sync. (asynchronously)
+ * Checks for updates to the translations. Use the Job ID to poll for successful completion of the sync. When the sync is complete the translations endpoint can be used to view the translation status for the job.
+ * @param id The Job ID. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 204 | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 404 | The Not Found response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsSyncJobAsync(Integer id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = servicesApiJobsSyncJobValidateBeforeCall(id, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for servicesApiJobsUpdateJob
+ * @param id The Job ID. (required)
+ * @param updateJobOptions (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | The job response. | - |
+ 400 | The Bad Request response. | - |
+ 401 | The Unauthorized response. | - |
+ 403 | The Forbidden response. | - |
+ 500 | The Server Error response. | - |
+
+ */
+ public okhttp3.Call servicesApiJobsUpdateJobCall(Integer id, UpdateJobOptions updateJobOptions, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = updateJobOptions;
+
+ // create path and map variables
+ String localVarPath = "/jobs/{id}"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "BearerAuth" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call servicesApiJobsUpdateJobValidateBeforeCall(Integer id, UpdateJobOptions updateJobOptions, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsUpdateJob(Async)");
+ }
+
+ return servicesApiJobsUpdateJobCall(id, updateJobOptions, _callback);
+
+ }
+
+ /**
+ * Update a Connector Job.
+ * Update a job to change the status or error message.
+ * @param id The Job ID. (required)
+ * @param updateJobOptions (optional)
+ * @return JobResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+