package ru.micord.ervu.account_applications.security.model.jwt;

public record UserClaims(
    String userId,
    String name,
    String realm,
    String domainId
) {

  public static UserClaimsBuilder builder() {
    return new UserClaimsBuilder();
  }

  public static final class UserClaimsBuilder {
    private String userId;
    private String name;
    private String realm;
    private String domainId;

    private UserClaimsBuilder() {
    }

    public UserClaimsBuilder withUserId(String userId) {
      this.userId = userId;
      return this;
    }

    public UserClaimsBuilder withName(String name) {
      this.name = name;
      return this;
    }

    public UserClaimsBuilder withRealm(String realm) {
      this.realm = realm;
      return this;
    }

    public UserClaimsBuilder withDomainId(String domainId) {
      this.domainId = domainId;
      return this;
    }

    public UserClaims build() {
      return new UserClaims(userId, name, realm, domainId);
    }
  }
}
