diff --git a/src/main/java/com/descope/model/user/request/PatchUserRequest.java b/src/main/java/com/descope/model/user/request/PatchUserRequest.java index 3f612932..00fe9490 100644 --- a/src/main/java/com/descope/model/user/request/PatchUserRequest.java +++ b/src/main/java/com/descope/model/user/request/PatchUserRequest.java @@ -3,52 +3,47 @@ import static com.descope.utils.CollectionUtils.addIfNotNull; import com.descope.model.auth.AssociatedTenant; -import com.descope.utils.MgmtUtils; - +import java.util.HashMap; +import java.util.List; +import java.util.Map; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; - @Data @SuperBuilder @NoArgsConstructor @AllArgsConstructor public class PatchUserRequest { - String name; - String givenName; - String middleName; - String familyName; - String phone; - String email; - List roleNames; - List userTenants; - Map customAttributes; - String picture; - Boolean verifiedEmail; - Boolean verifiedPhone; - List ssoAppIds; + String name; + String givenName; + String middleName; + String familyName; + String phone; + String email; + List roleNames; + List userTenants; + Map customAttributes; + String picture; + Boolean verifiedEmail; + Boolean verifiedPhone; + List ssoAppIds; - public Map toMap() { - Map m = new HashMap<>(); - addIfNotNull(m, "email", email); - addIfNotNull(m, "verifiedEmail", verifiedEmail); - addIfNotNull(m, "phone", phone); - addIfNotNull(m, "verifiedPhone", verifiedPhone); - addIfNotNull(m, "givenName", givenName); - addIfNotNull(m, "middleName", middleName); - addIfNotNull(m, "familyName", familyName); - addIfNotNull(m, "roleNames", roleNames); - addIfNotNull(m, "userTenants", userTenants); - addIfNotNull(m, "customAttributes", customAttributes); - addIfNotNull(m, "picture", picture); - addIfNotNull(m, "ssoAppIDs", ssoAppIds); - return m; - } + public Map toMap() { + Map m = new HashMap<>(); + addIfNotNull(m, "email", email); + addIfNotNull(m, "verifiedEmail", verifiedEmail); + addIfNotNull(m, "phone", phone); + addIfNotNull(m, "verifiedPhone", verifiedPhone); + addIfNotNull(m, "givenName", givenName); + addIfNotNull(m, "middleName", middleName); + addIfNotNull(m, "familyName", familyName); + addIfNotNull(m, "roleNames", roleNames); + addIfNotNull(m, "userTenants", userTenants); + addIfNotNull(m, "customAttributes", customAttributes); + addIfNotNull(m, "picture", picture); + addIfNotNull(m, "ssoAppIDs", ssoAppIds); + return m; + } } \ No newline at end of file diff --git a/src/main/java/com/descope/sdk/mgmt/UserService.java b/src/main/java/com/descope/sdk/mgmt/UserService.java index faf76256..4e410f06 100644 --- a/src/main/java/com/descope/sdk/mgmt/UserService.java +++ b/src/main/java/com/descope/sdk/mgmt/UserService.java @@ -104,8 +104,8 @@ public interface UserService { /** * Patches an existing user. - *

- * Only the fields that are set in the request will be updated. + * + *

Only the fields that are set in the request will be updated. * * @param loginId The loginID is required and will determine which user to update. * @param request The request containing the fields to be updated. Fields not set will remain unchanged.