use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetPushSetupAlarmAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method setPushSetupAlarm.
@PayloadRoot(localPart = "SetPushSetupAlarmRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public SetPushSetupAlarmAsyncResponse setPushSetupAlarm(@OrganisationIdentification final String organisationIdentification, @RequestPayload final SetPushSetupAlarmRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PushSetupAlarm pushSetupAlarm = this.configurationMapper.map(request.getSetPushSetupAlarmRequestData().getPushSetupAlarm(), org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PushSetupAlarm.class);
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.SET_PUSH_SETUP_ALARM).withMessageType(MessageType.SET_PUSH_SETUP_ALARM).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, pushSetupAlarm);
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, SetPushSetupAlarmAsyncResponse.class);
}
Aggregations