Package com.dropbox.core.v2.team
Class RevokeDeviceSessionArg
- java.lang.Object
-
- com.dropbox.core.v2.team.RevokeDeviceSessionArg
-
public final class RevokeDeviceSessionArg extends java.lang.ObjectThis 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 classRevokeDeviceSessionArg.TagDiscriminating tag type forRevokeDeviceSessionArg.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RevokeDeviceSessionArgdesktopClient(RevokeDesktopClientArg value)Returns an instance ofRevokeDeviceSessionArgthat has its tag set toRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT.booleanequals(java.lang.Object obj)RevokeDesktopClientArggetDesktopClientValue()Unlink a linked desktop device.DeviceSessionArggetMobileClientValue()Unlink a linked mobile device.DeviceSessionArggetWebSessionValue()End an active session.inthashCode()booleanisDesktopClient()Returnstrueif this instance has the tagRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT,falseotherwise.booleanisMobileClient()Returnstrueif this instance has the tagRevokeDeviceSessionArg.Tag.MOBILE_CLIENT,falseotherwise.booleanisWebSession()static RevokeDeviceSessionArgmobileClient(DeviceSessionArg value)Returns an instance ofRevokeDeviceSessionArgthat has its tag set toRevokeDeviceSessionArg.Tag.MOBILE_CLIENT.RevokeDeviceSessionArg.Tagtag()Returns the tag for this instance.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.static RevokeDeviceSessionArgwebSession(DeviceSessionArg value)Returns an instance ofRevokeDeviceSessionArgthat 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 aswitchstatement to properly handle the different values for thisRevokeDeviceSessionArg.- Returns:
- the tag for this instance.
-
isWebSession
public boolean isWebSession()
- Returns:
trueif this instance is tagged asRevokeDeviceSessionArg.Tag.WEB_SESSION,falseotherwise.
-
webSession
public static RevokeDeviceSessionArg webSession(DeviceSessionArg value)
Returns an instance ofRevokeDeviceSessionArgthat has its tag set toRevokeDeviceSessionArg.Tag.WEB_SESSION.End an active session.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
RevokeDeviceSessionArgwith its tag set toRevokeDeviceSessionArg.Tag.WEB_SESSION. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getWebSessionValue
public DeviceSessionArg getWebSessionValue()
End an active session.This instance must be tagged as
RevokeDeviceSessionArg.Tag.WEB_SESSION.- Returns:
- The
DeviceSessionArgvalue associated with this instance ifisWebSession()istrue. - Throws:
java.lang.IllegalStateException- IfisWebSession()isfalse.
-
isDesktopClient
public boolean isDesktopClient()
Returnstrueif this instance has the tagRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT,falseotherwise.- Returns:
trueif this instance is tagged asRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT,falseotherwise.
-
desktopClient
public static RevokeDeviceSessionArg desktopClient(RevokeDesktopClientArg value)
Returns an instance ofRevokeDeviceSessionArgthat has its tag set toRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT.Unlink a linked desktop device.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
RevokeDeviceSessionArgwith its tag set toRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getDesktopClientValue
public RevokeDesktopClientArg getDesktopClientValue()
Unlink a linked desktop device.This instance must be tagged as
RevokeDeviceSessionArg.Tag.DESKTOP_CLIENT.- Returns:
- The
RevokeDesktopClientArgvalue associated with this instance ifisDesktopClient()istrue. - Throws:
java.lang.IllegalStateException- IfisDesktopClient()isfalse.
-
isMobileClient
public boolean isMobileClient()
Returnstrueif this instance has the tagRevokeDeviceSessionArg.Tag.MOBILE_CLIENT,falseotherwise.- Returns:
trueif this instance is tagged asRevokeDeviceSessionArg.Tag.MOBILE_CLIENT,falseotherwise.
-
mobileClient
public static RevokeDeviceSessionArg mobileClient(DeviceSessionArg value)
Returns an instance ofRevokeDeviceSessionArgthat has its tag set toRevokeDeviceSessionArg.Tag.MOBILE_CLIENT.Unlink a linked mobile device.
- Parameters:
value- value to assign to this instance.- Returns:
- Instance of
RevokeDeviceSessionArgwith its tag set toRevokeDeviceSessionArg.Tag.MOBILE_CLIENT. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
getMobileClientValue
public DeviceSessionArg getMobileClientValue()
Unlink a linked mobile device.This instance must be tagged as
RevokeDeviceSessionArg.Tag.MOBILE_CLIENT.- Returns:
- The
DeviceSessionArgvalue associated with this instance ifisMobileClient()istrue. - Throws:
java.lang.IllegalStateException- IfisMobileClient()isfalse.
-
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
-
-