Package com.dropbox.core.v2.openid
Class UserInfoResult.Builder
- java.lang.Object
-
- com.dropbox.core.v2.openid.UserInfoResult.Builder
-
- Enclosing class:
- UserInfoResult
public static class UserInfoResult.Builder extends java.lang.Object
Builder forUserInfoResult
.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
email
protected java.lang.Boolean
emailVerified
protected java.lang.String
familyName
protected java.lang.String
givenName
protected java.lang.String
iss
protected java.lang.String
sub
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserInfoResult
build()
Builds an instance ofUserInfoResult
configured with this builder's valuesUserInfoResult.Builder
withEmail(java.lang.String email)
Set value for optional field.UserInfoResult.Builder
withEmailVerified(java.lang.Boolean emailVerified)
Set value for optional field.UserInfoResult.Builder
withFamilyName(java.lang.String familyName)
Set value for optional field.UserInfoResult.Builder
withGivenName(java.lang.String givenName)
Set value for optional field.UserInfoResult.Builder
withIss(java.lang.String iss)
Set value for optional field.UserInfoResult.Builder
withSub(java.lang.String sub)
Set value for optional field.
-
-
-
Method Detail
-
withFamilyName
public UserInfoResult.Builder withFamilyName(java.lang.String familyName)
Set value for optional field.- Parameters:
familyName
- Last name of user.- Returns:
- this builder
-
withGivenName
public UserInfoResult.Builder withGivenName(java.lang.String givenName)
Set value for optional field.- Parameters:
givenName
- First name of user.- Returns:
- this builder
-
withEmail
public UserInfoResult.Builder withEmail(java.lang.String email)
Set value for optional field.- Parameters:
email
- Email address of user.- Returns:
- this builder
-
withEmailVerified
public UserInfoResult.Builder withEmailVerified(java.lang.Boolean emailVerified)
Set value for optional field.- Parameters:
emailVerified
- If user is email verified.- Returns:
- this builder
-
withIss
public UserInfoResult.Builder withIss(java.lang.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 benull
. Defaults to""
when set tonull
.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withSub
public UserInfoResult.Builder withSub(java.lang.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 benull
. Defaults to""
when set tonull
.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
build
public UserInfoResult build()
Builds an instance ofUserInfoResult
configured with this builder's values- Returns:
- new instance of
UserInfoResult
-
-