public final class ContextLogInfo
extends java.lang.Object
This class is an open tagged union. Tagged unions instances are always
associated to a specific tag. This means only one of the isAbc()
methods will return true
. You can use tag()
to determine the
tag associated with this instance.
Open unions may be extended in the future with additional tags. If a new
tag is introduced that this SDK does not recognized, the OTHER
value
will be used.
Modifier and Type | Class and Description |
---|---|
static class |
ContextLogInfo.Tag
Discriminating tag type for
ContextLogInfo . |
Modifier and Type | Field and Description |
---|---|
static ContextLogInfo |
ANONYMOUS
Anonymous context.
|
static ContextLogInfo |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
static ContextLogInfo |
TEAM
Action was done on behalf of the team.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
NonTeamMemberLogInfo |
getNonTeamMemberValue()
Action was done on behalf of a non team member.
|
TeamLogInfo |
getOrganizationTeamValue()
Action was done on behalf of a team that's part of an organization.
|
TeamMemberLogInfo |
getTeamMemberValue()
Action was done on behalf of a team member.
|
TrustedNonTeamMemberLogInfo |
getTrustedNonTeamMemberValue()
Action was done on behalf of a trusted non team member.
|
int |
hashCode() |
boolean |
isAnonymous()
|
boolean |
isNonTeamMember()
|
boolean |
isOrganizationTeam()
|
boolean |
isOther()
|
boolean |
isTeam()
|
boolean |
isTeamMember()
|
boolean |
isTrustedNonTeamMember()
Returns
true if this instance has the tag ContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER , false otherwise. |
static ContextLogInfo |
nonTeamMember(NonTeamMemberLogInfo value)
Returns an instance of
ContextLogInfo that has its tag set to
ContextLogInfo.Tag.NON_TEAM_MEMBER . |
static ContextLogInfo |
organizationTeam(TeamLogInfo value)
Returns an instance of
ContextLogInfo that has its tag set to
ContextLogInfo.Tag.ORGANIZATION_TEAM . |
ContextLogInfo.Tag |
tag()
Returns the tag for this instance.
|
static ContextLogInfo |
teamMember(TeamMemberLogInfo value)
Returns an instance of
ContextLogInfo that has its tag set to
ContextLogInfo.Tag.TEAM_MEMBER . |
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
static ContextLogInfo |
trustedNonTeamMember(TrustedNonTeamMemberLogInfo value)
Returns an instance of
ContextLogInfo that has its tag set to
ContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER . |
public static final ContextLogInfo ANONYMOUS
public static final ContextLogInfo TEAM
public static final ContextLogInfo OTHER
Receiving a catch-all value typically indicates this SDK version is not up to date. Consider updating your SDK version to handle the new tags.
public ContextLogInfo.Tag tag()
This class is a tagged union. Tagged unions instances are always
associated to a specific tag. This means only one of the isXyz()
methods will return true
. Callers are recommended to use the tag
value in a switch
statement to properly handle the different
values for this ContextLogInfo
.
If a tag returned by the server is unrecognized by this SDK, the
ContextLogInfo.Tag.OTHER
value will be used.
public boolean isTeamMember()
true
if this instance is tagged as ContextLogInfo.Tag.TEAM_MEMBER
, false
otherwise.public static ContextLogInfo teamMember(TeamMemberLogInfo value)
ContextLogInfo
that has its tag set to
ContextLogInfo.Tag.TEAM_MEMBER
.
Action was done on behalf of a team member.
value
- value to assign to this instance.ContextLogInfo
with its tag set to ContextLogInfo.Tag.TEAM_MEMBER
.java.lang.IllegalArgumentException
- if value
is null
.public TeamMemberLogInfo getTeamMemberValue()
This instance must be tagged as ContextLogInfo.Tag.TEAM_MEMBER
.
TeamMemberLogInfo
value associated with this instance
if isTeamMember()
is true
.java.lang.IllegalStateException
- If isTeamMember()
is false
.public boolean isNonTeamMember()
true
if this instance is tagged as ContextLogInfo.Tag.NON_TEAM_MEMBER
, false
otherwise.public static ContextLogInfo nonTeamMember(NonTeamMemberLogInfo value)
ContextLogInfo
that has its tag set to
ContextLogInfo.Tag.NON_TEAM_MEMBER
.
Action was done on behalf of a non team member.
value
- value to assign to this instance.ContextLogInfo
with its tag set to ContextLogInfo.Tag.NON_TEAM_MEMBER
.java.lang.IllegalArgumentException
- if value
is null
.public NonTeamMemberLogInfo getNonTeamMemberValue()
This instance must be tagged as ContextLogInfo.Tag.NON_TEAM_MEMBER
.
NonTeamMemberLogInfo
value associated with this
instance if isNonTeamMember()
is true
.java.lang.IllegalStateException
- If isNonTeamMember()
is false
.public boolean isAnonymous()
true
if this instance is tagged as ContextLogInfo.Tag.ANONYMOUS
,
false
otherwise.public boolean isTeam()
true
if this instance is tagged as ContextLogInfo.Tag.TEAM
,
false
otherwise.public boolean isOrganizationTeam()
true
if this instance is tagged as ContextLogInfo.Tag.ORGANIZATION_TEAM
, false
otherwise.public static ContextLogInfo organizationTeam(TeamLogInfo value)
ContextLogInfo
that has its tag set to
ContextLogInfo.Tag.ORGANIZATION_TEAM
.
Action was done on behalf of a team that's part of an organization.
value
- value to assign to this instance.ContextLogInfo
with its tag set to ContextLogInfo.Tag.ORGANIZATION_TEAM
.java.lang.IllegalArgumentException
- if value
is null
.public TeamLogInfo getOrganizationTeamValue()
This instance must be tagged as ContextLogInfo.Tag.ORGANIZATION_TEAM
.
TeamLogInfo
value associated with this instance if
isOrganizationTeam()
is true
.java.lang.IllegalStateException
- If isOrganizationTeam()
is false
.public boolean isTrustedNonTeamMember()
true
if this instance has the tag ContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER
, false
otherwise.true
if this instance is tagged as ContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER
, false
otherwise.public static ContextLogInfo trustedNonTeamMember(TrustedNonTeamMemberLogInfo value)
ContextLogInfo
that has its tag set to
ContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER
.
Action was done on behalf of a trusted non team member.
value
- value to assign to this instance.ContextLogInfo
with its tag set to ContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER
.java.lang.IllegalArgumentException
- if value
is null
.public TrustedNonTeamMemberLogInfo getTrustedNonTeamMemberValue()
This instance must be tagged as ContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER
.
TrustedNonTeamMemberLogInfo
value associated with
this instance if isTrustedNonTeamMember()
is true
.java.lang.IllegalStateException
- If isTrustedNonTeamMember()
is
false
.public boolean isOther()
true
if this instance is tagged as ContextLogInfo.Tag.OTHER
,
false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.