Class AccessMethodLogInfo
- java.lang.Object
-
- com.dropbox.core.v2.teamlog.AccessMethodLogInfo
-
public final class AccessMethodLogInfo extends java.lang.ObjectIndicates the method in which the action was performed.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 Summary
Nested Classes Modifier and Type Class Description static classAccessMethodLogInfo.TagDiscriminating tag type forAccessMethodLogInfo.
-
Field Summary
Fields Modifier and Type Field Description static AccessMethodLogInfoOTHERCatch-all used for unknown tag values returned by the Dropbox servers.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AccessMethodLogInfoadminConsole(WebSessionLogInfo value)Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.ADMIN_CONSOLE.static AccessMethodLogInfoapi(ApiSessionLogInfo value)Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.API.static AccessMethodLogInfocontentManager(WebSessionLogInfo value)Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.CONTENT_MANAGER.static AccessMethodLogInfoendUser(SessionLogInfo value)Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.END_USER.static AccessMethodLogInfoenterpriseConsole(WebSessionLogInfo value)Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE.booleanequals(java.lang.Object obj)WebSessionLogInfogetAdminConsoleValue()Admin console session details.ApiSessionLogInfogetApiValue()Api session details.WebSessionLogInfogetContentManagerValue()Content manager session details.SessionLogInfogetEndUserValue()End user session details.WebSessionLogInfogetEnterpriseConsoleValue()Enterprise console session details.WebSessionLogInfogetSignInAsValue()Sign in as session details.inthashCode()booleanisAdminConsole()booleanisApi()booleanisContentManager()booleanisEndUser()booleanisEnterpriseConsole()Returnstrueif this instance has the tagAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE,falseotherwise.booleanisOther()booleanisSignInAs()static AccessMethodLogInfosignInAs(WebSessionLogInfo value)Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.SIGN_IN_AS.AccessMethodLogInfo.Tagtag()Returns the tag for this instance.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
OTHER
public static final AccessMethodLogInfo 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
-
tag
public AccessMethodLogInfo.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 thisAccessMethodLogInfo.If a tag returned by the server is unrecognized by this SDK, the
AccessMethodLogInfo.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isAdminConsole
public boolean isAdminConsole()
- Returns:
trueif this instance is tagged asAccessMethodLogInfo.Tag.ADMIN_CONSOLE,falseotherwise.
-
adminConsole
public static AccessMethodLogInfo adminConsole(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.ADMIN_CONSOLE.Admin console session details.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfowith its tag set toAccessMethodLogInfo.Tag.ADMIN_CONSOLE. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getAdminConsoleValue
public WebSessionLogInfo getAdminConsoleValue()
Admin console session details.This instance must be tagged as
AccessMethodLogInfo.Tag.ADMIN_CONSOLE.- Returns:
- The
WebSessionLogInfovalue associated with this instance ifisAdminConsole()istrue. - Throws:
java.lang.IllegalStateException- IfisAdminConsole()isfalse.
-
isApi
public boolean isApi()
- Returns:
trueif this instance is tagged asAccessMethodLogInfo.Tag.API,falseotherwise.
-
api
public static AccessMethodLogInfo api(ApiSessionLogInfo value)
Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.API.Api session details.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfowith its tag set toAccessMethodLogInfo.Tag.API. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getApiValue
public ApiSessionLogInfo getApiValue()
Api session details.This instance must be tagged as
AccessMethodLogInfo.Tag.API.- Returns:
- The
ApiSessionLogInfovalue associated with this instance ifisApi()istrue. - Throws:
java.lang.IllegalStateException- IfisApi()isfalse.
-
isContentManager
public boolean isContentManager()
- Returns:
trueif this instance is tagged asAccessMethodLogInfo.Tag.CONTENT_MANAGER,falseotherwise.
-
contentManager
public static AccessMethodLogInfo contentManager(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.CONTENT_MANAGER.Content manager session details.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfowith its tag set toAccessMethodLogInfo.Tag.CONTENT_MANAGER. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getContentManagerValue
public WebSessionLogInfo getContentManagerValue()
Content manager session details.This instance must be tagged as
AccessMethodLogInfo.Tag.CONTENT_MANAGER.- Returns:
- The
WebSessionLogInfovalue associated with this instance ifisContentManager()istrue. - Throws:
java.lang.IllegalStateException- IfisContentManager()isfalse.
-
isEndUser
public boolean isEndUser()
- Returns:
trueif this instance is tagged asAccessMethodLogInfo.Tag.END_USER,falseotherwise.
-
endUser
public static AccessMethodLogInfo endUser(SessionLogInfo value)
Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.END_USER.End user session details.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfowith its tag set toAccessMethodLogInfo.Tag.END_USER. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getEndUserValue
public SessionLogInfo getEndUserValue()
End user session details.This instance must be tagged as
AccessMethodLogInfo.Tag.END_USER.- Returns:
- The
SessionLogInfovalue associated with this instance ifisEndUser()istrue. - Throws:
java.lang.IllegalStateException- IfisEndUser()isfalse.
-
isEnterpriseConsole
public boolean isEnterpriseConsole()
Returnstrueif this instance has the tagAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE,falseotherwise.- Returns:
trueif this instance is tagged asAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE,falseotherwise.
-
enterpriseConsole
public static AccessMethodLogInfo enterpriseConsole(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE.Enterprise console session details.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfowith its tag set toAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getEnterpriseConsoleValue
public WebSessionLogInfo getEnterpriseConsoleValue()
Enterprise console session details.This instance must be tagged as
AccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE.- Returns:
- The
WebSessionLogInfovalue associated with this instance ifisEnterpriseConsole()istrue. - Throws:
java.lang.IllegalStateException- IfisEnterpriseConsole()isfalse.
-
isSignInAs
public boolean isSignInAs()
- Returns:
trueif this instance is tagged asAccessMethodLogInfo.Tag.SIGN_IN_AS,falseotherwise.
-
signInAs
public static AccessMethodLogInfo signInAs(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfothat has its tag set toAccessMethodLogInfo.Tag.SIGN_IN_AS.Sign in as session details.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfowith its tag set toAccessMethodLogInfo.Tag.SIGN_IN_AS. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getSignInAsValue
public WebSessionLogInfo getSignInAsValue()
Sign in as session details.This instance must be tagged as
AccessMethodLogInfo.Tag.SIGN_IN_AS.- Returns:
- The
WebSessionLogInfovalue associated with this instance ifisSignInAs()istrue. - Throws:
java.lang.IllegalStateException- IfisSignInAs()isfalse.
-
isOther
public boolean isOther()
- Returns:
trueif this instance is tagged asAccessMethodLogInfo.Tag.OTHER,falseotherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringMultiline
public 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
-
-