Record Class InternalUserResource

java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.gateway.authentication.resources.InternalUserResource

public record InternalUserResource(String uuid, String username, String firstName, String lastName, String schedule, String language, String description, String password, Date passwordDate, List<String> passwordHistory, String badge, Date createdDate, Date lastModifiedDate, List<String> roles, List<InternalUserExtraPropsResource> extraProps, List<InternalScheduleAdjustmentResource> scheduleAdjustments, List<InternalContactInfoResource> contactInfos) extends Record
Represents a user in the internal user source.
  • Constructor Details

    • InternalUserResource

      public InternalUserResource(String uuid, String username, String firstName, String lastName, String schedule, String language, String description, String password, Date passwordDate, List<String> passwordHistory, String badge, Date createdDate, Date lastModifiedDate, List<String> roles, List<InternalUserExtraPropsResource> extraProps, List<InternalScheduleAdjustmentResource> scheduleAdjustments, List<InternalContactInfoResource> contactInfos)
      Constructor for the InternalUserResource class.

      It is recommended you use the InternalUserResource.InternalUserBuilder class to create instances of this class instead of this constructor.

      Parameters:
      uuid - The UUID of the user.
      username - The username of the user.
      firstName - The first name of the user.
      lastName - The last name of the user.
      schedule - The schedule of the user.
      language - The language of the user.
      description - The description of the user.
      password - The password of the user.
      passwordDate - The date the password was hashed.
      passwordHistory - The password history.
      badge - The badge of the user.
      createdDate - The date the user was created.
      lastModifiedDate - The date the user was last modified.
      roles - The roles of the user (UUIDs).
      extraProps - The extra properties of the user.
      scheduleAdjustments - The schedule adjustments of the user.
      contactInfos - The contact information of the user.
  • Method Details

    • checkPassword

      public static boolean checkPassword(String password, String hashedPass)
      Checks if the given password matches the hashed password.
      Parameters:
      password - The password to check.
      hashedPass - The hashed password to check against.
      Returns:
      True if the password matches the hashed password, false otherwise.
    • checkPassword

      public boolean checkPassword(String password)
      Check the password for this object against the given password.
      Parameters:
      password - The password to check.
      Returns:
      True if the password matches the stored password, false otherwise.
    • hasRole

      public boolean hasRole(Role role)
      Check if the user has the given role.
      Parameters:
      role - The role to check for.
      Returns:
      True if the user has the role, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • uuid

      public String uuid()
      Returns the value of the uuid record component.
      Returns:
      the value of the uuid record component
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • firstName

      public String firstName()
      Returns the value of the firstName record component.
      Returns:
      the value of the firstName record component
    • lastName

      public String lastName()
      Returns the value of the lastName record component.
      Returns:
      the value of the lastName record component
    • schedule

      public String schedule()
      Returns the value of the schedule record component.
      Returns:
      the value of the schedule record component
    • language

      public String language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • password

      public String password()
      Returns the value of the password record component.
      Returns:
      the value of the password record component
    • passwordDate

      public Date passwordDate()
      Returns the value of the passwordDate record component.
      Returns:
      the value of the passwordDate record component
    • passwordHistory

      public List<String> passwordHistory()
      Returns the value of the passwordHistory record component.
      Returns:
      the value of the passwordHistory record component
    • badge

      public String badge()
      Returns the value of the badge record component.
      Returns:
      the value of the badge record component
    • createdDate

      public Date createdDate()
      Returns the value of the createdDate record component.
      Returns:
      the value of the createdDate record component
    • lastModifiedDate

      public Date lastModifiedDate()
      Returns the value of the lastModifiedDate record component.
      Returns:
      the value of the lastModifiedDate record component
    • roles

      public List<String> roles()
      Returns the value of the roles record component.
      Returns:
      the value of the roles record component
    • extraProps

      public List<InternalUserExtraPropsResource> extraProps()
      Returns the value of the extraProps record component.
      Returns:
      the value of the extraProps record component
    • scheduleAdjustments

      public List<InternalScheduleAdjustmentResource> scheduleAdjustments()
      Returns the value of the scheduleAdjustments record component.
      Returns:
      the value of the scheduleAdjustments record component
    • contactInfos

      public List<InternalContactInfoResource> contactInfos()
      Returns the value of the contactInfos record component.
      Returns:
      the value of the contactInfos record component