index
int64
repo_id
string
file_path
string
content
string
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/ServerConfiguration.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client; import java.util.Map; /** * Representing a Server configuration. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class ServerConfiguration { public String URL; public String description; public Map<String, ServerVariable> variables; /** * @param URL A URL to the target host. * @param description A description of the host designated by the URL. * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. */ public ServerConfiguration(String URL, String description, Map<String, ServerVariable> variables) { this.URL = URL; this.description = description; this.variables = variables; } /** * Format URL template using given variables. * * @param variables A map between a variable name and its value. * @return Formatted URL. */ public String URL(Map<String, String> variables) { String url = this.URL; // go through variables and replace placeholders for (Map.Entry<String, ServerVariable> variable: this.variables.entrySet()) { String name = variable.getKey(); ServerVariable serverVariable = variable.getValue(); String value = serverVariable.defaultValue; if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replace("{" + name + "}", value); } return url; } /** * Format URL template using default server variables. * * @return Formatted URL. */ public String URL() { return URL(null); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/ServerVariable.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client; import java.util.HashSet; /** * Representing a Server Variable for server URL template substitution. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class ServerVariable { public String description; public String defaultValue; public HashSet<String> enumValues = null; /** * @param description A description for the server variable. * @param defaultValue The default value to use for substitution. * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. */ public ServerVariable(String description, String defaultValue, HashSet<String> enumValues) { this.description = description; this.defaultValue = defaultValue; this.enumValues = enumValues; } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/StringUtil.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client; import java.util.Collection; import java.util.Iterator; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). * * @param array The array * @param value The value to search * @return true if the array contains the value */ public static boolean containsIgnoreCase(String[] array, String value) { for (String str : array) { if (value == null && str == null) { return true; } if (value != null && value.equalsIgnoreCase(str)) { return true; } } return false; } /** * Join an array of strings with the given separator. * <p> * Note: This might be replaced by utility method from commons-lang or guava someday * if one of those libraries is added as dependency. * </p> * * @param array The array of strings * @param separator The separator * @return the resulting string */ public static String join(String[] array, String separator) { int len = array.length; if (len == 0) { return ""; } StringBuilder out = new StringBuilder(); out.append(array[0]); for (int i = 1; i < len; i++) { out.append(separator).append(array[i]); } return out.toString(); } /** * Join a list of strings with the given separator. * * @param list The list of strings * @param separator The separator * @return the resulting string */ public static String join(Collection<String> list, String separator) { Iterator<String> iterator = list.iterator(); StringBuilder out = new StringBuilder(); if (iterator.hasNext()) { out.append(iterator.next()); } while (iterator.hasNext()) { out.append(separator).append(iterator.next()); } return out.toString(); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/api/DefaultApi.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.api; import ai.lamin.lamin_api_client.ApiCallback; import ai.lamin.lamin_api_client.ApiClient; import ai.lamin.lamin_api_client.ApiException; import ai.lamin.lamin_api_client.ApiResponse; import ai.lamin.lamin_api_client.Configuration; import ai.lamin.lamin_api_client.Pair; import ai.lamin.lamin_api_client.ProgressRequestBody; import ai.lamin.lamin_api_client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; import ai.lamin.lamin_api_client.model.AddCollaboratorRequestBody; import ai.lamin.lamin_api_client.model.AddOrganizationMemberRequestBody; import ai.lamin.lamin_api_client.model.AddSpaceCollaboratorRequestBody; import ai.lamin.lamin_api_client.model.AddTeamMemberRequestBody; import ai.lamin.lamin_api_client.model.AttachSpaceToRecordRequestBody; import ai.lamin.lamin_api_client.model.CreateArtifactRequestBody; import ai.lamin.lamin_api_client.model.CreateSpaceRequestBody; import ai.lamin.lamin_api_client.model.CreateTeamRequestBody; import ai.lamin.lamin_api_client.model.CreateTransformRequestBody; import ai.lamin.lamin_api_client.model.DbUrlRequest; import java.io.File; import ai.lamin.lamin_api_client.model.GetRecordRequestBody; import ai.lamin.lamin_api_client.model.GetRecordsRequestBody; import ai.lamin.lamin_api_client.model.GetValuesRequestBody; import ai.lamin.lamin_api_client.model.GroupByRequestBody; import ai.lamin.lamin_api_client.model.HTTPValidationError; import ai.lamin.lamin_api_client.model.RegisterDbServerBody; import ai.lamin.lamin_api_client.model.RegisterFormRequest; import ai.lamin.lamin_api_client.model.S3PermissionsRequest; import java.util.UUID; import ai.lamin.lamin_api_client.model.UpdateCollaboratorRequestBody; import ai.lamin.lamin_api_client.model.UpdateOrganizationMemberRequestBody; import ai.lamin.lamin_api_client.model.UpdateSpaceCollaboratorRequestBody; import ai.lamin.lamin_api_client.model.UpdateSpaceRequestBody; import ai.lamin.lamin_api_client.model.UpdateTeamMemberRequestBody; import ai.lamin.lamin_api_client.model.UpdateTeamRequestBody; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class DefaultApi { private ApiClient localVarApiClient; private int localHostIndex; private String localCustomBaseUrl; public DefaultApi() { this(Configuration.getDefaultApiClient()); } public DefaultApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } public ApiClient getApiClient() { return localVarApiClient; } public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } public int getHostIndex() { return localHostIndex; } public void setHostIndex(int hostIndex) { this.localHostIndex = hostIndex; } public String getCustomBaseUrl() { return localCustomBaseUrl; } public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } /** * Build call for addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPut * @param instanceId (required) * @param addCollaboratorRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPutCall(UUID instanceId, AddCollaboratorRequestBody addCollaboratorRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = addCollaboratorRequestBody; // create path and map variables String localVarPath = "/access_v2/instances/{instance_id}/collaborators" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPutValidateBeforeCall(UUID instanceId, AddCollaboratorRequestBody addCollaboratorRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPut(Async)"); } // verify the required parameter 'addCollaboratorRequestBody' is set if (addCollaboratorRequestBody == null) { throw new ApiException("Missing the required parameter 'addCollaboratorRequestBody' when calling addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPut(Async)"); } return addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPutCall(instanceId, addCollaboratorRequestBody, authorization, _callback); } /** * Add Collaborator * Add a collaborator (account or team) to an instance. Parameters: - **instance_id**: UUID of the instance to add the collaborator to (from URL path) - **body**: Request body containing collaborator details - **account_id**: UUID of the account to add (mutually exclusive with team_id) - **team_id**: UUID of the team to add (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **201**: Collaborator added successfully - **400**: Invalid input (e.g., both account_id and team_id provided) - **409**: Collaborator was already added Requires admin access to the instance * @param instanceId (required) * @param addCollaboratorRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPut(UUID instanceId, AddCollaboratorRequestBody addCollaboratorRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPutWithHttpInfo(instanceId, addCollaboratorRequestBody, authorization); return localVarResp.getData(); } /** * Add Collaborator * Add a collaborator (account or team) to an instance. Parameters: - **instance_id**: UUID of the instance to add the collaborator to (from URL path) - **body**: Request body containing collaborator details - **account_id**: UUID of the account to add (mutually exclusive with team_id) - **team_id**: UUID of the team to add (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **201**: Collaborator added successfully - **400**: Invalid input (e.g., both account_id and team_id provided) - **409**: Collaborator was already added Requires admin access to the instance * @param instanceId (required) * @param addCollaboratorRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPutWithHttpInfo(UUID instanceId, AddCollaboratorRequestBody addCollaboratorRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPutValidateBeforeCall(instanceId, addCollaboratorRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add Collaborator (asynchronously) * Add a collaborator (account or team) to an instance. Parameters: - **instance_id**: UUID of the instance to add the collaborator to (from URL path) - **body**: Request body containing collaborator details - **account_id**: UUID of the account to add (mutually exclusive with team_id) - **team_id**: UUID of the team to add (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **201**: Collaborator added successfully - **400**: Invalid input (e.g., both account_id and team_id provided) - **409**: Collaborator was already added Requires admin access to the instance * @param instanceId (required) * @param addCollaboratorRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPutAsync(UUID instanceId, AddCollaboratorRequestBody addCollaboratorRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = addCollaboratorAccessV2InstancesInstanceIdCollaboratorsPutValidateBeforeCall(instanceId, addCollaboratorRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut * @param instanceId (required) * @param accountId (required) * @param schemaId (required) * @param role (optional, default to read) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutCall(UUID instanceId, UUID accountId, UUID schemaId, String role, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/collaborators/{account_id}" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())) .replace("{" + "account_id" + "}", localVarApiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } if (role != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("role", role)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutValidateBeforeCall(UUID instanceId, UUID accountId, UUID schemaId, String role, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut(Async)"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut(Async)"); } // verify the required parameter 'schemaId' is set if (schemaId == null) { throw new ApiException("Missing the required parameter 'schemaId' when calling addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut(Async)"); } return addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutCall(instanceId, accountId, schemaId, role, authorization, _callback); } /** * Add Collaborator * * @param instanceId (required) * @param accountId (required) * @param schemaId (required) * @param role (optional, default to read) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut(UUID instanceId, UUID accountId, UUID schemaId, String role, String authorization) throws ApiException { ApiResponse<Object> localVarResp = addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutWithHttpInfo(instanceId, accountId, schemaId, role, authorization); return localVarResp.getData(); } /** * Add Collaborator * * @param instanceId (required) * @param accountId (required) * @param schemaId (required) * @param role (optional, default to read) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutWithHttpInfo(UUID instanceId, UUID accountId, UUID schemaId, String role, String authorization) throws ApiException { okhttp3.Call localVarCall = addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutValidateBeforeCall(instanceId, accountId, schemaId, role, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add Collaborator (asynchronously) * * @param instanceId (required) * @param accountId (required) * @param schemaId (required) * @param role (optional, default to read) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutAsync(UUID instanceId, UUID accountId, UUID schemaId, String role, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = addCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutValidateBeforeCall(instanceId, accountId, schemaId, role, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPut * @param organizationId (required) * @param accountId (required) * @param addOrganizationMemberRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPutCall(UUID organizationId, UUID accountId, AddOrganizationMemberRequestBody addOrganizationMemberRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = addOrganizationMemberRequestBody; // create path and map variables String localVarPath = "/access_v2/organizations/{organization_id}/members/{account_id}" .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())) .replace("{" + "account_id" + "}", localVarApiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPutValidateBeforeCall(UUID organizationId, UUID accountId, AddOrganizationMemberRequestBody addOrganizationMemberRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException("Missing the required parameter 'organizationId' when calling addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPut(Async)"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPut(Async)"); } // verify the required parameter 'addOrganizationMemberRequestBody' is set if (addOrganizationMemberRequestBody == null) { throw new ApiException("Missing the required parameter 'addOrganizationMemberRequestBody' when calling addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPut(Async)"); } return addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPutCall(organizationId, accountId, addOrganizationMemberRequestBody, authorization, _callback); } /** * Add Organization Member * Add a member to an organization. Parameters: - **organization_id**: UUID of the organization to add the member to - **account_id**: UUID of the account to add as a member - **body**: Request body containing member details - **role**: Role of the member in the organization Returns: - **201**: Organization member added successfully * @param organizationId (required) * @param accountId (required) * @param addOrganizationMemberRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPut(UUID organizationId, UUID accountId, AddOrganizationMemberRequestBody addOrganizationMemberRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPutWithHttpInfo(organizationId, accountId, addOrganizationMemberRequestBody, authorization); return localVarResp.getData(); } /** * Add Organization Member * Add a member to an organization. Parameters: - **organization_id**: UUID of the organization to add the member to - **account_id**: UUID of the account to add as a member - **body**: Request body containing member details - **role**: Role of the member in the organization Returns: - **201**: Organization member added successfully * @param organizationId (required) * @param accountId (required) * @param addOrganizationMemberRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPutWithHttpInfo(UUID organizationId, UUID accountId, AddOrganizationMemberRequestBody addOrganizationMemberRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPutValidateBeforeCall(organizationId, accountId, addOrganizationMemberRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add Organization Member (asynchronously) * Add a member to an organization. Parameters: - **organization_id**: UUID of the organization to add the member to - **account_id**: UUID of the account to add as a member - **body**: Request body containing member details - **role**: Role of the member in the organization Returns: - **201**: Organization member added successfully * @param organizationId (required) * @param accountId (required) * @param addOrganizationMemberRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPutAsync(UUID organizationId, UUID accountId, AddOrganizationMemberRequestBody addOrganizationMemberRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = addOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPutValidateBeforeCall(organizationId, accountId, addOrganizationMemberRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPut * @param spaceId (required) * @param addSpaceCollaboratorRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPutCall(UUID spaceId, AddSpaceCollaboratorRequestBody addSpaceCollaboratorRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = addSpaceCollaboratorRequestBody; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}/collaborators" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPutValidateBeforeCall(UUID spaceId, AddSpaceCollaboratorRequestBody addSpaceCollaboratorRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPut(Async)"); } // verify the required parameter 'addSpaceCollaboratorRequestBody' is set if (addSpaceCollaboratorRequestBody == null) { throw new ApiException("Missing the required parameter 'addSpaceCollaboratorRequestBody' when calling addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPut(Async)"); } return addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPutCall(spaceId, addSpaceCollaboratorRequestBody, authorization, _callback); } /** * Add Space Collaborator * Add a collaborator (account or team) to a space. Parameters: - **space_id**: ID of the space to add the collaborator to - **body**: Request body containing collaborator details - **account_id**: UUID of the account to add (mutually exclusive with team_id) - **team_id**: UUID of the team to add (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **201**: Collaborator added to space successfully - **400**: Invalid input (e.g., both account_id and team_id provided) * @param spaceId (required) * @param addSpaceCollaboratorRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPut(UUID spaceId, AddSpaceCollaboratorRequestBody addSpaceCollaboratorRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPutWithHttpInfo(spaceId, addSpaceCollaboratorRequestBody, authorization); return localVarResp.getData(); } /** * Add Space Collaborator * Add a collaborator (account or team) to a space. Parameters: - **space_id**: ID of the space to add the collaborator to - **body**: Request body containing collaborator details - **account_id**: UUID of the account to add (mutually exclusive with team_id) - **team_id**: UUID of the team to add (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **201**: Collaborator added to space successfully - **400**: Invalid input (e.g., both account_id and team_id provided) * @param spaceId (required) * @param addSpaceCollaboratorRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPutWithHttpInfo(UUID spaceId, AddSpaceCollaboratorRequestBody addSpaceCollaboratorRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPutValidateBeforeCall(spaceId, addSpaceCollaboratorRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add Space Collaborator (asynchronously) * Add a collaborator (account or team) to a space. Parameters: - **space_id**: ID of the space to add the collaborator to - **body**: Request body containing collaborator details - **account_id**: UUID of the account to add (mutually exclusive with team_id) - **team_id**: UUID of the team to add (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **201**: Collaborator added to space successfully - **400**: Invalid input (e.g., both account_id and team_id provided) * @param spaceId (required) * @param addSpaceCollaboratorRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPutAsync(UUID spaceId, AddSpaceCollaboratorRequestBody addSpaceCollaboratorRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = addSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPutValidateBeforeCall(spaceId, addSpaceCollaboratorRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPut * @param teamId (required) * @param accountId (required) * @param addTeamMemberRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPutCall(UUID teamId, UUID accountId, AddTeamMemberRequestBody addTeamMemberRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = addTeamMemberRequestBody; // create path and map variables String localVarPath = "/access_v2/teams/{team_id}/members/{account_id}" .replace("{" + "team_id" + "}", localVarApiClient.escapeString(teamId.toString())) .replace("{" + "account_id" + "}", localVarApiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPutValidateBeforeCall(UUID teamId, UUID accountId, AddTeamMemberRequestBody addTeamMemberRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'teamId' is set if (teamId == null) { throw new ApiException("Missing the required parameter 'teamId' when calling addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPut(Async)"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPut(Async)"); } // verify the required parameter 'addTeamMemberRequestBody' is set if (addTeamMemberRequestBody == null) { throw new ApiException("Missing the required parameter 'addTeamMemberRequestBody' when calling addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPut(Async)"); } return addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPutCall(teamId, accountId, addTeamMemberRequestBody, authorization, _callback); } /** * Add Team Member * Add a member to a team. Parameters: - **team_id**: UUID of the team to add the member to - **account_id**: UUID of the account to add as a member - **body**: Request body containing member details - **role**: Role of the member in the team Returns: - **201**: Team member added successfully * @param teamId (required) * @param accountId (required) * @param addTeamMemberRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPut(UUID teamId, UUID accountId, AddTeamMemberRequestBody addTeamMemberRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPutWithHttpInfo(teamId, accountId, addTeamMemberRequestBody, authorization); return localVarResp.getData(); } /** * Add Team Member * Add a member to a team. Parameters: - **team_id**: UUID of the team to add the member to - **account_id**: UUID of the account to add as a member - **body**: Request body containing member details - **role**: Role of the member in the team Returns: - **201**: Team member added successfully * @param teamId (required) * @param accountId (required) * @param addTeamMemberRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPutWithHttpInfo(UUID teamId, UUID accountId, AddTeamMemberRequestBody addTeamMemberRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPutValidateBeforeCall(teamId, accountId, addTeamMemberRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add Team Member (asynchronously) * Add a member to a team. Parameters: - **team_id**: UUID of the team to add the member to - **account_id**: UUID of the account to add as a member - **body**: Request body containing member details - **role**: Role of the member in the team Returns: - **201**: Team member added successfully * @param teamId (required) * @param accountId (required) * @param addTeamMemberRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPutAsync(UUID teamId, UUID accountId, AddTeamMemberRequestBody addTeamMemberRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = addTeamMemberAccessV2TeamsTeamIdMembersAccountIdPutValidateBeforeCall(teamId, accountId, addTeamMemberRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPut * @param moduleName (required) * @param modelName (required) * @param id (required) * @param labelField (required) * @param labelId (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPutCall(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}/{id}/{label_field}/{label_id}" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) .replace("{" + "label_field" + "}", localVarApiClient.escapeString(labelField.toString())) .replace("{" + "label_id" + "}", localVarApiClient.escapeString(labelId.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPutValidateBeforeCall(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPut(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPut(Async)"); } // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPut(Async)"); } // verify the required parameter 'labelField' is set if (labelField == null) { throw new ApiException("Missing the required parameter 'labelField' when calling attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPut(Async)"); } // verify the required parameter 'labelId' is set if (labelId == null) { throw new ApiException("Missing the required parameter 'labelId' when calling attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPut(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPut(Async)"); } return attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPutCall(moduleName, modelName, id, labelField, labelId, instanceId, schemaId, authorization, _callback); } /** * Attach Label * * @param moduleName (required) * @param modelName (required) * @param id (required) * @param labelField (required) * @param labelId (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPut(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPutWithHttpInfo(moduleName, modelName, id, labelField, labelId, instanceId, schemaId, authorization); return localVarResp.getData(); } /** * Attach Label * * @param moduleName (required) * @param modelName (required) * @param id (required) * @param labelField (required) * @param labelId (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPutWithHttpInfo(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPutValidateBeforeCall(moduleName, modelName, id, labelField, labelId, instanceId, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Attach Label (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param id (required) * @param labelField (required) * @param labelId (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPutAsync(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = attachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdPutValidateBeforeCall(moduleName, modelName, id, labelField, labelId, instanceId, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPut * @param spaceId (required) * @param instanceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPutCall(UUID spaceId, UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}/instances/{instance_id}" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPutValidateBeforeCall(UUID spaceId, UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPut(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPut(Async)"); } return attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPutCall(spaceId, instanceId, authorization, _callback); } /** * Attach Space To Instance * Attach a space to a specific instance. Parameters: - **space_id**: ID of the space to attach - **instance_id**: UUID of the instance to attach the space to (from URL path) Returns: - **200**: Space attached to instance successfully Requires admin access to the instance * @param spaceId (required) * @param instanceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPut(UUID spaceId, UUID instanceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPutWithHttpInfo(spaceId, instanceId, authorization); return localVarResp.getData(); } /** * Attach Space To Instance * Attach a space to a specific instance. Parameters: - **space_id**: ID of the space to attach - **instance_id**: UUID of the instance to attach the space to (from URL path) Returns: - **200**: Space attached to instance successfully Requires admin access to the instance * @param spaceId (required) * @param instanceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPutWithHttpInfo(UUID spaceId, UUID instanceId, String authorization) throws ApiException { okhttp3.Call localVarCall = attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPutValidateBeforeCall(spaceId, instanceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Attach Space To Instance (asynchronously) * Attach a space to a specific instance. Parameters: - **space_id**: ID of the space to attach - **instance_id**: UUID of the instance to attach the space to (from URL path) Returns: - **200**: Space attached to instance successfully Requires admin access to the instance * @param spaceId (required) * @param instanceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPutAsync(UUID spaceId, UUID instanceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = attachSpaceToInstanceAccessV2SpacesSpaceIdInstancesInstanceIdPutValidateBeforeCall(spaceId, instanceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for checkCacheAccessDebugCacheAccessGet * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public okhttp3.Call checkCacheAccessDebugCacheAccessGetCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/_debug/cache-access"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call checkCacheAccessDebugCacheAccessGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { return checkCacheAccessDebugCacheAccessGetCall(_callback); } /** * Check Cache Access * * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public Object checkCacheAccessDebugCacheAccessGet() throws ApiException { ApiResponse<Object> localVarResp = checkCacheAccessDebugCacheAccessGetWithHttpInfo(); return localVarResp.getData(); } /** * Check Cache Access * * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public ApiResponse<Object> checkCacheAccessDebugCacheAccessGetWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = checkCacheAccessDebugCacheAccessGetValidateBeforeCall(null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Check Cache Access (asynchronously) * * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public okhttp3.Call checkCacheAccessDebugCacheAccessGetAsync(final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = checkCacheAccessDebugCacheAccessGetValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for checkDbAccessDebugDbAccessPost * @param dbUrlRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call checkDbAccessDebugDbAccessPostCall(DbUrlRequest dbUrlRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = dbUrlRequest; // create path and map variables String localVarPath = "/_debug/db-access"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call checkDbAccessDebugDbAccessPostValidateBeforeCall(DbUrlRequest dbUrlRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dbUrlRequest' is set if (dbUrlRequest == null) { throw new ApiException("Missing the required parameter 'dbUrlRequest' when calling checkDbAccessDebugDbAccessPost(Async)"); } return checkDbAccessDebugDbAccessPostCall(dbUrlRequest, _callback); } /** * Check Db Access * * @param dbUrlRequest (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object checkDbAccessDebugDbAccessPost(DbUrlRequest dbUrlRequest) throws ApiException { ApiResponse<Object> localVarResp = checkDbAccessDebugDbAccessPostWithHttpInfo(dbUrlRequest); return localVarResp.getData(); } /** * Check Db Access * * @param dbUrlRequest (required) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> checkDbAccessDebugDbAccessPostWithHttpInfo(DbUrlRequest dbUrlRequest) throws ApiException { okhttp3.Call localVarCall = checkDbAccessDebugDbAccessPostValidateBeforeCall(dbUrlRequest, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Check Db Access (asynchronously) * * @param dbUrlRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call checkDbAccessDebugDbAccessPostAsync(DbUrlRequest dbUrlRequest, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = checkDbAccessDebugDbAccessPostValidateBeforeCall(dbUrlRequest, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for checkDbServerAccessDbServerCheckAccessPost * @param name (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call checkDbServerAccessDbServerCheckAccessPostCall(String name, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/db/server/check-access"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (name != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call checkDbServerAccessDbServerCheckAccessPostValidateBeforeCall(String name, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling checkDbServerAccessDbServerCheckAccessPost(Async)"); } return checkDbServerAccessDbServerCheckAccessPostCall(name, authorization, _callback); } /** * Check Db Server Access * * @param name (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object checkDbServerAccessDbServerCheckAccessPost(String name, String authorization) throws ApiException { ApiResponse<Object> localVarResp = checkDbServerAccessDbServerCheckAccessPostWithHttpInfo(name, authorization); return localVarResp.getData(); } /** * Check Db Server Access * * @param name (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> checkDbServerAccessDbServerCheckAccessPostWithHttpInfo(String name, String authorization) throws ApiException { okhttp3.Call localVarCall = checkDbServerAccessDbServerCheckAccessPostValidateBeforeCall(name, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Check Db Server Access (asynchronously) * * @param name (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call checkDbServerAccessDbServerCheckAccessPostAsync(String name, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = checkDbServerAccessDbServerCheckAccessPostValidateBeforeCall(name, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for checkLambdaAccessDebugLambdaAccessGet * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public okhttp3.Call checkLambdaAccessDebugLambdaAccessGetCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/_debug/lambda-access"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call checkLambdaAccessDebugLambdaAccessGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { return checkLambdaAccessDebugLambdaAccessGetCall(_callback); } /** * Check Lambda Access * * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public Object checkLambdaAccessDebugLambdaAccessGet() throws ApiException { ApiResponse<Object> localVarResp = checkLambdaAccessDebugLambdaAccessGetWithHttpInfo(); return localVarResp.getData(); } /** * Check Lambda Access * * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public ApiResponse<Object> checkLambdaAccessDebugLambdaAccessGetWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = checkLambdaAccessDebugLambdaAccessGetValidateBeforeCall(null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Check Lambda Access (asynchronously) * * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public okhttp3.Call checkLambdaAccessDebugLambdaAccessGetAsync(final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = checkLambdaAccessDebugLambdaAccessGetValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createArtifactInstancesInstanceIdArtifactsCreatePost * @param instanceId (required) * @param createArtifactRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createArtifactInstancesInstanceIdArtifactsCreatePostCall(UUID instanceId, CreateArtifactRequestBody createArtifactRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = createArtifactRequestBody; // create path and map variables String localVarPath = "/instances/{instance_id}/artifacts/create" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createArtifactInstancesInstanceIdArtifactsCreatePostValidateBeforeCall(UUID instanceId, CreateArtifactRequestBody createArtifactRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling createArtifactInstancesInstanceIdArtifactsCreatePost(Async)"); } // verify the required parameter 'createArtifactRequestBody' is set if (createArtifactRequestBody == null) { throw new ApiException("Missing the required parameter 'createArtifactRequestBody' when calling createArtifactInstancesInstanceIdArtifactsCreatePost(Async)"); } return createArtifactInstancesInstanceIdArtifactsCreatePostCall(instanceId, createArtifactRequestBody, authorization, _callback); } /** * Create Artifact * * @param instanceId (required) * @param createArtifactRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object createArtifactInstancesInstanceIdArtifactsCreatePost(UUID instanceId, CreateArtifactRequestBody createArtifactRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = createArtifactInstancesInstanceIdArtifactsCreatePostWithHttpInfo(instanceId, createArtifactRequestBody, authorization); return localVarResp.getData(); } /** * Create Artifact * * @param instanceId (required) * @param createArtifactRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> createArtifactInstancesInstanceIdArtifactsCreatePostWithHttpInfo(UUID instanceId, CreateArtifactRequestBody createArtifactRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = createArtifactInstancesInstanceIdArtifactsCreatePostValidateBeforeCall(instanceId, createArtifactRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Artifact (asynchronously) * * @param instanceId (required) * @param createArtifactRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createArtifactInstancesInstanceIdArtifactsCreatePostAsync(UUID instanceId, CreateArtifactRequestBody createArtifactRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = createArtifactInstancesInstanceIdArtifactsCreatePostValidateBeforeCall(instanceId, createArtifactRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createInstanceInstancesPut * @param name (required) * @param storage (optional, default to create-s3) * @param schemaStr (optional) * @param dbServerKey (optional) * @param storageUid (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createInstanceInstancesPutCall(String name, String storage, String schemaStr, String dbServerKey, String storageUid, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (name != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); } if (storage != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("storage", storage)); } if (schemaStr != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_str", schemaStr)); } if (dbServerKey != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("db_server_key", dbServerKey)); } if (storageUid != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("storage_uid", storageUid)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createInstanceInstancesPutValidateBeforeCall(String name, String storage, String schemaStr, String dbServerKey, String storageUid, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling createInstanceInstancesPut(Async)"); } return createInstanceInstancesPutCall(name, storage, schemaStr, dbServerKey, storageUid, authorization, _callback); } /** * Create Instance * * @param name (required) * @param storage (optional, default to create-s3) * @param schemaStr (optional) * @param dbServerKey (optional) * @param storageUid (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object createInstanceInstancesPut(String name, String storage, String schemaStr, String dbServerKey, String storageUid, String authorization) throws ApiException { ApiResponse<Object> localVarResp = createInstanceInstancesPutWithHttpInfo(name, storage, schemaStr, dbServerKey, storageUid, authorization); return localVarResp.getData(); } /** * Create Instance * * @param name (required) * @param storage (optional, default to create-s3) * @param schemaStr (optional) * @param dbServerKey (optional) * @param storageUid (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> createInstanceInstancesPutWithHttpInfo(String name, String storage, String schemaStr, String dbServerKey, String storageUid, String authorization) throws ApiException { okhttp3.Call localVarCall = createInstanceInstancesPutValidateBeforeCall(name, storage, schemaStr, dbServerKey, storageUid, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Instance (asynchronously) * * @param name (required) * @param storage (optional, default to create-s3) * @param schemaStr (optional) * @param dbServerKey (optional) * @param storageUid (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createInstanceInstancesPutAsync(String name, String storage, String schemaStr, String dbServerKey, String storageUid, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = createInstanceInstancesPutValidateBeforeCall(name, storage, schemaStr, dbServerKey, storageUid, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createRecordsInstancesInstanceIdModulesModuleNameModelNamePut * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param body (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createRecordsInstancesInstanceIdModulesModuleNameModelNamePutCall(String moduleName, String modelName, UUID instanceId, Object body, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createRecordsInstancesInstanceIdModulesModuleNameModelNamePutValidateBeforeCall(String moduleName, String modelName, UUID instanceId, Object body, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling createRecordsInstancesInstanceIdModulesModuleNameModelNamePut(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling createRecordsInstancesInstanceIdModulesModuleNameModelNamePut(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling createRecordsInstancesInstanceIdModulesModuleNameModelNamePut(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createRecordsInstancesInstanceIdModulesModuleNameModelNamePut(Async)"); } return createRecordsInstancesInstanceIdModulesModuleNameModelNamePutCall(moduleName, modelName, instanceId, body, schemaId, authorization, _callback); } /** * Create Records * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param body (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object createRecordsInstancesInstanceIdModulesModuleNameModelNamePut(String moduleName, String modelName, UUID instanceId, Object body, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = createRecordsInstancesInstanceIdModulesModuleNameModelNamePutWithHttpInfo(moduleName, modelName, instanceId, body, schemaId, authorization); return localVarResp.getData(); } /** * Create Records * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param body (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> createRecordsInstancesInstanceIdModulesModuleNameModelNamePutWithHttpInfo(String moduleName, String modelName, UUID instanceId, Object body, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = createRecordsInstancesInstanceIdModulesModuleNameModelNamePutValidateBeforeCall(moduleName, modelName, instanceId, body, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Records (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param body (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createRecordsInstancesInstanceIdModulesModuleNameModelNamePutAsync(String moduleName, String modelName, UUID instanceId, Object body, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = createRecordsInstancesInstanceIdModulesModuleNameModelNamePutValidateBeforeCall(moduleName, modelName, instanceId, body, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createSpaceAccessV2SpacesPut * @param createSpaceRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createSpaceAccessV2SpacesPutCall(CreateSpaceRequestBody createSpaceRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = createSpaceRequestBody; // create path and map variables String localVarPath = "/access_v2/spaces"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createSpaceAccessV2SpacesPutValidateBeforeCall(CreateSpaceRequestBody createSpaceRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createSpaceRequestBody' is set if (createSpaceRequestBody == null) { throw new ApiException("Missing the required parameter 'createSpaceRequestBody' when calling createSpaceAccessV2SpacesPut(Async)"); } return createSpaceAccessV2SpacesPutCall(createSpaceRequestBody, authorization, _callback); } /** * Create Space * Create a new space. Parameters: - **body**: Request body containing space details - **name**: Name of the space - **organization_id**: UUID of the organization - **description**: Optional description of the space Returns: - **201**: Space created successfully * @param createSpaceRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object createSpaceAccessV2SpacesPut(CreateSpaceRequestBody createSpaceRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = createSpaceAccessV2SpacesPutWithHttpInfo(createSpaceRequestBody, authorization); return localVarResp.getData(); } /** * Create Space * Create a new space. Parameters: - **body**: Request body containing space details - **name**: Name of the space - **organization_id**: UUID of the organization - **description**: Optional description of the space Returns: - **201**: Space created successfully * @param createSpaceRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> createSpaceAccessV2SpacesPutWithHttpInfo(CreateSpaceRequestBody createSpaceRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = createSpaceAccessV2SpacesPutValidateBeforeCall(createSpaceRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Space (asynchronously) * Create a new space. Parameters: - **body**: Request body containing space details - **name**: Name of the space - **organization_id**: UUID of the organization - **description**: Optional description of the space Returns: - **201**: Space created successfully * @param createSpaceRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createSpaceAccessV2SpacesPutAsync(CreateSpaceRequestBody createSpaceRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = createSpaceAccessV2SpacesPutValidateBeforeCall(createSpaceRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createTeamAccessV2TeamsPut * @param createTeamRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createTeamAccessV2TeamsPutCall(CreateTeamRequestBody createTeamRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = createTeamRequestBody; // create path and map variables String localVarPath = "/access_v2/teams"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createTeamAccessV2TeamsPutValidateBeforeCall(CreateTeamRequestBody createTeamRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createTeamRequestBody' is set if (createTeamRequestBody == null) { throw new ApiException("Missing the required parameter 'createTeamRequestBody' when calling createTeamAccessV2TeamsPut(Async)"); } return createTeamAccessV2TeamsPutCall(createTeamRequestBody, authorization, _callback); } /** * Create Team * Create a new team. Parameters: - **body**: Request body containing team details - **name**: Name of the team - **organization_id**: UUID of the organization - **description**: Optional description of the team Returns: - **201**: Team created successfully * @param createTeamRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object createTeamAccessV2TeamsPut(CreateTeamRequestBody createTeamRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = createTeamAccessV2TeamsPutWithHttpInfo(createTeamRequestBody, authorization); return localVarResp.getData(); } /** * Create Team * Create a new team. Parameters: - **body**: Request body containing team details - **name**: Name of the team - **organization_id**: UUID of the organization - **description**: Optional description of the team Returns: - **201**: Team created successfully * @param createTeamRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> createTeamAccessV2TeamsPutWithHttpInfo(CreateTeamRequestBody createTeamRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = createTeamAccessV2TeamsPutValidateBeforeCall(createTeamRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Team (asynchronously) * Create a new team. Parameters: - **body**: Request body containing team details - **name**: Name of the team - **organization_id**: UUID of the organization - **description**: Optional description of the team Returns: - **201**: Team created successfully * @param createTeamRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createTeamAccessV2TeamsPutAsync(CreateTeamRequestBody createTeamRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = createTeamAccessV2TeamsPutValidateBeforeCall(createTeamRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createTransformInstancesInstanceIdTransformsPost * @param instanceId (required) * @param createTransformRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createTransformInstancesInstanceIdTransformsPostCall(UUID instanceId, CreateTransformRequestBody createTransformRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = createTransformRequestBody; // create path and map variables String localVarPath = "/instances/{instance_id}/transforms" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createTransformInstancesInstanceIdTransformsPostValidateBeforeCall(UUID instanceId, CreateTransformRequestBody createTransformRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling createTransformInstancesInstanceIdTransformsPost(Async)"); } // verify the required parameter 'createTransformRequestBody' is set if (createTransformRequestBody == null) { throw new ApiException("Missing the required parameter 'createTransformRequestBody' when calling createTransformInstancesInstanceIdTransformsPost(Async)"); } return createTransformInstancesInstanceIdTransformsPostCall(instanceId, createTransformRequestBody, authorization, _callback); } /** * Create Transform * * @param instanceId (required) * @param createTransformRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object createTransformInstancesInstanceIdTransformsPost(UUID instanceId, CreateTransformRequestBody createTransformRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = createTransformInstancesInstanceIdTransformsPostWithHttpInfo(instanceId, createTransformRequestBody, authorization); return localVarResp.getData(); } /** * Create Transform * * @param instanceId (required) * @param createTransformRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> createTransformInstancesInstanceIdTransformsPostWithHttpInfo(UUID instanceId, CreateTransformRequestBody createTransformRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = createTransformInstancesInstanceIdTransformsPostValidateBeforeCall(instanceId, createTransformRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create Transform (asynchronously) * * @param instanceId (required) * @param createTransformRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call createTransformInstancesInstanceIdTransformsPostAsync(UUID instanceId, CreateTransformRequestBody createTransformRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = createTransformInstancesInstanceIdTransformsPostValidateBeforeCall(instanceId, createTransformRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete * @param instanceId (required) * @param accountId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteCall(UUID instanceId, UUID accountId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/collaborators/{account_id}" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())) .replace("{" + "account_id" + "}", localVarApiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteValidateBeforeCall(UUID instanceId, UUID accountId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete(Async)"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete(Async)"); } return deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteCall(instanceId, accountId, authorization, _callback); } /** * Delete Collaborator * * @param instanceId (required) * @param accountId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete(UUID instanceId, UUID accountId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteWithHttpInfo(instanceId, accountId, authorization); return localVarResp.getData(); } /** * Delete Collaborator * * @param instanceId (required) * @param accountId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteWithHttpInfo(UUID instanceId, UUID accountId, String authorization) throws ApiException { okhttp3.Call localVarCall = deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteValidateBeforeCall(instanceId, accountId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete Collaborator (asynchronously) * * @param instanceId (required) * @param accountId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteAsync(UUID instanceId, UUID accountId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = deleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteValidateBeforeCall(instanceId, accountId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteInstanceInstancesInstanceIdDelete * @param instanceId (required) * @param instanceName (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteInstanceInstancesInstanceIdDeleteCall(UUID instanceId, String instanceName, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (instanceName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("instance_name", instanceName)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteInstanceInstancesInstanceIdDeleteValidateBeforeCall(UUID instanceId, String instanceName, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling deleteInstanceInstancesInstanceIdDelete(Async)"); } // verify the required parameter 'instanceName' is set if (instanceName == null) { throw new ApiException("Missing the required parameter 'instanceName' when calling deleteInstanceInstancesInstanceIdDelete(Async)"); } return deleteInstanceInstancesInstanceIdDeleteCall(instanceId, instanceName, authorization, _callback); } /** * Delete Instance * * @param instanceId (required) * @param instanceName (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object deleteInstanceInstancesInstanceIdDelete(UUID instanceId, String instanceName, String authorization) throws ApiException { ApiResponse<Object> localVarResp = deleteInstanceInstancesInstanceIdDeleteWithHttpInfo(instanceId, instanceName, authorization); return localVarResp.getData(); } /** * Delete Instance * * @param instanceId (required) * @param instanceName (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> deleteInstanceInstancesInstanceIdDeleteWithHttpInfo(UUID instanceId, String instanceName, String authorization) throws ApiException { okhttp3.Call localVarCall = deleteInstanceInstancesInstanceIdDeleteValidateBeforeCall(instanceId, instanceName, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete Instance (asynchronously) * * @param instanceId (required) * @param instanceName (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteInstanceInstancesInstanceIdDeleteAsync(UUID instanceId, String instanceName, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = deleteInstanceInstancesInstanceIdDeleteValidateBeforeCall(instanceId, instanceName, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete * @param moduleName (required) * @param modelName (required) * @param uid (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteCall(String moduleName, String modelName, String uid, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}/{uid}" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "uid" + "}", localVarApiClient.escapeString(uid.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteValidateBeforeCall(String moduleName, String modelName, String uid, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(Async)"); } // verify the required parameter 'uid' is set if (uid == null) { throw new ApiException("Missing the required parameter 'uid' when calling deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(Async)"); } return deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteCall(moduleName, modelName, uid, instanceId, schemaId, authorization, _callback); } /** * Delete Record * * @param moduleName (required) * @param modelName (required) * @param uid (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(String moduleName, String modelName, String uid, UUID instanceId, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteWithHttpInfo(moduleName, modelName, uid, instanceId, schemaId, authorization); return localVarResp.getData(); } /** * Delete Record * * @param moduleName (required) * @param modelName (required) * @param uid (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteWithHttpInfo(String moduleName, String modelName, String uid, UUID instanceId, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteValidateBeforeCall(moduleName, modelName, uid, instanceId, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete Record (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param uid (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteAsync(String moduleName, String modelName, String uid, UUID instanceId, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = deleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteValidateBeforeCall(moduleName, modelName, uid, instanceId, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteSpaceAccessV2SpacesSpaceIdDelete * @param spaceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteSpaceAccessV2SpacesSpaceIdDeleteCall(UUID spaceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteSpaceAccessV2SpacesSpaceIdDeleteValidateBeforeCall(UUID spaceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling deleteSpaceAccessV2SpacesSpaceIdDelete(Async)"); } return deleteSpaceAccessV2SpacesSpaceIdDeleteCall(spaceId, authorization, _callback); } /** * Delete Space * Delete a space and detach it from the instance. Parameters: - **space_id**: ID of the space to delete Returns: - **200**: Space deleted successfully - **404**: Space not found * @param spaceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object deleteSpaceAccessV2SpacesSpaceIdDelete(UUID spaceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = deleteSpaceAccessV2SpacesSpaceIdDeleteWithHttpInfo(spaceId, authorization); return localVarResp.getData(); } /** * Delete Space * Delete a space and detach it from the instance. Parameters: - **space_id**: ID of the space to delete Returns: - **200**: Space deleted successfully - **404**: Space not found * @param spaceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> deleteSpaceAccessV2SpacesSpaceIdDeleteWithHttpInfo(UUID spaceId, String authorization) throws ApiException { okhttp3.Call localVarCall = deleteSpaceAccessV2SpacesSpaceIdDeleteValidateBeforeCall(spaceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete Space (asynchronously) * Delete a space and detach it from the instance. Parameters: - **space_id**: ID of the space to delete Returns: - **200**: Space deleted successfully - **404**: Space not found * @param spaceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteSpaceAccessV2SpacesSpaceIdDeleteAsync(UUID spaceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = deleteSpaceAccessV2SpacesSpaceIdDeleteValidateBeforeCall(spaceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteTeamAccessV2TeamsTeamIdDelete * @param teamId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteTeamAccessV2TeamsTeamIdDeleteCall(UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/teams/{team_id}" .replace("{" + "team_id" + "}", localVarApiClient.escapeString(teamId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteTeamAccessV2TeamsTeamIdDeleteValidateBeforeCall(UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'teamId' is set if (teamId == null) { throw new ApiException("Missing the required parameter 'teamId' when calling deleteTeamAccessV2TeamsTeamIdDelete(Async)"); } return deleteTeamAccessV2TeamsTeamIdDeleteCall(teamId, authorization, _callback); } /** * Delete Team * Delete a team. Parameters: - **team_id**: UUID of the team to delete Returns: - **200**: Team deleted successfully * @param teamId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object deleteTeamAccessV2TeamsTeamIdDelete(UUID teamId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = deleteTeamAccessV2TeamsTeamIdDeleteWithHttpInfo(teamId, authorization); return localVarResp.getData(); } /** * Delete Team * Delete a team. Parameters: - **team_id**: UUID of the team to delete Returns: - **200**: Team deleted successfully * @param teamId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> deleteTeamAccessV2TeamsTeamIdDeleteWithHttpInfo(UUID teamId, String authorization) throws ApiException { okhttp3.Call localVarCall = deleteTeamAccessV2TeamsTeamIdDeleteValidateBeforeCall(teamId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete Team (asynchronously) * Delete a team. Parameters: - **team_id**: UUID of the team to delete Returns: - **200**: Team deleted successfully * @param teamId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call deleteTeamAccessV2TeamsTeamIdDeleteAsync(UUID teamId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = deleteTeamAccessV2TeamsTeamIdDeleteValidateBeforeCall(teamId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDelete * @param moduleName (required) * @param modelName (required) * @param id (required) * @param labelField (required) * @param labelId (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDeleteCall(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}/{id}/{label_field}/{label_id}" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) .replace("{" + "label_field" + "}", localVarApiClient.escapeString(labelField.toString())) .replace("{" + "label_id" + "}", localVarApiClient.escapeString(labelId.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDeleteValidateBeforeCall(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDelete(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDelete(Async)"); } // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDelete(Async)"); } // verify the required parameter 'labelField' is set if (labelField == null) { throw new ApiException("Missing the required parameter 'labelField' when calling detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDelete(Async)"); } // verify the required parameter 'labelId' is set if (labelId == null) { throw new ApiException("Missing the required parameter 'labelId' when calling detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDelete(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDelete(Async)"); } return detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDeleteCall(moduleName, modelName, id, labelField, labelId, instanceId, schemaId, authorization, _callback); } /** * Detach Label * * @param moduleName (required) * @param modelName (required) * @param id (required) * @param labelField (required) * @param labelId (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDelete(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDeleteWithHttpInfo(moduleName, modelName, id, labelField, labelId, instanceId, schemaId, authorization); return localVarResp.getData(); } /** * Detach Label * * @param moduleName (required) * @param modelName (required) * @param id (required) * @param labelField (required) * @param labelId (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDeleteWithHttpInfo(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDeleteValidateBeforeCall(moduleName, modelName, id, labelField, labelId, instanceId, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Detach Label (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param id (required) * @param labelField (required) * @param labelId (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDeleteAsync(String moduleName, String modelName, Integer id, String labelField, Integer labelId, UUID instanceId, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = detachLabelInstancesInstanceIdModulesModuleNameModelNameIdLabelFieldLabelIdDeleteValidateBeforeCall(moduleName, modelName, id, labelField, labelId, instanceId, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDelete * @param spaceId (required) * @param instanceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDeleteCall(UUID spaceId, UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}/instances/{instance_id}" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDeleteValidateBeforeCall(UUID spaceId, UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDelete(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDelete(Async)"); } return detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDeleteCall(spaceId, instanceId, authorization, _callback); } /** * Detach Space From Instance * Detach a space from a specific instance. Parameters: - **space_id**: ID of the space to detach - **instance_id**: UUID of the instance to detach the space from (from URL path) Returns: - **200**: Space detached from instance successfully Requires admin access to the instance * @param spaceId (required) * @param instanceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDelete(UUID spaceId, UUID instanceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDeleteWithHttpInfo(spaceId, instanceId, authorization); return localVarResp.getData(); } /** * Detach Space From Instance * Detach a space from a specific instance. Parameters: - **space_id**: ID of the space to detach - **instance_id**: UUID of the instance to detach the space from (from URL path) Returns: - **200**: Space detached from instance successfully Requires admin access to the instance * @param spaceId (required) * @param instanceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDeleteWithHttpInfo(UUID spaceId, UUID instanceId, String authorization) throws ApiException { okhttp3.Call localVarCall = detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDeleteValidateBeforeCall(spaceId, instanceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Detach Space From Instance (asynchronously) * Detach a space from a specific instance. Parameters: - **space_id**: ID of the space to detach - **instance_id**: UUID of the instance to detach the space from (from URL path) Returns: - **200**: Space detached from instance successfully Requires admin access to the instance * @param spaceId (required) * @param instanceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDeleteAsync(UUID spaceId, UUID instanceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = detachSpaceFromInstanceAccessV2SpacesSpaceIdInstancesInstanceIdDeleteValidateBeforeCall(spaceId, instanceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getCallerAccountAccountGet * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getCallerAccountAccountGetCall(String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/account"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getCallerAccountAccountGetValidateBeforeCall(String authorization, final ApiCallback _callback) throws ApiException { return getCallerAccountAccountGetCall(authorization, _callback); } /** * Get Caller Account * * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getCallerAccountAccountGet(String authorization) throws ApiException { ApiResponse<Object> localVarResp = getCallerAccountAccountGetWithHttpInfo(authorization); return localVarResp.getData(); } /** * Get Caller Account * * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getCallerAccountAccountGetWithHttpInfo(String authorization) throws ApiException { okhttp3.Call localVarCall = getCallerAccountAccountGetValidateBeforeCall(authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Caller Account (asynchronously) * * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getCallerAccountAccountGetAsync(String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getCallerAccountAccountGetValidateBeforeCall(authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDbTokenAccessV2InstancesInstanceIdDbTokenGet * @param instanceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getDbTokenAccessV2InstancesInstanceIdDbTokenGetCall(UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/instances/{instance_id}/db_token" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getDbTokenAccessV2InstancesInstanceIdDbTokenGetValidateBeforeCall(UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getDbTokenAccessV2InstancesInstanceIdDbTokenGet(Async)"); } return getDbTokenAccessV2InstancesInstanceIdDbTokenGetCall(instanceId, authorization, _callback); } /** * Get Db Token * Get a database token for the specified instance. This token can be used to authenticate with the instance&#39;s database. Parameters: - **instance_id**: UUID of the instance to get the token for (from URL path) Returns: - **200**: Database token retrieved successfully - **token**: The database token - **401**: Unauthorized * @param instanceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getDbTokenAccessV2InstancesInstanceIdDbTokenGet(UUID instanceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getDbTokenAccessV2InstancesInstanceIdDbTokenGetWithHttpInfo(instanceId, authorization); return localVarResp.getData(); } /** * Get Db Token * Get a database token for the specified instance. This token can be used to authenticate with the instance&#39;s database. Parameters: - **instance_id**: UUID of the instance to get the token for (from URL path) Returns: - **200**: Database token retrieved successfully - **token**: The database token - **401**: Unauthorized * @param instanceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getDbTokenAccessV2InstancesInstanceIdDbTokenGetWithHttpInfo(UUID instanceId, String authorization) throws ApiException { okhttp3.Call localVarCall = getDbTokenAccessV2InstancesInstanceIdDbTokenGetValidateBeforeCall(instanceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Db Token (asynchronously) * Get a database token for the specified instance. This token can be used to authenticate with the instance&#39;s database. Parameters: - **instance_id**: UUID of the instance to get the token for (from URL path) Returns: - **200**: Database token retrieved successfully - **token**: The database token - **401**: Unauthorized * @param instanceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getDbTokenAccessV2InstancesInstanceIdDbTokenGetAsync(UUID instanceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getDbTokenAccessV2InstancesInstanceIdDbTokenGetValidateBeforeCall(instanceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getInstanceStatisticsInstancesInstanceIdStatisticsGet * @param instanceId (required) * @param q In ${module}.${model} format (case-sensitive) (optional) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getInstanceStatisticsInstancesInstanceIdStatisticsGetCall(UUID instanceId, List<String> q, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/statistics" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (q != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "q", q)); } if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getInstanceStatisticsInstancesInstanceIdStatisticsGetValidateBeforeCall(UUID instanceId, List<String> q, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getInstanceStatisticsInstancesInstanceIdStatisticsGet(Async)"); } return getInstanceStatisticsInstancesInstanceIdStatisticsGetCall(instanceId, q, schemaId, authorization, _callback); } /** * Get Instance Statistics * * @param instanceId (required) * @param q In ${module}.${model} format (case-sensitive) (optional) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getInstanceStatisticsInstancesInstanceIdStatisticsGet(UUID instanceId, List<String> q, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getInstanceStatisticsInstancesInstanceIdStatisticsGetWithHttpInfo(instanceId, q, schemaId, authorization); return localVarResp.getData(); } /** * Get Instance Statistics * * @param instanceId (required) * @param q In ${module}.${model} format (case-sensitive) (optional) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getInstanceStatisticsInstancesInstanceIdStatisticsGetWithHttpInfo(UUID instanceId, List<String> q, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = getInstanceStatisticsInstancesInstanceIdStatisticsGetValidateBeforeCall(instanceId, q, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Instance Statistics (asynchronously) * * @param instanceId (required) * @param q In ${module}.${model} format (case-sensitive) (optional) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getInstanceStatisticsInstancesInstanceIdStatisticsGetAsync(UUID instanceId, List<String> q, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getInstanceStatisticsInstancesInstanceIdStatisticsGetValidateBeforeCall(instanceId, q, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getIpDebugIpGet * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public okhttp3.Call getIpDebugIpGetCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/_debug/ip"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getIpDebugIpGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getIpDebugIpGetCall(_callback); } /** * Get Ip * * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public Object getIpDebugIpGet() throws ApiException { ApiResponse<Object> localVarResp = getIpDebugIpGetWithHttpInfo(); return localVarResp.getData(); } /** * Get Ip * * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public ApiResponse<Object> getIpDebugIpGetWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getIpDebugIpGetValidateBeforeCall(null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Ip (asynchronously) * * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> </table> */ public okhttp3.Call getIpDebugIpGetAsync(final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getIpDebugIpGetValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetCall(UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/non_empty_tables" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetValidateBeforeCall(UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet(Async)"); } return getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetCall(instanceId, schemaId, authorization, _callback); } /** * Get Non Empty Tables * * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet(UUID instanceId, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetWithHttpInfo(instanceId, schemaId, authorization); return localVarResp.getData(); } /** * Get Non Empty Tables * * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetWithHttpInfo(UUID instanceId, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetValidateBeforeCall(instanceId, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Non Empty Tables (asynchronously) * * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetAsync(UUID instanceId, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetValidateBeforeCall(instanceId, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getOrganizationAccessV2OrganizationsOrganizationIdGet * @param organizationId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getOrganizationAccessV2OrganizationsOrganizationIdGetCall(UUID organizationId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/organizations/{organization_id}" .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getOrganizationAccessV2OrganizationsOrganizationIdGetValidateBeforeCall(UUID organizationId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException("Missing the required parameter 'organizationId' when calling getOrganizationAccessV2OrganizationsOrganizationIdGet(Async)"); } return getOrganizationAccessV2OrganizationsOrganizationIdGetCall(organizationId, authorization, _callback); } /** * Get Organization * Get details of a specific organization. Parameters: - **organization_id**: UUID of the organization to retrieve Returns: - **200**: Organization details retrieved successfully - **404**: Organization not found * @param organizationId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getOrganizationAccessV2OrganizationsOrganizationIdGet(UUID organizationId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getOrganizationAccessV2OrganizationsOrganizationIdGetWithHttpInfo(organizationId, authorization); return localVarResp.getData(); } /** * Get Organization * Get details of a specific organization. Parameters: - **organization_id**: UUID of the organization to retrieve Returns: - **200**: Organization details retrieved successfully - **404**: Organization not found * @param organizationId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getOrganizationAccessV2OrganizationsOrganizationIdGetWithHttpInfo(UUID organizationId, String authorization) throws ApiException { okhttp3.Call localVarCall = getOrganizationAccessV2OrganizationsOrganizationIdGetValidateBeforeCall(organizationId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Organization (asynchronously) * Get details of a specific organization. Parameters: - **organization_id**: UUID of the organization to retrieve Returns: - **200**: Organization details retrieved successfully - **404**: Organization not found * @param organizationId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getOrganizationAccessV2OrganizationsOrganizationIdGetAsync(UUID organizationId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getOrganizationAccessV2OrganizationsOrganizationIdGetValidateBeforeCall(organizationId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost * @param moduleName (required) * @param modelName (required) * @param idOrUid (required) * @param instanceId (required) * @param limitToMany (optional, default to 10) * @param includeForeignKeys (optional, default to false) * @param schemaId (optional) * @param authorization (optional) * @param getRecordRequestBody (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostCall(String moduleName, String modelName, String idOrUid, UUID instanceId, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordRequestBody getRecordRequestBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = getRecordRequestBody; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}/{id_or_uid}" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "id_or_uid" + "}", localVarApiClient.escapeString(idOrUid.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (limitToMany != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit_to_many", limitToMany)); } if (includeForeignKeys != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("include_foreign_keys", includeForeignKeys)); } if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostValidateBeforeCall(String moduleName, String modelName, String idOrUid, UUID instanceId, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordRequestBody getRecordRequestBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(Async)"); } // verify the required parameter 'idOrUid' is set if (idOrUid == null) { throw new ApiException("Missing the required parameter 'idOrUid' when calling getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(Async)"); } return getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostCall(moduleName, modelName, idOrUid, instanceId, limitToMany, includeForeignKeys, schemaId, authorization, getRecordRequestBody, _callback); } /** * Get Record * * @param moduleName (required) * @param modelName (required) * @param idOrUid (required) * @param instanceId (required) * @param limitToMany (optional, default to 10) * @param includeForeignKeys (optional, default to false) * @param schemaId (optional) * @param authorization (optional) * @param getRecordRequestBody (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(String moduleName, String modelName, String idOrUid, UUID instanceId, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordRequestBody getRecordRequestBody) throws ApiException { ApiResponse<Object> localVarResp = getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostWithHttpInfo(moduleName, modelName, idOrUid, instanceId, limitToMany, includeForeignKeys, schemaId, authorization, getRecordRequestBody); return localVarResp.getData(); } /** * Get Record * * @param moduleName (required) * @param modelName (required) * @param idOrUid (required) * @param instanceId (required) * @param limitToMany (optional, default to 10) * @param includeForeignKeys (optional, default to false) * @param schemaId (optional) * @param authorization (optional) * @param getRecordRequestBody (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostWithHttpInfo(String moduleName, String modelName, String idOrUid, UUID instanceId, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordRequestBody getRecordRequestBody) throws ApiException { okhttp3.Call localVarCall = getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostValidateBeforeCall(moduleName, modelName, idOrUid, instanceId, limitToMany, includeForeignKeys, schemaId, authorization, getRecordRequestBody, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Record (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param idOrUid (required) * @param instanceId (required) * @param limitToMany (optional, default to 10) * @param includeForeignKeys (optional, default to false) * @param schemaId (optional) * @param authorization (optional) * @param getRecordRequestBody (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostAsync(String moduleName, String modelName, String idOrUid, UUID instanceId, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordRequestBody getRecordRequestBody, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostValidateBeforeCall(moduleName, modelName, idOrUid, instanceId, limitToMany, includeForeignKeys, schemaId, authorization, getRecordRequestBody, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getRecordsInstancesInstanceIdModulesModuleNameModelNamePost * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param limit (optional, default to 50) * @param offset (optional, default to 0) * @param limitToMany (optional, default to 10) * @param includeForeignKeys (optional, default to false) * @param schemaId (optional) * @param authorization (optional) * @param getRecordsRequestBody (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getRecordsInstancesInstanceIdModulesModuleNameModelNamePostCall(String moduleName, String modelName, UUID instanceId, Integer limit, Integer offset, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordsRequestBody getRecordsRequestBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = getRecordsRequestBody; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (offset != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); } if (limitToMany != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit_to_many", limitToMany)); } if (includeForeignKeys != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("include_foreign_keys", includeForeignKeys)); } if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRecordsInstancesInstanceIdModulesModuleNameModelNamePostValidateBeforeCall(String moduleName, String modelName, UUID instanceId, Integer limit, Integer offset, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordsRequestBody getRecordsRequestBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling getRecordsInstancesInstanceIdModulesModuleNameModelNamePost(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling getRecordsInstancesInstanceIdModulesModuleNameModelNamePost(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getRecordsInstancesInstanceIdModulesModuleNameModelNamePost(Async)"); } return getRecordsInstancesInstanceIdModulesModuleNameModelNamePostCall(moduleName, modelName, instanceId, limit, offset, limitToMany, includeForeignKeys, schemaId, authorization, getRecordsRequestBody, _callback); } /** * Get Records * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param limit (optional, default to 50) * @param offset (optional, default to 0) * @param limitToMany (optional, default to 10) * @param includeForeignKeys (optional, default to false) * @param schemaId (optional) * @param authorization (optional) * @param getRecordsRequestBody (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getRecordsInstancesInstanceIdModulesModuleNameModelNamePost(String moduleName, String modelName, UUID instanceId, Integer limit, Integer offset, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordsRequestBody getRecordsRequestBody) throws ApiException { ApiResponse<Object> localVarResp = getRecordsInstancesInstanceIdModulesModuleNameModelNamePostWithHttpInfo(moduleName, modelName, instanceId, limit, offset, limitToMany, includeForeignKeys, schemaId, authorization, getRecordsRequestBody); return localVarResp.getData(); } /** * Get Records * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param limit (optional, default to 50) * @param offset (optional, default to 0) * @param limitToMany (optional, default to 10) * @param includeForeignKeys (optional, default to false) * @param schemaId (optional) * @param authorization (optional) * @param getRecordsRequestBody (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getRecordsInstancesInstanceIdModulesModuleNameModelNamePostWithHttpInfo(String moduleName, String modelName, UUID instanceId, Integer limit, Integer offset, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordsRequestBody getRecordsRequestBody) throws ApiException { okhttp3.Call localVarCall = getRecordsInstancesInstanceIdModulesModuleNameModelNamePostValidateBeforeCall(moduleName, modelName, instanceId, limit, offset, limitToMany, includeForeignKeys, schemaId, authorization, getRecordsRequestBody, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Records (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param limit (optional, default to 50) * @param offset (optional, default to 0) * @param limitToMany (optional, default to 10) * @param includeForeignKeys (optional, default to false) * @param schemaId (optional) * @param authorization (optional) * @param getRecordsRequestBody (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getRecordsInstancesInstanceIdModulesModuleNameModelNamePostAsync(String moduleName, String modelName, UUID instanceId, Integer limit, Integer offset, Integer limitToMany, Boolean includeForeignKeys, UUID schemaId, String authorization, GetRecordsRequestBody getRecordsRequestBody, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getRecordsInstancesInstanceIdModulesModuleNameModelNamePostValidateBeforeCall(moduleName, modelName, instanceId, limit, offset, limitToMany, includeForeignKeys, schemaId, authorization, getRecordsRequestBody, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGet * @param moduleName (required) * @param modelName (required) * @param id (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGetCall(String moduleName, String modelName, Integer id, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}/{id}/counts" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGetValidateBeforeCall(String moduleName, String modelName, Integer id, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGet(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGet(Async)"); } // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGet(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGet(Async)"); } return getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGetCall(moduleName, modelName, id, instanceId, schemaId, authorization, _callback); } /** * Get Relation Counts * * @param moduleName (required) * @param modelName (required) * @param id (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGet(String moduleName, String modelName, Integer id, UUID instanceId, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGetWithHttpInfo(moduleName, modelName, id, instanceId, schemaId, authorization); return localVarResp.getData(); } /** * Get Relation Counts * * @param moduleName (required) * @param modelName (required) * @param id (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGetWithHttpInfo(String moduleName, String modelName, Integer id, UUID instanceId, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGetValidateBeforeCall(moduleName, modelName, id, instanceId, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Relation Counts (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param id (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGetAsync(String moduleName, String modelName, Integer id, UUID instanceId, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getRelationCountsInstancesInstanceIdModulesModuleNameModelNameIdCountsGetValidateBeforeCall(moduleName, modelName, id, instanceId, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getRelationsInstancesInstanceIdSchemaModuleNameModelNameGet * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getRelationsInstancesInstanceIdSchemaModuleNameModelNameGetCall(String moduleName, String modelName, UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/schema/{module_name}/{model_name}" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getRelationsInstancesInstanceIdSchemaModuleNameModelNameGetValidateBeforeCall(String moduleName, String modelName, UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling getRelationsInstancesInstanceIdSchemaModuleNameModelNameGet(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling getRelationsInstancesInstanceIdSchemaModuleNameModelNameGet(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getRelationsInstancesInstanceIdSchemaModuleNameModelNameGet(Async)"); } return getRelationsInstancesInstanceIdSchemaModuleNameModelNameGetCall(moduleName, modelName, instanceId, authorization, _callback); } /** * Get Relations * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getRelationsInstancesInstanceIdSchemaModuleNameModelNameGet(String moduleName, String modelName, UUID instanceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getRelationsInstancesInstanceIdSchemaModuleNameModelNameGetWithHttpInfo(moduleName, modelName, instanceId, authorization); return localVarResp.getData(); } /** * Get Relations * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getRelationsInstancesInstanceIdSchemaModuleNameModelNameGetWithHttpInfo(String moduleName, String modelName, UUID instanceId, String authorization) throws ApiException { okhttp3.Call localVarCall = getRelationsInstancesInstanceIdSchemaModuleNameModelNameGetValidateBeforeCall(moduleName, modelName, instanceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Relations (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getRelationsInstancesInstanceIdSchemaModuleNameModelNameGetAsync(String moduleName, String modelName, UUID instanceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getRelationsInstancesInstanceIdSchemaModuleNameModelNameGetValidateBeforeCall(moduleName, modelName, instanceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSchemaInstancesInstanceIdSchemaGet * @param instanceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getSchemaInstancesInstanceIdSchemaGetCall(UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/schema" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getSchemaInstancesInstanceIdSchemaGetValidateBeforeCall(UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getSchemaInstancesInstanceIdSchemaGet(Async)"); } return getSchemaInstancesInstanceIdSchemaGetCall(instanceId, authorization, _callback); } /** * Get Schema * * @param instanceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getSchemaInstancesInstanceIdSchemaGet(UUID instanceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getSchemaInstancesInstanceIdSchemaGetWithHttpInfo(instanceId, authorization); return localVarResp.getData(); } /** * Get Schema * * @param instanceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getSchemaInstancesInstanceIdSchemaGetWithHttpInfo(UUID instanceId, String authorization) throws ApiException { okhttp3.Call localVarCall = getSchemaInstancesInstanceIdSchemaGetValidateBeforeCall(instanceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Schema (asynchronously) * * @param instanceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getSchemaInstancesInstanceIdSchemaGetAsync(UUID instanceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getSchemaInstancesInstanceIdSchemaGetValidateBeforeCall(instanceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSpaceAccessV2SpacesSpaceIdGet * @param spaceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getSpaceAccessV2SpacesSpaceIdGetCall(UUID spaceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getSpaceAccessV2SpacesSpaceIdGetValidateBeforeCall(UUID spaceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling getSpaceAccessV2SpacesSpaceIdGet(Async)"); } return getSpaceAccessV2SpacesSpaceIdGetCall(spaceId, authorization, _callback); } /** * Get Space * Get details of a specific space. Parameters: - **space_id**: ID of the space to retrieve Returns: - **200**: Space details retrieved successfully - **404**: Space not found * @param spaceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getSpaceAccessV2SpacesSpaceIdGet(UUID spaceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getSpaceAccessV2SpacesSpaceIdGetWithHttpInfo(spaceId, authorization); return localVarResp.getData(); } /** * Get Space * Get details of a specific space. Parameters: - **space_id**: ID of the space to retrieve Returns: - **200**: Space details retrieved successfully - **404**: Space not found * @param spaceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getSpaceAccessV2SpacesSpaceIdGetWithHttpInfo(UUID spaceId, String authorization) throws ApiException { okhttp3.Call localVarCall = getSpaceAccessV2SpacesSpaceIdGetValidateBeforeCall(spaceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Space (asynchronously) * Get details of a specific space. Parameters: - **space_id**: ID of the space to retrieve Returns: - **200**: Space details retrieved successfully - **404**: Space not found * @param spaceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getSpaceAccessV2SpacesSpaceIdGetAsync(UUID spaceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getSpaceAccessV2SpacesSpaceIdGetValidateBeforeCall(spaceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getTeamAccessV2TeamsTeamIdGet * @param teamId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getTeamAccessV2TeamsTeamIdGetCall(UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/teams/{team_id}" .replace("{" + "team_id" + "}", localVarApiClient.escapeString(teamId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getTeamAccessV2TeamsTeamIdGetValidateBeforeCall(UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'teamId' is set if (teamId == null) { throw new ApiException("Missing the required parameter 'teamId' when calling getTeamAccessV2TeamsTeamIdGet(Async)"); } return getTeamAccessV2TeamsTeamIdGetCall(teamId, authorization, _callback); } /** * Get Team * Get details of a specific team. Parameters: - **team_id**: UUID of the team to retrieve Returns: - **200**: Team details retrieved successfully - **404**: Team not found * @param teamId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getTeamAccessV2TeamsTeamIdGet(UUID teamId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getTeamAccessV2TeamsTeamIdGetWithHttpInfo(teamId, authorization); return localVarResp.getData(); } /** * Get Team * Get details of a specific team. Parameters: - **team_id**: UUID of the team to retrieve Returns: - **200**: Team details retrieved successfully - **404**: Team not found * @param teamId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getTeamAccessV2TeamsTeamIdGetWithHttpInfo(UUID teamId, String authorization) throws ApiException { okhttp3.Call localVarCall = getTeamAccessV2TeamsTeamIdGetValidateBeforeCall(teamId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Team (asynchronously) * Get details of a specific team. Parameters: - **team_id**: UUID of the team to retrieve Returns: - **200**: Team details retrieved successfully - **404**: Team not found * @param teamId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getTeamAccessV2TeamsTeamIdGetAsync(UUID teamId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getTeamAccessV2TeamsTeamIdGetValidateBeforeCall(teamId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getTreeInstancesInstanceIdTreeGet * @param instanceId (required) * @param entityType (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getTreeInstancesInstanceIdTreeGetCall(UUID instanceId, String entityType, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/tree" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (entityType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("entity_type", entityType)); } if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getTreeInstancesInstanceIdTreeGetValidateBeforeCall(UUID instanceId, String entityType, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getTreeInstancesInstanceIdTreeGet(Async)"); } // verify the required parameter 'entityType' is set if (entityType == null) { throw new ApiException("Missing the required parameter 'entityType' when calling getTreeInstancesInstanceIdTreeGet(Async)"); } return getTreeInstancesInstanceIdTreeGetCall(instanceId, entityType, schemaId, authorization, _callback); } /** * Get Tree * * @param instanceId (required) * @param entityType (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getTreeInstancesInstanceIdTreeGet(UUID instanceId, String entityType, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = getTreeInstancesInstanceIdTreeGetWithHttpInfo(instanceId, entityType, schemaId, authorization); return localVarResp.getData(); } /** * Get Tree * * @param instanceId (required) * @param entityType (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getTreeInstancesInstanceIdTreeGetWithHttpInfo(UUID instanceId, String entityType, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = getTreeInstancesInstanceIdTreeGetValidateBeforeCall(instanceId, entityType, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Tree (asynchronously) * * @param instanceId (required) * @param entityType (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getTreeInstancesInstanceIdTreeGetAsync(UUID instanceId, String entityType, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getTreeInstancesInstanceIdTreeGetValidateBeforeCall(instanceId, entityType, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost * @param moduleName (required) * @param modelName (required) * @param fieldPath (required) * @param instanceId (required) * @param limit (optional, default to 50) * @param offset (optional, default to 0) * @param schemaId (optional) * @param authorization (optional) * @param getValuesRequestBody (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostCall(String moduleName, String modelName, String fieldPath, UUID instanceId, Integer limit, Integer offset, UUID schemaId, String authorization, GetValuesRequestBody getValuesRequestBody, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = getValuesRequestBody; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}/fields/{field_path}" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "field_path" + "}", localVarApiClient.escapeString(fieldPath.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (offset != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); } if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostValidateBeforeCall(String moduleName, String modelName, String fieldPath, UUID instanceId, Integer limit, Integer offset, UUID schemaId, String authorization, GetValuesRequestBody getValuesRequestBody, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(Async)"); } // verify the required parameter 'fieldPath' is set if (fieldPath == null) { throw new ApiException("Missing the required parameter 'fieldPath' when calling getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(Async)"); } return getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostCall(moduleName, modelName, fieldPath, instanceId, limit, offset, schemaId, authorization, getValuesRequestBody, _callback); } /** * Get Values * * @param moduleName (required) * @param modelName (required) * @param fieldPath (required) * @param instanceId (required) * @param limit (optional, default to 50) * @param offset (optional, default to 0) * @param schemaId (optional) * @param authorization (optional) * @param getValuesRequestBody (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(String moduleName, String modelName, String fieldPath, UUID instanceId, Integer limit, Integer offset, UUID schemaId, String authorization, GetValuesRequestBody getValuesRequestBody) throws ApiException { ApiResponse<Object> localVarResp = getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostWithHttpInfo(moduleName, modelName, fieldPath, instanceId, limit, offset, schemaId, authorization, getValuesRequestBody); return localVarResp.getData(); } /** * Get Values * * @param moduleName (required) * @param modelName (required) * @param fieldPath (required) * @param instanceId (required) * @param limit (optional, default to 50) * @param offset (optional, default to 0) * @param schemaId (optional) * @param authorization (optional) * @param getValuesRequestBody (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostWithHttpInfo(String moduleName, String modelName, String fieldPath, UUID instanceId, Integer limit, Integer offset, UUID schemaId, String authorization, GetValuesRequestBody getValuesRequestBody) throws ApiException { okhttp3.Call localVarCall = getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostValidateBeforeCall(moduleName, modelName, fieldPath, instanceId, limit, offset, schemaId, authorization, getValuesRequestBody, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Values (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param fieldPath (required) * @param instanceId (required) * @param limit (optional, default to 50) * @param offset (optional, default to 0) * @param schemaId (optional) * @param authorization (optional) * @param getValuesRequestBody (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostAsync(String moduleName, String modelName, String fieldPath, UUID instanceId, Integer limit, Integer offset, UUID schemaId, String authorization, GetValuesRequestBody getValuesRequestBody, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = getValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostValidateBeforeCall(moduleName, modelName, fieldPath, instanceId, limit, offset, schemaId, authorization, getValuesRequestBody, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for grantS3PermissionsStoragesS3BucketNamePermissionsPut * @param bucketName (required) * @param s3PermissionsRequest (required) * @param awsAccountId (optional, default to 767398070972) * @param awsUserName (optional, default to lamin-manager) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call grantS3PermissionsStoragesS3BucketNamePermissionsPutCall(String bucketName, S3PermissionsRequest s3PermissionsRequest, String awsAccountId, String awsUserName, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = s3PermissionsRequest; // create path and map variables String localVarPath = "/storages/s3/{bucket_name}/permissions" .replace("{" + "bucket_name" + "}", localVarApiClient.escapeString(bucketName.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (awsAccountId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("aws_account_id", awsAccountId)); } if (awsUserName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("aws_user_name", awsUserName)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call grantS3PermissionsStoragesS3BucketNamePermissionsPutValidateBeforeCall(String bucketName, S3PermissionsRequest s3PermissionsRequest, String awsAccountId, String awsUserName, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'bucketName' is set if (bucketName == null) { throw new ApiException("Missing the required parameter 'bucketName' when calling grantS3PermissionsStoragesS3BucketNamePermissionsPut(Async)"); } // verify the required parameter 's3PermissionsRequest' is set if (s3PermissionsRequest == null) { throw new ApiException("Missing the required parameter 's3PermissionsRequest' when calling grantS3PermissionsStoragesS3BucketNamePermissionsPut(Async)"); } return grantS3PermissionsStoragesS3BucketNamePermissionsPutCall(bucketName, s3PermissionsRequest, awsAccountId, awsUserName, authorization, _callback); } /** * Grant S3 Permissions * * @param bucketName (required) * @param s3PermissionsRequest (required) * @param awsAccountId (optional, default to 767398070972) * @param awsUserName (optional, default to lamin-manager) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object grantS3PermissionsStoragesS3BucketNamePermissionsPut(String bucketName, S3PermissionsRequest s3PermissionsRequest, String awsAccountId, String awsUserName, String authorization) throws ApiException { ApiResponse<Object> localVarResp = grantS3PermissionsStoragesS3BucketNamePermissionsPutWithHttpInfo(bucketName, s3PermissionsRequest, awsAccountId, awsUserName, authorization); return localVarResp.getData(); } /** * Grant S3 Permissions * * @param bucketName (required) * @param s3PermissionsRequest (required) * @param awsAccountId (optional, default to 767398070972) * @param awsUserName (optional, default to lamin-manager) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> grantS3PermissionsStoragesS3BucketNamePermissionsPutWithHttpInfo(String bucketName, S3PermissionsRequest s3PermissionsRequest, String awsAccountId, String awsUserName, String authorization) throws ApiException { okhttp3.Call localVarCall = grantS3PermissionsStoragesS3BucketNamePermissionsPutValidateBeforeCall(bucketName, s3PermissionsRequest, awsAccountId, awsUserName, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Grant S3 Permissions (asynchronously) * * @param bucketName (required) * @param s3PermissionsRequest (required) * @param awsAccountId (optional, default to 767398070972) * @param awsUserName (optional, default to lamin-manager) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call grantS3PermissionsStoragesS3BucketNamePermissionsPutAsync(String bucketName, S3PermissionsRequest s3PermissionsRequest, String awsAccountId, String awsUserName, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = grantS3PermissionsStoragesS3BucketNamePermissionsPutValidateBeforeCall(bucketName, s3PermissionsRequest, awsAccountId, awsUserName, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param groupByRequestBody (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostCall(String moduleName, String modelName, UUID instanceId, GroupByRequestBody groupByRequestBody, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = groupByRequestBody; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}/group-by" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostValidateBeforeCall(String moduleName, String modelName, UUID instanceId, GroupByRequestBody groupByRequestBody, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(Async)"); } // verify the required parameter 'groupByRequestBody' is set if (groupByRequestBody == null) { throw new ApiException("Missing the required parameter 'groupByRequestBody' when calling groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(Async)"); } return groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostCall(moduleName, modelName, instanceId, groupByRequestBody, schemaId, authorization, _callback); } /** * Group By * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param groupByRequestBody (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(String moduleName, String modelName, UUID instanceId, GroupByRequestBody groupByRequestBody, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostWithHttpInfo(moduleName, modelName, instanceId, groupByRequestBody, schemaId, authorization); return localVarResp.getData(); } /** * Group By * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param groupByRequestBody (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostWithHttpInfo(String moduleName, String modelName, UUID instanceId, GroupByRequestBody groupByRequestBody, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostValidateBeforeCall(moduleName, modelName, instanceId, groupByRequestBody, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Group By (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param groupByRequestBody (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostAsync(String moduleName, String modelName, UUID instanceId, GroupByRequestBody groupByRequestBody, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = groupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostValidateBeforeCall(moduleName, modelName, instanceId, groupByRequestBody, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGet * @param instanceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGetCall(UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/instances/{instance_id}/collaborators" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGetValidateBeforeCall(UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGet(Async)"); } return listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGetCall(instanceId, authorization, _callback); } /** * List Collaborators * List all collaborators of an instance. Parameters: - **instance_id**: UUID of the instance to list collaborators for (from URL path) Returns: - **200**: List of instance collaborators retrieved successfully Requires read access to the instance * @param instanceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGet(UUID instanceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGetWithHttpInfo(instanceId, authorization); return localVarResp.getData(); } /** * List Collaborators * List all collaborators of an instance. Parameters: - **instance_id**: UUID of the instance to list collaborators for (from URL path) Returns: - **200**: List of instance collaborators retrieved successfully Requires read access to the instance * @param instanceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGetWithHttpInfo(UUID instanceId, String authorization) throws ApiException { okhttp3.Call localVarCall = listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGetValidateBeforeCall(instanceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Collaborators (asynchronously) * List all collaborators of an instance. Parameters: - **instance_id**: UUID of the instance to list collaborators for (from URL path) Returns: - **200**: List of instance collaborators retrieved successfully Requires read access to the instance * @param instanceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGetAsync(UUID instanceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = listCollaboratorsAccessV2InstancesInstanceIdCollaboratorsGetValidateBeforeCall(instanceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listDirectoryInstancesInstanceIdEntityTypeGet * @param entityType (required) * @param instanceId (required) * @param path (optional, default to ) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listDirectoryInstancesInstanceIdEntityTypeGetCall(String entityType, UUID instanceId, String path, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/{entity_type}" .replace("{" + "entity_type" + "}", localVarApiClient.escapeString(entityType.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (path != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("path", path)); } if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listDirectoryInstancesInstanceIdEntityTypeGetValidateBeforeCall(String entityType, UUID instanceId, String path, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { throw new ApiException("Missing the required parameter 'entityType' when calling listDirectoryInstancesInstanceIdEntityTypeGet(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling listDirectoryInstancesInstanceIdEntityTypeGet(Async)"); } return listDirectoryInstancesInstanceIdEntityTypeGetCall(entityType, instanceId, path, schemaId, authorization, _callback); } /** * List Directory * * @param entityType (required) * @param instanceId (required) * @param path (optional, default to ) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object listDirectoryInstancesInstanceIdEntityTypeGet(String entityType, UUID instanceId, String path, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = listDirectoryInstancesInstanceIdEntityTypeGetWithHttpInfo(entityType, instanceId, path, schemaId, authorization); return localVarResp.getData(); } /** * List Directory * * @param entityType (required) * @param instanceId (required) * @param path (optional, default to ) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> listDirectoryInstancesInstanceIdEntityTypeGetWithHttpInfo(String entityType, UUID instanceId, String path, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = listDirectoryInstancesInstanceIdEntityTypeGetValidateBeforeCall(entityType, instanceId, path, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Directory (asynchronously) * * @param entityType (required) * @param instanceId (required) * @param path (optional, default to ) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listDirectoryInstancesInstanceIdEntityTypeGetAsync(String entityType, UUID instanceId, String path, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = listDirectoryInstancesInstanceIdEntityTypeGetValidateBeforeCall(entityType, instanceId, path, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listInstanceSpacesAccessV2SpacesInstancesInstanceIdGet * @param instanceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listInstanceSpacesAccessV2SpacesInstancesInstanceIdGetCall(UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/spaces/instances/{instance_id}" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listInstanceSpacesAccessV2SpacesInstancesInstanceIdGetValidateBeforeCall(UUID instanceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling listInstanceSpacesAccessV2SpacesInstancesInstanceIdGet(Async)"); } return listInstanceSpacesAccessV2SpacesInstancesInstanceIdGetCall(instanceId, authorization, _callback); } /** * List Instance Spaces * List all spaces attached to an instance. Parameters: - **instance_id**: UUID of the instance to list spaces for (from URL path) Returns: - **200**: List of spaces attached to the instance retrieved successfully * @param instanceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object listInstanceSpacesAccessV2SpacesInstancesInstanceIdGet(UUID instanceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = listInstanceSpacesAccessV2SpacesInstancesInstanceIdGetWithHttpInfo(instanceId, authorization); return localVarResp.getData(); } /** * List Instance Spaces * List all spaces attached to an instance. Parameters: - **instance_id**: UUID of the instance to list spaces for (from URL path) Returns: - **200**: List of spaces attached to the instance retrieved successfully * @param instanceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> listInstanceSpacesAccessV2SpacesInstancesInstanceIdGetWithHttpInfo(UUID instanceId, String authorization) throws ApiException { okhttp3.Call localVarCall = listInstanceSpacesAccessV2SpacesInstancesInstanceIdGetValidateBeforeCall(instanceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Instance Spaces (asynchronously) * List all spaces attached to an instance. Parameters: - **instance_id**: UUID of the instance to list spaces for (from URL path) Returns: - **200**: List of spaces attached to the instance retrieved successfully * @param instanceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listInstanceSpacesAccessV2SpacesInstancesInstanceIdGetAsync(UUID instanceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = listInstanceSpacesAccessV2SpacesInstancesInstanceIdGetValidateBeforeCall(instanceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGet * @param spaceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGetCall(UUID spaceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}/instances" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGetValidateBeforeCall(UUID spaceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGet(Async)"); } return listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGetCall(spaceId, authorization, _callback); } /** * List Instances Using Space * List all instances that have this space attached. Parameters: - **space_id**: ID of the space to check Returns: - **200**: List of instances using the space retrieved successfully * @param spaceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGet(UUID spaceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGetWithHttpInfo(spaceId, authorization); return localVarResp.getData(); } /** * List Instances Using Space * List all instances that have this space attached. Parameters: - **space_id**: ID of the space to check Returns: - **200**: List of instances using the space retrieved successfully * @param spaceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGetWithHttpInfo(UUID spaceId, String authorization) throws ApiException { okhttp3.Call localVarCall = listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGetValidateBeforeCall(spaceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Instances Using Space (asynchronously) * List all instances that have this space attached. Parameters: - **space_id**: ID of the space to check Returns: - **200**: List of instances using the space retrieved successfully * @param spaceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGetAsync(UUID spaceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = listInstancesUsingSpaceAccessV2SpacesSpaceIdInstancesGetValidateBeforeCall(spaceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGet * @param organizationId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGetCall(UUID organizationId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/organizations/{organization_id}/members" .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGetValidateBeforeCall(UUID organizationId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException("Missing the required parameter 'organizationId' when calling listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGet(Async)"); } return listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGetCall(organizationId, authorization, _callback); } /** * List Organization Members * List all members of an organization. Parameters: - **organization_id**: UUID of the organization to list members for Returns: - **200**: List of organization members retrieved successfully * @param organizationId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGet(UUID organizationId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGetWithHttpInfo(organizationId, authorization); return localVarResp.getData(); } /** * List Organization Members * List all members of an organization. Parameters: - **organization_id**: UUID of the organization to list members for Returns: - **200**: List of organization members retrieved successfully * @param organizationId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGetWithHttpInfo(UUID organizationId, String authorization) throws ApiException { okhttp3.Call localVarCall = listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGetValidateBeforeCall(organizationId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Organization Members (asynchronously) * List all members of an organization. Parameters: - **organization_id**: UUID of the organization to list members for Returns: - **200**: List of organization members retrieved successfully * @param organizationId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGetAsync(UUID organizationId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = listOrganizationMembersAccessV2OrganizationsOrganizationIdMembersGetValidateBeforeCall(organizationId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGet * @param organizationId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGetCall(UUID organizationId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/spaces/organizations/{organization_id}" .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGetValidateBeforeCall(UUID organizationId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException("Missing the required parameter 'organizationId' when calling listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGet(Async)"); } return listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGetCall(organizationId, authorization, _callback); } /** * List Organization Spaces * List all spaces in an organization. Parameters: - **organization_id**: UUID of the organization to list spaces for Returns: - **200**: List of spaces retrieved successfully * @param organizationId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGet(UUID organizationId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGetWithHttpInfo(organizationId, authorization); return localVarResp.getData(); } /** * List Organization Spaces * List all spaces in an organization. Parameters: - **organization_id**: UUID of the organization to list spaces for Returns: - **200**: List of spaces retrieved successfully * @param organizationId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGetWithHttpInfo(UUID organizationId, String authorization) throws ApiException { okhttp3.Call localVarCall = listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGetValidateBeforeCall(organizationId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Organization Spaces (asynchronously) * List all spaces in an organization. Parameters: - **organization_id**: UUID of the organization to list spaces for Returns: - **200**: List of spaces retrieved successfully * @param organizationId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGetAsync(UUID organizationId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = listOrganizationSpacesAccessV2SpacesOrganizationsOrganizationIdGetValidateBeforeCall(organizationId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGet * @param organizationId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGetCall(UUID organizationId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/teams/organizations/{organization_id}" .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGetValidateBeforeCall(UUID organizationId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException("Missing the required parameter 'organizationId' when calling listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGet(Async)"); } return listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGetCall(organizationId, authorization, _callback); } /** * List Organization Teams * List all teams in an organization. Parameters: - **organization_id**: UUID of the organization to list teams for Returns: - **200**: List of teams retrieved successfully * @param organizationId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGet(UUID organizationId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGetWithHttpInfo(organizationId, authorization); return localVarResp.getData(); } /** * List Organization Teams * List all teams in an organization. Parameters: - **organization_id**: UUID of the organization to list teams for Returns: - **200**: List of teams retrieved successfully * @param organizationId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGetWithHttpInfo(UUID organizationId, String authorization) throws ApiException { okhttp3.Call localVarCall = listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGetValidateBeforeCall(organizationId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Organization Teams (asynchronously) * List all teams in an organization. Parameters: - **organization_id**: UUID of the organization to list teams for Returns: - **200**: List of teams retrieved successfully * @param organizationId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGetAsync(UUID organizationId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = listOrganizationTeamsAccessV2TeamsOrganizationsOrganizationIdGetValidateBeforeCall(organizationId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGet * @param spaceId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGetCall(UUID spaceId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}/collaborators" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGetValidateBeforeCall(UUID spaceId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGet(Async)"); } return listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGetCall(spaceId, authorization, _callback); } /** * List Space Collaborators * List all collaborators of a space. Parameters: - **space_id**: ID of the space to list collaborators for Returns: - **200**: List of space collaborators retrieved successfully * @param spaceId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGet(UUID spaceId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGetWithHttpInfo(spaceId, authorization); return localVarResp.getData(); } /** * List Space Collaborators * List all collaborators of a space. Parameters: - **space_id**: ID of the space to list collaborators for Returns: - **200**: List of space collaborators retrieved successfully * @param spaceId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGetWithHttpInfo(UUID spaceId, String authorization) throws ApiException { okhttp3.Call localVarCall = listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGetValidateBeforeCall(spaceId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Space Collaborators (asynchronously) * List all collaborators of a space. Parameters: - **space_id**: ID of the space to list collaborators for Returns: - **200**: List of space collaborators retrieved successfully * @param spaceId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGetAsync(UUID spaceId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = listSpaceCollaboratorsAccessV2SpacesSpaceIdCollaboratorsGetValidateBeforeCall(spaceId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listTeamMembersAccessV2TeamsTeamIdMembersGet * @param teamId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listTeamMembersAccessV2TeamsTeamIdMembersGetCall(UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/teams/{team_id}/members" .replace("{" + "team_id" + "}", localVarApiClient.escapeString(teamId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listTeamMembersAccessV2TeamsTeamIdMembersGetValidateBeforeCall(UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'teamId' is set if (teamId == null) { throw new ApiException("Missing the required parameter 'teamId' when calling listTeamMembersAccessV2TeamsTeamIdMembersGet(Async)"); } return listTeamMembersAccessV2TeamsTeamIdMembersGetCall(teamId, authorization, _callback); } /** * List Team Members * List all members of a team. Parameters: - **team_id**: UUID of the team to list members for Returns: - **200**: List of team members retrieved successfully * @param teamId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object listTeamMembersAccessV2TeamsTeamIdMembersGet(UUID teamId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = listTeamMembersAccessV2TeamsTeamIdMembersGetWithHttpInfo(teamId, authorization); return localVarResp.getData(); } /** * List Team Members * List all members of a team. Parameters: - **team_id**: UUID of the team to list members for Returns: - **200**: List of team members retrieved successfully * @param teamId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> listTeamMembersAccessV2TeamsTeamIdMembersGetWithHttpInfo(UUID teamId, String authorization) throws ApiException { okhttp3.Call localVarCall = listTeamMembersAccessV2TeamsTeamIdMembersGetValidateBeforeCall(teamId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Team Members (asynchronously) * List all members of a team. Parameters: - **team_id**: UUID of the team to list members for Returns: - **200**: List of team members retrieved successfully * @param teamId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call listTeamMembersAccessV2TeamsTeamIdMembersGetAsync(UUID teamId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = listTeamMembersAccessV2TeamsTeamIdMembersGetValidateBeforeCall(teamId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPut * @param instanceDbSpaceId (required) * @param attachSpaceToRecordRequestBody (required) * @param instanceId (optional) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPutCall(Integer instanceDbSpaceId, AttachSpaceToRecordRequestBody attachSpaceToRecordRequestBody, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = attachSpaceToRecordRequestBody; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}/record-attachments"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (instanceDbSpaceId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("instance_db_space_id", instanceDbSpaceId)); } if (instanceId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("instance_id", instanceId)); } if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPutValidateBeforeCall(Integer instanceDbSpaceId, AttachSpaceToRecordRequestBody attachSpaceToRecordRequestBody, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceDbSpaceId' is set if (instanceDbSpaceId == null) { throw new ApiException("Missing the required parameter 'instanceDbSpaceId' when calling moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPut(Async)"); } // verify the required parameter 'attachSpaceToRecordRequestBody' is set if (attachSpaceToRecordRequestBody == null) { throw new ApiException("Missing the required parameter 'attachSpaceToRecordRequestBody' when calling moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPut(Async)"); } return moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPutCall(instanceDbSpaceId, attachSpaceToRecordRequestBody, instanceId, schemaId, authorization, _callback); } /** * Move Record To Space * Move a record to a specific space. Parameters: - **space_id**: ID of the space to move the record to - **body**: Request body containing record details - **module_name**: Module name of the record - **model_name**: Model name of the record - **record_id**: ID of the record to move in the space - **instance_id**: UUID of the instance (from URL path) - **schema_id**: UUID of the schema (from URL path) Returns: - **200**: Record moved to the space successfully Requires admin access to the instance * @param instanceDbSpaceId (required) * @param attachSpaceToRecordRequestBody (required) * @param instanceId (optional) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPut(Integer instanceDbSpaceId, AttachSpaceToRecordRequestBody attachSpaceToRecordRequestBody, UUID instanceId, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPutWithHttpInfo(instanceDbSpaceId, attachSpaceToRecordRequestBody, instanceId, schemaId, authorization); return localVarResp.getData(); } /** * Move Record To Space * Move a record to a specific space. Parameters: - **space_id**: ID of the space to move the record to - **body**: Request body containing record details - **module_name**: Module name of the record - **model_name**: Model name of the record - **record_id**: ID of the record to move in the space - **instance_id**: UUID of the instance (from URL path) - **schema_id**: UUID of the schema (from URL path) Returns: - **200**: Record moved to the space successfully Requires admin access to the instance * @param instanceDbSpaceId (required) * @param attachSpaceToRecordRequestBody (required) * @param instanceId (optional) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPutWithHttpInfo(Integer instanceDbSpaceId, AttachSpaceToRecordRequestBody attachSpaceToRecordRequestBody, UUID instanceId, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPutValidateBeforeCall(instanceDbSpaceId, attachSpaceToRecordRequestBody, instanceId, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Move Record To Space (asynchronously) * Move a record to a specific space. Parameters: - **space_id**: ID of the space to move the record to - **body**: Request body containing record details - **module_name**: Module name of the record - **model_name**: Model name of the record - **record_id**: ID of the record to move in the space - **instance_id**: UUID of the instance (from URL path) - **schema_id**: UUID of the schema (from URL path) Returns: - **200**: Record moved to the space successfully Requires admin access to the instance * @param instanceDbSpaceId (required) * @param attachSpaceToRecordRequestBody (required) * @param instanceId (optional) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPutAsync(Integer instanceDbSpaceId, AttachSpaceToRecordRequestBody attachSpaceToRecordRequestBody, UUID instanceId, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = moveRecordToSpaceAccessV2SpacesSpaceIdRecordAttachmentsPutValidateBeforeCall(instanceDbSpaceId, attachSpaceToRecordRequestBody, instanceId, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for proxyS3S3PathGet * @param path (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGetCall(String path, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/s3/{path}" .replace("{" + "path" + "}", localVarApiClient.escapeString(path.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call proxyS3S3PathGetValidateBeforeCall(String path, final ApiCallback _callback) throws ApiException { // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling proxyS3S3PathGet(Async)"); } return proxyS3S3PathGetCall(path, _callback); } /** * Proxy S3 * * @param path (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object proxyS3S3PathGet(String path) throws ApiException { ApiResponse<Object> localVarResp = proxyS3S3PathGetWithHttpInfo(path); return localVarResp.getData(); } /** * Proxy S3 * * @param path (required) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> proxyS3S3PathGetWithHttpInfo(String path) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGetValidateBeforeCall(path, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Proxy S3 (asynchronously) * * @param path (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGetAsync(String path, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGetValidateBeforeCall(path, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for proxyS3S3PathGet_0 * @param path (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGet_0Call(String path, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/s3/{path}" .replace("{" + "path" + "}", localVarApiClient.escapeString(path.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "HEAD", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call proxyS3S3PathGet_0ValidateBeforeCall(String path, final ApiCallback _callback) throws ApiException { // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling proxyS3S3PathGet_0(Async)"); } return proxyS3S3PathGet_0Call(path, _callback); } /** * Proxy S3 * * @param path (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object proxyS3S3PathGet_0(String path) throws ApiException { ApiResponse<Object> localVarResp = proxyS3S3PathGet_0WithHttpInfo(path); return localVarResp.getData(); } /** * Proxy S3 * * @param path (required) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> proxyS3S3PathGet_0WithHttpInfo(String path) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGet_0ValidateBeforeCall(path, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Proxy S3 (asynchronously) * * @param path (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGet_0Async(String path, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGet_0ValidateBeforeCall(path, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for proxyS3S3PathGet_1 * @param path (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGet_1Call(String path, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/s3/{path}" .replace("{" + "path" + "}", localVarApiClient.escapeString(path.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call proxyS3S3PathGet_1ValidateBeforeCall(String path, final ApiCallback _callback) throws ApiException { // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling proxyS3S3PathGet_1(Async)"); } return proxyS3S3PathGet_1Call(path, _callback); } /** * Proxy S3 * * @param path (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object proxyS3S3PathGet_1(String path) throws ApiException { ApiResponse<Object> localVarResp = proxyS3S3PathGet_1WithHttpInfo(path); return localVarResp.getData(); } /** * Proxy S3 * * @param path (required) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> proxyS3S3PathGet_1WithHttpInfo(String path) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGet_1ValidateBeforeCall(path, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Proxy S3 (asynchronously) * * @param path (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGet_1Async(String path, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGet_1ValidateBeforeCall(path, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for proxyS3S3PathGet_2 * @param path (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGet_2Call(String path, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/s3/{path}" .replace("{" + "path" + "}", localVarApiClient.escapeString(path.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call proxyS3S3PathGet_2ValidateBeforeCall(String path, final ApiCallback _callback) throws ApiException { // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling proxyS3S3PathGet_2(Async)"); } return proxyS3S3PathGet_2Call(path, _callback); } /** * Proxy S3 * * @param path (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object proxyS3S3PathGet_2(String path) throws ApiException { ApiResponse<Object> localVarResp = proxyS3S3PathGet_2WithHttpInfo(path); return localVarResp.getData(); } /** * Proxy S3 * * @param path (required) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> proxyS3S3PathGet_2WithHttpInfo(String path) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGet_2ValidateBeforeCall(path, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Proxy S3 (asynchronously) * * @param path (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGet_2Async(String path, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGet_2ValidateBeforeCall(path, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for proxyS3S3PathGet_3 * @param path (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGet_3Call(String path, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/s3/{path}" .replace("{" + "path" + "}", localVarApiClient.escapeString(path.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call proxyS3S3PathGet_3ValidateBeforeCall(String path, final ApiCallback _callback) throws ApiException { // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling proxyS3S3PathGet_3(Async)"); } return proxyS3S3PathGet_3Call(path, _callback); } /** * Proxy S3 * * @param path (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object proxyS3S3PathGet_3(String path) throws ApiException { ApiResponse<Object> localVarResp = proxyS3S3PathGet_3WithHttpInfo(path); return localVarResp.getData(); } /** * Proxy S3 * * @param path (required) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> proxyS3S3PathGet_3WithHttpInfo(String path) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGet_3ValidateBeforeCall(path, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Proxy S3 (asynchronously) * * @param path (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call proxyS3S3PathGet_3Async(String path, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = proxyS3S3PathGet_3ValidateBeforeCall(path, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for registerDbServerDbServerRegisterPost * @param registerDbServerBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call registerDbServerDbServerRegisterPostCall(RegisterDbServerBody registerDbServerBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = registerDbServerBody; // create path and map variables String localVarPath = "/db/server/register"; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call registerDbServerDbServerRegisterPostValidateBeforeCall(RegisterDbServerBody registerDbServerBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'registerDbServerBody' is set if (registerDbServerBody == null) { throw new ApiException("Missing the required parameter 'registerDbServerBody' when calling registerDbServerDbServerRegisterPost(Async)"); } return registerDbServerDbServerRegisterPostCall(registerDbServerBody, authorization, _callback); } /** * Register Db Server * * @param registerDbServerBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object registerDbServerDbServerRegisterPost(RegisterDbServerBody registerDbServerBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = registerDbServerDbServerRegisterPostWithHttpInfo(registerDbServerBody, authorization); return localVarResp.getData(); } /** * Register Db Server * * @param registerDbServerBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> registerDbServerDbServerRegisterPostWithHttpInfo(RegisterDbServerBody registerDbServerBody, String authorization) throws ApiException { okhttp3.Call localVarCall = registerDbServerDbServerRegisterPostValidateBeforeCall(registerDbServerBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Register Db Server (asynchronously) * * @param registerDbServerBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call registerDbServerDbServerRegisterPostAsync(RegisterDbServerBody registerDbServerBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = registerDbServerDbServerRegisterPostValidateBeforeCall(registerDbServerBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for registerFormInstancesInstanceIdFormsPost * @param instanceId (required) * @param registerFormRequest (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call registerFormInstancesInstanceIdFormsPostCall(UUID instanceId, RegisterFormRequest registerFormRequest, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = registerFormRequest; // create path and map variables String localVarPath = "/instances/{instance_id}/forms" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call registerFormInstancesInstanceIdFormsPostValidateBeforeCall(UUID instanceId, RegisterFormRequest registerFormRequest, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling registerFormInstancesInstanceIdFormsPost(Async)"); } // verify the required parameter 'registerFormRequest' is set if (registerFormRequest == null) { throw new ApiException("Missing the required parameter 'registerFormRequest' when calling registerFormInstancesInstanceIdFormsPost(Async)"); } return registerFormInstancesInstanceIdFormsPostCall(instanceId, registerFormRequest, authorization, _callback); } /** * Register Form * Register a form for a specific instance. Parameters: - **body**: Request body containing form details - **key**: Key of the form - **data**: Form data - **schema_uid**: UID of the schema Returns: - **201**: Form registered successfully * @param instanceId (required) * @param registerFormRequest (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object registerFormInstancesInstanceIdFormsPost(UUID instanceId, RegisterFormRequest registerFormRequest, String authorization) throws ApiException { ApiResponse<Object> localVarResp = registerFormInstancesInstanceIdFormsPostWithHttpInfo(instanceId, registerFormRequest, authorization); return localVarResp.getData(); } /** * Register Form * Register a form for a specific instance. Parameters: - **body**: Request body containing form details - **key**: Key of the form - **data**: Form data - **schema_uid**: UID of the schema Returns: - **201**: Form registered successfully * @param instanceId (required) * @param registerFormRequest (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> registerFormInstancesInstanceIdFormsPostWithHttpInfo(UUID instanceId, RegisterFormRequest registerFormRequest, String authorization) throws ApiException { okhttp3.Call localVarCall = registerFormInstancesInstanceIdFormsPostValidateBeforeCall(instanceId, registerFormRequest, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Register Form (asynchronously) * Register a form for a specific instance. Parameters: - **body**: Request body containing form details - **key**: Key of the form - **data**: Form data - **schema_uid**: UID of the schema Returns: - **201**: Form registered successfully * @param instanceId (required) * @param registerFormRequest (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call registerFormInstancesInstanceIdFormsPostAsync(UUID instanceId, RegisterFormRequest registerFormRequest, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = registerFormInstancesInstanceIdFormsPostValidateBeforeCall(instanceId, registerFormRequest, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDelete * @param instanceId (required) * @param accountId (optional) * @param teamId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDeleteCall(UUID instanceId, UUID accountId, UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/instances/{instance_id}/collaborators" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (accountId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("account_id", accountId)); } if (teamId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("team_id", teamId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDeleteValidateBeforeCall(UUID instanceId, UUID accountId, UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDelete(Async)"); } return removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDeleteCall(instanceId, accountId, teamId, authorization, _callback); } /** * Remove Collaborator * Remove a collaborator from an instance. Parameters: - **instance_id**: UUID of the instance (from URL path) - **account_id**: UUID of the account to remove (mutually exclusive with team_id) - **team_id**: UUID of the team to remove (mutually exclusive with account_id) Returns: - **200**: Collaborator removed successfully - **400**: Invalid input (e.g., both account_id and team_id provided) Requires admin access to the instance * @param instanceId (required) * @param accountId (optional) * @param teamId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDelete(UUID instanceId, UUID accountId, UUID teamId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDeleteWithHttpInfo(instanceId, accountId, teamId, authorization); return localVarResp.getData(); } /** * Remove Collaborator * Remove a collaborator from an instance. Parameters: - **instance_id**: UUID of the instance (from URL path) - **account_id**: UUID of the account to remove (mutually exclusive with team_id) - **team_id**: UUID of the team to remove (mutually exclusive with account_id) Returns: - **200**: Collaborator removed successfully - **400**: Invalid input (e.g., both account_id and team_id provided) Requires admin access to the instance * @param instanceId (required) * @param accountId (optional) * @param teamId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDeleteWithHttpInfo(UUID instanceId, UUID accountId, UUID teamId, String authorization) throws ApiException { okhttp3.Call localVarCall = removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDeleteValidateBeforeCall(instanceId, accountId, teamId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove Collaborator (asynchronously) * Remove a collaborator from an instance. Parameters: - **instance_id**: UUID of the instance (from URL path) - **account_id**: UUID of the account to remove (mutually exclusive with team_id) - **team_id**: UUID of the team to remove (mutually exclusive with account_id) Returns: - **200**: Collaborator removed successfully - **400**: Invalid input (e.g., both account_id and team_id provided) Requires admin access to the instance * @param instanceId (required) * @param accountId (optional) * @param teamId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDeleteAsync(UUID instanceId, UUID accountId, UUID teamId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = removeCollaboratorAccessV2InstancesInstanceIdCollaboratorsDeleteValidateBeforeCall(instanceId, accountId, teamId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDelete * @param organizationId (required) * @param accountId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDeleteCall(UUID organizationId, UUID accountId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/organizations/{organization_id}/members/{account_id}" .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())) .replace("{" + "account_id" + "}", localVarApiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDeleteValidateBeforeCall(UUID organizationId, UUID accountId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException("Missing the required parameter 'organizationId' when calling removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDelete(Async)"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDelete(Async)"); } return removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDeleteCall(organizationId, accountId, authorization, _callback); } /** * Remove Organization Member * Remove a member from an organization. Parameters: - **organization_id**: UUID of the organization to remove the member from - **account_id**: UUID of the account to remove from the organization Returns: - **200**: Organization member removed successfully - **404**: Member not found in organization * @param organizationId (required) * @param accountId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDelete(UUID organizationId, UUID accountId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDeleteWithHttpInfo(organizationId, accountId, authorization); return localVarResp.getData(); } /** * Remove Organization Member * Remove a member from an organization. Parameters: - **organization_id**: UUID of the organization to remove the member from - **account_id**: UUID of the account to remove from the organization Returns: - **200**: Organization member removed successfully - **404**: Member not found in organization * @param organizationId (required) * @param accountId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDeleteWithHttpInfo(UUID organizationId, UUID accountId, String authorization) throws ApiException { okhttp3.Call localVarCall = removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDeleteValidateBeforeCall(organizationId, accountId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove Organization Member (asynchronously) * Remove a member from an organization. Parameters: - **organization_id**: UUID of the organization to remove the member from - **account_id**: UUID of the account to remove from the organization Returns: - **200**: Organization member removed successfully - **404**: Member not found in organization * @param organizationId (required) * @param accountId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDeleteAsync(UUID organizationId, UUID accountId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = removeOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdDeleteValidateBeforeCall(organizationId, accountId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDelete * @param spaceId (required) * @param accountId (optional) * @param teamId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDeleteCall(UUID spaceId, UUID accountId, UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}/collaborators" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (accountId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("account_id", accountId)); } if (teamId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("team_id", teamId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDeleteValidateBeforeCall(UUID spaceId, UUID accountId, UUID teamId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDelete(Async)"); } return removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDeleteCall(spaceId, accountId, teamId, authorization, _callback); } /** * Remove Space Collaborator * Remove a collaborator (account or team) from a space. Parameters: - **space_id**: ID of the space to remove the collaborator from - **account_id**: UUID of the account to remove (mutually exclusive with team_id) - **team_id**: UUID of the team to remove (mutually exclusive with account_id) Returns: - **200**: Collaborator removed from space successfully - **400**: Invalid input (e.g., both account_id and team_id provided or neither provided) * @param spaceId (required) * @param accountId (optional) * @param teamId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDelete(UUID spaceId, UUID accountId, UUID teamId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDeleteWithHttpInfo(spaceId, accountId, teamId, authorization); return localVarResp.getData(); } /** * Remove Space Collaborator * Remove a collaborator (account or team) from a space. Parameters: - **space_id**: ID of the space to remove the collaborator from - **account_id**: UUID of the account to remove (mutually exclusive with team_id) - **team_id**: UUID of the team to remove (mutually exclusive with account_id) Returns: - **200**: Collaborator removed from space successfully - **400**: Invalid input (e.g., both account_id and team_id provided or neither provided) * @param spaceId (required) * @param accountId (optional) * @param teamId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDeleteWithHttpInfo(UUID spaceId, UUID accountId, UUID teamId, String authorization) throws ApiException { okhttp3.Call localVarCall = removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDeleteValidateBeforeCall(spaceId, accountId, teamId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove Space Collaborator (asynchronously) * Remove a collaborator (account or team) from a space. Parameters: - **space_id**: ID of the space to remove the collaborator from - **account_id**: UUID of the account to remove (mutually exclusive with team_id) - **team_id**: UUID of the team to remove (mutually exclusive with account_id) Returns: - **200**: Collaborator removed from space successfully - **400**: Invalid input (e.g., both account_id and team_id provided or neither provided) * @param spaceId (required) * @param accountId (optional) * @param teamId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDeleteAsync(UUID spaceId, UUID accountId, UUID teamId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = removeSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsDeleteValidateBeforeCall(spaceId, accountId, teamId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDelete * @param teamId (required) * @param accountId (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDeleteCall(UUID teamId, UUID accountId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/access_v2/teams/{team_id}/members/{account_id}" .replace("{" + "team_id" + "}", localVarApiClient.escapeString(teamId.toString())) .replace("{" + "account_id" + "}", localVarApiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDeleteValidateBeforeCall(UUID teamId, UUID accountId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'teamId' is set if (teamId == null) { throw new ApiException("Missing the required parameter 'teamId' when calling removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDelete(Async)"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDelete(Async)"); } return removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDeleteCall(teamId, accountId, authorization, _callback); } /** * Remove Team Member * Remove a member from a team. Parameters: - **team_id**: UUID of the team to remove the member from - **account_id**: UUID of the account to remove from the team Returns: - **200**: Team member removed successfully - **404**: Member not found in team * @param teamId (required) * @param accountId (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDelete(UUID teamId, UUID accountId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDeleteWithHttpInfo(teamId, accountId, authorization); return localVarResp.getData(); } /** * Remove Team Member * Remove a member from a team. Parameters: - **team_id**: UUID of the team to remove the member from - **account_id**: UUID of the account to remove from the team Returns: - **200**: Team member removed successfully - **404**: Member not found in team * @param teamId (required) * @param accountId (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDeleteWithHttpInfo(UUID teamId, UUID accountId, String authorization) throws ApiException { okhttp3.Call localVarCall = removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDeleteValidateBeforeCall(teamId, accountId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove Team Member (asynchronously) * Remove a member from a team. Parameters: - **team_id**: UUID of the team to remove the member from - **account_id**: UUID of the account to remove from the team Returns: - **200**: Team member removed successfully - **404**: Member not found in team * @param teamId (required) * @param accountId (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDeleteAsync(UUID teamId, UUID accountId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = removeTeamMemberAccessV2TeamsTeamIdMembersAccountIdDeleteValidateBeforeCall(teamId, accountId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for transferOwnershipInstancesInstanceIdOwnerHandlePatch * @param handle (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call transferOwnershipInstancesInstanceIdOwnerHandlePatchCall(String handle, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/owner/{handle}" .replace("{" + "handle" + "}", localVarApiClient.escapeString(handle.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call transferOwnershipInstancesInstanceIdOwnerHandlePatchValidateBeforeCall(String handle, UUID instanceId, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'handle' is set if (handle == null) { throw new ApiException("Missing the required parameter 'handle' when calling transferOwnershipInstancesInstanceIdOwnerHandlePatch(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling transferOwnershipInstancesInstanceIdOwnerHandlePatch(Async)"); } return transferOwnershipInstancesInstanceIdOwnerHandlePatchCall(handle, instanceId, schemaId, authorization, _callback); } /** * Transfer Ownership * * @param handle (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object transferOwnershipInstancesInstanceIdOwnerHandlePatch(String handle, UUID instanceId, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = transferOwnershipInstancesInstanceIdOwnerHandlePatchWithHttpInfo(handle, instanceId, schemaId, authorization); return localVarResp.getData(); } /** * Transfer Ownership * * @param handle (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> transferOwnershipInstancesInstanceIdOwnerHandlePatchWithHttpInfo(String handle, UUID instanceId, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = transferOwnershipInstancesInstanceIdOwnerHandlePatchValidateBeforeCall(handle, instanceId, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Transfer Ownership (asynchronously) * * @param handle (required) * @param instanceId (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call transferOwnershipInstancesInstanceIdOwnerHandlePatchAsync(String handle, UUID instanceId, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = transferOwnershipInstancesInstanceIdOwnerHandlePatchValidateBeforeCall(handle, instanceId, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatch * @param instanceId (required) * @param updateCollaboratorRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatchCall(UUID instanceId, UpdateCollaboratorRequestBody updateCollaboratorRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateCollaboratorRequestBody; // create path and map variables String localVarPath = "/access_v2/instances/{instance_id}/collaborators" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatchValidateBeforeCall(UUID instanceId, UpdateCollaboratorRequestBody updateCollaboratorRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatch(Async)"); } // verify the required parameter 'updateCollaboratorRequestBody' is set if (updateCollaboratorRequestBody == null) { throw new ApiException("Missing the required parameter 'updateCollaboratorRequestBody' when calling updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatch(Async)"); } return updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatchCall(instanceId, updateCollaboratorRequestBody, authorization, _callback); } /** * Update Collaborator * Update a collaborator&#39;s permissions on an instance. Parameters: - **instance_id**: UUID of the instance (from URL path) - **body**: Request body containing collaborator details - **account_id**: UUID of the account to update (mutually exclusive with team_id) - **team_id**: UUID of the team to update (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **200**: Collaborator updated successfully - **400**: Invalid input (e.g., both account_id and team_id provided) Requires admin access to the instance * @param instanceId (required) * @param updateCollaboratorRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatch(UUID instanceId, UpdateCollaboratorRequestBody updateCollaboratorRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatchWithHttpInfo(instanceId, updateCollaboratorRequestBody, authorization); return localVarResp.getData(); } /** * Update Collaborator * Update a collaborator&#39;s permissions on an instance. Parameters: - **instance_id**: UUID of the instance (from URL path) - **body**: Request body containing collaborator details - **account_id**: UUID of the account to update (mutually exclusive with team_id) - **team_id**: UUID of the team to update (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **200**: Collaborator updated successfully - **400**: Invalid input (e.g., both account_id and team_id provided) Requires admin access to the instance * @param instanceId (required) * @param updateCollaboratorRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatchWithHttpInfo(UUID instanceId, UpdateCollaboratorRequestBody updateCollaboratorRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatchValidateBeforeCall(instanceId, updateCollaboratorRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Collaborator (asynchronously) * Update a collaborator&#39;s permissions on an instance. Parameters: - **instance_id**: UUID of the instance (from URL path) - **body**: Request body containing collaborator details - **account_id**: UUID of the account to update (mutually exclusive with team_id) - **team_id**: UUID of the team to update (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **200**: Collaborator updated successfully - **400**: Invalid input (e.g., both account_id and team_id provided) Requires admin access to the instance * @param instanceId (required) * @param updateCollaboratorRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatchAsync(UUID instanceId, UpdateCollaboratorRequestBody updateCollaboratorRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = updateCollaboratorAccessV2InstancesInstanceIdCollaboratorsPatchValidateBeforeCall(instanceId, updateCollaboratorRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch * @param instanceId (required) * @param accountId (required) * @param role (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchCall(UUID instanceId, UUID accountId, String role, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/collaborators/{account_id}" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())) .replace("{" + "account_id" + "}", localVarApiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (role != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("role", role)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchValidateBeforeCall(UUID instanceId, UUID accountId, String role, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch(Async)"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch(Async)"); } // verify the required parameter 'role' is set if (role == null) { throw new ApiException("Missing the required parameter 'role' when calling updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch(Async)"); } return updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchCall(instanceId, accountId, role, authorization, _callback); } /** * Update Collaborator * * @param instanceId (required) * @param accountId (required) * @param role (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch(UUID instanceId, UUID accountId, String role, String authorization) throws ApiException { ApiResponse<Object> localVarResp = updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchWithHttpInfo(instanceId, accountId, role, authorization); return localVarResp.getData(); } /** * Update Collaborator * * @param instanceId (required) * @param accountId (required) * @param role (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchWithHttpInfo(UUID instanceId, UUID accountId, String role, String authorization) throws ApiException { okhttp3.Call localVarCall = updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchValidateBeforeCall(instanceId, accountId, role, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Collaborator (asynchronously) * * @param instanceId (required) * @param accountId (required) * @param role (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchAsync(UUID instanceId, UUID accountId, String role, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = updateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchValidateBeforeCall(instanceId, accountId, role, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatch * @param organizationId (required) * @param accountId (required) * @param updateOrganizationMemberRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatchCall(UUID organizationId, UUID accountId, UpdateOrganizationMemberRequestBody updateOrganizationMemberRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateOrganizationMemberRequestBody; // create path and map variables String localVarPath = "/access_v2/organizations/{organization_id}/members/{account_id}" .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())) .replace("{" + "account_id" + "}", localVarApiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatchValidateBeforeCall(UUID organizationId, UUID accountId, UpdateOrganizationMemberRequestBody updateOrganizationMemberRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException("Missing the required parameter 'organizationId' when calling updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatch(Async)"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatch(Async)"); } // verify the required parameter 'updateOrganizationMemberRequestBody' is set if (updateOrganizationMemberRequestBody == null) { throw new ApiException("Missing the required parameter 'updateOrganizationMemberRequestBody' when calling updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatch(Async)"); } return updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatchCall(organizationId, accountId, updateOrganizationMemberRequestBody, authorization, _callback); } /** * Update Organization Member * Update an organization member&#39;s details. Parameters: - **organization_id**: UUID of the organization the member belongs to - **account_id**: UUID of the account to update - **body**: Request body containing updated member details - **role**: Role of the member in the organization Returns: - **200**: Organization member updated successfully - **404**: Member not found in organization * @param organizationId (required) * @param accountId (required) * @param updateOrganizationMemberRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatch(UUID organizationId, UUID accountId, UpdateOrganizationMemberRequestBody updateOrganizationMemberRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatchWithHttpInfo(organizationId, accountId, updateOrganizationMemberRequestBody, authorization); return localVarResp.getData(); } /** * Update Organization Member * Update an organization member&#39;s details. Parameters: - **organization_id**: UUID of the organization the member belongs to - **account_id**: UUID of the account to update - **body**: Request body containing updated member details - **role**: Role of the member in the organization Returns: - **200**: Organization member updated successfully - **404**: Member not found in organization * @param organizationId (required) * @param accountId (required) * @param updateOrganizationMemberRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatchWithHttpInfo(UUID organizationId, UUID accountId, UpdateOrganizationMemberRequestBody updateOrganizationMemberRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatchValidateBeforeCall(organizationId, accountId, updateOrganizationMemberRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Organization Member (asynchronously) * Update an organization member&#39;s details. Parameters: - **organization_id**: UUID of the organization the member belongs to - **account_id**: UUID of the account to update - **body**: Request body containing updated member details - **role**: Role of the member in the organization Returns: - **200**: Organization member updated successfully - **404**: Member not found in organization * @param organizationId (required) * @param accountId (required) * @param updateOrganizationMemberRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatchAsync(UUID organizationId, UUID accountId, UpdateOrganizationMemberRequestBody updateOrganizationMemberRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = updateOrganizationMemberAccessV2OrganizationsOrganizationIdMembersAccountIdPatchValidateBeforeCall(organizationId, accountId, updateOrganizationMemberRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch * @param moduleName (required) * @param modelName (required) * @param uid (required) * @param instanceId (required) * @param body (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchCall(String moduleName, String modelName, String uid, UUID instanceId, Object body, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}/{uid}" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "uid" + "}", localVarApiClient.escapeString(uid.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchValidateBeforeCall(String moduleName, String modelName, String uid, UUID instanceId, Object body, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(Async)"); } // verify the required parameter 'uid' is set if (uid == null) { throw new ApiException("Missing the required parameter 'uid' when calling updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(Async)"); } return updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchCall(moduleName, modelName, uid, instanceId, body, schemaId, authorization, _callback); } /** * Update Record * * @param moduleName (required) * @param modelName (required) * @param uid (required) * @param instanceId (required) * @param body (required) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(String moduleName, String modelName, String uid, UUID instanceId, Object body, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchWithHttpInfo(moduleName, modelName, uid, instanceId, body, schemaId, authorization); return localVarResp.getData(); } /** * Update Record * * @param moduleName (required) * @param modelName (required) * @param uid (required) * @param instanceId (required) * @param body (required) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchWithHttpInfo(String moduleName, String modelName, String uid, UUID instanceId, Object body, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchValidateBeforeCall(moduleName, modelName, uid, instanceId, body, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Record (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param uid (required) * @param instanceId (required) * @param body (required) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchAsync(String moduleName, String modelName, String uid, UUID instanceId, Object body, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = updateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchValidateBeforeCall(moduleName, modelName, uid, instanceId, body, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateSpaceAccessV2SpacesSpaceIdPatch * @param spaceId (required) * @param updateSpaceRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateSpaceAccessV2SpacesSpaceIdPatchCall(UUID spaceId, UpdateSpaceRequestBody updateSpaceRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateSpaceRequestBody; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateSpaceAccessV2SpacesSpaceIdPatchValidateBeforeCall(UUID spaceId, UpdateSpaceRequestBody updateSpaceRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling updateSpaceAccessV2SpacesSpaceIdPatch(Async)"); } // verify the required parameter 'updateSpaceRequestBody' is set if (updateSpaceRequestBody == null) { throw new ApiException("Missing the required parameter 'updateSpaceRequestBody' when calling updateSpaceAccessV2SpacesSpaceIdPatch(Async)"); } return updateSpaceAccessV2SpacesSpaceIdPatchCall(spaceId, updateSpaceRequestBody, authorization, _callback); } /** * Update Space * Update a space&#39;s details. Parameters: - **space_id**: ID of the space to update - **body**: Request body containing updated space details - **name**: Optional new name for the space - **description**: Optional new description for the space Returns: - **200**: Space updated successfully * @param spaceId (required) * @param updateSpaceRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object updateSpaceAccessV2SpacesSpaceIdPatch(UUID spaceId, UpdateSpaceRequestBody updateSpaceRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = updateSpaceAccessV2SpacesSpaceIdPatchWithHttpInfo(spaceId, updateSpaceRequestBody, authorization); return localVarResp.getData(); } /** * Update Space * Update a space&#39;s details. Parameters: - **space_id**: ID of the space to update - **body**: Request body containing updated space details - **name**: Optional new name for the space - **description**: Optional new description for the space Returns: - **200**: Space updated successfully * @param spaceId (required) * @param updateSpaceRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> updateSpaceAccessV2SpacesSpaceIdPatchWithHttpInfo(UUID spaceId, UpdateSpaceRequestBody updateSpaceRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = updateSpaceAccessV2SpacesSpaceIdPatchValidateBeforeCall(spaceId, updateSpaceRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Space (asynchronously) * Update a space&#39;s details. Parameters: - **space_id**: ID of the space to update - **body**: Request body containing updated space details - **name**: Optional new name for the space - **description**: Optional new description for the space Returns: - **200**: Space updated successfully * @param spaceId (required) * @param updateSpaceRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateSpaceAccessV2SpacesSpaceIdPatchAsync(UUID spaceId, UpdateSpaceRequestBody updateSpaceRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = updateSpaceAccessV2SpacesSpaceIdPatchValidateBeforeCall(spaceId, updateSpaceRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatch * @param spaceId (required) * @param updateSpaceCollaboratorRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatchCall(UUID spaceId, UpdateSpaceCollaboratorRequestBody updateSpaceCollaboratorRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateSpaceCollaboratorRequestBody; // create path and map variables String localVarPath = "/access_v2/spaces/{space_id}/collaborators" .replace("{" + "space_id" + "}", localVarApiClient.escapeString(spaceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatchValidateBeforeCall(UUID spaceId, UpdateSpaceCollaboratorRequestBody updateSpaceCollaboratorRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException("Missing the required parameter 'spaceId' when calling updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatch(Async)"); } // verify the required parameter 'updateSpaceCollaboratorRequestBody' is set if (updateSpaceCollaboratorRequestBody == null) { throw new ApiException("Missing the required parameter 'updateSpaceCollaboratorRequestBody' when calling updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatch(Async)"); } return updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatchCall(spaceId, updateSpaceCollaboratorRequestBody, authorization, _callback); } /** * Update Space Collaborator * Update a collaborator&#39;s permissions in a space. Parameters: - **space_id**: ID of the space to update the collaborator in - **body**: Request body containing collaborator details - **account_id**: UUID of the account to update (mutually exclusive with team_id) - **team_id**: UUID of the team to update (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **200**: Collaborator updated successfully - **400**: Invalid input (e.g., both account_id and team_id provided) - **404**: Collaborator not found in space * @param spaceId (required) * @param updateSpaceCollaboratorRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatch(UUID spaceId, UpdateSpaceCollaboratorRequestBody updateSpaceCollaboratorRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatchWithHttpInfo(spaceId, updateSpaceCollaboratorRequestBody, authorization); return localVarResp.getData(); } /** * Update Space Collaborator * Update a collaborator&#39;s permissions in a space. Parameters: - **space_id**: ID of the space to update the collaborator in - **body**: Request body containing collaborator details - **account_id**: UUID of the account to update (mutually exclusive with team_id) - **team_id**: UUID of the team to update (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **200**: Collaborator updated successfully - **400**: Invalid input (e.g., both account_id and team_id provided) - **404**: Collaborator not found in space * @param spaceId (required) * @param updateSpaceCollaboratorRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatchWithHttpInfo(UUID spaceId, UpdateSpaceCollaboratorRequestBody updateSpaceCollaboratorRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatchValidateBeforeCall(spaceId, updateSpaceCollaboratorRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Space Collaborator (asynchronously) * Update a collaborator&#39;s permissions in a space. Parameters: - **space_id**: ID of the space to update the collaborator in - **body**: Request body containing collaborator details - **account_id**: UUID of the account to update (mutually exclusive with team_id) - **team_id**: UUID of the team to update (mutually exclusive with account_id) - **role**: Role of the collaborator Returns: - **200**: Collaborator updated successfully - **400**: Invalid input (e.g., both account_id and team_id provided) - **404**: Collaborator not found in space * @param spaceId (required) * @param updateSpaceCollaboratorRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatchAsync(UUID spaceId, UpdateSpaceCollaboratorRequestBody updateSpaceCollaboratorRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = updateSpaceCollaboratorAccessV2SpacesSpaceIdCollaboratorsPatchValidateBeforeCall(spaceId, updateSpaceCollaboratorRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateTeamAccessV2TeamsTeamIdPatch * @param teamId (required) * @param updateTeamRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateTeamAccessV2TeamsTeamIdPatchCall(UUID teamId, UpdateTeamRequestBody updateTeamRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateTeamRequestBody; // create path and map variables String localVarPath = "/access_v2/teams/{team_id}" .replace("{" + "team_id" + "}", localVarApiClient.escapeString(teamId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateTeamAccessV2TeamsTeamIdPatchValidateBeforeCall(UUID teamId, UpdateTeamRequestBody updateTeamRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'teamId' is set if (teamId == null) { throw new ApiException("Missing the required parameter 'teamId' when calling updateTeamAccessV2TeamsTeamIdPatch(Async)"); } // verify the required parameter 'updateTeamRequestBody' is set if (updateTeamRequestBody == null) { throw new ApiException("Missing the required parameter 'updateTeamRequestBody' when calling updateTeamAccessV2TeamsTeamIdPatch(Async)"); } return updateTeamAccessV2TeamsTeamIdPatchCall(teamId, updateTeamRequestBody, authorization, _callback); } /** * Update Team * Update a team&#39;s details. Parameters: - **team_id**: UUID of the team to update - **body**: Request body containing updated team details - **name**: Optional new name for the team - **description**: Optional new description for the team Returns: - **200**: Team updated successfully * @param teamId (required) * @param updateTeamRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object updateTeamAccessV2TeamsTeamIdPatch(UUID teamId, UpdateTeamRequestBody updateTeamRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = updateTeamAccessV2TeamsTeamIdPatchWithHttpInfo(teamId, updateTeamRequestBody, authorization); return localVarResp.getData(); } /** * Update Team * Update a team&#39;s details. Parameters: - **team_id**: UUID of the team to update - **body**: Request body containing updated team details - **name**: Optional new name for the team - **description**: Optional new description for the team Returns: - **200**: Team updated successfully * @param teamId (required) * @param updateTeamRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> updateTeamAccessV2TeamsTeamIdPatchWithHttpInfo(UUID teamId, UpdateTeamRequestBody updateTeamRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = updateTeamAccessV2TeamsTeamIdPatchValidateBeforeCall(teamId, updateTeamRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Team (asynchronously) * Update a team&#39;s details. Parameters: - **team_id**: UUID of the team to update - **body**: Request body containing updated team details - **name**: Optional new name for the team - **description**: Optional new description for the team Returns: - **200**: Team updated successfully * @param teamId (required) * @param updateTeamRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateTeamAccessV2TeamsTeamIdPatchAsync(UUID teamId, UpdateTeamRequestBody updateTeamRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = updateTeamAccessV2TeamsTeamIdPatchValidateBeforeCall(teamId, updateTeamRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatch * @param teamId (required) * @param accountId (required) * @param updateTeamMemberRequestBody (required) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatchCall(UUID teamId, UUID accountId, UpdateTeamMemberRequestBody updateTeamMemberRequestBody, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateTeamMemberRequestBody; // create path and map variables String localVarPath = "/access_v2/teams/{team_id}/members/{account_id}" .replace("{" + "team_id" + "}", localVarApiClient.escapeString(teamId.toString())) .replace("{" + "account_id" + "}", localVarApiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatchValidateBeforeCall(UUID teamId, UUID accountId, UpdateTeamMemberRequestBody updateTeamMemberRequestBody, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'teamId' is set if (teamId == null) { throw new ApiException("Missing the required parameter 'teamId' when calling updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatch(Async)"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatch(Async)"); } // verify the required parameter 'updateTeamMemberRequestBody' is set if (updateTeamMemberRequestBody == null) { throw new ApiException("Missing the required parameter 'updateTeamMemberRequestBody' when calling updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatch(Async)"); } return updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatchCall(teamId, accountId, updateTeamMemberRequestBody, authorization, _callback); } /** * Update Team Member * Update a team member&#39;s details. Parameters: - **team_id**: UUID of the team the member belongs to - **account_id**: UUID of the account to update - **body**: Request body containing updated member details - **role**: Role of the member in the team Returns: - **200**: Team member updated successfully - **404**: Member not found in team * @param teamId (required) * @param accountId (required) * @param updateTeamMemberRequestBody (required) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatch(UUID teamId, UUID accountId, UpdateTeamMemberRequestBody updateTeamMemberRequestBody, String authorization) throws ApiException { ApiResponse<Object> localVarResp = updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatchWithHttpInfo(teamId, accountId, updateTeamMemberRequestBody, authorization); return localVarResp.getData(); } /** * Update Team Member * Update a team member&#39;s details. Parameters: - **team_id**: UUID of the team the member belongs to - **account_id**: UUID of the account to update - **body**: Request body containing updated member details - **role**: Role of the member in the team Returns: - **200**: Team member updated successfully - **404**: Member not found in team * @param teamId (required) * @param accountId (required) * @param updateTeamMemberRequestBody (required) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatchWithHttpInfo(UUID teamId, UUID accountId, UpdateTeamMemberRequestBody updateTeamMemberRequestBody, String authorization) throws ApiException { okhttp3.Call localVarCall = updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatchValidateBeforeCall(teamId, accountId, updateTeamMemberRequestBody, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Team Member (asynchronously) * Update a team member&#39;s details. Parameters: - **team_id**: UUID of the team the member belongs to - **account_id**: UUID of the account to update - **body**: Request body containing updated member details - **role**: Role of the member in the team Returns: - **200**: Team member updated successfully - **404**: Member not found in team * @param teamId (required) * @param accountId (required) * @param updateTeamMemberRequestBody (required) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatchAsync(UUID teamId, UUID accountId, UpdateTeamMemberRequestBody updateTeamMemberRequestBody, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = updateTeamMemberAccessV2TeamsTeamIdMembersAccountIdPatchValidateBeforeCall(teamId, accountId, updateTeamMemberRequestBody, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for uploadArtifactInstancesInstanceIdArtifactsUploadPost * @param instanceId (required) * @param _file (required) * @param authorization (optional) * @param kwargs (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call uploadArtifactInstancesInstanceIdArtifactsUploadPostCall(UUID instanceId, File _file, String authorization, String kwargs, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/instances/{instance_id}/artifacts/upload" .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (_file != null) { localVarFormParams.put("file", _file); } if (kwargs != null) { localVarFormParams.put("kwargs", kwargs); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call uploadArtifactInstancesInstanceIdArtifactsUploadPostValidateBeforeCall(UUID instanceId, File _file, String authorization, String kwargs, final ApiCallback _callback) throws ApiException { // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling uploadArtifactInstancesInstanceIdArtifactsUploadPost(Async)"); } // verify the required parameter '_file' is set if (_file == null) { throw new ApiException("Missing the required parameter '_file' when calling uploadArtifactInstancesInstanceIdArtifactsUploadPost(Async)"); } return uploadArtifactInstancesInstanceIdArtifactsUploadPostCall(instanceId, _file, authorization, kwargs, _callback); } /** * Upload Artifact * * @param instanceId (required) * @param _file (required) * @param authorization (optional) * @param kwargs (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object uploadArtifactInstancesInstanceIdArtifactsUploadPost(UUID instanceId, File _file, String authorization, String kwargs) throws ApiException { ApiResponse<Object> localVarResp = uploadArtifactInstancesInstanceIdArtifactsUploadPostWithHttpInfo(instanceId, _file, authorization, kwargs); return localVarResp.getData(); } /** * Upload Artifact * * @param instanceId (required) * @param _file (required) * @param authorization (optional) * @param kwargs (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> uploadArtifactInstancesInstanceIdArtifactsUploadPostWithHttpInfo(UUID instanceId, File _file, String authorization, String kwargs) throws ApiException { okhttp3.Call localVarCall = uploadArtifactInstancesInstanceIdArtifactsUploadPostValidateBeforeCall(instanceId, _file, authorization, kwargs, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Upload Artifact (asynchronously) * * @param instanceId (required) * @param _file (required) * @param authorization (optional) * @param kwargs (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call uploadArtifactInstancesInstanceIdArtifactsUploadPostAsync(UUID instanceId, File _file, String authorization, String kwargs, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = uploadArtifactInstancesInstanceIdArtifactsUploadPostValidateBeforeCall(instanceId, _file, authorization, kwargs, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPut * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param body (required) * @param conflictColumns (optional) * @param schemaId (optional) * @param authorization (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPutCall(String moduleName, String modelName, UUID instanceId, Object body, List<String> conflictColumns, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/instances/{instance_id}/modules/{module_name}/{model_name}/upsert" .replace("{" + "module_name" + "}", localVarApiClient.escapeString(moduleName.toString())) .replace("{" + "model_name" + "}", localVarApiClient.escapeString(modelName.toString())) .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); if (conflictColumns != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "conflict_columns", conflictColumns)); } if (schemaId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("schema_id", schemaId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPutValidateBeforeCall(String moduleName, String modelName, UUID instanceId, Object body, List<String> conflictColumns, UUID schemaId, String authorization, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moduleName' is set if (moduleName == null) { throw new ApiException("Missing the required parameter 'moduleName' when calling upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPut(Async)"); } // verify the required parameter 'modelName' is set if (modelName == null) { throw new ApiException("Missing the required parameter 'modelName' when calling upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPut(Async)"); } // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPut(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPut(Async)"); } return upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPutCall(moduleName, modelName, instanceId, body, conflictColumns, schemaId, authorization, _callback); } /** * Upsert Records * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param body (required) * @param conflictColumns (optional) * @param schemaId (optional) * @param authorization (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public Object upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPut(String moduleName, String modelName, UUID instanceId, Object body, List<String> conflictColumns, UUID schemaId, String authorization) throws ApiException { ApiResponse<Object> localVarResp = upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPutWithHttpInfo(moduleName, modelName, instanceId, body, conflictColumns, schemaId, authorization); return localVarResp.getData(); } /** * Upsert Records * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param body (required) * @param conflictColumns (optional) * @param schemaId (optional) * @param authorization (optional) * @return ApiResponse&lt;Object&gt; * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public ApiResponse<Object> upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPutWithHttpInfo(String moduleName, String modelName, UUID instanceId, Object body, List<String> conflictColumns, UUID schemaId, String authorization) throws ApiException { okhttp3.Call localVarCall = upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPutValidateBeforeCall(moduleName, modelName, instanceId, body, conflictColumns, schemaId, authorization, null); Type localVarReturnType = new TypeToken<Object>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Upsert Records (asynchronously) * * @param moduleName (required) * @param modelName (required) * @param instanceId (required) * @param body (required) * @param conflictColumns (optional) * @param schemaId (optional) * @param authorization (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details <table border="1"> <caption>Response Details</caption> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr> <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr> </table> */ public okhttp3.Call upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPutAsync(String moduleName, String modelName, UUID instanceId, Object body, List<String> conflictColumns, UUID schemaId, String authorization, final ApiCallback<Object> _callback) throws ApiException { okhttp3.Call localVarCall = upsertRecordsInstancesInstanceIdModulesModuleNameModelNameUpsertPutValidateBeforeCall(moduleName, modelName, instanceId, body, conflictColumns, schemaId, authorization, _callback); Type localVarReturnType = new TypeToken<Object>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/auth/ApiKeyAuth.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.auth; import ai.lamin.lamin_api_client.ApiException; import ai.lamin.lamin_api_client.Pair; import java.net.URI; import java.util.Map; import java.util.List; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; private String apiKey; private String apiKeyPrefix; public ApiKeyAuth(String location, String paramName) { this.location = location; this.paramName = paramName; } public String getLocation() { return location; } public String getParamName() { return paramName; } public String getApiKey() { return apiKey; } public void setApiKey(String apiKey) { this.apiKey = apiKey; } public String getApiKeyPrefix() { return apiKeyPrefix; } public void setApiKeyPrefix(String apiKeyPrefix) { this.apiKeyPrefix = apiKeyPrefix; } @Override public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException { if (apiKey == null) { return; } String value; if (apiKeyPrefix != null) { value = apiKeyPrefix + " " + apiKey; } else { value = apiKey; } if ("query".equals(location)) { queryParams.add(new Pair(paramName, value)); } else if ("header".equals(location)) { headerParams.put(paramName, value); } else if ("cookie".equals(location)) { cookieParams.put(paramName, value); } } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/auth/Authentication.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.auth; import ai.lamin.lamin_api_client.Pair; import ai.lamin.lamin_api_client.ApiException; import java.net.URI; import java.util.Map; import java.util.List; public interface Authentication { /** * Apply authentication settings to header and query params. * * @param queryParams List of query parameters * @param headerParams Map of header parameters * @param cookieParams Map of cookie parameters * @param payload HTTP request body * @param method HTTP method * @param uri URI * @throws ApiException if failed to update the parameters */ void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException; }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/auth/HttpBasicAuth.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.auth; import ai.lamin.lamin_api_client.Pair; import ai.lamin.lamin_api_client.ApiException; import okhttp3.Credentials; import java.net.URI; import java.util.Map; import java.util.List; public class HttpBasicAuth implements Authentication { private String username; private String password; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException { if (username == null && password == null) { return; } headerParams.put("Authorization", Credentials.basic( username == null ? "" : username, password == null ? "" : password)); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/auth/HttpBearerAuth.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.auth; import ai.lamin.lamin_api_client.ApiException; import ai.lamin.lamin_api_client.Pair; import java.net.URI; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.function.Supplier; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier<String> tokenSupplier; public HttpBearerAuth(String scheme) { this.scheme = scheme; } /** * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. * * @return The bearer token */ public String getBearerToken() { return tokenSupplier.get(); } /** * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. * * @param bearerToken The bearer token to send in the Authorization header */ public void setBearerToken(String bearerToken) { this.tokenSupplier = () -> bearerToken; } /** * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. * * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header */ public void setBearerToken(Supplier<String> tokenSupplier) { this.tokenSupplier = tokenSupplier; } @Override public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException { String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); if (bearerToken == null) { return; } headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); } private static String upperCaseBearer(String scheme) { return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/AbstractOpenApiSchema.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import ai.lamin.lamin_api_client.ApiException; import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object private Object instance; // is nullable private Boolean isNullable; // schema type (e.g. oneOf, anyOf) private final String schemaType; public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { this.schemaType = schemaType; this.isNullable = isNullable; } /** * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object * * @return an instance of the actual schema/object */ public abstract Map<String, Class<?>> getSchemas(); /** * Get the actual instance * * @return an instance of the actual schema/object */ //@JsonValue public Object getActualInstance() {return instance;} /** * Set the actual instance * * @param instance the actual instance of the schema/object */ public void setActualInstance(Object instance) {this.instance = instance;} /** * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well * * @return an instance of the actual schema/object */ public Object getActualInstanceRecursively() { return getActualInstanceRecursively(this); } private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { if (object.getActualInstance() == null) { return null; } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); } else { return object.getActualInstance(); } } /** * Get the schema type (e.g. anyOf, oneOf) * * @return the schema type */ public String getSchemaType() { return schemaType; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ").append(getClass()).append(" {\n"); sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; return Objects.equals(this.instance, a.instance) && Objects.equals(this.isNullable, a.isNullable) && Objects.equals(this.schemaType, a.schemaType); } @Override public int hashCode() { return Objects.hash(instance, isNullable, schemaType); } /** * Is nullable * * @return true if it's nullable */ public Boolean isNullable() { if (Boolean.TRUE.equals(isNullable)) { return Boolean.TRUE; } else { return Boolean.FALSE; } } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/AddCollaboratorRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * AddCollaboratorRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class AddCollaboratorRequestBody { public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @javax.annotation.Nullable private UUID accountId; public static final String SERIALIZED_NAME_TEAM_ID = "team_id"; @SerializedName(SERIALIZED_NAME_TEAM_ID) @javax.annotation.Nullable private UUID teamId; /** * Gets or Sets role */ @JsonAdapter(RoleEnum.Adapter.class) public enum RoleEnum { ADMIN("admin"), READ("read"), WRITE("write"); private String value; RoleEnum(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } public static RoleEnum fromValue(String value) { for (RoleEnum b : RoleEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter<RoleEnum> { @Override public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override public RoleEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); return RoleEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); RoleEnum.fromValue(value); } } public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) @javax.annotation.Nullable private RoleEnum role = RoleEnum.READ; public AddCollaboratorRequestBody() { } public AddCollaboratorRequestBody accountId(@javax.annotation.Nullable UUID accountId) { this.accountId = accountId; return this; } /** * Get accountId * @return accountId */ @javax.annotation.Nullable public UUID getAccountId() { return accountId; } public void setAccountId(@javax.annotation.Nullable UUID accountId) { this.accountId = accountId; } public AddCollaboratorRequestBody teamId(@javax.annotation.Nullable UUID teamId) { this.teamId = teamId; return this; } /** * Get teamId * @return teamId */ @javax.annotation.Nullable public UUID getTeamId() { return teamId; } public void setTeamId(@javax.annotation.Nullable UUID teamId) { this.teamId = teamId; } public AddCollaboratorRequestBody role(@javax.annotation.Nullable RoleEnum role) { this.role = role; return this; } /** * Get role * @return role */ @javax.annotation.Nullable public RoleEnum getRole() { return role; } public void setRole(@javax.annotation.Nullable RoleEnum role) { this.role = role; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AddCollaboratorRequestBody addCollaboratorRequestBody = (AddCollaboratorRequestBody) o; return Objects.equals(this.accountId, addCollaboratorRequestBody.accountId) && Objects.equals(this.teamId, addCollaboratorRequestBody.teamId) && Objects.equals(this.role, addCollaboratorRequestBody.role); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(accountId, teamId, role); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AddCollaboratorRequestBody {\n"); sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("account_id"); openapiFields.add("team_id"); openapiFields.add("role"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to AddCollaboratorRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AddCollaboratorRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AddCollaboratorRequestBody is not found in the empty JSON string", AddCollaboratorRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!AddCollaboratorRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AddCollaboratorRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("account_id") != null && !jsonObj.get("account_id").isJsonNull()) && !jsonObj.get("account_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `account_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_id").toString())); } if ((jsonObj.get("team_id") != null && !jsonObj.get("team_id").isJsonNull()) && !jsonObj.get("team_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `team_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("team_id").toString())); } if ((jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) && !jsonObj.get("role").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); } // validate the optional field `role` if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { RoleEnum.validateJsonElement(jsonObj.get("role")); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!AddCollaboratorRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'AddCollaboratorRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<AddCollaboratorRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(AddCollaboratorRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<AddCollaboratorRequestBody>() { @Override public void write(JsonWriter out, AddCollaboratorRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public AddCollaboratorRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of AddCollaboratorRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of AddCollaboratorRequestBody * @throws IOException if the JSON string is invalid with respect to AddCollaboratorRequestBody */ public static AddCollaboratorRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AddCollaboratorRequestBody.class); } /** * Convert an instance of AddCollaboratorRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/AddOrganizationMemberRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * AddOrganizationMemberRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class AddOrganizationMemberRequestBody { /** * Gets or Sets role */ @JsonAdapter(RoleEnum.Adapter.class) public enum RoleEnum { ADMIN("admin"), MEMBER("member"), MANAGER("manager"); private String value; RoleEnum(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } public static RoleEnum fromValue(String value) { for (RoleEnum b : RoleEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter<RoleEnum> { @Override public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override public RoleEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); return RoleEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); RoleEnum.fromValue(value); } } public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) @javax.annotation.Nullable private RoleEnum role = RoleEnum.MEMBER; public AddOrganizationMemberRequestBody() { } public AddOrganizationMemberRequestBody role(@javax.annotation.Nullable RoleEnum role) { this.role = role; return this; } /** * Get role * @return role */ @javax.annotation.Nullable public RoleEnum getRole() { return role; } public void setRole(@javax.annotation.Nullable RoleEnum role) { this.role = role; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AddOrganizationMemberRequestBody addOrganizationMemberRequestBody = (AddOrganizationMemberRequestBody) o; return Objects.equals(this.role, addOrganizationMemberRequestBody.role); } @Override public int hashCode() { return Objects.hash(role); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AddOrganizationMemberRequestBody {\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("role"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to AddOrganizationMemberRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AddOrganizationMemberRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AddOrganizationMemberRequestBody is not found in the empty JSON string", AddOrganizationMemberRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!AddOrganizationMemberRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AddOrganizationMemberRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) && !jsonObj.get("role").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); } // validate the optional field `role` if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { RoleEnum.validateJsonElement(jsonObj.get("role")); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!AddOrganizationMemberRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'AddOrganizationMemberRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<AddOrganizationMemberRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(AddOrganizationMemberRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<AddOrganizationMemberRequestBody>() { @Override public void write(JsonWriter out, AddOrganizationMemberRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public AddOrganizationMemberRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of AddOrganizationMemberRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of AddOrganizationMemberRequestBody * @throws IOException if the JSON string is invalid with respect to AddOrganizationMemberRequestBody */ public static AddOrganizationMemberRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AddOrganizationMemberRequestBody.class); } /** * Convert an instance of AddOrganizationMemberRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/AddSpaceCollaboratorRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * AddSpaceCollaboratorRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class AddSpaceCollaboratorRequestBody { public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @javax.annotation.Nullable private UUID accountId; public static final String SERIALIZED_NAME_TEAM_ID = "team_id"; @SerializedName(SERIALIZED_NAME_TEAM_ID) @javax.annotation.Nullable private UUID teamId; /** * Gets or Sets role */ @JsonAdapter(RoleEnum.Adapter.class) public enum RoleEnum { ADMIN("admin"), READ("read"), WRITE("write"); private String value; RoleEnum(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } public static RoleEnum fromValue(String value) { for (RoleEnum b : RoleEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter<RoleEnum> { @Override public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override public RoleEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); return RoleEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); RoleEnum.fromValue(value); } } public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) @javax.annotation.Nullable private RoleEnum role = RoleEnum.READ; public AddSpaceCollaboratorRequestBody() { } public AddSpaceCollaboratorRequestBody accountId(@javax.annotation.Nullable UUID accountId) { this.accountId = accountId; return this; } /** * Get accountId * @return accountId */ @javax.annotation.Nullable public UUID getAccountId() { return accountId; } public void setAccountId(@javax.annotation.Nullable UUID accountId) { this.accountId = accountId; } public AddSpaceCollaboratorRequestBody teamId(@javax.annotation.Nullable UUID teamId) { this.teamId = teamId; return this; } /** * Get teamId * @return teamId */ @javax.annotation.Nullable public UUID getTeamId() { return teamId; } public void setTeamId(@javax.annotation.Nullable UUID teamId) { this.teamId = teamId; } public AddSpaceCollaboratorRequestBody role(@javax.annotation.Nullable RoleEnum role) { this.role = role; return this; } /** * Get role * @return role */ @javax.annotation.Nullable public RoleEnum getRole() { return role; } public void setRole(@javax.annotation.Nullable RoleEnum role) { this.role = role; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AddSpaceCollaboratorRequestBody addSpaceCollaboratorRequestBody = (AddSpaceCollaboratorRequestBody) o; return Objects.equals(this.accountId, addSpaceCollaboratorRequestBody.accountId) && Objects.equals(this.teamId, addSpaceCollaboratorRequestBody.teamId) && Objects.equals(this.role, addSpaceCollaboratorRequestBody.role); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(accountId, teamId, role); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AddSpaceCollaboratorRequestBody {\n"); sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("account_id"); openapiFields.add("team_id"); openapiFields.add("role"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to AddSpaceCollaboratorRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AddSpaceCollaboratorRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AddSpaceCollaboratorRequestBody is not found in the empty JSON string", AddSpaceCollaboratorRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!AddSpaceCollaboratorRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AddSpaceCollaboratorRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("account_id") != null && !jsonObj.get("account_id").isJsonNull()) && !jsonObj.get("account_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `account_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_id").toString())); } if ((jsonObj.get("team_id") != null && !jsonObj.get("team_id").isJsonNull()) && !jsonObj.get("team_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `team_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("team_id").toString())); } if ((jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) && !jsonObj.get("role").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); } // validate the optional field `role` if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { RoleEnum.validateJsonElement(jsonObj.get("role")); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!AddSpaceCollaboratorRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'AddSpaceCollaboratorRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<AddSpaceCollaboratorRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(AddSpaceCollaboratorRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<AddSpaceCollaboratorRequestBody>() { @Override public void write(JsonWriter out, AddSpaceCollaboratorRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public AddSpaceCollaboratorRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of AddSpaceCollaboratorRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of AddSpaceCollaboratorRequestBody * @throws IOException if the JSON string is invalid with respect to AddSpaceCollaboratorRequestBody */ public static AddSpaceCollaboratorRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AddSpaceCollaboratorRequestBody.class); } /** * Convert an instance of AddSpaceCollaboratorRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/AddTeamMemberRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import ai.lamin.lamin_api_client.model.Role; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * AddTeamMemberRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class AddTeamMemberRequestBody { public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) @javax.annotation.Nullable private Role role; public AddTeamMemberRequestBody() { } public AddTeamMemberRequestBody role(@javax.annotation.Nullable Role role) { this.role = role; return this; } /** * Get role * @return role */ @javax.annotation.Nullable public Role getRole() { return role; } public void setRole(@javax.annotation.Nullable Role role) { this.role = role; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AddTeamMemberRequestBody addTeamMemberRequestBody = (AddTeamMemberRequestBody) o; return Objects.equals(this.role, addTeamMemberRequestBody.role); } @Override public int hashCode() { return Objects.hash(role); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AddTeamMemberRequestBody {\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("role"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to AddTeamMemberRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AddTeamMemberRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AddTeamMemberRequestBody is not found in the empty JSON string", AddTeamMemberRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!AddTeamMemberRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AddTeamMemberRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `role` if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { Role.validateJsonElement(jsonObj.get("role")); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!AddTeamMemberRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'AddTeamMemberRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<AddTeamMemberRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(AddTeamMemberRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<AddTeamMemberRequestBody>() { @Override public void write(JsonWriter out, AddTeamMemberRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public AddTeamMemberRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of AddTeamMemberRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of AddTeamMemberRequestBody * @throws IOException if the JSON string is invalid with respect to AddTeamMemberRequestBody */ public static AddTeamMemberRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AddTeamMemberRequestBody.class); } /** * Convert an instance of AddTeamMemberRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/AttachSpaceToRecordRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * AttachSpaceToRecordRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class AttachSpaceToRecordRequestBody { public static final String SERIALIZED_NAME_MODULE_NAME = "module_name"; @SerializedName(SERIALIZED_NAME_MODULE_NAME) @javax.annotation.Nonnull private String moduleName; public static final String SERIALIZED_NAME_MODEL_NAME = "model_name"; @SerializedName(SERIALIZED_NAME_MODEL_NAME) @javax.annotation.Nonnull private String modelName; public static final String SERIALIZED_NAME_RECORD_ID = "record_id"; @SerializedName(SERIALIZED_NAME_RECORD_ID) @javax.annotation.Nonnull private Integer recordId; public AttachSpaceToRecordRequestBody() { } public AttachSpaceToRecordRequestBody moduleName(@javax.annotation.Nonnull String moduleName) { this.moduleName = moduleName; return this; } /** * Get moduleName * @return moduleName */ @javax.annotation.Nonnull public String getModuleName() { return moduleName; } public void setModuleName(@javax.annotation.Nonnull String moduleName) { this.moduleName = moduleName; } public AttachSpaceToRecordRequestBody modelName(@javax.annotation.Nonnull String modelName) { this.modelName = modelName; return this; } /** * Get modelName * @return modelName */ @javax.annotation.Nonnull public String getModelName() { return modelName; } public void setModelName(@javax.annotation.Nonnull String modelName) { this.modelName = modelName; } public AttachSpaceToRecordRequestBody recordId(@javax.annotation.Nonnull Integer recordId) { this.recordId = recordId; return this; } /** * Get recordId * @return recordId */ @javax.annotation.Nonnull public Integer getRecordId() { return recordId; } public void setRecordId(@javax.annotation.Nonnull Integer recordId) { this.recordId = recordId; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AttachSpaceToRecordRequestBody attachSpaceToRecordRequestBody = (AttachSpaceToRecordRequestBody) o; return Objects.equals(this.moduleName, attachSpaceToRecordRequestBody.moduleName) && Objects.equals(this.modelName, attachSpaceToRecordRequestBody.modelName) && Objects.equals(this.recordId, attachSpaceToRecordRequestBody.recordId); } @Override public int hashCode() { return Objects.hash(moduleName, modelName, recordId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AttachSpaceToRecordRequestBody {\n"); sb.append(" moduleName: ").append(toIndentedString(moduleName)).append("\n"); sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); sb.append(" recordId: ").append(toIndentedString(recordId)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("module_name"); openapiFields.add("model_name"); openapiFields.add("record_id"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("module_name"); openapiRequiredFields.add("model_name"); openapiRequiredFields.add("record_id"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to AttachSpaceToRecordRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AttachSpaceToRecordRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in AttachSpaceToRecordRequestBody is not found in the empty JSON string", AttachSpaceToRecordRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!AttachSpaceToRecordRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AttachSpaceToRecordRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AttachSpaceToRecordRequestBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("module_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `module_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("module_name").toString())); } if (!jsonObj.get("model_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `model_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model_name").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!AttachSpaceToRecordRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'AttachSpaceToRecordRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<AttachSpaceToRecordRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(AttachSpaceToRecordRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<AttachSpaceToRecordRequestBody>() { @Override public void write(JsonWriter out, AttachSpaceToRecordRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public AttachSpaceToRecordRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of AttachSpaceToRecordRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of AttachSpaceToRecordRequestBody * @throws IOException if the JSON string is invalid with respect to AttachSpaceToRecordRequestBody */ public static AttachSpaceToRecordRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, AttachSpaceToRecordRequestBody.class); } /** * Convert an instance of AttachSpaceToRecordRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/CreateArtifactRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * CreateArtifactRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class CreateArtifactRequestBody { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @javax.annotation.Nonnull private String path; public static final String SERIALIZED_NAME_KWARGS = "kwargs"; @SerializedName(SERIALIZED_NAME_KWARGS) @javax.annotation.Nullable private Map<String, Object> kwargs = new HashMap<>(); public CreateArtifactRequestBody() { } public CreateArtifactRequestBody path(@javax.annotation.Nonnull String path) { this.path = path; return this; } /** * Get path * @return path */ @javax.annotation.Nonnull public String getPath() { return path; } public void setPath(@javax.annotation.Nonnull String path) { this.path = path; } public CreateArtifactRequestBody kwargs(@javax.annotation.Nullable Map<String, Object> kwargs) { this.kwargs = kwargs; return this; } public CreateArtifactRequestBody putKwargsItem(String key, Object kwargsItem) { if (this.kwargs == null) { this.kwargs = new HashMap<>(); } this.kwargs.put(key, kwargsItem); return this; } /** * Get kwargs * @return kwargs */ @javax.annotation.Nullable public Map<String, Object> getKwargs() { return kwargs; } public void setKwargs(@javax.annotation.Nullable Map<String, Object> kwargs) { this.kwargs = kwargs; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateArtifactRequestBody createArtifactRequestBody = (CreateArtifactRequestBody) o; return Objects.equals(this.path, createArtifactRequestBody.path) && Objects.equals(this.kwargs, createArtifactRequestBody.kwargs); } @Override public int hashCode() { return Objects.hash(path, kwargs); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateArtifactRequestBody {\n"); sb.append(" path: ").append(toIndentedString(path)).append("\n"); sb.append(" kwargs: ").append(toIndentedString(kwargs)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("path"); openapiFields.add("kwargs"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("path"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to CreateArtifactRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateArtifactRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateArtifactRequestBody is not found in the empty JSON string", CreateArtifactRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!CreateArtifactRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateArtifactRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateArtifactRequestBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!CreateArtifactRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'CreateArtifactRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<CreateArtifactRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(CreateArtifactRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<CreateArtifactRequestBody>() { @Override public void write(JsonWriter out, CreateArtifactRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public CreateArtifactRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of CreateArtifactRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of CreateArtifactRequestBody * @throws IOException if the JSON string is invalid with respect to CreateArtifactRequestBody */ public static CreateArtifactRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateArtifactRequestBody.class); } /** * Convert an instance of CreateArtifactRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/CreateSpaceRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * CreateSpaceRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class CreateSpaceRequestBody { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organization_id"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID) @javax.annotation.Nonnull private UUID organizationId; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @javax.annotation.Nullable private String description; public CreateSpaceRequestBody() { } public CreateSpaceRequestBody name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** * Get name * @return name */ @javax.annotation.Nonnull public String getName() { return name; } public void setName(@javax.annotation.Nonnull String name) { this.name = name; } public CreateSpaceRequestBody organizationId(@javax.annotation.Nonnull UUID organizationId) { this.organizationId = organizationId; return this; } /** * Get organizationId * @return organizationId */ @javax.annotation.Nonnull public UUID getOrganizationId() { return organizationId; } public void setOrganizationId(@javax.annotation.Nonnull UUID organizationId) { this.organizationId = organizationId; } public CreateSpaceRequestBody description(@javax.annotation.Nullable String description) { this.description = description; return this; } /** * Get description * @return description */ @javax.annotation.Nullable public String getDescription() { return description; } public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateSpaceRequestBody createSpaceRequestBody = (CreateSpaceRequestBody) o; return Objects.equals(this.name, createSpaceRequestBody.name) && Objects.equals(this.organizationId, createSpaceRequestBody.organizationId) && Objects.equals(this.description, createSpaceRequestBody.description); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(name, organizationId, description); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateSpaceRequestBody {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("name"); openapiFields.add("organization_id"); openapiFields.add("description"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("name"); openapiRequiredFields.add("organization_id"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to CreateSpaceRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateSpaceRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateSpaceRequestBody is not found in the empty JSON string", CreateSpaceRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!CreateSpaceRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateSpaceRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateSpaceRequestBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("organization_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `organization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_id").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!CreateSpaceRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'CreateSpaceRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<CreateSpaceRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(CreateSpaceRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<CreateSpaceRequestBody>() { @Override public void write(JsonWriter out, CreateSpaceRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public CreateSpaceRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of CreateSpaceRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of CreateSpaceRequestBody * @throws IOException if the JSON string is invalid with respect to CreateSpaceRequestBody */ public static CreateSpaceRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateSpaceRequestBody.class); } /** * Convert an instance of CreateSpaceRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/CreateTeamRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * CreateTeamRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class CreateTeamRequestBody { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organization_id"; @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID) @javax.annotation.Nonnull private UUID organizationId; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @javax.annotation.Nullable private String description; public CreateTeamRequestBody() { } public CreateTeamRequestBody name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** * Get name * @return name */ @javax.annotation.Nonnull public String getName() { return name; } public void setName(@javax.annotation.Nonnull String name) { this.name = name; } public CreateTeamRequestBody organizationId(@javax.annotation.Nonnull UUID organizationId) { this.organizationId = organizationId; return this; } /** * Get organizationId * @return organizationId */ @javax.annotation.Nonnull public UUID getOrganizationId() { return organizationId; } public void setOrganizationId(@javax.annotation.Nonnull UUID organizationId) { this.organizationId = organizationId; } public CreateTeamRequestBody description(@javax.annotation.Nullable String description) { this.description = description; return this; } /** * Get description * @return description */ @javax.annotation.Nullable public String getDescription() { return description; } public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateTeamRequestBody createTeamRequestBody = (CreateTeamRequestBody) o; return Objects.equals(this.name, createTeamRequestBody.name) && Objects.equals(this.organizationId, createTeamRequestBody.organizationId) && Objects.equals(this.description, createTeamRequestBody.description); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(name, organizationId, description); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateTeamRequestBody {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("name"); openapiFields.add("organization_id"); openapiFields.add("description"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("name"); openapiRequiredFields.add("organization_id"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to CreateTeamRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateTeamRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateTeamRequestBody is not found in the empty JSON string", CreateTeamRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!CreateTeamRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateTeamRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateTeamRequestBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("organization_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `organization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_id").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!CreateTeamRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'CreateTeamRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<CreateTeamRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(CreateTeamRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<CreateTeamRequestBody>() { @Override public void write(JsonWriter out, CreateTeamRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public CreateTeamRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of CreateTeamRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of CreateTeamRequestBody * @throws IOException if the JSON string is invalid with respect to CreateTeamRequestBody */ public static CreateTeamRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateTeamRequestBody.class); } /** * Convert an instance of CreateTeamRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/CreateTransformRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * CreateTransformRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class CreateTransformRequestBody { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @javax.annotation.Nonnull private String key; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nonnull private String type; public static final String SERIALIZED_NAME_SOURCE_CODE = "source_code"; @SerializedName(SERIALIZED_NAME_SOURCE_CODE) @javax.annotation.Nonnull private String sourceCode; public static final String SERIALIZED_NAME_KWARGS = "kwargs"; @SerializedName(SERIALIZED_NAME_KWARGS) @javax.annotation.Nullable private Map<String, Object> kwargs; public CreateTransformRequestBody() { } public CreateTransformRequestBody key(@javax.annotation.Nonnull String key) { this.key = key; return this; } /** * Get key * @return key */ @javax.annotation.Nonnull public String getKey() { return key; } public void setKey(@javax.annotation.Nonnull String key) { this.key = key; } public CreateTransformRequestBody type(@javax.annotation.Nonnull String type) { this.type = type; return this; } /** * Get type * @return type */ @javax.annotation.Nonnull public String getType() { return type; } public void setType(@javax.annotation.Nonnull String type) { this.type = type; } public CreateTransformRequestBody sourceCode(@javax.annotation.Nonnull String sourceCode) { this.sourceCode = sourceCode; return this; } /** * Get sourceCode * @return sourceCode */ @javax.annotation.Nonnull public String getSourceCode() { return sourceCode; } public void setSourceCode(@javax.annotation.Nonnull String sourceCode) { this.sourceCode = sourceCode; } public CreateTransformRequestBody kwargs(@javax.annotation.Nullable Map<String, Object> kwargs) { this.kwargs = kwargs; return this; } public CreateTransformRequestBody putKwargsItem(String key, Object kwargsItem) { if (this.kwargs == null) { this.kwargs = new HashMap<>(); } this.kwargs.put(key, kwargsItem); return this; } /** * Get kwargs * @return kwargs */ @javax.annotation.Nullable public Map<String, Object> getKwargs() { return kwargs; } public void setKwargs(@javax.annotation.Nullable Map<String, Object> kwargs) { this.kwargs = kwargs; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateTransformRequestBody createTransformRequestBody = (CreateTransformRequestBody) o; return Objects.equals(this.key, createTransformRequestBody.key) && Objects.equals(this.type, createTransformRequestBody.type) && Objects.equals(this.sourceCode, createTransformRequestBody.sourceCode) && Objects.equals(this.kwargs, createTransformRequestBody.kwargs); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(key, type, sourceCode, kwargs); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateTransformRequestBody {\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" sourceCode: ").append(toIndentedString(sourceCode)).append("\n"); sb.append(" kwargs: ").append(toIndentedString(kwargs)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("key"); openapiFields.add("type"); openapiFields.add("source_code"); openapiFields.add("kwargs"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("key"); openapiRequiredFields.add("type"); openapiRequiredFields.add("source_code"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to CreateTransformRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateTransformRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in CreateTransformRequestBody is not found in the empty JSON string", CreateTransformRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!CreateTransformRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateTransformRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateTransformRequestBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("source_code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_code").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!CreateTransformRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'CreateTransformRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<CreateTransformRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(CreateTransformRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<CreateTransformRequestBody>() { @Override public void write(JsonWriter out, CreateTransformRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public CreateTransformRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of CreateTransformRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of CreateTransformRequestBody * @throws IOException if the JSON string is invalid with respect to CreateTransformRequestBody */ public static CreateTransformRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, CreateTransformRequestBody.class); } /** * Convert an instance of CreateTransformRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/DbUrlRequest.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * DbUrlRequest */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class DbUrlRequest { public static final String SERIALIZED_NAME_DB_URL = "db_url"; @SerializedName(SERIALIZED_NAME_DB_URL) @javax.annotation.Nonnull private String dbUrl; public DbUrlRequest() { } public DbUrlRequest dbUrl(@javax.annotation.Nonnull String dbUrl) { this.dbUrl = dbUrl; return this; } /** * Get dbUrl * @return dbUrl */ @javax.annotation.Nonnull public String getDbUrl() { return dbUrl; } public void setDbUrl(@javax.annotation.Nonnull String dbUrl) { this.dbUrl = dbUrl; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DbUrlRequest dbUrlRequest = (DbUrlRequest) o; return Objects.equals(this.dbUrl, dbUrlRequest.dbUrl); } @Override public int hashCode() { return Objects.hash(dbUrl); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DbUrlRequest {\n"); sb.append(" dbUrl: ").append(toIndentedString(dbUrl)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("db_url"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("db_url"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to DbUrlRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!DbUrlRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in DbUrlRequest is not found in the empty JSON string", DbUrlRequest.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!DbUrlRequest.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DbUrlRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : DbUrlRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("db_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `db_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("db_url").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!DbUrlRequest.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'DbUrlRequest' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<DbUrlRequest> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(DbUrlRequest.class)); return (TypeAdapter<T>) new TypeAdapter<DbUrlRequest>() { @Override public void write(JsonWriter out, DbUrlRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public DbUrlRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of DbUrlRequest given an JSON string * * @param jsonString JSON string * @return An instance of DbUrlRequest * @throws IOException if the JSON string is invalid with respect to DbUrlRequest */ public static DbUrlRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, DbUrlRequest.class); } /** * Convert an instance of DbUrlRequest to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/Dimension.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * Dimension */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class Dimension { public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; @SerializedName(SERIALIZED_NAME_FIELD_NAME) @javax.annotation.Nonnull private String fieldName; /** * Gets or Sets func */ @JsonAdapter(FuncEnum.Adapter.class) public enum FuncEnum { COUNT("count"), SUM("sum"), MIN("min"), MAX("max"), MEAN("mean"); private String value; FuncEnum(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } public static FuncEnum fromValue(String value) { for (FuncEnum b : FuncEnum.values()) { if (b.value.equals(value)) { return b; } } return null; } public static class Adapter extends TypeAdapter<FuncEnum> { @Override public void write(final JsonWriter jsonWriter, final FuncEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override public FuncEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); return FuncEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); FuncEnum.fromValue(value); } } public static final String SERIALIZED_NAME_FUNC = "func"; @SerializedName(SERIALIZED_NAME_FUNC) @javax.annotation.Nullable private FuncEnum func; public Dimension() { } public Dimension fieldName(@javax.annotation.Nonnull String fieldName) { this.fieldName = fieldName; return this; } /** * Get fieldName * @return fieldName */ @javax.annotation.Nonnull public String getFieldName() { return fieldName; } public void setFieldName(@javax.annotation.Nonnull String fieldName) { this.fieldName = fieldName; } public Dimension func(@javax.annotation.Nullable FuncEnum func) { this.func = func; return this; } /** * Get func * @return func */ @javax.annotation.Nullable public FuncEnum getFunc() { return func; } public void setFunc(@javax.annotation.Nullable FuncEnum func) { this.func = func; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Dimension dimension = (Dimension) o; return Objects.equals(this.fieldName, dimension.fieldName) && Objects.equals(this.func, dimension.func); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(fieldName, func); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Dimension {\n"); sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); sb.append(" func: ").append(toIndentedString(func)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("field_name"); openapiFields.add("func"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("field_name"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to Dimension */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Dimension.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Dimension is not found in the empty JSON string", Dimension.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!Dimension.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Dimension` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Dimension.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("field_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `field_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_name").toString())); } if ((jsonObj.get("func") != null && !jsonObj.get("func").isJsonNull()) && !jsonObj.get("func").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `func` to be a primitive type in the JSON string but got `%s`", jsonObj.get("func").toString())); } // validate the optional field `func` if (jsonObj.get("func") != null && !jsonObj.get("func").isJsonNull()) { FuncEnum.validateJsonElement(jsonObj.get("func")); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!Dimension.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'Dimension' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<Dimension> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(Dimension.class)); return (TypeAdapter<T>) new TypeAdapter<Dimension>() { @Override public void write(JsonWriter out, Dimension value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public Dimension read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of Dimension given an JSON string * * @param jsonString JSON string * @return An instance of Dimension * @throws IOException if the JSON string is invalid with respect to Dimension */ public static Dimension fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Dimension.class); } /** * Convert an instance of Dimension to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/GetRecordRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * GetRecordRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class GetRecordRequestBody { public static final String SERIALIZED_NAME_SELECT = "select"; @SerializedName(SERIALIZED_NAME_SELECT) @javax.annotation.Nullable private List<String> select; public GetRecordRequestBody() { } public GetRecordRequestBody select(@javax.annotation.Nullable List<String> select) { this.select = select; return this; } public GetRecordRequestBody addSelectItem(String selectItem) { if (this.select == null) { this.select = new ArrayList<>(); } this.select.add(selectItem); return this; } /** * Get select * @return select */ @javax.annotation.Nullable public List<String> getSelect() { return select; } public void setSelect(@javax.annotation.Nullable List<String> select) { this.select = select; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetRecordRequestBody getRecordRequestBody = (GetRecordRequestBody) o; return Objects.equals(this.select, getRecordRequestBody.select); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(select); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetRecordRequestBody {\n"); sb.append(" select: ").append(toIndentedString(select)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("select"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to GetRecordRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!GetRecordRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GetRecordRequestBody is not found in the empty JSON string", GetRecordRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!GetRecordRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetRecordRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present if (jsonObj.get("select") != null && !jsonObj.get("select").isJsonNull() && !jsonObj.get("select").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `select` to be an array in the JSON string but got `%s`", jsonObj.get("select").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!GetRecordRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'GetRecordRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<GetRecordRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(GetRecordRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<GetRecordRequestBody>() { @Override public void write(JsonWriter out, GetRecordRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public GetRecordRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of GetRecordRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of GetRecordRequestBody * @throws IOException if the JSON string is invalid with respect to GetRecordRequestBody */ public static GetRecordRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GetRecordRequestBody.class); } /** * Convert an instance of GetRecordRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/GetRecordsRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import ai.lamin.lamin_api_client.model.OrderByColumn; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * GetRecordsRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class GetRecordsRequestBody { public static final String SERIALIZED_NAME_SELECT = "select"; @SerializedName(SERIALIZED_NAME_SELECT) @javax.annotation.Nullable private List<String> select; public static final String SERIALIZED_NAME_FILTER = "filter"; @SerializedName(SERIALIZED_NAME_FILTER) @javax.annotation.Nullable private Map<String, Object> filter; public static final String SERIALIZED_NAME_ORDER_BY = "order_by"; @SerializedName(SERIALIZED_NAME_ORDER_BY) @javax.annotation.Nullable private List<OrderByColumn> orderBy; public static final String SERIALIZED_NAME_SEARCH = "search"; @SerializedName(SERIALIZED_NAME_SEARCH) @javax.annotation.Nullable private String search = ""; public GetRecordsRequestBody() { } public GetRecordsRequestBody select(@javax.annotation.Nullable List<String> select) { this.select = select; return this; } public GetRecordsRequestBody addSelectItem(String selectItem) { if (this.select == null) { this.select = new ArrayList<>(); } this.select.add(selectItem); return this; } /** * Get select * @return select */ @javax.annotation.Nullable public List<String> getSelect() { return select; } public void setSelect(@javax.annotation.Nullable List<String> select) { this.select = select; } public GetRecordsRequestBody filter(@javax.annotation.Nullable Map<String, Object> filter) { this.filter = filter; return this; } public GetRecordsRequestBody putFilterItem(String key, Object filterItem) { if (this.filter == null) { this.filter = new HashMap<>(); } this.filter.put(key, filterItem); return this; } /** * Get filter * @return filter */ @javax.annotation.Nullable public Map<String, Object> getFilter() { return filter; } public void setFilter(@javax.annotation.Nullable Map<String, Object> filter) { this.filter = filter; } public GetRecordsRequestBody orderBy(@javax.annotation.Nullable List<OrderByColumn> orderBy) { this.orderBy = orderBy; return this; } public GetRecordsRequestBody addOrderByItem(OrderByColumn orderByItem) { if (this.orderBy == null) { this.orderBy = new ArrayList<>(); } this.orderBy.add(orderByItem); return this; } /** * Get orderBy * @return orderBy */ @javax.annotation.Nullable public List<OrderByColumn> getOrderBy() { return orderBy; } public void setOrderBy(@javax.annotation.Nullable List<OrderByColumn> orderBy) { this.orderBy = orderBy; } public GetRecordsRequestBody search(@javax.annotation.Nullable String search) { this.search = search; return this; } /** * Get search * @return search */ @javax.annotation.Nullable public String getSearch() { return search; } public void setSearch(@javax.annotation.Nullable String search) { this.search = search; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetRecordsRequestBody getRecordsRequestBody = (GetRecordsRequestBody) o; return Objects.equals(this.select, getRecordsRequestBody.select) && Objects.equals(this.filter, getRecordsRequestBody.filter) && Objects.equals(this.orderBy, getRecordsRequestBody.orderBy) && Objects.equals(this.search, getRecordsRequestBody.search); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(select, filter, orderBy, search); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetRecordsRequestBody {\n"); sb.append(" select: ").append(toIndentedString(select)).append("\n"); sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); sb.append(" orderBy: ").append(toIndentedString(orderBy)).append("\n"); sb.append(" search: ").append(toIndentedString(search)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("select"); openapiFields.add("filter"); openapiFields.add("order_by"); openapiFields.add("search"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to GetRecordsRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!GetRecordsRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GetRecordsRequestBody is not found in the empty JSON string", GetRecordsRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!GetRecordsRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetRecordsRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present if (jsonObj.get("select") != null && !jsonObj.get("select").isJsonNull() && !jsonObj.get("select").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `select` to be an array in the JSON string but got `%s`", jsonObj.get("select").toString())); } if (jsonObj.get("order_by") != null && !jsonObj.get("order_by").isJsonNull()) { JsonArray jsonArrayorderBy = jsonObj.getAsJsonArray("order_by"); if (jsonArrayorderBy != null) { // ensure the json data is an array if (!jsonObj.get("order_by").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `order_by` to be an array in the JSON string but got `%s`", jsonObj.get("order_by").toString())); } // validate the optional field `order_by` (array) for (int i = 0; i < jsonArrayorderBy.size(); i++) { OrderByColumn.validateJsonElement(jsonArrayorderBy.get(i)); }; } } if ((jsonObj.get("search") != null && !jsonObj.get("search").isJsonNull()) && !jsonObj.get("search").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `search` to be a primitive type in the JSON string but got `%s`", jsonObj.get("search").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!GetRecordsRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'GetRecordsRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<GetRecordsRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(GetRecordsRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<GetRecordsRequestBody>() { @Override public void write(JsonWriter out, GetRecordsRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public GetRecordsRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of GetRecordsRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of GetRecordsRequestBody * @throws IOException if the JSON string is invalid with respect to GetRecordsRequestBody */ public static GetRecordsRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GetRecordsRequestBody.class); } /** * Convert an instance of GetRecordsRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/GetValuesRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import ai.lamin.lamin_api_client.model.OrderByColumn; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * GetValuesRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class GetValuesRequestBody { public static final String SERIALIZED_NAME_FILTER = "filter"; @SerializedName(SERIALIZED_NAME_FILTER) @javax.annotation.Nullable private Map<String, Object> filter; public static final String SERIALIZED_NAME_ORDER_BY = "order_by"; @SerializedName(SERIALIZED_NAME_ORDER_BY) @javax.annotation.Nullable private List<OrderByColumn> orderBy; public static final String SERIALIZED_NAME_SEARCH = "search"; @SerializedName(SERIALIZED_NAME_SEARCH) @javax.annotation.Nullable private String search = ""; public GetValuesRequestBody() { } public GetValuesRequestBody filter(@javax.annotation.Nullable Map<String, Object> filter) { this.filter = filter; return this; } public GetValuesRequestBody putFilterItem(String key, Object filterItem) { if (this.filter == null) { this.filter = new HashMap<>(); } this.filter.put(key, filterItem); return this; } /** * Get filter * @return filter */ @javax.annotation.Nullable public Map<String, Object> getFilter() { return filter; } public void setFilter(@javax.annotation.Nullable Map<String, Object> filter) { this.filter = filter; } public GetValuesRequestBody orderBy(@javax.annotation.Nullable List<OrderByColumn> orderBy) { this.orderBy = orderBy; return this; } public GetValuesRequestBody addOrderByItem(OrderByColumn orderByItem) { if (this.orderBy == null) { this.orderBy = new ArrayList<>(); } this.orderBy.add(orderByItem); return this; } /** * Get orderBy * @return orderBy */ @javax.annotation.Nullable public List<OrderByColumn> getOrderBy() { return orderBy; } public void setOrderBy(@javax.annotation.Nullable List<OrderByColumn> orderBy) { this.orderBy = orderBy; } public GetValuesRequestBody search(@javax.annotation.Nullable String search) { this.search = search; return this; } /** * Get search * @return search */ @javax.annotation.Nullable public String getSearch() { return search; } public void setSearch(@javax.annotation.Nullable String search) { this.search = search; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetValuesRequestBody getValuesRequestBody = (GetValuesRequestBody) o; return Objects.equals(this.filter, getValuesRequestBody.filter) && Objects.equals(this.orderBy, getValuesRequestBody.orderBy) && Objects.equals(this.search, getValuesRequestBody.search); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(filter, orderBy, search); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GetValuesRequestBody {\n"); sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); sb.append(" orderBy: ").append(toIndentedString(orderBy)).append("\n"); sb.append(" search: ").append(toIndentedString(search)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("filter"); openapiFields.add("order_by"); openapiFields.add("search"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to GetValuesRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!GetValuesRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GetValuesRequestBody is not found in the empty JSON string", GetValuesRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!GetValuesRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetValuesRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("order_by") != null && !jsonObj.get("order_by").isJsonNull()) { JsonArray jsonArrayorderBy = jsonObj.getAsJsonArray("order_by"); if (jsonArrayorderBy != null) { // ensure the json data is an array if (!jsonObj.get("order_by").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `order_by` to be an array in the JSON string but got `%s`", jsonObj.get("order_by").toString())); } // validate the optional field `order_by` (array) for (int i = 0; i < jsonArrayorderBy.size(); i++) { OrderByColumn.validateJsonElement(jsonArrayorderBy.get(i)); }; } } if ((jsonObj.get("search") != null && !jsonObj.get("search").isJsonNull()) && !jsonObj.get("search").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `search` to be a primitive type in the JSON string but got `%s`", jsonObj.get("search").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!GetValuesRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'GetValuesRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<GetValuesRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(GetValuesRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<GetValuesRequestBody>() { @Override public void write(JsonWriter out, GetValuesRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public GetValuesRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of GetValuesRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of GetValuesRequestBody * @throws IOException if the JSON string is invalid with respect to GetValuesRequestBody */ public static GetValuesRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GetValuesRequestBody.class); } /** * Convert an instance of GetValuesRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/GroupByRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import ai.lamin.lamin_api_client.model.Dimension; import ai.lamin.lamin_api_client.model.Measure; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * GroupByRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class GroupByRequestBody { public static final String SERIALIZED_NAME_DIMENSIONS = "dimensions"; @SerializedName(SERIALIZED_NAME_DIMENSIONS) @javax.annotation.Nonnull private List<Dimension> dimensions = new ArrayList<>(); public static final String SERIALIZED_NAME_MEASURES = "measures"; @SerializedName(SERIALIZED_NAME_MEASURES) @javax.annotation.Nonnull private List<Measure> measures = new ArrayList<>(); public static final String SERIALIZED_NAME_FILTER = "filter"; @SerializedName(SERIALIZED_NAME_FILTER) @javax.annotation.Nullable private Map<String, Object> filter; public GroupByRequestBody() { } public GroupByRequestBody dimensions(@javax.annotation.Nonnull List<Dimension> dimensions) { this.dimensions = dimensions; return this; } public GroupByRequestBody addDimensionsItem(Dimension dimensionsItem) { if (this.dimensions == null) { this.dimensions = new ArrayList<>(); } this.dimensions.add(dimensionsItem); return this; } /** * Get dimensions * @return dimensions */ @javax.annotation.Nonnull public List<Dimension> getDimensions() { return dimensions; } public void setDimensions(@javax.annotation.Nonnull List<Dimension> dimensions) { this.dimensions = dimensions; } public GroupByRequestBody measures(@javax.annotation.Nonnull List<Measure> measures) { this.measures = measures; return this; } public GroupByRequestBody addMeasuresItem(Measure measuresItem) { if (this.measures == null) { this.measures = new ArrayList<>(); } this.measures.add(measuresItem); return this; } /** * Get measures * @return measures */ @javax.annotation.Nonnull public List<Measure> getMeasures() { return measures; } public void setMeasures(@javax.annotation.Nonnull List<Measure> measures) { this.measures = measures; } public GroupByRequestBody filter(@javax.annotation.Nullable Map<String, Object> filter) { this.filter = filter; return this; } public GroupByRequestBody putFilterItem(String key, Object filterItem) { if (this.filter == null) { this.filter = new HashMap<>(); } this.filter.put(key, filterItem); return this; } /** * Get filter * @return filter */ @javax.annotation.Nullable public Map<String, Object> getFilter() { return filter; } public void setFilter(@javax.annotation.Nullable Map<String, Object> filter) { this.filter = filter; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GroupByRequestBody groupByRequestBody = (GroupByRequestBody) o; return Objects.equals(this.dimensions, groupByRequestBody.dimensions) && Objects.equals(this.measures, groupByRequestBody.measures) && Objects.equals(this.filter, groupByRequestBody.filter); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(dimensions, measures, filter); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GroupByRequestBody {\n"); sb.append(" dimensions: ").append(toIndentedString(dimensions)).append("\n"); sb.append(" measures: ").append(toIndentedString(measures)).append("\n"); sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("dimensions"); openapiFields.add("measures"); openapiFields.add("filter"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("dimensions"); openapiRequiredFields.add("measures"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to GroupByRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!GroupByRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in GroupByRequestBody is not found in the empty JSON string", GroupByRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!GroupByRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GroupByRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : GroupByRequestBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array if (!jsonObj.get("dimensions").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `dimensions` to be an array in the JSON string but got `%s`", jsonObj.get("dimensions").toString())); } JsonArray jsonArraydimensions = jsonObj.getAsJsonArray("dimensions"); // validate the required field `dimensions` (array) for (int i = 0; i < jsonArraydimensions.size(); i++) { Dimension.validateJsonElement(jsonArraydimensions.get(i)); }; // ensure the json data is an array if (!jsonObj.get("measures").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `measures` to be an array in the JSON string but got `%s`", jsonObj.get("measures").toString())); } JsonArray jsonArraymeasures = jsonObj.getAsJsonArray("measures"); // validate the required field `measures` (array) for (int i = 0; i < jsonArraymeasures.size(); i++) { Measure.validateJsonElement(jsonArraymeasures.get(i)); }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!GroupByRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'GroupByRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<GroupByRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(GroupByRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<GroupByRequestBody>() { @Override public void write(JsonWriter out, GroupByRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public GroupByRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of GroupByRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of GroupByRequestBody * @throws IOException if the JSON string is invalid with respect to GroupByRequestBody */ public static GroupByRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, GroupByRequestBody.class); } /** * Convert an instance of GroupByRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/HTTPValidationError.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import ai.lamin.lamin_api_client.model.ValidationError; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * HTTPValidationError */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class HTTPValidationError { public static final String SERIALIZED_NAME_DETAIL = "detail"; @SerializedName(SERIALIZED_NAME_DETAIL) @javax.annotation.Nullable private List<ValidationError> detail = new ArrayList<>(); public HTTPValidationError() { } public HTTPValidationError detail(@javax.annotation.Nullable List<ValidationError> detail) { this.detail = detail; return this; } public HTTPValidationError addDetailItem(ValidationError detailItem) { if (this.detail == null) { this.detail = new ArrayList<>(); } this.detail.add(detailItem); return this; } /** * Get detail * @return detail */ @javax.annotation.Nullable public List<ValidationError> getDetail() { return detail; } public void setDetail(@javax.annotation.Nullable List<ValidationError> detail) { this.detail = detail; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } HTTPValidationError htTPValidationError = (HTTPValidationError) o; return Objects.equals(this.detail, htTPValidationError.detail); } @Override public int hashCode() { return Objects.hash(detail); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HTTPValidationError {\n"); sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("detail"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to HTTPValidationError */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!HTTPValidationError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in HTTPValidationError is not found in the empty JSON string", HTTPValidationError.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!HTTPValidationError.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HTTPValidationError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (jsonObj.get("detail") != null && !jsonObj.get("detail").isJsonNull()) { JsonArray jsonArraydetail = jsonObj.getAsJsonArray("detail"); if (jsonArraydetail != null) { // ensure the json data is an array if (!jsonObj.get("detail").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `detail` to be an array in the JSON string but got `%s`", jsonObj.get("detail").toString())); } // validate the optional field `detail` (array) for (int i = 0; i < jsonArraydetail.size(); i++) { ValidationError.validateJsonElement(jsonArraydetail.get(i)); }; } } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!HTTPValidationError.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'HTTPValidationError' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<HTTPValidationError> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(HTTPValidationError.class)); return (TypeAdapter<T>) new TypeAdapter<HTTPValidationError>() { @Override public void write(JsonWriter out, HTTPValidationError value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public HTTPValidationError read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of HTTPValidationError given an JSON string * * @param jsonString JSON string * @return An instance of HTTPValidationError * @throws IOException if the JSON string is invalid with respect to HTTPValidationError */ public static HTTPValidationError fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, HTTPValidationError.class); } /** * Convert an instance of HTTPValidationError to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/Measure.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * Measure */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class Measure { public static final String SERIALIZED_NAME_FIELD_NAME = "field_name"; @SerializedName(SERIALIZED_NAME_FIELD_NAME) @javax.annotation.Nonnull private String fieldName; /** * Gets or Sets aggFunc */ @JsonAdapter(AggFuncEnum.Adapter.class) public enum AggFuncEnum { COUNT("count"), SUM("sum"), MIN("min"), MAX("max"), MEAN("mean"); private String value; AggFuncEnum(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } public static AggFuncEnum fromValue(String value) { for (AggFuncEnum b : AggFuncEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter<AggFuncEnum> { @Override public void write(final JsonWriter jsonWriter, final AggFuncEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override public AggFuncEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); return AggFuncEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); AggFuncEnum.fromValue(value); } } public static final String SERIALIZED_NAME_AGG_FUNC = "agg_func"; @SerializedName(SERIALIZED_NAME_AGG_FUNC) @javax.annotation.Nonnull private AggFuncEnum aggFunc; public static final String SERIALIZED_NAME_ALIAS = "alias"; @SerializedName(SERIALIZED_NAME_ALIAS) @javax.annotation.Nullable private String alias; public Measure() { } public Measure fieldName(@javax.annotation.Nonnull String fieldName) { this.fieldName = fieldName; return this; } /** * Get fieldName * @return fieldName */ @javax.annotation.Nonnull public String getFieldName() { return fieldName; } public void setFieldName(@javax.annotation.Nonnull String fieldName) { this.fieldName = fieldName; } public Measure aggFunc(@javax.annotation.Nonnull AggFuncEnum aggFunc) { this.aggFunc = aggFunc; return this; } /** * Get aggFunc * @return aggFunc */ @javax.annotation.Nonnull public AggFuncEnum getAggFunc() { return aggFunc; } public void setAggFunc(@javax.annotation.Nonnull AggFuncEnum aggFunc) { this.aggFunc = aggFunc; } public Measure alias(@javax.annotation.Nullable String alias) { this.alias = alias; return this; } /** * Get alias * @return alias */ @javax.annotation.Nullable public String getAlias() { return alias; } public void setAlias(@javax.annotation.Nullable String alias) { this.alias = alias; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Measure measure = (Measure) o; return Objects.equals(this.fieldName, measure.fieldName) && Objects.equals(this.aggFunc, measure.aggFunc) && Objects.equals(this.alias, measure.alias); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(fieldName, aggFunc, alias); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Measure {\n"); sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n"); sb.append(" aggFunc: ").append(toIndentedString(aggFunc)).append("\n"); sb.append(" alias: ").append(toIndentedString(alias)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("field_name"); openapiFields.add("agg_func"); openapiFields.add("alias"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("field_name"); openapiRequiredFields.add("agg_func"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to Measure */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Measure.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in Measure is not found in the empty JSON string", Measure.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!Measure.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Measure` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Measure.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("field_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `field_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field_name").toString())); } if (!jsonObj.get("agg_func").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `agg_func` to be a primitive type in the JSON string but got `%s`", jsonObj.get("agg_func").toString())); } // validate the required field `agg_func` AggFuncEnum.validateJsonElement(jsonObj.get("agg_func")); if ((jsonObj.get("alias") != null && !jsonObj.get("alias").isJsonNull()) && !jsonObj.get("alias").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `alias` to be a primitive type in the JSON string but got `%s`", jsonObj.get("alias").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!Measure.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'Measure' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<Measure> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(Measure.class)); return (TypeAdapter<T>) new TypeAdapter<Measure>() { @Override public void write(JsonWriter out, Measure value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public Measure read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of Measure given an JSON string * * @param jsonString JSON string * @return An instance of Measure * @throws IOException if the JSON string is invalid with respect to Measure */ public static Measure fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Measure.class); } /** * Convert an instance of Measure to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/OrderByColumn.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * OrderByColumn */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class OrderByColumn { public static final String SERIALIZED_NAME_FIELD = "field"; @SerializedName(SERIALIZED_NAME_FIELD) @javax.annotation.Nonnull private String field; public static final String SERIALIZED_NAME_DESCENDING = "descending"; @SerializedName(SERIALIZED_NAME_DESCENDING) @javax.annotation.Nullable private Boolean descending = false; public OrderByColumn() { } public OrderByColumn field(@javax.annotation.Nonnull String field) { this.field = field; return this; } /** * Get field * @return field */ @javax.annotation.Nonnull public String getField() { return field; } public void setField(@javax.annotation.Nonnull String field) { this.field = field; } public OrderByColumn descending(@javax.annotation.Nullable Boolean descending) { this.descending = descending; return this; } /** * Get descending * @return descending */ @javax.annotation.Nullable public Boolean getDescending() { return descending; } public void setDescending(@javax.annotation.Nullable Boolean descending) { this.descending = descending; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderByColumn orderByColumn = (OrderByColumn) o; return Objects.equals(this.field, orderByColumn.field) && Objects.equals(this.descending, orderByColumn.descending); } @Override public int hashCode() { return Objects.hash(field, descending); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderByColumn {\n"); sb.append(" field: ").append(toIndentedString(field)).append("\n"); sb.append(" descending: ").append(toIndentedString(descending)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("field"); openapiFields.add("descending"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("field"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to OrderByColumn */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!OrderByColumn.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in OrderByColumn is not found in the empty JSON string", OrderByColumn.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!OrderByColumn.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderByColumn` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OrderByColumn.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("field").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!OrderByColumn.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'OrderByColumn' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<OrderByColumn> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(OrderByColumn.class)); return (TypeAdapter<T>) new TypeAdapter<OrderByColumn>() { @Override public void write(JsonWriter out, OrderByColumn value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public OrderByColumn read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of OrderByColumn given an JSON string * * @param jsonString JSON string * @return An instance of OrderByColumn * @throws IOException if the JSON string is invalid with respect to OrderByColumn */ public static OrderByColumn fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, OrderByColumn.class); } /** * Convert an instance of OrderByColumn to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/RegisterDbServerBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * RegisterDbServerBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class RegisterDbServerBody { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nonnull private String name; public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) @javax.annotation.Nonnull private String url; public static final String SERIALIZED_NAME_API_SERVER_NAME = "api_server_name"; @SerializedName(SERIALIZED_NAME_API_SERVER_NAME) @javax.annotation.Nonnull private String apiServerName; public RegisterDbServerBody() { } public RegisterDbServerBody name(@javax.annotation.Nonnull String name) { this.name = name; return this; } /** * Get name * @return name */ @javax.annotation.Nonnull public String getName() { return name; } public void setName(@javax.annotation.Nonnull String name) { this.name = name; } public RegisterDbServerBody url(@javax.annotation.Nonnull String url) { this.url = url; return this; } /** * Get url * @return url */ @javax.annotation.Nonnull public String getUrl() { return url; } public void setUrl(@javax.annotation.Nonnull String url) { this.url = url; } public RegisterDbServerBody apiServerName(@javax.annotation.Nonnull String apiServerName) { this.apiServerName = apiServerName; return this; } /** * Get apiServerName * @return apiServerName */ @javax.annotation.Nonnull public String getApiServerName() { return apiServerName; } public void setApiServerName(@javax.annotation.Nonnull String apiServerName) { this.apiServerName = apiServerName; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RegisterDbServerBody registerDbServerBody = (RegisterDbServerBody) o; return Objects.equals(this.name, registerDbServerBody.name) && Objects.equals(this.url, registerDbServerBody.url) && Objects.equals(this.apiServerName, registerDbServerBody.apiServerName); } @Override public int hashCode() { return Objects.hash(name, url, apiServerName); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RegisterDbServerBody {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" apiServerName: ").append(toIndentedString(apiServerName)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("name"); openapiFields.add("url"); openapiFields.add("api_server_name"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("name"); openapiRequiredFields.add("url"); openapiRequiredFields.add("api_server_name"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to RegisterDbServerBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RegisterDbServerBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RegisterDbServerBody is not found in the empty JSON string", RegisterDbServerBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!RegisterDbServerBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RegisterDbServerBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RegisterDbServerBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } if (!jsonObj.get("api_server_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `api_server_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("api_server_name").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!RegisterDbServerBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'RegisterDbServerBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<RegisterDbServerBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(RegisterDbServerBody.class)); return (TypeAdapter<T>) new TypeAdapter<RegisterDbServerBody>() { @Override public void write(JsonWriter out, RegisterDbServerBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public RegisterDbServerBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of RegisterDbServerBody given an JSON string * * @param jsonString JSON string * @return An instance of RegisterDbServerBody * @throws IOException if the JSON string is invalid with respect to RegisterDbServerBody */ public static RegisterDbServerBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RegisterDbServerBody.class); } /** * Convert an instance of RegisterDbServerBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/RegisterFormRequest.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * RegisterFormRequest */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class RegisterFormRequest { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) @javax.annotation.Nonnull private String key; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) @javax.annotation.Nonnull private Map<String, Object> data = new HashMap<>(); public static final String SERIALIZED_NAME_SCHEMA_UID = "schema_uid"; @SerializedName(SERIALIZED_NAME_SCHEMA_UID) @javax.annotation.Nonnull private String schemaUid; public RegisterFormRequest() { } public RegisterFormRequest key(@javax.annotation.Nonnull String key) { this.key = key; return this; } /** * Get key * @return key */ @javax.annotation.Nonnull public String getKey() { return key; } public void setKey(@javax.annotation.Nonnull String key) { this.key = key; } public RegisterFormRequest data(@javax.annotation.Nonnull Map<String, Object> data) { this.data = data; return this; } public RegisterFormRequest putDataItem(String key, Object dataItem) { if (this.data == null) { this.data = new HashMap<>(); } this.data.put(key, dataItem); return this; } /** * Get data * @return data */ @javax.annotation.Nonnull public Map<String, Object> getData() { return data; } public void setData(@javax.annotation.Nonnull Map<String, Object> data) { this.data = data; } public RegisterFormRequest schemaUid(@javax.annotation.Nonnull String schemaUid) { this.schemaUid = schemaUid; return this; } /** * Get schemaUid * @return schemaUid */ @javax.annotation.Nonnull public String getSchemaUid() { return schemaUid; } public void setSchemaUid(@javax.annotation.Nonnull String schemaUid) { this.schemaUid = schemaUid; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RegisterFormRequest registerFormRequest = (RegisterFormRequest) o; return Objects.equals(this.key, registerFormRequest.key) && Objects.equals(this.data, registerFormRequest.data) && Objects.equals(this.schemaUid, registerFormRequest.schemaUid); } @Override public int hashCode() { return Objects.hash(key, data, schemaUid); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RegisterFormRequest {\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" schemaUid: ").append(toIndentedString(schemaUid)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("key"); openapiFields.add("data"); openapiFields.add("schema_uid"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("key"); openapiRequiredFields.add("data"); openapiRequiredFields.add("schema_uid"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to RegisterFormRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RegisterFormRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in RegisterFormRequest is not found in the empty JSON string", RegisterFormRequest.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!RegisterFormRequest.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RegisterFormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RegisterFormRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } if (!jsonObj.get("schema_uid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `schema_uid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("schema_uid").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!RegisterFormRequest.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'RegisterFormRequest' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<RegisterFormRequest> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(RegisterFormRequest.class)); return (TypeAdapter<T>) new TypeAdapter<RegisterFormRequest>() { @Override public void write(JsonWriter out, RegisterFormRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public RegisterFormRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of RegisterFormRequest given an JSON string * * @param jsonString JSON string * @return An instance of RegisterFormRequest * @throws IOException if the JSON string is invalid with respect to RegisterFormRequest */ public static RegisterFormRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RegisterFormRequest.class); } /** * Convert an instance of RegisterFormRequest to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/Role.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import java.io.IOException; import java.lang.reflect.Type; import java.util.logging.Level; import java.util.logging.Logger; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.HashMap; import java.util.List; import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.JsonPrimitive; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonArray; import com.google.gson.JsonParseException; import ai.lamin.lamin_api_client.JSON; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class Role extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Role.class.getName()); public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!Role.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'Role' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<String> adapterString = gson.getDelegateAdapter(this, TypeToken.get(String.class)); return (TypeAdapter<T>) new TypeAdapter<Role>() { @Override public void write(JsonWriter out, Role value) throws IOException { if (value == null || value.getActualInstance() == null) { elementAdapter.write(out, null); return; } // check if the actual instance is of the type `String` if (value.getActualInstance() instanceof String) { JsonPrimitive primitive = adapterString.toJsonTree((String)value.getActualInstance()).getAsJsonPrimitive(); elementAdapter.write(out, primitive); return; } throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: String"); } @Override public Role read(JsonReader in) throws IOException { Object deserialized = null; JsonElement jsonElement = elementAdapter.read(in); ArrayList<String> errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; // deserialize String try { // validate the JSON object to see if any exception is thrown if (!jsonElement.getAsJsonPrimitive().isString()) { throw new IllegalArgumentException(String.format("Expected json element to be of type String in the JSON string but got `%s`", jsonElement.toString())); } actualAdapter = adapterString; Role ret = new Role(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; } catch (Exception e) { // deserialization failed, continue errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'String'", e); } throw new IOException(String.format("Failed deserialization for Role: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); } }.nullSafe(); } } // store a list of schema names defined in anyOf public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>(); public Role() { super("anyOf", Boolean.FALSE); } public Role(Object o) { super("anyOf", Boolean.FALSE); setActualInstance(o); } static { schemas.put("String", String.class); } @Override public Map<String, Class<?>> getSchemas() { return Role.schemas; } /** * Set the instance that matches the anyOf child schema, check * the instance parameter is valid against the anyOf child schemas: * String * * It could be an instance of the 'anyOf' schemas. */ @Override public void setActualInstance(Object instance) { if (instance instanceof String) { super.setActualInstance(instance); return; } throw new RuntimeException("Invalid instance type. Must be String"); } /** * Get the actual instance, which can be the following: * String * * @return The actual instance (String) */ @SuppressWarnings("unchecked") @Override public Object getActualInstance() { return super.getActualInstance(); } /** * Get the actual instance of `String`. If the actual instance is not `String`, * the ClassCastException will be thrown. * * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ public String getString() throws ClassCastException { return (String)super.getActualInstance(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to Role */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { // validate anyOf schemas one by one ArrayList<String> errorMessages = new ArrayList<>(); // validate the json string with String try { if (!jsonElement.getAsJsonPrimitive().isString()) { throw new IllegalArgumentException(String.format("Expected json element to be of type String in the JSON string but got `%s`", jsonElement.toString())); } return; } catch (Exception e) { errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); // continue to the next one } throw new IOException(String.format("The JSON string is invalid for Role with anyOf schemas: String. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); } /** * Create an instance of Role given an JSON string * * @param jsonString JSON string * @return An instance of Role * @throws IOException if the JSON string is invalid with respect to Role */ public static Role fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Role.class); } /** * Convert an instance of Role to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/Role1.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import java.io.IOException; import java.lang.reflect.Type; import java.util.logging.Level; import java.util.logging.Logger; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.HashMap; import java.util.List; import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.JsonPrimitive; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonArray; import com.google.gson.JsonParseException; import ai.lamin.lamin_api_client.JSON; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class Role1 extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Role1.class.getName()); public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!Role1.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'Role1' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<String> adapterString = gson.getDelegateAdapter(this, TypeToken.get(String.class)); return (TypeAdapter<T>) new TypeAdapter<Role1>() { @Override public void write(JsonWriter out, Role1 value) throws IOException { if (value == null || value.getActualInstance() == null) { elementAdapter.write(out, null); return; } // check if the actual instance is of the type `String` if (value.getActualInstance() instanceof String) { JsonPrimitive primitive = adapterString.toJsonTree((String)value.getActualInstance()).getAsJsonPrimitive(); elementAdapter.write(out, primitive); return; } throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: String"); } @Override public Role1 read(JsonReader in) throws IOException { Object deserialized = null; JsonElement jsonElement = elementAdapter.read(in); ArrayList<String> errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; // deserialize String try { // validate the JSON object to see if any exception is thrown if (!jsonElement.getAsJsonPrimitive().isString()) { throw new IllegalArgumentException(String.format("Expected json element to be of type String in the JSON string but got `%s`", jsonElement.toString())); } actualAdapter = adapterString; Role1 ret = new Role1(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; } catch (Exception e) { // deserialization failed, continue errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'String'", e); } throw new IOException(String.format("Failed deserialization for Role1: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); } }.nullSafe(); } } // store a list of schema names defined in anyOf public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>(); public Role1() { super("anyOf", Boolean.FALSE); } public Role1(Object o) { super("anyOf", Boolean.FALSE); setActualInstance(o); } static { schemas.put("String", String.class); } @Override public Map<String, Class<?>> getSchemas() { return Role1.schemas; } /** * Set the instance that matches the anyOf child schema, check * the instance parameter is valid against the anyOf child schemas: * String * * It could be an instance of the 'anyOf' schemas. */ @Override public void setActualInstance(Object instance) { if (instance instanceof String) { super.setActualInstance(instance); return; } throw new RuntimeException("Invalid instance type. Must be String"); } /** * Get the actual instance, which can be the following: * String * * @return The actual instance (String) */ @SuppressWarnings("unchecked") @Override public Object getActualInstance() { return super.getActualInstance(); } /** * Get the actual instance of `String`. If the actual instance is not `String`, * the ClassCastException will be thrown. * * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ public String getString() throws ClassCastException { return (String)super.getActualInstance(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to Role1 */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { // validate anyOf schemas one by one ArrayList<String> errorMessages = new ArrayList<>(); // validate the json string with String try { if (!jsonElement.getAsJsonPrimitive().isString()) { throw new IllegalArgumentException(String.format("Expected json element to be of type String in the JSON string but got `%s`", jsonElement.toString())); } return; } catch (Exception e) { errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); // continue to the next one } throw new IOException(String.format("The JSON string is invalid for Role1 with anyOf schemas: String. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); } /** * Create an instance of Role1 given an JSON string * * @param jsonString JSON string * @return An instance of Role1 * @throws IOException if the JSON string is invalid with respect to Role1 */ public static Role1 fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, Role1.class); } /** * Convert an instance of Role1 to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/S3PermissionsRequest.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * S3PermissionsRequest */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class S3PermissionsRequest { public static final String SERIALIZED_NAME_AWS_ACCESS_KEY_ID = "aws_access_key_id"; @SerializedName(SERIALIZED_NAME_AWS_ACCESS_KEY_ID) @javax.annotation.Nonnull private String awsAccessKeyId; public static final String SERIALIZED_NAME_AWS_SECRET_ACCESS_KEY = "aws_secret_access_key"; @SerializedName(SERIALIZED_NAME_AWS_SECRET_ACCESS_KEY) @javax.annotation.Nonnull private String awsSecretAccessKey; public static final String SERIALIZED_NAME_REGION = "region"; @SerializedName(SERIALIZED_NAME_REGION) @javax.annotation.Nonnull private String region; public S3PermissionsRequest() { } public S3PermissionsRequest awsAccessKeyId(@javax.annotation.Nonnull String awsAccessKeyId) { this.awsAccessKeyId = awsAccessKeyId; return this; } /** * Get awsAccessKeyId * @return awsAccessKeyId */ @javax.annotation.Nonnull public String getAwsAccessKeyId() { return awsAccessKeyId; } public void setAwsAccessKeyId(@javax.annotation.Nonnull String awsAccessKeyId) { this.awsAccessKeyId = awsAccessKeyId; } public S3PermissionsRequest awsSecretAccessKey(@javax.annotation.Nonnull String awsSecretAccessKey) { this.awsSecretAccessKey = awsSecretAccessKey; return this; } /** * Get awsSecretAccessKey * @return awsSecretAccessKey */ @javax.annotation.Nonnull public String getAwsSecretAccessKey() { return awsSecretAccessKey; } public void setAwsSecretAccessKey(@javax.annotation.Nonnull String awsSecretAccessKey) { this.awsSecretAccessKey = awsSecretAccessKey; } public S3PermissionsRequest region(@javax.annotation.Nonnull String region) { this.region = region; return this; } /** * Get region * @return region */ @javax.annotation.Nonnull public String getRegion() { return region; } public void setRegion(@javax.annotation.Nonnull String region) { this.region = region; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } S3PermissionsRequest s3PermissionsRequest = (S3PermissionsRequest) o; return Objects.equals(this.awsAccessKeyId, s3PermissionsRequest.awsAccessKeyId) && Objects.equals(this.awsSecretAccessKey, s3PermissionsRequest.awsSecretAccessKey) && Objects.equals(this.region, s3PermissionsRequest.region); } @Override public int hashCode() { return Objects.hash(awsAccessKeyId, awsSecretAccessKey, region); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class S3PermissionsRequest {\n"); sb.append(" awsAccessKeyId: ").append(toIndentedString(awsAccessKeyId)).append("\n"); sb.append(" awsSecretAccessKey: ").append(toIndentedString(awsSecretAccessKey)).append("\n"); sb.append(" region: ").append(toIndentedString(region)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("aws_access_key_id"); openapiFields.add("aws_secret_access_key"); openapiFields.add("region"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("aws_access_key_id"); openapiRequiredFields.add("aws_secret_access_key"); openapiRequiredFields.add("region"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to S3PermissionsRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!S3PermissionsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in S3PermissionsRequest is not found in the empty JSON string", S3PermissionsRequest.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!S3PermissionsRequest.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `S3PermissionsRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : S3PermissionsRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("aws_access_key_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `aws_access_key_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("aws_access_key_id").toString())); } if (!jsonObj.get("aws_secret_access_key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `aws_secret_access_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("aws_secret_access_key").toString())); } if (!jsonObj.get("region").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `region` to be a primitive type in the JSON string but got `%s`", jsonObj.get("region").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!S3PermissionsRequest.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'S3PermissionsRequest' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<S3PermissionsRequest> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(S3PermissionsRequest.class)); return (TypeAdapter<T>) new TypeAdapter<S3PermissionsRequest>() { @Override public void write(JsonWriter out, S3PermissionsRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public S3PermissionsRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of S3PermissionsRequest given an JSON string * * @param jsonString JSON string * @return An instance of S3PermissionsRequest * @throws IOException if the JSON string is invalid with respect to S3PermissionsRequest */ public static S3PermissionsRequest fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, S3PermissionsRequest.class); } /** * Convert an instance of S3PermissionsRequest to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/UpdateCollaboratorRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * UpdateCollaboratorRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class UpdateCollaboratorRequestBody { /** * Gets or Sets role */ @JsonAdapter(RoleEnum.Adapter.class) public enum RoleEnum { ADMIN("admin"), READ("read"), WRITE("write"); private String value; RoleEnum(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } public static RoleEnum fromValue(String value) { for (RoleEnum b : RoleEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter<RoleEnum> { @Override public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override public RoleEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); return RoleEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); RoleEnum.fromValue(value); } } public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) @javax.annotation.Nonnull private RoleEnum role; public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @javax.annotation.Nullable private UUID accountId; public static final String SERIALIZED_NAME_TEAM_ID = "team_id"; @SerializedName(SERIALIZED_NAME_TEAM_ID) @javax.annotation.Nullable private UUID teamId; public UpdateCollaboratorRequestBody() { } public UpdateCollaboratorRequestBody role(@javax.annotation.Nonnull RoleEnum role) { this.role = role; return this; } /** * Get role * @return role */ @javax.annotation.Nonnull public RoleEnum getRole() { return role; } public void setRole(@javax.annotation.Nonnull RoleEnum role) { this.role = role; } public UpdateCollaboratorRequestBody accountId(@javax.annotation.Nullable UUID accountId) { this.accountId = accountId; return this; } /** * Get accountId * @return accountId */ @javax.annotation.Nullable public UUID getAccountId() { return accountId; } public void setAccountId(@javax.annotation.Nullable UUID accountId) { this.accountId = accountId; } public UpdateCollaboratorRequestBody teamId(@javax.annotation.Nullable UUID teamId) { this.teamId = teamId; return this; } /** * Get teamId * @return teamId */ @javax.annotation.Nullable public UUID getTeamId() { return teamId; } public void setTeamId(@javax.annotation.Nullable UUID teamId) { this.teamId = teamId; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpdateCollaboratorRequestBody updateCollaboratorRequestBody = (UpdateCollaboratorRequestBody) o; return Objects.equals(this.role, updateCollaboratorRequestBody.role) && Objects.equals(this.accountId, updateCollaboratorRequestBody.accountId) && Objects.equals(this.teamId, updateCollaboratorRequestBody.teamId); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(role, accountId, teamId); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateCollaboratorRequestBody {\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("role"); openapiFields.add("account_id"); openapiFields.add("team_id"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("role"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to UpdateCollaboratorRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateCollaboratorRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCollaboratorRequestBody is not found in the empty JSON string", UpdateCollaboratorRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!UpdateCollaboratorRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateCollaboratorRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateCollaboratorRequestBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("role").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); } // validate the required field `role` RoleEnum.validateJsonElement(jsonObj.get("role")); if ((jsonObj.get("account_id") != null && !jsonObj.get("account_id").isJsonNull()) && !jsonObj.get("account_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `account_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_id").toString())); } if ((jsonObj.get("team_id") != null && !jsonObj.get("team_id").isJsonNull()) && !jsonObj.get("team_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `team_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("team_id").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!UpdateCollaboratorRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'UpdateCollaboratorRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<UpdateCollaboratorRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(UpdateCollaboratorRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<UpdateCollaboratorRequestBody>() { @Override public void write(JsonWriter out, UpdateCollaboratorRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public UpdateCollaboratorRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of UpdateCollaboratorRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of UpdateCollaboratorRequestBody * @throws IOException if the JSON string is invalid with respect to UpdateCollaboratorRequestBody */ public static UpdateCollaboratorRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateCollaboratorRequestBody.class); } /** * Convert an instance of UpdateCollaboratorRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/UpdateOrganizationMemberRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * UpdateOrganizationMemberRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class UpdateOrganizationMemberRequestBody { /** * Gets or Sets role */ @JsonAdapter(RoleEnum.Adapter.class) public enum RoleEnum { ADMIN("admin"), MEMBER("member"), MANAGER("manager"); private String value; RoleEnum(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } public static RoleEnum fromValue(String value) { for (RoleEnum b : RoleEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter<RoleEnum> { @Override public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override public RoleEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); return RoleEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); RoleEnum.fromValue(value); } } public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) @javax.annotation.Nonnull private RoleEnum role; public UpdateOrganizationMemberRequestBody() { } public UpdateOrganizationMemberRequestBody role(@javax.annotation.Nonnull RoleEnum role) { this.role = role; return this; } /** * Get role * @return role */ @javax.annotation.Nonnull public RoleEnum getRole() { return role; } public void setRole(@javax.annotation.Nonnull RoleEnum role) { this.role = role; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpdateOrganizationMemberRequestBody updateOrganizationMemberRequestBody = (UpdateOrganizationMemberRequestBody) o; return Objects.equals(this.role, updateOrganizationMemberRequestBody.role); } @Override public int hashCode() { return Objects.hash(role); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateOrganizationMemberRequestBody {\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("role"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("role"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to UpdateOrganizationMemberRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateOrganizationMemberRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateOrganizationMemberRequestBody is not found in the empty JSON string", UpdateOrganizationMemberRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!UpdateOrganizationMemberRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateOrganizationMemberRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateOrganizationMemberRequestBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("role").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); } // validate the required field `role` RoleEnum.validateJsonElement(jsonObj.get("role")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!UpdateOrganizationMemberRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'UpdateOrganizationMemberRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<UpdateOrganizationMemberRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(UpdateOrganizationMemberRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<UpdateOrganizationMemberRequestBody>() { @Override public void write(JsonWriter out, UpdateOrganizationMemberRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public UpdateOrganizationMemberRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of UpdateOrganizationMemberRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of UpdateOrganizationMemberRequestBody * @throws IOException if the JSON string is invalid with respect to UpdateOrganizationMemberRequestBody */ public static UpdateOrganizationMemberRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateOrganizationMemberRequestBody.class); } /** * Convert an instance of UpdateOrganizationMemberRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/UpdateSpaceCollaboratorRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * UpdateSpaceCollaboratorRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class UpdateSpaceCollaboratorRequestBody { public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @javax.annotation.Nullable private UUID accountId; public static final String SERIALIZED_NAME_TEAM_ID = "team_id"; @SerializedName(SERIALIZED_NAME_TEAM_ID) @javax.annotation.Nullable private UUID teamId; /** * Gets or Sets role */ @JsonAdapter(RoleEnum.Adapter.class) public enum RoleEnum { ADMIN("admin"), READ("read"), WRITE("write"); private String value; RoleEnum(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } public static RoleEnum fromValue(String value) { for (RoleEnum b : RoleEnum.values()) { if (b.value.equals(value)) { return b; } } return null; } public static class Adapter extends TypeAdapter<RoleEnum> { @Override public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override public RoleEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); return RoleEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); RoleEnum.fromValue(value); } } public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) @javax.annotation.Nullable private RoleEnum role; public UpdateSpaceCollaboratorRequestBody() { } public UpdateSpaceCollaboratorRequestBody accountId(@javax.annotation.Nullable UUID accountId) { this.accountId = accountId; return this; } /** * Get accountId * @return accountId */ @javax.annotation.Nullable public UUID getAccountId() { return accountId; } public void setAccountId(@javax.annotation.Nullable UUID accountId) { this.accountId = accountId; } public UpdateSpaceCollaboratorRequestBody teamId(@javax.annotation.Nullable UUID teamId) { this.teamId = teamId; return this; } /** * Get teamId * @return teamId */ @javax.annotation.Nullable public UUID getTeamId() { return teamId; } public void setTeamId(@javax.annotation.Nullable UUID teamId) { this.teamId = teamId; } public UpdateSpaceCollaboratorRequestBody role(@javax.annotation.Nullable RoleEnum role) { this.role = role; return this; } /** * Get role * @return role */ @javax.annotation.Nullable public RoleEnum getRole() { return role; } public void setRole(@javax.annotation.Nullable RoleEnum role) { this.role = role; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpdateSpaceCollaboratorRequestBody updateSpaceCollaboratorRequestBody = (UpdateSpaceCollaboratorRequestBody) o; return Objects.equals(this.accountId, updateSpaceCollaboratorRequestBody.accountId) && Objects.equals(this.teamId, updateSpaceCollaboratorRequestBody.teamId) && Objects.equals(this.role, updateSpaceCollaboratorRequestBody.role); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(accountId, teamId, role); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateSpaceCollaboratorRequestBody {\n"); sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("account_id"); openapiFields.add("team_id"); openapiFields.add("role"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to UpdateSpaceCollaboratorRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateSpaceCollaboratorRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateSpaceCollaboratorRequestBody is not found in the empty JSON string", UpdateSpaceCollaboratorRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!UpdateSpaceCollaboratorRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateSpaceCollaboratorRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("account_id") != null && !jsonObj.get("account_id").isJsonNull()) && !jsonObj.get("account_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `account_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_id").toString())); } if ((jsonObj.get("team_id") != null && !jsonObj.get("team_id").isJsonNull()) && !jsonObj.get("team_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `team_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("team_id").toString())); } if ((jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) && !jsonObj.get("role").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); } // validate the optional field `role` if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { RoleEnum.validateJsonElement(jsonObj.get("role")); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!UpdateSpaceCollaboratorRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'UpdateSpaceCollaboratorRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<UpdateSpaceCollaboratorRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(UpdateSpaceCollaboratorRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<UpdateSpaceCollaboratorRequestBody>() { @Override public void write(JsonWriter out, UpdateSpaceCollaboratorRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public UpdateSpaceCollaboratorRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of UpdateSpaceCollaboratorRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of UpdateSpaceCollaboratorRequestBody * @throws IOException if the JSON string is invalid with respect to UpdateSpaceCollaboratorRequestBody */ public static UpdateSpaceCollaboratorRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateSpaceCollaboratorRequestBody.class); } /** * Convert an instance of UpdateSpaceCollaboratorRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/UpdateSpaceRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * UpdateSpaceRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class UpdateSpaceRequestBody { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @javax.annotation.Nullable private String description; public UpdateSpaceRequestBody() { } public UpdateSpaceRequestBody name(@javax.annotation.Nullable String name) { this.name = name; return this; } /** * Get name * @return name */ @javax.annotation.Nullable public String getName() { return name; } public void setName(@javax.annotation.Nullable String name) { this.name = name; } public UpdateSpaceRequestBody description(@javax.annotation.Nullable String description) { this.description = description; return this; } /** * Get description * @return description */ @javax.annotation.Nullable public String getDescription() { return description; } public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpdateSpaceRequestBody updateSpaceRequestBody = (UpdateSpaceRequestBody) o; return Objects.equals(this.name, updateSpaceRequestBody.name) && Objects.equals(this.description, updateSpaceRequestBody.description); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(name, description); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateSpaceRequestBody {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("name"); openapiFields.add("description"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to UpdateSpaceRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateSpaceRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateSpaceRequestBody is not found in the empty JSON string", UpdateSpaceRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!UpdateSpaceRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateSpaceRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!UpdateSpaceRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'UpdateSpaceRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<UpdateSpaceRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(UpdateSpaceRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<UpdateSpaceRequestBody>() { @Override public void write(JsonWriter out, UpdateSpaceRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public UpdateSpaceRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of UpdateSpaceRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of UpdateSpaceRequestBody * @throws IOException if the JSON string is invalid with respect to UpdateSpaceRequestBody */ public static UpdateSpaceRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateSpaceRequestBody.class); } /** * Convert an instance of UpdateSpaceRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/UpdateTeamMemberRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import ai.lamin.lamin_api_client.model.Role1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * UpdateTeamMemberRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class UpdateTeamMemberRequestBody { public static final String SERIALIZED_NAME_ROLE = "role"; @SerializedName(SERIALIZED_NAME_ROLE) @javax.annotation.Nonnull private Role1 role; public UpdateTeamMemberRequestBody() { } public UpdateTeamMemberRequestBody role(@javax.annotation.Nonnull Role1 role) { this.role = role; return this; } /** * Get role * @return role */ @javax.annotation.Nonnull public Role1 getRole() { return role; } public void setRole(@javax.annotation.Nonnull Role1 role) { this.role = role; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpdateTeamMemberRequestBody updateTeamMemberRequestBody = (UpdateTeamMemberRequestBody) o; return Objects.equals(this.role, updateTeamMemberRequestBody.role); } @Override public int hashCode() { return Objects.hash(role); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateTeamMemberRequestBody {\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("role"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("role"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to UpdateTeamMemberRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateTeamMemberRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTeamMemberRequestBody is not found in the empty JSON string", UpdateTeamMemberRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!UpdateTeamMemberRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTeamMemberRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateTeamMemberRequestBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `role` Role1.validateJsonElement(jsonObj.get("role")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!UpdateTeamMemberRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'UpdateTeamMemberRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<UpdateTeamMemberRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(UpdateTeamMemberRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<UpdateTeamMemberRequestBody>() { @Override public void write(JsonWriter out, UpdateTeamMemberRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public UpdateTeamMemberRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of UpdateTeamMemberRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of UpdateTeamMemberRequestBody * @throws IOException if the JSON string is invalid with respect to UpdateTeamMemberRequestBody */ public static UpdateTeamMemberRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateTeamMemberRequestBody.class); } /** * Convert an instance of UpdateTeamMemberRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/UpdateTeamRequestBody.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * UpdateTeamRequestBody */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class UpdateTeamRequestBody { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @javax.annotation.Nullable private String name; public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @javax.annotation.Nullable private String description; public UpdateTeamRequestBody() { } public UpdateTeamRequestBody name(@javax.annotation.Nullable String name) { this.name = name; return this; } /** * Get name * @return name */ @javax.annotation.Nullable public String getName() { return name; } public void setName(@javax.annotation.Nullable String name) { this.name = name; } public UpdateTeamRequestBody description(@javax.annotation.Nullable String description) { this.description = description; return this; } /** * Get description * @return description */ @javax.annotation.Nullable public String getDescription() { return description; } public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UpdateTeamRequestBody updateTeamRequestBody = (UpdateTeamRequestBody) o; return Objects.equals(this.name, updateTeamRequestBody.name) && Objects.equals(this.description, updateTeamRequestBody.description); } private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { return Objects.hash(name, description); } private static <T> int hashCodeNullable(JsonNullable<T> a) { if (a == null) { return 1; } return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateTeamRequestBody {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("name"); openapiFields.add("description"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to UpdateTeamRequestBody */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateTeamRequestBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTeamRequestBody is not found in the empty JSON string", UpdateTeamRequestBody.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!UpdateTeamRequestBody.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTeamRequestBody` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!UpdateTeamRequestBody.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'UpdateTeamRequestBody' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<UpdateTeamRequestBody> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(UpdateTeamRequestBody.class)); return (TypeAdapter<T>) new TypeAdapter<UpdateTeamRequestBody>() { @Override public void write(JsonWriter out, UpdateTeamRequestBody value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public UpdateTeamRequestBody read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of UpdateTeamRequestBody given an JSON string * * @param jsonString JSON string * @return An instance of UpdateTeamRequestBody * @throws IOException if the JSON string is invalid with respect to UpdateTeamRequestBody */ public static UpdateTeamRequestBody fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UpdateTeamRequestBody.class); } /** * Convert an instance of UpdateTeamRequestBody to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/ValidationError.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import ai.lamin.lamin_api_client.model.ValidationErrorLocInner; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import ai.lamin.lamin_api_client.JSON; /** * ValidationError */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class ValidationError { public static final String SERIALIZED_NAME_LOC = "loc"; @SerializedName(SERIALIZED_NAME_LOC) @javax.annotation.Nonnull private List<ValidationErrorLocInner> loc = new ArrayList<>(); public static final String SERIALIZED_NAME_MSG = "msg"; @SerializedName(SERIALIZED_NAME_MSG) @javax.annotation.Nonnull private String msg; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nonnull private String type; public ValidationError() { } public ValidationError loc(@javax.annotation.Nonnull List<ValidationErrorLocInner> loc) { this.loc = loc; return this; } public ValidationError addLocItem(ValidationErrorLocInner locItem) { if (this.loc == null) { this.loc = new ArrayList<>(); } this.loc.add(locItem); return this; } /** * Get loc * @return loc */ @javax.annotation.Nonnull public List<ValidationErrorLocInner> getLoc() { return loc; } public void setLoc(@javax.annotation.Nonnull List<ValidationErrorLocInner> loc) { this.loc = loc; } public ValidationError msg(@javax.annotation.Nonnull String msg) { this.msg = msg; return this; } /** * Get msg * @return msg */ @javax.annotation.Nonnull public String getMsg() { return msg; } public void setMsg(@javax.annotation.Nonnull String msg) { this.msg = msg; } public ValidationError type(@javax.annotation.Nonnull String type) { this.type = type; return this; } /** * Get type * @return type */ @javax.annotation.Nonnull public String getType() { return type; } public void setType(@javax.annotation.Nonnull String type) { this.type = type; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ValidationError validationError = (ValidationError) o; return Objects.equals(this.loc, validationError.loc) && Objects.equals(this.msg, validationError.msg) && Objects.equals(this.type, validationError.type); } @Override public int hashCode() { return Objects.hash(loc, msg, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ValidationError {\n"); sb.append(" loc: ").append(toIndentedString(loc)).append("\n"); sb.append(" msg: ").append(toIndentedString(msg)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } public static HashSet<String> openapiFields; public static HashSet<String> openapiRequiredFields; static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet<String>(); openapiFields.add("loc"); openapiFields.add("msg"); openapiFields.add("type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet<String>(); openapiRequiredFields.add("loc"); openapiRequiredFields.add("msg"); openapiRequiredFields.add("type"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to ValidationError */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ValidationError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationError is not found in the empty JSON string", ValidationError.openapiRequiredFields.toString())); } } Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry<String, JsonElement> entry : entries) { if (!ValidationError.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidationError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ValidationError.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the json data is an array if (!jsonObj.get("loc").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `loc` to be an array in the JSON string but got `%s`", jsonObj.get("loc").toString())); } JsonArray jsonArrayloc = jsonObj.getAsJsonArray("loc"); // validate the required field `loc` (array) for (int i = 0; i < jsonArrayloc.size(); i++) { ValidationErrorLocInner.validateJsonElement(jsonArrayloc.get(i)); }; if (!jsonObj.get("msg").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `msg` to be a primitive type in the JSON string but got `%s`", jsonObj.get("msg").toString())); } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!ValidationError.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'ValidationError' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<ValidationError> thisAdapter = gson.getDelegateAdapter(this, TypeToken.get(ValidationError.class)); return (TypeAdapter<T>) new TypeAdapter<ValidationError>() { @Override public void write(JsonWriter out, ValidationError value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override public ValidationError read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); } }.nullSafe(); } } /** * Create an instance of ValidationError given an JSON string * * @param jsonString JSON string * @return An instance of ValidationError * @throws IOException if the JSON string is invalid with respect to ValidationError */ public static ValidationError fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ValidationError.class); } /** * Convert an instance of ValidationError to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client
java-sources/ai/lamin/lamin-api-client/0.0.3/ai/lamin/lamin_api_client/model/ValidationErrorLocInner.java
/* * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package ai.lamin.lamin_api_client.model; import java.util.Objects; import java.io.IOException; import java.lang.reflect.Type; import java.util.logging.Level; import java.util.logging.Logger; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.HashMap; import java.util.List; import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.JsonPrimitive; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonArray; import com.google.gson.JsonParseException; import ai.lamin.lamin_api_client.JSON; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-17T13:08:14.011869776+02:00[Europe/Brussels]", comments = "Generator version: 7.12.0") public class ValidationErrorLocInner extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(ValidationErrorLocInner.class.getName()); public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { if (!ValidationErrorLocInner.class.isAssignableFrom(type.getRawType())) { return null; // this class only serializes 'ValidationErrorLocInner' and its subtypes } final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter<String> adapterString = gson.getDelegateAdapter(this, TypeToken.get(String.class)); final TypeAdapter<Integer> adapterInteger = gson.getDelegateAdapter(this, TypeToken.get(Integer.class)); return (TypeAdapter<T>) new TypeAdapter<ValidationErrorLocInner>() { @Override public void write(JsonWriter out, ValidationErrorLocInner value) throws IOException { if (value == null || value.getActualInstance() == null) { elementAdapter.write(out, null); return; } // check if the actual instance is of the type `String` if (value.getActualInstance() instanceof String) { JsonPrimitive primitive = adapterString.toJsonTree((String)value.getActualInstance()).getAsJsonPrimitive(); elementAdapter.write(out, primitive); return; } // check if the actual instance is of the type `Integer` if (value.getActualInstance() instanceof Integer) { JsonPrimitive primitive = adapterInteger.toJsonTree((Integer)value.getActualInstance()).getAsJsonPrimitive(); elementAdapter.write(out, primitive); return; } throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: Integer, String"); } @Override public ValidationErrorLocInner read(JsonReader in) throws IOException { Object deserialized = null; JsonElement jsonElement = elementAdapter.read(in); ArrayList<String> errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; // deserialize String try { // validate the JSON object to see if any exception is thrown if (!jsonElement.getAsJsonPrimitive().isString()) { throw new IllegalArgumentException(String.format("Expected json element to be of type String in the JSON string but got `%s`", jsonElement.toString())); } actualAdapter = adapterString; ValidationErrorLocInner ret = new ValidationErrorLocInner(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; } catch (Exception e) { // deserialization failed, continue errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'String'", e); } // deserialize Integer try { // validate the JSON object to see if any exception is thrown if (!jsonElement.getAsJsonPrimitive().isNumber()) { throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); } actualAdapter = adapterInteger; ValidationErrorLocInner ret = new ValidationErrorLocInner(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; } catch (Exception e) { // deserialization failed, continue errorMessages.add(String.format("Deserialization for Integer failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Integer'", e); } throw new IOException(String.format("Failed deserialization for ValidationErrorLocInner: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); } }.nullSafe(); } } // store a list of schema names defined in anyOf public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>(); public ValidationErrorLocInner() { super("anyOf", Boolean.FALSE); } public ValidationErrorLocInner(Object o) { super("anyOf", Boolean.FALSE); setActualInstance(o); } static { schemas.put("String", String.class); schemas.put("Integer", Integer.class); } @Override public Map<String, Class<?>> getSchemas() { return ValidationErrorLocInner.schemas; } /** * Set the instance that matches the anyOf child schema, check * the instance parameter is valid against the anyOf child schemas: * Integer, String * * It could be an instance of the 'anyOf' schemas. */ @Override public void setActualInstance(Object instance) { if (instance instanceof String) { super.setActualInstance(instance); return; } if (instance instanceof Integer) { super.setActualInstance(instance); return; } throw new RuntimeException("Invalid instance type. Must be Integer, String"); } /** * Get the actual instance, which can be the following: * Integer, String * * @return The actual instance (Integer, String) */ @SuppressWarnings("unchecked") @Override public Object getActualInstance() { return super.getActualInstance(); } /** * Get the actual instance of `String`. If the actual instance is not `String`, * the ClassCastException will be thrown. * * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ public String getString() throws ClassCastException { return (String)super.getActualInstance(); } /** * Get the actual instance of `Integer`. If the actual instance is not `Integer`, * the ClassCastException will be thrown. * * @return The actual instance of `Integer` * @throws ClassCastException if the instance is not `Integer` */ public Integer getInteger() throws ClassCastException { return (Integer)super.getActualInstance(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to ValidationErrorLocInner */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { // validate anyOf schemas one by one ArrayList<String> errorMessages = new ArrayList<>(); // validate the json string with String try { if (!jsonElement.getAsJsonPrimitive().isString()) { throw new IllegalArgumentException(String.format("Expected json element to be of type String in the JSON string but got `%s`", jsonElement.toString())); } return; } catch (Exception e) { errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with Integer try { if (!jsonElement.getAsJsonPrimitive().isNumber()) { throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); } return; } catch (Exception e) { errorMessages.add(String.format("Deserialization for Integer failed with `%s`.", e.getMessage())); // continue to the next one } throw new IOException(String.format("The JSON string is invalid for ValidationErrorLocInner with anyOf schemas: Integer, String. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); } /** * Create an instance of ValidationErrorLocInner given an JSON string * * @param jsonString JSON string * @return An instance of ValidationErrorLocInner * @throws IOException if the JSON string is invalid with respect to ValidationErrorLocInner */ public static ValidationErrorLocInner fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, ValidationErrorLocInner.class); } /** * Convert an instance of ValidationErrorLocInner to an JSON string * * @return JSON string */ public String toJson() { return JSON.getGson().toJson(this); } }
0
java-sources/ai/latta/core/1.0/ai/latta
java-sources/ai/latta/core/1.0/ai/latta/core/BuildConfig.java
package ai.latta.core; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class BuildConfig { private Properties properties; public BuildConfig() { properties = new Properties(); try (InputStream input = getClass().getClassLoader().getResourceAsStream("lib.properties")) { if (input == null) { return; } properties.load(input); }catch (IOException e) { } } public String getApiUrl() { return properties.getProperty("api.url"); } }
0
java-sources/ai/latta/core/1.0/ai/latta
java-sources/ai/latta/core/1.0/ai/latta/core/LattaAPI.java
package ai.latta.core; import ai.latta.core.models.api.*; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import java.util.concurrent.CompletableFuture; public class LattaAPI { private final String apiRoute; private final String apiKey; private final HttpClient client; private final ObjectMapper objectMapper = new ObjectMapper(); public LattaAPI(String apiRoute, String apiKey) { var builder = HttpClient.newBuilder(); this.client = builder.build(); this.apiKey = apiKey; this.apiRoute = apiRoute; } /** * Build new request * @return */ private HttpRequest.Builder buildRequest() { return HttpRequest.newBuilder() .header("Authorization", "Bearer " + apiKey); } /** * Fetches data from API and returns deserialized object of type TResult * @param route The API route to call * @param method HTTP method to use (GET, POST, etc.) * @param data Request body data (as JSON string) * @param responseType The class type of the response (used for deserialization) * @param <TResult> The type of the expected response object * @return A CompletableFuture that resolves to the TResult object */ protected <TResult, TRequest> CompletableFuture<TResult> fetch(String route, String method, TRequest data, Class<TResult> responseType) { String requestBody; try { // Serialize the request body to JSON requestBody = objectMapper.writeValueAsString(data); } catch (Exception e) { return CompletableFuture.completedFuture(null); // throw new RuntimeException("Failed to serialize request body", e); } var request = buildRequest() .uri(URI.create(apiRoute + route)) .method(method, HttpRequest.BodyPublishers.ofString(requestBody)) .header("Content-Type", "application/json") .build(); // Send the request asynchronously return this.client.sendAsync(request, HttpResponse.BodyHandlers.ofString()) .handle((response, throwable) -> { if (throwable != null) { // Return null on sendAsync error return null; } try { var body = response.body(); // Deserialize the response body to TResult return objectMapper.readValue(body, responseType); } catch (Exception e) { // Return null on deserialization error return null; } }); } /** * Fetches data from API with multipart/form-data for file uploads. * @param route The API route to call * @param method HTTP method to use (GET, POST, etc.) * @param data Map containing fields and file objects to be uploaded * @param responseType The class type of the response (used for deserialization) * @param <TResult> The type of the expected response object * @return A CompletableFuture that resolves to the TResult object */ protected <TResult> CompletableFuture<TResult> multipartFetch( String route, String method, Map<String, Object> data, Class<TResult> responseType) { String boundary = "Boundary-" + System.currentTimeMillis(); var requestBody = buildMultipartBody(data, boundary); var request = buildRequest() .uri(URI.create(apiRoute + route)) .header("Content-Type", "multipart/form-data; boundary=" + boundary) .method(method, HttpRequest.BodyPublishers.ofByteArray(requestBody)) .build(); // Send the request asynchronously return this.client.sendAsync(request, HttpResponse.BodyHandlers.ofString()) .thenApply(HttpResponse::body) .thenApply(body -> { try { // Deserialize the response body to TResult return objectMapper.readValue(body, responseType); } catch (Exception e) { throw new RuntimeException("Failed to deserialize response", e); } }); } /** * Build the multipart body from fields and files. * * @param data Map containing fields and file objects * @param boundary The boundary string for multipart form * @return The byte array representing the multipart form body */ private byte[] buildMultipartBody(Map<String, Object> data, String boundary) { StringBuilder body = new StringBuilder(); for (Map.Entry<String, Object> entry : data.entrySet()) { body.append("--").append(boundary).append("\r\n"); if (entry.getValue() instanceof File) { File file = (File) entry.getValue(); body.append("Content-Disposition: form-data; name=\"").append(entry.getKey()) .append("\"; filename=\"").append(file.getName()).append("\"\r\n"); body.append("Content-Type: application/octet-stream\r\n\r\n"); body.append(new String(readFileBytes(file))).append("\r\n"); // Read file bytes } else { // Assuming it's a string for form fields body.append("Content-Disposition: form-data; name=\"").append(entry.getKey()).append("\"\r\n\r\n"); body.append(entry.getValue()).append("\r\n"); } } body.append("--").append(boundary).append("--\r\n"); // End of multipart return body.toString().getBytes(StandardCharsets.UTF_8); } /** * Read the file bytes to be uploaded. * * @param file The file to read * @return The byte array of the file */ private byte[] readFileBytes(File file) { try (FileInputStream fis = new FileInputStream(file)) { return fis.readAllBytes(); } catch (IOException e) { throw new RuntimeException("Failed to read file: " + file.getName(), e); } } /** * Create new instance * @param data Instance data * @return Instance or null */ public CompletableFuture<Instance> createInstance(CreateInstance data) { return this.fetch("/instance/backend", "PUT", data, Instance.class); } /** * Create new snapshot * @param instance Target instance * @param data Snapshot data * @return Snapshot or null */ public CompletableFuture<Snapshot> createSnapshot(Instance instance, CreateSnapshot data) { return this.fetch("/snapshot/" + instance.id, "PUT", data, Snapshot.class); } /** * Attach data to snapshot * @param snapshot Target snapshot * @param type Attachment type * @param data Attachment data * @return */ public CompletableFuture<Attachment> attachData(Snapshot snapshot, String type, Object data) { Map<String, Object> map = new HashMap<>(); map.put("type", type); map.put("data", data); return this.fetch("/snapshot/" + snapshot.id + "/attachment", "PUT", map, Attachment.class); } }
0
java-sources/ai/latta/core/1.0/ai/latta
java-sources/ai/latta/core/1.0/ai/latta/core/LattaClient.java
package ai.latta.core; import ai.latta.core.models.AttachmentType; import ai.latta.core.models.api.*; import ai.latta.core.models.exceptions.BaseException; import java.util.concurrent.CompletableFuture; public class LattaClient { private final String apiKey; public final LattaAPI apiClient; public LattaClient(String apiKey) { var buildConfig = new BuildConfig(); this.apiClient = new LattaAPI(buildConfig.getApiUrl(), apiKey); this.apiKey = apiKey; } public CompletableFuture<Instance> createInstance(CreateInstance data) { return this.apiClient.createInstance(data); } public CompletableFuture<Snapshot> createSnapshot(Instance instance, CreateSnapshot data) { return this.apiClient.createSnapshot(instance, data); } public CompletableFuture<Attachment> attachRecord(Snapshot snapshot, BaseException exception) { return this.apiClient.attachData(snapshot, AttachmentType.Record, exception); } public String getApiKey() { return apiKey; } }
0
java-sources/ai/latta/core/1.0/ai/latta
java-sources/ai/latta/core/1.0/ai/latta/core/Main.java
package ai.latta.core; import ai.latta.core.models.SystemInfo; import ai.latta.core.models.api.CreateInstance; import ai.latta.core.models.api.CreateSnapshot; import ai.latta.core.models.exceptions.BaseException; import ai.latta.core.models.exceptions.SystemException; import java.util.Date; import java.util.HashMap; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; public class Main { public static void main(String[] args) throws JsonProcessingException { var apiKey = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9qZWN0IjoiMWE3NTUyOWItZjUwNi00Yjk5LWI1ZTMtN2Y5ZjY5YzRmZDhmIiwiaWF0IjoxNzI3MjUzNjk5fQ.FejGfhY_Eqgkafd9_GvQrecvV8UuEk5gcT2s0XmPUDU"; var client = new LattaClient(apiKey); var createInstanceData = new CreateInstance("Java", "1.0.0"); var instance = client.createInstance(createInstanceData).join(); var snapshot = client.createSnapshot(instance, CreateSnapshot.fromRelation("Message")).join(); System.out.println(snapshot.id); SystemException ex = new SystemException(); ex.environmentVariables = new HashMap<>(System.getenv()); ex.level = BaseException.Level.ERROR; ex.name = "Test error"; ex.message = "Message"; ex.systemInfo = new SystemInfo(); ex.timestamp = new Date(); ObjectMapper mapper = new ObjectMapper(); String json = mapper.writeValueAsString(ex); System.out.println(json); client.attachRecord(snapshot, ex).join(); } }
0
java-sources/ai/latta/core/1.0/ai/latta/core
java-sources/ai/latta/core/1.0/ai/latta/core/interfaces/StreamListener.java
package ai.latta.core.interfaces; public interface StreamListener { void onLogCaptured(String log); }
0
java-sources/ai/latta/core/1.0/ai/latta/core
java-sources/ai/latta/core/1.0/ai/latta/core/models/AttachmentType.java
package ai.latta.core.models; public abstract class AttachmentType { public static final String Record = "record"; }
0
java-sources/ai/latta/core/1.0/ai/latta/core
java-sources/ai/latta/core/1.0/ai/latta/core/models/SystemInfo.java
package ai.latta.core.models; import java.lang.management.ManagementFactory; import com.fasterxml.jackson.annotation.JsonProperty; import com.sun.management.OperatingSystemMXBean; public class SystemInfo { @JsonProperty("free_memory") public long freeMemory; @JsonProperty("total_memory") public long totalMemory; @JsonProperty("cpu_usage") public double cpuUsage; public SystemInfo() { OperatingSystemMXBean osBean = ManagementFactory.getPlatformMXBean(OperatingSystemMXBean.class); cpuUsage = osBean.getSystemCpuLoad(); totalMemory = osBean.getTotalPhysicalMemorySize(); freeMemory = osBean.getFreePhysicalMemorySize(); } }
0
java-sources/ai/latta/core/1.0/ai/latta/core/models
java-sources/ai/latta/core/1.0/ai/latta/core/models/api/Attachment.java
package ai.latta.core.models.api; import com.fasterxml.jackson.annotation.JsonProperty; public class Attachment { @JsonProperty public String id; }
0
java-sources/ai/latta/core/1.0/ai/latta/core/models
java-sources/ai/latta/core/1.0/ai/latta/core/models/api/CreateInstance.java
package ai.latta.core.models.api; import com.fasterxml.jackson.annotation.JsonProperty; import java.net.InetAddress; public class CreateInstance { @JsonProperty("framework") String framework; @JsonProperty("framework_version") String frameworkVersion; @JsonProperty("os") String operatingSystem; @JsonProperty("device") String deviceName; @JsonProperty("lang") String language; public CreateInstance(String framework, String frameworkVersion) { this.framework = framework; this.frameworkVersion = frameworkVersion; this.operatingSystem = System.getProperty("os.name"); try { this.deviceName = InetAddress.getLocalHost().getHostName(); }catch (Exception e) { this.deviceName = "unknown"; } // Hardcode this for now this.language = "en"; } }
0
java-sources/ai/latta/core/1.0/ai/latta/core/models
java-sources/ai/latta/core/1.0/ai/latta/core/models/api/CreateSnapshot.java
package ai.latta.core.models.api; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; public class CreateSnapshot { @JsonProperty String message; @JsonProperty("relation_id") String relationId; @JsonProperty("related_to_relation_id") String relatedRelationId; public CreateSnapshot(String message) { this.message = message; } public static CreateSnapshot fromRelation(String message) { return fromRelation(message, UUID.randomUUID().toString()); } public static CreateSnapshot fromRelation(String message, String relationId) { var snapshot = new CreateSnapshot(message); snapshot.relationId = relationId; return snapshot; } public static CreateSnapshot fromRelatedRelation(String message, String relatedRelationId) { var snapshot = new CreateSnapshot(message); snapshot.relatedRelationId = relatedRelationId; return snapshot; } }
0
java-sources/ai/latta/core/1.0/ai/latta/core/models
java-sources/ai/latta/core/1.0/ai/latta/core/models/api/Instance.java
package ai.latta.core.models.api; import com.fasterxml.jackson.annotation.JsonProperty; public class Instance { @JsonProperty public String id; }
0
java-sources/ai/latta/core/1.0/ai/latta/core/models
java-sources/ai/latta/core/1.0/ai/latta/core/models/api/Snapshot.java
package ai.latta.core.models.api; import com.fasterxml.jackson.annotation.JsonProperty; public class Snapshot { @JsonProperty public String id; }
0
java-sources/ai/latta/core/1.0/ai/latta/core/models
java-sources/ai/latta/core/1.0/ai/latta/core/models/exceptions/BaseException.java
package ai.latta.core.models.exceptions; import ai.latta.core.models.SystemInfo; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Date; import java.util.Map; public abstract class BaseException { protected BaseException(String type) { this.type = type; } public enum Level { ERROR, FATAL, WARN } public Date timestamp; public Level level; public String name; public String message; public String stack; @JsonProperty("environment_variables") public Map<String, Object> environmentVariables; @JsonProperty("system_info") public SystemInfo systemInfo; public final String type; }
0
java-sources/ai/latta/core/1.0/ai/latta/core/models
java-sources/ai/latta/core/1.0/ai/latta/core/models/exceptions/RequestException.java
package ai.latta.core.models.exceptions; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.LocalDateTime; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; public class RequestException extends BaseException { public enum HttpMethod { GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS } public static class LogEntries { public List<LogEntry> entries; } public static class Request { public HttpMethod method; public String url; public String route; public HashMap<String, String> params; public HashMap<String, String> query; public Map<String, String> headers; public Object body; } public static class Response { @JsonProperty("status_code") public int statusCode; public Map<String, String> headers; public Object body; } public static class LogEntry { public Date timestamp; public String level; public String message; } public Request request; public Response response; public LogEntries logs; public RequestException() { super("request"); } }
0
java-sources/ai/latta/core/1.0/ai/latta/core/models
java-sources/ai/latta/core/1.0/ai/latta/core/models/exceptions/SystemException.java
package ai.latta.core.models.exceptions; public class SystemException extends BaseException { public SystemException() { super("system"); } }
0
java-sources/ai/latta/core/1.0/ai/latta/core
java-sources/ai/latta/core/1.0/ai/latta/core/utilities/LogCapture.java
package ai.latta.core.utilities; import ai.latta.core.models.exceptions.RequestException; import java.util.*; public class LogCapture { private List<RequestException.LogEntry> entries = new ArrayList<>(); private List<LogCaptureEntry> captureEntries = new ArrayList<>(); private StreamCapture stdoutCapture; private StreamCapture stdErrCapture; public LogCapture() { stdoutCapture = new StreamCapture(System.out, this::onStdout); stdErrCapture = new StreamCapture(System.err, this::onStderr); } private void onStdout(String message) { var entry = new RequestException.LogEntry(); entry.level = "INFO"; entry.message = message; entry.timestamp = new Date(); entries.add(entry); } private void onStderr(String message) { var entry = new RequestException.LogEntry(); entry.level = "ERROR"; entry.message = message; entry.timestamp = new Date(); entries.add(entry); } public List<RequestException.LogEntry> getEntriesBetween(Date start, Date end) { List<RequestException.LogEntry> logs = new ArrayList<>(); for(var capturedLog : entries) { if(capturedLog.timestamp.after(end)) break; if(capturedLog.timestamp.before(start)) continue; logs.add(capturedLog); } return logs; } private void eraseUnusedLogs() { LogCaptureEntry oldestEntry = captureEntries.stream() .min(Comparator.comparing(o -> o.createdAt)) .orElse(null); if(oldestEntry == null) {return;} this.entries = List.of(this.entries.stream() .filter(x -> x.timestamp.after(oldestEntry.createdAt)) .toArray(RequestException.LogEntry[]::new)); } public LogCaptureEntry addCaptureEntry() { var entry = new LogCaptureEntry(); entry.id = UUID.randomUUID().toString(); entry.createdAt = new Date(); return entry; } public void removeCaptureEntry(LogCaptureEntry entry) { this.captureEntries.remove(entry); eraseUnusedLogs(); } public static class LogCaptureEntry { public String id; public Date createdAt; } public void close() { System.setOut(stdoutCapture.getSource()); stdoutCapture.close(); System.setErr(stdErrCapture.getSource()); stdErrCapture.close(); } }
0
java-sources/ai/latta/core/1.0/ai/latta/core
java-sources/ai/latta/core/1.0/ai/latta/core/utilities/StreamCapture.java
package ai.latta.core.utilities; import ai.latta.core.interfaces.StreamListener; import java.io.PrintStream; import java.util.Date; class LogEntry { Date timestamp; String level; String message; } public class StreamCapture { private final PrintStream source; private final StreamCaptureHandler outputStream; public StreamCapture(PrintStream source, StreamListener listener) { this.source = source; outputStream = new StreamCaptureHandler(source); outputStream.setListener(listener); } PrintStream getSource() { return source; } PrintStream getInterceptedStream() { return outputStream; } public void close() { outputStream.close(); } }
0
java-sources/ai/latta/core/1.0/ai/latta/core
java-sources/ai/latta/core/1.0/ai/latta/core/utilities/StreamCaptureHandler.java
package ai.latta.core.utilities; import ai.latta.core.interfaces.StreamListener; import java.io.ByteArrayOutputStream; import java.io.PrintStream; public class StreamCaptureHandler extends PrintStream { private final PrintStream originalStream; private final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); private StreamListener listener; public StreamCaptureHandler(PrintStream originalStream) { super(new ByteArrayOutputStream()); this.originalStream = originalStream; } public void setListener(StreamListener listener) { this.listener = listener; } @Override public void write(byte[] buf, int off, int len) { super.write(buf, off, len); notifyListener(new String(buf, off, len)); originalStream.write(buf, off, len); } @Override public void write(int b) { super.write(b); notifyListener(String.valueOf((char) b)); originalStream.write(b); } private void notifyListener(String log) { if (listener != null) { listener.onLogCaptured(log); } } public void close() { System.setOut(originalStream); super.close(); } public void startCapture() { System.setOut(this); } }
0
java-sources/ai/latta/latta-java-recorder/1.0/ai/latta
java-sources/ai/latta/latta-java-recorder/1.0/ai/latta/recorder/LattaAPI.java
package ai.latta.recorder; import com.fasterxml.jackson.databind.ObjectMapper; import okhttp3.*; import java.io.IOException; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.UUID; import okhttp3.MediaType; import okhttp3.Request; import okhttp3.Response; public class LattaAPI { private final String apiKey; private static final String NEW_INSTANCE_URL = "https://recording.latta.ai/v1/instance/backend"; private static final String NEW_SNAPSHOT_URL = "https://recording.latta.ai/v1/snapshot/"; private final OkHttpClient client = new OkHttpClient(); private final ObjectMapper objectMapper = new ObjectMapper(); public LattaAPI(String apiKey) { this.apiKey = apiKey; } public LattaInstance putInstance(String os, String osVersion, String lang, String device, String framework, String frameworkVersion) throws IOException { Map<String, String> instanceData = new HashMap<>(); instanceData.put("os", os); instanceData.put("os_version", osVersion); instanceData.put("lang", lang); instanceData.put("device", device); instanceData.put("framework", framework); instanceData.put("framework_version", frameworkVersion); String requestBody = objectMapper.writeValueAsString(instanceData); Request request = new Request.Builder() .url(NEW_INSTANCE_URL) .addHeader("Authorization", "Bearer " + apiKey) .put(RequestBody.create(MediaType.parse("application/json"), requestBody)) .build(); try (Response response = client.newCall(request).execute()) { String responseString = response.body().string(); return objectMapper.readValue(responseString, LattaInstance.class); } } public void putSnapshot(LattaInstance instance, String message, String relationId, String relatedToRelationId) throws IOException { Map<String, String> snapshotData = new HashMap<>(); snapshotData.put("message", message); snapshotData.put("relation_id", relationId != null ? relationId : UUID.randomUUID().toString()); snapshotData.put("related_to_relation_id", relatedToRelationId); String requestBody = objectMapper.writeValueAsString(snapshotData); Request request = new Request.Builder() .url(NEW_SNAPSHOT_URL + instance.getId()) .addHeader("Authorization", "Bearer " + apiKey) .put(RequestBody.create(MediaType.parse("application/json"), requestBody)) .build(); try (Response response = client.newCall(request).execute()) { response.body().string(); // Read and close the response body } } }
0
java-sources/ai/latta/latta-java-recorder/1.0/ai/latta
java-sources/ai/latta/latta-java-recorder/1.0/ai/latta/recorder/LattaInstance.java
package ai.latta.recorder; class LattaInstance { private String id; public String getId() { return id; } public void setId(String id) { this.id = id; } }
0
java-sources/ai/latta/latta-java-recorder/1.0/ai/latta
java-sources/ai/latta/latta-java-recorder/1.0/ai/latta/recorder/LattaRecorder.java
package ai.latta.recorder; import java.io.IOException; import java.util.Locale; import java.util.UUID; import ai.latta.recorder.LattaAPI; import ai.latta.recorder.LattaInstance; public class LattaRecorder { public static void recordApplication(String apiKey, Runnable mainMethod) { LattaAPI api = new LattaAPI(apiKey); try { mainMethod.run(); } catch (Exception ex) { try { LattaInstance lattaInstance = api.putInstance( System.getProperty("os.name"), System.getProperty("os.version"), Locale.getDefault().getLanguage(), "desktop", "Java", System.getProperty("java.version") ); if (lattaInstance != null) { api.putSnapshot(lattaInstance, ex.getMessage() + "\n" + getStackTraceAsString(ex), null, null); } } catch (IOException e) { e.printStackTrace(); } } } private static String getStackTraceAsString(Exception ex) { StringBuilder sb = new StringBuilder(); for (StackTraceElement element : ex.getStackTrace()) { sb.append(element.toString()); sb.append("\n"); } return sb.toString(); } }
0
java-sources/ai/latta/spring/1.0/ai/latta/spring
java-sources/ai/latta/spring/1.0/ai/latta/spring/filters/LattaResponseFilter.java
package ai.latta.spring.filters; import ai.latta.spring.wrappers.CapturingResponseWrapper; import jakarta.servlet.*; import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; public class LattaResponseFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { CapturingResponseWrapper responseWrapper = new CapturingResponseWrapper((HttpServletResponse) servletResponse); filterChain.doFilter(servletRequest, responseWrapper); } }
0
java-sources/ai/latta/spring/1.0/ai/latta/spring
java-sources/ai/latta/spring/1.0/ai/latta/spring/interceptors/LattaInterceptor.java
package ai.latta.spring.interceptors; import ai.latta.core.LattaClient; import ai.latta.core.models.SystemInfo; import ai.latta.core.models.api.CreateInstance; import ai.latta.core.models.api.CreateSnapshot; import ai.latta.core.models.api.Instance; import ai.latta.core.models.exceptions.*; import ai.latta.core.utilities.LogCapture; import ai.latta.spring.utilities.ScriptResponseModify; import ai.latta.spring.wrappers.RequestContextHolder; import ai.latta.spring.wrappers.CapturingResponseWrapper; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.springframework.web.util.ContentCachingRequestWrapper; import java.io.PrintWriter; import java.io.StringWriter; import java.io.UnsupportedEncodingException; import java.util.*; @Component public class LattaInterceptor implements HandlerInterceptor { private final LattaClient client; private LogCapture logCapture = new LogCapture(); private volatile Instance instance = null; private Map<String, LogCapture.LogCaptureEntry> captureEntries = new HashMap<>(); private final static List<String> AllowedResponseParseBodyTypes = Arrays.asList("text/plain", "text/html", "application/json"); public LattaInterceptor(String apiKey) { client = new LattaClient(apiKey); client.createInstance(new CreateInstance("spring", "TODO")).thenAccept(e -> { this.instance = e; }); } @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { var logCaptureEntry = this.logCapture.addCaptureEntry(); captureEntries.put(request.getRequestId(), logCaptureEntry); ContentCachingRequestWrapper wrappedRequest = new ContentCachingRequestWrapper(request); RequestContextHolder.setRequest(wrappedRequest); RequestContextHolder.setLogCaptureEntry(logCaptureEntry); return HandlerInterceptor.super.preHandle(request, response, handler); } private RequestException.Request constructRequestFromServletRequest() { ContentCachingRequestWrapper exRequest = RequestContextHolder.getRequest(); var request = new RequestException.Request(); var headers = new HashMap<String, String>(); Enumeration<String> headerNames = exRequest.getHeaderNames(); if (headerNames != null) { while (headerNames.hasMoreElements()) { var headerName = headerNames.nextElement(); headers.put(headerName, exRequest.getHeader(headerName)); } } request.headers = headers; request.method = RequestException.HttpMethod.valueOf(exRequest.getMethod()); request.url = exRequest.getRequestURL().toString(); var query = new HashMap<String, String>(); Enumeration<String> paramNames = exRequest.getParameterNames(); while (paramNames.hasMoreElements()) { var paramName = paramNames.nextElement(); query.put(paramName, exRequest.getParameter(paramName)); } request.query = query; try { byte[] content = exRequest.getContentAsByteArray(); request.body = new String(content, exRequest.getCharacterEncoding()); } catch(UnsupportedEncodingException e) {} request.params = new HashMap<>(); request.route = exRequest.getRequestURI(); RequestContextHolder.clear(); return request; } private RequestException.Response constructRequestFromServletResponse(HttpServletResponse exResponse) { RequestException.Response response = new RequestException.Response(); response.statusCode = exResponse.getStatus(); if (exResponse instanceof CapturingResponseWrapper) { CapturingResponseWrapper wrappedResponse = (CapturingResponseWrapper) exResponse; response.headers = wrappedResponse.getCapturedHeaders(); response.body = new String(wrappedResponse.getCapturedResponseBody()); } return response; } @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { HandlerInterceptor.super.afterCompletion(request, response, handler, ex); if (response instanceof CapturingResponseWrapper) { CapturingResponseWrapper wrappedResponse = (CapturingResponseWrapper) response; var modify = new ScriptResponseModify(client.getApiKey()); modify.rewriteResponse(response, wrappedResponse); } if(ex == null || instance == null) { RequestContextHolder.clear(); HandlerInterceptor.super.afterCompletion(request, response, handler, null); return; } var logCaptureEntry = RequestContextHolder.getLogCaptureEntry(); var logEntries = logCapture.getEntriesBetween(logCaptureEntry.createdAt, new Date()); RequestException requestException = new RequestException(); requestException.request = constructRequestFromServletRequest(); requestException.response = constructRequestFromServletResponse(response); requestException.environmentVariables =new HashMap<>(System.getenv()); requestException.level = BaseException.Level.ERROR; requestException.name = ex.getClass().getSimpleName(); StringWriter sw = new StringWriter(); ex.printStackTrace(new PrintWriter(sw)); String exceptionAsString = sw.toString(); requestException.stack = exceptionAsString; requestException.systemInfo =new SystemInfo(); requestException.message = ex.getMessage(); requestException.timestamp = new Date(); requestException.logs = new RequestException.LogEntries(); requestException.logs.entries = logEntries; var relationHeader = requestException.request.headers.get("Latta-Relation-Id"); var createSnapshotData = relationHeader != null ? CreateSnapshot.fromRelatedRelation("Message", relationHeader) : CreateSnapshot.fromRelation("Message"); client.createSnapshot(instance, createSnapshotData).thenAccept(snapshot -> { client.attachRecord(snapshot, requestException); }); logCapture.removeCaptureEntry(logCaptureEntry); } }
0
java-sources/ai/latta/spring/1.0/ai/latta/spring
java-sources/ai/latta/spring/1.0/ai/latta/spring/utilities/ScriptResponseModify.java
package ai.latta.spring.utilities; import ai.latta.spring.wrappers.CapturingResponseWrapper; import jakarta.annotation.Nullable; import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; public class ScriptResponseModify { private static final String LATTA_SCRIPT = """ <script src="https://latta.ai/scripts/browser/latest.js"></script> <script> Latta.init({ apiKey: "$API_KEY" }); </script>"""; private final String apiKey; public ScriptResponseModify(String apiKey) { this.apiKey = apiKey; } /** * Rewrite response if possible. Content-Type must be HTML * @param response Response * @param responseWrapper Capture wrapper * @throws IOException */ public void rewriteResponse(HttpServletResponse response, CapturingResponseWrapper responseWrapper) throws IOException { var contentType = response.getContentType(); if(contentType == null) return; if(!contentType.contains("text/html")) return; byte[] content = responseWrapper.getCapturedResponseBody(); String modifiedContent = new String(content); var scriptContent = LATTA_SCRIPT.replace("$API_KEY", this.apiKey); // Append head if missing if(!modifiedContent.contains("</head>")) { scriptContent = "<head>" + scriptContent + "</head>"; } var headInjectResult = tryToInjectTo("</head>", modifiedContent, scriptContent); if(headInjectResult != null) { modifiedContent = headInjectResult; }else { var htmlInjectResult = tryToInjectTo("</html>", modifiedContent, scriptContent); if(htmlInjectResult != null) { modifiedContent = htmlInjectResult; } } // Write modified content back to the actual response response.setContentLength(modifiedContent.length()); response.getOutputStream().write(modifiedContent.getBytes()); response.getOutputStream().flush(); } private static @Nullable String tryToInjectTo(String tagToInjectBefore, String content, String injectContent) { if(!content.contains(tagToInjectBefore)) return null; var endIndex = content.indexOf(tagToInjectBefore); if(endIndex == -1) return null; return content.substring(0, endIndex) + injectContent + content.substring(endIndex); } }
0
java-sources/ai/latta/spring/1.0/ai/latta/spring
java-sources/ai/latta/spring/1.0/ai/latta/spring/wrappers/CapturingResponseWrapper.java
package ai.latta.spring.wrappers; import jakarta.servlet.ServletOutputStream; import jakarta.servlet.WriteListener; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponseWrapper; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; public class CapturingResponseWrapper extends HttpServletResponseWrapper { private final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); private ServletOutputStream outputStream; private PrintWriter writer; private final Map<String, String> headers = new HashMap<>(); public CapturingResponseWrapper(HttpServletResponse response) { super(response); } @Override public void addHeader(String name, String value) { headers.put(name, value); super.addHeader(name, value); } @Override public void setHeader(String name, String value) { headers.put(name, value); super.setHeader(name, value); } public Map<String, String> getCapturedHeaders() { return headers; } @Override public PrintWriter getWriter() { if (writer == null) { writer = new PrintWriter(byteArrayOutputStream); } return writer; } @Override public ServletOutputStream getOutputStream() throws IOException { var parentStream = super.getOutputStream(); if (outputStream == null) { outputStream = new ServletOutputStream() { @Override public boolean isReady() { return parentStream.isReady(); } @Override public void setWriteListener(WriteListener writeListener) { parentStream.setWriteListener(writeListener); } @Override public void write(int b) throws IOException { byteArrayOutputStream.write(b); parentStream.write(b); } }; } return outputStream; } public byte[] getCapturedResponseBody() { try { if (writer != null) { writer.flush(); } if (outputStream != null) { outputStream.flush(); } } catch (IOException e) { // Handle exceptions if needed } return byteArrayOutputStream.toByteArray(); } }
0
java-sources/ai/latta/spring/1.0/ai/latta/spring
java-sources/ai/latta/spring/1.0/ai/latta/spring/wrappers/RequestContextHolder.java
package ai.latta.spring.wrappers; import ai.latta.core.utilities.LogCapture; import org.springframework.web.util.ContentCachingRequestWrapper; public class RequestContextHolder { private static final ThreadLocal<ContentCachingRequestWrapper> requestHolder = new ThreadLocal<>(); private static final ThreadLocal<LogCapture.LogCaptureEntry> logCaptureEntry = new ThreadLocal<>(); public static void setRequest(ContentCachingRequestWrapper request) { requestHolder.set(request); } public static ContentCachingRequestWrapper getRequest() { return requestHolder.get(); } public static void clear() { requestHolder.remove(); logCaptureEntry.remove(); } public static void setLogCaptureEntry(LogCapture.LogCaptureEntry newLogCaptureEntry) { logCaptureEntry.set(newLogCaptureEntry); } public static LogCapture.LogCaptureEntry getLogCaptureEntry() { return logCaptureEntry.get(); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/DefaultHASCOPlanningReduction.java
package ai.libs.hasco.core; import java.util.HashMap; import java.util.Map; import org.api4.java.datastructure.graph.ILabeledPath; import ai.libs.jaicore.logging.ToJSONStringUtil; import ai.libs.jaicore.planning.core.interfaces.IPlan; import ai.libs.jaicore.planning.hierarchical.problems.ceocipstn.CEOCIPSTNPlanningProblem; import ai.libs.jaicore.planning.hierarchical.problems.htn.IHierarchicalPlanningToGraphSearchReduction; import ai.libs.jaicore.search.probleminputs.GraphSearchInput; /** * This class only serves to facilitate the usage of HASCO when passing a IPlanningGraphGeneratorDeriver. * HASCO requires a IHASCOPlanningGraphGeneratorDeriver, which only takes away some of the generics of IPlanningGraphGeneratorDeriver, * but this implies that you cannot just use arbitrary IPlanningGraphGeneratorDeriver objects anymore. * To circumvent this problem, this class implements the IHASCOPlanningGraphGeneratorDeriver and wraps any IPlanningGraphGeneratorDeriver. * * @author fmohr * * @param <N> * @param <A> */ public class DefaultHASCOPlanningReduction<N, A> implements IHASCOPlanningReduction<N, A> { private final IHierarchicalPlanningToGraphSearchReduction<N, A, ? super CEOCIPSTNPlanningProblem, ? extends IPlan, ? extends GraphSearchInput<N,A>, ? super ILabeledPath<N, A>> wrappedDeriver; public DefaultHASCOPlanningReduction(final IHierarchicalPlanningToGraphSearchReduction<N, A, ? super CEOCIPSTNPlanningProblem, ? extends IPlan, ? extends GraphSearchInput<N,A>, ? super ILabeledPath<N, A>> wrappedDeriver) { super(); this.wrappedDeriver = wrappedDeriver; } @Override public GraphSearchInput<N, A> encodeProblem(final CEOCIPSTNPlanningProblem problem) { return this.wrappedDeriver.encodeProblem(problem); } @Override public IPlan decodeSolution(final ILabeledPath<N, A> path) { return this.wrappedDeriver.decodeSolution(path); } @Override public String toString() { Map<String, Object> fields = new HashMap<>(); fields.put("wrappedDeriver", this.wrappedDeriver); return ToJSONStringUtil.toJSONString(this.getClass().getSimpleName(), fields); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/HASCO.java
package ai.libs.hasco.core; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import org.aeonbits.owner.ConfigFactory; import org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearch; import org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearchFactory; import org.api4.java.algorithm.events.IAlgorithmEvent; import org.api4.java.algorithm.exceptions.AlgorithmException; import org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException; import org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException; import org.api4.java.common.attributedobjects.ObjectEvaluationFailedException; import org.api4.java.common.control.ILoggingCustomizable; import org.api4.java.datastructure.graph.implicit.IGraphGenerator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.eventbus.Subscribe; import ai.libs.hasco.events.HASCOSolutionEvent; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.model.ComponentUtil; import ai.libs.hasco.model.Parameter; import ai.libs.hasco.model.ParameterRefinementConfiguration; import ai.libs.hasco.model.UnparametrizedComponentInstance; import ai.libs.hasco.optimizingfactory.SoftwareConfigurationAlgorithm; import ai.libs.hasco.reduction.HASCOReduction; import ai.libs.jaicore.basic.algorithm.AlgorithmFinishedEvent; import ai.libs.jaicore.basic.algorithm.AlgorithmInitializedEvent; import ai.libs.jaicore.basic.algorithm.reduction.AlgorithmicProblemReduction; import ai.libs.jaicore.logging.ToJSONStringUtil; import ai.libs.jaicore.planning.core.EvaluatedSearchGraphBasedPlan; import ai.libs.jaicore.planning.core.interfaces.IEvaluatedGraphSearchBasedPlan; import ai.libs.jaicore.planning.core.interfaces.IPlan; import ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode; import ai.libs.jaicore.planning.hierarchical.problems.ceocipstn.CEOCIPSTNPlanningProblem; import ai.libs.jaicore.planning.hierarchical.problems.htn.CostSensitiveHTNPlanningProblem; import ai.libs.jaicore.planning.hierarchical.problems.htn.CostSensitivePlanningToSearchProblemReduction; import ai.libs.jaicore.search.algorithms.standard.bestfirst.events.EvaluatedSearchSolutionCandidateFoundEvent; import ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath; import ai.libs.jaicore.search.probleminputs.GraphSearchWithPathEvaluationsInput; /** * Hierarchically create an object of type T * * @author fmohr, wever * * @param <S> * @param <N> * @param <A> * @param <V> */ public class HASCO<S extends GraphSearchWithPathEvaluationsInput<N, A, V>, N, A, V extends Comparable<V>> extends SoftwareConfigurationAlgorithm<RefinementConfiguredSoftwareConfigurationProblem<V>, HASCOSolutionCandidate<V>, V> { private Logger logger = LoggerFactory.getLogger(HASCO.class); private String loggerName; /* problem and algorithm setup */ private final IHASCOPlanningReduction<N, A> planningGraphGeneratorDeriver; private final AlgorithmicProblemReduction<? super GraphSearchWithPathEvaluationsInput<N, A, V>, ? super EvaluatedSearchGraphPath<N, A, V>, S, EvaluatedSearchGraphPath<N, A, V>> searchProblemTransformer; private final IOptimalPathInORGraphSearchFactory<S, EvaluatedSearchGraphPath<N, A, V>, N, A, V, ?> searchFactory; /* working constants of the algorithms */ private final CostSensitiveHTNPlanningProblem<CEOCIPSTNPlanningProblem, V> planningProblem; private final S searchProblem; private final IOptimalPathInORGraphSearch<S, EvaluatedSearchGraphPath<N, A, V>, N, A, V> search; private final List<HASCOSolutionCandidate<V>> listOfAllRecognizedSolutions = new ArrayList<>(); private int numUnparametrizedSolutions = -1; private final Set<UnparametrizedComponentInstance> returnedUnparametrizedComponentInstances = new HashSet<>(); private Map<EvaluatedSearchSolutionCandidateFoundEvent<N, A, V>, HASCOSolutionEvent<V>> hascoSolutionEventCache = new ConcurrentHashMap<>(); private boolean createComponentInstancesFromNodesInsteadOfPlans = false; /* runtime variables of algorithm */ private final TimeRecordingEvaluationWrapper<V> timeGrabbingEvaluationWrapper; public HASCO(final RefinementConfiguredSoftwareConfigurationProblem<V> configurationProblem, final IHASCOPlanningReduction<N, A> planningGraphGeneratorDeriver, final IOptimalPathInORGraphSearchFactory<S, EvaluatedSearchGraphPath<N, A, V>, N, A, V, ?> searchFactory, final AlgorithmicProblemReduction<? super GraphSearchWithPathEvaluationsInput<N, A, V>, ? super EvaluatedSearchGraphPath<N, A, V>, S, EvaluatedSearchGraphPath<N, A, V>> searchProblemTransformer) { this(ConfigFactory.create(HASCOConfig.class), configurationProblem, planningGraphGeneratorDeriver, searchFactory, searchProblemTransformer); } public HASCO(final HASCOConfig algorithmConfig, final RefinementConfiguredSoftwareConfigurationProblem<V> configurationProblem, final IHASCOPlanningReduction<N, A> planningGraphGeneratorDeriver, final IOptimalPathInORGraphSearchFactory<S, EvaluatedSearchGraphPath<N, A, V>, N, A, V, ?> searchFactory, final AlgorithmicProblemReduction<? super GraphSearchWithPathEvaluationsInput<N, A, V>, ? super EvaluatedSearchGraphPath<N, A, V>, S, EvaluatedSearchGraphPath<N, A, V>> searchProblemTransformer) { super(algorithmConfig, configurationProblem); if (configurationProblem == null) { throw new IllegalArgumentException("Cannot work with configuration problem NULL"); } if (configurationProblem.getRequiredInterface() == null || configurationProblem.getRequiredInterface().isEmpty()) { throw new IllegalArgumentException("Not required interface defined in the input"); } this.planningGraphGeneratorDeriver = planningGraphGeneratorDeriver; this.searchFactory = searchFactory; this.searchProblemTransformer = searchProblemTransformer; this.timeGrabbingEvaluationWrapper = new TimeRecordingEvaluationWrapper<>(configurationProblem.getCompositionEvaluator()); /* check whether there is a refinement config for each numeric parameter */ Map<Component, Map<Parameter, ParameterRefinementConfiguration>> paramRefinementConfig = this.getInput().getParamRefinementConfig(); for (Component c : this.getInput().getComponents()) { for (Parameter p : c.getParameters()) { if (p.isNumeric() && (!paramRefinementConfig.containsKey(c) || !paramRefinementConfig.get(c).containsKey(p))) { throw new IllegalArgumentException("No refinement config was delivered for numeric parameter " + p.getName() + " of component " + c.getName()); } } } /* check whether there is a component that satisfies the query */ final String requiredInterface = configurationProblem.getRequiredInterface(); Collection<Component> rootComponents = configurationProblem.getComponents().stream().filter(c -> c.getProvidedInterfaces().contains(requiredInterface)).collect(Collectors.toList()); if (rootComponents.isEmpty()) { throw new IllegalArgumentException("There is no component that provides the required interface \"" + requiredInterface + "\""); } this.logger.info("Identified {} components that can be used to resolve the query.", rootComponents.size()); /* derive planning problem and search problem */ this.logger.debug("Deriving search problem"); RefinementConfiguredSoftwareConfigurationProblem<V> refConfigSoftwareConfigurationProblem = new RefinementConfiguredSoftwareConfigurationProblem<>( new SoftwareConfigurationProblem<V>(this.getInput().getComponents(), this.getInput().getRequiredInterface(), this.timeGrabbingEvaluationWrapper), this.getInput().getParamRefinementConfig()); HASCOReduction<V> hascoReduction = new HASCOReduction<>(this::getBestSeenSolution); this.planningProblem = hascoReduction.encodeProblem(refConfigSoftwareConfigurationProblem); if (this.logger.isDebugEnabled()) { String operations = this.planningProblem.getCorePlanningProblem().getDomain().getOperations().stream() .map(o -> "\n\t\t" + o.getName() + "(" + o.getParams() + ")\n\t\t\tPre: " + o.getPrecondition() + "\n\t\t\tAdd List: " + o.getAddLists() + "\n\t\t\tDelete List: " + o.getDeleteLists()).collect(Collectors.joining()); String methods = this.planningProblem.getCorePlanningProblem().getDomain().getMethods().stream().map(m -> "\n\t\t" + m.getName() + "(" + m.getParameters() + ") for task " + m.getTask() + "\n\t\t\tPre: " + m.getPrecondition() + "\n\t\t\tPre Eval: " + m.getEvaluablePrecondition() + "\n\t\t\tNetwork: " + m.getNetwork().getLineBasedStringRepresentation()).collect(Collectors.joining()); this.logger.debug("Derived the following HTN planning problem:\n\tOperations:{}\n\tMethods:{}", operations, methods); } this.searchProblem = new CostSensitivePlanningToSearchProblemReduction<N, A, V, CEOCIPSTNPlanningProblem, S, EvaluatedSearchGraphPath<N, A, V>>(this.planningGraphGeneratorDeriver, searchProblemTransformer).encodeProblem(this.planningProblem); /* create search object */ this.logger.debug("Creating and initializing the search object"); this.search = this.searchFactory.getAlgorithm(this.searchProblem); } @Override public IAlgorithmEvent nextWithException() throws InterruptedException, AlgorithmExecutionCanceledException, AlgorithmTimeoutedException, AlgorithmException { /* check on termination */ this.logger.trace("Conducting next step in {}.", this.getId()); this.checkAndConductTermination(); this.logger.trace("No stop criteria have caused HASCO to stop up to now. Proceeding ..."); /* act depending on state */ switch (this.getState()) { case CREATED: this.logger.info("Starting HASCO run."); AlgorithmInitializedEvent event = this.activate(); /* analyze problem */ this.numUnparametrizedSolutions = ComponentUtil.getNumberOfUnparametrizedCompositions(this.getInput().getComponents(), this.getInput().getRequiredInterface()); this.logger.info("Search space contains {} unparametrized solutions.", this.numUnparametrizedSolutions); /* setup search algorithm */ this.search.setNumCPUs(this.getNumCPUs()); this.search.setTimeout(this.getTimeout()); if (this.loggerName != null && this.loggerName.length() > 0 && this.search instanceof ILoggingCustomizable) { this.logger.info("Setting logger name of {} to {}.search", this.search.getId(), this.loggerName); ((ILoggingCustomizable) this.search).setLoggerName(this.loggerName + ".search"); } else { this.logger.info("Not setting the logger name of the search. Logger name of HASCO is {}. Search loggingCustomizable: {}", this.loggerName, (this.search instanceof ILoggingCustomizable)); } /* register a listener on the search that will forward all events to HASCO's event bus */ this.search.registerListener(new Object() { @Subscribe public void receiveSearchEvent(final IAlgorithmEvent event) { if (!(event instanceof AlgorithmInitializedEvent || event instanceof AlgorithmFinishedEvent)) { HASCO.this.post(event); } } @Subscribe public void receiveSolutionCandidateFoundEvent(final EvaluatedSearchSolutionCandidateFoundEvent<N, A, V> solutionEvent) throws InterruptedException, AlgorithmException { EvaluatedSearchGraphPath<N, A, V> searchPath = solutionEvent.getSolutionCandidate(); IPlan plan = HASCO.this.planningGraphGeneratorDeriver.decodeSolution(searchPath); ComponentInstance objectInstance; if (HASCO.this.createComponentInstancesFromNodesInsteadOfPlans) { objectInstance = Util.getSolutionCompositionFromState(HASCO.this.getInput().getComponents(), ((TFDNode) searchPath.getNodes().get(searchPath.getNodes().size() - 1)).getState(), true); } else { objectInstance = Util.getSolutionCompositionForPlan(HASCO.this.getInput().getComponents(), HASCO.this.planningProblem.getCorePlanningProblem().getInit(), plan, true); } HASCO.this.returnedUnparametrizedComponentInstances.add(new UnparametrizedComponentInstance(objectInstance)); V score; try { boolean scoreInCache = HASCO.this.timeGrabbingEvaluationWrapper.hasEvaluationForComponentInstance(objectInstance); if (scoreInCache) { score = solutionEvent.getSolutionCandidate().getScore(); } else { score = HASCO.this.timeGrabbingEvaluationWrapper.evaluate(objectInstance); } } catch (ObjectEvaluationFailedException e) { throw new AlgorithmException("Could not evaluate component instance", e); } HASCO.this.logger.info("Received new solution with score {} from search, communicating this solution to the HASCO listeners. Number of returned unparametrized solutions is now {}/{}.", score, HASCO.this.returnedUnparametrizedComponentInstances.size(), HASCO.this.numUnparametrizedSolutions); IEvaluatedGraphSearchBasedPlan<N, A, V> evaluatedPlan = new EvaluatedSearchGraphBasedPlan<>(plan, score, searchPath); HASCOSolutionCandidate<V> solution = new HASCOSolutionCandidate<>(objectInstance, evaluatedPlan, HASCO.this.timeGrabbingEvaluationWrapper.getEvaluationTimeForComponentInstance(objectInstance)); HASCO.this.updateBestSeenSolution(solution); HASCO.this.listOfAllRecognizedSolutions.add(solution); HASCOSolutionEvent<V> hascoSolutionEvent = new HASCOSolutionEvent<>(HASCO.this, solution); HASCO.this.hascoSolutionEventCache.put(solutionEvent, hascoSolutionEvent); HASCO.this.post(hascoSolutionEvent); } }); /* now initialize the search */ this.logger.debug("Initializing the search"); try { IAlgorithmEvent searchInitializationEvent = this.search.nextWithException(); assert searchInitializationEvent instanceof AlgorithmInitializedEvent : "The first event emitted by the search was not the initialization event but " + searchInitializationEvent + "!"; this.logger.debug("Search has been initialized."); this.logger.info("HASCO initialization completed."); return event; } catch (AlgorithmException e) { throw new AlgorithmException("HASCO initialization failed.\nOne possible reason is that the graph has no solution.", e); } case ACTIVE: /* step search */ this.logger.debug("Stepping search algorithm."); IAlgorithmEvent searchEvent = this.search.nextWithException(); this.logger.debug("Search step completed, observed {}.", searchEvent.getClass().getName()); if (searchEvent instanceof AlgorithmFinishedEvent) { this.logger.info("The search algorithm has finished. Terminating HASCO."); return this.terminate(); } /* otherwise, if a solution has been found, we announce this finding to our listeners and memorize if it is a new best candidate */ else if (searchEvent instanceof EvaluatedSearchSolutionCandidateFoundEvent) { HASCOSolutionEvent<V> hascoSolutionEvent = this.hascoSolutionEventCache.remove(searchEvent); assert (hascoSolutionEvent != null) : "Hasco solution event has not been seen yet or cannot be retrieved from cache. " + this.hascoSolutionEventCache; this.logger.info("Received new solution with score {} from search, communicating this solution to the HASCO listeners. Number of returned unparametrized solutions is now {}/{}.", hascoSolutionEvent.getScore(), this.returnedUnparametrizedComponentInstances.size(), this.numUnparametrizedSolutions); return hascoSolutionEvent; } else { this.logger.debug("Ignoring irrelevant search event {}", searchEvent); return searchEvent; } default: throw new IllegalStateException("HASCO cannot do anything in state " + this.getState()); } } public IGraphGenerator<N, A> getGraphGenerator() { return this.searchProblem.getGraphGenerator(); } public CostSensitiveHTNPlanningProblem<CEOCIPSTNPlanningProblem, V> getPlanningProblem() { return this.planningProblem; } @Override public void cancel() { if (this.isCanceled()) { this.logger.debug("Ignoring cancel, because cancel has been triggered in the past already."); return; } this.logger.info("Received cancel, first processing the cancel locally, then forwarding to search."); super.cancel(); if (this.search != null) { this.logger.info("Trigger cancel on search. Thread interruption flag is {}", Thread.currentThread().isInterrupted()); this.search.cancel(); } this.logger.info("Finished, now terminating. Thread interruption flag is {}", Thread.currentThread().isInterrupted()); this.terminate(); this.logger.info("Cancel completed. Thread interruption flag is {}", Thread.currentThread().isInterrupted()); } public IHASCOPlanningReduction<N, A> getPlanningGraphGeneratorDeriver() { return this.planningGraphGeneratorDeriver; } public AlgorithmicProblemReduction<? super GraphSearchWithPathEvaluationsInput<N, A, V>, ? super EvaluatedSearchGraphPath<N, A, V>, S, EvaluatedSearchGraphPath<N, A, V>> getSearchProblemTransformer() { return this.searchProblemTransformer; } public HASCORunReport<V> getReport() { return new HASCORunReport<>(this.listOfAllRecognizedSolutions); } @Override protected void shutdown() { if (this.isShutdownInitialized()) { this.logger.debug("Shutdown has already been initialized, ignoring new shutdown request."); return; } this.logger.info("Entering HASCO shutdown routine."); super.shutdown(); this.logger.debug("Cancelling search."); this.search.cancel(); this.logger.debug("Shutdown of HASCO completed."); } @Override public HASCOConfig getConfig() { return (HASCOConfig) super.getConfig(); } public IOptimalPathInORGraphSearchFactory<S, EvaluatedSearchGraphPath<N, A, V>, N, A, V, ?> getSearchFactory() { return this.searchFactory; } public IOptimalPathInORGraphSearch<S, EvaluatedSearchGraphPath<N, A, V>, N, A, V> getSearch() { return this.search; } @Override public String getLoggerName() { return this.loggerName; } @Override public void setLoggerName(final String name) { this.logger.info("Switching logger for {} from {} to {}", this.getId(), this.logger.getName(), name); this.loggerName = name; this.logger = LoggerFactory.getLogger(name); this.logger.info("Activated logger for {} with name {}", this.getId(), name); super.setLoggerName(this.loggerName + "._swConfigAlgo"); if (this.getInput().getCompositionEvaluator() instanceof ILoggingCustomizable) { this.logger.info("Setting logger of HASCO solution evaluator {} to {}.solutionevaluator.", this.getInput().getCompositionEvaluator().getClass().getName(), name); ((ILoggingCustomizable) this.getInput().getCompositionEvaluator()).setLoggerName(name + ".solutionevaluator"); } else { this.logger.info("The solution evaluator {} does not implement ILoggingCustomizable, so no customization possible.", this.getInput().getCompositionEvaluator().getClass().getName()); } } public void setCreateComponentInstancesFromNodesInsteadOfPlans(final boolean cIsFromNodes) { this.createComponentInstancesFromNodesInsteadOfPlans = cIsFromNodes; } @Override public String toString() { Map<String, Object> fields = new HashMap<>(); fields.put("planningGraphGeneratorDeriver", this.planningGraphGeneratorDeriver); fields.put("planningProblem", this.planningProblem); fields.put("search", this.search); fields.put("searchProblem", this.searchProblem); return ToJSONStringUtil.toJSONString(this.getClass().getSimpleName(), fields); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/HASCOConfig.java
package ai.libs.hasco.core; import org.aeonbits.owner.Config.Sources; import ai.libs.jaicore.basic.IOwnerBasedAlgorithmConfig; @Sources({ "file:conf/hasco.properties" }) public interface HASCOConfig extends IOwnerBasedAlgorithmConfig { public static final String K_VISUALIZE = "hasco.visualize"; /** * @return Whether or not the search conducted by HASCO should be visualized */ @Key(K_VISUALIZE) @DefaultValue("false") public boolean visualizationEnabled(); }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/HASCOFactory.java
package ai.libs.hasco.core; import java.io.File; import org.aeonbits.owner.ConfigCache; import org.aeonbits.owner.ConfigFactory; import org.api4.java.ai.graphsearch.problem.IOptimalPathInORGraphSearchFactory; import org.api4.java.datastructure.graph.ILabeledPath; import ai.libs.hasco.optimizingfactory.SoftwareConfigurationAlgorithmFactory; import ai.libs.jaicore.basic.algorithm.reduction.AlgorithmicProblemReduction; import ai.libs.jaicore.planning.core.interfaces.IPlan; import ai.libs.jaicore.planning.hierarchical.problems.ceocipstn.CEOCIPSTNPlanningProblem; import ai.libs.jaicore.planning.hierarchical.problems.htn.IHierarchicalPlanningToGraphSearchReduction; import ai.libs.jaicore.search.model.other.EvaluatedSearchGraphPath; import ai.libs.jaicore.search.probleminputs.GraphSearchInput; import ai.libs.jaicore.search.probleminputs.GraphSearchWithPathEvaluationsInput; public class HASCOFactory<S extends GraphSearchWithPathEvaluationsInput<N, A, V>, N, A, V extends Comparable<V>> implements SoftwareConfigurationAlgorithmFactory<RefinementConfiguredSoftwareConfigurationProblem<V>, HASCOSolutionCandidate<V>, V, HASCO<S, N, A, V>> { private RefinementConfiguredSoftwareConfigurationProblem<V> problem; private IHASCOPlanningReduction<N, A> planningGraphGeneratorDeriver; private IOptimalPathInORGraphSearchFactory<S, EvaluatedSearchGraphPath<N, A, V>, N, A, V, ?> searchFactory; private AlgorithmicProblemReduction<? super GraphSearchWithPathEvaluationsInput<N, A, V>, ? super EvaluatedSearchGraphPath<N, A, V>, S, EvaluatedSearchGraphPath<N, A, V>> searchProblemTransformer; private HASCOConfig hascoConfig; public void setProblemInput(final RefinementConfiguredSoftwareConfigurationProblem<V> problemInput) { this.problem = problemInput; } @Override public HASCO<S, N, A, V> getAlgorithm() { if (this.problem == null) { throw new IllegalStateException("Cannot create HASCO, because no problem has been specified."); } return this.getAlgorithm(this.problem); } @Override public HASCO<S, N, A, V> getAlgorithm(final RefinementConfiguredSoftwareConfigurationProblem<V> problem) { if (problem.getRequiredInterface() == null || problem.getRequiredInterface().isEmpty()) { throw new IllegalArgumentException("No required interface defined!"); } if (this.planningGraphGeneratorDeriver == null) { throw new IllegalStateException("Cannot create HASCO, because no planningGraphGeneratorDeriver has been specified."); } if (this.searchFactory == null) { throw new IllegalStateException("Cannot create HASCO, because no search factory has been specified."); } if (this.searchProblemTransformer == null) { throw new IllegalStateException("Cannot create HASCO, because no searchProblemTransformer has been specified."); } if (this.hascoConfig == null) { throw new IllegalStateException("Cannot create HASCO, because no hasco configuration been specified."); } return new HASCO<>(this.hascoConfig, problem, this.planningGraphGeneratorDeriver, this.searchFactory, this.searchProblemTransformer); } public IHASCOPlanningReduction<N, A> getPlanningGraphGeneratorDeriver() { return this.planningGraphGeneratorDeriver; } public void setPlanningGraphGeneratorDeriver(final IHierarchicalPlanningToGraphSearchReduction<N, A, ? super CEOCIPSTNPlanningProblem, ? extends IPlan, ? extends GraphSearchInput<N,A>, ? super ILabeledPath<N,A>> planningGraphGeneratorDeriver) { this.planningGraphGeneratorDeriver = (planningGraphGeneratorDeriver instanceof IHASCOPlanningReduction) ? (IHASCOPlanningReduction<N, A>)planningGraphGeneratorDeriver : new DefaultHASCOPlanningReduction<>(planningGraphGeneratorDeriver); } public IOptimalPathInORGraphSearchFactory<S, EvaluatedSearchGraphPath<N, A, V>, N, A, V, ?> getSearchFactory() { return this.searchFactory; } public void setSearchFactory(final IOptimalPathInORGraphSearchFactory<S, EvaluatedSearchGraphPath<N, A, V>, N, A, V, ?> searchFactory) { this.searchFactory = searchFactory; } public AlgorithmicProblemReduction<? super GraphSearchWithPathEvaluationsInput<N, A, V>, ? super EvaluatedSearchGraphPath<N, A, V>, S, EvaluatedSearchGraphPath<N, A, V>> getSearchProblemTransformer() { return this.searchProblemTransformer; } public void setSearchProblemTransformer(final AlgorithmicProblemReduction<? super GraphSearchWithPathEvaluationsInput<N, A, V>, ? super EvaluatedSearchGraphPath<N, A, V>, S, EvaluatedSearchGraphPath<N, A, V>> searchProblemTransformer) { this.searchProblemTransformer = searchProblemTransformer; } public void withDefaultAlgorithmConfig() { this.withAlgorithmConfig(ConfigCache.getOrCreate(HASCOConfig.class)); } public void withAlgorithmConfig(final HASCOConfig hascoConfig) { this.hascoConfig = hascoConfig; } public void withAlgorithmConfigFile(final File hascoConfigFile) { this.hascoConfig = (HASCOConfig) ConfigFactory.create(HASCOConfig.class).loadPropertiesFromFile(hascoConfigFile); } public RefinementConfiguredSoftwareConfigurationProblem<V> getProblem() { return this.problem; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/HASCORunReport.java
package ai.libs.hasco.core; import java.util.List; public class HASCORunReport<V extends Comparable<V>> { private final List<HASCOSolutionCandidate<V>> solutionCandidates; public HASCORunReport(List<HASCOSolutionCandidate<V>> solutionCandidates) { super(); this.solutionCandidates = solutionCandidates; } public List<HASCOSolutionCandidate<V>> getSolutionCandidates() { return solutionCandidates; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/HASCOSolutionCandidate.java
package ai.libs.hasco.core; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.model.EvaluatedSoftwareConfigurationSolution; import ai.libs.jaicore.planning.core.interfaces.IEvaluatedGraphSearchBasedPlan; /** * This is a wrapper class only used for efficient processing of solutions. For example, to lookup the annotations of a solution, we do not need the possibly costly equals method of T but only this * class. For each solution, only one such object is created. * * @author fmohr * * @param <T> */ public class HASCOSolutionCandidate<V extends Comparable<V>> implements EvaluatedSoftwareConfigurationSolution<V> { private final ComponentInstance componentInstance; private final IEvaluatedGraphSearchBasedPlan<?, ?, V> planningSolution; private final int timeToEvaluateCandidate; private final long timeOfCreation = System.currentTimeMillis(); public HASCOSolutionCandidate(final ComponentInstance componentInstance, final IEvaluatedGraphSearchBasedPlan<?, ?, V> planningSolution, final int timeToEvaluateCandidate) { super(); this.componentInstance = componentInstance; this.planningSolution = planningSolution; this.timeToEvaluateCandidate = timeToEvaluateCandidate; if (planningSolution == null) { throw new IllegalArgumentException("HASCOSolutionCandidate cannot be created with a NULL planning solution."); } if (planningSolution.getSearchGraphPath() == null) { throw new IllegalArgumentException("HASCOSolutionCandidate cannot be created with a planning solution that has a NULL path object."); } } @Override public ComponentInstance getComponentInstance() { return this.componentInstance; } @Override public V getScore() { return this.planningSolution.getScore(); } public int getTimeToEvaluateCandidate() { return this.timeToEvaluateCandidate; } public long getTimeOfCreation() { return this.timeOfCreation; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/IHASCOPlanningReduction.java
package ai.libs.hasco.core; import org.api4.java.datastructure.graph.ILabeledPath; import ai.libs.jaicore.planning.core.interfaces.IPlan; import ai.libs.jaicore.planning.hierarchical.problems.ceocipstn.CEOCIPSTNPlanningProblem; import ai.libs.jaicore.planning.hierarchical.problems.htn.IHierarchicalPlanningToGraphSearchReduction; import ai.libs.jaicore.search.probleminputs.GraphSearchInput; public interface IHASCOPlanningReduction<N, A> extends IHierarchicalPlanningToGraphSearchReduction<N, A, CEOCIPSTNPlanningProblem, IPlan, GraphSearchInput<N,A>, ILabeledPath<N,A>> { }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/IsNotRefinable.java
package ai.libs.hasco.core; import java.util.Collection; import java.util.List; import java.util.Map; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.Parameter; import ai.libs.hasco.model.ParameterRefinementConfiguration; import ai.libs.jaicore.logic.fol.structure.ConstantParam; import ai.libs.jaicore.logic.fol.structure.Monom; import ai.libs.jaicore.logic.fol.theories.EvaluablePredicate; public class IsNotRefinable implements EvaluablePredicate { private final IsValidParameterRangeRefinementPredicate p; public IsNotRefinable(Collection<Component> components, Map<Component, Map<Parameter, ParameterRefinementConfiguration>> refinementConfiguration) { super(); this.p = new IsValidParameterRangeRefinementPredicate(components, refinementConfiguration); } @Override public Collection<List<ConstantParam>> getParamsForPositiveEvaluation(Monom state, ConstantParam... partialGrounding) { throw new UnsupportedOperationException(); } @Override public boolean isOracable() { return false; } @Override public Collection<List<ConstantParam>> getParamsForNegativeEvaluation(Monom state, ConstantParam... partialGrounding) { throw new UnsupportedOperationException(); } @Override public boolean test(Monom state, ConstantParam... params) { return p.getParamsForPositiveEvaluation(state, params[0], params[1], params[2], params[3], params[4], null).isEmpty(); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/IsRefinementCompletedPredicate.java
package ai.libs.hasco.core; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Map; import org.apache.commons.lang3.NotImplementedException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ai.libs.hasco.model.CategoricalParameterDomain; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.model.NumericParameterDomain; import ai.libs.hasco.model.Parameter; import ai.libs.hasco.model.ParameterRefinementConfiguration; import ai.libs.jaicore.basic.sets.SetUtil; import ai.libs.jaicore.logic.fol.structure.ConstantParam; import ai.libs.jaicore.logic.fol.structure.Literal; import ai.libs.jaicore.logic.fol.structure.Monom; import ai.libs.jaicore.logic.fol.theories.EvaluablePredicate; public class IsRefinementCompletedPredicate implements EvaluablePredicate { private final Logger logger = LoggerFactory.getLogger(IsRefinementCompletedPredicate.class); private final Collection<Component> components; private final Map<Component, Map<Parameter, ParameterRefinementConfiguration>> refinementConfiguration; public IsRefinementCompletedPredicate(final Collection<Component> components, final Map<Component, Map<Parameter, ParameterRefinementConfiguration>> refinementConfiguration) { super(); this.components = components; this.refinementConfiguration = refinementConfiguration; } @Override public Collection<List<ConstantParam>> getParamsForPositiveEvaluation(final Monom state, final ConstantParam... partialGrounding) { throw new NotImplementedException("This is not an oracable predicate!"); } @Override public boolean isOracable() { return false; } @Override public Collection<List<ConstantParam>> getParamsForNegativeEvaluation(final Monom state, final ConstantParam... partialGrounding) { throw new UnsupportedOperationException(); } @Override public boolean test(final Monom state, final ConstantParam... params) { /* initialize routine */ if (params.length != 2) { throw new IllegalArgumentException("There should be exactly two parameters additional to the state but " + params.length + " were provided: " + Arrays.toString(params) + ". This parameters refer to the component name that is being configured and the object itself."); } if (params[0] == null) { throw new IllegalArgumentException("The component name must not be null."); } if (params[1] == null) { throw new IllegalArgumentException("The component instance reference must not be null."); } final String objectContainer = params[1].getName(); /* determine current values for the params */ ComponentInstance groundComponent = Util.getGroundComponentsFromState(state, components, false).get(objectContainer); Component component = groundComponent.getComponent(); Map<String, String> componentParamContainers = Util.getParameterContainerMap(state, objectContainer); for (Parameter param : component.getParameters()) { String containerOfParam = componentParamContainers.get(param.getName()); String currentValueOfParam = groundComponent.getParameterValue(param); boolean variableHasBeenSet = state.contains(new Literal("overwritten('" + containerOfParam + "')")); boolean variableHasBeenClosed = state.contains(new Literal("closed('" + containerOfParam + "')")); assert variableHasBeenSet == groundComponent.getParametersThatHaveBeenSetExplicitly().contains(param); assert !variableHasBeenClosed || variableHasBeenSet : "Parameter " + param.getName() + " of component " + component.getName() + " with default domain " + param.getDefaultDomain() + " has been closed but no value has been set."; ParameterRefinementConfiguration refinementConfig = refinementConfiguration.get(component).get(param); if (param.isNumeric()) { double min = 0; double max = 0; if (currentValueOfParam != null) { List<String> interval = SetUtil.unserializeList(currentValueOfParam); min = Double.parseDouble(interval.get(0)); max = Double.parseDouble(interval.get(1)); } else { min = ((NumericParameterDomain) param.getDefaultDomain()).getMin(); max = ((NumericParameterDomain) param.getDefaultDomain()).getMax(); } double lengthStopCriterion = refinementConfig.getIntervalLength(); double length = max - min; if (refinementConfig.isInitRefinementOnLogScale() && (max / min - 1) > lengthStopCriterion || ! refinementConfig.isInitRefinementOnLogScale() && length > lengthStopCriterion) { logger.info("Test for isRefinementCompletedPredicate({},{}) is negative. Interval length of [{},{}] is {}. Required length to consider an interval atomic is {}", params[0].getName(), objectContainer, min, max, length, refinementConfiguration.get(component).get(param).getIntervalLength()); return false; } } else if (param.getDefaultDomain() instanceof CategoricalParameterDomain) { // categorical params can be refined iff the have not been set and closed before assert param.getDefaultValue() != null : "Param " + param.getName() + " has no default value!"; if (!variableHasBeenSet && !variableHasBeenClosed) { logger.info("Test for isRefinementCompletedPredicate({},{}) is negative", params[0].getName(), objectContainer); return false; } } else { throw new UnsupportedOperationException("Currently no support for testing parameters of type " + param.getClass().getName()); } } logger.info("Test for isRefinementCompletedPredicate({},{}) is positive", params[0].getName(), objectContainer); return true; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/IsValidParameterRangeRefinementPredicate.java
package ai.libs.hasco.core; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; import org.apache.commons.lang3.NotImplementedException; import org.apache.commons.math3.geometry.euclidean.oned.Interval; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ai.libs.hasco.model.CategoricalParameterDomain; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.model.IParameterDomain; import ai.libs.hasco.model.NumericParameterDomain; import ai.libs.hasco.model.Parameter; import ai.libs.hasco.model.ParameterRefinementConfiguration; import ai.libs.jaicore.basic.sets.SetUtil; import ai.libs.jaicore.logic.fol.structure.ConstantParam; import ai.libs.jaicore.logic.fol.structure.Literal; import ai.libs.jaicore.logic.fol.structure.Monom; import ai.libs.jaicore.logic.fol.theories.EvaluablePredicate; public class IsValidParameterRangeRefinementPredicate implements EvaluablePredicate { private final Logger logger = LoggerFactory.getLogger(IsValidParameterRangeRefinementPredicate.class); private final Collection<Component> components; private final Map<Component, Map<Parameter, ParameterRefinementConfiguration>> refinementConfiguration; private final Map<ComponentInstance, Double> knownCompositionsAndTheirScore = new HashMap<>(); public IsValidParameterRangeRefinementPredicate(final Collection<Component> components, final Map<Component, Map<Parameter, ParameterRefinementConfiguration>> refinementConfiguration) { super(); this.components = components; this.refinementConfiguration = refinementConfiguration; } @Override public Collection<List<ConstantParam>> getParamsForPositiveEvaluation(final Monom state, final ConstantParam... partialGrounding) { this.logger.info("Computing params that evaluate isValidParameterRangeRefinement positively in state with hash code {}.", state.hashCode()); /* determine the context for which the interval refinement should be oracled */ if (partialGrounding.length != 6) { throw new IllegalArgumentException("The interpreted predicate " + this.getClass().getName() + " requires 6 arguments when oracled but " + partialGrounding.length + " have been provided!"); } String componentName = partialGrounding[0].getName(); String componentIdentifier = partialGrounding[1].getName(); String parameterName = partialGrounding[2].getName(); Component component; Optional<Component> searchedComponent = this.components.stream().filter(c -> c.getName().equals(componentName)).findAny(); if (searchedComponent.isPresent()) { component = searchedComponent.get(); } else { throw new IllegalArgumentException("Could not find matching component."); } Optional<Parameter> optParam = component.getParameters().stream().filter(p -> p.getName().equals(parameterName)).findAny(); Parameter param; if (optParam.isPresent()) { param = optParam.get(); } else { throw new IllegalArgumentException("Could not find required parameter"); } List<ConstantParam> partialGroundingAsList = Arrays.asList(partialGrounding); String containerName = partialGrounding[3].getName(); String currentParamValue = partialGrounding[4].getName(); // this is not really used, because the current value is again read from the state this.logger.info("Determining positive evaluations for isValidParameterRangeRefinementPredicate({},{},{},{},{},{})", componentName, componentIdentifier, parameterName, containerName, currentParamValue, partialGrounding[5]); boolean hasBeenSetBefore = state.contains(new Literal("overwritten('" + containerName + "')")); /* determine component instance and the true domain of parameter */ ComponentInstance instance = Util.getComponentInstanceFromState(this.components, state, componentIdentifier, false); this.logger.debug("Derived component instance to be refined: {}. Parameter to refine: {}. Current value of parameter: {}", instance, param, currentParamValue); try { Map<Parameter, IParameterDomain> paramDomains = Util.getUpdatedDomainsOfComponentParameters(instance); if (this.logger.isDebugEnabled()) { this.logger.debug("Parameter domains are: {}", paramDomains.keySet().stream().map(k -> "\n\t" + k + ": " + paramDomains.get(k)).collect(Collectors.joining())); } /* determine refinements for numeric parameters */ if (param.isNumeric()) { NumericParameterDomain currentlyActiveDomain = (NumericParameterDomain) paramDomains.get(param); Interval currentInterval = new Interval(currentlyActiveDomain.getMin(), currentlyActiveDomain.getMax()); assert (!hasBeenSetBefore || (currentInterval.getInf() == Double.valueOf(SetUtil.unserializeList(currentParamValue).get(0)) && currentInterval.getSup() == Double .valueOf(SetUtil.unserializeList(currentParamValue).get(1)))) : "The derived currently active domain of an explicitly set parameter deviates from the domain specified in the state!"; ParameterRefinementConfiguration refinementConfig = this.refinementConfiguration.get(component).get(param); if (refinementConfig == null) { throw new IllegalArgumentException("No refinement configuration for parameter \"" + parameterName + "\" of component \"" + componentName + "\" has been supplied!"); } /* if the interval is under the distinction threshold, return an empty list of possible refinements (predicate will always be false here) */ double relativeLength = (currentInterval.getSup() / currentInterval.getInf() - 1); double absoluteLengt = currentInterval.getSup() - currentInterval.getInf(); boolean isAtomicInterval = refinementConfig.isInitRefinementOnLogScale() && relativeLength < refinementConfig.getIntervalLength() || !refinementConfig.isInitRefinementOnLogScale() && absoluteLengt < refinementConfig.getIntervalLength(); if (isAtomicInterval) { this.logger.info("Returning an empty list as this is a numeric parameter that has been narrowed sufficiently. Required interval length is {}, and actual interval length is {}", refinementConfig.getIntervalLength(), currentInterval.getSup() - currentInterval.getInf()); if (!hasBeenSetBefore) { List<Interval> unmodifiedRefinement = new ArrayList<>(); unmodifiedRefinement.add(currentInterval); return this.getGroundingsForIntervals(unmodifiedRefinement, partialGroundingAsList); } return new ArrayList<>(); } else { this.logger.debug("Current interval [{},{}] is not considered atomic. Relative length is {}, and absolute length is {}", currentInterval.getInf(), currentInterval.getSup(), relativeLength, absoluteLengt); } /* if this is an integer and the number of comprised integers are at most as many as the branching factor, enumerate them */ if (currentlyActiveDomain.isInteger() && (Math.floor(currentInterval.getSup()) - Math.ceil(currentInterval.getInf()) + 1 <= refinementConfig.getRefinementsPerStep())) { List<Interval> proposedRefinements = new ArrayList<>(); for (int i = (int) Math.ceil(currentInterval.getInf()); i <= (int) Math.floor(currentInterval.getSup()); i++) { proposedRefinements.add(new Interval(i, i)); } this.logger.info("Ultimate level of integer refinement reached. Returning refinements: {}.", proposedRefinements.stream().map(i -> "[" + i.getInf() + ", " + i.getSup() + "]").collect(Collectors.toList())); return this.getGroundingsForIntervals(proposedRefinements, partialGroundingAsList); } /* if this parameter is to be refined on a linear scale, enter this block */ if (hasBeenSetBefore || !refinementConfig.isInitRefinementOnLogScale()) { List<Interval> proposedRefinements = this.refineOnLinearScale(currentInterval, refinementConfig.getRefinementsPerStep(), refinementConfig.getIntervalLength(), refinementConfig.isInitRefinementOnLogScale(), refinementConfig.isInitWithExtremalPoints() && !hasBeenSetBefore); for (Interval proposedRefinement : proposedRefinements) { assert proposedRefinement.getInf() >= currentInterval.getInf() && proposedRefinement.getSup() <= currentInterval.getSup() : "The proposed refinement [" + proposedRefinement.getInf() + ", " + proposedRefinement.getSup() + "] is not a sub-interval of " + currentParamValue + "]."; assert !proposedRefinement.equals(currentInterval) : "No real refinement! Intervals are identical."; } this.logger.info("Returning linear refinements: {}.", proposedRefinements.stream().map(i -> "[" + i.getInf() + ", " + i.getSup() + "]").collect(Collectors.toList())); return this.getGroundingsForIntervals(proposedRefinements, partialGroundingAsList); } /* if this is a log-scale parameter, compute the focus value and the other intervals */ Optional<Literal> focusPredicate = state.stream() .filter(l -> l.getPropertyName().equals("parameterFocus") && l.getParameters().get(0).getName().equals(componentIdentifier) && l.getParameters().get(1).getName().equals(parameterName)).findAny(); if (!focusPredicate.isPresent()) { throw new IllegalArgumentException("The given state does not specify a parameter focus for the log-scale parameter " + parameterName + " on object \"" + componentIdentifier + "\""); } double focus = Double.parseDouble(focusPredicate.get().getParameters().get(2).getName()); if (refinementConfig.getLogBasis() <= 1) { throw new UnsupportedOperationException( "The basis for log-scaled parameter " + param.getName() + " of component " + instance.getComponent().getName() + " must be strictly greater than 1 (but is " + refinementConfig.getLogBasis() + ")."); } List<Interval> proposedRefinements = this.refineOnLogScale(currentInterval, refinementConfig.getRefinementsPerStep(), refinementConfig.getLogBasis(), focus, refinementConfig.isInitWithExtremalPoints() && !hasBeenSetBefore); for (Interval proposedRefinement : proposedRefinements) { double epsilon = 1E-7; assert proposedRefinement.getInf() + epsilon >= currentInterval.getInf() && proposedRefinement.getSup() <= currentInterval.getSup() + epsilon : "The proposed refinement [" + proposedRefinement.getInf() + ", " + proposedRefinement.getSup() + "] is not a sub-interval of " + currentParamValue + "]."; assert !proposedRefinement.equals(currentInterval) : "No real refinement! Intervals are identical."; } this.logger.info("Returning log-scale refinements with focus point {}: {}.", focus, proposedRefinements.stream().map(i -> "[" + i.getInf() + ", " + i.getSup() + "]").collect(Collectors.toList())); return this.getGroundingsForIntervals(proposedRefinements, partialGroundingAsList); } else if (param.isCategorical()) { List<String> possibleValues = new ArrayList<>(); if (hasBeenSetBefore) { this.logger.info("Returning empty list since param has been set before."); return new ArrayList<>(); } for (Object valAsObject : ((CategoricalParameterDomain) paramDomains.get(param)).getValues()) { possibleValues.add(valAsObject.toString()); } this.logger.info("Returning possible values {}.", possibleValues); return this.getGroundingsForOracledValues(possibleValues, partialGroundingAsList); } else { throw new UnsupportedOperationException("Currently no support for parameters of class \"" + param.getClass().getName() + "\""); } } catch (Exception e) { this.logger.error("Unexpected exception observed", e); System.exit(1); } return new ArrayList<>(); } private Collection<List<ConstantParam>> getGroundingsForIntervals(final List<Interval> refinements, final List<ConstantParam> partialGrounding) { List<String> paramValues = new ArrayList<>(); for (Interval oracledInterval : refinements) { paramValues.add("[" + oracledInterval.getInf() + ", " + oracledInterval.getSup() + "]"); } return this.getGroundingsForOracledValues(paramValues, partialGrounding); } private Collection<List<ConstantParam>> getGroundingsForOracledValues(final List<String> refinements, final List<ConstantParam> partialGrounding) { Collection<List<ConstantParam>> groundings = new ArrayList<>(); for (String oracledValue : refinements) { List<ConstantParam> grounding = new ArrayList<>(partialGrounding); grounding.set(5, new ConstantParam(oracledValue)); groundings.add(grounding); } return groundings; } public void informAboutNewSolution(final ComponentInstance solution, final double score) { this.knownCompositionsAndTheirScore.put(solution, score); } @Override public boolean isOracable() { return true; } @Override public Collection<List<ConstantParam>> getParamsForNegativeEvaluation(final Monom state, final ConstantParam... partialGrounding) { throw new UnsupportedOperationException(); } @Override public boolean test(final Monom state, final ConstantParam... params) { throw new NotImplementedException("Testing the validity-predicate is currently not supported. This is indirectly possible using the oracle."); } public List<Interval> refineOnLinearScale(final Interval interval, final int maxNumberOfSubIntervals, final double minimumLengthOfIntervals, final boolean wasInitiallyLogarithmic, final boolean createPointIntervalsForExtremalValues) { double min = interval.getInf(); double max = interval.getSup(); double length = max - min; double logLength = max / min - 1; double relevantLength = wasInitiallyLogarithmic ? logLength : length; List<Interval> intervals = new ArrayList<>(); this.logger.debug("Refining interval [{}, {}] in a linear fashion. Was initially refined on log-scale: {}", min, max, wasInitiallyLogarithmic); /* if no refinement is possible, return just the interval itself */ if (relevantLength <= minimumLengthOfIntervals) { intervals.add(interval); if (createPointIntervalsForExtremalValues) { intervals.add(0, new Interval(min, min)); intervals.add(new Interval(max, max)); } return intervals; } /* otherwise compute the sub-intervals */ int numberOfIntervals = Math.min((int) Math.ceil(relevantLength / minimumLengthOfIntervals), maxNumberOfSubIntervals); if (createPointIntervalsForExtremalValues) { numberOfIntervals -= 2; } numberOfIntervals = Math.max(numberOfIntervals, 1); this.logger.trace("Splitting interval of length {} and log-length {} into {} sub-intervals.", length, logLength, numberOfIntervals); double stepSize = length / numberOfIntervals; for (int i = 0; i < numberOfIntervals; i++) { intervals.add(new Interval(min + i * stepSize, min + ((i + 1) * stepSize))); } if (createPointIntervalsForExtremalValues) { intervals.add(0, new Interval(min, min)); intervals.add(new Interval(max, max)); } this.logger.trace("Derived sub-intervals {}", intervals.stream().map(i -> "[" + i.getInf() + ", " + i.getSup() + "]").collect(Collectors.toList())); return intervals; } public List<Interval> refineOnLogScale(final Interval interval, final int numSubIntervals, final double basis, final double pointOfConcentration, final boolean createPointIntervalsForExtremalValues) { List<Interval> list = new ArrayList<>(); double min = interval.getInf(); double max = interval.getSup(); this.logger.debug("Received call to create {} log-scaled sub-intervals for interval [{},{}] to the basis {}.", numSubIntervals, min, max, basis); double length = max - min; /* if the point of concentration is exactly on the left or the right of the interval, conduct the standard technique */ if (pointOfConcentration <= min || pointOfConcentration >= max) { int numOfGeneratedSubIntervals = numSubIntervals; if (createPointIntervalsForExtremalValues) { numOfGeneratedSubIntervals -= 2; } if (numOfGeneratedSubIntervals <= 0) { throw new IllegalArgumentException("Number of created sub-intervals must be strictly positive but is " + numOfGeneratedSubIntervals + "."); } double lengthOfShortestInterval = length * (1 - basis) / (1 - Math.pow(basis, numOfGeneratedSubIntervals)); while (lengthOfShortestInterval < 1.0E-10) { this.logger.trace("Initial interval would have size {} for a total number of {} sub-intervals, but length must be at least 10^-10. Reducing the number by 1.", lengthOfShortestInterval, numOfGeneratedSubIntervals); numOfGeneratedSubIntervals--; lengthOfShortestInterval = length * (1 - basis) / (1 - Math.pow(basis, numOfGeneratedSubIntervals)); } this.logger.debug("Generating {} log-scaled sub-intervals for interval [{},{}] to the basis {}. Length of shortest interval is {}", numOfGeneratedSubIntervals, min, max, basis, lengthOfShortestInterval); if (pointOfConcentration <= min) { double endOfLast = min; for (int i = 0; i < numOfGeneratedSubIntervals; i++) { double start = endOfLast; assert start >= min; endOfLast = start + Math.pow(basis, i) * lengthOfShortestInterval; assert endOfLast <= max : "Sub-Interval must not assume values greater than a vaule of the original interval."; if (endOfLast <= start) { throw new IllegalArgumentException("Interval size for [" + start + ", " + (start + Math.pow(basis, i) * lengthOfShortestInterval) + "] is not positive."); } list.add(new Interval(start, endOfLast)); this.logger.trace("Added interval [{}, {}]", start, endOfLast); } } else { double endOfLast = max; for (int i = 0; i < numOfGeneratedSubIntervals; i++) { double start = endOfLast; endOfLast = start - Math.pow(basis, i) * lengthOfShortestInterval; list.add(new Interval(endOfLast, start)); } Collections.reverse(list); } if (createPointIntervalsForExtremalValues) { list.add(0, new Interval(min, min)); list.add(new Interval(max, max)); } return list; } /* if the point of concentration is in the inner of the interval, split the interval correspondingly and recursively solve the problem */ double distanceFromMinToFocus = Math.abs(interval.getInf() - pointOfConcentration); int segmentsForLeft = (int) Math.max(1, Math.floor(numSubIntervals * distanceFromMinToFocus / length)); if (createPointIntervalsForExtremalValues) { segmentsForLeft += 2; } int segmentsForRight = numSubIntervals - segmentsForLeft; assert segmentsForRight >= 1; if (!createPointIntervalsForExtremalValues || segmentsForRight < 3) { throw new IllegalArgumentException("No refinement possible if interval points are not included or segments for the right are less than 3"); } this.logger.debug("Focus {} is inside the given interval. Create two partitions, one on the left ({} segments), and one on the right ({} segments).", pointOfConcentration, segmentsForLeft, segmentsForRight); list.addAll(this.refineOnLogScale(new Interval(min, pointOfConcentration), segmentsForLeft, basis, pointOfConcentration, createPointIntervalsForExtremalValues)); list.addAll(this.refineOnLogScale(new Interval(pointOfConcentration, max), segmentsForRight, basis, pointOfConcentration, createPointIntervalsForExtremalValues)); return list; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/RefinementConfiguredSoftwareConfigurationProblem.java
package ai.libs.hasco.core; import java.io.File; import java.io.IOException; import java.util.Map; import org.api4.java.common.attributedobjects.IObjectEvaluator; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.model.Parameter; import ai.libs.hasco.model.ParameterRefinementConfiguration; import ai.libs.hasco.serialization.ComponentLoader; /** * In this problem, the core software configuration problem is extended by predefining how the the parameters may be refined * * @author fmohr * * @param <V> */ public class RefinementConfiguredSoftwareConfigurationProblem<V extends Comparable<V>> extends SoftwareConfigurationProblem<V> { private final Map<Component, Map<Parameter, ParameterRefinementConfiguration>> paramRefinementConfig; public RefinementConfiguredSoftwareConfigurationProblem(final File configurationFile, final String requiredInterface, final IObjectEvaluator<ComponentInstance, V> compositionEvaluator) throws IOException { super(configurationFile, requiredInterface, compositionEvaluator); this.paramRefinementConfig = new ComponentLoader(configurationFile).getParamConfigs(); } public RefinementConfiguredSoftwareConfigurationProblem(final SoftwareConfigurationProblem<V> coreProblem, final Map<Component, Map<Parameter, ParameterRefinementConfiguration>> paramRefinementConfig) { super(coreProblem); this.paramRefinementConfig = paramRefinementConfig; } public Map<Component, Map<Parameter, ParameterRefinementConfiguration>> getParamRefinementConfig() { return this.paramRefinementConfig; } @Override public int hashCode() { final int prime = 31; return prime + ((this.paramRefinementConfig == null) ? 0 : this.paramRefinementConfig.hashCode()); } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (this.getClass() != obj.getClass()) { return false; } RefinementConfiguredSoftwareConfigurationProblem other = (RefinementConfiguredSoftwareConfigurationProblem) obj; if (this.paramRefinementConfig == null) { if (other.paramRefinementConfig != null) { return false; } } else if (!this.paramRefinementConfig.equals(other.paramRefinementConfig)) { return false; } return true; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/SoftwareConfigurationProblem.java
package ai.libs.hasco.core; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.api4.java.common.attributedobjects.IObjectEvaluator; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.serialization.ComponentLoader; import ai.libs.jaicore.logging.ToJSONStringUtil; public class SoftwareConfigurationProblem<V extends Comparable<V>> { private final Collection<Component> components; private final String requiredInterface; private final IObjectEvaluator<ComponentInstance, V> compositionEvaluator; public SoftwareConfigurationProblem(final File configurationFile, final String requiredInerface, final IObjectEvaluator<ComponentInstance, V> compositionEvaluator) throws IOException { ComponentLoader cl = new ComponentLoader(); cl.loadComponents(configurationFile); this.components = cl.getComponents(); this.requiredInterface = requiredInerface; if (requiredInerface == null || requiredInerface.isEmpty()) { throw new IllegalArgumentException("Invalid required interface \"" + requiredInerface + "\""); } this.compositionEvaluator = compositionEvaluator; } public SoftwareConfigurationProblem(final Collection<Component> components, final String requiredInterface, final IObjectEvaluator<ComponentInstance, V> compositionEvaluator) { super(); this.components = components; this.requiredInterface = requiredInterface; this.compositionEvaluator = compositionEvaluator; if (requiredInterface == null || requiredInterface.isEmpty()) { throw new IllegalArgumentException("Invalid required interface \"" + requiredInterface + "\""); } } public SoftwareConfigurationProblem(final SoftwareConfigurationProblem<V> problem) { this(problem.getComponents(), problem.requiredInterface, problem.compositionEvaluator); } public Collection<Component> getComponents() { return this.components; } public String getRequiredInterface() { return this.requiredInterface; } public IObjectEvaluator<ComponentInstance, V> getCompositionEvaluator() { return this.compositionEvaluator; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.components == null) ? 0 : this.components.hashCode()); result = prime * result + ((this.compositionEvaluator == null) ? 0 : this.compositionEvaluator.hashCode()); result = prime * result + ((this.requiredInterface == null) ? 0 : this.requiredInterface.hashCode()); return result; } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (this.getClass() != obj.getClass()) { return false; } SoftwareConfigurationProblem other = (SoftwareConfigurationProblem) obj; if (this.components == null) { if (other.components != null) { return false; } } else if (!this.components.equals(other.components)) { return false; } if (this.compositionEvaluator == null) { if (other.compositionEvaluator != null) { return false; } } else if (!this.compositionEvaluator.equals(other.compositionEvaluator)) { return false; } if (this.requiredInterface == null) { if (other.requiredInterface != null) { return false; } } else if (!this.requiredInterface.equals(other.requiredInterface)) { return false; } return true; } @Override public String toString() { Map<String, Object> fields = new HashMap<>(); fields.put("components", this.components); fields.put("requiredInterface", this.requiredInterface); fields.put("compositionEvaluator", this.compositionEvaluator); return ToJSONStringUtil.toJSONString(this.getClass().getSimpleName(), fields); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/TimeRecordingEvaluationWrapper.java
package ai.libs.hasco.core; import java.util.HashMap; import java.util.Map; import org.api4.java.common.attributedobjects.IInformedObjectEvaluatorExtension; import org.api4.java.common.attributedobjects.IObjectEvaluator; import org.api4.java.common.attributedobjects.ObjectEvaluationFailedException; import org.api4.java.common.control.ILoggingCustomizable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ai.libs.hasco.model.ComponentInstance; import ai.libs.jaicore.logging.ToJSONStringUtil; public class TimeRecordingEvaluationWrapper<V extends Comparable<V>> implements IObjectEvaluator<ComponentInstance, V>, IInformedObjectEvaluatorExtension<V>, ILoggingCustomizable { private Logger logger = LoggerFactory.getLogger(TimeRecordingEvaluationWrapper.class); private final IObjectEvaluator<ComponentInstance, V> baseEvaluator; private final Map<ComponentInstance, Integer> consumedTimes = new HashMap<>(); public TimeRecordingEvaluationWrapper(final IObjectEvaluator<ComponentInstance, V> baseEvaluator) { super(); this.baseEvaluator = baseEvaluator; } @Override public V evaluate(final ComponentInstance object) throws InterruptedException, ObjectEvaluationFailedException { long start = System.currentTimeMillis(); V score = this.baseEvaluator.evaluate(object); long end = System.currentTimeMillis(); this.consumedTimes.put(object, (int) (end - start)); return score; } public boolean hasEvaluationForComponentInstance(final ComponentInstance inst) { return this.consumedTimes.containsKey(inst); } public int getEvaluationTimeForComponentInstance(final ComponentInstance inst) { return this.consumedTimes.get(inst); } @Override public String toString() { Map<String, Object> fields = new HashMap<>(); fields.put("baseEvaluator", this.baseEvaluator); fields.put("consumedTimes", this.consumedTimes); return ToJSONStringUtil.toJSONString(this.getClass().getSimpleName(), fields); } @SuppressWarnings("unchecked") @Override public void informAboutBestScore(final V bestScore) { if(this.baseEvaluator instanceof IInformedObjectEvaluatorExtension) { ((IInformedObjectEvaluatorExtension<V>) this.baseEvaluator).informAboutBestScore(bestScore); } } @Override public String getLoggerName() { return this.logger.getName(); } @Override public void setLoggerName(final String name) { this.logger = LoggerFactory.getLogger(name); if (this.baseEvaluator instanceof ILoggingCustomizable) { this.logger.info("Setting logger of evaluator {} to {}.be", this.baseEvaluator.getClass().getName(), name); ((ILoggingCustomizable) this.baseEvaluator).setLoggerName(name + ".be"); } else { this.logger.info("Evaluator {} cannot be customized for logging, so not configuring its logger.", this.baseEvaluator.getClass().getName()); } } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/core/Util.java
package ai.libs.hasco.core; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Deque; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; import org.apache.commons.math3.geometry.euclidean.oned.Interval; import org.apache.commons.math3.geometry.partitioning.Region.Location; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ai.libs.hasco.model.CategoricalParameterDomain; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.model.Dependency; import ai.libs.hasco.model.IParameterDomain; import ai.libs.hasco.model.NumericParameterDomain; import ai.libs.hasco.model.Parameter; import ai.libs.hasco.model.ParameterRefinementConfiguration; import ai.libs.jaicore.basic.sets.Pair; import ai.libs.jaicore.basic.sets.SetUtil; import ai.libs.jaicore.logic.fol.structure.Literal; import ai.libs.jaicore.logic.fol.structure.LiteralParam; import ai.libs.jaicore.logic.fol.structure.Monom; import ai.libs.jaicore.planning.classical.algorithms.strips.forward.StripsUtil; import ai.libs.jaicore.planning.core.Action; import ai.libs.jaicore.planning.core.interfaces.IPlan; import ai.libs.jaicore.search.model.other.SearchGraphPath; import ai.libs.jaicore.search.model.travesaltree.BackPointerPath; public class Util { private static final String LITERAL_RESOLVES = "resolves"; private static final String LITERAL_PARAMCONTAINER = "parameterContainer"; private static final String LITERAL_VAL = "val"; private static final String LITERAL_INTERFACEIDENTIFIER = "interfaceIdentifier"; private static final Logger logger = LoggerFactory.getLogger(Util.class); private Util() { } static Map<String, String> getParameterContainerMap(final Monom state, final String objectName) { Map<String, String> parameterContainerMap = new HashMap<>(); List<Literal> containerLiterals = state.stream().filter(l -> l.getPropertyName().equals(LITERAL_PARAMCONTAINER) && l.getParameters().get(2).getName().equals(objectName)).collect(Collectors.toList()); containerLiterals.forEach(l -> parameterContainerMap.put(l.getParameters().get(1).getName(), l.getParameters().get(3).getName())); return parameterContainerMap; } public static Map<ComponentInstance, Map<Parameter, String>> getParametrizations(final Monom state, final Collection<Component> components, final boolean resolveIntervals) { Map<String, ComponentInstance> objectMap = new HashMap<>(); Map<String, Map<String, String>> parameterContainerMap = new HashMap<>(); // stores for each object the name of the container of each parameter Map<String, String> parameterValues = new HashMap<>(); Map<ComponentInstance, Map<Parameter, String>> parameterValuesPerComponentInstance = new HashMap<>(); Collection<String> overwrittenDataContainers = getOverwrittenDatacontainersInState(state); /* * create (empty) component instances, detect containers for parameter values, and register the * values of the data containers */ for (Literal l : state) { String[] params = l.getParameters().stream().map(LiteralParam::getName).collect(Collectors.toList()).toArray(new String[] {}); switch (l.getPropertyName()) { case LITERAL_RESOLVES: // field 0 and 1 (parent object name and interface name) are ignored here String componentName = params[2]; String objectName = params[3]; Optional<Component> component = components.stream().filter(c -> c.getName().equals(componentName)).findAny(); assert component.isPresent() : "Could not find component with name " + componentName; ComponentInstance object = new ComponentInstance(component.get(), new HashMap<>(), new HashMap<>()); objectMap.put(objectName, object); break; case LITERAL_PARAMCONTAINER: if (!parameterContainerMap.containsKey(params[2])) { parameterContainerMap.put(params[2], new HashMap<>()); } parameterContainerMap.get(params[2]).put(params[1], params[3]); break; case LITERAL_VAL: if (overwrittenDataContainers.contains(params[0])) { parameterValues.put(params[0], params[1]); } break; default: /* simply ignore other literals */ break; } } /* update the configurations of the objects */ for (Entry<String, ComponentInstance> entry : objectMap.entrySet()) { Map<Parameter, String> paramValuesForThisComponent = new HashMap<>(); String objectName = entry.getKey(); ComponentInstance object = entry.getValue(); parameterValuesPerComponentInstance.put(object, paramValuesForThisComponent); for (Parameter p : object.getComponent().getParameters()) { assert parameterContainerMap.containsKey(objectName) : "No parameter container map has been defined for object " + objectName + " of component " + object.getComponent().getName() + "!"; assert parameterContainerMap.get(objectName).containsKey(p.getName()) : "The data container for parameter " + p.getName() + " of " + object.getComponent().getName() + " is not defined!"; String assignedValue = parameterValues.get(parameterContainerMap.get(objectName).get(p.getName())); String interpretedValue = ""; if (assignedValue != null) { if (p.getDefaultDomain() instanceof NumericParameterDomain) { if (resolveIntervals) { NumericParameterDomain np = (NumericParameterDomain) p.getDefaultDomain(); List<String> vals = SetUtil.unserializeList(assignedValue); Interval interval = new Interval(Double.valueOf(vals.get(0)), Double.valueOf(vals.get(1))); if (np.isInteger()) { interpretedValue = String.valueOf((int) Math.round(interval.getBarycenter())); } else { interpretedValue = String.valueOf(interval.getBarycenter()); } } else { interpretedValue = assignedValue; } } else if (p.getDefaultDomain() instanceof CategoricalParameterDomain) { interpretedValue = assignedValue; } else { throw new UnsupportedOperationException("No support for parameters of type " + p.getClass().getName()); } paramValuesForThisComponent.put(p, interpretedValue); } } } return parameterValuesPerComponentInstance; } public static Collection<String> getOverwrittenDatacontainersInState(final Monom state) { return state.stream().filter(l -> l.getPropertyName().equals("overwritten")).map(l -> l.getParameters().get(0).getName()).collect(Collectors.toSet()); } public static Collection<String> getClosedDatacontainersInState(final Monom state) { return state.stream().filter(l -> l.getPropertyName().equals("closed")).map(l -> l.getParameters().get(0).getName()).collect(Collectors.toSet()); } static Map<String, ComponentInstance> getGroundComponentsFromState(final Monom state, final Collection<Component> components, final boolean resolveIntervals) { Map<String, ComponentInstance> objectMap = new HashMap<>(); Map<String, Map<String, String>> parameterContainerMap = new HashMap<>(); // stores for each object the name of the container of each parameter Map<String, String> parameterValues = new HashMap<>(); Map<String, String> interfaceContainerMap = new HashMap<>(); Collection<String> overwrittenDatacontainers = getOverwrittenDatacontainersInState(state); /* create (empty) component instances, detect containers for parameter values, and register the values of the data containers */ for (Literal l : state) { String[] params = l.getParameters().stream().map(LiteralParam::getName).collect(Collectors.toList()).toArray(new String[] {}); switch (l.getPropertyName()) { case LITERAL_RESOLVES: // field 0 and 1 (parent object name and interface name) are ignored here String componentName = params[2]; String objectName = params[3]; Optional<Component> component = components.stream().filter(c -> c.getName().equals(componentName)).findAny(); assert component.isPresent() : "Could not find component with name " + componentName; ComponentInstance object = new ComponentInstance(component.get(), new HashMap<>(), new HashMap<>()); objectMap.put(objectName, object); break; case LITERAL_PARAMCONTAINER: if (!parameterContainerMap.containsKey(params[2])) { parameterContainerMap.put(params[2], new HashMap<>()); } parameterContainerMap.get(params[2]).put(params[1], params[3]); break; case LITERAL_VAL: parameterValues.put(params[0], params[1]); break; case LITERAL_INTERFACEIDENTIFIER: interfaceContainerMap.put(params[3], params[1]); break; default: /* simply ignore other cases */ break; } } /* now establish the binding of the required interfaces of the component instances */ state.stream().filter(l -> l.getPropertyName().equals(LITERAL_RESOLVES)).forEach(l -> { String[] params = l.getParameters().stream().map(LiteralParam::getName).collect(Collectors.toList()).toArray(new String[] {}); String parentObjectName = params[0]; String objectName = params[3]; ComponentInstance object = objectMap.get(objectName); if (!parentObjectName.equals("request")) { assert interfaceContainerMap.containsKey(objectName) : "Object name " + objectName + " for requried interface must have a defined identifier "; objectMap.get(parentObjectName).getSatisfactionOfRequiredInterfaces().put(interfaceContainerMap.get(objectName), object); } }); /* set the explicitly defined parameters (e.g. overwritten containers) in the component instances */ for (Entry<String, ComponentInstance> entry : objectMap.entrySet()) { String objectName = entry.getKey(); ComponentInstance object = entry.getValue(); for (Parameter p : object.getComponent().getParameters()) { assert parameterContainerMap.containsKey(objectName) : "No parameter container map has been defined for object " + objectName + " of component " + object.getComponent().getName() + "!"; assert parameterContainerMap.get(objectName).containsKey(p.getName()) : "The data container for parameter " + p.getName() + " of " + object.getComponent().getName() + " is not defined! State: " + state.stream().sorted().map(l -> "\n\t" + l).collect(Collectors.joining()); String paramContainerName = parameterContainerMap.get(objectName).get(p.getName()); if (overwrittenDatacontainers.contains(paramContainerName)) { String assignedValue = parameterValues.get(paramContainerName); assert assignedValue != null : "parameter containers must always have a value!"; object.getParameterValues().put(p.getName(), getParamValue(p, assignedValue, resolveIntervals)); } } } return objectMap; } public static <N, A, V extends Comparable<V>> ComponentInstance getSolutionCompositionForNode(final IHASCOPlanningReduction<N, A> planningGraphDeriver, final Collection<Component> components, final Monom initState, final BackPointerPath<N, A, ?> path, final boolean resolveIntervals) { return getSolutionCompositionForPlan(components, initState, planningGraphDeriver.decodeSolution(new SearchGraphPath<>(path)), resolveIntervals); } public static <N, A, V extends Comparable<V>> ComponentInstance getComponentInstanceForNode(final IHASCOPlanningReduction<N, A> planningGraphDeriver, final Collection<Component> components, final Monom initState, final BackPointerPath<N, A, ?> path, final String name, final boolean resolveIntervals) { return getComponentInstanceForPlan(components, initState, planningGraphDeriver.decodeSolution(new SearchGraphPath<>(path)), name, resolveIntervals); } public static Monom getFinalStateOfPlan(final Monom initState, final IPlan plan) { Monom state = new Monom(initState); for (Action a : plan.getActions()) { StripsUtil.updateState(state, a); } return state; } public static ComponentInstance getSolutionCompositionForPlan(final Collection<Component> components, final Monom initState, final IPlan plan, final boolean resolveIntervals) { return getSolutionCompositionFromState(components, getFinalStateOfPlan(initState, plan), resolveIntervals); } public static ComponentInstance getComponentInstanceForPlan(final Collection<Component> components, final Monom initState, final IPlan plan, final String name, final boolean resolveIntervals) { return getComponentInstanceFromState(components, getFinalStateOfPlan(initState, plan), name, resolveIntervals); } public static ComponentInstance getSolutionCompositionFromState(final Collection<Component> components, final Monom state, final boolean resolveIntervals) { return getComponentInstanceFromState(components, state, "solution", resolveIntervals); } public static ComponentInstance getComponentInstanceFromState(final Collection<Component> components, final Monom state, final String name, final boolean resolveIntervals) { return Util.getGroundComponentsFromState(state, components, resolveIntervals).get(name); } /** * Computes a list of all component instances of the given composition. * * @param composition * @return List of components in right to left depth-first order */ public static List<ComponentInstance> getComponentInstancesOfComposition(final ComponentInstance composition) { List<ComponentInstance> components = new LinkedList<>(); Deque<ComponentInstance> componentInstances = new ArrayDeque<>(); componentInstances.push(composition); ComponentInstance curInstance; while (!componentInstances.isEmpty()) { curInstance = componentInstances.pop(); components.add(curInstance); Map<String, String> requiredInterfaces = curInstance.getComponent().getRequiredInterfaces(); // This set should be ordered Set<String> requiredInterfaceNames = requiredInterfaces.keySet(); for (String requiredInterfaceName : requiredInterfaceNames) { ComponentInstance instance = curInstance.getSatisfactionOfRequiredInterfaces().get(requiredInterfaceName); componentInstances.push(instance); } } return components; } /** * Computes a String of component names that appear in the composition which can be used as an identifier for the composition * * @param composition * @return String of all component names in right to left depth-first order */ public static String getComponentNamesOfComposition(final ComponentInstance composition) { StringBuilder builder = new StringBuilder(); Deque<ComponentInstance> componentInstances = new ArrayDeque<>(); componentInstances.push(composition); ComponentInstance curInstance; while (!componentInstances.isEmpty()) { curInstance = componentInstances.pop(); builder.append(curInstance.getComponent().getName()); Map<String, String> requiredInterfaces = curInstance.getComponent().getRequiredInterfaces(); // This set should be ordered Set<String> requiredInterfaceNames = requiredInterfaces.keySet(); for (String requiredInterfaceName : requiredInterfaceNames) { ComponentInstance instance = curInstance.getSatisfactionOfRequiredInterfaces().get(requiredInterfaceName); componentInstances.push(instance); } } return builder.toString(); } /** * Computes a list of all components of the given composition. * * @param composition * @return List of components in right to left depth-first order */ public static List<Component> getComponentsOfComposition(final ComponentInstance composition) { List<Component> components = new LinkedList<>(); Deque<ComponentInstance> componentInstances = new ArrayDeque<>(); componentInstances.push(composition); ComponentInstance curInstance; while (!componentInstances.isEmpty()) { curInstance = componentInstances.pop(); components.add(curInstance.getComponent()); Map<String, String> requiredInterfaces = curInstance.getComponent().getRequiredInterfaces(); // This set should be ordered Set<String> requiredInterfaceNames = requiredInterfaces.keySet(); for (String requiredInterfaceName : requiredInterfaceNames) { ComponentInstance instance = curInstance.getSatisfactionOfRequiredInterfaces().get(requiredInterfaceName); componentInstances.push(instance); } } return components; } public static Map<Parameter, IParameterDomain> getUpdatedDomainsOfComponentParameters(final Monom state, final Component component, final String objectIdentifierInState) { Map<String, String> parameterContainerMap = new HashMap<>(); Map<String, String> parameterContainerMapInv = new HashMap<>(); Map<String, String> parameterValues = new HashMap<>(); /* detect containers for parameter values, and register the values of the data containers */ for (Literal l : state) { String[] params = l.getParameters().stream().map(LiteralParam::getName).collect(Collectors.toList()).toArray(new String[] {}); switch (l.getPropertyName()) { case LITERAL_PARAMCONTAINER: if (!params[2].equals(objectIdentifierInState)) { continue; } parameterContainerMap.put(params[1], params[3]); parameterContainerMapInv.put(params[3], params[1]); break; case LITERAL_VAL: parameterValues.put(params[0], params[1]); break; default: // ignore other literals break; } } /* determine current values of the parameters of this component instance */ Map<Parameter, String> paramValuesForThisComponentInstance = new HashMap<>(); for (Parameter p : component.getParameters()) { if (!parameterContainerMap.containsKey(p.getName())) { throw new IllegalStateException("The data container for parameter " + p.getName() + " of " + objectIdentifierInState + " is not defined!"); } String assignedValue = parameterValues.get(parameterContainerMap.get(p.getName())); if (assignedValue == null) { throw new IllegalStateException("No value has been assigned to parameter " + p.getName() + " stored in container " + parameterContainerMap.get(p.getName()) + " in state " + state); } String value = getParamValue(p, assignedValue, false); assert value != null : "Determined value NULL for parameter " + p.getName() + ", which is not plausible."; paramValuesForThisComponentInstance.put(p, value); } /* extract instance */ Collection<Component> components = new ArrayList<>(); components.add(component); ComponentInstance instance = getComponentInstanceFromState(components, state, objectIdentifierInState, false); /* now compute the new domains based on the current values */ return getUpdatedDomainsOfComponentParameters(instance); } private static String getParamValue(final Parameter p, final String assignedValue, final boolean resolveIntervals) { if (assignedValue == null) { throw new IllegalArgumentException("Cannot determine true value for assigned param value " + assignedValue + " for parameter " + p.getName()); } String interpretedValue = ""; if (p.isNumeric()) { if (resolveIntervals) { NumericParameterDomain np = (NumericParameterDomain) p.getDefaultDomain(); List<String> vals = SetUtil.unserializeList(assignedValue); Interval interval = new Interval(Double.valueOf(vals.get(0)), Double.valueOf(vals.get(1))); if (np.isInteger()) { interpretedValue = String.valueOf((int) Math.round(interval.getBarycenter())); } else { interpretedValue = String.valueOf(interval.checkPoint((double) p.getDefaultValue(), 0.001) == Location.INSIDE ? (double) p.getDefaultValue() : interval.getBarycenter()); } } else { interpretedValue = assignedValue; } } else if (p.getDefaultDomain() instanceof CategoricalParameterDomain) { interpretedValue = assignedValue; } else { throw new UnsupportedOperationException("No support for parameters of type " + p.getClass().getName()); } return interpretedValue; } public static Map<Parameter, IParameterDomain> getUpdatedDomainsOfComponentParameters(final ComponentInstance componentInstance) { Component component = componentInstance.getComponent(); /* initialize all params for which a decision has been made already with their respective value */ Map<Parameter, IParameterDomain> domains = new HashMap<>(); for (Parameter p : componentInstance.getParametersThatHaveBeenSetExplicitly()) { if (p.isNumeric()) { NumericParameterDomain defaultDomain = (NumericParameterDomain) p.getDefaultDomain(); Interval interval = SetUtil.unserializeInterval(componentInstance.getParameterValue(p)); domains.put(p, new NumericParameterDomain(defaultDomain.isInteger(), interval.getInf(), interval.getSup())); } else if (p.isCategorical()) { domains.put(p, new CategoricalParameterDomain(new String[] { componentInstance.getParameterValue(p) })); } } /* initialize all others with the default domain */ for (Parameter p : componentInstance.getParametersThatHaveNotBeenSetExplicitly()) { domains.put(p, p.getDefaultDomain()); } assert (domains.keySet().equals(component.getParameters())) : "There are parameters for which no current domain was derived."; /* update domains based on the dependencies defined for this component */ for (Dependency dependency : component.getDependencies()) { if (isDependencyPremiseSatisfied(dependency, domains)) { logger.info("Premise of dependency {} is satisfied, applying its conclusions ...", dependency); for (Pair<Parameter, IParameterDomain> newDomain : dependency.getConclusion()) { /* * directly use the concluded domain if the current value is NOT subsumed by it. Otherwise, just * stick to the current domain */ Parameter param = newDomain.getX(); IParameterDomain concludedDomain = newDomain.getY(); if (!componentInstance.getParametersThatHaveBeenSetExplicitly().contains(param)) { domains.put(param, concludedDomain); logger.debug("Changing domain of {} from {} to {}", param, domains.get(param), concludedDomain); } else { logger.debug("Not changing domain of {} since it has already been set explicitly in the past.", param); } } } else { logger.debug("Ignoring unsatisfied dependency {}.", dependency); } } return domains; } public static boolean isDependencyPremiseSatisfied(final Dependency dependency, final Map<Parameter, IParameterDomain> values) { logger.debug("Checking satisfcation of dependency {} with values {}", dependency, values); for (Collection<Pair<Parameter, IParameterDomain>> condition : dependency.getPremise()) { boolean check = isDependencyConditionSatisfied(condition, values); logger.trace("Result of check for condition {}: {}", condition, check); if (!check) { return false; } } return true; } public static boolean isDependencyConditionSatisfied(final Collection<Pair<Parameter, IParameterDomain>> condition, final Map<Parameter, IParameterDomain> values) { for (Pair<Parameter, IParameterDomain> conditionItem : condition) { Parameter param = conditionItem.getX(); if (!values.containsKey(param)) { throw new IllegalArgumentException("Cannot check condition " + condition + " as the value for parameter " + param.getName() + " is not defined in " + values); } if (values.get(param) == null) { throw new IllegalArgumentException("Cannot check condition " + condition + " as the value for parameter " + param.getName() + " is NULL in " + values); } IParameterDomain requiredDomain = conditionItem.getY(); IParameterDomain actualDomain = values.get(param); if (!requiredDomain.subsumes(actualDomain)) { return false; } } return true; } public static List<Interval> getNumericParameterRefinement(final Interval interval, final double focus, final boolean integer, final ParameterRefinementConfiguration refinementConfig) { double inf = interval.getInf(); double sup = interval.getSup(); /* if there is nothing to refine anymore */ if (inf == sup) { return new ArrayList<>(); } /* * if this is an integer and the number of comprised integers are at most as * many as the branching factor, enumerate them */ if (integer && (Math.floor(sup) - Math.ceil(inf) + 1 <= refinementConfig.getRefinementsPerStep())) { List<Interval> proposedRefinements = new ArrayList<>(); for (int i = (int) Math.ceil(inf); i <= (int) Math.floor(sup); i++) { proposedRefinements.add(new Interval(i, i)); } return proposedRefinements; } /* * if the interval is already below the threshold for this parameter, no more * refinements will be allowed */ if (sup - inf < refinementConfig.getIntervalLength()) { return new ArrayList<>(); } if (!refinementConfig.isInitRefinementOnLogScale()) { List<Interval> proposedRefinements = refineOnLinearScale(interval, refinementConfig.getRefinementsPerStep(), refinementConfig.getIntervalLength()); for (Interval proposedRefinement : proposedRefinements) { assert proposedRefinement.getInf() >= inf && proposedRefinement.getSup() <= sup : "The proposed refinement [" + proposedRefinement.getInf() + ", " + proposedRefinement.getSup() + "] is not a sub-interval of [" + inf + ", " + sup + "]."; if (proposedRefinement.equals(interval)) { throw new IllegalStateException("No real refinement! Intervals are identical."); } } return proposedRefinements; } List<Interval> proposedRefinements = refineOnLogScale(interval, refinementConfig.getRefinementsPerStep(), 2, focus); for (Interval proposedRefinement : proposedRefinements) { double epsilon = 1E-7; assert proposedRefinement.getInf() + epsilon >= inf && proposedRefinement.getSup() <= sup + epsilon : "The proposed refinement [" + proposedRefinement.getInf() + ", " + proposedRefinement.getSup() + "] is not a sub-interval of [" + inf + ", " + sup + "]."; if (proposedRefinement.equals(interval)) { throw new IllegalStateException("No real refinement! Intervals are identical."); } } return proposedRefinements; } public static List<Interval> refineOnLinearScale(final Interval interval, final int maxNumberOfSubIntervals, final double minimumLengthOfIntervals) { double min = interval.getInf(); double max = interval.getSup(); double length = max - min; List<Interval> intervals = new ArrayList<>(); /* if no refinement is possible, return just the interval itself */ if (length <= minimumLengthOfIntervals) { intervals.add(interval); return intervals; } /* otherwise compute the sub-intervals */ int numberOfIntervals = Math.min((int) Math.ceil(length / minimumLengthOfIntervals), maxNumberOfSubIntervals); double stepSize = length / numberOfIntervals; for (int i = 0; i < numberOfIntervals; i++) { intervals.add(new Interval(min + i * stepSize, min + ((i + 1) * stepSize))); } return intervals; } public static List<Interval> refineOnLogScale(final Interval interval, final int n, final double basis, final double pointOfConcentration) { List<Interval> list = new ArrayList<>(); double min = interval.getInf(); double max = interval.getSup(); double length = max - min; /* * if the point of concentration is exactly on the left or the right of the * interval, conduct the standard technique */ if (pointOfConcentration <= min || pointOfConcentration >= max) { double lengthOfShortestInterval = length * (1 - basis) / (1 - Math.pow(basis, n)); if (pointOfConcentration <= min) { double endOfLast = min; for (int i = 0; i < n; i++) { double start = endOfLast; endOfLast = start + Math.pow(basis, i) * lengthOfShortestInterval; list.add(new Interval(start, endOfLast)); } } else { double endOfLast = max; for (int i = 0; i < n; i++) { double start = endOfLast; endOfLast = start - Math.pow(basis, i) * lengthOfShortestInterval; list.add(new Interval(endOfLast, start)); } Collections.reverse(list); } return list; } /* * if the point of concentration is in the inner of the interval, split the * interval correspondingly and recursively solve the problem */ double distanceFromMinToFocus = Math.abs(interval.getInf() - pointOfConcentration); int segmentsForLeft = (int) Math.max(1, Math.floor(n * distanceFromMinToFocus / length)); int segmentsForRight = n - segmentsForLeft; list.addAll(refineOnLogScale(new Interval(min, pointOfConcentration), segmentsForLeft, basis, pointOfConcentration)); list.addAll(refineOnLogScale(new Interval(pointOfConcentration, max), segmentsForRight, basis, pointOfConcentration)); return list; } public static void refineRecursively(final Interval interval, final int maxNumberOfSubIntervalsPerRefinement, final double basis, final double pointOfConcentration, final double factorForMaximumLengthOfFinestIntervals) { /* first, do a logarithmic refinement */ List<Interval> initRefinement = refineOnLogScale(interval, maxNumberOfSubIntervalsPerRefinement, basis, pointOfConcentration); Collections.reverse(initRefinement); Deque<Interval> openRefinements = new LinkedList<>(); openRefinements.addAll(initRefinement); int depth = 0; do { Interval intervalToRefine = openRefinements.pop(); if (logger.isInfoEnabled()) { StringBuilder offsetSB = new StringBuilder(); for (int i = 0; i < depth; i++) { offsetSB.append("\t"); } logger.info("{}[{}, {}]", offsetSB, intervalToRefine.getInf(), intervalToRefine.getSup()); } /* compute desired granularity for this specific interval */ double distanceToPointOfContentration = Math.min(Math.abs(intervalToRefine.getInf() - pointOfConcentration), Math.abs(intervalToRefine.getSup() - pointOfConcentration)); double maximumLengthOfFinestIntervals = Math.pow(distanceToPointOfContentration + 1, 2) * factorForMaximumLengthOfFinestIntervals; logger.info("{} * {} = {}", Math.pow(distanceToPointOfContentration + 1, 2), factorForMaximumLengthOfFinestIntervals, maximumLengthOfFinestIntervals); List<Interval> refinements = refineOnLinearScale(intervalToRefine, maxNumberOfSubIntervalsPerRefinement, maximumLengthOfFinestIntervals); depth++; if (refinements.size() == 1 && refinements.get(0).equals(intervalToRefine)) { depth--; } else { Collections.reverse(refinements); openRefinements.addAll(refinements); } } while (!openRefinements.isEmpty()); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/eventlogger/HASCOSQLEventLogger.java
package ai.libs.hasco.eventlogger; import java.sql.SQLException; import java.text.SimpleDateFormat; import java.time.Instant; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import org.api4.java.datastructure.kvstore.IKVStore; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.eventbus.Subscribe; import ai.libs.hasco.events.HASCORunStartedEvent; import ai.libs.hasco.events.HASCORunTerminatedEvent; import ai.libs.hasco.events.HASCOSolutionEvaluationEvent; import ai.libs.jaicore.db.sql.SQLAdapter; public class HASCOSQLEventLogger<T, V extends Comparable<V>> { private static final String MSG_EXCEPTION = "Observed exception: {}"; private Logger logger = LoggerFactory.getLogger(HASCOSQLEventLogger.class); private int runId; private final SQLAdapter sqlAdapter; public HASCOSQLEventLogger(final SQLAdapter sqlAdapter) { super(); this.sqlAdapter = sqlAdapter; /* initialize tables if not existent */ try { List<IKVStore> rs = sqlAdapter.getResultsOfQuery("SHOW TABLES"); boolean haveRunTable = false; boolean haveEvaluationTable = false; for (IKVStore store : rs) { Optional<String> tableNameKeyOpt = store.keySet().stream().filter(x -> x.startsWith("Table_in")).findFirst(); if (tableNameKeyOpt.isPresent()) { String tableName = store.getAsString(tableNameKeyOpt.get()); if (tableName.equals("runs")) { haveRunTable = true; } else if (tableName.equals("evaluations")) { haveEvaluationTable = true; } } } if (!haveRunTable) { this.logger.info("Creating table for runs"); sqlAdapter.update( "CREATE TABLE `runs` ( `run_id` int(8) NOT NULL AUTO_INCREMENT, `seed` int(20) NOT NULL, `timeout` int(10) NOT NULL, `CPUs` int(2) NOT NULL, `benchmark` varchar(200) COLLATE utf8_bin DEFAULT NULL, `run_started` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `run_terminated` timestamp NULL DEFAULT NULL, `solution` json DEFAULT NULL, `score` double DEFAULT NULL, PRIMARY KEY (`run_id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin", new ArrayList<>()); } if (!haveEvaluationTable) { this.logger.info("Creating table for evaluations"); sqlAdapter.update("CREATE TABLE `evaluations` (\r\n" + " `evaluation_id` int(10) NOT NULL AUTO_INCREMENT,\r\n" + " `run_id` int(8) NOT NULL,\r\n" + " `composition` json NOT NULL,\r\n" + " `score` double NOT NULL,\r\n" + " PRIMARY KEY (`evaluation_id`)\r\n" + ") ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin", new ArrayList<>()); } } catch (SQLException e) { this.logger.error(MSG_EXCEPTION, e); } } @Subscribe public void receiveRunStartedEvent(final HASCORunStartedEvent<T, V> event) { try { Map<String, String> map = new HashMap<>(); map.put("seed", "" + event.getSeed()); map.put("timeout", "" + event.getTimeout()); map.put("CPUs", "" + event.getNumberOfCPUS()); map.put("benchmark", event.getBenchmark().toString()); this.runId = this.sqlAdapter.insert("runs", map)[0]; } catch (Exception e) { this.logger.error(MSG_EXCEPTION, e); } } @Subscribe public void receiveSolutionEvaluationEvent(final HASCOSolutionEvaluationEvent<T, V> solution) { try { Map<String, String> map = new HashMap<>(); map.put("run_id", "" + this.runId); ObjectMapper mapper = new ObjectMapper(); String composition = mapper.writeValueAsString(solution.getComposition()); map.put("composition", composition); map.put("score", solution.getScore().toString()); this.sqlAdapter.insert("evaluations", map); } catch (Exception e) { this.logger.error(MSG_EXCEPTION, e); } } @Subscribe public void receiveRunTerminatedEvent(final HASCORunTerminatedEvent<T, V> event) { try { Map<String, String> valueMap = new HashMap<>(); valueMap.put("solution", "" + new ObjectMapper().writeValueAsString(event.getCompositionOfSolution())); valueMap.put("run_terminated", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Date.from(Instant.now()))); valueMap.put("score", event.getScore().toString()); Map<String, String> conditionMap = new HashMap<>(); conditionMap.put("run_id", "" + this.runId); this.sqlAdapter.update("runs", valueMap, conditionMap); } catch (Exception e) { this.logger.error(MSG_EXCEPTION, e); } } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/events/HASCORunStartedEvent.java
package ai.libs.hasco.events; import org.api4.java.algorithm.IAlgorithm; import org.api4.java.common.attributedobjects.IObjectEvaluator; import ai.libs.jaicore.basic.algorithm.AlgorithmInitializedEvent; public class HASCORunStartedEvent<T, V extends Comparable<V>> extends AlgorithmInitializedEvent { private final int seed; private final int timeout; private final int numberOfCPUS; private IObjectEvaluator<T, V> benchmark; public HASCORunStartedEvent(final IAlgorithm<?, ?> algorithm, final int seed, final int timeout, final int numberOfCPUS, final IObjectEvaluator<T, V> benchmark) { super(algorithm); this.seed = seed; this.timeout = timeout; this.numberOfCPUS = numberOfCPUS; this.benchmark = benchmark; } public IObjectEvaluator<T, V> getBenchmark() { return this.benchmark; } public void setBenchmark(final IObjectEvaluator<T, V> benchmark) { this.benchmark = benchmark; } public int getSeed() { return this.seed; } public int getTimeout() { return this.timeout; } public int getNumberOfCPUS() { return this.numberOfCPUS; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/events/HASCORunTerminatedEvent.java
package ai.libs.hasco.events; import ai.libs.hasco.model.ComponentInstance; public class HASCORunTerminatedEvent<T, V extends Comparable<V>> { private final T returnedSolution; private final ComponentInstance compositionOfSolution; private final V score; public HASCORunTerminatedEvent(ComponentInstance composition, T returnedSolution, V score) { super(); this.compositionOfSolution = composition; this.returnedSolution = returnedSolution; this.score = score; } public ComponentInstance getCompositionOfSolution() { return compositionOfSolution; } public T getReturnedSolution() { return returnedSolution; } public V getScore() { return score; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/events/HASCOSolutionEvaluationEvent.java
package ai.libs.hasco.events; import ai.libs.hasco.model.ComponentInstance; public class HASCOSolutionEvaluationEvent<T, V extends Comparable<V>> { private final ComponentInstance composition; private final T solution; private final V score; public HASCOSolutionEvaluationEvent(ComponentInstance composition, T solution, V score) { super(); this.composition = composition; this.solution = solution; this.score = score; } public ComponentInstance getComposition() { return composition; } public T getSolution() { return solution; } public V getScore() { return score; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/events/HASCOSolutionEvent.java
package ai.libs.hasco.events; import org.api4.java.algorithm.IAlgorithm; import org.api4.java.algorithm.events.result.IScoredSolutionCandidateFoundEvent; import ai.libs.hasco.core.HASCOSolutionCandidate; import ai.libs.jaicore.basic.algorithm.ASolutionCandidateFoundEvent; public class HASCOSolutionEvent<V extends Comparable<V>> extends ASolutionCandidateFoundEvent<HASCOSolutionCandidate<V>> implements IScoredSolutionCandidateFoundEvent<HASCOSolutionCandidate<V>, V> { public HASCOSolutionEvent(final IAlgorithm<?, ?> algorithm, final HASCOSolutionCandidate<V> solutionCandidate) { super(algorithm, solutionCandidate); } @Override public V getScore() { return this.getSolutionCandidate().getScore(); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/events/TwoPhaseHASCOPhaseSwitchEvent.java
package ai.libs.hasco.events; import org.api4.java.algorithm.IAlgorithm; import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent; public class TwoPhaseHASCOPhaseSwitchEvent extends AAlgorithmEvent { public TwoPhaseHASCOPhaseSwitchEvent(final IAlgorithm<?, ?> algorithm) { super(algorithm); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/exceptions/ComponentInstantiationFailedException.java
package ai.libs.hasco.exceptions; @SuppressWarnings("serial") public class ComponentInstantiationFailedException extends Exception { public ComponentInstantiationFailedException(Throwable cause, String message) { super(message, cause); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui/civiewplugin/TFDNodeAsCIViewInfoGenerator.java
package ai.libs.hasco.gui.civiewplugin; import java.util.Collection; import java.util.Map.Entry; import ai.libs.hasco.core.Util; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.model.Parameter; import ai.libs.jaicore.graphvisualizer.plugin.nodeinfo.NodeInfoGenerator; import ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode; import ai.libs.jaicore.search.model.travesaltree.BackPointerPath; /** * This info generator is meant to be used in combination with the node info plug-in. * * @author wever */ public class TFDNodeAsCIViewInfoGenerator implements NodeInfoGenerator<BackPointerPath<TFDNode, String, Double>> { private Collection<Component> components; public TFDNodeAsCIViewInfoGenerator(final Collection<Component> components) { this.components = components; } @Override public String generateInfoForNode(final BackPointerPath<TFDNode, String, Double> node) { ComponentInstance ci = Util.getSolutionCompositionFromState(this.components, node.getHead().getState(), true); if (ci == null) { return "<i>No component has been chosen, yet.</i>"; } else { return this.visualizeComponentInstance(ci); } } private String visualizeComponentInstance(final ComponentInstance ci) { StringBuilder sb = new StringBuilder(); sb.append("<div style=\"border: 1px solid #333; padding: 10px; font-family: Arial, non-serif;\">"); /* add the name of the component */ sb.append("<div style=\"text-align: center;font-size: 18px; font-weight: bold;\">" + ci.getComponent().getName() + "</div>"); sb.append("<table style=\"width: 100%;\">"); sb.append("<tr style=\"background: #e0e0e0;\"><th>Parameter</th><th>Value</th></tr>"); int i = 0; for (Parameter parameter : ci.getComponent().getParameters()) { if (i % 2 == 0) { sb.append("<tr style=\"background: #f2f2f2;\">"); } else { sb.append("<tr style=\"background: #efefef;\">"); } sb.append("<td>" + parameter.getName() + "</td>"); sb.append("<td>" + (ci.getParameterValues().containsKey(parameter.getName()) ? ci.getParameterValue(parameter) : "not yet set") + "</td>"); sb.append("</tr>"); i++; } sb.append("</table>"); for (Entry<String, ComponentInstance> subComponent : ci.getSatisfactionOfRequiredInterfaces().entrySet()) { sb.append(subComponent.getKey()); sb.append(this.visualizeComponentInstance(subComponent.getValue())); } sb.append("</div>"); return sb.toString(); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui/statsplugin/ComponentInstanceSerializer.java
package ai.libs.hasco.gui.statsplugin; import java.io.IOException; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import ai.libs.hasco.model.ComponentInstance; public class ComponentInstanceSerializer { private ObjectMapper objectMapper; public ComponentInstanceSerializer() { initializeObjectMapper(); } public String serializeComponentInstance(ComponentInstance componentInstance) throws JsonProcessingException { return objectMapper.writeValueAsString(componentInstance); } public ComponentInstance deserializeComponentInstance(String serializedComponentInstance) throws IOException { return objectMapper.readValue(serializedComponentInstance, ComponentInstance.class); } private void initializeObjectMapper() { objectMapper = new ObjectMapper(); objectMapper.setVisibility(PropertyAccessor.ALL, Visibility.NONE); objectMapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY); // make sure that the object mapper stores type information when serializing objects objectMapper.enableDefaultTyping(); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui/statsplugin/HASCOModelStatisticsComponentCell.java
package ai.libs.hasco.gui.statsplugin; import javafx.scene.control.Label; import javafx.scene.control.TreeCell; import javafx.scene.control.TreeView; import javafx.scene.layout.HBox; /** * * @author fmohr * * This class provides the cells for the trees in this view. They are composed of a label with the name of the required interface and the combo box with the available components. * */ public class HASCOModelStatisticsComponentCell extends TreeCell<HASCOModelStatisticsComponentSelector> { private final TreeView<HASCOModelStatisticsComponentSelector> tv; public HASCOModelStatisticsComponentCell(TreeView<HASCOModelStatisticsComponentSelector> tv) { super(); this.tv = tv; } @Override public void updateItem(HASCOModelStatisticsComponentSelector item, boolean empty) { super.updateItem(item, empty); if (empty) { setGraphic(null); return; } if (item != null) { String requiredInterface = item.getRequiredInterface(); HBox entry = new HBox(); entry.getChildren().add(new Label((requiredInterface != null ? requiredInterface : "Root") + ": ")); entry.getChildren().add(item.getComponentSelector()); setGraphic(entry); } } public TreeView<HASCOModelStatisticsComponentSelector> getTv() { return tv; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui/statsplugin/HASCOModelStatisticsComponentSelector.java
package ai.libs.hasco.gui.statsplugin; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.model.UnparametrizedComponentInstance; import ai.libs.jaicore.basic.sets.Pair; import ai.libs.jaicore.graphvisualizer.plugin.solutionperformanceplotter.ScoredSolutionCandidateInfo; import javafx.application.Platform; import javafx.collections.ObservableList; import javafx.scene.control.ComboBox; import javafx.scene.control.TreeItem; /** * @author fmohr * * This class represents a logical entry of the tree. * * It holds a listener for its combo box that updates the sub-tree and the histogram if a filter is set. */ public class HASCOModelStatisticsComponentSelector extends TreeItem<HASCOModelStatisticsComponentSelector> { private static final Logger logger = LoggerFactory.getLogger(HASCOModelStatisticsComponentSelector.class); private final HASCOModelStatisticsComponentSelector parent; private final String requiredInterface; private final ComboBox<String> componentSelector; private final HASCOModelStatisticsPluginModel model; public HASCOModelStatisticsComponentSelector(final HASCOModelStatisticsPluginView rootView, final HASCOModelStatisticsPluginModel model) { this(rootView, null, null, model); } public HASCOModelStatisticsComponentSelector(final HASCOModelStatisticsPluginView rootView, final HASCOModelStatisticsComponentSelector parent, final String requiredInterface, final HASCOModelStatisticsPluginModel model) { this.parent = parent; this.requiredInterface = requiredInterface; this.model = model; this.componentSelector = new ComboBox<>(); this.componentSelector.getItems().add("*"); this.componentSelector.setValue("*"); this.componentSelector.valueProperty().addListener((observable, oldValue, newValue) -> { HASCOModelStatisticsComponentSelector.this.getChildren().clear(); if (!newValue.equals("*")) { Map<String, String> requiredInterfacesOfThisChoice = model.getKnownComponents().get(newValue).getRequiredInterfaces(); for (String requiredInterfaceId : requiredInterfacesOfThisChoice.keySet()) { HASCOModelStatisticsComponentSelector.this.getChildren().add(new HASCOModelStatisticsComponentSelector(rootView, HASCOModelStatisticsComponentSelector.this, requiredInterfaceId, model)); } } rootView.updateHistogram(); }); this.update(); this.setValue(this); // set the value to itself. This is necessary so that the cell factory really retrieves this object as the node this.setExpanded(true); } /** * This recursively updates the whole tree view under this node with respect to the current selections. * * This method is currently not too efficient, because it always iterates over all solutions, but it is still fast enough. */ public void update() { long start = System.currentTimeMillis(); List<Pair<String, String>> selectionPath = this.getSelectionsOnPathToRoot(); List<String> reqInterfacePath = selectionPath.stream().map(Pair::getX).collect(Collectors.toList()); reqInterfacePath.remove(0); // this is null and only needed as a selector in the selectionPath ObservableList<String> items = this.componentSelector.getItems(); for (ScoredSolutionCandidateInfo scoredSolutionCandidateInfo : this.model.getAllSeenSolutionCandidateFoundInfosUnordered()) { ComponentInstance ci = this.model.deserializeComponentInstance(scoredSolutionCandidateInfo.getSolutionCandidateRepresentation()); if (!ci.matchesPathRestriction(selectionPath)) { continue; } /* determine sub-component relevant for this path and add the respective component lexicographically correctly (unless it is already in the list) */ UnparametrizedComponentInstance uci = new UnparametrizedComponentInstance(ci).getSubComposition(reqInterfacePath); if (this.componentSelector.getItems().contains(uci.getComponentName())) { continue; } logger.trace("Relevant UCI of {} for path {} is {}", ci, reqInterfacePath, uci); int n = items.size(); String nameOfNewComponent = uci.getComponentName(); for (int i = 0; i <= n; i++) { if (i == n || items.get(i).compareTo(nameOfNewComponent) >= 0) { final int index = i; Platform.runLater(() -> items.add(index, nameOfNewComponent)); break; } } } this.getChildren().forEach(ti -> ti.getValue().update()); long duration = System.currentTimeMillis() - start; logger.debug("Update of {} took {}ms", this, duration); } /** * Resets the combo box to the wild-card and removes all child nodes. */ public void clear() { this.componentSelector.getItems().removeIf(s -> !s.equals("*")); this.getChildren().clear(); } /** * Gets the choices made in the combo boxes on the path from the root to here. The first entry has a null-key just saying what the choice for the root component has been. * * @return List of choices. */ public List<Pair<String, String>> getSelectionsOnPathToRoot() { List<Pair<String, String>> path = this.parent != null ? this.parent.getSelectionsOnPathToRoot() : new ArrayList<>(); path.add(new Pair<>(this.requiredInterface, this.componentSelector.getValue())); return path; } /** * Determines the set of all selection paths from here to a any leaf. For the root node, this is the set of constraints specified in the combo boxes. * * @return Collection of paths to leafs. */ public Collection<List<Pair<String, String>>> getAllSelectionsOnPathToAnyLeaf() { Collection<List<Pair<String, String>>> subPaths = new ArrayList<>(); if (this.getChildren().isEmpty()) { List<Pair<String, String>> leafRestriction = new ArrayList<>(); leafRestriction.add(new Pair<>(this.requiredInterface, this.componentSelector.getValue())); subPaths.add(leafRestriction); return subPaths; } for (TreeItem<HASCOModelStatisticsComponentSelector> child : this.getChildren()) { subPaths.addAll(child.getValue().getAllSelectionsOnPathToAnyLeaf()); } return subPaths.stream().map(p -> { p.add(0, new Pair<>(this.requiredInterface, this.componentSelector.getValue())); return p; }).collect(Collectors.toList()); } public String getRequiredInterface() { return this.requiredInterface; } public ComboBox<String> getComponentSelector() { return this.componentSelector; } @Override public String toString() { return "HASCOModelStatisticsComponentSelector"; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui/statsplugin/HASCOModelStatisticsPlugin.java
package ai.libs.hasco.gui.statsplugin; import java.util.Arrays; import java.util.Collection; import ai.libs.jaicore.graphvisualizer.events.recorder.property.AlgorithmEventPropertyComputer; import ai.libs.jaicore.graphvisualizer.plugin.ASimpleMVCPlugin; import ai.libs.jaicore.graphvisualizer.plugin.solutionperformanceplotter.ScoredSolutionCandidateInfoAlgorithmEventPropertyComputer; import ai.libs.jaicore.search.gui.plugins.rollouthistograms.RolloutInfoAlgorithmEventPropertyComputer; /** * * @author fmohr * * The main class of this plugin. Add instances of this plugin to the visualization window. */ public class HASCOModelStatisticsPlugin extends ASimpleMVCPlugin<HASCOModelStatisticsPluginModel, HASCOModelStatisticsPluginView, HASCOModelStatisticsPluginController> { public HASCOModelStatisticsPlugin() { super(); } @Override public Collection<AlgorithmEventPropertyComputer> getPropertyComputers() { return Arrays.asList(new RolloutInfoAlgorithmEventPropertyComputer(), new ScoredSolutionCandidateInfoAlgorithmEventPropertyComputer(new HASCOSolutionCandidateRepresenter())); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui/statsplugin/HASCOModelStatisticsPluginController.java
package ai.libs.hasco.gui.statsplugin; import org.api4.java.algorithm.events.serializable.IPropertyProcessedAlgorithmEvent; import ai.libs.hasco.events.HASCOSolutionEvent; import ai.libs.jaicore.graphvisualizer.plugin.ASimpleMVCPluginController; import ai.libs.jaicore.graphvisualizer.plugin.solutionperformanceplotter.ScoredSolutionCandidateInfo; import ai.libs.jaicore.graphvisualizer.plugin.solutionperformanceplotter.ScoredSolutionCandidateInfoAlgorithmEventPropertyComputer; /** * * @author fmohr * * The controller of the HASCOModelStatisticsPlugin * */ public class HASCOModelStatisticsPluginController extends ASimpleMVCPluginController<HASCOModelStatisticsPluginModel, HASCOModelStatisticsPluginView> { public HASCOModelStatisticsPluginController(final HASCOModelStatisticsPluginModel model, final HASCOModelStatisticsPluginView view) { super(model, view); } @Override protected void handleAlgorithmEventInternally(final IPropertyProcessedAlgorithmEvent algorithmEvent) { if (algorithmEvent.correspondsToEventOfClass(HASCOSolutionEvent.class)) { Object rawScoredSolutionCandidateInfo = algorithmEvent.getProperty(ScoredSolutionCandidateInfoAlgorithmEventPropertyComputer.SCORED_SOLUTION_CANDIDATE_INFO_PROPERTY_NAME); if (rawScoredSolutionCandidateInfo != null) { ScoredSolutionCandidateInfo scoredSolutionCandidateInfo = (ScoredSolutionCandidateInfo) rawScoredSolutionCandidateInfo; this.getModel().addEntry(scoredSolutionCandidateInfo); } } } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui/statsplugin/HASCOModelStatisticsPluginModel.java
package ai.libs.hasco.gui.statsplugin; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.ComponentInstance; import ai.libs.hasco.model.UnparametrizedComponentInstance; import ai.libs.jaicore.graphvisualizer.plugin.ASimpleMVCPluginModel; import ai.libs.jaicore.graphvisualizer.plugin.solutionperformanceplotter.ScoredSolutionCandidateInfo; /** * * @author fmohr * * Holds all the information to supply the HASCOModelStatisticsPluginView with what it needs. */ public class HASCOModelStatisticsPluginModel extends ASimpleMVCPluginModel<HASCOModelStatisticsPluginView, HASCOModelStatisticsPluginController> { private static final Logger LOGGER = LoggerFactory.getLogger(HASCOModelStatisticsPluginModel.class); private ComponentInstanceSerializer componentInstanceSerializer = new ComponentInstanceSerializer(); private final Map<UnparametrizedComponentInstance, List<ScoredSolutionCandidateInfo>> observedSolutionsGroupedModuloParameters = new HashMap<>(); private final Map<String, Component> knownComponents = new HashMap<>(); /** * Informs the plugin about a new HASCOSolution. This solution will be considered in the combo boxes as well as in the histogram. * * @param solutionEvent */ public final void addEntry(final ScoredSolutionCandidateInfo scoredSolutionCandidateInfo) { ComponentInstance ci = this.deserializeComponentInstance(scoredSolutionCandidateInfo.getSolutionCandidateRepresentation()); if (ci == null) { return; } UnparametrizedComponentInstance uci = new UnparametrizedComponentInstance(ci); if (!this.observedSolutionsGroupedModuloParameters.containsKey(uci)) { this.observedSolutionsGroupedModuloParameters.put(uci, new ArrayList<>()); } this.observedSolutionsGroupedModuloParameters.get(uci).add(scoredSolutionCandidateInfo); ci.getContainedComponents().forEach(c -> { if (!this.knownComponents.containsKey(c.getName())) { this.knownComponents.put(c.getName(), c); } }); this.getView().update(); } /** * Gets an (unordered) collection of the solutions received so far. * * @return Collection of solutions. */ public Collection<ScoredSolutionCandidateInfo> getAllSeenSolutionCandidateFoundInfosUnordered() { List<ScoredSolutionCandidateInfo> solutionEvents = new ArrayList<>(); this.observedSolutionsGroupedModuloParameters.values().forEach(solutionEvents::addAll); return solutionEvents; } /** * @return A map that assigns, for each known component, its name to the Component object. */ public Map<String, Component> getKnownComponents() { return this.knownComponents; } /** * * @param composition * @return */ public DescriptiveStatistics getPerformanceStatisticsForComposition(final UnparametrizedComponentInstance composition) { DescriptiveStatistics stats = new DescriptiveStatistics(); this.observedSolutionsGroupedModuloParameters.get(composition).forEach(e -> stats.addValue(this.parseScoreToDouble(e.getScore()))); return stats; } /** * Clears the model (and subsequently the view) */ @Override public void clear() { this.observedSolutionsGroupedModuloParameters.clear(); this.knownComponents.clear(); this.getView().clear(); } public ComponentInstance deserializeComponentInstance(final String serializedComponentInstance) { try { return this.componentInstanceSerializer.deserializeComponentInstance(serializedComponentInstance); } catch (IOException e) { LOGGER.warn("Cannot deserialize component instance {}.", serializedComponentInstance, e); } return null; } public double parseScoreToDouble(final String score) { return Double.parseDouble(score); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui/statsplugin/HASCOModelStatisticsPluginView.java
package ai.libs.hasco.gui.statsplugin; import java.util.Collection; import java.util.List; import java.util.stream.Collectors; import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; import ai.libs.jaicore.basic.sets.Pair; import ai.libs.jaicore.graphvisualizer.events.gui.Histogram; import ai.libs.jaicore.graphvisualizer.plugin.ASimpleMVCPluginView; import ai.libs.jaicore.graphvisualizer.plugin.solutionperformanceplotter.ScoredSolutionCandidateInfo; import javafx.application.Platform; import javafx.scene.control.TreeView; import javafx.scene.layout.VBox; /** * * @author fmohr * */ public class HASCOModelStatisticsPluginView extends ASimpleMVCPluginView<HASCOModelStatisticsPluginModel, HASCOModelStatisticsPluginController, VBox> { private final HASCOModelStatisticsComponentSelector rootNode; // the root of the TreeView shown at the top private final Histogram histogram; // the histogram shown on the bottom public HASCOModelStatisticsPluginView(final HASCOModelStatisticsPluginModel model) { this(model, 100); } public HASCOModelStatisticsPluginView(final HASCOModelStatisticsPluginModel model, final int n) { super(model, new VBox()); this.rootNode = new HASCOModelStatisticsComponentSelector(this, model); TreeView<HASCOModelStatisticsComponentSelector> treeView = new TreeView<>(); treeView.setCellFactory(HASCOModelStatisticsComponentCell::new); treeView.setRoot(this.rootNode); this.getNode().getChildren().add(treeView); this.histogram = new Histogram(n); this.histogram.setTitle("Performances observed on the filtered solutions"); this.getNode().getChildren().add(this.histogram); } @Override public void update() { this.rootNode.update(); this.updateHistogram(); } /** * Updates the histogram at the bottom. This is called in both the update method of the general view as well as in the change listener of the combo boxes. */ public void updateHistogram() { Collection<List<Pair<String, String>>> activeFilters = this.rootNode.getAllSelectionsOnPathToAnyLeaf(); List<ScoredSolutionCandidateInfo> activeSolutions = this.getModel().getAllSeenSolutionCandidateFoundInfosUnordered().stream() .filter(i -> this.getModel().deserializeComponentInstance(i.getSolutionCandidateRepresentation()).matchesPathRestrictions(activeFilters)).collect(Collectors.toList()); DescriptiveStatistics stats = new DescriptiveStatistics(); activeSolutions.forEach(s -> stats.addValue(this.getModel().parseScoreToDouble(s.getScore()))); Platform.runLater(() -> this.histogram.update(stats)); } @Override public String getTitle() { return "HASCO Model Statistics"; } @Override public void clear() { this.rootNode.clear(); this.histogram.clear(); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/gui/statsplugin/HASCOSolutionCandidateRepresenter.java
package ai.libs.hasco.gui.statsplugin; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.core.JsonProcessingException; import ai.libs.hasco.core.HASCOSolutionCandidate; import ai.libs.jaicore.graphvisualizer.plugin.solutionperformanceplotter.SolutionCandidateRepresenter; public class HASCOSolutionCandidateRepresenter implements SolutionCandidateRepresenter { private static final Logger LOGGER = LoggerFactory.getLogger(HASCOSolutionCandidateRepresenter.class); private ComponentInstanceSerializer componentInstanceSerializer; public HASCOSolutionCandidateRepresenter() { componentInstanceSerializer = new ComponentInstanceSerializer(); } @Override public String getStringRepresentationOfSolutionCandidate(Object solutionCandidate) { if (solutionCandidate instanceof HASCOSolutionCandidate) { HASCOSolutionCandidate<?> hascoSolutionCandidate = (HASCOSolutionCandidate<?>) solutionCandidate; try { return componentInstanceSerializer.serializeComponentInstance(hascoSolutionCandidate.getComponentInstance()); } catch (JsonProcessingException e) { LOGGER.error("Cannot compute String representation of solution candidate {} using {}.", solutionCandidate, ComponentInstanceSerializer.class.getSimpleName(), e); } } return solutionCandidate.toString(); } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/metamining/IMetaMiner.java
package ai.libs.hasco.metamining; import ai.libs.hasco.model.ComponentInstance; /** * Used to to compute a score for a given {@link ComponentInstance} based on * meta features of the ComponentInstance and possibly also its application * context. * * @author Helena Graf * */ public interface IMetaMiner { /** * Gives a score to the given {@link ComponentInstance} based on its meta * features and possibly meta features of the application context as well. The * score reflects an estimate of the quality of the (partial) solution the * ComponentInstance represents. * * @param componentInstance * The instance for which an estimate is to be made * @return The estimated score */ public double score(ComponentInstance componentInstance); }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/metamining/MetaMinerBasedSorter.java
package ai.libs.hasco.metamining; import java.io.IOException; import java.util.Collection; import java.util.Comparator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ai.libs.hasco.core.Util; import ai.libs.hasco.model.Component; import ai.libs.hasco.model.ComponentInstance; import ai.libs.jaicore.planning.hierarchical.algorithms.forwarddecomposition.graphgenerators.tfd.TFDNode; /** * A Comparator for {@link TFDNode}s that sorts based on meta information about * the underlying {@link ComponentInstance} of the node and possibly application * context. * * @author Helena Graf * */ public class MetaMinerBasedSorter implements Comparator<TFDNode> { private Logger logger = LoggerFactory.getLogger(MetaMinerBasedSorter.class); /** * Components for the current configuration used to convert TFDNodes to * ComponentInstances */ private Collection<Component> components; /** * The "MetaMiner" has access to the meta information of the given * {@link ComponentInstance} and possibly its application context. It is used to * derive a score of a given ComponentInstance, based on which a comparison of * the given {@link TFDNode}s is made. */ private IMetaMiner metaminer; public MetaMinerBasedSorter(IMetaMiner metaminer, Collection<Component> components) { if (components==null) { logger.warn("No Components in sorter!"); } this.components = components; this.metaminer = metaminer; } @Override public int compare(TFDNode o1, TFDNode o2) { if (convertToComponentInstance(o1) == null || convertToComponentInstance(o2) == null) { logger.warn("Cannot compare pipelines when one is null."); return 0; } if (o1.equals(o2)) { logger.info("Comparing two nodes which are the same."); return 0; } double score1 = metaminer.score(convertToComponentInstance(o1)); double score2 = metaminer.score(convertToComponentInstance(o2)); try { logger.trace("Node {} converted to {}",o1,convertToComponentInstance(o1).getPrettyPrint()); } catch (IOException e) { logger.error("Logging failed due to {}",e); } try { logger.trace("Node {} converted to {}",o2,convertToComponentInstance(o2).getPrettyPrint()); } catch (IOException e) { logger.error("Logging failed due to {}",e); } logger.debug("Comparing nodes with scores: {} vs {}",score1,score2); return (int) Math.signum(score1 - score2); } /** * Converts the given TFDNode to a ComponentInstance. * * @param node * The TFDNode to convert * @return The TFDNode as a ComponentInstance */ protected ComponentInstance convertToComponentInstance(TFDNode node) { return Util.getSolutionCompositionFromState(components, node.getState(), false); } /** * Gets the {@link IMetaMiner}, which is used to derive a score for a given * {@link TFDNode} based on its attached {@link ComponentInstance}. * * @return The meta miner */ public IMetaMiner getMetaminer() { return metaminer; } /** * Sets the {@link IMetaMiner}, which is used to derive a score for a given * {@link TFDNode} based on its attached {@link ComponentInstance}. * * @param metaminer * The meta miner */ public void setMetaminer(IMetaMiner metaminer) { this.metaminer = metaminer; } }
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/metamining/package-info.java
/** * Classes used to gain meta information about a given (partial) software * composition. To be used to guide the search as a heuristic to search * TFDNodes. * * @author Helena Graf * */ package ai.libs.hasco.metamining;
0
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco
java-sources/ai/libs/hasco/0.2.1/ai/libs/hasco/model/BooleanParameterDomain.java
package ai.libs.hasco.model; import com.fasterxml.jackson.annotation.JsonCreator; public class BooleanParameterDomain extends CategoricalParameterDomain { @JsonCreator public BooleanParameterDomain() { super(new String[] {"true", "false"}); } }