public final class AccessMethodLogInfo
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 |
AccessMethodLogInfo.Tag
Discriminating tag type for
AccessMethodLogInfo . |
Modifier and Type | Field and Description |
---|---|
static AccessMethodLogInfo |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
Modifier and Type | Method and Description |
---|---|
static AccessMethodLogInfo |
adminConsole(WebSessionLogInfo value)
Returns an instance of
AccessMethodLogInfo that has its tag set
to AccessMethodLogInfo.Tag.ADMIN_CONSOLE . |
static AccessMethodLogInfo |
api(ApiSessionLogInfo value)
Returns an instance of
AccessMethodLogInfo that has its tag set
to AccessMethodLogInfo.Tag.API . |
static AccessMethodLogInfo |
contentManager(WebSessionLogInfo value)
Returns an instance of
AccessMethodLogInfo that has its tag set
to AccessMethodLogInfo.Tag.CONTENT_MANAGER . |
static AccessMethodLogInfo |
endUser(SessionLogInfo value)
Returns an instance of
AccessMethodLogInfo that has its tag set
to AccessMethodLogInfo.Tag.END_USER . |
static AccessMethodLogInfo |
enterpriseConsole(WebSessionLogInfo value)
Returns an instance of
AccessMethodLogInfo that has its tag set
to AccessMethodLogInfo.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()
Returns
true if this instance has the tag AccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE , false otherwise. |
boolean |
isOther()
|
boolean |
isSignInAs()
|
static AccessMethodLogInfo |
signInAs(WebSessionLogInfo value)
Returns an instance of
AccessMethodLogInfo that has its tag set
to AccessMethodLogInfo.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.
|
public static final AccessMethodLogInfo 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 AccessMethodLogInfo.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 AccessMethodLogInfo
.
If a tag returned by the server is unrecognized by this SDK, the
AccessMethodLogInfo.Tag.OTHER
value will be used.
public boolean isEndUser()
true
if this instance is tagged as AccessMethodLogInfo.Tag.END_USER
,
false
otherwise.public static AccessMethodLogInfo endUser(SessionLogInfo value)
AccessMethodLogInfo
that has its tag set
to AccessMethodLogInfo.Tag.END_USER
.
End user session details.
value
- value to assign to this instance.AccessMethodLogInfo
with its tag set to
AccessMethodLogInfo.Tag.END_USER
.java.lang.IllegalArgumentException
- if value
is null
.public SessionLogInfo getEndUserValue()
This instance must be tagged as AccessMethodLogInfo.Tag.END_USER
.
SessionLogInfo
value associated with this instance if
isEndUser()
is true
.java.lang.IllegalStateException
- If isEndUser()
is false
.public boolean isSignInAs()
true
if this instance is tagged as AccessMethodLogInfo.Tag.SIGN_IN_AS
, false
otherwise.public static AccessMethodLogInfo signInAs(WebSessionLogInfo value)
AccessMethodLogInfo
that has its tag set
to AccessMethodLogInfo.Tag.SIGN_IN_AS
.
Sign in as session details.
value
- value to assign to this instance.AccessMethodLogInfo
with its tag set to
AccessMethodLogInfo.Tag.SIGN_IN_AS
.java.lang.IllegalArgumentException
- if value
is null
.public WebSessionLogInfo getSignInAsValue()
This instance must be tagged as AccessMethodLogInfo.Tag.SIGN_IN_AS
.
WebSessionLogInfo
value associated with this instance
if isSignInAs()
is true
.java.lang.IllegalStateException
- If isSignInAs()
is false
.public boolean isContentManager()
true
if this instance is tagged as AccessMethodLogInfo.Tag.CONTENT_MANAGER
, false
otherwise.public static AccessMethodLogInfo contentManager(WebSessionLogInfo value)
AccessMethodLogInfo
that has its tag set
to AccessMethodLogInfo.Tag.CONTENT_MANAGER
.
Content manager session details.
value
- value to assign to this instance.AccessMethodLogInfo
with its tag set to
AccessMethodLogInfo.Tag.CONTENT_MANAGER
.java.lang.IllegalArgumentException
- if value
is null
.public WebSessionLogInfo getContentManagerValue()
This instance must be tagged as AccessMethodLogInfo.Tag.CONTENT_MANAGER
.
WebSessionLogInfo
value associated with this instance
if isContentManager()
is true
.java.lang.IllegalStateException
- If isContentManager()
is false
.public boolean isAdminConsole()
true
if this instance is tagged as AccessMethodLogInfo.Tag.ADMIN_CONSOLE
, false
otherwise.public static AccessMethodLogInfo adminConsole(WebSessionLogInfo value)
AccessMethodLogInfo
that has its tag set
to AccessMethodLogInfo.Tag.ADMIN_CONSOLE
.
Admin console session details.
value
- value to assign to this instance.AccessMethodLogInfo
with its tag set to
AccessMethodLogInfo.Tag.ADMIN_CONSOLE
.java.lang.IllegalArgumentException
- if value
is null
.public WebSessionLogInfo getAdminConsoleValue()
This instance must be tagged as AccessMethodLogInfo.Tag.ADMIN_CONSOLE
.
WebSessionLogInfo
value associated with this instance
if isAdminConsole()
is true
.java.lang.IllegalStateException
- If isAdminConsole()
is false
.public boolean isEnterpriseConsole()
true
if this instance has the tag AccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
, false
otherwise.true
if this instance is tagged as AccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
, false
otherwise.public static AccessMethodLogInfo enterpriseConsole(WebSessionLogInfo value)
AccessMethodLogInfo
that has its tag set
to AccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
.
Enterprise console session details.
value
- value to assign to this instance.AccessMethodLogInfo
with its tag set to
AccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
.java.lang.IllegalArgumentException
- if value
is null
.public WebSessionLogInfo getEnterpriseConsoleValue()
This instance must be tagged as AccessMethodLogInfo.Tag.ENTERPRISE_CONSOLE
.
WebSessionLogInfo
value associated with this instance
if isEnterpriseConsole()
is true
.java.lang.IllegalStateException
- If isEnterpriseConsole()
is false
.public boolean isApi()
true
if this instance is tagged as AccessMethodLogInfo.Tag.API
,
false
otherwise.public static AccessMethodLogInfo api(ApiSessionLogInfo value)
AccessMethodLogInfo
that has its tag set
to AccessMethodLogInfo.Tag.API
.
Api session details.
value
- value to assign to this instance.AccessMethodLogInfo
with its tag set to
AccessMethodLogInfo.Tag.API
.java.lang.IllegalArgumentException
- if value
is null
.public ApiSessionLogInfo getApiValue()
This instance must be tagged as AccessMethodLogInfo.Tag.API
.
ApiSessionLogInfo
value associated with this instance
if isApi()
is true
.java.lang.IllegalStateException
- If isApi()
is false
.public boolean isOther()
true
if this instance is tagged as AccessMethodLogInfo.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.