modelsAssignByTenantidAndAssetmodelidWithHttpInfo method
Future<Response>
modelsAssignByTenantidAndAssetmodelidWithHttpInfo(
- String tenantId,
- int assetModelId,
- String region,
- InlineObject4 parameters,
Assigns a user to the given role on the model
Summary:Assigns a user to 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
-
InlineObject4 parameters (required):
Implementation
Future<Response> modelsAssignByTenantidAndAssetmodelidWithHttpInfo(String tenantId, int assetModelId, String region, InlineObject4 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.Assign'
.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,
);
}