Class AccessMethodLogInfo
- java.lang.Object
-
- com.dropbox.core.v2.teamlog.AccessMethodLogInfo
-
public final class AccessMethodLogInfo extends java.lang.Object
Indicates 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
OTHER
value will be used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AccessMethodLogInfo.Tag
Discriminating tag type forAccessMethodLogInfo
.
-
Field Summary
Fields Modifier and Type Field Description static AccessMethodLogInfo
OTHER
Catch-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 AccessMethodLogInfo
adminConsole(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.ADMIN_CONSOLE
.static AccessMethodLogInfo
api(ApiSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.API
.static AccessMethodLogInfo
contentManager(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.CONTENT_MANAGER
.static AccessMethodLogInfo
endUser(SessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.END_USER
.static AccessMethodLogInfo
enterpriseConsole(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
.boolean
equals(java.lang.Object obj)
WebSessionLogInfo
getAdminConsoleValue()
Admin console session details.ApiSessionLogInfo
getApiValue()
Api session details.WebSessionLogInfo
getContentManagerValue()
Content manager session details.SessionLogInfo
getEndUserValue()
End user session details.WebSessionLogInfo
getEnterpriseConsoleValue()
Enterprise console session details.WebSessionLogInfo
getSignInAsValue()
Sign in as session details.int
hashCode()
boolean
isAdminConsole()
boolean
isApi()
boolean
isContentManager()
boolean
isEndUser()
boolean
isEnterpriseConsole()
Returnstrue
if this instance has the tagAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
,false
otherwise.boolean
isOther()
boolean
isSignInAs()
static AccessMethodLogInfo
signInAs(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.SIGN_IN_AS
.AccessMethodLogInfo.Tag
tag()
Returns the tag for this instance.java.lang.String
toString()
java.lang.String
toStringMultiline()
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 aswitch
statement to properly handle the different values for thisAccessMethodLogInfo
.If a tag returned by the server is unrecognized by this SDK, the
AccessMethodLogInfo.Tag.OTHER
value will be used.- Returns:
- the tag for this instance.
-
isAdminConsole
public boolean isAdminConsole()
- Returns:
true
if this instance is tagged asAccessMethodLogInfo.Tag.ADMIN_CONSOLE
,false
otherwise.
-
adminConsole
public static AccessMethodLogInfo adminConsole(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.ADMIN_CONSOLE
.Admin console session details.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfo
with its tag set toAccessMethodLogInfo.Tag.ADMIN_CONSOLE
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getAdminConsoleValue
public WebSessionLogInfo getAdminConsoleValue()
Admin console session details.This instance must be tagged as
AccessMethodLogInfo.Tag.ADMIN_CONSOLE
.- Returns:
- The
WebSessionLogInfo
value associated with this instance ifisAdminConsole()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisAdminConsole()
isfalse
.
-
isApi
public boolean isApi()
- Returns:
true
if this instance is tagged asAccessMethodLogInfo.Tag.API
,false
otherwise.
-
api
public static AccessMethodLogInfo api(ApiSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.API
.Api session details.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfo
with its tag set toAccessMethodLogInfo.Tag.API
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getApiValue
public ApiSessionLogInfo getApiValue()
Api session details.This instance must be tagged as
AccessMethodLogInfo.Tag.API
.- Returns:
- The
ApiSessionLogInfo
value associated with this instance ifisApi()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisApi()
isfalse
.
-
isContentManager
public boolean isContentManager()
- Returns:
true
if this instance is tagged asAccessMethodLogInfo.Tag.CONTENT_MANAGER
,false
otherwise.
-
contentManager
public static AccessMethodLogInfo contentManager(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.CONTENT_MANAGER
.Content manager session details.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfo
with its tag set toAccessMethodLogInfo.Tag.CONTENT_MANAGER
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getContentManagerValue
public WebSessionLogInfo getContentManagerValue()
Content manager session details.This instance must be tagged as
AccessMethodLogInfo.Tag.CONTENT_MANAGER
.- Returns:
- The
WebSessionLogInfo
value associated with this instance ifisContentManager()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisContentManager()
isfalse
.
-
isEndUser
public boolean isEndUser()
- Returns:
true
if this instance is tagged asAccessMethodLogInfo.Tag.END_USER
,false
otherwise.
-
endUser
public static AccessMethodLogInfo endUser(SessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.END_USER
.End user session details.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfo
with its tag set toAccessMethodLogInfo.Tag.END_USER
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getEndUserValue
public SessionLogInfo getEndUserValue()
End user session details.This instance must be tagged as
AccessMethodLogInfo.Tag.END_USER
.- Returns:
- The
SessionLogInfo
value associated with this instance ifisEndUser()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisEndUser()
isfalse
.
-
isEnterpriseConsole
public boolean isEnterpriseConsole()
Returnstrue
if this instance has the tagAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
,false
otherwise.- Returns:
true
if this instance is tagged asAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
,false
otherwise.
-
enterpriseConsole
public static AccessMethodLogInfo enterpriseConsole(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that has its tag set toAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
.Enterprise console session details.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
AccessMethodLogInfo
with its tag set toAccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getEnterpriseConsoleValue
public WebSessionLogInfo getEnterpriseConsoleValue()
Enterprise console session details.This instance must be tagged as
AccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
.- Returns:
- The
WebSessionLogInfo
value associated with this instance ifisEnterpriseConsole()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisEnterpriseConsole()
isfalse
.
-
isSignInAs
public boolean isSignInAs()
- Returns:
true
if this instance is tagged asAccessMethodLogInfo.Tag.SIGN_IN_AS
,false
otherwise.
-
signInAs
public static AccessMethodLogInfo signInAs(WebSessionLogInfo value)
Returns an instance ofAccessMethodLogInfo
that 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
AccessMethodLogInfo
with its tag set toAccessMethodLogInfo.Tag.SIGN_IN_AS
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getSignInAsValue
public WebSessionLogInfo getSignInAsValue()
Sign in as session details.This instance must be tagged as
AccessMethodLogInfo.Tag.SIGN_IN_AS
.- Returns:
- The
WebSessionLogInfo
value associated with this instance ifisSignInAs()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisSignInAs()
isfalse
.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asAccessMethodLogInfo.Tag.OTHER
,false
otherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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
-
-