Java tutorial
/** * RackHD 2.0 * * * OpenAPI spec version: 0.0.1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.swagger.client.api; import io.swagger.client.ApiCallback; import io.swagger.client.ApiClient; import io.swagger.client.ApiException; import io.swagger.client.ApiResponse; import io.swagger.client.Configuration; import io.swagger.client.Pair; import io.swagger.client.ProgressRequestBody; import io.swagger.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; import io.swagger.client.model.Error; import io.swagger.client.model.UserObj; import io.swagger.client.model.VersionsResponse; import io.swagger.client.model.ErrorResponse; import io.swagger.client.model.GenericObj; import java.io.File; import io.swagger.client.model.Action; import io.swagger.client.model.Lease; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class ApiApi { private ApiClient apiClient; public ApiApi() { this(Configuration.getDefaultApiClient()); } public ApiApi(ApiClient apiClient) { this.apiClient = apiClient; } public ApiClient getApiClient() { return apiClient; } public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } /* Build call for addUser */ private com.squareup.okhttp.Call addUserCall(UserObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling addUser(Async)"); } // create path and map variables String localVarPath = "/users".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Add a new user * Add a new user * @param body User information (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object addUser(UserObj body) throws ApiException { ApiResponse<Object> resp = addUserWithHttpInfo(body); return resp.getData(); } /** * Add a new user * Add a new user * @param body User information (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> addUserWithHttpInfo(UserObj body) throws ApiException { com.squareup.okhttp.Call call = addUserCall(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Add a new user (asynchronously) * Add a new user * @param body User information (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call addUserAsync(UserObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = addUserCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for catalogsGet */ private com.squareup.okhttp.Call catalogsGetCall(String query, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/catalogs".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (query != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of all catalogs * The catalogs endpoint returns json data that represent the catalogs of all hardware in the system. * @param query query object to pass through to waterline. (optional) * @return VersionsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public VersionsResponse catalogsGet(String query) throws ApiException { ApiResponse<VersionsResponse> resp = catalogsGetWithHttpInfo(query); return resp.getData(); } /** * get list of all catalogs * The catalogs endpoint returns json data that represent the catalogs of all hardware in the system. * @param query query object to pass through to waterline. (optional) * @return ApiResponse<VersionsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<VersionsResponse> catalogsGetWithHttpInfo(String query) throws ApiException { com.squareup.okhttp.Call call = catalogsGetCall(query, null, null); Type localVarReturnType = new TypeToken<VersionsResponse>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of all catalogs (asynchronously) * The catalogs endpoint returns json data that represent the catalogs of all hardware in the system. * @param query query object to pass through to waterline. (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call catalogsGetAsync(String query, final ApiCallback<VersionsResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = catalogsGetCall(query, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<VersionsResponse>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for catalogsIdGet */ private com.squareup.okhttp.Call catalogsIdGetCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling catalogsIdGet(Async)"); } // create path and map variables String localVarPath = "/catalogs/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of all catalogs * The catalogs endpoint returns json data that represent the catalogs of all hardware in the system. * @param identifier identifier of a catalog (required) * @return VersionsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public VersionsResponse catalogsIdGet(String identifier) throws ApiException { ApiResponse<VersionsResponse> resp = catalogsIdGetWithHttpInfo(identifier); return resp.getData(); } /** * get list of all catalogs * The catalogs endpoint returns json data that represent the catalogs of all hardware in the system. * @param identifier identifier of a catalog (required) * @return ApiResponse<VersionsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<VersionsResponse> catalogsIdGetWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = catalogsIdGetCall(identifier, null, null); Type localVarReturnType = new TypeToken<VersionsResponse>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of all catalogs (asynchronously) * The catalogs endpoint returns json data that represent the catalogs of all hardware in the system. * @param identifier identifier of a catalog (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call catalogsIdGetAsync(String identifier, final ApiCallback<VersionsResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = catalogsIdGetCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<VersionsResponse>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for configGet */ private com.squareup.okhttp.Call configGetCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/config".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get server configuration * Get server configuration. * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object configGet() throws ApiException { ApiResponse<Object> resp = configGetWithHttpInfo(); return resp.getData(); } /** * get server configuration * Get server configuration. * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> configGetWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = configGetCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get server configuration (asynchronously) * Get server configuration. * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call configGetAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = configGetCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for configPatch */ private com.squareup.okhttp.Call configPatchCall(GenericObj config, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = config; // verify the required parameter 'config' is set if (config == null) { throw new ApiException("Missing the required parameter 'config' when calling configPatch(Async)"); } // create path and map variables String localVarPath = "/config".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * patch/update server configuration * Patch/update server configuration and then return the patched configuration. * @param config Updated config fields (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object configPatch(GenericObj config) throws ApiException { ApiResponse<Object> resp = configPatchWithHttpInfo(config); return resp.getData(); } /** * patch/update server configuration * Patch/update server configuration and then return the patched configuration. * @param config Updated config fields (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> configPatchWithHttpInfo(GenericObj config) throws ApiException { com.squareup.okhttp.Call call = configPatchCall(config, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * patch/update server configuration (asynchronously) * Patch/update server configuration and then return the patched configuration. * @param config Updated config fields (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call configPatchAsync(GenericObj config, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = configPatchCall(config, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for createTag */ private com.squareup.okhttp.Call createTagCall(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createTag(Async)"); } // create path and map variables String localVarPath = "/tags".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Create a new tag * Create a new tag * @param body tag creation options (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object createTag(GenericObj body) throws ApiException { ApiResponse<Object> resp = createTagWithHttpInfo(body); return resp.getData(); } /** * Create a new tag * Create a new tag * @param body tag creation options (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> createTagWithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = createTagCall(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Create a new tag (asynchronously) * Create a new tag * @param body tag creation options (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call createTagAsync(GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = createTagCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for deleteTag */ private com.squareup.okhttp.Call deleteTagCall(String tagName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'tagName' is set if (tagName == null) { throw new ApiException("Missing the required parameter 'tagName' when calling deleteTag(Async)"); } // create path and map variables String localVarPath = "/tags/{tagName}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tagName" + "\\}", apiClient.escapeString(tagName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete the specified tag * Delete the specified tag * @param tagName The tag identifier (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object deleteTag(String tagName) throws ApiException { ApiResponse<Object> resp = deleteTagWithHttpInfo(tagName); return resp.getData(); } /** * Delete the specified tag * Delete the specified tag * @param tagName The tag identifier (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> deleteTagWithHttpInfo(String tagName) throws ApiException { com.squareup.okhttp.Call call = deleteTagCall(tagName, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Delete the specified tag (asynchronously) * Delete the specified tag * @param tagName The tag identifier (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call deleteTagAsync(String tagName, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = deleteTagCall(tagName, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for filesDelete */ private com.squareup.okhttp.Call filesDeleteCall(String fileidentifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'fileidentifier' is set if (fileidentifier == null) { throw new ApiException( "Missing the required parameter 'fileidentifier' when calling filesDelete(Async)"); } // create path and map variables String localVarPath = "/files/{fileidentifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "fileidentifier" + "\\}", apiClient.escapeString(fileidentifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * delete file based on uuid * Delete a file based on uuid. * @param fileidentifier UUID of the file you wish to delete (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void filesDelete(String fileidentifier) throws ApiException { filesDeleteWithHttpInfo(fileidentifier); } /** * delete file based on uuid * Delete a file based on uuid. * @param fileidentifier UUID of the file you wish to delete (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> filesDeleteWithHttpInfo(String fileidentifier) throws ApiException { com.squareup.okhttp.Call call = filesDeleteCall(fileidentifier, null, null); return apiClient.execute(call); } /** * delete file based on uuid (asynchronously) * Delete a file based on uuid. * @param fileidentifier UUID of the file you wish to delete (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call filesDeleteAsync(String fileidentifier, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = filesDeleteCall(fileidentifier, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for filesGet */ private com.squareup.okhttp.Call filesGetCall(String fileidentifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'fileidentifier' is set if (fileidentifier == null) { throw new ApiException("Missing the required parameter 'fileidentifier' when calling filesGet(Async)"); } // create path and map variables String localVarPath = "/files/{fileidentifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "fileidentifier" + "\\}", apiClient.escapeString(fileidentifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get file based on uuid or file name * Get file based on uuid or file name. * @param fileidentifier uuid or file name of a file as provided when you originally stored it. (required) * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public File filesGet(String fileidentifier) throws ApiException { ApiResponse<File> resp = filesGetWithHttpInfo(fileidentifier); return resp.getData(); } /** * get file based on uuid or file name * Get file based on uuid or file name. * @param fileidentifier uuid or file name of a file as provided when you originally stored it. (required) * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<File> filesGetWithHttpInfo(String fileidentifier) throws ApiException { com.squareup.okhttp.Call call = filesGetCall(fileidentifier, null, null); Type localVarReturnType = new TypeToken<File>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get file based on uuid or file name (asynchronously) * Get file based on uuid or file name. * @param fileidentifier uuid or file name of a file as provided when you originally stored it. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call filesGetAsync(String fileidentifier, final ApiCallback<File> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = filesGetCall(fileidentifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<File>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for filesGetAll */ private com.squareup.okhttp.Call filesGetAllCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/files".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get all available files * Get all available files * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object filesGetAll() throws ApiException { ApiResponse<Object> resp = filesGetAllWithHttpInfo(); return resp.getData(); } /** * get all available files * Get all available files * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> filesGetAllWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = filesGetAllCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get all available files (asynchronously) * Get all available files * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call filesGetAllAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = filesGetAllCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for filesMd5Get */ private com.squareup.okhttp.Call filesMd5GetCall(String filename, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'filename' is set if (filename == null) { throw new ApiException("Missing the required parameter 'filename' when calling filesMd5Get(Async)"); } // create path and map variables String localVarPath = "/files/{filename}/md5".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "filename" + "\\}", apiClient.escapeString(filename.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get md5sum based on file name * Get md5sum based on file name. * @param filename File name of a file as provided when you originally stored it. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object filesMd5Get(String filename) throws ApiException { ApiResponse<Object> resp = filesMd5GetWithHttpInfo(filename); return resp.getData(); } /** * get md5sum based on file name * Get md5sum based on file name. * @param filename File name of a file as provided when you originally stored it. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> filesMd5GetWithHttpInfo(String filename) throws ApiException { com.squareup.okhttp.Call call = filesMd5GetCall(filename, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get md5sum based on file name (asynchronously) * Get md5sum based on file name. * @param filename File name of a file as provided when you originally stored it. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call filesMd5GetAsync(String filename, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = filesMd5GetCall(filename, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for filesMetadataGet */ private com.squareup.okhttp.Call filesMetadataGetCall(String filename, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'filename' is set if (filename == null) { throw new ApiException( "Missing the required parameter 'filename' when calling filesMetadataGet(Async)"); } // create path and map variables String localVarPath = "/files/{filename}/metadata".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "filename" + "\\}", apiClient.escapeString(filename.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get file metadata by file name * Get file metadata by file name * @param filename name of a file as provided when you originally stored it. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object filesMetadataGet(String filename) throws ApiException { ApiResponse<Object> resp = filesMetadataGetWithHttpInfo(filename); return resp.getData(); } /** * get file metadata by file name * Get file metadata by file name * @param filename name of a file as provided when you originally stored it. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> filesMetadataGetWithHttpInfo(String filename) throws ApiException { com.squareup.okhttp.Call call = filesMetadataGetCall(filename, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get file metadata by file name (asynchronously) * Get file metadata by file name * @param filename name of a file as provided when you originally stored it. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call filesMetadataGetAsync(String filename, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = filesMetadataGetCall(filename, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for filesPut */ private com.squareup.okhttp.Call filesPutCall(String fileidentifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'fileidentifier' is set if (fileidentifier == null) { throw new ApiException("Missing the required parameter 'fileidentifier' when calling filesPut(Async)"); } // create path and map variables String localVarPath = "/files/{fileidentifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "fileidentifier" + "\\}", apiClient.escapeString(fileidentifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/octet-stream", "application/x-www-form-urlencoded" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * put file based on filename * Put file based on filename, returns the uuid of the stored file. * @param fileidentifier filename of the file you want to store (required) * @return String * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public String filesPut(String fileidentifier) throws ApiException { ApiResponse<String> resp = filesPutWithHttpInfo(fileidentifier); return resp.getData(); } /** * put file based on filename * Put file based on filename, returns the uuid of the stored file. * @param fileidentifier filename of the file you want to store (required) * @return ApiResponse<String> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<String> filesPutWithHttpInfo(String fileidentifier) throws ApiException { com.squareup.okhttp.Call call = filesPutCall(fileidentifier, null, null); Type localVarReturnType = new TypeToken<String>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * put file based on filename (asynchronously) * Put file based on filename, returns the uuid of the stored file. * @param fileidentifier filename of the file you want to store (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call filesPutAsync(String fileidentifier, final ApiCallback<String> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = filesPutCall(fileidentifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<String>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for getAllTags */ private com.squareup.okhttp.Call getAllTagsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/tags".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Retrieve information about all tags * Retrieve information about all tags * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Object> getAllTags() throws ApiException { ApiResponse<List<Object>> resp = getAllTagsWithHttpInfo(); return resp.getData(); } /** * Retrieve information about all tags * Retrieve information about all tags * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Object>> getAllTagsWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = getAllTagsCall(null, null); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Retrieve information about all tags (asynchronously) * Retrieve information about all tags * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call getAllTagsAsync(final ApiCallback<List<Object>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = getAllTagsCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for getBootstrap */ private com.squareup.okhttp.Call getBootstrapCall(String macAddress, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/tasks/bootstrap.js".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (macAddress != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "macAddress", macAddress)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get tasks bootstrap.js * used internally by the system - get tasks bootstrap.js * @param macAddress query object to pass through to waterline. (optional) * @return VersionsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public VersionsResponse getBootstrap(String macAddress) throws ApiException { ApiResponse<VersionsResponse> resp = getBootstrapWithHttpInfo(macAddress); return resp.getData(); } /** * get tasks bootstrap.js * used internally by the system - get tasks bootstrap.js * @param macAddress query object to pass through to waterline. (optional) * @return ApiResponse<VersionsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<VersionsResponse> getBootstrapWithHttpInfo(String macAddress) throws ApiException { com.squareup.okhttp.Call call = getBootstrapCall(macAddress, null, null); Type localVarReturnType = new TypeToken<VersionsResponse>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get tasks bootstrap.js (asynchronously) * used internally by the system - get tasks bootstrap.js * @param macAddress query object to pass through to waterline. (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call getBootstrapAsync(String macAddress, final ApiCallback<VersionsResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = getBootstrapCall(macAddress, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<VersionsResponse>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for getNodesByTag */ private com.squareup.okhttp.Call getNodesByTagCall(String tagName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'tagName' is set if (tagName == null) { throw new ApiException("Missing the required parameter 'tagName' when calling getNodesByTag(Async)"); } // create path and map variables String localVarPath = "/tags/{tagName}/nodes".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tagName" + "\\}", apiClient.escapeString(tagName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Retrieve nodes with the specified tag * Retrieve nodes with the specified tag * @param tagName The tag identifier (required) * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Object> getNodesByTag(String tagName) throws ApiException { ApiResponse<List<Object>> resp = getNodesByTagWithHttpInfo(tagName); return resp.getData(); } /** * Retrieve nodes with the specified tag * Retrieve nodes with the specified tag * @param tagName The tag identifier (required) * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Object>> getNodesByTagWithHttpInfo(String tagName) throws ApiException { com.squareup.okhttp.Call call = getNodesByTagCall(tagName, null, null); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Retrieve nodes with the specified tag (asynchronously) * Retrieve nodes with the specified tag * @param tagName The tag identifier (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call getNodesByTagAsync(String tagName, final ApiCallback<List<Object>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = getNodesByTagCall(tagName, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for getTag */ private com.squareup.okhttp.Call getTagCall(String tagName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'tagName' is set if (tagName == null) { throw new ApiException("Missing the required parameter 'tagName' when calling getTag(Async)"); } // create path and map variables String localVarPath = "/tags/{tagName}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tagName" + "\\}", apiClient.escapeString(tagName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Retrieve information about the tag * Retrieve information about the tag * @param tagName The tag identifier (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object getTag(String tagName) throws ApiException { ApiResponse<Object> resp = getTagWithHttpInfo(tagName); return resp.getData(); } /** * Retrieve information about the tag * Retrieve information about the tag * @param tagName The tag identifier (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> getTagWithHttpInfo(String tagName) throws ApiException { com.squareup.okhttp.Call call = getTagCall(tagName, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Retrieve information about the tag (asynchronously) * Retrieve information about the tag * @param tagName The tag identifier (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call getTagAsync(String tagName, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = getTagCall(tagName, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for getTasksById */ private com.squareup.okhttp.Call getTasksByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling getTasksById(Async)"); } // create path and map variables String localVarPath = "/tasks/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get specific task * get specific task * @param identifier task identifier (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object getTasksById(String identifier) throws ApiException { ApiResponse<Object> resp = getTasksByIdWithHttpInfo(identifier); return resp.getData(); } /** * get specific task * get specific task * @param identifier task identifier (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> getTasksByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = getTasksByIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get specific task (asynchronously) * get specific task * @param identifier task identifier (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call getTasksByIdAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = getTasksByIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for getUser */ private com.squareup.okhttp.Call getUserCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getUser(Async)"); } // create path and map variables String localVarPath = "/users/{name}".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get information about a user * Get information about a user * @param name username (required) * @return UserObj * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public UserObj getUser(String name) throws ApiException { ApiResponse<UserObj> resp = getUserWithHttpInfo(name); return resp.getData(); } /** * Get information about a user * Get information about a user * @param name username (required) * @return ApiResponse<UserObj> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<UserObj> getUserWithHttpInfo(String name) throws ApiException { com.squareup.okhttp.Call call = getUserCall(name, null, null); Type localVarReturnType = new TypeToken<UserObj>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get information about a user (asynchronously) * Get information about a user * @param name username (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call getUserAsync(String name, final ApiCallback<UserObj> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = getUserCall(name, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<UserObj>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for listUsers */ private com.squareup.okhttp.Call listUsersCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/users".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Retrieve a list of users * Retrieve a list of users * @return List<UserObj> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<UserObj> listUsers() throws ApiException { ApiResponse<List<UserObj>> resp = listUsersWithHttpInfo(); return resp.getData(); } /** * Retrieve a list of users * Retrieve a list of users * @return ApiResponse<List<UserObj>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<UserObj>> listUsersWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = listUsersCall(null, null); Type localVarReturnType = new TypeToken<List<UserObj>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Retrieve a list of users (asynchronously) * Retrieve a list of users * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call listUsersAsync(final ApiCallback<List<UserObj>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = listUsersCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<UserObj>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for lookupsDelById */ private com.squareup.okhttp.Call lookupsDelByIdCall(String id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling lookupsDelById(Async)"); } // create path and map variables String localVarPath = "/lookups/{id}".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete specified lookup details. * Delete specified lookup details. * @param id id of the lookup record to delete (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void lookupsDelById(String id) throws ApiException { lookupsDelByIdWithHttpInfo(id); } /** * Delete specified lookup details. * Delete specified lookup details. * @param id id of the lookup record to delete (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> lookupsDelByIdWithHttpInfo(String id) throws ApiException { com.squareup.okhttp.Call call = lookupsDelByIdCall(id, null, null); return apiClient.execute(call); } /** * Delete specified lookup details. (asynchronously) * Delete specified lookup details. * @param id id of the lookup record to delete (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call lookupsDelByIdAsync(String id, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = lookupsDelByIdCall(id, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for lookupsGet */ private com.squareup.okhttp.Call lookupsGetCall(String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/lookups".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (q != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "q", q)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * find all * find all * @param q query object to pass through to waterline. (optional) * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Object> lookupsGet(String q) throws ApiException { ApiResponse<List<Object>> resp = lookupsGetWithHttpInfo(q); return resp.getData(); } /** * find all * find all * @param q query object to pass through to waterline. (optional) * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Object>> lookupsGetWithHttpInfo(String q) throws ApiException { com.squareup.okhttp.Call call = lookupsGetCall(q, null, null); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * find all (asynchronously) * find all * @param q query object to pass through to waterline. (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call lookupsGetAsync(String q, final ApiCallback<List<Object>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = lookupsGetCall(q, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for lookupsGetById */ private com.squareup.okhttp.Call lookupsGetByIdCall(String id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling lookupsGetById(Async)"); } // create path and map variables String localVarPath = "/lookups/{id}".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * lookup id * lookup id * @param id id of thing to lookup (required) * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Object> lookupsGetById(String id) throws ApiException { ApiResponse<List<Object>> resp = lookupsGetByIdWithHttpInfo(id); return resp.getData(); } /** * lookup id * lookup id * @param id id of thing to lookup (required) * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Object>> lookupsGetByIdWithHttpInfo(String id) throws ApiException { com.squareup.okhttp.Call call = lookupsGetByIdCall(id, null, null); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * lookup id (asynchronously) * lookup id * @param id id of thing to lookup (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call lookupsGetByIdAsync(String id, final ApiCallback<List<Object>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = lookupsGetByIdCall(id, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for lookupsPatchById */ private com.squareup.okhttp.Call lookupsPatchByIdCall(String id, GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling lookupsPatchById(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling lookupsPatchById(Async)"); } // create path and map variables String localVarPath = "/lookups/{id}".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Patch specified lookup record * Patch specified lookup record * @param id id of the lookup record to patch. (required) * @param body object patches to apply. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object lookupsPatchById(String id, GenericObj body) throws ApiException { ApiResponse<Object> resp = lookupsPatchByIdWithHttpInfo(id, body); return resp.getData(); } /** * Patch specified lookup record * Patch specified lookup record * @param id id of the lookup record to patch. (required) * @param body object patches to apply. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> lookupsPatchByIdWithHttpInfo(String id, GenericObj body) throws ApiException { com.squareup.okhttp.Call call = lookupsPatchByIdCall(id, body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Patch specified lookup record (asynchronously) * Patch specified lookup record * @param id id of the lookup record to patch. (required) * @param body object patches to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call lookupsPatchByIdAsync(String id, GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = lookupsPatchByIdCall(id, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for lookupsPost */ private com.squareup.okhttp.Call lookupsPostCall(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling lookupsPost(Async)"); } // create path and map variables String localVarPath = "/lookups".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * find all * put all * @param body lookup record to create (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object lookupsPost(GenericObj body) throws ApiException { ApiResponse<Object> resp = lookupsPostWithHttpInfo(body); return resp.getData(); } /** * find all * put all * @param body lookup record to create (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> lookupsPostWithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = lookupsPostCall(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * find all (asynchronously) * put all * @param body lookup record to create (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call lookupsPostAsync(GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = lookupsPostCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for modifyUser */ private com.squareup.okhttp.Call modifyUserCall(String name, UserObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling modifyUser(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling modifyUser(Async)"); } // create path and map variables String localVarPath = "/users/{name}".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Update properties on a user * Update properties on a user * @param name username (required) * @param body User information (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object modifyUser(String name, UserObj body) throws ApiException { ApiResponse<Object> resp = modifyUserWithHttpInfo(name, body); return resp.getData(); } /** * Update properties on a user * Update properties on a user * @param name username (required) * @param body User information (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> modifyUserWithHttpInfo(String name, UserObj body) throws ApiException { com.squareup.okhttp.Call call = modifyUserCall(name, body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Update properties on a user (asynchronously) * Update properties on a user * @param name username (required) * @param body User information (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call modifyUserAsync(String name, UserObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = modifyUserCall(name, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesDelById */ private com.squareup.okhttp.Call nodesDelByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling nodesDelById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete specified node. * Delete specified node. * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void nodesDelById(String identifier) throws ApiException { nodesDelByIdWithHttpInfo(identifier); } /** * Delete specified node. * Delete specified node. * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> nodesDelByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = nodesDelByIdCall(identifier, null, null); return apiClient.execute(call); } /** * Delete specified node. (asynchronously) * Delete specified node. * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesDelByIdAsync(String identifier, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesDelByIdCall(identifier, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for nodesDelTagById */ private com.squareup.okhttp.Call nodesDelTagByIdCall(String identifier, String tagName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesDelTagById(Async)"); } // verify the required parameter 'tagName' is set if (tagName == null) { throw new ApiException("Missing the required parameter 'tagName' when calling nodesDelTagById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/tags/{tagName}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())) .replaceAll("\\{" + "tagName" + "\\}", apiClient.escapeString(tagName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete a tag from the specified node. * Delete a tag from the specified node. * @param identifier Mac addresses or unique aliases to identify the node by (required) * @param tagName The name of the tag (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void nodesDelTagById(String identifier, String tagName) throws ApiException { nodesDelTagByIdWithHttpInfo(identifier, tagName); } /** * Delete a tag from the specified node. * Delete a tag from the specified node. * @param identifier Mac addresses or unique aliases to identify the node by (required) * @param tagName The name of the tag (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> nodesDelTagByIdWithHttpInfo(String identifier, String tagName) throws ApiException { com.squareup.okhttp.Call call = nodesDelTagByIdCall(identifier, tagName, null, null); return apiClient.execute(call); } /** * Delete a tag from the specified node. (asynchronously) * Delete a tag from the specified node. * @param identifier Mac addresses or unique aliases to identify the node by (required) * @param tagName The name of the tag (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesDelTagByIdAsync(String identifier, String tagName, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesDelTagByIdCall(identifier, tagName, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for nodesGetAll */ private com.squareup.okhttp.Call nodesGetAllCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/nodes".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * List of all nodes or if there are none an empty object * List of all nodes or if there are none an empty object * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Object> nodesGetAll() throws ApiException { ApiResponse<List<Object>> resp = nodesGetAllWithHttpInfo(); return resp.getData(); } /** * List of all nodes or if there are none an empty object * List of all nodes or if there are none an empty object * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Object>> nodesGetAllWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = nodesGetAllCall(null, null); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * List of all nodes or if there are none an empty object (asynchronously) * List of all nodes or if there are none an empty object * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesGetAllAsync(final ApiCallback<List<Object>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesGetAllCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesGetById */ private com.squareup.okhttp.Call nodesGetByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling nodesGetById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * List of all nodes or if there are none an empty object * List of all nodes or if there are none an empty object * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Object> nodesGetById(String identifier) throws ApiException { ApiResponse<List<Object>> resp = nodesGetByIdWithHttpInfo(identifier); return resp.getData(); } /** * List of all nodes or if there are none an empty object * List of all nodes or if there are none an empty object * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Object>> nodesGetByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = nodesGetByIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * List of all nodes or if there are none an empty object (asynchronously) * List of all nodes or if there are none an empty object * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesGetByIdAsync(String identifier, final ApiCallback<List<Object>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesGetByIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesGetCatalogById */ private com.squareup.okhttp.Call nodesGetCatalogByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesGetCatalogById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/catalogs".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Fetch catalog of specified node * Fetch catalog of specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesGetCatalogById(String identifier) throws ApiException { ApiResponse<Object> resp = nodesGetCatalogByIdWithHttpInfo(identifier); return resp.getData(); } /** * Fetch catalog of specified node * Fetch catalog of specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesGetCatalogByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = nodesGetCatalogByIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Fetch catalog of specified node (asynchronously) * Fetch catalog of specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesGetCatalogByIdAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesGetCatalogByIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesGetCatalogSourceById */ private com.squareup.okhttp.Call nodesGetCatalogSourceByIdCall(String identifier, String source, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesGetCatalogSourceById(Async)"); } // verify the required parameter 'source' is set if (source == null) { throw new ApiException( "Missing the required parameter 'source' when calling nodesGetCatalogSourceById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/catalogs/{source}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())) .replaceAll("\\{" + "source" + "\\}", apiClient.escapeString(source.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Fetch catalog of specified node for given source * Fetch catalog of specified node for given source * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param source Source catalog name to fetch (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesGetCatalogSourceById(String identifier, String source) throws ApiException { ApiResponse<Object> resp = nodesGetCatalogSourceByIdWithHttpInfo(identifier, source); return resp.getData(); } /** * Fetch catalog of specified node for given source * Fetch catalog of specified node for given source * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param source Source catalog name to fetch (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesGetCatalogSourceByIdWithHttpInfo(String identifier, String source) throws ApiException { com.squareup.okhttp.Call call = nodesGetCatalogSourceByIdCall(identifier, source, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Fetch catalog of specified node for given source (asynchronously) * Fetch catalog of specified node for given source * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param source Source catalog name to fetch (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesGetCatalogSourceByIdAsync(String identifier, String source, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesGetCatalogSourceByIdCall(identifier, source, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesGetPollersById */ private com.squareup.okhttp.Call nodesGetPollersByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesGetPollersById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/pollers".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Fetch all pollers for specified node * Fetch all pollers for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesGetPollersById(String identifier) throws ApiException { ApiResponse<Object> resp = nodesGetPollersByIdWithHttpInfo(identifier); return resp.getData(); } /** * Fetch all pollers for specified node * Fetch all pollers for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesGetPollersByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = nodesGetPollersByIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Fetch all pollers for specified node (asynchronously) * Fetch all pollers for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesGetPollersByIdAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesGetPollersByIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesGetSshById */ private com.squareup.okhttp.Call nodesGetSshByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesGetSshById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/ssh".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get the ssh settings associated with a node. * get the ssh settings associated with a node. * @param identifier node id value (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesGetSshById(String identifier) throws ApiException { ApiResponse<Object> resp = nodesGetSshByIdWithHttpInfo(identifier); return resp.getData(); } /** * get the ssh settings associated with a node. * get the ssh settings associated with a node. * @param identifier node id value (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesGetSshByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = nodesGetSshByIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get the ssh settings associated with a node. (asynchronously) * get the ssh settings associated with a node. * @param identifier node id value (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesGetSshByIdAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesGetSshByIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesGetTagsById */ private com.squareup.okhttp.Call nodesGetTagsByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesGetTagsById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/tags".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * List of all tags on the node or an empty object if there are none * List of all tags on the node or an empty object if there are none * @param identifier Mac addresses or unique aliases to identify the node by (required) * @return List<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Object> nodesGetTagsById(String identifier) throws ApiException { ApiResponse<List<Object>> resp = nodesGetTagsByIdWithHttpInfo(identifier); return resp.getData(); } /** * List of all tags on the node or an empty object if there are none * List of all tags on the node or an empty object if there are none * @param identifier Mac addresses or unique aliases to identify the node by (required) * @return ApiResponse<List<Object>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Object>> nodesGetTagsByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = nodesGetTagsByIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * List of all tags on the node or an empty object if there are none (asynchronously) * List of all tags on the node or an empty object if there are none * @param identifier Mac addresses or unique aliases to identify the node by (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesGetTagsByIdAsync(String identifier, final ApiCallback<List<Object>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesGetTagsByIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Object>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesGetWorkflowById */ private com.squareup.okhttp.Call nodesGetWorkflowByIdCall(String identifier, Boolean active, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesGetWorkflowById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/workflows".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (active != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "active", active)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Fetch all workflows for specified node * Fetch all workflows for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param active Filter active workflows (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesGetWorkflowById(String identifier, Boolean active) throws ApiException { ApiResponse<Object> resp = nodesGetWorkflowByIdWithHttpInfo(identifier, active); return resp.getData(); } /** * Fetch all workflows for specified node * Fetch all workflows for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param active Filter active workflows (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesGetWorkflowByIdWithHttpInfo(String identifier, Boolean active) throws ApiException { com.squareup.okhttp.Call call = nodesGetWorkflowByIdCall(identifier, active, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Fetch all workflows for specified node (asynchronously) * Fetch all workflows for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param active Filter active workflows (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesGetWorkflowByIdAsync(String identifier, Boolean active, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesGetWorkflowByIdCall(identifier, active, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesMasterDelTagById */ private com.squareup.okhttp.Call nodesMasterDelTagByIdCall(String tagName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'tagName' is set if (tagName == null) { throw new ApiException( "Missing the required parameter 'tagName' when calling nodesMasterDelTagById(Async)"); } // create path and map variables String localVarPath = "/nodes/tags/{tagName}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tagName" + "\\}", apiClient.escapeString(tagName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete specified tag from all nodes. * Delete specified tag from all nodes. * @param tagName The tag identifier (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void nodesMasterDelTagById(String tagName) throws ApiException { nodesMasterDelTagByIdWithHttpInfo(tagName); } /** * Delete specified tag from all nodes. * Delete specified tag from all nodes. * @param tagName The tag identifier (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> nodesMasterDelTagByIdWithHttpInfo(String tagName) throws ApiException { com.squareup.okhttp.Call call = nodesMasterDelTagByIdCall(tagName, null, null); return apiClient.execute(call); } /** * Delete specified tag from all nodes. (asynchronously) * Delete specified tag from all nodes. * @param tagName The tag identifier (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesMasterDelTagByIdAsync(String tagName, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesMasterDelTagByIdCall(tagName, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for nodesPatchById */ private com.squareup.okhttp.Call nodesPatchByIdCall(String identifier, GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesPatchById(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling nodesPatchById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Patch specified node * Patch specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param body object patches to apply. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesPatchById(String identifier, GenericObj body) throws ApiException { ApiResponse<Object> resp = nodesPatchByIdWithHttpInfo(identifier, body); return resp.getData(); } /** * Patch specified node * Patch specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param body object patches to apply. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesPatchByIdWithHttpInfo(String identifier, GenericObj body) throws ApiException { com.squareup.okhttp.Call call = nodesPatchByIdCall(identifier, body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Patch specified node (asynchronously) * Patch specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param body object patches to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesPatchByIdAsync(String identifier, GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesPatchByIdCall(identifier, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesPatchTagById */ private com.squareup.okhttp.Call nodesPatchTagByIdCall(String identifier, GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesPatchTagById(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling nodesPatchTagById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/tags".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Patch tags onto specified node * Patch tags onto specified node * @param identifier Mac addresses or unique aliases to identify the node by (required) * @param body object patches to apply. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesPatchTagById(String identifier, GenericObj body) throws ApiException { ApiResponse<Object> resp = nodesPatchTagByIdWithHttpInfo(identifier, body); return resp.getData(); } /** * Patch tags onto specified node * Patch tags onto specified node * @param identifier Mac addresses or unique aliases to identify the node by (required) * @param body object patches to apply. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesPatchTagByIdWithHttpInfo(String identifier, GenericObj body) throws ApiException { com.squareup.okhttp.Call call = nodesPatchTagByIdCall(identifier, body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Patch tags onto specified node (asynchronously) * Patch tags onto specified node * @param identifier Mac addresses or unique aliases to identify the node by (required) * @param body object patches to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesPatchTagByIdAsync(String identifier, GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesPatchTagByIdCall(identifier, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesPost */ private com.squareup.okhttp.Call nodesPostCall(GenericObj identifiers, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = identifiers; // verify the required parameter 'identifiers' is set if (identifiers == null) { throw new ApiException("Missing the required parameter 'identifiers' when calling nodesPost(Async)"); } // create path and map variables String localVarPath = "/nodes".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * post * post * @param identifiers Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesPost(GenericObj identifiers) throws ApiException { ApiResponse<Object> resp = nodesPostWithHttpInfo(identifiers); return resp.getData(); } /** * post * post * @param identifiers Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesPostWithHttpInfo(GenericObj identifiers) throws ApiException { com.squareup.okhttp.Call call = nodesPostCall(identifiers, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * post (asynchronously) * post * @param identifiers Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesPostAsync(GenericObj identifiers, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesPostCall(identifiers, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesPostSshById */ private com.squareup.okhttp.Call nodesPostSshByIdCall(String identifier, GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesPostSshById(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling nodesPostSshById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/ssh".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * set the ssh settings associated with a node. * set the ssh settings associated with a node. * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param body ssh settings to apply. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void nodesPostSshById(String identifier, GenericObj body) throws ApiException { nodesPostSshByIdWithHttpInfo(identifier, body); } /** * set the ssh settings associated with a node. * set the ssh settings associated with a node. * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param body ssh settings to apply. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> nodesPostSshByIdWithHttpInfo(String identifier, GenericObj body) throws ApiException { com.squareup.okhttp.Call call = nodesPostSshByIdCall(identifier, body, null, null); return apiClient.execute(call); } /** * set the ssh settings associated with a node. (asynchronously) * set the ssh settings associated with a node. * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param body ssh settings to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesPostSshByIdAsync(String identifier, GenericObj body, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesPostSshByIdCall(identifier, body, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for nodesPostWorkflowById */ private com.squareup.okhttp.Call nodesPostWorkflowByIdCall(String identifier, GenericObj body, String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesPostWorkflowById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/workflows".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (name != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "name", name)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * create workflow for specified node * create workflow for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param body Workflow name (optional) * @param name Workflow name (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesPostWorkflowById(String identifier, GenericObj body, String name) throws ApiException { ApiResponse<Object> resp = nodesPostWorkflowByIdWithHttpInfo(identifier, body, name); return resp.getData(); } /** * create workflow for specified node * create workflow for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param body Workflow name (optional) * @param name Workflow name (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesPostWorkflowByIdWithHttpInfo(String identifier, GenericObj body, String name) throws ApiException { com.squareup.okhttp.Call call = nodesPostWorkflowByIdCall(identifier, body, name, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * create workflow for specified node (asynchronously) * create workflow for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param body Workflow name (optional) * @param name Workflow name (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesPostWorkflowByIdAsync(String identifier, GenericObj body, String name, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesPostWorkflowByIdCall(identifier, body, name, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for nodesWorkflowActionById */ private com.squareup.okhttp.Call nodesWorkflowActionByIdCall(String identifier, Action action, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = action; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling nodesWorkflowActionById(Async)"); } // verify the required parameter 'action' is set if (action == null) { throw new ApiException( "Missing the required parameter 'action' when calling nodesWorkflowActionById(Async)"); } // create path and map variables String localVarPath = "/nodes/{identifier}/workflows/action".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Cancel currently running workflows for specified node * Cancel currently running workflows for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param action Command to execute on selected workflow (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object nodesWorkflowActionById(String identifier, Action action) throws ApiException { ApiResponse<Object> resp = nodesWorkflowActionByIdWithHttpInfo(identifier, action); return resp.getData(); } /** * Cancel currently running workflows for specified node * Cancel currently running workflows for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param action Command to execute on selected workflow (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> nodesWorkflowActionByIdWithHttpInfo(String identifier, Action action) throws ApiException { com.squareup.okhttp.Call call = nodesWorkflowActionByIdCall(identifier, action, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Cancel currently running workflows for specified node (asynchronously) * Cancel currently running workflows for specified node * @param identifier Mac addresses and unique aliases to identify the node by, | expect a string or an array of strings. (required) * @param action Command to execute on selected workflow (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call nodesWorkflowActionByIdAsync(String identifier, Action action, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = nodesWorkflowActionByIdCall(identifier, action, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for obmsDefinitionsGetAll */ private com.squareup.okhttp.Call obmsDefinitionsGetAllCall( final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/obms/definitions".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get list of possible OBM services * Get list of possible OBM services * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object obmsDefinitionsGetAll() throws ApiException { ApiResponse<Object> resp = obmsDefinitionsGetAllWithHttpInfo(); return resp.getData(); } /** * Get list of possible OBM services * Get list of possible OBM services * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> obmsDefinitionsGetAllWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = obmsDefinitionsGetAllCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get list of possible OBM services (asynchronously) * Get list of possible OBM services * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call obmsDefinitionsGetAllAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = obmsDefinitionsGetAllCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for obmsDefinitionsGetByName */ private com.squareup.okhttp.Call obmsDefinitionsGetByNameCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException( "Missing the required parameter 'name' when calling obmsDefinitionsGetByName(Async)"); } // create path and map variables String localVarPath = "/obms/definitions/{name}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get the specified OBM service definition * Get the specified OBM service definition * @param name The OBM service definition identifier. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object obmsDefinitionsGetByName(String name) throws ApiException { ApiResponse<Object> resp = obmsDefinitionsGetByNameWithHttpInfo(name); return resp.getData(); } /** * Get the specified OBM service definition * Get the specified OBM service definition * @param name The OBM service definition identifier. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> obmsDefinitionsGetByNameWithHttpInfo(String name) throws ApiException { com.squareup.okhttp.Call call = obmsDefinitionsGetByNameCall(name, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get the specified OBM service definition (asynchronously) * Get the specified OBM service definition * @param name The OBM service definition identifier. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call obmsDefinitionsGetByNameAsync(String name, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = obmsDefinitionsGetByNameCall(name, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for obmsDeleteById */ private com.squareup.okhttp.Call obmsDeleteByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling obmsDeleteById(Async)"); } // create path and map variables String localVarPath = "/obms/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete the OBM service with the specified identifier * Delete the OBM service with the specified identifier * @param identifier The OBM service identifier. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object obmsDeleteById(String identifier) throws ApiException { ApiResponse<Object> resp = obmsDeleteByIdWithHttpInfo(identifier); return resp.getData(); } /** * Delete the OBM service with the specified identifier * Delete the OBM service with the specified identifier * @param identifier The OBM service identifier. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> obmsDeleteByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = obmsDeleteByIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Delete the OBM service with the specified identifier (asynchronously) * Delete the OBM service with the specified identifier * @param identifier The OBM service identifier. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call obmsDeleteByIdAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = obmsDeleteByIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for obmsGet */ private com.squareup.okhttp.Call obmsGetCall(String query, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/obms".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (query != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get list of all OBM service instances * Get list of all OBM service instances * @param query query object to pass through to waterline. (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object obmsGet(String query) throws ApiException { ApiResponse<Object> resp = obmsGetWithHttpInfo(query); return resp.getData(); } /** * Get list of all OBM service instances * Get list of all OBM service instances * @param query query object to pass through to waterline. (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> obmsGetWithHttpInfo(String query) throws ApiException { com.squareup.okhttp.Call call = obmsGetCall(query, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get list of all OBM service instances (asynchronously) * Get list of all OBM service instances * @param query query object to pass through to waterline. (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call obmsGetAsync(String query, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = obmsGetCall(query, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for obmsGetById */ private com.squareup.okhttp.Call obmsGetByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling obmsGetById(Async)"); } // create path and map variables String localVarPath = "/obms/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get the specified OBM service * get the specified OBM service * @param identifier The OBM service identifier. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object obmsGetById(String identifier) throws ApiException { ApiResponse<Object> resp = obmsGetByIdWithHttpInfo(identifier); return resp.getData(); } /** * get the specified OBM service * get the specified OBM service * @param identifier The OBM service identifier. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> obmsGetByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = obmsGetByIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get the specified OBM service (asynchronously) * get the specified OBM service * @param identifier The OBM service identifier. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call obmsGetByIdAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = obmsGetByIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for obmsPatchById */ private com.squareup.okhttp.Call obmsPatchByIdCall(String identifier, GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling obmsPatchById(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling obmsPatchById(Async)"); } // create path and map variables String localVarPath = "/obms/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * patch a single OBM service * patch a single OBM service * @param identifier The OBM service identifier. (required) * @param body object patches to apply. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object obmsPatchById(String identifier, GenericObj body) throws ApiException { ApiResponse<Object> resp = obmsPatchByIdWithHttpInfo(identifier, body); return resp.getData(); } /** * patch a single OBM service * patch a single OBM service * @param identifier The OBM service identifier. (required) * @param body object patches to apply. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> obmsPatchByIdWithHttpInfo(String identifier, GenericObj body) throws ApiException { com.squareup.okhttp.Call call = obmsPatchByIdCall(identifier, body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * patch a single OBM service (asynchronously) * patch a single OBM service * @param identifier The OBM service identifier. (required) * @param body object patches to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call obmsPatchByIdAsync(String identifier, GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = obmsPatchByIdCall(identifier, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for obmsPostLed */ private com.squareup.okhttp.Call obmsPostLedCall(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling obmsPostLed(Async)"); } // create path and map variables String localVarPath = "/obms/led".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Enable or disable identify light on node through OBM (if supported) * Enable or disable identify light on node through OBM (if supported) * @param body foo (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void obmsPostLed(GenericObj body) throws ApiException { obmsPostLedWithHttpInfo(body); } /** * Enable or disable identify light on node through OBM (if supported) * Enable or disable identify light on node through OBM (if supported) * @param body foo (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> obmsPostLedWithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = obmsPostLedCall(body, null, null); return apiClient.execute(call); } /** * Enable or disable identify light on node through OBM (if supported) (asynchronously) * Enable or disable identify light on node through OBM (if supported) * @param body foo (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call obmsPostLedAsync(GenericObj body, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = obmsPostLedCall(body, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for obmsPut */ private com.squareup.okhttp.Call obmsPutCall(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling obmsPut(Async)"); } // create path and map variables String localVarPath = "/obms".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * create or update a single OBM service * create or update a single OBM service * @param body The OBM service object post to apply. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object obmsPut(GenericObj body) throws ApiException { ApiResponse<Object> resp = obmsPutWithHttpInfo(body); return resp.getData(); } /** * create or update a single OBM service * create or update a single OBM service * @param body The OBM service object post to apply. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> obmsPutWithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = obmsPutCall(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * create or update a single OBM service (asynchronously) * create or update a single OBM service * @param body The OBM service object post to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call obmsPutAsync(GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = obmsPutCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for pollersCurrentDataGet */ private com.squareup.okhttp.Call pollersCurrentDataGetCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling pollersCurrentDataGet(Async)"); } // create path and map variables String localVarPath = "/pollers/{identifier}/data/current".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get latest data for the specific poller * Get latest data for the specific poller * @param identifier identifier (ip address or NodeId) for the data from a poller (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object pollersCurrentDataGet(String identifier) throws ApiException { ApiResponse<Object> resp = pollersCurrentDataGetWithHttpInfo(identifier); return resp.getData(); } /** * Get latest data for the specific poller * Get latest data for the specific poller * @param identifier identifier (ip address or NodeId) for the data from a poller (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> pollersCurrentDataGetWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = pollersCurrentDataGetCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get latest data for the specific poller (asynchronously) * Get latest data for the specific poller * @param identifier identifier (ip address or NodeId) for the data from a poller (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pollersCurrentDataGetAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pollersCurrentDataGetCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for pollersDataGet */ private com.squareup.okhttp.Call pollersDataGetCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling pollersDataGet(Async)"); } // create path and map variables String localVarPath = "/pollers/{identifier}/data".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get data for the specific poller * Get data for the specific poller * @param identifier identifier (ip address or NodeId) for the data from a poller (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object pollersDataGet(String identifier) throws ApiException { ApiResponse<Object> resp = pollersDataGetWithHttpInfo(identifier); return resp.getData(); } /** * Get data for the specific poller * Get data for the specific poller * @param identifier identifier (ip address or NodeId) for the data from a poller (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> pollersDataGetWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = pollersDataGetCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get data for the specific poller (asynchronously) * Get data for the specific poller * @param identifier identifier (ip address or NodeId) for the data from a poller (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pollersDataGetAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pollersDataGetCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for pollersDelete */ private com.squareup.okhttp.Call pollersDeleteCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling pollersDelete(Async)"); } // create path and map variables String localVarPath = "/pollers/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * delete the specified poller * delete the specified poller * @param identifier poller identifier (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void pollersDelete(String identifier) throws ApiException { pollersDeleteWithHttpInfo(identifier); } /** * delete the specified poller * delete the specified poller * @param identifier poller identifier (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> pollersDeleteWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = pollersDeleteCall(identifier, null, null); return apiClient.execute(call); } /** * delete the specified poller (asynchronously) * delete the specified poller * @param identifier poller identifier (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pollersDeleteAsync(String identifier, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pollersDeleteCall(identifier, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for pollersGet */ private com.squareup.okhttp.Call pollersGetCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/pollers".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of all pollers * get list of all pollers * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object pollersGet() throws ApiException { ApiResponse<Object> resp = pollersGetWithHttpInfo(); return resp.getData(); } /** * get list of all pollers * get list of all pollers * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> pollersGetWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = pollersGetCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of all pollers (asynchronously) * get list of all pollers * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pollersGetAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pollersGetCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for pollersIdGet */ private com.squareup.okhttp.Call pollersIdGetCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling pollersIdGet(Async)"); } // create path and map variables String localVarPath = "/pollers/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get specifics of the specified poller * Get specifics of the specified poller * @param identifier poller identifier (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object pollersIdGet(String identifier) throws ApiException { ApiResponse<Object> resp = pollersIdGetWithHttpInfo(identifier); return resp.getData(); } /** * Get specifics of the specified poller * Get specifics of the specified poller * @param identifier poller identifier (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> pollersIdGetWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = pollersIdGetCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get specifics of the specified poller (asynchronously) * Get specifics of the specified poller * @param identifier poller identifier (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pollersIdGetAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pollersIdGetCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for pollersLibByIdGet */ private com.squareup.okhttp.Call pollersLibByIdGetCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling pollersLibByIdGet(Async)"); } // create path and map variables String localVarPath = "/pollers/library/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get a single library poller * get a single library poller * @param identifier library poller identifier (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object pollersLibByIdGet(String identifier) throws ApiException { ApiResponse<Object> resp = pollersLibByIdGetWithHttpInfo(identifier); return resp.getData(); } /** * get a single library poller * get a single library poller * @param identifier library poller identifier (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> pollersLibByIdGetWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = pollersLibByIdGetCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get a single library poller (asynchronously) * get a single library poller * @param identifier library poller identifier (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pollersLibByIdGetAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pollersLibByIdGetCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for pollersLibGet */ private com.squareup.okhttp.Call pollersLibGetCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/pollers/library".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of possible library pollers * get list of possible library pollers * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object pollersLibGet() throws ApiException { ApiResponse<Object> resp = pollersLibGetWithHttpInfo(); return resp.getData(); } /** * get list of possible library pollers * get list of possible library pollers * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> pollersLibGetWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = pollersLibGetCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of possible library pollers (asynchronously) * get list of possible library pollers * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pollersLibGetAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pollersLibGetCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for pollersPatch */ private com.squareup.okhttp.Call pollersPatchCall(String identifier, GenericObj content, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = content; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling pollersPatch(Async)"); } // verify the required parameter 'content' is set if (content == null) { throw new ApiException("Missing the required parameter 'content' when calling pollersPatch(Async)"); } // create path and map variables String localVarPath = "/pollers/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * patch specifics of the specified poller * patch specifics of the specified poller * @param identifier poller identifier (required) * @param content foo (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object pollersPatch(String identifier, GenericObj content) throws ApiException { ApiResponse<Object> resp = pollersPatchWithHttpInfo(identifier, content); return resp.getData(); } /** * patch specifics of the specified poller * patch specifics of the specified poller * @param identifier poller identifier (required) * @param content foo (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> pollersPatchWithHttpInfo(String identifier, GenericObj content) throws ApiException { com.squareup.okhttp.Call call = pollersPatchCall(identifier, content, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * patch specifics of the specified poller (asynchronously) * patch specifics of the specified poller * @param identifier poller identifier (required) * @param content foo (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pollersPatchAsync(String identifier, GenericObj content, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pollersPatchCall(identifier, content, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for pollersPost */ private com.squareup.okhttp.Call pollersPostCall(GenericObj content, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = content; // verify the required parameter 'content' is set if (content == null) { throw new ApiException("Missing the required parameter 'content' when calling pollersPost(Async)"); } // create path and map variables String localVarPath = "/pollers".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * create a poller * create a poller * @param content foo (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object pollersPost(GenericObj content) throws ApiException { ApiResponse<Object> resp = pollersPostWithHttpInfo(content); return resp.getData(); } /** * create a poller * create a poller * @param content foo (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> pollersPostWithHttpInfo(GenericObj content) throws ApiException { com.squareup.okhttp.Call call = pollersPostCall(content, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * create a poller (asynchronously) * create a poller * @param content foo (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call pollersPostAsync(GenericObj content, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = pollersPostCall(content, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for postTaskById */ private com.squareup.okhttp.Call postTaskByIdCall(String identifier, GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling postTaskById(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling postTaskById(Async)"); } // create path and map variables String localVarPath = "/tasks/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * post specific task * post specific task * @param identifier poller identifier (required) * @param body obm settings to apply. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object postTaskById(String identifier, GenericObj body) throws ApiException { ApiResponse<Object> resp = postTaskByIdWithHttpInfo(identifier, body); return resp.getData(); } /** * post specific task * post specific task * @param identifier poller identifier (required) * @param body obm settings to apply. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> postTaskByIdWithHttpInfo(String identifier, GenericObj body) throws ApiException { com.squareup.okhttp.Call call = postTaskByIdCall(identifier, body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * post specific task (asynchronously) * post specific task * @param identifier poller identifier (required) * @param body obm settings to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call postTaskByIdAsync(String identifier, GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = postTaskByIdCall(identifier, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for postWorkflowById */ private com.squareup.okhttp.Call postWorkflowByIdCall(String tagName, GenericObj body, String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'tagName' is set if (tagName == null) { throw new ApiException("Missing the required parameter 'tagName' when calling postWorkflowById(Async)"); } // create path and map variables String localVarPath = "/tags/{tagName}/nodes/workflows".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "tagName" + "\\}", apiClient.escapeString(tagName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (name != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "name", name)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * create workflow for nodes with the specified tag * create workflow for nodes with the specified tag * @param tagName The tag identifier (required) * @param body Workflow options (optional) * @param name Workflow name (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object postWorkflowById(String tagName, GenericObj body, String name) throws ApiException { ApiResponse<Object> resp = postWorkflowByIdWithHttpInfo(tagName, body, name); return resp.getData(); } /** * create workflow for nodes with the specified tag * create workflow for nodes with the specified tag * @param tagName The tag identifier (required) * @param body Workflow options (optional) * @param name Workflow name (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> postWorkflowByIdWithHttpInfo(String tagName, GenericObj body, String name) throws ApiException { com.squareup.okhttp.Call call = postWorkflowByIdCall(tagName, body, name, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * create workflow for nodes with the specified tag (asynchronously) * create workflow for nodes with the specified tag * @param tagName The tag identifier (required) * @param body Workflow options (optional) * @param name Workflow name (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call postWorkflowByIdAsync(String tagName, GenericObj body, String name, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = postWorkflowByIdCall(tagName, body, name, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for profilesGet */ private com.squareup.okhttp.Call profilesGetCall(List<String> macs, String mac, String ip, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/profiles".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (macs != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "macs", macs)); if (mac != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "mac", mac)); if (ip != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "ip", ip)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of possible profiles * get list of possible profiles * @param macs List of valid MAC addresses to lookup (optional) * @param mac When macs parameter is not passed, passed with IP adds MAC address to lookup (optional) * @param ip When macs parameters is not passed, passed with MAC adds IP address to lookup (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object profilesGet(List<String> macs, String mac, String ip) throws ApiException { ApiResponse<Object> resp = profilesGetWithHttpInfo(macs, mac, ip); return resp.getData(); } /** * get list of possible profiles * get list of possible profiles * @param macs List of valid MAC addresses to lookup (optional) * @param mac When macs parameter is not passed, passed with IP adds MAC address to lookup (optional) * @param ip When macs parameters is not passed, passed with MAC adds IP address to lookup (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> profilesGetWithHttpInfo(List<String> macs, String mac, String ip) throws ApiException { com.squareup.okhttp.Call call = profilesGetCall(macs, mac, ip, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of possible profiles (asynchronously) * get list of possible profiles * @param macs List of valid MAC addresses to lookup (optional) * @param mac When macs parameter is not passed, passed with IP adds MAC address to lookup (optional) * @param ip When macs parameters is not passed, passed with MAC adds IP address to lookup (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call profilesGetAsync(List<String> macs, String mac, String ip, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = profilesGetCall(macs, mac, ip, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for profilesGetLibByName */ private com.squareup.okhttp.Call profilesGetLibByNameCall(String name, String scope, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException( "Missing the required parameter 'name' when calling profilesGetLibByName(Async)"); } // create path and map variables String localVarPath = "/profiles/library/{name}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (scope != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "scope", scope)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get a single profile's raw data * get a single profile's raw data * @param name The profile name. (required) * @param scope Profile scope (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object profilesGetLibByName(String name, String scope) throws ApiException { ApiResponse<Object> resp = profilesGetLibByNameWithHttpInfo(name, scope); return resp.getData(); } /** * get a single profile's raw data * get a single profile's raw data * @param name The profile name. (required) * @param scope Profile scope (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> profilesGetLibByNameWithHttpInfo(String name, String scope) throws ApiException { com.squareup.okhttp.Call call = profilesGetLibByNameCall(name, scope, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get a single profile's raw data (asynchronously) * get a single profile's raw data * @param name The profile name. (required) * @param scope Profile scope (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call profilesGetLibByNameAsync(String name, String scope, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = profilesGetLibByNameCall(name, scope, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for profilesGetMetadata */ private com.squareup.okhttp.Call profilesGetMetadataCall( final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/profiles/metadata".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of possible profiles from database * get list of possible profiles from database * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object profilesGetMetadata() throws ApiException { ApiResponse<Object> resp = profilesGetMetadataWithHttpInfo(); return resp.getData(); } /** * get list of possible profiles from database * get list of possible profiles from database * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> profilesGetMetadataWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = profilesGetMetadataCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of possible profiles from database (asynchronously) * get list of possible profiles from database * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call profilesGetMetadataAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = profilesGetMetadataCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for profilesGetMetadataByName */ private com.squareup.okhttp.Call profilesGetMetadataByNameCall(String name, String scope, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException( "Missing the required parameter 'name' when calling profilesGetMetadataByName(Async)"); } // create path and map variables String localVarPath = "/profiles/metadata/{name}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (scope != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "scope", scope)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get a single profile's metadata from database * get a single profile's metadata from database * @param name The profile name. (required) * @param scope Profile scope (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object profilesGetMetadataByName(String name, String scope) throws ApiException { ApiResponse<Object> resp = profilesGetMetadataByNameWithHttpInfo(name, scope); return resp.getData(); } /** * get a single profile's metadata from database * get a single profile's metadata from database * @param name The profile name. (required) * @param scope Profile scope (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> profilesGetMetadataByNameWithHttpInfo(String name, String scope) throws ApiException { com.squareup.okhttp.Call call = profilesGetMetadataByNameCall(name, scope, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get a single profile's metadata from database (asynchronously) * get a single profile's metadata from database * @param name The profile name. (required) * @param scope Profile scope (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call profilesGetMetadataByNameAsync(String name, String scope, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = profilesGetMetadataByNameCall(name, scope, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for profilesGetSwitchVendor */ private com.squareup.okhttp.Call profilesGetSwitchVendorCall(String vendor, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'vendor' is set if (vendor == null) { throw new ApiException( "Missing the required parameter 'vendor' when calling profilesGetSwitchVendor(Async)"); } // create path and map variables String localVarPath = "/profiles/switch/{vendor}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "vendor" + "\\}", apiClient.escapeString(vendor.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get a single profile * get a single profile * @param vendor The switch vendor name. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object profilesGetSwitchVendor(String vendor) throws ApiException { ApiResponse<Object> resp = profilesGetSwitchVendorWithHttpInfo(vendor); return resp.getData(); } /** * get a single profile * get a single profile * @param vendor The switch vendor name. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> profilesGetSwitchVendorWithHttpInfo(String vendor) throws ApiException { com.squareup.okhttp.Call call = profilesGetSwitchVendorCall(vendor, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get a single profile (asynchronously) * get a single profile * @param vendor The switch vendor name. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call profilesGetSwitchVendorAsync(String vendor, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = profilesGetSwitchVendorCall(vendor, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for profilesPostSwitchError */ private com.squareup.okhttp.Call profilesPostSwitchErrorCall(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( "Missing the required parameter 'body' when calling profilesPostSwitchError(Async)"); } // create path and map variables String localVarPath = "/profiles/switch/error".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * create a switch error * create a switch error * @param body switch error. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object profilesPostSwitchError(GenericObj body) throws ApiException { ApiResponse<Object> resp = profilesPostSwitchErrorWithHttpInfo(body); return resp.getData(); } /** * create a switch error * create a switch error * @param body switch error. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> profilesPostSwitchErrorWithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = profilesPostSwitchErrorCall(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * create a switch error (asynchronously) * create a switch error * @param body switch error. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call profilesPostSwitchErrorAsync(GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = profilesPostSwitchErrorCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for profilesPutLibByName */ private com.squareup.okhttp.Call profilesPutLibByNameCall(String name, String scope, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException( "Missing the required parameter 'name' when calling profilesPutLibByName(Async)"); } // create path and map variables String localVarPath = "/profiles/library/{name}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (scope != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "scope", scope)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/octet-stream", "application/x-www-form-urlencoded" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * put a single profile * put a single profile * @param name The profile name. (required) * @param scope Profile scope (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object profilesPutLibByName(String name, String scope) throws ApiException { ApiResponse<Object> resp = profilesPutLibByNameWithHttpInfo(name, scope); return resp.getData(); } /** * put a single profile * put a single profile * @param name The profile name. (required) * @param scope Profile scope (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> profilesPutLibByNameWithHttpInfo(String name, String scope) throws ApiException { com.squareup.okhttp.Call call = profilesPutLibByNameCall(name, scope, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * put a single profile (asynchronously) * put a single profile * @param name The profile name. (required) * @param scope Profile scope (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call profilesPutLibByNameAsync(String name, String scope, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = profilesPutLibByNameCall(name, scope, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for removeUser */ private com.squareup.okhttp.Call removeUserCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling removeUser(Async)"); } // create path and map variables String localVarPath = "/users/{name}".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete a user * Delete a user * @param name username (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void removeUser(String name) throws ApiException { removeUserWithHttpInfo(name); } /** * Delete a user * Delete a user * @param name username (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> removeUserWithHttpInfo(String name) throws ApiException { com.squareup.okhttp.Call call = removeUserCall(name, null, null); return apiClient.execute(call); } /** * Delete a user (asynchronously) * Delete a user * @param name username (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call removeUserAsync(String name, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = removeUserCall(name, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for schemasGet */ private com.squareup.okhttp.Call schemasGetCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/schemas".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of all schemas * Get a list of all schemas. * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object schemasGet() throws ApiException { ApiResponse<Object> resp = schemasGetWithHttpInfo(); return resp.getData(); } /** * get list of all schemas * Get a list of all schemas. * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> schemasGetWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = schemasGetCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of all schemas (asynchronously) * Get a list of all schemas. * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call schemasGetAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = schemasGetCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for schemasIdGet */ private com.squareup.okhttp.Call schemasIdGetCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling schemasIdGet(Async)"); } // create path and map variables String localVarPath = "/schemas/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get a schema by specifying its identifier * Gets a schema by identifier. * @param identifier identifier of a schema (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object schemasIdGet(String identifier) throws ApiException { ApiResponse<Object> resp = schemasIdGetWithHttpInfo(identifier); return resp.getData(); } /** * get a schema by specifying its identifier * Gets a schema by identifier. * @param identifier identifier of a schema (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> schemasIdGetWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = schemasIdGetCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get a schema by specifying its identifier (asynchronously) * Gets a schema by identifier. * @param identifier identifier of a schema (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call schemasIdGetAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = schemasIdGetCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skuPackPost */ private com.squareup.okhttp.Call skuPackPostCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/skus/pack".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "multipart/form-data", "application/x-www-form-urlencoded" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of skus * get list of skus * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skuPackPost() throws ApiException { ApiResponse<Object> resp = skuPackPostWithHttpInfo(); return resp.getData(); } /** * get list of skus * get list of skus * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skuPackPostWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = skuPackPostCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of skus (asynchronously) * get list of skus * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skuPackPostAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skuPackPostCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skusGet */ private com.squareup.okhttp.Call skusGetCall(String query, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/skus".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (query != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of skus * get list of skus * @param query query object to pass through to waterline. (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skusGet(String query) throws ApiException { ApiResponse<Object> resp = skusGetWithHttpInfo(query); return resp.getData(); } /** * get list of skus * get list of skus * @param query query object to pass through to waterline. (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skusGetWithHttpInfo(String query) throws ApiException { com.squareup.okhttp.Call call = skusGetCall(query, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of skus (asynchronously) * get list of skus * @param query query object to pass through to waterline. (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skusGetAsync(String query, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skusGetCall(query, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skusIdDelete */ private com.squareup.okhttp.Call skusIdDeleteCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling skusIdDelete(Async)"); } // create path and map variables String localVarPath = "/skus/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete specific sku. * Delete specific sku. * @param identifier The sku objectid. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skusIdDelete(String identifier) throws ApiException { ApiResponse<Object> resp = skusIdDeleteWithHttpInfo(identifier); return resp.getData(); } /** * Delete specific sku. * Delete specific sku. * @param identifier The sku objectid. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skusIdDeleteWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = skusIdDeleteCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Delete specific sku. (asynchronously) * Delete specific sku. * @param identifier The sku objectid. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skusIdDeleteAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skusIdDeleteCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skusIdDeletePack */ private com.squareup.okhttp.Call skusIdDeletePackCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling skusIdDeletePack(Async)"); } // create path and map variables String localVarPath = "/skus/{identifier}/pack".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete a pack for a specific sku * Delete a pack for a specific sku. * @param identifier The profile name. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skusIdDeletePack(String identifier) throws ApiException { ApiResponse<Object> resp = skusIdDeletePackWithHttpInfo(identifier); return resp.getData(); } /** * Delete a pack for a specific sku * Delete a pack for a specific sku. * @param identifier The profile name. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skusIdDeletePackWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = skusIdDeletePackCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Delete a pack for a specific sku (asynchronously) * Delete a pack for a specific sku. * @param identifier The profile name. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skusIdDeletePackAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skusIdDeletePackCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skusIdGet */ private com.squareup.okhttp.Call skusIdGetCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling skusIdGet(Async)"); } // create path and map variables String localVarPath = "/skus/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get a single sku * get a single sku * @param identifier objectid of sku (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skusIdGet(String identifier) throws ApiException { ApiResponse<Object> resp = skusIdGetWithHttpInfo(identifier); return resp.getData(); } /** * get a single sku * get a single sku * @param identifier objectid of sku (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skusIdGetWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = skusIdGetCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get a single sku (asynchronously) * get a single sku * @param identifier objectid of sku (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skusIdGetAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skusIdGetCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skusIdGetNodes */ private com.squareup.okhttp.Call skusIdGetNodesCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling skusIdGetNodes(Async)"); } // create path and map variables String localVarPath = "/skus/{identifier}/nodes".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get nodes for specific sku * get nodes for specific sku * @param identifier The profile name. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skusIdGetNodes(String identifier) throws ApiException { ApiResponse<Object> resp = skusIdGetNodesWithHttpInfo(identifier); return resp.getData(); } /** * get nodes for specific sku * get nodes for specific sku * @param identifier The profile name. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skusIdGetNodesWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = skusIdGetNodesCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get nodes for specific sku (asynchronously) * get nodes for specific sku * @param identifier The profile name. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skusIdGetNodesAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skusIdGetNodesCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skusIdPutPack */ private com.squareup.okhttp.Call skusIdPutPackCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling skusIdPutPack(Async)"); } // create path and map variables String localVarPath = "/skus/{identifier}/pack".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * put a sku pack to specific sku * put a sku pack to specific sku * @param identifier The identifier of the sku pack. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skusIdPutPack(String identifier) throws ApiException { ApiResponse<Object> resp = skusIdPutPackWithHttpInfo(identifier); return resp.getData(); } /** * put a sku pack to specific sku * put a sku pack to specific sku * @param identifier The identifier of the sku pack. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skusIdPutPackWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = skusIdPutPackCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * put a sku pack to specific sku (asynchronously) * put a sku pack to specific sku * @param identifier The identifier of the sku pack. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skusIdPutPackAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skusIdPutPackCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skusPatch */ private com.squareup.okhttp.Call skusPatchCall(String identifier, GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling skusPatch(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling skusPatch(Async)"); } // create path and map variables String localVarPath = "/skus/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * patch a single sku * patch a single sku * @param identifier The sku identifier (required) * @param body object patches to apply. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skusPatch(String identifier, GenericObj body) throws ApiException { ApiResponse<Object> resp = skusPatchWithHttpInfo(identifier, body); return resp.getData(); } /** * patch a single sku * patch a single sku * @param identifier The sku identifier (required) * @param body object patches to apply. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skusPatchWithHttpInfo(String identifier, GenericObj body) throws ApiException { com.squareup.okhttp.Call call = skusPatchCall(identifier, body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * patch a single sku (asynchronously) * patch a single sku * @param identifier The sku identifier (required) * @param body object patches to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skusPatchAsync(String identifier, GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skusPatchCall(identifier, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skusPost */ private com.squareup.okhttp.Call skusPostCall(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling skusPost(Async)"); } // create path and map variables String localVarPath = "/skus".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * create a sku * create a sku * @param body object post to apply. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skusPost(GenericObj body) throws ApiException { ApiResponse<Object> resp = skusPostWithHttpInfo(body); return resp.getData(); } /** * create a sku * create a sku * @param body object post to apply. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skusPostWithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = skusPostCall(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * create a sku (asynchronously) * create a sku * @param body object post to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skusPostAsync(GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skusPostCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for skusPut */ private com.squareup.okhttp.Call skusPutCall(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling skusPut(Async)"); } // create path and map variables String localVarPath = "/skus".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * create or update a sku * create or update a sku * @param body object post to apply. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object skusPut(GenericObj body) throws ApiException { ApiResponse<Object> resp = skusPutWithHttpInfo(body); return resp.getData(); } /** * create or update a sku * create or update a sku * @param body object post to apply. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> skusPutWithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = skusPutCall(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * create or update a sku (asynchronously) * create or update a sku * @param body object post to apply. (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call skusPutAsync(GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = skusPutCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for templatesGetByName */ private com.squareup.okhttp.Call templatesGetByNameCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling templatesGetByName(Async)"); } // create path and map variables String localVarPath = "/templates/{name}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get a single template * get a single template * @param name template name (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object templatesGetByName(String name) throws ApiException { ApiResponse<Object> resp = templatesGetByNameWithHttpInfo(name); return resp.getData(); } /** * get a single template * get a single template * @param name template name (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> templatesGetByNameWithHttpInfo(String name) throws ApiException { com.squareup.okhttp.Call call = templatesGetByNameCall(name, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get a single template (asynchronously) * get a single template * @param name template name (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call templatesGetByNameAsync(String name, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = templatesGetByNameCall(name, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for templatesLibDelete */ private com.squareup.okhttp.Call templatesLibDeleteCall(String name, String scope, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling templatesLibDelete(Async)"); } // create path and map variables String localVarPath = "/templates/library/{name}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (scope != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "scope", scope)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * delete a single template * delete a single template * @param name objectid of template (required) * @param scope template scope (optional, default to global) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public void templatesLibDelete(String name, String scope) throws ApiException { templatesLibDeleteWithHttpInfo(name, scope); } /** * delete a single template * delete a single template * @param name objectid of template (required) * @param scope template scope (optional, default to global) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Void> templatesLibDeleteWithHttpInfo(String name, String scope) throws ApiException { com.squareup.okhttp.Call call = templatesLibDeleteCall(name, scope, null, null); return apiClient.execute(call); } /** * delete a single template (asynchronously) * delete a single template * @param name objectid of template (required) * @param scope template scope (optional, default to global) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call templatesLibDeleteAsync(String name, String scope, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = templatesLibDeleteCall(name, scope, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for templatesLibGet */ private com.squareup.okhttp.Call templatesLibGetCall(String name, String scope, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling templatesLibGet(Async)"); } // create path and map variables String localVarPath = "/templates/library/{name}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (scope != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "scope", scope)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get a single template * get a single template * @param name template name (required) * @param scope template scope (optional, default to global) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object templatesLibGet(String name, String scope) throws ApiException { ApiResponse<Object> resp = templatesLibGetWithHttpInfo(name, scope); return resp.getData(); } /** * get a single template * get a single template * @param name template name (required) * @param scope template scope (optional, default to global) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> templatesLibGetWithHttpInfo(String name, String scope) throws ApiException { com.squareup.okhttp.Call call = templatesLibGetCall(name, scope, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get a single template (asynchronously) * get a single template * @param name template name (required) * @param scope template scope (optional, default to global) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call templatesLibGetAsync(String name, String scope, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = templatesLibGetCall(name, scope, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for templatesLibPut */ private com.squareup.okhttp.Call templatesLibPutCall(String name, String scope, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling templatesLibPut(Async)"); } // create path and map variables String localVarPath = "/templates/library/{name}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (scope != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "scope", scope)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "text/plain", "application/x-www-form-urlencoded" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * put a single template * put a single template * @param name objectid of template (required) * @param scope template scope (optional, default to global) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object templatesLibPut(String name, String scope) throws ApiException { ApiResponse<Object> resp = templatesLibPutWithHttpInfo(name, scope); return resp.getData(); } /** * put a single template * put a single template * @param name objectid of template (required) * @param scope template scope (optional, default to global) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> templatesLibPutWithHttpInfo(String name, String scope) throws ApiException { com.squareup.okhttp.Call call = templatesLibPutCall(name, scope, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * put a single template (asynchronously) * put a single template * @param name objectid of template (required) * @param scope template scope (optional, default to global) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call templatesLibPutAsync(String name, String scope, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = templatesLibPutCall(name, scope, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for templatesMetaGet */ private com.squareup.okhttp.Call templatesMetaGetCall( final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/templates/metadata".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of metadata for all templates * get list of metadata for all templates * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object templatesMetaGet() throws ApiException { ApiResponse<Object> resp = templatesMetaGetWithHttpInfo(); return resp.getData(); } /** * get list of metadata for all templates * get list of metadata for all templates * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> templatesMetaGetWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = templatesMetaGetCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of metadata for all templates (asynchronously) * get list of metadata for all templates * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call templatesMetaGetAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = templatesMetaGetCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for templatesMetaGetByName */ private com.squareup.okhttp.Call templatesMetaGetByNameCall(String name, String scope, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'name' is set if (name == null) { throw new ApiException( "Missing the required parameter 'name' when calling templatesMetaGetByName(Async)"); } // create path and map variables String localVarPath = "/templates/metadata/{name}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (scope != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "scope", scope)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get metadata for a specific template * get metadata for a specific template * @param name template name (required) * @param scope template scope (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object templatesMetaGetByName(String name, String scope) throws ApiException { ApiResponse<Object> resp = templatesMetaGetByNameWithHttpInfo(name, scope); return resp.getData(); } /** * get metadata for a specific template * get metadata for a specific template * @param name template name (required) * @param scope template scope (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> templatesMetaGetByNameWithHttpInfo(String name, String scope) throws ApiException { com.squareup.okhttp.Call call = templatesMetaGetByNameCall(name, scope, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get metadata for a specific template (asynchronously) * get metadata for a specific template * @param name template name (required) * @param scope template scope (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call templatesMetaGetByNameAsync(String name, String scope, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = templatesMetaGetByNameCall(name, scope, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for unimplemented */ private com.squareup.okhttp.Call unimplementedCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/dhcp".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get DHCP lease table * Fetch the dhcp leases. * @return List<Lease> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Lease> unimplemented() throws ApiException { ApiResponse<List<Lease>> resp = unimplementedWithHttpInfo(); return resp.getData(); } /** * get DHCP lease table * Fetch the dhcp leases. * @return ApiResponse<List<Lease>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Lease>> unimplementedWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = unimplementedCall(null, null); Type localVarReturnType = new TypeToken<List<Lease>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get DHCP lease table (asynchronously) * Fetch the dhcp leases. * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call unimplementedAsync(final ApiCallback<List<Lease>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = unimplementedCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Lease>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for unimplemented_0 */ private com.squareup.okhttp.Call unimplemented_0Call(String mac, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'mac' is set if (mac == null) { throw new ApiException("Missing the required parameter 'mac' when calling unimplemented_0(Async)"); } // create path and map variables String localVarPath = "/dhcp/lease/{mac}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "mac" + "\\}", apiClient.escapeString(mac.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * fetch lease information for the mac specified * Fetch lease information for the mac specified. * @param mac identifier of a mac address (required) * @return List<Lease> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Lease> unimplemented_0(String mac) throws ApiException { ApiResponse<List<Lease>> resp = unimplemented_0WithHttpInfo(mac); return resp.getData(); } /** * fetch lease information for the mac specified * Fetch lease information for the mac specified. * @param mac identifier of a mac address (required) * @return ApiResponse<List<Lease>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Lease>> unimplemented_0WithHttpInfo(String mac) throws ApiException { com.squareup.okhttp.Call call = unimplemented_0Call(mac, null, null); Type localVarReturnType = new TypeToken<List<Lease>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * fetch lease information for the mac specified (asynchronously) * Fetch lease information for the mac specified. * @param mac identifier of a mac address (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call unimplemented_0Async(String mac, final ApiCallback<List<Lease>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = unimplemented_0Call(mac, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Lease>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for unimplemented_1 */ private com.squareup.okhttp.Call unimplemented_1Call(String mac, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'mac' is set if (mac == null) { throw new ApiException("Missing the required parameter 'mac' when calling unimplemented_1(Async)"); } // create path and map variables String localVarPath = "/dhcp/lease/{mac}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "mac" + "\\}", apiClient.escapeString(mac.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get list of all catalogs * Delete the lease for the mac specified and return information about deleted lease. * @param mac identifier of a mac address (required) * @return List<Lease> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List<Lease> unimplemented_1(String mac) throws ApiException { ApiResponse<List<Lease>> resp = unimplemented_1WithHttpInfo(mac); return resp.getData(); } /** * get list of all catalogs * Delete the lease for the mac specified and return information about deleted lease. * @param mac identifier of a mac address (required) * @return ApiResponse<List<Lease>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<List<Lease>> unimplemented_1WithHttpInfo(String mac) throws ApiException { com.squareup.okhttp.Call call = unimplemented_1Call(mac, null, null); Type localVarReturnType = new TypeToken<List<Lease>>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get list of all catalogs (asynchronously) * Delete the lease for the mac specified and return information about deleted lease. * @param mac identifier of a mac address (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call unimplemented_1Async(String mac, final ApiCallback<List<Lease>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = unimplemented_1Call(mac, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<List<Lease>>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for unimplemented_2 */ private com.squareup.okhttp.Call unimplemented_2Call(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling unimplemented_2(Async)"); } // create path and map variables String localVarPath = "/obms/led".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Fetch status of identify light on node through OBM (if supported) * Fetch status of identify light on node through OBM (if supported) * @param body foo (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object unimplemented_2(GenericObj body) throws ApiException { ApiResponse<Object> resp = unimplemented_2WithHttpInfo(body); return resp.getData(); } /** * Fetch status of identify light on node through OBM (if supported) * Fetch status of identify light on node through OBM (if supported) * @param body foo (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> unimplemented_2WithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = unimplemented_2Call(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Fetch status of identify light on node through OBM (if supported) (asynchronously) * Fetch status of identify light on node through OBM (if supported) * @param body foo (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call unimplemented_2Async(GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = unimplemented_2Call(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for viewsDelete */ private com.squareup.okhttp.Call viewsDeleteCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling viewsDelete(Async)"); } // create path and map variables String localVarPath = "/views/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * put a single view * put a single view * @param identifier Name of view to delete (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object viewsDelete(String identifier) throws ApiException { ApiResponse<Object> resp = viewsDeleteWithHttpInfo(identifier); return resp.getData(); } /** * put a single view * put a single view * @param identifier Name of view to delete (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> viewsDeleteWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = viewsDeleteCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * put a single view (asynchronously) * put a single view * @param identifier Name of view to delete (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call viewsDeleteAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = viewsDeleteCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for viewsGet */ private com.squareup.okhttp.Call viewsGetCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/views".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get all views * get all views * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object viewsGet() throws ApiException { ApiResponse<Object> resp = viewsGetWithHttpInfo(); return resp.getData(); } /** * get all views * get all views * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> viewsGetWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = viewsGetCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get all views (asynchronously) * get all views * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call viewsGetAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = viewsGetCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for viewsGetById */ private com.squareup.okhttp.Call viewsGetByIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling viewsGetById(Async)"); } // create path and map variables String localVarPath = "/views/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get view with specified identifier * get view with specified identifier * @param identifier Name of view to get (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object viewsGetById(String identifier) throws ApiException { ApiResponse<Object> resp = viewsGetByIdWithHttpInfo(identifier); return resp.getData(); } /** * get view with specified identifier * get view with specified identifier * @param identifier Name of view to get (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> viewsGetByIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = viewsGetByIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get view with specified identifier (asynchronously) * get view with specified identifier * @param identifier Name of view to get (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call viewsGetByIdAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = viewsGetByIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for viewsPut */ private com.squareup.okhttp.Call viewsPutCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException("Missing the required parameter 'identifier' when calling viewsPut(Async)"); } // create path and map variables String localVarPath = "/views/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "text/plain", "application/octet-stream" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * put a single view * put a single view * @param identifier Name of view to create or update (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object viewsPut(String identifier) throws ApiException { ApiResponse<Object> resp = viewsPutWithHttpInfo(identifier); return resp.getData(); } /** * put a single view * put a single view * @param identifier Name of view to create or update (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> viewsPutWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = viewsPutCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * put a single view (asynchronously) * put a single view * @param identifier Name of view to create or update (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call viewsPutAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = viewsPutCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsAction */ private com.squareup.okhttp.Call workflowsActionCall(String identifier, Action action, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = action; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling workflowsAction(Async)"); } // verify the required parameter 'action' is set if (action == null) { throw new ApiException("Missing the required parameter 'action' when calling workflowsAction(Async)"); } // create path and map variables String localVarPath = "/workflows/{identifier}/action".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Perform the specified action on the selected workflow * Perform the specified action on the selected workflow * @param identifier Workflow identifier (required) * @param action Command to execute on selected workflow (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsAction(String identifier, Action action) throws ApiException { ApiResponse<Object> resp = workflowsActionWithHttpInfo(identifier, action); return resp.getData(); } /** * Perform the specified action on the selected workflow * Perform the specified action on the selected workflow * @param identifier Workflow identifier (required) * @param action Command to execute on selected workflow (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsActionWithHttpInfo(String identifier, Action action) throws ApiException { com.squareup.okhttp.Call call = workflowsActionCall(identifier, action, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Perform the specified action on the selected workflow (asynchronously) * Perform the specified action on the selected workflow * @param identifier Workflow identifier (required) * @param action Command to execute on selected workflow (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsActionAsync(String identifier, Action action, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsActionCall(identifier, action, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsDeleteByInstanceId */ private com.squareup.okhttp.Call workflowsDeleteByInstanceIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling workflowsDeleteByInstanceId(Async)"); } // create path and map variables String localVarPath = "/workflows/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete the workflow with the specified ID * Delete the workflow with the specified ID * @param identifier Workflow ID (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsDeleteByInstanceId(String identifier) throws ApiException { ApiResponse<Object> resp = workflowsDeleteByInstanceIdWithHttpInfo(identifier); return resp.getData(); } /** * Delete the workflow with the specified ID * Delete the workflow with the specified ID * @param identifier Workflow ID (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsDeleteByInstanceIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = workflowsDeleteByInstanceIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Delete the workflow with the specified ID (asynchronously) * Delete the workflow with the specified ID * @param identifier Workflow ID (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsDeleteByInstanceIdAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsDeleteByInstanceIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsDeleteGraphsByName */ private com.squareup.okhttp.Call workflowsDeleteGraphsByNameCall(String injectableName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'injectableName' is set if (injectableName == null) { throw new ApiException( "Missing the required parameter 'injectableName' when calling workflowsDeleteGraphsByName(Async)"); } // create path and map variables String localVarPath = "/workflows/graphs/{injectableName}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "injectableName" + "\\}", apiClient.escapeString(injectableName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete the graph with the specified injectable name * Delete the graph with the specified injectable name * @param injectableName Graph injectable name (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsDeleteGraphsByName(String injectableName) throws ApiException { ApiResponse<Object> resp = workflowsDeleteGraphsByNameWithHttpInfo(injectableName); return resp.getData(); } /** * Delete the graph with the specified injectable name * Delete the graph with the specified injectable name * @param injectableName Graph injectable name (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsDeleteGraphsByNameWithHttpInfo(String injectableName) throws ApiException { com.squareup.okhttp.Call call = workflowsDeleteGraphsByNameCall(injectableName, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Delete the graph with the specified injectable name (asynchronously) * Delete the graph with the specified injectable name * @param injectableName Graph injectable name (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsDeleteGraphsByNameAsync(String injectableName, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsDeleteGraphsByNameCall(injectableName, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsDeleteTasksByName */ private com.squareup.okhttp.Call workflowsDeleteTasksByNameCall(String injectableName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'injectableName' is set if (injectableName == null) { throw new ApiException( "Missing the required parameter 'injectableName' when calling workflowsDeleteTasksByName(Async)"); } // create path and map variables String localVarPath = "/workflows/tasks/{injectableName}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "injectableName" + "\\}", apiClient.escapeString(injectableName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Delete the task with the specified injectable name * Delete the task with the specified injectable name * @param injectableName Task injectable name (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsDeleteTasksByName(String injectableName) throws ApiException { ApiResponse<Object> resp = workflowsDeleteTasksByNameWithHttpInfo(injectableName); return resp.getData(); } /** * Delete the task with the specified injectable name * Delete the task with the specified injectable name * @param injectableName Task injectable name (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsDeleteTasksByNameWithHttpInfo(String injectableName) throws ApiException { com.squareup.okhttp.Call call = workflowsDeleteTasksByNameCall(injectableName, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Delete the task with the specified injectable name (asynchronously) * Delete the task with the specified injectable name * @param injectableName Task injectable name (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsDeleteTasksByNameAsync(String injectableName, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsDeleteTasksByNameCall(injectableName, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsGet */ private com.squareup.okhttp.Call workflowsGetCall(Boolean active, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/workflows".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (active != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "active", active)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get list of active and past run workflow instances * Get list of active and past run workflow instances * @param active Filter active workflows (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsGet(Boolean active) throws ApiException { ApiResponse<Object> resp = workflowsGetWithHttpInfo(active); return resp.getData(); } /** * Get list of active and past run workflow instances * Get list of active and past run workflow instances * @param active Filter active workflows (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsGetWithHttpInfo(Boolean active) throws ApiException { com.squareup.okhttp.Call call = workflowsGetCall(active, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get list of active and past run workflow instances (asynchronously) * Get list of active and past run workflow instances * @param active Filter active workflows (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsGetAsync(Boolean active, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsGetCall(active, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsGetAllTasks */ private com.squareup.okhttp.Call workflowsGetAllTasksCall( final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/workflows/tasks".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get list of tasks possible to run in workflows * Get list of tasks possible to run in workflows * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsGetAllTasks() throws ApiException { ApiResponse<Object> resp = workflowsGetAllTasksWithHttpInfo(); return resp.getData(); } /** * Get list of tasks possible to run in workflows * Get list of tasks possible to run in workflows * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsGetAllTasksWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = workflowsGetAllTasksCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get list of tasks possible to run in workflows (asynchronously) * Get list of tasks possible to run in workflows * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsGetAllTasksAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsGetAllTasksCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsGetByInstanceId */ private com.squareup.okhttp.Call workflowsGetByInstanceIdCall(String identifier, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'identifier' is set if (identifier == null) { throw new ApiException( "Missing the required parameter 'identifier' when calling workflowsGetByInstanceId(Async)"); } // create path and map variables String localVarPath = "/workflows/{identifier}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "identifier" + "\\}", apiClient.escapeString(identifier.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * get a specific workflow * get a specific workflow * @param identifier Workflow identifier (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsGetByInstanceId(String identifier) throws ApiException { ApiResponse<Object> resp = workflowsGetByInstanceIdWithHttpInfo(identifier); return resp.getData(); } /** * get a specific workflow * get a specific workflow * @param identifier Workflow identifier (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsGetByInstanceIdWithHttpInfo(String identifier) throws ApiException { com.squareup.okhttp.Call call = workflowsGetByInstanceIdCall(identifier, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * get a specific workflow (asynchronously) * get a specific workflow * @param identifier Workflow identifier (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsGetByInstanceIdAsync(String identifier, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsGetByInstanceIdCall(identifier, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsGetGraphs */ private com.squareup.okhttp.Call workflowsGetGraphsCall( final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/workflows/graphs".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get list of all graphs * Get list of all graphs * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsGetGraphs() throws ApiException { ApiResponse<Object> resp = workflowsGetGraphsWithHttpInfo(); return resp.getData(); } /** * Get list of all graphs * Get list of all graphs * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsGetGraphsWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = workflowsGetGraphsCall(null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get list of all graphs (asynchronously) * Get list of all graphs * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsGetGraphsAsync(final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsGetGraphsCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsGetGraphsByName */ private com.squareup.okhttp.Call workflowsGetGraphsByNameCall(String injectableName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'injectableName' is set if (injectableName == null) { throw new ApiException( "Missing the required parameter 'injectableName' when calling workflowsGetGraphsByName(Async)"); } // create path and map variables String localVarPath = "/workflows/graphs/{injectableName}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "injectableName" + "\\}", apiClient.escapeString(injectableName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get the graph with the specified injectable name * Get the graph with the specified injectable name * @param injectableName Graph injectable name (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsGetGraphsByName(String injectableName) throws ApiException { ApiResponse<Object> resp = workflowsGetGraphsByNameWithHttpInfo(injectableName); return resp.getData(); } /** * Get the graph with the specified injectable name * Get the graph with the specified injectable name * @param injectableName Graph injectable name (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsGetGraphsByNameWithHttpInfo(String injectableName) throws ApiException { com.squareup.okhttp.Call call = workflowsGetGraphsByNameCall(injectableName, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get the graph with the specified injectable name (asynchronously) * Get the graph with the specified injectable name * @param injectableName Graph injectable name (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsGetGraphsByNameAsync(String injectableName, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsGetGraphsByNameCall(injectableName, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsGetTasksByName */ private com.squareup.okhttp.Call workflowsGetTasksByNameCall(String injectableName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'injectableName' is set if (injectableName == null) { throw new ApiException( "Missing the required parameter 'injectableName' when calling workflowsGetTasksByName(Async)"); } // create path and map variables String localVarPath = "/workflows/tasks/{injectableName}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "injectableName" + "\\}", apiClient.escapeString(injectableName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Get the task with the specified injectable name * Get the task with the specified injectable name * @param injectableName Task injectable name (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsGetTasksByName(String injectableName) throws ApiException { ApiResponse<Object> resp = workflowsGetTasksByNameWithHttpInfo(injectableName); return resp.getData(); } /** * Get the task with the specified injectable name * Get the task with the specified injectable name * @param injectableName Task injectable name (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsGetTasksByNameWithHttpInfo(String injectableName) throws ApiException { com.squareup.okhttp.Call call = workflowsGetTasksByNameCall(injectableName, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Get the task with the specified injectable name (asynchronously) * Get the task with the specified injectable name * @param injectableName Task injectable name (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsGetTasksByNameAsync(String injectableName, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsGetTasksByNameCall(injectableName, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsPost */ private com.squareup.okhttp.Call workflowsPostCall(GenericObj body, String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/workflows".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (name != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "name", name)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Run a new workflow * Run a new workflow * @param body Workflow name (optional) * @param name Workflow name (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsPost(GenericObj body, String name) throws ApiException { ApiResponse<Object> resp = workflowsPostWithHttpInfo(body, name); return resp.getData(); } /** * Run a new workflow * Run a new workflow * @param body Workflow name (optional) * @param name Workflow name (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsPostWithHttpInfo(GenericObj body, String name) throws ApiException { com.squareup.okhttp.Call call = workflowsPostCall(body, name, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Run a new workflow (asynchronously) * Run a new workflow * @param body Workflow name (optional) * @param name Workflow name (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsPostAsync(GenericObj body, String name, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsPostCall(body, name, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsPutGraphs */ private com.squareup.okhttp.Call workflowsPutGraphsCall(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/workflows/graphs".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Add a graph to the graph library * Add a graph to the graph library * @param body Workflow name (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsPutGraphs(GenericObj body) throws ApiException { ApiResponse<Object> resp = workflowsPutGraphsWithHttpInfo(body); return resp.getData(); } /** * Add a graph to the graph library * Add a graph to the graph library * @param body Workflow name (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsPutGraphsWithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = workflowsPutGraphsCall(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Add a graph to the graph library (asynchronously) * Add a graph to the graph library * @param body Workflow name (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsPutGraphsAsync(GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsPutGraphsCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for workflowsPutTask */ private com.squareup.okhttp.Call workflowsPutTaskCall(GenericObj body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/workflows/tasks".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] {}; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * Add tasks to task library * Add tasks to task library * @param body Workflow name (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Object workflowsPutTask(GenericObj body) throws ApiException { ApiResponse<Object> resp = workflowsPutTaskWithHttpInfo(body); return resp.getData(); } /** * Add tasks to task library * Add tasks to task library * @param body Workflow name (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Object> workflowsPutTaskWithHttpInfo(GenericObj body) throws ApiException { com.squareup.okhttp.Call call = workflowsPutTaskCall(body, null, null); Type localVarReturnType = new TypeToken<Object>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * Add tasks to task library (asynchronously) * Add tasks to task library * @param body Workflow name (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public com.squareup.okhttp.Call workflowsPutTaskAsync(GenericObj body, final ApiCallback<Object> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = workflowsPutTaskCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Object>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } }