Class ContextLogInfo
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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextLogInfoAnonymous context.static final ContextLogInfoCatch-all used for unknown tag values returned by the Dropbox servers.static final ContextLogInfoAction was done on behalf of the team. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAction was done on behalf of a non team member.Action was done on behalf of a team that's part of an organization.Action was done on behalf of a team member.Action was done on behalf of a trusted non team member.inthashCode()booleanbooleanbooleanbooleanisOther()booleanisTeam()booleanbooleanReturnstrueif this instance has the tagContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER,falseotherwise.static ContextLogInfoReturns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.NON_TEAM_MEMBER.static ContextLogInfoorganizationTeam(TeamLogInfo value) Returns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.ORGANIZATION_TEAM.tag()Returns the tag for this instance.static ContextLogInfoteamMember(TeamMemberLogInfo value) Returns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.TEAM_MEMBER.toString()Returns a String representation of this object formatted for easier readability.static ContextLogInfoReturns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER.
-
Field Details
-
ANONYMOUS
Anonymous context. -
TEAM
Action was done on behalf of the team. -
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.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.
-
-
Method Details
-
tag
Returns the tag for this instance.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 returntrue. Callers are recommended to use the tag value in aswitchstatement to properly handle the different values for thisContextLogInfo.If a tag returned by the server is unrecognized by this SDK, the
ContextLogInfo.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isAnonymous
public boolean isAnonymous()- Returns:
trueif this instance is tagged asContextLogInfo.Tag.ANONYMOUS,falseotherwise.
-
isNonTeamMember
public boolean isNonTeamMember()- Returns:
trueif this instance is tagged asContextLogInfo.Tag.NON_TEAM_MEMBER,falseotherwise.
-
nonTeamMember
Returns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.NON_TEAM_MEMBER.Action was done on behalf of a non team member.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
ContextLogInfowith its tag set toContextLogInfo.Tag.NON_TEAM_MEMBER. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getNonTeamMemberValue
Action was done on behalf of a non team member.This instance must be tagged as
ContextLogInfo.Tag.NON_TEAM_MEMBER.- Returns:
- The
NonTeamMemberLogInfovalue associated with this instance ifisNonTeamMember()istrue. - Throws:
IllegalStateException- IfisNonTeamMember()isfalse.
-
isOrganizationTeam
public boolean isOrganizationTeam()- Returns:
trueif this instance is tagged asContextLogInfo.Tag.ORGANIZATION_TEAM,falseotherwise.
-
organizationTeam
Returns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.ORGANIZATION_TEAM.Action was done on behalf of a team that's part of an organization.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
ContextLogInfowith its tag set toContextLogInfo.Tag.ORGANIZATION_TEAM. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getOrganizationTeamValue
Action was done on behalf of a team that's part of an organization.This instance must be tagged as
ContextLogInfo.Tag.ORGANIZATION_TEAM.- Returns:
- The
TeamLogInfovalue associated with this instance ifisOrganizationTeam()istrue. - Throws:
IllegalStateException- IfisOrganizationTeam()isfalse.
-
isTeam
public boolean isTeam()- Returns:
trueif this instance is tagged asContextLogInfo.Tag.TEAM,falseotherwise.
-
isTeamMember
public boolean isTeamMember()- Returns:
trueif this instance is tagged asContextLogInfo.Tag.TEAM_MEMBER,falseotherwise.
-
teamMember
Returns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.TEAM_MEMBER.Action was done on behalf of a team member.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
ContextLogInfowith its tag set toContextLogInfo.Tag.TEAM_MEMBER. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getTeamMemberValue
Action was done on behalf of a team member.This instance must be tagged as
ContextLogInfo.Tag.TEAM_MEMBER.- Returns:
- The
TeamMemberLogInfovalue associated with this instance ifisTeamMember()istrue. - Throws:
IllegalStateException- IfisTeamMember()isfalse.
-
isTrustedNonTeamMember
public boolean isTrustedNonTeamMember()Returnstrueif this instance has the tagContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER,falseotherwise.- Returns:
trueif this instance is tagged asContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER,falseotherwise.
-
trustedNonTeamMember
Returns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER.Action was done on behalf of a trusted non team member.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
ContextLogInfowith its tag set toContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER. - Throws:
IllegalArgumentException- ifvalueisnull.
-
getTrustedNonTeamMemberValue
Action was done on behalf of a trusted non team member.This instance must be tagged as
ContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER.- Returns:
- The
TrustedNonTeamMemberLogInfovalue associated with this instance ifisTrustedNonTeamMember()istrue. - Throws:
IllegalStateException- IfisTrustedNonTeamMember()isfalse.
-
isOther
public boolean isOther()- Returns:
trueif this instance is tagged asContextLogInfo.Tag.OTHER,falseotherwise.
-
hashCode
public int hashCode() -
equals
-
toString
-
toStringMultiline
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Returns:
- Formatted, multiline String representation of this object
-