@@ -62,14 +62,12 @@ Below is the first version of the models we will be using internally that allows
62
62
* denied. Some catalogs may only accept ALLOW rules and treat all other operations as denied by
63
63
* default.
64
64
*/
65
- @Value
66
- @Builder
67
65
public class InternalPrivilege {
68
66
/**
69
67
* The type of privilege, such as SELECT, CREATE, or MODIFY. Each implementation can define its
70
68
* own set of enums.
71
69
*/
72
- String privilegeType;
70
+ InternalPrivilegeType privilegeType;
73
71
74
72
/**
75
73
* The decision, typically ALLOW or DENY. Some catalogs may not support DENY explicitly,
@@ -88,14 +86,14 @@ public class InternalPrivilege {
88
86
* objects that require fine-grained privilege management. Each securable object can have one or
89
87
* more privileges assigned to it.
90
88
*/
91
- @Value
92
- @Builder
93
89
public class InternalSecurableObject {
90
+ /** The identifier of the securable object. */
91
+ InternalSecurableObjectIdentifier securableObjectIdentifier;
94
92
/**
95
93
* The type of securable object, such as TABLE, VIEW, FUNCTION, etc. Each implementation can
96
94
* define its own set of enums.
97
95
*/
98
- String securableObjectType;
96
+ InternalSecurableObjectType securableObjectType;
99
97
/** The set of privileges assigned to this object. */
100
98
List<InternalPrivilege> privileges;
101
99
}
@@ -111,8 +109,6 @@ public class InternalSecurableObject {
111
109
* necessary. It can be extended to include additional fields such as reasonForChange or
112
110
* changeDescription.
113
111
*/
114
- @Value
115
- @Builder
116
112
public class InternalChangeLogInfo {
117
113
/** The username or identifier of the entity that created this record. */
118
114
String createdBy;
@@ -138,8 +134,6 @@ public class InternalChangeLogInfo {
138
134
* privileges. Audit info is stored to track the role's creation and modifications, and a properties
139
135
* map can hold additional metadata.
140
136
*/
141
- @Value
142
- @Builder
143
137
public class InternalRole {
144
138
/** The unique name or identifier for the role. */
145
139
String name;
@@ -156,6 +150,7 @@ public class InternalRole {
156
150
*/
157
151
Map<String, String> properties;
158
152
}
153
+
159
154
```
160
155
161
156
** InternalUser**
@@ -166,16 +161,14 @@ public class InternalRole {
166
161
* <p>A user may be assigned multiple roles, and can also belong to a specific user group. Audit
167
162
* information is stored to allow tracking of who created or last modified the user.
168
163
*/
169
- @Value
170
- @Builder
171
164
public class InternalUser {
172
165
/** The unique name or identifier for the user. */
173
166
String name;
174
167
175
168
/** The list of roles assigned to this user. */
176
169
List<InternalRole> roles;
177
-
178
- /** Contains information about how and when this user was created and last modified. */
170
+
171
+ /** Contains information about how and when this user was created and last modified. */
179
172
InternalChangeLogInfo changeLogInfo;
180
173
}
181
174
```
@@ -188,8 +181,6 @@ public class InternalUser {
188
181
* <p>Groups can have multiple roles assigned, and also include audit information to track creation
189
182
* and modifications.
190
183
*/
191
- @Value
192
- @Builder
193
184
public class InternalUserGroup {
194
185
/** The unique name or identifier for the user group. */
195
186
String name;
@@ -205,8 +196,6 @@ public class InternalUserGroup {
205
196
** InternalAccessControlPolicySnapshot**
206
197
```
207
198
/** A snapshot of all access control data at a given point in time. */
208
- @Value
209
- @Builder
210
199
public class InternalAccessControlPolicySnapshot {
211
200
/**
212
201
* A unique identifier representing this snapshot's version.
@@ -227,25 +216,25 @@ public class InternalAccessControlPolicySnapshot {
227
216
* A map of user names to {@link InternalUser} objects, capturing individual users' details such
228
217
* as assigned roles, auditing metadata, etc.
229
218
*/
230
- Map<String, InternalUser> usersByName;
219
+ @Builder.Default Map<String, InternalUser> usersByName = Collections.emptyMap() ;
231
220
232
221
/**
233
222
* A map of group names to {@link InternalUserGroup} objects, representing logical groupings of
234
223
* users for easier role management.
235
224
*/
236
- Map<String, InternalUserGroup> groupsByName;
225
+ @Builder.Default Map<String, InternalUserGroup> groupsByName = Collections.emptyMap() ;
237
226
238
227
/**
239
228
* A map of role names to {@link InternalRole} objects, defining the privileges and security rules
240
229
* each role entails.
241
230
*/
242
- Map<String, InternalRole> rolesByName;
231
+ @Builder.Default Map<String, InternalRole> rolesByName = Collections.emptyMap() ;
243
232
244
233
/**
245
234
* A map of additional properties or metadata related to this snapshot. This map provides
246
235
* flexibility for storing information without modifying the main schema of the snapshot.
247
236
*/
248
- Map<String, String> properties;
237
+ @Builder.Default Map<String, String> properties = Collections.emptyMap() ;
249
238
}
250
239
```
251
240
0 commit comments