}
throw ex;
}
// Create Result
GatewayGetDeviceConfigurationScriptResponse result = null;
// Deserialize Response
InputStream responseContent = httpResponse.getEntity().getContent();
result = new GatewayGetDeviceConfigurationScriptResponse();
result.setConfigurationScript(StreamUtils.toString(responseContent));
result.setStatusCode(statusCode);
if (httpResponse.getHeaders("x-ms-request-id").length > 0) {
result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue());
}
if (shouldTrace) {
CloudTracing.exit(invocationId, result);
}