modelsDeleteByAssetmodelidAndTenantidWithHttpInfo method

Future<Response> modelsDeleteByAssetmodelidAndTenantidWithHttpInfo(
  1. int assetModelId,
  2. String tenantId,
  3. String region, {
  4. String ifMatch,
})

Archive a model for future deletion

Summary:Archive a model for future deletion.
Return Type:

Note: This method returns the HTTP Response.

Parameters:

  • int assetModelId (required): key: AssetModelId

  • String tenantId (required): The unique Tenant ID (UUID or Identifier string)

  • String region (required): The data center region the data resides in

  • String ifMatch: If-Match header

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,
  );
}