Package com.dropbox.core.v2.team
Class RevokeDeviceSessionArg
- java.lang.Object
-
- com.dropbox.core.v2.team.RevokeDeviceSessionArg
-
public final class RevokeDeviceSessionArg extends java.lang.Object
This class is a tagged union. Tagged unions instances are always associated to a specific tag. This means only one of theisAbc()
methods will returntrue
. You can usetag()
to determine the tag associated with this instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RevokeDeviceSessionArg.Tag
Discriminating tag type forRevokeDeviceSessionArg
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RevokeDeviceSessionArg
desktopClient(RevokeDesktopClientArg value)
Returns an instance ofRevokeDeviceSessionArg
that has its tag set toRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT
.boolean
equals(java.lang.Object obj)
RevokeDesktopClientArg
getDesktopClientValue()
Unlink a linked desktop device.DeviceSessionArg
getMobileClientValue()
Unlink a linked mobile device.DeviceSessionArg
getWebSessionValue()
End an active session.int
hashCode()
boolean
isDesktopClient()
Returnstrue
if this instance has the tagRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT
,false
otherwise.boolean
isMobileClient()
Returnstrue
if this instance has the tagRevokeDeviceSessionArg.Tag.MOBILE_CLIENT
,false
otherwise.boolean
isWebSession()
static RevokeDeviceSessionArg
mobileClient(DeviceSessionArg value)
Returns an instance ofRevokeDeviceSessionArg
that has its tag set toRevokeDeviceSessionArg.Tag.MOBILE_CLIENT
.RevokeDeviceSessionArg.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 RevokeDeviceSessionArg
webSession(DeviceSessionArg value)
Returns an instance ofRevokeDeviceSessionArg
that has its tag set toRevokeDeviceSessionArg.Tag.WEB_SESSION
.
-
-
-
Method Detail
-
tag
public RevokeDeviceSessionArg.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 thisRevokeDeviceSessionArg
.- Returns:
- the tag for this instance.
-
isWebSession
public boolean isWebSession()
- Returns:
true
if this instance is tagged asRevokeDeviceSessionArg.Tag.WEB_SESSION
,false
otherwise.
-
webSession
public static RevokeDeviceSessionArg webSession(DeviceSessionArg value)
Returns an instance ofRevokeDeviceSessionArg
that has its tag set toRevokeDeviceSessionArg.Tag.WEB_SESSION
.End an active session.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
RevokeDeviceSessionArg
with its tag set toRevokeDeviceSessionArg.Tag.WEB_SESSION
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getWebSessionValue
public DeviceSessionArg getWebSessionValue()
End an active session.This instance must be tagged as
RevokeDeviceSessionArg.Tag.WEB_SESSION
.- Returns:
- The
DeviceSessionArg
value associated with this instance ifisWebSession()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisWebSession()
isfalse
.
-
isDesktopClient
public boolean isDesktopClient()
Returnstrue
if this instance has the tagRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT
,false
otherwise.- Returns:
true
if this instance is tagged asRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT
,false
otherwise.
-
desktopClient
public static RevokeDeviceSessionArg desktopClient(RevokeDesktopClientArg value)
Returns an instance ofRevokeDeviceSessionArg
that has its tag set toRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT
.Unlink a linked desktop device.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
RevokeDeviceSessionArg
with its tag set toRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getDesktopClientValue
public RevokeDesktopClientArg getDesktopClientValue()
Unlink a linked desktop device.This instance must be tagged as
RevokeDeviceSessionArg.Tag.DESKTOP_CLIENT
.- Returns:
- The
RevokeDesktopClientArg
value associated with this instance ifisDesktopClient()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisDesktopClient()
isfalse
.
-
isMobileClient
public boolean isMobileClient()
Returnstrue
if this instance has the tagRevokeDeviceSessionArg.Tag.MOBILE_CLIENT
,false
otherwise.- Returns:
true
if this instance is tagged asRevokeDeviceSessionArg.Tag.MOBILE_CLIENT
,false
otherwise.
-
mobileClient
public static RevokeDeviceSessionArg mobileClient(DeviceSessionArg value)
Returns an instance ofRevokeDeviceSessionArg
that has its tag set toRevokeDeviceSessionArg.Tag.MOBILE_CLIENT
.Unlink a linked mobile device.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
RevokeDeviceSessionArg
with its tag set toRevokeDeviceSessionArg.Tag.MOBILE_CLIENT
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getMobileClientValue
public DeviceSessionArg getMobileClientValue()
Unlink a linked mobile device.This instance must be tagged as
RevokeDeviceSessionArg.Tag.MOBILE_CLIENT
.- Returns:
- The
DeviceSessionArg
value associated with this instance ifisMobileClient()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisMobileClient()
isfalse
.
-
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
-
-