11package io .permit .sdk .enforcement ;
2-
32import java .util .ArrayList ;
43import java .util .HashMap ;
4+ import java .util .List ;
5+
6+ import io .permit .sdk .openapi .models .UserRoleCreate ;
57
68public class User {
79 private String key ;
810 private String firstName = null ;
911 private String lastName = null ;
1012 private String email = null ;
1113 private HashMap <String , Object > attributes = null ;
14+ private List <UserRoleCreate > roleAssignments = null ;
1215
1316 public User (Builder builder ) {
1417 this .key = builder .key ;
1518 this .firstName = builder .firstName ;
1619 this .lastName = builder .lastName ;
1720 this .email = builder .email ;
1821 this .attributes = builder .attributes ;
22+ this .roleAssignments = builder .roleAssignments ;
1923 }
2024
2125 public String getKey () {
@@ -52,6 +56,7 @@ public static class Builder {
5256 private String lastName = null ;
5357 private String email = null ;
5458 private HashMap <String , Object > attributes = null ;
59+ private List <UserRoleCreate > roleAssignments ;
5560
5661 public Builder (String userKey ) {
5762 this .key = userKey ;
@@ -77,6 +82,11 @@ public Builder withAttributes(HashMap<String, Object> attributes) {
7782 return this ;
7883 }
7984
85+ public Builder withRoleAssignments (List <UserRoleCreate > roleAssignments ) {
86+ this .roleAssignments = roleAssignments ;
87+ return this ;
88+ }
89+
8090 public User build () {
8191 return new User (this );
8292 }
0 commit comments