modelsPostByTenantidWithHttpInfo method
Future<Response>
modelsPostByTenantidWithHttpInfo(
- String tenantId,
- String region,
- ModelCreate model
Creates a new Model for the given Asset
Summary:Creates a new Model for the given Asset.
The ability to create Models may be limited by access level.
Return Type: Model
Note: This method returns the HTTP Response.
Parameters:
-
String tenantId (required): The unique Tenant ID (UUID or Identifier string)
-
String region (required): The data center region the data resides in
-
ModelCreate model (required):
Implementation
Future<Response> modelsPostByTenantidWithHttpInfo(String tenantId, String region, ModelCreate model,) async {
// Verify required params are set.
if (tenantId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: tenantId');
}
if (region == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: region');
}
if (model == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: model');
}
// ignore: prefer_const_declarations
final path = r'/{region}/aim/2.0/{tenantId}/Models'
.replaceAll('{tenantId}', tenantId)
.replaceAll('{region}', region);
// ignore: prefer_final_locals
Object postBody = model;
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,
);
}