modelsRevokeByTenantidAndAssetmodelidWithHttpInfo method
Future<Response>
modelsRevokeByTenantidAndAssetmodelidWithHttpInfo(
- String tenantId,
- int assetModelId,
- String region,
- InlineObject5 parameters,
Revokes a user from the given role on the model
Summary:Revokes a user from the given role on the model.
Return Type:
Note: This method returns the HTTP Response.
Parameters:
-
String tenantId (required): The unique Tenant ID (UUID or Identifier string)
-
int assetModelId (required):
-
String region (required): The data center region the data resides in
-
InlineObject5 parameters (required):
Implementation
Future<Response> modelsRevokeByTenantidAndAssetmodelidWithHttpInfo(String tenantId, int assetModelId, String region, InlineObject5 parameters,) async {
// Verify required params are set.
if (tenantId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: tenantId');
}
if (assetModelId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: assetModelId');
}
if (region == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: region');
}
if (parameters == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: parameters');
}
// ignore: prefer_const_declarations
final path = r'/{region}/aim/2.0/{tenantId}/Models({AssetModelId})/Roles.Revoke'
.replaceAll('{tenantId}', tenantId)
.replaceAll('{AssetModelId}', assetModelId.toString())
.replaceAll('{region}', region);
// ignore: prefer_final_locals
Object postBody = parameters;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const authNames = <String>['oauth2'];
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes[0],
authNames,
);
}