2023-11-20 16:08:43 +01:00
|
|
|
package eu.eudat.model.persist;
|
|
|
|
|
|
|
|
|
2023-12-19 14:46:31 +01:00
|
|
|
import eu.eudat.commons.validation.old.FieldNotNullIfOtherSet;
|
|
|
|
import eu.eudat.commons.validation.old.ValidId;
|
2023-11-20 16:08:43 +01:00
|
|
|
import jakarta.validation.constraints.NotNull;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
@FieldNotNullIfOtherSet(message = "{validation.hashempty}")
|
2023-11-20 16:09:24 +01:00
|
|
|
public class UserRolePatchPersist {
|
2023-11-20 16:08:43 +01:00
|
|
|
|
2023-11-20 16:09:24 +01:00
|
|
|
@NotNull(message = "{validation.empty}")
|
2023-11-20 16:08:43 +01:00
|
|
|
@ValidId(message = "{validation.invalidid}")
|
|
|
|
private UUID id;
|
|
|
|
|
|
|
|
|
|
|
|
@NotNull(message = "{validation.empty}")
|
2023-11-20 16:09:24 +01:00
|
|
|
private List<String> roles;
|
2023-11-20 16:08:43 +01:00
|
|
|
|
2023-11-20 16:09:24 +01:00
|
|
|
@NotNull(message = "{validation.empty}")
|
2023-11-20 16:08:43 +01:00
|
|
|
private String hash;
|
|
|
|
|
|
|
|
public UUID getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setId(UUID id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
2023-11-20 16:09:24 +01:00
|
|
|
public List<String> getRoles() {
|
|
|
|
return roles;
|
2023-11-20 16:08:43 +01:00
|
|
|
}
|
|
|
|
|
2023-11-20 16:09:24 +01:00
|
|
|
public void setRoles(List<String> roles) {
|
|
|
|
this.roles = roles;
|
2023-11-20 16:08:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getHash() {
|
|
|
|
return hash;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setHash(String hash) {
|
|
|
|
this.hash = hash;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|