Skip to content

Commit 32b1e71

Browse files
committed
Add Windows structure envelope
1 parent 4072797 commit 32b1e71

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/windows/WindowsStructure.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package windows;
2+
3+
import java.time.Instant;
4+
import java.util.Map;
5+
6+
/** Common envelope tying execution, program, directive, citizen, call, and choice together. */
7+
public record WindowsStructure(
8+
WindowsExecution execution,
9+
WindowsProgram program,
10+
WindowsDirective directive,
11+
WindowsCitizen citizen,
12+
WindowsCall call,
13+
WindowsChoice choice,
14+
Instant createdAt,
15+
Map<String, String> metadata) {
16+
public WindowsStructure {
17+
if (execution == null || program == null || directive == null || citizen == null
18+
|| call == null || choice == null || createdAt == null) {
19+
throw new IllegalArgumentException("all Windows structure components are required");
20+
}
21+
metadata = Map.copyOf(metadata);
22+
}
23+
}

0 commit comments

Comments
 (0)