Record Class RegisteredDeviceView

java.lang.Object
java.lang.Record
com.cloudforge.core.manager.agent.RegisteredDeviceView

public record RegisteredDeviceView(String id, String displayName, AgentPlatform platform, String createdAt, String lastSeenAt, String revokedAt) extends Record
One row of GET /api/v1/settings/devices — never carries the device token itself (see DeviceRegistrationResponse's javadoc: that value exists only once, at registration). revokedAt is null for an active device; an admin revokes one by id, and the device's next authenticated call is rejected regardless of whether the device is reachable to be told so.
  • Constructor Details

    • RegisteredDeviceView

      public RegisteredDeviceView(String id, String displayName, AgentPlatform platform, String createdAt, String lastSeenAt, String revokedAt)
      Creates an instance of a RegisteredDeviceView record class.
      Parameters:
      id - the value for the id record component
      displayName - the value for the displayName record component
      platform - the value for the platform record component
      createdAt - the value for the createdAt record component
      lastSeenAt - the value for the lastSeenAt record component
      revokedAt - the value for the revokedAt record component
  • Method Details

    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • platform

      public AgentPlatform platform()
      Returns the value of the platform record component.
      Returns:
      the value of the platform record component
    • createdAt

      public String createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • lastSeenAt

      public String lastSeenAt()
      Returns the value of the lastSeenAt record component.
      Returns:
      the value of the lastSeenAt record component
    • revokedAt

      public String revokedAt()
      Returns the value of the revokedAt record component.
      Returns:
      the value of the revokedAt record component