Record Class DeviceRegistrationRequest

java.lang.Object
java.lang.Record
com.cloudforge.core.manager.agent.DeviceRegistrationRequest
Record Components:
displayName - client-supplied, human-chosen ("Phillip's MacBook") — shown as-is in the admin Devices view, never validated against the actual device.
platform - which client is registering.

public record DeviceRegistrationRequest(String displayName, AgentPlatform platform) extends Record
Body of POST /api/v1/settings/devices — the one request every CloudForge Agent client (cloudforge-studio/desktop/terminal) sends to register itself. Requires an already-authenticated browser-equivalent session (whatever login the paired Manager instance runs — local password or Cognito), same as issuing a personal access token; this is what turns that one-time login into a durable, independently-revocable device credential. See this module's manager-devices OpenAPI spec for the wire contract every non-JVM client builds against — this record is cloudforge-manager's own implementation of that same contract, not a second source of truth.
  • Constructor Details

    • DeviceRegistrationRequest

      public DeviceRegistrationRequest(String displayName, AgentPlatform platform)
      Creates an instance of a DeviceRegistrationRequest record class.
      Parameters:
      displayName - the value for the displayName record component
      platform - the value for the platform 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.
    • 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