public class MemberAddArg extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MemberAddArg.Builder
Builder for
MemberAddArg . |
Modifier and Type | Field and Description |
---|---|
protected String |
memberEmail |
protected String |
memberExternalId |
protected String |
memberGivenName |
protected String |
memberSurname |
protected AdminTier |
role |
protected boolean |
sendWelcomeEmail |
Constructor and Description |
---|
MemberAddArg(String memberEmail,
String memberGivenName,
String memberSurname)
None
|
MemberAddArg(String memberEmail,
String memberGivenName,
String memberSurname,
String memberExternalId,
boolean sendWelcomeEmail,
AdminTier role)
Use
newBuilder to create instances of this class without
specifying values for all optional fields. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getMemberEmail() |
String |
getMemberExternalId()
External ID for member.
|
String |
getMemberGivenName()
Member's first name.
|
String |
getMemberSurname()
Member's last name.
|
AdminTier |
getRole() |
boolean |
getSendWelcomeEmail()
Whether to send a welcome email to the member.
|
int |
hashCode() |
static MemberAddArg.Builder |
newBuilder(String memberEmail,
String memberGivenName,
String memberSurname)
Returns a new builder for creating an instance of this class.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final String memberEmail
protected final String memberGivenName
protected final String memberSurname
protected final String memberExternalId
protected final boolean sendWelcomeEmail
protected final AdminTier role
public MemberAddArg(String memberEmail, String memberGivenName, String memberSurname, String memberExternalId, boolean sendWelcomeEmail, AdminTier role)
newBuilder
to create instances of this class without
specifying values for all optional fields.memberEmail
- Must have length of at most 255, match pattern
"^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*.[A-Za-z]{2,15}$
",
and not be null
.memberGivenName
- Member's first name. Must have length of at least
1, have length of at most 100, match pattern "[^/:?*<>\"|]*
",
and not be null
.memberSurname
- Member's last name. Must have length of at least 1,
have length of at most 100, match pattern "[^/:?*<>\"|]*
",
and not be null
.memberExternalId
- External ID for member. Must have length of at
most 64.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.role
- Must not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public MemberAddArg(String memberEmail, String memberGivenName, String memberSurname)
The default values for unset fields will be used.
memberEmail
- Must have length of at most 255, match pattern
"^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*.[A-Za-z]{2,15}$
",
and not be null
.memberGivenName
- Member's first name. Must have length of at least
1, have length of at most 100, match pattern "[^/:?*<>\"|]*
",
and not be null
.memberSurname
- Member's last name. Must have length of at least 1,
have length of at most 100, match pattern "[^/:?*<>\"|]*
",
and not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String getMemberEmail()
null
.public String getMemberGivenName()
null
.public String getMemberSurname()
null
.public String getMemberExternalId()
null
if not present.public boolean getSendWelcomeEmail()
null
if not present. Defaults to
true.public AdminTier getRole()
null
if not present. Defaults to
AdminTier.MEMBER_ONLY.public static MemberAddArg.Builder newBuilder(String memberEmail, String memberGivenName, String memberSurname)
memberEmail
- Must have length of at most 255, match pattern
"^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*.[A-Za-z]{2,15}$
",
and not be null
.memberGivenName
- Member's first name. Must have length of at least
1, have length of at most 100, match pattern "[^/:?*<>\"|]*
",
and not be null
.memberSurname
- Member's last name. Must have length of at least 1,
have length of at most 100, match pattern "[^/:?*<>\"|]*
",
and not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String toStringMultiline()
The returned String may contain newlines.