modelsSupercedeByKeyAndTenantid method
Supercede an existing model with a new version
Summary:Supercede an existing model with a new version.
Return Type: FileUploadResult
Parameters:
-
int key (required): The ID of the model to supercede.
-
String tenantId (required): The unique Tenant ID (UUID or Identifier string)
-
String region (required): The data center region the data resides in
-
MultipartFilefile (required): A model file in the correct format (IFC / IFCZip / Zip) -
String revision: A version identifier for the model.
-
String status: A status identifier for the model
-
int modelId: The ID of the model to be populated with the data. If not defined, a new model will be created.
-
String originalFilename: The original filename of the model, for zipped models
Implementation
Future<FileUploadResult> modelsSupercedeByKeyAndTenantid(int key, String tenantId, String region, MultipartFile file, { String revision, String status, int modelId, String originalFilename, }) async {
final response = await modelsSupercedeByKeyAndTenantidWithHttpInfo(key, tenantId, region, file, revision: revision, status: status, modelId: modelId, originalFilename: originalFilename, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body != null && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FileUploadResult',) as FileUploadResult;
}
return Future<FileUploadResult>.value();
}