documentFilesGetFileWithHttpInfo method
Downloads binary file related to asset and model
Summary:Downloads binary file related to asset and model.
Return Type: string
Note: This method returns the HTTP Response.
Parameters:
Implementation
Future<Response> documentFilesGetFileWithHttpInfo(int assetId, int modelId, String fileId, String tenantId, String region,) async {
// Verify required params are set.
if (assetId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: assetId');
}
if (modelId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: modelId');
}
if (fileId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: fileId');
}
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}/documentfiles/download/{assetId}/{modelId}/{fileId}'
.replaceAll('{assetId}', assetId.toString())
.replaceAll('{modelId}', modelId.toString())
.replaceAll('{fileId}', fileId)
.replaceAll('{tenantId}', tenantId)
.replaceAll('{region}', region);
// ignore: prefer_final_locals
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const authNames = <String>['oauth2'];
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes[0],
authNames,
);
}