Class UserInfoResult.Builder

java.lang.Object
com.dropbox.core.v2.openid.UserInfoResult.Builder
Enclosing class:
UserInfoResult

public static class UserInfoResult.Builder extends Object
Builder for UserInfoResult.
  • Field Details

    • familyName

      protected String familyName
    • givenName

      protected String givenName
    • email

      protected String email
    • emailVerified

      protected Boolean emailVerified
    • iss

      protected String iss
    • sub

      protected String sub
  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • withFamilyName

      public UserInfoResult.Builder withFamilyName(String familyName)
      Set value for optional field.
      Parameters:
      familyName - Last name of user.
      Returns:
      this builder
    • withGivenName

      public UserInfoResult.Builder withGivenName(String givenName)
      Set value for optional field.
      Parameters:
      givenName - First name of user.
      Returns:
      this builder
    • withEmail

      public UserInfoResult.Builder withEmail(String email)
      Set value for optional field.
      Parameters:
      email - Email address of user.
      Returns:
      this builder
    • withEmailVerified

      public UserInfoResult.Builder withEmailVerified(Boolean emailVerified)
      Set value for optional field.
      Parameters:
      emailVerified - If user is email verified.
      Returns:
      this builder
    • withIss

      public UserInfoResult.Builder withIss(String iss)
      Set value for optional field.

      If left unset or set to null, defaults to "".

      Parameters:
      iss - Issuer of token (in this case Dropbox). Must not be null. Defaults to "" when set to null.
      Returns:
      this builder
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • withSub

      public UserInfoResult.Builder withSub(String sub)
      Set value for optional field.

      If left unset or set to null, defaults to "".

      Parameters:
      sub - An identifier for the user. This is the Dropbox account_id, a string value such as dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc. Must not be null. Defaults to "" when set to null.
      Returns:
      this builder
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • build

      public UserInfoResult build()
      Builds an instance of UserInfoResult configured with this builder's values
      Returns:
      new instance of UserInfoResult