Package com.dropbox.core.v2.team
Class RevokeDeviceSessionArg
java.lang.Object
com.dropbox.core.v2.team.RevokeDeviceSessionArg
This class is a 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.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic RevokeDeviceSessionArgReturns an instance ofRevokeDeviceSessionArgthat has its tag set toRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT.booleanUnlink a linked desktop device.Unlink a linked mobile device.End an active session.inthashCode()booleanReturnstrueif this instance has the tagRevokeDeviceSessionArg.Tag.DESKTOP_CLIENT,falseotherwise.booleanReturnstrueif this instance has the tagRevokeDeviceSessionArg.Tag.MOBILE_CLIENT,falseotherwise.booleanstatic RevokeDeviceSessionArgmobileClient(DeviceSessionArg value) Returns an instance ofRevokeDeviceSessionArgthat has its tag set toRevokeDeviceSessionArg.Tag.MOBILE_CLIENT.tag()Returns the tag for this instance.toString()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 Details
-
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
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:
IllegalArgumentException- ifvalueisnull.
-
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:
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
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:
IllegalArgumentException- ifvalueisnull.
-
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:
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
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:
IllegalArgumentException- ifvalueisnull.
-
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:
IllegalStateException- IfisMobileClient()isfalse.
-
hashCode
public int hashCode() -
equals
-
toString
-
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
-