net.leanix.api.AssetsApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leanix-sdk-java Show documentation
Show all versions of leanix-sdk-java Show documentation
SDK for Java to access leanIX REST API
package net.leanix.api;
import net.leanix.api.common.ApiException;
import net.leanix.api.common.ApiClient;
import net.leanix.api.common.Configuration;
import net.leanix.api.common.Pair;
import javax.ws.rs.core.GenericType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class AssetsApi {
private ApiClient apiClient;
public AssetsApi() {
this(Configuration.getDefaultApiClient());
}
public AssetsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* deleteAsset
* Delete an asset
* @param asset (required)
* @throws ApiException if fails to make API call
*/
public void deleteAsset(String asset) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'asset' is set
if (asset == null) {
throw new ApiException(400, "Missing the required parameter 'asset' when calling deleteAsset");
}
// create path and map variables
String localVarPath = "/assets/{asset}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "asset" + "\\}", apiClient.escapeString(asset.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "token" };
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* downloadAsset
* Download an asset
* @param asset (required)
* @throws ApiException if fails to make API call
*/
public void downloadAsset(String asset) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'asset' is set
if (asset == null) {
throw new ApiException(400, "Missing the required parameter 'asset' when calling downloadAsset");
}
// create path and map variables
String localVarPath = "/assets/{asset}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "asset" + "\\}", apiClient.escapeString(asset.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"image/_*"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "token" };
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* upsertAsset
* Upsert an asset
* @param asset (required)
* @throws ApiException if fails to make API call
*/
public void upsertAsset(String asset) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'asset' is set
if (asset == null) {
throw new ApiException(400, "Missing the required parameter 'asset' when calling upsertAsset");
}
// create path and map variables
String localVarPath = "/assets/{asset}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "asset" + "\\}", apiClient.escapeString(asset.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"multipart/form-data"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "token" };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy