Skip to content

Commit 43210ee

Browse files
chore: create medical technology automation request event
1 parent 3b9f9ae commit 43210ee

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (c) 2023. Smart Operating Block
3+
*
4+
* Use of this source code is governed by an MIT-style
5+
* license that can be found in the LICENSE file or at
6+
* https://opensource.org/licenses/MIT.
7+
*/
8+
9+
package application.presenter.event.model.automation.request.medicaltechnology;
10+
11+
import application.presenter.event.model.Event;
12+
13+
/**
14+
* Medical Technology Automation request event.
15+
* This is the event with which a doctor accept a proposal for the adaptation of the environment
16+
* in order to support the usage of a medical technology.
17+
*/
18+
public class MedicalTechnologyAutomationRequestEvent implements Event<MedicalTechnologyAutomationRequestPayload> {
19+
/** Medical Technology Automation request event key. */
20+
public static final String MEDICAL_TECHNOLOGY_AUTOMATION_REQUEST_EVENT_KEY =
21+
"MEDICAL_TECHNOLOGY_AUTOMATION_REQUEST_EVENT";
22+
23+
private final String key;
24+
private final MedicalTechnologyAutomationRequestPayload data;
25+
private final String dateTime;
26+
27+
/**
28+
* Default constructor.
29+
* @param key the key of the event.
30+
* @param data the data payload of the event.
31+
* @param dateTime the datetime of the event.
32+
*/
33+
public MedicalTechnologyAutomationRequestEvent(
34+
final String key,
35+
final MedicalTechnologyAutomationRequestPayload data,
36+
final String dateTime
37+
) {
38+
this.key = key;
39+
this.data = data;
40+
this.dateTime = dateTime;
41+
}
42+
43+
@Override
44+
public final String getKey() {
45+
return this.key;
46+
}
47+
48+
@Override
49+
public final MedicalTechnologyAutomationRequestPayload getData() {
50+
return this.data;
51+
}
52+
53+
@Override
54+
public final String getDateTime() {
55+
return this.dateTime;
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) 2023. Smart Operating Block
3+
*
4+
* Use of this source code is governed by an MIT-style
5+
* license that can be found in the LICENSE file or at
6+
* https://opensource.org/licenses/MIT.
7+
*/
8+
9+
package application.presenter.event.model.automation.request.medicaltechnology;
10+
11+
/**
12+
* {@link MedicalTechnologyAutomationRequestEvent} event payload.
13+
*/
14+
public class MedicalTechnologyAutomationRequestPayload {
15+
private final String roomId;
16+
private final String medicalTechnologyType;
17+
18+
/**
19+
* Default constructor.
20+
* @param roomId the room id in which the automation is requested.
21+
* @param medicalTechnologyType the medical technology type for which the automation is requested.
22+
*/
23+
public MedicalTechnologyAutomationRequestPayload(final String roomId, final String medicalTechnologyType) {
24+
this.roomId = roomId;
25+
this.medicalTechnologyType = medicalTechnologyType;
26+
}
27+
28+
/**
29+
* Get the room id involved in the event.
30+
* @return the room id.
31+
*/
32+
public String getRoomId() {
33+
return this.roomId;
34+
}
35+
36+
/**
37+
* Get the medical technology type name involved in the event.
38+
* @return the medical technology type name.
39+
*/
40+
public String getMedicalTechnologyType() {
41+
return this.medicalTechnologyType;
42+
}
43+
}

0 commit comments

Comments
 (0)