+ *
+ * @param lenientOnJson a boolean
+ * @return a {@link com.adzerk.sdk.generated.ApiClient} object
+ */
public ApiClient setLenientOnJson(boolean lenientOnJson) {
- this.json.setLenientOnJson(lenientOnJson);
+ JSON.setLenientOnJson(lenientOnJson);
return this;
}
@@ -371,6 +472,31 @@ public void setAccessToken(String accessToken) {
throw new RuntimeException("No OAuth2 authentication configured!");
}
+ /**
+ * Helper method to set credentials for AWSV4 Signature
+ *
+ * @param accessKey Access Key
+ * @param secretKey Secret Key
+ * @param region Region
+ * @param service Service to access to
+ */
+ public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) {
+ throw new RuntimeException("No AWS4 authentication configured!");
+ }
+
+ /**
+ * Helper method to set credentials for AWSV4 Signature
+ *
+ * @param accessKey Access Key
+ * @param secretKey Secret Key
+ * @param sessionToken Session Token
+ * @param region Region
+ * @param service Service to access to
+ */
+ public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) {
+ throw new RuntimeException("No AWS4 authentication configured!");
+ }
+
/**
* Set the User-Agent header's value (by adding to the default header map).
*
@@ -441,7 +567,7 @@ public ApiClient setDebugging(boolean debugging) {
/**
* The path of temporary folder used to store downloaded files from endpoints
* with file response. The default value is null, i.e. using
- * the system's default tempopary folder.
+ * the system's default temporary folder.
*
* @see createTempFile
* @return Temporary folder path
@@ -473,7 +599,7 @@ public int getConnectTimeout() {
/**
* Sets the connect timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
- * {@link Integer#MAX_VALUE}.
+ * {@link java.lang.Integer#MAX_VALUE}.
*
* @param connectionTimeout connection timeout in milliseconds
* @return Api client
@@ -495,7 +621,7 @@ public int getReadTimeout() {
/**
* Sets the read timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
- * {@link Integer#MAX_VALUE}.
+ * {@link java.lang.Integer#MAX_VALUE}.
*
* @param readTimeout read timeout in milliseconds
* @return Api client
@@ -517,7 +643,7 @@ public int getWriteTimeout() {
/**
* Sets the write timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
- * {@link Integer#MAX_VALUE}.
+ * {@link java.lang.Integer#MAX_VALUE}.
*
* @param writeTimeout connection timeout in milliseconds
* @return Api client
@@ -539,7 +665,7 @@ public String parameterToString(Object param) {
return "";
} else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) {
//Serialize to json string and remove the " enclosing characters
- String jsonStr = json.serialize(param);
+ String jsonStr = JSON.serialize(param);
return jsonStr.substring(1, jsonStr.length() - 1);
} else if (param instanceof Collection) {
StringBuilder b = new StringBuilder();
@@ -547,7 +673,7 @@ public String parameterToString(Object param) {
if (b.length() > 0) {
b.append(",");
}
- b.append(String.valueOf(o));
+ b.append(o);
}
return b.toString();
} else {
@@ -626,6 +752,31 @@ public List parameterToPairs(String collectionFormat, String name, Collect
return params;
}
+ /**
+ * Formats the specified free-form query parameters to a list of {@code Pair} objects.
+ *
+ * @param value The free-form query parameters.
+ * @return A list of {@code Pair} objects.
+ */
+ public List freeFormParameterToPairs(Object value) {
+ List params = new ArrayList<>();
+
+ // preconditions
+ if (value == null || !(value instanceof Map )) {
+ return params;
+ }
+
+ @SuppressWarnings("unchecked")
+ final Map valuesMap = (Map) value;
+
+ for (Map.Entry entry : valuesMap.entrySet()) {
+ params.add(new Pair(entry.getKey(), parameterToString(entry.getValue())));
+ }
+
+ return params;
+ }
+
+
/**
* Formats the specified collection path parameter to a string value.
*
@@ -668,7 +819,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio
* @return The sanitized filename
*/
public String sanitizeFilename(String filename) {
- return filename.replaceAll(".*[/\\\\]", "");
+ return filename.replaceFirst("^.*[/\\\\]", "");
}
/**
@@ -715,17 +866,23 @@ public String selectHeaderAccept(String[] accepts) {
*
* @param contentTypes The Content-Type array to select from
* @return The Content-Type header to use. If the given array is empty,
- * or matches "any", JSON will be used.
+ * returns null. If it matches "any", JSON will be used.
*/
public String selectHeaderContentType(String[] contentTypes) {
- if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) {
+ if (contentTypes.length == 0) {
+ return null;
+ }
+
+ if (contentTypes[0].equals("*/*")) {
return "application/json";
}
+
for (String contentType : contentTypes) {
if (isJsonMime(contentType)) {
return contentType;
}
}
+
return contentTypes[0];
}
@@ -751,7 +908,7 @@ public String escapeString(String str) {
* @param response HTTP response
* @param returnType The type of the Java object
* @return The deserialized Java object
- * @throws ApiException If fail to deserialize response body, i.e. cannot read response body
+ * @throws com.adzerk.sdk.generated.ApiException If fail to deserialize response body, i.e. cannot read response body
* or the Content-Type of the response is not supported.
*/
@SuppressWarnings("unchecked")
@@ -772,17 +929,8 @@ public T deserialize(Response response, Type returnType) throws ApiException
return (T) downloadFileFromResponse(response);
}
- String respBody;
- try {
- if (response.body() != null)
- respBody = response.body().string();
- else
- respBody = null;
- } catch (IOException e) {
- throw new ApiException(e);
- }
-
- if (respBody == null || "".equals(respBody)) {
+ ResponseBody respBody = response.body();
+ if (respBody == null) {
return null;
}
@@ -791,17 +939,25 @@ public T deserialize(Response response, Type returnType) throws ApiException
// ensuring a default content type
contentType = "application/json";
}
- if (isJsonMime(contentType)) {
- return json.deserialize(respBody, returnType);
- } else if (returnType.equals(String.class)) {
- // Expecting string, return the raw response body.
- return (T) respBody;
- } else {
- throw new ApiException(
+ try {
+ if (isJsonMime(contentType)) {
+ return JSON.deserialize(respBody.byteStream(), returnType);
+ } else if (returnType.equals(String.class)) {
+ String respBodyString = respBody.string();
+ if (respBodyString.isEmpty()) {
+ return null;
+ }
+ // Expecting string, return the raw response body.
+ return (T) respBodyString;
+ } else {
+ throw new ApiException(
"Content type \"" + contentType + "\" is not supported for type: " + returnType,
response.code(),
response.headers().toMultimap(),
- respBody);
+ response.body().string());
+ }
+ } catch (IOException e) {
+ throw new ApiException(e);
}
}
@@ -812,7 +968,7 @@ public T deserialize(Response response, Type returnType) throws ApiException
* @param obj The Java object
* @param contentType The request Content-Type
* @return The serialized request body
- * @throws ApiException If fail to serialize the given object
+ * @throws com.adzerk.sdk.generated.ApiException If fail to serialize the given object
*/
public RequestBody serialize(Object obj, String contentType) throws ApiException {
if (obj instanceof byte[]) {
@@ -821,14 +977,18 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException
} else if (obj instanceof File) {
// File body parameter support.
return RequestBody.create((File) obj, MediaType.parse(contentType));
+ } else if ("text/plain".equals(contentType) && obj instanceof String) {
+ return RequestBody.create((String) obj, MediaType.parse(contentType));
} else if (isJsonMime(contentType)) {
String content;
if (obj != null) {
- content = json.serialize(obj);
+ content = JSON.serialize(obj);
} else {
content = null;
}
return RequestBody.create(content, MediaType.parse(contentType));
+ } else if (obj instanceof String) {
+ return RequestBody.create((String) obj, MediaType.parse(contentType));
} else {
throw new ApiException("Content type \"" + contentType + "\" is not supported");
}
@@ -838,7 +998,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException
* Download file from the given response.
*
* @param response An instance of the Response object
- * @throws ApiException If fail to read file content from response and write to disk
+ * @throws com.adzerk.sdk.generated.ApiException If fail to read file content from response and write to disk
* @return Downloaded file
*/
public File downloadFileFromResponse(Response response) throws ApiException {
@@ -858,7 +1018,7 @@ public File downloadFileFromResponse(Response response) throws ApiException {
*
* @param response An instance of the Response object
* @return Prepared file for the download
- * @throws IOException If fail to prepare file for download
+ * @throws java.io.IOException If fail to prepare file for download
*/
public File prepareDownloadFile(Response response) throws IOException {
String filename = null;
@@ -902,7 +1062,7 @@ public File prepareDownloadFile(Response response) throws IOException {
* @param Type
* @param call An instance of the Call object
* @return ApiResponse<T>
- * @throws ApiException If fail to execute the call
+ * @throws com.adzerk.sdk.generated.ApiException If fail to execute the call
*/
public ApiResponse execute(Call call) throws ApiException {
return execute(call, null);
@@ -917,7 +1077,7 @@ public ApiResponse execute(Call call) throws ApiException {
* @return ApiResponse object containing response status, headers and
* data, which is a Java object deserialized from response body and would be null
* when returnType is null.
- * @throws ApiException If fail to execute the call
+ * @throws com.adzerk.sdk.generated.ApiException If fail to execute the call
*/
public ApiResponse execute(Call call, Type returnType) throws ApiException {
try {
@@ -981,7 +1141,7 @@ public void onResponse(Call call, Response response) throws IOException {
* @param response Response
* @param returnType Return type
* @return Type
- * @throws ApiException If the response has an unsuccessful status code or
+ * @throws com.adzerk.sdk.generated.ApiException If the response has an unsuccessful status code or
* fail to deserialize the response body
*/
public T handleResponse(Response response, Type returnType) throws ApiException {
@@ -1016,6 +1176,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept
/**
* Build HTTP call with the given options.
*
+ * @param baseUrl The base URL
* @param path The sub-path of the HTTP URL
* @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
* @param queryParams The query parameters
@@ -1027,10 +1188,10 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept
* @param authNames The authentications to apply
* @param callback Callback for upload/download progress
* @return The HTTP call
- * @throws ApiException If fail to serialize the request body object
+ * @throws com.adzerk.sdk.generated.ApiException If fail to serialize the request body object
*/
- public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
- Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback);
+ public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
+ Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback);
return httpClient.newCall(request);
}
@@ -1038,6 +1199,7 @@ public Call buildCall(String path, String method, List queryParams, List
queryParams, List
queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
- updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
-
- final String url = buildUrl(path, queryParams, collectionQueryParams);
- final Request.Builder reqBuilder = new Request.Builder().url(url);
- processHeaderParams(headerParams, reqBuilder);
- processCookieParams(cookieParams, reqBuilder);
-
- String contentType = (String) headerParams.get("Content-Type");
- // ensuring a default content type
- if (contentType == null) {
- contentType = "application/json";
- }
+ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException {
+ final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
+ // prepare HTTP request body
RequestBody reqBody;
+ String contentType = headerParams.get("Content-Type");
+ String contentTypePure = contentType;
+ if (contentTypePure != null && contentTypePure.contains(";")) {
+ contentTypePure = contentType.substring(0, contentType.indexOf(";"));
+ }
if (!HttpMethod.permitsRequestBody(method)) {
reqBody = null;
- } else if ("application/x-www-form-urlencoded".equals(contentType)) {
+ } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) {
reqBody = buildRequestBodyFormEncoding(formParams);
- } else if ("multipart/form-data".equals(contentType)) {
+ } else if ("multipart/form-data".equals(contentTypePure)) {
reqBody = buildRequestBodyMultipart(formParams);
} else if (body == null) {
if ("DELETE".equals(method)) {
@@ -1078,12 +1235,21 @@ public Request buildRequest(String path, String method, List queryParams,
reqBody = null;
} else {
// use an empty request body (for POST, PUT and PATCH)
- reqBody = RequestBody.create("", MediaType.parse(contentType));
+ reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType));
}
} else {
reqBody = serialize(body, contentType);
}
+ List updatedQueryParams = new ArrayList<>(queryParams);
+
+ // update parameters with authentication settings
+ updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
+
+ final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
+ processHeaderParams(headerParams, reqBuilder);
+ processCookieParams(cookieParams, reqBuilder);
+
// Associate callback with request (if not null) so interceptor can
// access it when creating ProgressResponseBody
reqBuilder.tag(callback);
@@ -1103,14 +1269,30 @@ public Request buildRequest(String path, String method, List queryParams,
/**
* Build full URL by concatenating base path, the given sub path and query parameters.
*
+ * @param baseUrl The base URL
* @param path The sub path
* @param queryParams The query parameters
* @param collectionQueryParams The collection query parameters
* @return The full URL
*/
- public String buildUrl(String path, List queryParams, List collectionQueryParams) {
+ public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) {
final StringBuilder url = new StringBuilder();
- url.append(basePath).append(path);
+ if (baseUrl != null) {
+ url.append(baseUrl).append(path);
+ } else {
+ String baseURL;
+ if (serverIndex != null) {
+ if (serverIndex < 0 || serverIndex >= servers.size()) {
+ throw new ArrayIndexOutOfBoundsException(String.format(
+ "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size()
+ ));
+ }
+ baseURL = servers.get(serverIndex).URL(serverVariables);
+ } else {
+ baseURL = basePath;
+ }
+ url.append(baseURL).append(path);
+ }
if (queryParams != null && !queryParams.isEmpty()) {
// support (constant) query string in `path`, e.g. "/posts?draft=1"
@@ -1190,14 +1372,19 @@ public void processCookieParams(Map cookieParams, Request.Builde
* @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 com.adzerk.sdk.generated.ApiException If fails to update the parameters
*/
- public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) {
+ public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams,
+ Map cookieParams, String payload, String method, URI uri) throws ApiException {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) {
throw new RuntimeException("Authentication undefined: " + authName);
}
- auth.applyToParams(queryParams, headerParams, cookieParams);
+ auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri);
}
}
@@ -1227,12 +1414,18 @@ public RequestBody buildRequestBodyMultipart(Map formParams) {
for (Entry param : formParams.entrySet()) {
if (param.getValue() instanceof File) {
File file = (File) param.getValue();
- Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\"");
- MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file));
- mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType));
+ addPartToMultiPartBuilder(mpBuilder, param.getKey(), file);
+ } else if (param.getValue() instanceof List) {
+ List list = (List) param.getValue();
+ for (Object item: list) {
+ if (item instanceof File) {
+ addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item);
+ } else {
+ addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue());
+ }
+ }
} else {
- Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"");
- mpBuilder.addPart(partHeaders, RequestBody.create(parameterToString(param.getValue()), null));
+ addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue());
}
}
return mpBuilder.build();
@@ -1253,11 +1446,49 @@ public String guessContentTypeFromFile(File file) {
}
}
+ /**
+ * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder.
+ *
+ * @param mpBuilder MultipartBody.Builder
+ * @param key The key of the Header element
+ * @param file The file to add to the Header
+ */
+ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) {
+ Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\"");
+ MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file));
+ mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType));
+ }
+
+ /**
+ * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder.
+ *
+ * @param mpBuilder MultipartBody.Builder
+ * @param key The key of the Header element
+ * @param obj The complex object to add to the Header
+ */
+ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) {
+ RequestBody requestBody;
+ if (obj instanceof String) {
+ requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain"));
+ } else {
+ String content;
+ if (obj != null) {
+ content = JSON.serialize(obj);
+ } else {
+ content = null;
+ }
+ requestBody = RequestBody.create(content, MediaType.parse("application/json"));
+ }
+
+ Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"");
+ mpBuilder.addPart(partHeaders, requestBody);
+ }
+
/**
* Get network interceptor to add it to the httpClient to track download progress for
* async requests.
*/
- private Interceptor getProgressInterceptor() {
+ protected Interceptor getProgressInterceptor() {
return new Interceptor() {
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
@@ -1278,7 +1509,7 @@ public Response intercept(Interceptor.Chain chain) throws IOException {
* Apply SSL related settings to httpClient according to the current values of
* verifyingSsl and sslCaCert.
*/
- private void applySslSettings() {
+ protected void applySslSettings() {
try {
TrustManager[] trustManagers;
HostnameVerifier hostnameVerifier;
@@ -1320,7 +1551,7 @@ public boolean verify(String hostname, SSLSession session) {
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
for (Certificate certificate : certificates) {
- String certificateAlias = "ca" + Integer.toString(index++);
+ String certificateAlias = "ca" + (index++);
caKeyStore.setCertificateEntry(certificateAlias, certificate);
}
trustManagerFactory.init(caKeyStore);
@@ -1340,7 +1571,7 @@ public boolean verify(String hostname, SSLSession session) {
}
}
- private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException {
+ protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException {
try {
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(null, password);
@@ -1349,4 +1580,26 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti
throw new AssertionError(e);
}
}
+
+ /**
+ * Convert the HTTP request body to a string.
+ *
+ * @param requestBody The HTTP request object
+ * @return The string representation of the HTTP request body
+ * @throws com.adzerk.sdk.generated.ApiException If fail to serialize the request body object into a string
+ */
+ protected String requestBodyToString(RequestBody requestBody) throws ApiException {
+ if (requestBody != null) {
+ try {
+ final Buffer buffer = new Buffer();
+ requestBody.writeTo(buffer);
+ return buffer.readUtf8();
+ } catch (final IOException e) {
+ throw new ApiException(e);
+ }
+ }
+
+ // empty http request body
+ return "";
+ }
}
diff --git a/src/main/java/com/adzerk/sdk/generated/ApiException.java b/src/main/java/com/adzerk/sdk/generated/ApiException.java
index 481c871..e8147f7 100644
--- a/src/main/java/com/adzerk/sdk/generated/ApiException.java
+++ b/src/main/java/com/adzerk/sdk/generated/ApiException.java
@@ -16,22 +16,51 @@
import java.util.Map;
import java.util.List;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-07-16T01:15:27.717Z[Etc/UTC]")
+
+/**
+ *
ApiException class.
+ */
+@SuppressWarnings("serial")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-12T10:34:05.623511+01:00[Europe/London]", comments = "Generator version: 7.14.0")
public class ApiException extends Exception {
+ private static final long serialVersionUID = 1L;
+
private int code = 0;
private Map> responseHeaders = null;
private String responseBody = null;
+ /**
+ *
+ *
+ * @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;
@@ -88,4 +154,14 @@ public Map> getResponseHeaders() {
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/com/adzerk/sdk/generated/ApiResponse.java b/src/main/java/com/adzerk/sdk/generated/ApiResponse.java
index 0c05a15..fdce0be 100644
--- a/src/main/java/com/adzerk/sdk/generated/ApiResponse.java
+++ b/src/main/java/com/adzerk/sdk/generated/ApiResponse.java
@@ -18,8 +18,6 @@
/**
* API response returned by API call.
- *
- * @param The type of data that is deserialized from response body
*/
public class ApiResponse {
final private int statusCode;
@@ -27,6 +25,8 @@ public class ApiResponse {
final private T data;
/**
+ *
Constructor for ApiResponse.
+ *
* @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response
*/
@@ -35,6 +35,8 @@ public ApiResponse(int statusCode, Map> headers) {
}
/**
+ *
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
@@ -45,14 +47,29 @@ public ApiResponse(int statusCode, Map> headers, T data) {
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/com/adzerk/sdk/generated/Configuration.java b/src/main/java/com/adzerk/sdk/generated/Configuration.java
index ab4d824..102479f 100644
--- a/src/main/java/com/adzerk/sdk/generated/Configuration.java
+++ b/src/main/java/com/adzerk/sdk/generated/Configuration.java
@@ -13,27 +13,51 @@
package com.adzerk.sdk.generated;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-07-16T01:15:27.717Z[Etc/UTC]")
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Supplier;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-12T10:34:05.623511+01:00[Europe/London]", comments = "Generator version: 7.14.0")
public class Configuration {
- 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;
- }
+ public static final String VERSION = "1.0";
+
+ private static final AtomicReference defaultApiClient = new AtomicReference<>();
+ private static volatile Supplier apiClientFactory = ApiClient::new;
- /**
- * 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;
+ /**
+ * 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() {
+ ApiClient client = defaultApiClient.get();
+ if (client == null) {
+ client = defaultApiClient.updateAndGet(val -> {
+ if (val != null) { // changed by another thread
+ return val;
+ }
+ return apiClientFactory.get();
+ });
}
-}
+ return client;
+ }
+
+ /**
+ * 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.set(apiClient);
+ }
+
+ /**
+ * set the callback used to create new ApiClient objects
+ */
+ public static void setApiClientFactory(Supplier factory) {
+ apiClientFactory = Objects.requireNonNull(factory);
+ }
+
+ private Configuration() {
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/adzerk/sdk/generated/JSON.java b/src/main/java/com/adzerk/sdk/generated/JSON.java
index d2426d5..2d0aff0 100644
--- a/src/main/java/com/adzerk/sdk/generated/JSON.java
+++ b/src/main/java/com/adzerk/sdk/generated/JSON.java
@@ -23,32 +23,40 @@
import com.google.gson.JsonElement;
import io.gsonfire.GsonFireBuilder;
import io.gsonfire.TypeSelector;
-import org.threeten.bp.LocalDate;
-import org.threeten.bp.OffsetDateTime;
-import org.threeten.bp.format.DateTimeFormatter;
-import com.adzerk.sdk.generated.model.*;
import okio.ByteString;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
import java.io.StringReader;
import java.lang.reflect.Type;
+import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.ParsePosition;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import java.util.HashMap;
+/*
+ * A JSON utility class
+ *
+ * NOTE: in the future, this class may be converted to static, which may break
+ * backward-compatibility
+ */
public class JSON {
- private Gson gson;
- private boolean isLenientOnJson = false;
- private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
- private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
- private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
- private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
- private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
+ private static Gson gson;
+ private static boolean isLenientOnJson = false;
+ private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
+ private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
+ private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
+ private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
+ private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
@SuppressWarnings("unchecked")
public static GsonBuilder createGson() {
@@ -81,14 +89,27 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
return clazz;
}
- public JSON() {
- gson = createGson()
- .registerTypeAdapter(Date.class, dateTypeAdapter)
- .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
- .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
- .registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
- .registerTypeAdapter(byte[].class, byteArrayAdapter)
- .create();
+ 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 com.adzerk.sdk.generated.model.CandidateRetrieval.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.ConsentRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.Content.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.Decision.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.DecisionRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.DecisionResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.DecisionResponseDecisionsValue.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.Event.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.MatchedPoint.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.Placement.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.PricingData.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.SkipFilters.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new com.adzerk.sdk.generated.model.User.CustomTypeAdapterFactory());
+ gson = gsonBuilder.create();
}
/**
@@ -96,7 +117,7 @@ public JSON() {
*
* @return Gson
*/
- public Gson getGson() {
+ public static Gson getGson() {
return gson;
}
@@ -104,16 +125,13 @@ public Gson getGson() {
* Set Gson.
*
* @param gson Gson
- * @return JSON
*/
- public JSON setGson(Gson gson) {
- this.gson = gson;
- return this;
+ public static void setGson(Gson gson) {
+ JSON.gson = gson;
}
- public JSON setLenientOnJson(boolean lenientOnJson) {
+ public static void setLenientOnJson(boolean lenientOnJson) {
isLenientOnJson = lenientOnJson;
- return this;
}
/**
@@ -122,7 +140,7 @@ public JSON setLenientOnJson(boolean lenientOnJson) {
* @param obj Object
* @return String representation of the JSON
*/
- public String serialize(Object obj) {
+ public static String serialize(Object obj) {
return gson.toJson(obj);
}
@@ -135,7 +153,7 @@ public String serialize(Object obj) {
* @return The deserialized Java object
*/
@SuppressWarnings("unchecked")
- public T deserialize(String body, Type returnType) {
+ public static T deserialize(String body, Type returnType) {
try {
if (isLenientOnJson) {
JsonReader jsonReader = new JsonReader(new StringReader(body));
@@ -156,10 +174,32 @@ public T deserialize(String body, Type returnType) {
}
}
+ /**
+ * Deserialize the given JSON InputStream to a Java object.
+ *
+ * @param Type
+ * @param inputStream The JSON InputStream
+ * @param returnType The type to deserialize into
+ * @return The deserialized Java object
+ */
+ @SuppressWarnings("unchecked")
+ public static T deserialize(InputStream inputStream, Type returnType) throws IOException {
+ try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) {
+ if (isLenientOnJson) {
+ // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
+ JsonReader jsonReader = new JsonReader(reader);
+ jsonReader.setLenient(true);
+ return gson.fromJson(jsonReader, returnType);
+ } else {
+ return gson.fromJson(reader, returnType);
+ }
+ }
+ }
+
/**
* Gson TypeAdapter for Byte Array type
*/
- public class ByteArrayAdapter extends TypeAdapter {
+ public static class ByteArrayAdapter extends TypeAdapter {
@Override
public void write(JsonWriter out, byte[] value) throws IOException {
@@ -231,7 +271,7 @@ public OffsetDateTime read(JsonReader in) throws IOException {
/**
* Gson TypeAdapter for JSR310 LocalDate type
*/
- public class LocalDateTypeAdapter extends TypeAdapter {
+ public static class LocalDateTypeAdapter extends TypeAdapter {
private DateTimeFormatter formatter;
@@ -269,14 +309,12 @@ public LocalDate read(JsonReader in) throws IOException {
}
}
- public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
+ public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
offsetDateTimeTypeAdapter.setFormat(dateFormat);
- return this;
}
- public JSON setLocalDateFormat(DateTimeFormatter dateFormat) {
+ public static void setLocalDateFormat(DateTimeFormatter dateFormat) {
localDateTypeAdapter.setFormat(dateFormat);
- return this;
}
/**
@@ -390,14 +428,11 @@ public Date read(JsonReader in) throws IOException {
}
}
- public JSON setDateFormat(DateFormat dateFormat) {
+ public static void setDateFormat(DateFormat dateFormat) {
dateTypeAdapter.setFormat(dateFormat);
- return this;
}
- public JSON setSqlDateFormat(DateFormat dateFormat) {
+ public static void setSqlDateFormat(DateFormat dateFormat) {
sqlDateTypeAdapter.setFormat(dateFormat);
- return this;
}
-
}
diff --git a/src/main/java/com/adzerk/sdk/generated/Pair.java b/src/main/java/com/adzerk/sdk/generated/Pair.java
index b6db0fb..79819a4 100644
--- a/src/main/java/com/adzerk/sdk/generated/Pair.java
+++ b/src/main/java/com/adzerk/sdk/generated/Pair.java
@@ -13,7 +13,7 @@
package com.adzerk.sdk.generated;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-07-16T01:15:27.717Z[Etc/UTC]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-12T10:34:05.623511+01:00[Europe/London]", comments = "Generator version: 7.14.0")
public class Pair {
private String name = "";
private String value = "";
@@ -52,10 +52,6 @@ private boolean isValidString(String arg) {
return false;
}
- if (arg.trim().isEmpty()) {
- return false;
- }
-
return true;
}
}
diff --git a/src/main/java/com/adzerk/sdk/generated/ProgressResponseBody.java b/src/main/java/com/adzerk/sdk/generated/ProgressResponseBody.java
index e2b0215..2f113b4 100644
--- a/src/main/java/com/adzerk/sdk/generated/ProgressResponseBody.java
+++ b/src/main/java/com/adzerk/sdk/generated/ProgressResponseBody.java
@@ -68,5 +68,3 @@ public long read(Buffer sink, long byteCount) throws IOException {
};
}
}
-
-
diff --git a/src/main/java/com/adzerk/sdk/generated/ServerConfiguration.java b/src/main/java/com/adzerk/sdk/generated/ServerConfiguration.java
index 1588927..747d445 100644
--- a/src/main/java/com/adzerk/sdk/generated/ServerConfiguration.java
+++ b/src/main/java/com/adzerk/sdk/generated/ServerConfiguration.java
@@ -1,3 +1,16 @@
+/*
+ * Adzerk Decision API
+ * Adzerk Decision API
+ *
+ * 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 com.adzerk.sdk.generated;
import java.util.Map;
@@ -5,6 +18,7 @@
/**
* Representing a Server configuration.
*/
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-12T10:34:05.623511+01:00[Europe/London]", comments = "Generator version: 7.14.0")
public class ServerConfiguration {
public String URL;
public String description;
@@ -12,7 +26,7 @@ public class ServerConfiguration {
/**
* @param URL A URL to the target host.
- * @param description A describtion of the host designated by the URL.
+ * @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) {
@@ -39,10 +53,10 @@ public String URL(Map variables) {
if (variables != null && variables.containsKey(name)) {
value = variables.get(name);
if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
- throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
+ throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
- url = url.replaceAll("\\{" + name + "\\}", value);
+ url = url.replace("{" + name + "}", value);
}
return url;
}
diff --git a/src/main/java/com/adzerk/sdk/generated/ServerVariable.java b/src/main/java/com/adzerk/sdk/generated/ServerVariable.java
index 445cef2..1b12752 100644
--- a/src/main/java/com/adzerk/sdk/generated/ServerVariable.java
+++ b/src/main/java/com/adzerk/sdk/generated/ServerVariable.java
@@ -1,3 +1,16 @@
+/*
+ * Adzerk Decision API
+ * Adzerk Decision API
+ *
+ * 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 com.adzerk.sdk.generated;
import java.util.HashSet;
@@ -5,6 +18,7 @@
/**
* Representing a Server Variable for server URL template substitution.
*/
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-12T10:34:05.623511+01:00[Europe/London]", comments = "Generator version: 7.14.0")
public class ServerVariable {
public String description;
public String defaultValue;
diff --git a/src/main/java/com/adzerk/sdk/generated/StringUtil.java b/src/main/java/com/adzerk/sdk/generated/StringUtil.java
index 24b4fe2..be984f0 100644
--- a/src/main/java/com/adzerk/sdk/generated/StringUtil.java
+++ b/src/main/java/com/adzerk/sdk/generated/StringUtil.java
@@ -16,7 +16,7 @@
import java.util.Collection;
import java.util.Iterator;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-07-16T01:15:27.717Z[Etc/UTC]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-08-12T10:34:05.623511+01:00[Europe/London]", comments = "Generator version: 7.14.0")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/src/main/java/com/adzerk/sdk/generated/api/DecisionApi.java b/src/main/java/com/adzerk/sdk/generated/api/DecisionApi.java
index 41d03b7..9ce3750 100644
--- a/src/main/java/com/adzerk/sdk/generated/api/DecisionApi.java
+++ b/src/main/java/com/adzerk/sdk/generated/api/DecisionApi.java
@@ -38,6 +38,8 @@
public class DecisionApi {
private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
public DecisionApi() {
this(Configuration.getDefaultApiClient());
@@ -55,6 +57,22 @@ 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 getDecisions
* @param decisionRequest (optional)
@@ -62,13 +80,27 @@ public void setApiClient(ApiClient apiClient) {
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
400
Bad Request
-
200
Successful decision request
-
*/
- public okhttp3.Call getDecisionsCall(DecisionRequest decisionRequest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getDecisionsCall(@javax.annotation.Nullable DecisionRequest decisionRequest, 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 = decisionRequest;
// create path and map variables
@@ -92,18 +124,17 @@ public okhttp3.Call getDecisionsCall(DecisionRequest decisionRequest, final ApiC
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { };
- return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getDecisionsValidateBeforeCall(DecisionRequest decisionRequest, final ApiCallback _callback) throws ApiException {
-
-
- okhttp3.Call localVarCall = getDecisionsCall(decisionRequest, _callback);
- return localVarCall;
+ private okhttp3.Call getDecisionsValidateBeforeCall(@javax.annotation.Nullable DecisionRequest decisionRequest, final ApiCallback _callback) throws ApiException {
+ return getDecisionsCall(decisionRequest, _callback);
}
@@ -114,13 +145,14 @@ private okhttp3.Call getDecisionsValidateBeforeCall(DecisionRequest decisionRequ
* @return DecisionResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
400
Bad Request
-
200
Successful decision request
-
*/
- public DecisionResponse getDecisions(DecisionRequest decisionRequest) throws ApiException {
+ public DecisionResponse getDecisions(@javax.annotation.Nullable DecisionRequest decisionRequest) throws ApiException {
ApiResponse localVarResp = getDecisionsWithHttpInfo(decisionRequest);
return localVarResp.getData();
}
@@ -132,13 +164,14 @@ public DecisionResponse getDecisions(DecisionRequest decisionRequest) throws Api
* @return ApiResponse<DecisionResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
400
Bad Request
-
200
Successful decision request
-
*/
- public ApiResponse getDecisionsWithHttpInfo(DecisionRequest decisionRequest) throws ApiException {
+ public ApiResponse getDecisionsWithHttpInfo(@javax.annotation.Nullable DecisionRequest decisionRequest) throws ApiException {
okhttp3.Call localVarCall = getDecisionsValidateBeforeCall(decisionRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
@@ -152,13 +185,14 @@ public ApiResponse getDecisionsWithHttpInfo(DecisionRequest de
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
400
Bad Request
-
200
Successful decision request
-
*/
- public okhttp3.Call getDecisionsAsync(DecisionRequest decisionRequest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getDecisionsAsync(@javax.annotation.Nullable DecisionRequest decisionRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getDecisionsValidateBeforeCall(decisionRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
diff --git a/src/main/java/com/adzerk/sdk/generated/api/UserdbApi.java b/src/main/java/com/adzerk/sdk/generated/api/UserdbApi.java
index 8896be2..86cafc8 100644
--- a/src/main/java/com/adzerk/sdk/generated/api/UserdbApi.java
+++ b/src/main/java/com/adzerk/sdk/generated/api/UserdbApi.java
@@ -38,6 +38,8 @@
public class UserdbApi {
private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
public UserdbApi() {
this(Configuration.getDefaultApiClient());
@@ -55,6 +57,22 @@ 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 addCustomProperties
* @param networkId Your Network Id (required)
@@ -64,17 +82,31 @@ public void setApiClient(ApiClient apiClient) {
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call addCustomPropertiesCall(Integer networkId, String userKey, Object body, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call addCustomPropertiesCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nullable Object 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 = "/udb/{networkId}/custom"
- .replaceAll("\\{" + "networkId" + "\\}", localVarApiClient.escapeString(networkId.toString()));
+ .replace("{" + "networkId" + "}", localVarApiClient.escapeString(networkId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -98,28 +130,27 @@ public okhttp3.Call addCustomPropertiesCall(Integer networkId, String userKey, O
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { "ApiKeyAuth" };
- return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call addCustomPropertiesValidateBeforeCall(Integer networkId, String userKey, Object body, final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call addCustomPropertiesValidateBeforeCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nullable Object body, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'networkId' is set
if (networkId == null) {
throw new ApiException("Missing the required parameter 'networkId' when calling addCustomProperties(Async)");
}
-
+
// verify the required parameter 'userKey' is set
if (userKey == null) {
throw new ApiException("Missing the required parameter 'userKey' when calling addCustomProperties(Async)");
}
-
- okhttp3.Call localVarCall = addCustomPropertiesCall(networkId, userKey, body, _callback);
- return localVarCall;
+ return addCustomPropertiesCall(networkId, userKey, body, _callback);
}
@@ -132,12 +163,13 @@ private okhttp3.Call addCustomPropertiesValidateBeforeCall(Integer networkId, St
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public File addCustomProperties(Integer networkId, String userKey, Object body) throws ApiException {
+ public File addCustomProperties(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nullable Object body) throws ApiException {
ApiResponse localVarResp = addCustomPropertiesWithHttpInfo(networkId, userKey, body);
return localVarResp.getData();
}
@@ -151,12 +183,13 @@ public File addCustomProperties(Integer networkId, String userKey, Object body)
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public ApiResponse addCustomPropertiesWithHttpInfo(Integer networkId, String userKey, Object body) throws ApiException {
+ public ApiResponse addCustomPropertiesWithHttpInfo(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nullable Object body) throws ApiException {
okhttp3.Call localVarCall = addCustomPropertiesValidateBeforeCall(networkId, userKey, body, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
@@ -172,12 +205,13 @@ public ApiResponse addCustomPropertiesWithHttpInfo(Integer networkId, Stri
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call addCustomPropertiesAsync(Integer networkId, String userKey, Object body, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call addCustomPropertiesAsync(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nullable Object body, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addCustomPropertiesValidateBeforeCall(networkId, userKey, body, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
@@ -193,17 +227,31 @@ public okhttp3.Call addCustomPropertiesAsync(Integer networkId, String userKey,
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call addInterestsCall(Integer networkId, String userKey, String interest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call addInterestsCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String interest, 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 = "/udb/{networkId}/interest/i.gif"
- .replaceAll("\\{" + "networkId" + "\\}", localVarApiClient.escapeString(networkId.toString()));
+ .replace("{" + "networkId" + "}", localVarApiClient.escapeString(networkId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -228,36 +276,34 @@ public okhttp3.Call addInterestsCall(Integer networkId, String userKey, String i
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { };
- return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call addInterestsValidateBeforeCall(Integer networkId, String userKey, String interest, final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call addInterestsValidateBeforeCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String interest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'networkId' is set
if (networkId == null) {
throw new ApiException("Missing the required parameter 'networkId' when calling addInterests(Async)");
}
-
+
// verify the required parameter 'userKey' is set
if (userKey == null) {
throw new ApiException("Missing the required parameter 'userKey' when calling addInterests(Async)");
}
-
+
// verify the required parameter 'interest' is set
if (interest == null) {
throw new ApiException("Missing the required parameter 'interest' when calling addInterests(Async)");
}
-
- okhttp3.Call localVarCall = addInterestsCall(networkId, userKey, interest, _callback);
- return localVarCall;
+ return addInterestsCall(networkId, userKey, interest, _callback);
}
@@ -270,12 +316,13 @@ private okhttp3.Call addInterestsValidateBeforeCall(Integer networkId, String us
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public File addInterests(Integer networkId, String userKey, String interest) throws ApiException {
+ public File addInterests(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String interest) throws ApiException {
ApiResponse localVarResp = addInterestsWithHttpInfo(networkId, userKey, interest);
return localVarResp.getData();
}
@@ -289,12 +336,13 @@ public File addInterests(Integer networkId, String userKey, String interest) thr
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public ApiResponse addInterestsWithHttpInfo(Integer networkId, String userKey, String interest) throws ApiException {
+ public ApiResponse addInterestsWithHttpInfo(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String interest) throws ApiException {
okhttp3.Call localVarCall = addInterestsValidateBeforeCall(networkId, userKey, interest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
@@ -310,12 +358,13 @@ public ApiResponse addInterestsWithHttpInfo(Integer networkId, String user
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call addInterestsAsync(Integer networkId, String userKey, String interest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call addInterestsAsync(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String interest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addInterestsValidateBeforeCall(networkId, userKey, interest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
@@ -332,19 +381,33 @@ public okhttp3.Call addInterestsAsync(Integer networkId, String userKey, String
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call addRetargetingSegmentCall(Integer networkId, Integer advertiserId, Integer retargetingSegmentId, String userKey, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call addRetargetingSegmentCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull Integer advertiserId, @javax.annotation.Nonnull Integer retargetingSegmentId, @javax.annotation.Nonnull String userKey, 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 = "/udb/{networkId}/rt/{advertiserId}/{retargetingSegmentId}/i.gif"
- .replaceAll("\\{" + "networkId" + "\\}", localVarApiClient.escapeString(networkId.toString()))
- .replaceAll("\\{" + "advertiserId" + "\\}", localVarApiClient.escapeString(advertiserId.toString()))
- .replaceAll("\\{" + "retargetingSegmentId" + "\\}", localVarApiClient.escapeString(retargetingSegmentId.toString()));
+ .replace("{" + "networkId" + "}", localVarApiClient.escapeString(networkId.toString()))
+ .replace("{" + "advertiserId" + "}", localVarApiClient.escapeString(advertiserId.toString()))
+ .replace("{" + "retargetingSegmentId" + "}", localVarApiClient.escapeString(retargetingSegmentId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -365,41 +428,39 @@ public okhttp3.Call addRetargetingSegmentCall(Integer networkId, Integer adverti
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { };
- return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call addRetargetingSegmentValidateBeforeCall(Integer networkId, Integer advertiserId, Integer retargetingSegmentId, String userKey, final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call addRetargetingSegmentValidateBeforeCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull Integer advertiserId, @javax.annotation.Nonnull Integer retargetingSegmentId, @javax.annotation.Nonnull String userKey, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'networkId' is set
if (networkId == null) {
throw new ApiException("Missing the required parameter 'networkId' when calling addRetargetingSegment(Async)");
}
-
+
// verify the required parameter 'advertiserId' is set
if (advertiserId == null) {
throw new ApiException("Missing the required parameter 'advertiserId' when calling addRetargetingSegment(Async)");
}
-
+
// verify the required parameter 'retargetingSegmentId' is set
if (retargetingSegmentId == null) {
throw new ApiException("Missing the required parameter 'retargetingSegmentId' when calling addRetargetingSegment(Async)");
}
-
+
// verify the required parameter 'userKey' is set
if (userKey == null) {
throw new ApiException("Missing the required parameter 'userKey' when calling addRetargetingSegment(Async)");
}
-
- okhttp3.Call localVarCall = addRetargetingSegmentCall(networkId, advertiserId, retargetingSegmentId, userKey, _callback);
- return localVarCall;
+ return addRetargetingSegmentCall(networkId, advertiserId, retargetingSegmentId, userKey, _callback);
}
@@ -413,12 +474,13 @@ private okhttp3.Call addRetargetingSegmentValidateBeforeCall(Integer networkId,
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public File addRetargetingSegment(Integer networkId, Integer advertiserId, Integer retargetingSegmentId, String userKey) throws ApiException {
+ public File addRetargetingSegment(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull Integer advertiserId, @javax.annotation.Nonnull Integer retargetingSegmentId, @javax.annotation.Nonnull String userKey) throws ApiException {
ApiResponse localVarResp = addRetargetingSegmentWithHttpInfo(networkId, advertiserId, retargetingSegmentId, userKey);
return localVarResp.getData();
}
@@ -433,12 +495,13 @@ public File addRetargetingSegment(Integer networkId, Integer advertiserId, Integ
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public ApiResponse addRetargetingSegmentWithHttpInfo(Integer networkId, Integer advertiserId, Integer retargetingSegmentId, String userKey) throws ApiException {
+ public ApiResponse addRetargetingSegmentWithHttpInfo(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull Integer advertiserId, @javax.annotation.Nonnull Integer retargetingSegmentId, @javax.annotation.Nonnull String userKey) throws ApiException {
okhttp3.Call localVarCall = addRetargetingSegmentValidateBeforeCall(networkId, advertiserId, retargetingSegmentId, userKey, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
@@ -455,12 +518,13 @@ public ApiResponse addRetargetingSegmentWithHttpInfo(Integer networkId, In
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call addRetargetingSegmentAsync(Integer networkId, Integer advertiserId, Integer retargetingSegmentId, String userKey, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call addRetargetingSegmentAsync(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull Integer advertiserId, @javax.annotation.Nonnull Integer retargetingSegmentId, @javax.annotation.Nonnull String userKey, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addRetargetingSegmentValidateBeforeCall(networkId, advertiserId, retargetingSegmentId, userKey, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
@@ -475,17 +539,31 @@ public okhttp3.Call addRetargetingSegmentAsync(Integer networkId, Integer advert
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call forgetCall(Integer networkId, String userKey, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call forgetCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, 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 = "/udb/{networkId}"
- .replaceAll("\\{" + "networkId" + "\\}", localVarApiClient.escapeString(networkId.toString()));
+ .replace("{" + "networkId" + "}", localVarApiClient.escapeString(networkId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -498,7 +576,6 @@ public okhttp3.Call forgetCall(Integer networkId, String userKey, final ApiCallb
}
final String[] localVarAccepts = {
-
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
@@ -506,31 +583,29 @@ public okhttp3.Call forgetCall(Integer networkId, String userKey, final ApiCallb
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { "ApiKeyAuth" };
- return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call forgetValidateBeforeCall(Integer networkId, String userKey, final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call forgetValidateBeforeCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'networkId' is set
if (networkId == null) {
throw new ApiException("Missing the required parameter 'networkId' when calling forget(Async)");
}
-
+
// verify the required parameter 'userKey' is set
if (userKey == null) {
throw new ApiException("Missing the required parameter 'userKey' when calling forget(Async)");
}
-
- okhttp3.Call localVarCall = forgetCall(networkId, userKey, _callback);
- return localVarCall;
+ return forgetCall(networkId, userKey, _callback);
}
@@ -541,12 +616,13 @@ private okhttp3.Call forgetValidateBeforeCall(Integer networkId, String userKey,
* @param userKey The User's UserDB Key (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public void forget(Integer networkId, String userKey) throws ApiException {
+ public void forget(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey) throws ApiException {
forgetWithHttpInfo(networkId, userKey);
}
@@ -558,12 +634,13 @@ public void forget(Integer networkId, String userKey) throws ApiException {
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public ApiResponse forgetWithHttpInfo(Integer networkId, String userKey) throws ApiException {
+ public ApiResponse forgetWithHttpInfo(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey) throws ApiException {
okhttp3.Call localVarCall = forgetValidateBeforeCall(networkId, userKey, null);
return localVarApiClient.execute(localVarCall);
}
@@ -577,12 +654,13 @@ public ApiResponse forgetWithHttpInfo(Integer networkId, String userKey) t
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call forgetAsync(Integer networkId, String userKey, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call forgetAsync(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = forgetValidateBeforeCall(networkId, userKey, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
@@ -596,17 +674,31 @@ public okhttp3.Call forgetAsync(Integer networkId, String userKey, final ApiCall
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call gdprConsentCall(Integer networkId, ConsentRequest consentRequest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call gdprConsentCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nullable ConsentRequest consentRequest, 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 = consentRequest;
// create path and map variables
String localVarPath = "/udb/{networkId}/consent"
- .replaceAll("\\{" + "networkId" + "\\}", localVarApiClient.escapeString(networkId.toString()));
+ .replace("{" + "networkId" + "}", localVarApiClient.escapeString(networkId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -626,23 +718,22 @@ public okhttp3.Call gdprConsentCall(Integer networkId, ConsentRequest consentReq
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { "ApiKeyAuth" };
- return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call gdprConsentValidateBeforeCall(Integer networkId, ConsentRequest consentRequest, final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call gdprConsentValidateBeforeCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nullable ConsentRequest consentRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'networkId' is set
if (networkId == null) {
throw new ApiException("Missing the required parameter 'networkId' when calling gdprConsent(Async)");
}
-
- okhttp3.Call localVarCall = gdprConsentCall(networkId, consentRequest, _callback);
- return localVarCall;
+ return gdprConsentCall(networkId, consentRequest, _callback);
}
@@ -654,12 +745,13 @@ private okhttp3.Call gdprConsentValidateBeforeCall(Integer networkId, ConsentReq
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public File gdprConsent(Integer networkId, ConsentRequest consentRequest) throws ApiException {
+ public File gdprConsent(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nullable ConsentRequest consentRequest) throws ApiException {
ApiResponse localVarResp = gdprConsentWithHttpInfo(networkId, consentRequest);
return localVarResp.getData();
}
@@ -672,12 +764,13 @@ public File gdprConsent(Integer networkId, ConsentRequest consentRequest) throws
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public ApiResponse gdprConsentWithHttpInfo(Integer networkId, ConsentRequest consentRequest) throws ApiException {
+ public ApiResponse gdprConsentWithHttpInfo(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nullable ConsentRequest consentRequest) throws ApiException {
okhttp3.Call localVarCall = gdprConsentValidateBeforeCall(networkId, consentRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
@@ -692,12 +785,13 @@ public ApiResponse gdprConsentWithHttpInfo(Integer networkId, ConsentReque
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call gdprConsentAsync(Integer networkId, ConsentRequest consentRequest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call gdprConsentAsync(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nullable ConsentRequest consentRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = gdprConsentValidateBeforeCall(networkId, consentRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
@@ -713,17 +807,31 @@ public okhttp3.Call gdprConsentAsync(Integer networkId, ConsentRequest consentRe
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
The updated UserDB record
-
*/
- public okhttp3.Call ipOverrideCall(Integer networkId, String userKey, String ip, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call ipOverrideCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String ip, 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 = "/udb/{networkId}/ip/i.gif"
- .replaceAll("\\{" + "networkId" + "\\}", localVarApiClient.escapeString(networkId.toString()));
+ .replace("{" + "networkId" + "}", localVarApiClient.escapeString(networkId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -748,36 +856,34 @@ public okhttp3.Call ipOverrideCall(Integer networkId, String userKey, String ip,
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { };
- return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call ipOverrideValidateBeforeCall(Integer networkId, String userKey, String ip, final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call ipOverrideValidateBeforeCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String ip, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'networkId' is set
if (networkId == null) {
throw new ApiException("Missing the required parameter 'networkId' when calling ipOverride(Async)");
}
-
+
// verify the required parameter 'userKey' is set
if (userKey == null) {
throw new ApiException("Missing the required parameter 'userKey' when calling ipOverride(Async)");
}
-
+
// verify the required parameter 'ip' is set
if (ip == null) {
throw new ApiException("Missing the required parameter 'ip' when calling ipOverride(Async)");
}
-
- okhttp3.Call localVarCall = ipOverrideCall(networkId, userKey, ip, _callback);
- return localVarCall;
+ return ipOverrideCall(networkId, userKey, ip, _callback);
}
@@ -790,12 +896,13 @@ private okhttp3.Call ipOverrideValidateBeforeCall(Integer networkId, String user
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
The updated UserDB record
-
*/
- public File ipOverride(Integer networkId, String userKey, String ip) throws ApiException {
+ public File ipOverride(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String ip) throws ApiException {
ApiResponse localVarResp = ipOverrideWithHttpInfo(networkId, userKey, ip);
return localVarResp.getData();
}
@@ -809,12 +916,13 @@ public File ipOverride(Integer networkId, String userKey, String ip) throws ApiE
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
The updated UserDB record
-
*/
- public ApiResponse ipOverrideWithHttpInfo(Integer networkId, String userKey, String ip) throws ApiException {
+ public ApiResponse ipOverrideWithHttpInfo(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String ip) throws ApiException {
okhttp3.Call localVarCall = ipOverrideValidateBeforeCall(networkId, userKey, ip, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
@@ -830,12 +938,13 @@ public ApiResponse ipOverrideWithHttpInfo(Integer networkId, String userKe
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
The updated UserDB record
-
*/
- public okhttp3.Call ipOverrideAsync(Integer networkId, String userKey, String ip, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call ipOverrideAsync(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull String ip, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = ipOverrideValidateBeforeCall(networkId, userKey, ip, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
@@ -852,17 +961,31 @@ public okhttp3.Call ipOverrideAsync(Integer networkId, String userKey, String ip
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call matchUserCall(Integer networkId, String userKey, Integer partnerId, Integer userId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call matchUserCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull Integer partnerId, @javax.annotation.Nonnull Integer userId, 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 = "/udb/{networkId}/sync/i.gif"
- .replaceAll("\\{" + "networkId" + "\\}", localVarApiClient.escapeString(networkId.toString()));
+ .replace("{" + "networkId" + "}", localVarApiClient.escapeString(networkId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -891,41 +1014,39 @@ public okhttp3.Call matchUserCall(Integer networkId, String userKey, Integer par
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { };
- return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call matchUserValidateBeforeCall(Integer networkId, String userKey, Integer partnerId, Integer userId, final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call matchUserValidateBeforeCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull Integer partnerId, @javax.annotation.Nonnull Integer userId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'networkId' is set
if (networkId == null) {
throw new ApiException("Missing the required parameter 'networkId' when calling matchUser(Async)");
}
-
+
// verify the required parameter 'userKey' is set
if (userKey == null) {
throw new ApiException("Missing the required parameter 'userKey' when calling matchUser(Async)");
}
-
+
// verify the required parameter 'partnerId' is set
if (partnerId == null) {
throw new ApiException("Missing the required parameter 'partnerId' when calling matchUser(Async)");
}
-
+
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException("Missing the required parameter 'userId' when calling matchUser(Async)");
}
-
- okhttp3.Call localVarCall = matchUserCall(networkId, userKey, partnerId, userId, _callback);
- return localVarCall;
+ return matchUserCall(networkId, userKey, partnerId, userId, _callback);
}
@@ -939,12 +1060,13 @@ private okhttp3.Call matchUserValidateBeforeCall(Integer networkId, String userK
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public File matchUser(Integer networkId, String userKey, Integer partnerId, Integer userId) throws ApiException {
+ public File matchUser(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull Integer partnerId, @javax.annotation.Nonnull Integer userId) throws ApiException {
ApiResponse localVarResp = matchUserWithHttpInfo(networkId, userKey, partnerId, userId);
return localVarResp.getData();
}
@@ -959,12 +1081,13 @@ public File matchUser(Integer networkId, String userKey, Integer partnerId, Inte
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public ApiResponse matchUserWithHttpInfo(Integer networkId, String userKey, Integer partnerId, Integer userId) throws ApiException {
+ public ApiResponse matchUserWithHttpInfo(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull Integer partnerId, @javax.annotation.Nonnull Integer userId) throws ApiException {
okhttp3.Call localVarCall = matchUserValidateBeforeCall(networkId, userKey, partnerId, userId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
@@ -981,12 +1104,13 @@ public ApiResponse matchUserWithHttpInfo(Integer networkId, String userKey
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Success
-
*/
- public okhttp3.Call matchUserAsync(Integer networkId, String userKey, Integer partnerId, Integer userId, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call matchUserAsync(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, @javax.annotation.Nonnull Integer partnerId, @javax.annotation.Nonnull Integer userId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = matchUserValidateBeforeCall(networkId, userKey, partnerId, userId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
@@ -1001,17 +1125,31 @@ public okhttp3.Call matchUserAsync(Integer networkId, String userKey, Integer pa
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Sucess
-
*/
- public okhttp3.Call optOutCall(Integer networkId, String userKey, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call optOutCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, 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 = "/udb/{networkId}/optout/i.gif"
- .replaceAll("\\{" + "networkId" + "\\}", localVarApiClient.escapeString(networkId.toString()));
+ .replace("{" + "networkId" + "}", localVarApiClient.escapeString(networkId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1032,31 +1170,29 @@ public okhttp3.Call optOutCall(Integer networkId, String userKey, final ApiCallb
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { };
- return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call optOutValidateBeforeCall(Integer networkId, String userKey, final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call optOutValidateBeforeCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'networkId' is set
if (networkId == null) {
throw new ApiException("Missing the required parameter 'networkId' when calling optOut(Async)");
}
-
+
// verify the required parameter 'userKey' is set
if (userKey == null) {
throw new ApiException("Missing the required parameter 'userKey' when calling optOut(Async)");
}
-
- okhttp3.Call localVarCall = optOutCall(networkId, userKey, _callback);
- return localVarCall;
+ return optOutCall(networkId, userKey, _callback);
}
@@ -1068,12 +1204,13 @@ private okhttp3.Call optOutValidateBeforeCall(Integer networkId, String userKey,
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Sucess
-
*/
- public File optOut(Integer networkId, String userKey) throws ApiException {
+ public File optOut(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey) throws ApiException {
ApiResponse localVarResp = optOutWithHttpInfo(networkId, userKey);
return localVarResp.getData();
}
@@ -1086,12 +1223,13 @@ public File optOut(Integer networkId, String userKey) throws ApiException {
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Sucess
-
*/
- public ApiResponse optOutWithHttpInfo(Integer networkId, String userKey) throws ApiException {
+ public ApiResponse optOutWithHttpInfo(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey) throws ApiException {
okhttp3.Call localVarCall = optOutValidateBeforeCall(networkId, userKey, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
@@ -1106,12 +1244,13 @@ public ApiResponse optOutWithHttpInfo(Integer networkId, String userKey) t
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
Sucess
-
*/
- public okhttp3.Call optOutAsync(Integer networkId, String userKey, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call optOutAsync(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = optOutValidateBeforeCall(networkId, userKey, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
@@ -1126,17 +1265,31 @@ public okhttp3.Call optOutAsync(Integer networkId, String userKey, final ApiCall
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
-
+
+
Response Details
Status Code
Description
Response Headers
200
The UserDB record
-
*/
- public okhttp3.Call readCall(Integer networkId, String userKey, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call readCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, 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 = "/udb/{networkId}/read"
- .replaceAll("\\{" + "networkId" + "\\}", localVarApiClient.escapeString(networkId.toString()));
+ .replace("{" + "networkId" + "}", localVarApiClient.escapeString(networkId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1157,31 +1310,29 @@ public okhttp3.Call readCall(Integer networkId, String userKey, final ApiCallbac
}
final String[] localVarContentTypes = {
-
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
String[] localVarAuthNames = new String[] { };
- return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call readValidateBeforeCall(Integer networkId, String userKey, final ApiCallback _callback) throws ApiException {
-
+ private okhttp3.Call readValidateBeforeCall(@javax.annotation.Nonnull Integer networkId, @javax.annotation.Nonnull String userKey, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'networkId' is set
if (networkId == null) {
throw new ApiException("Missing the required parameter 'networkId' when calling read(Async)");
}
-
+
// verify the required parameter 'userKey' is set
if (userKey == null) {
throw new ApiException("Missing the required parameter 'userKey' when calling read(Async)");
}
-
- okhttp3.Call localVarCall = readCall(networkId, userKey, _callback);
- return localVarCall;
+ return readCall(networkId, userKey, _callback);
}
@@ -1193,12 +1344,13 @@ private okhttp3.Call readValidateBeforeCall(Integer networkId, String userKey, f
* @return Object
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
-