public static class MemberAddArg.Builder
extends java.lang.Object
MemberAddArg
.Modifier and Type | Field and Description |
---|---|
protected java.lang.Boolean |
isDirectoryRestricted |
protected java.lang.String |
memberEmail |
protected java.lang.String |
memberExternalId |
protected java.lang.String |
memberGivenName |
protected java.lang.String |
memberPersistentId |
protected java.lang.String |
memberSurname |
protected AdminTier |
role |
protected boolean |
sendWelcomeEmail |
Modifier | Constructor and Description |
---|---|
protected |
Builder(java.lang.String memberEmail) |
Modifier and Type | Method and Description |
---|---|
MemberAddArg |
build()
Builds an instance of
MemberAddArg configured with this
builder's values |
MemberAddArg.Builder |
withIsDirectoryRestricted(java.lang.Boolean isDirectoryRestricted)
Set value for optional field.
|
MemberAddArg.Builder |
withMemberExternalId(java.lang.String memberExternalId)
Set value for optional field.
|
MemberAddArg.Builder |
withMemberGivenName(java.lang.String memberGivenName)
Set value for optional field.
|
MemberAddArg.Builder |
withMemberPersistentId(java.lang.String memberPersistentId)
Set value for optional field.
|
MemberAddArg.Builder |
withMemberSurname(java.lang.String memberSurname)
Set value for optional field.
|
MemberAddArg.Builder |
withRole(AdminTier role)
Set value for optional field.
|
MemberAddArg.Builder |
withSendWelcomeEmail(java.lang.Boolean sendWelcomeEmail)
Set value for optional field.
|
protected final java.lang.String memberEmail
protected java.lang.String memberGivenName
protected java.lang.String memberSurname
protected java.lang.String memberExternalId
protected java.lang.String memberPersistentId
protected boolean sendWelcomeEmail
protected AdminTier role
protected java.lang.Boolean isDirectoryRestricted
public MemberAddArg.Builder withMemberGivenName(java.lang.String memberGivenName)
memberGivenName
- Member's first name. Must have length of at
most 100 and match pattern "[^/:?*<>\"|]*
".java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public MemberAddArg.Builder withMemberSurname(java.lang.String memberSurname)
memberSurname
- Member's last name. Must have length of at most
100 and match pattern "[^/:?*<>\"|]*
".java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public MemberAddArg.Builder withMemberExternalId(java.lang.String memberExternalId)
memberExternalId
- External ID for member. Must have length of
at most 64.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public MemberAddArg.Builder withMemberPersistentId(java.lang.String memberPersistentId)
memberPersistentId
- Persistent ID for member. This field is
only available to teams using persistent ID SAML configuration.public MemberAddArg.Builder withSendWelcomeEmail(java.lang.Boolean sendWelcomeEmail)
If left unset or set to null
, defaults to true
.
sendWelcomeEmail
- Whether to send a welcome email to the
member. If send_welcome_email is false, no email invitation will
be sent to the user. This may be useful for apps using single
sign-on (SSO) flows for onboarding that want to handle
announcements themselves. Defaults to true
when set to
null
.public MemberAddArg.Builder withRole(AdminTier role)
If left unset or set to null
, defaults to AdminTier.MEMBER_ONLY
.
role
- Must not be null
. Defaults to AdminTier.MEMBER_ONLY
when set to null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public MemberAddArg.Builder withIsDirectoryRestricted(java.lang.Boolean isDirectoryRestricted)
isDirectoryRestricted
- Whether a user is directory restricted.public MemberAddArg build()
MemberAddArg
configured with this
builder's valuesMemberAddArg