getHostedConfigurationVersion method

Future<HostedConfigurationVersion> getHostedConfigurationVersion({
  1. required String applicationId,
  2. required String configurationProfileId,
  3. required int versionNumber,
})

Get information about a specific configuration version.

May throw BadRequestException. May throw ResourceNotFoundException. May throw InternalServerException.

Parameter applicationId : The application ID.

Parameter configurationProfileId : The configuration profile ID.

Parameter versionNumber : The version.

Implementation

Future<HostedConfigurationVersion> getHostedConfigurationVersion({
  required String applicationId,
  required String configurationProfileId,
  required int versionNumber,
}) async {
  ArgumentError.checkNotNull(applicationId, 'applicationId');
  ArgumentError.checkNotNull(
      configurationProfileId, 'configurationProfileId');
  ArgumentError.checkNotNull(versionNumber, 'versionNumber');
  final response = await _protocol.sendRaw(
    payload: null,
    method: 'GET',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/configurationprofiles/${Uri.encodeComponent(configurationProfileId)}/hostedconfigurationversions/${Uri.encodeComponent(versionNumber.toString())}',
    exceptionFnMap: _exceptionFns,
  );
  return HostedConfigurationVersion(
    content: await response.stream.toBytes(),
    applicationId:
        _s.extractHeaderStringValue(response.headers, 'Application-Id'),
    configurationProfileId: _s.extractHeaderStringValue(
        response.headers, 'Configuration-Profile-Id'),
    contentType:
        _s.extractHeaderStringValue(response.headers, 'Content-Type'),
    description: _s.extractHeaderStringValue(response.headers, 'Description'),
    versionNumber:
        _s.extractHeaderIntValue(response.headers, 'Version-Number'),
  );
}