public final class ActorLogInfo
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 |
ActorLogInfo.Tag
Discriminating tag type for
ActorLogInfo. |
| Modifier and Type | Field and Description |
|---|---|
static ActorLogInfo |
ANONYMOUS
Anonymous actor.
|
static ActorLogInfo |
DROPBOX
Action done by Dropbox.
|
static ActorLogInfo |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
| Modifier and Type | Method and Description |
|---|---|
static ActorLogInfo |
admin(UserLogInfo value)
Returns an instance of
ActorLogInfo that has its tag set to
ActorLogInfo.Tag.ADMIN. |
static ActorLogInfo |
app(AppLogInfo value)
Returns an instance of
ActorLogInfo that has its tag set to
ActorLogInfo.Tag.APP. |
boolean |
equals(java.lang.Object obj) |
UserLogInfo |
getAdminValue()
The admin who did the action.
|
AppLogInfo |
getAppValue()
The application who did the action.
|
ResellerLogInfo |
getResellerValue()
Action done by reseller.
|
UserLogInfo |
getUserValue()
The user who did the action.
|
int |
hashCode() |
boolean |
isAdmin()
|
boolean |
isAnonymous()
|
boolean |
isApp()
|
boolean |
isDropbox()
|
boolean |
isOther()
|
boolean |
isReseller()
|
boolean |
isUser()
|
static ActorLogInfo |
reseller(ResellerLogInfo value)
Returns an instance of
ActorLogInfo that has its tag set to
ActorLogInfo.Tag.RESELLER. |
ActorLogInfo.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.
|
static ActorLogInfo |
user(UserLogInfo value)
Returns an instance of
ActorLogInfo that has its tag set to
ActorLogInfo.Tag.USER. |
public static final ActorLogInfo DROPBOX
public static final ActorLogInfo ANONYMOUS
public static final ActorLogInfo 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 ActorLogInfo.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 ActorLogInfo.
If a tag returned by the server is unrecognized by this SDK, the
ActorLogInfo.Tag.OTHER value will be used.
public boolean isUser()
true if this instance is tagged as ActorLogInfo.Tag.USER,
false otherwise.public static ActorLogInfo user(UserLogInfo value)
ActorLogInfo that has its tag set to
ActorLogInfo.Tag.USER.
The user who did the action.
value - value to assign to this instance.ActorLogInfo with its tag set to ActorLogInfo.Tag.USER.java.lang.IllegalArgumentException - if value is null.public UserLogInfo getUserValue()
This instance must be tagged as ActorLogInfo.Tag.USER.
UserLogInfo value associated with this instance if
isUser() is true.java.lang.IllegalStateException - If isUser() is false.public boolean isAdmin()
true if this instance is tagged as ActorLogInfo.Tag.ADMIN,
false otherwise.public static ActorLogInfo admin(UserLogInfo value)
ActorLogInfo that has its tag set to
ActorLogInfo.Tag.ADMIN.
The admin who did the action.
value - value to assign to this instance.ActorLogInfo with its tag set to ActorLogInfo.Tag.ADMIN.java.lang.IllegalArgumentException - if value is null.public UserLogInfo getAdminValue()
This instance must be tagged as ActorLogInfo.Tag.ADMIN.
UserLogInfo value associated with this instance if
isAdmin() is true.java.lang.IllegalStateException - If isAdmin() is false.public boolean isApp()
true if this instance is tagged as ActorLogInfo.Tag.APP,
false otherwise.public static ActorLogInfo app(AppLogInfo value)
ActorLogInfo that has its tag set to
ActorLogInfo.Tag.APP.
The application who did the action.
value - value to assign to this instance.ActorLogInfo with its tag set to ActorLogInfo.Tag.APP.java.lang.IllegalArgumentException - if value is null.public AppLogInfo getAppValue()
This instance must be tagged as ActorLogInfo.Tag.APP.
AppLogInfo value associated with this instance if
isApp() is true.java.lang.IllegalStateException - If isApp() is false.public boolean isReseller()
true if this instance is tagged as ActorLogInfo.Tag.RESELLER,
false otherwise.public static ActorLogInfo reseller(ResellerLogInfo value)
ActorLogInfo that has its tag set to
ActorLogInfo.Tag.RESELLER.
Action done by reseller.
value - value to assign to this instance.ActorLogInfo with its tag set to ActorLogInfo.Tag.RESELLER.java.lang.IllegalArgumentException - if value is null.public ResellerLogInfo getResellerValue()
This instance must be tagged as ActorLogInfo.Tag.RESELLER.
ResellerLogInfo value associated with this instance
if isReseller() is true.java.lang.IllegalStateException - If isReseller() is false.public boolean isDropbox()
true if this instance is tagged as ActorLogInfo.Tag.DROPBOX,
false otherwise.public boolean isAnonymous()
true if this instance is tagged as ActorLogInfo.Tag.ANONYMOUS,
false otherwise.public boolean isOther()
true if this instance is tagged as ActorLogInfo.Tag.OTHER,
false otherwise.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringMultiline()
The returned String may contain newlines.