Class ContextLogInfo
- java.lang.Object
- 
- com.dropbox.core.v2.teamlog.ContextLogInfo
 
- 
 public final class ContextLogInfo extends java.lang.ObjectThe primary entity on which the action was done.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 returntrue. You can usetag()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 OTHERvalue will be used.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classContextLogInfo.TagDiscriminating tag type forContextLogInfo.
 - 
Field SummaryFields Modifier and Type Field Description static ContextLogInfoANONYMOUSAnonymous context.static ContextLogInfoOTHERCatch-all used for unknown tag values returned by the Dropbox servers.static ContextLogInfoTEAMAction was done on behalf of the team.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)NonTeamMemberLogInfogetNonTeamMemberValue()Action was done on behalf of a non team member.TeamLogInfogetOrganizationTeamValue()Action was done on behalf of a team that's part of an organization.TeamMemberLogInfogetTeamMemberValue()Action was done on behalf of a team member.TrustedNonTeamMemberLogInfogetTrustedNonTeamMemberValue()Action was done on behalf of a trusted non team member.inthashCode()booleanisAnonymous()booleanisNonTeamMember()booleanisOrganizationTeam()booleanisOther()booleanisTeam()booleanisTeamMember()booleanisTrustedNonTeamMember()Returnstrueif this instance has the tagContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER,falseotherwise.static ContextLogInfononTeamMember(NonTeamMemberLogInfo value)Returns 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.ContextLogInfo.Tagtag()Returns the tag for this instance.static ContextLogInfoteamMember(TeamMemberLogInfo value)Returns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.TEAM_MEMBER.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.static ContextLogInfotrustedNonTeamMember(TrustedNonTeamMemberLogInfo value)Returns an instance ofContextLogInfothat has its tag set toContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER.
 
- 
- 
- 
Field Detail- 
ANONYMOUSpublic static final ContextLogInfo ANONYMOUS Anonymous context.
 - 
TEAMpublic static final ContextLogInfo TEAM Action was done on behalf of the team.
 - 
OTHERpublic static final ContextLogInfo 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 Detail- 
tagpublic ContextLogInfo.Tag 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.
 
 - 
isAnonymouspublic boolean isAnonymous() - Returns:
- trueif this instance is tagged as- ContextLogInfo.Tag.ANONYMOUS,- falseotherwise.
 
 - 
isNonTeamMemberpublic boolean isNonTeamMember() - Returns:
- trueif this instance is tagged as- ContextLogInfo.Tag.NON_TEAM_MEMBER,- falseotherwise.
 
 - 
nonTeamMemberpublic static ContextLogInfo nonTeamMember(NonTeamMemberLogInfo value) 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:
- java.lang.IllegalArgumentException- if- valueis- null.
 
 - 
getNonTeamMemberValuepublic NonTeamMemberLogInfo 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:
- java.lang.IllegalStateException- If- isNonTeamMember()is- false.
 
 - 
isOrganizationTeampublic boolean isOrganizationTeam() - Returns:
- trueif this instance is tagged as- ContextLogInfo.Tag.ORGANIZATION_TEAM,- falseotherwise.
 
 - 
organizationTeampublic static ContextLogInfo organizationTeam(TeamLogInfo value) 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:
- java.lang.IllegalArgumentException- if- valueis- null.
 
 - 
getOrganizationTeamValuepublic TeamLogInfo 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:
- java.lang.IllegalStateException- If- isOrganizationTeam()is- false.
 
 - 
isTeampublic boolean isTeam() - Returns:
- trueif this instance is tagged as- ContextLogInfo.Tag.TEAM,- falseotherwise.
 
 - 
isTeamMemberpublic boolean isTeamMember() - Returns:
- trueif this instance is tagged as- ContextLogInfo.Tag.TEAM_MEMBER,- falseotherwise.
 
 - 
teamMemberpublic static ContextLogInfo teamMember(TeamMemberLogInfo value) 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:
- java.lang.IllegalArgumentException- if- valueis- null.
 
 - 
getTeamMemberValuepublic TeamMemberLogInfo 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:
- java.lang.IllegalStateException- If- isTeamMember()is- false.
 
 - 
isTrustedNonTeamMemberpublic boolean isTrustedNonTeamMember() Returnstrueif this instance has the tagContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER,falseotherwise.- Returns:
- trueif this instance is tagged as- ContextLogInfo.Tag.TRUSTED_NON_TEAM_MEMBER,- falseotherwise.
 
 - 
trustedNonTeamMemberpublic static ContextLogInfo trustedNonTeamMember(TrustedNonTeamMemberLogInfo value) 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:
- java.lang.IllegalArgumentException- if- valueis- null.
 
 - 
getTrustedNonTeamMemberValuepublic TrustedNonTeamMemberLogInfo 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:
- java.lang.IllegalStateException- If- isTrustedNonTeamMember()is- false.
 
 - 
isOtherpublic boolean isOther() - Returns:
- trueif this instance is tagged as- ContextLogInfo.Tag.OTHER,- falseotherwise.
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
toStringMultilinepublic java.lang.String 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
 
 
- 
 
-