Class User

java.lang.Object
org.apache.juneau.petstore.dto.User

public class User extends Object
User domain bean.

Represents a registered petstore user. The username is the primary key.

See Also:
  • Constructor Details

    • User

      public User()
  • Method Details

    • getUsername

      public String getUsername()
      Returns the username (primary key).
      Returns:
      The username.
    • setUsername

      public User setUsername(String value)
      Sets the username.
      Parameters:
      value - The new value.
      Returns:
      This object.
    • getFirstName

      public String getFirstName()
      Returns the first name.
      Returns:
      The first name. Can be null if not set.
    • setFirstName

      public User setFirstName(String value)
      Sets the first name.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object.
    • getLastName

      public String getLastName()
      Returns the last name.
      Returns:
      The last name. Can be null if not set.
    • setLastName

      public User setLastName(String value)
      Sets the last name.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object.
    • getEmail

      public String getEmail()
      Returns the email address.
      Returns:
      The email address. Can be null if not set.
    • setEmail

      public User setEmail(String value)
      Sets the email address.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object.
    • getPassword

      @BeanProp(wo="true") public String getPassword()
      Returns the password.

      Stored in plaintext for sample purposes only. Do not use this pattern in production.

      Write-only: the password is accepted on create and update but is never serialized, so no response carries it.

      Returns:
      The password. Can be null if not set.
    • setPassword

      public User setPassword(String value)
      Sets the password.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object.
    • getPhone

      public String getPhone()
      Returns the phone number.
      Returns:
      The phone number. Can be null if not set.
    • setPhone

      public User setPhone(String value)
      Sets the phone number.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object.
    • getUserStatus

      Returns the user account status.
      Returns:
      The user account status.
    • setUserStatus

      public User setUserStatus(UserStatus value)
      Sets the user account status.
      Parameters:
      value - The new value.
      Returns:
      This object.