modelsDeleteByAssetmodelidAndTenantidWithHttpInfo method
Archive a model for future deletion
Summary:Archive a model for future deletion.
Return Type:
Note: This method returns the HTTP Response.
Parameters:
Implementation
Future<Response> modelsDeleteByAssetmodelidAndTenantidWithHttpInfo(int assetModelId, String tenantId, String region, { String ifMatch, }) async {
// Verify required params are set.
if (assetModelId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: assetModelId');
}
if (tenantId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: tenantId');
}
if (region == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: region');
}
// ignore: prefer_const_declarations
final path = r'/{region}/aim/2.0/{tenantId}/Models({AssetModelId})'
.replaceAll('{AssetModelId}', assetModelId.toString())
.replaceAll('{tenantId}', tenantId)
.replaceAll('{region}', region);
// ignore: prefer_final_locals
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (ifMatch != null) {
headerParams[r'If-Match'] = parameterToString(ifMatch);
}
const authNames = <String>['oauth2'];
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes[0],
authNames,
);
}