[Python-modules-commits] [python-dropbox] 01/05: New upstream version 8.6.0
Michael Fladischer
fladi at moszumanska.debian.org
Sat Jan 27 12:47:19 UTC 2018
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch debian/master
in repository python-dropbox.
commit 9c62545e730f94e15e58e6ba580a9c64a7b62ec1
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Sat Jan 27 13:34:03 2018 +0100
New upstream version 8.6.0
---
PKG-INFO | 4 +-
README.rst | 2 +-
dropbox.egg-info/PKG-INFO | 4 +-
dropbox/dropbox.py | 32 +-
dropbox/team.py | 23 +-
dropbox/team_common.py | 78 +
dropbox/team_log.py | 11157 ++++++++++++++++++++++----------------------
dropbox/users.py | 82 +-
8 files changed, 5751 insertions(+), 5631 deletions(-)
diff --git a/PKG-INFO b/PKG-INFO
index 87d162e..56c6132 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: dropbox
-Version: 8.5.1
+Version: 8.6.0
Summary: Official Dropbox API Client
Home-page: http://www.dropbox.com/developers
Author: Dropbox
@@ -9,7 +9,7 @@ License: MIT License
Description: Dropbox for Python
==================
- .. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.5.1
+ .. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.6.0
:target: https://travis-ci.org/dropbox/dropbox-sdk-python
.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
diff --git a/README.rst b/README.rst
index 6295b08..2121575 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
Dropbox for Python
==================
-.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.5.1
+.. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.6.0
:target: https://travis-ci.org/dropbox/dropbox-sdk-python
.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
diff --git a/dropbox.egg-info/PKG-INFO b/dropbox.egg-info/PKG-INFO
index 87d162e..56c6132 100644
--- a/dropbox.egg-info/PKG-INFO
+++ b/dropbox.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: dropbox
-Version: 8.5.1
+Version: 8.6.0
Summary: Official Dropbox API Client
Home-page: http://www.dropbox.com/developers
Author: Dropbox
@@ -9,7 +9,7 @@ License: MIT License
Description: Dropbox for Python
==================
- .. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.5.1
+ .. image:: https://travis-ci.org/dropbox/dropbox-sdk-python.svg?branch=v8.6.0
:target: https://travis-ci.org/dropbox/dropbox-sdk-python
.. image:: https://readthedocs.org/projects/dropbox-sdk-python/badge/?version=stable
diff --git a/dropbox/dropbox.py b/dropbox/dropbox.py
index 4872c22..3e8f745 100644
--- a/dropbox/dropbox.py
+++ b/dropbox/dropbox.py
@@ -6,7 +6,7 @@ __all__ = [
# This should always be 0.0.0 in master. Only update this after tagging
# before release.
-__version__ = '8.5.1'
+__version__ = '8.6.0'
import contextlib
import json
@@ -493,22 +493,50 @@ class DropboxTeam(_DropboxTransport, DropboxTeamBase):
token. Methods of this class are meant to act on the team, but there is
also an :meth:`as_user` method for assuming a team member's identity.
"""
+ def as_admin(self, team_member_id):
+ """
+ Allows a team credential to assume the identity of an administrator on the team
+ and perform operations on any team-owned content.
+
+ :param str team_member_id: team member id of administrator to perform actions with
+ :return: A :class:`Dropbox` object that can be used to query on behalf
+ of this admin of the team.
+ :rtype: Dropbox
+ """
+ return self._get_dropbox_client_with_select_header('Dropbox-API-Select-Admin',
+ team_member_id)
def as_user(self, team_member_id):
"""
Allows a team credential to assume the identity of a member of the
team.
+ :param str team_member_id: team member id of team member to perform actions with
:return: A :class:`Dropbox` object that can be used to query on behalf
of this member of the team.
:rtype: Dropbox
"""
+ return self._get_dropbox_client_with_select_header('Dropbox-API-Select-User',
+ team_member_id)
+
+ def _get_dropbox_client_with_select_header(self, select_header_name, team_member_id):
+ """
+ Get Dropbox client with modified headers
+
+ :param str select_header_name: Header name used to select users
+ :param str team_member_id: team member id of team member to perform actions with
+ :return: A :class:`Dropbox` object that can be used to query on behalf
+ of a member or admin of the team
+ :rtype: Dropbox
+ """
+
new_headers = self._headers.copy() if self._headers else {}
- new_headers['Dropbox-API-Select-User'] = team_member_id
+ new_headers[select_header_name] = team_member_id
return Dropbox(
self._oauth2_access_token,
max_retries_on_error=self._max_retries_on_error,
max_retries_on_rate_limit=self._max_retries_on_rate_limit,
+ timeout=self._timeout,
user_agent=self._raw_user_agent,
session=self._session,
headers=new_headers,
diff --git a/dropbox/team.py b/dropbox/team.py
index bb8dd41..3669a47 100644
--- a/dropbox/team.py
+++ b/dropbox/team.py
@@ -10123,6 +10123,8 @@ class MembersRemoveError(MembersDeactivateError):
should be set to False.
:ivar email_address_too_long_to_be_disabled: The email address of the user
is too long to be disabled.
+ :ivar cannot_keep_invited_user_account: Cannot keep account of an invited
+ user.
"""
# Attribute is overwritten below the class definition
@@ -10149,6 +10151,8 @@ class MembersRemoveError(MembersDeactivateError):
cannot_keep_account_and_delete_data = None
# Attribute is overwritten below the class definition
email_address_too_long_to_be_disabled = None
+ # Attribute is overwritten below the class definition
+ cannot_keep_invited_user_account = None
def is_remove_last_admin(self):
"""
@@ -10246,6 +10250,14 @@ class MembersRemoveError(MembersDeactivateError):
"""
return self._tag == 'email_address_too_long_to_be_disabled'
+ def is_cannot_keep_invited_user_account(self):
+ """
+ Check if the union tag is ``cannot_keep_invited_user_account``.
+
+ :rtype: bool
+ """
+ return self._tag == 'cannot_keep_invited_user_account'
+
def __repr__(self):
return 'MembersRemoveError(%r, %r)' % (self._tag, self._value)
@@ -11291,8 +11303,8 @@ class NamespaceMetadata(object):
:ivar name: The name of this namespace.
:ivar namespace_id: The ID of this namespace.
:ivar namespace_type: The type of this namespace.
- :ivar team_member_id: If this is a team member folder, the ID of the team
- member. Otherwise, this field is not present.
+ :ivar team_member_id: If this is a team member or app folder, the ID of the
+ owning team member. Otherwise, this field is not present.
"""
__slots__ = [
@@ -11402,8 +11414,8 @@ class NamespaceMetadata(object):
@property
def team_member_id(self):
"""
- If this is a team member folder, the ID of the team member. Otherwise,
- this field is not present.
+ If this is a team member or app folder, the ID of the owning team
+ member. Otherwise, this field is not present.
:rtype: str
"""
@@ -16454,6 +16466,7 @@ MembersRemoveError._transfer_admin_is_not_admin_validator = bv.Void()
MembersRemoveError._cannot_keep_account_and_transfer_validator = bv.Void()
MembersRemoveError._cannot_keep_account_and_delete_data_validator = bv.Void()
MembersRemoveError._email_address_too_long_to_be_disabled_validator = bv.Void()
+MembersRemoveError._cannot_keep_invited_user_account_validator = bv.Void()
MembersRemoveError._tagmap = {
'remove_last_admin': MembersRemoveError._remove_last_admin_validator,
'removed_and_transfer_dest_should_differ': MembersRemoveError._removed_and_transfer_dest_should_differ_validator,
@@ -16467,6 +16480,7 @@ MembersRemoveError._tagmap = {
'cannot_keep_account_and_transfer': MembersRemoveError._cannot_keep_account_and_transfer_validator,
'cannot_keep_account_and_delete_data': MembersRemoveError._cannot_keep_account_and_delete_data_validator,
'email_address_too_long_to_be_disabled': MembersRemoveError._email_address_too_long_to_be_disabled_validator,
+ 'cannot_keep_invited_user_account': MembersRemoveError._cannot_keep_invited_user_account_validator,
}
MembersRemoveError._tagmap.update(MembersDeactivateError._tagmap)
@@ -16482,6 +16496,7 @@ MembersRemoveError.transfer_admin_is_not_admin = MembersRemoveError('transfer_ad
MembersRemoveError.cannot_keep_account_and_transfer = MembersRemoveError('cannot_keep_account_and_transfer')
MembersRemoveError.cannot_keep_account_and_delete_data = MembersRemoveError('cannot_keep_account_and_delete_data')
MembersRemoveError.email_address_too_long_to_be_disabled = MembersRemoveError('email_address_too_long_to_be_disabled')
+MembersRemoveError.cannot_keep_invited_user_account = MembersRemoveError('cannot_keep_invited_user_account')
MembersSendWelcomeError._other_validator = bv.Void()
MembersSendWelcomeError._tagmap = {
diff --git a/dropbox/team_common.py b/dropbox/team_common.py
index def9cbf..6b9291a 100644
--- a/dropbox/team_common.py
+++ b/dropbox/team_common.py
@@ -310,6 +310,68 @@ class GroupType(bb.Union):
GroupType_validator = bv.Union(GroupType)
+class MemberSpaceLimitType(bb.Union):
+ """
+ The type of the space limit imposed on a team member.
+
+ This class acts as a tagged union. Only one of the ``is_*`` methods will
+ return true. To get the associated value of a tag (if one exists), use the
+ corresponding ``get_*`` method.
+
+ :ivar off: The team member does not have imposed space limit.
+ :ivar alert_only: The team member has soft imposed space limit - the limit
+ is used for display and for notifications.
+ :ivar stop_sync: The team member has hard imposed space limit - Dropbox file
+ sync will stop after the limit is reached.
+ """
+
+ _catch_all = 'other'
+ # Attribute is overwritten below the class definition
+ off = None
+ # Attribute is overwritten below the class definition
+ alert_only = None
+ # Attribute is overwritten below the class definition
+ stop_sync = None
+ # Attribute is overwritten below the class definition
+ other = None
+
+ def is_off(self):
+ """
+ Check if the union tag is ``off``.
+
+ :rtype: bool
+ """
+ return self._tag == 'off'
+
+ def is_alert_only(self):
+ """
+ Check if the union tag is ``alert_only``.
+
+ :rtype: bool
+ """
+ return self._tag == 'alert_only'
+
+ def is_stop_sync(self):
+ """
+ Check if the union tag is ``stop_sync``.
+
+ :rtype: bool
+ """
+ return self._tag == 'stop_sync'
+
+ def is_other(self):
+ """
+ Check if the union tag is ``other``.
+
+ :rtype: bool
+ """
+ return self._tag == 'other'
+
+ def __repr__(self):
+ return 'MemberSpaceLimitType(%r, %r)' % (self._tag, self._value)
+
+MemberSpaceLimitType_validator = bv.Union(MemberSpaceLimitType)
+
class TimeRange(object):
"""
Time range.
@@ -453,6 +515,22 @@ GroupType.team = GroupType('team')
GroupType.user_managed = GroupType('user_managed')
GroupType.other = GroupType('other')
+MemberSpaceLimitType._off_validator = bv.Void()
+MemberSpaceLimitType._alert_only_validator = bv.Void()
+MemberSpaceLimitType._stop_sync_validator = bv.Void()
+MemberSpaceLimitType._other_validator = bv.Void()
+MemberSpaceLimitType._tagmap = {
+ 'off': MemberSpaceLimitType._off_validator,
+ 'alert_only': MemberSpaceLimitType._alert_only_validator,
+ 'stop_sync': MemberSpaceLimitType._stop_sync_validator,
+ 'other': MemberSpaceLimitType._other_validator,
+}
+
+MemberSpaceLimitType.off = MemberSpaceLimitType('off')
+MemberSpaceLimitType.alert_only = MemberSpaceLimitType('alert_only')
+MemberSpaceLimitType.stop_sync = MemberSpaceLimitType('stop_sync')
+MemberSpaceLimitType.other = MemberSpaceLimitType('other')
+
TimeRange._start_time_validator = bv.Nullable(common.DropboxTimestamp_validator)
TimeRange._end_time_validator = bv.Nullable(common.DropboxTimestamp_validator)
TimeRange._all_field_names_ = set([
diff --git a/dropbox/team_log.py b/dropbox/team_log.py
index aa6c50a..f8b306a 100644
--- a/dropbox/team_log.py
+++ b/dropbox/team_log.py
@@ -16,6 +16,7 @@ try:
from . import (
common,
file_requests,
+ sharing,
team,
team_common,
team_policies,
@@ -24,6 +25,7 @@ try:
except (ImportError, SystemError, ValueError):
import common
import file_requests
+ import sharing
import team
import team_common
import team_policies
@@ -620,6 +622,101 @@ class AccountCaptureMigrateAccountType(object):
AccountCaptureMigrateAccountType_validator = bv.Struct(AccountCaptureMigrateAccountType)
+class AccountCaptureNotificationEmailsSentDetails(object):
+ """
+ Proactive account capture email sent to all unmanaged members.
+
+ :ivar domain_name: Domain name.
+ """
+
+ __slots__ = [
+ '_domain_name_value',
+ '_domain_name_present',
+ ]
+
+ _has_required_fields = True
+
+ def __init__(self,
+ domain_name=None):
+ self._domain_name_value = None
+ self._domain_name_present = False
+ if domain_name is not None:
+ self.domain_name = domain_name
+
+ @property
+ def domain_name(self):
+ """
+ Domain name.
+
+ :rtype: str
+ """
+ if self._domain_name_present:
+ return self._domain_name_value
+ else:
+ raise AttributeError("missing required field 'domain_name'")
+
+ @domain_name.setter
+ def domain_name(self, val):
+ val = self._domain_name_validator.validate(val)
+ self._domain_name_value = val
+ self._domain_name_present = True
+
+ @domain_name.deleter
+ def domain_name(self):
+ self._domain_name_value = None
+ self._domain_name_present = False
+
+ def __repr__(self):
+ return 'AccountCaptureNotificationEmailsSentDetails(domain_name={!r})'.format(
+ self._domain_name_value,
+ )
+
+AccountCaptureNotificationEmailsSentDetails_validator = bv.Struct(AccountCaptureNotificationEmailsSentDetails)
+
+class AccountCaptureNotificationEmailsSentType(object):
+
+ __slots__ = [
+ '_description_value',
+ '_description_present',
+ ]
+
+ _has_required_fields = True
+
+ def __init__(self,
+ description=None):
+ self._description_value = None
+ self._description_present = False
+ if description is not None:
+ self.description = description
+
+ @property
+ def description(self):
+ """
+ :rtype: str
+ """
+ if self._description_present:
+ return self._description_value
+ else:
+ raise AttributeError("missing required field 'description'")
+
+ @description.setter
+ def description(self, val):
+ val = self._description_validator.validate(val)
+ self._description_value = val
+ self._description_present = True
+
+ @description.deleter
+ def description(self):
+ self._description_value = None
+ self._description_present = False
+
+ def __repr__(self):
+ return 'AccountCaptureNotificationEmailsSentType(description={!r})'.format(
+ self._description_value,
+ )
+
+AccountCaptureNotificationEmailsSentType_validator = bv.Struct(AccountCaptureNotificationEmailsSentType)
+
class AccountCapturePolicy(bb.Union):
"""
This class acts as a tagged union. Only one of the ``is_*`` methods will
@@ -770,6 +867,100 @@ class AccountCaptureRelinquishAccountType(object):
AccountCaptureRelinquishAccountType_validator = bv.Struct(AccountCaptureRelinquishAccountType)
+class ActionDetails(bb.Union):
+ """
+ Additional information indicating the action taken that caused status
+ change.
+
+ This class acts as a tagged union. Only one of the ``is_*`` methods will
+ return true. To get the associated value of a tag (if one exists), use the
+ corresponding ``get_*`` method.
+
+ :ivar JoinTeamDetails team_join_details: Additional information relevant
+ when a new member joins the team.
+ :ivar MemberRemoveActionType remove_action: Define how the user was removed
+ from the team.
+ """
+
+ _catch_all = 'other'
+ # Attribute is overwritten below the class definition
+ other = None
+
+ @classmethod
+ def team_join_details(cls, val):
+ """
+ Create an instance of this class set to the ``team_join_details`` tag
+ with value ``val``.
+
+ :param JoinTeamDetails val:
+ :rtype: ActionDetails
+ """
+ return cls('team_join_details', val)
+
+ @classmethod
+ def remove_action(cls, val):
+ """
+ Create an instance of this class set to the ``remove_action`` tag with
+ value ``val``.
+
+ :param MemberRemoveActionType val:
+ :rtype: ActionDetails
+ """
+ return cls('remove_action', val)
+
+ def is_team_join_details(self):
+ """
+ Check if the union tag is ``team_join_details``.
+
+ :rtype: bool
+ """
+ return self._tag == 'team_join_details'
+
+ def is_remove_action(self):
+ """
+ Check if the union tag is ``remove_action``.
+
+ :rtype: bool
+ """
+ return self._tag == 'remove_action'
+
+ def is_other(self):
+ """
+ Check if the union tag is ``other``.
+
+ :rtype: bool
+ """
+ return self._tag == 'other'
+
+ def get_team_join_details(self):
+ """
+ Additional information relevant when a new member joins the team.
+
+ Only call this if :meth:`is_team_join_details` is true.
+
+ :rtype: JoinTeamDetails
+ """
+ if not self.is_team_join_details():
+ raise AttributeError("tag 'team_join_details' not set")
+ return self._value
+
+ def get_remove_action(self):
+ """
+ Define how the user was removed from the team.
+
+ Only call this if :meth:`is_remove_action` is true.
+
+ :rtype: MemberRemoveActionType
+ """
+ if not self.is_remove_action():
+ raise AttributeError("tag 'remove_action' not set")
+ return self._value
+
+ def __repr__(self):
+ return 'ActionDetails(%r, %r)' % (self._tag, self._value)
+
+ActionDetails_validator = bv.Union(ActionDetails)
+
class ActorLogInfo(bb.Union):
"""
The entity who performed the action.
@@ -2162,50 +2353,6 @@ class CollectionShareType(object):
CollectionShareType_validator = bv.Struct(CollectionShareType)
-class Confidentiality(bb.Union):
- """
- This class acts as a tagged union. Only one of the ``is_*`` methods will
- return true. To get the associated value of a tag (if one exists), use the
- corresponding ``get_*`` method.
- """
-
- _catch_all = 'other'
- # Attribute is overwritten below the class definition
- confidential = None
- # Attribute is overwritten below the class definition
- non_confidential = None
- # Attribute is overwritten below the class definition
- other = None
-
- def is_confidential(self):
- """
- Check if the union tag is ``confidential``.
-
- :rtype: bool
- """
- return self._tag == 'confidential'
-
- def is_non_confidential(self):
- """
- Check if the union tag is ``non_confidential``.
-
- :rtype: bool
- """
- return self._tag == 'non_confidential'
-
- def is_other(self):
- """
- Check if the union tag is ``other``.
-
- :rtype: bool
- """
- return self._tag == 'other'
-
- def __repr__(self):
- return 'Confidentiality(%r, %r)' % (self._tag, self._value)
-
-Confidentiality_validator = bv.Union(Confidentiality)
-
class ContentPermanentDeletePolicy(bb.Union):
"""
Policy for pemanent content deletion
@@ -2654,6 +2801,368 @@ class DataPlacementRestrictionSatisfyPolicyType(object):
DataPlacementRestrictionSatisfyPolicyType_validator = bv.Struct(DataPlacementRestrictionSatisfyPolicyType)
+class DeviceSessionLogInfo(object):
+ """
+ Device's session logged information.
+
+ :ivar session_id: Session unique id. Might be missing due to historical data
+ gap.
+ :ivar ip_address: The IP address of the last activity from this session.
+ Might be missing due to historical data gap.
+ :ivar created: The time this session was created. Might be missing due to
+ historical data gap.
+ :ivar updated: The time of the last activity from this session. Might be
+ missing due to historical data gap.
+ """
+
+ __slots__ = [
+ '_session_id_value',
+ '_session_id_present',
+ '_ip_address_value',
+ '_ip_address_present',
+ '_created_value',
+ '_created_present',
+ '_updated_value',
+ '_updated_present',
+ ]
+
+ _has_required_fields = False
+
+ def __init__(self,
+ session_id=None,
+ ip_address=None,
+ created=None,
+ updated=None):
+ self._session_id_value = None
+ self._session_id_present = False
+ self._ip_address_value = None
+ self._ip_address_present = False
+ self._created_value = None
+ self._created_present = False
+ self._updated_value = None
+ self._updated_present = False
+ if session_id is not None:
+ self.session_id = session_id
+ if ip_address is not None:
+ self.ip_address = ip_address
+ if created is not None:
+ self.created = created
+ if updated is not None:
+ self.updated = updated
+
+ @property
+ def session_id(self):
+ """
+ Session unique id. Might be missing due to historical data gap.
+
+ :rtype: str
+ """
+ if self._session_id_present:
+ return self._session_id_value
+ else:
+ return None
+
+ @session_id.setter
+ def session_id(self, val):
+ if val is None:
+ del self.session_id
+ return
+ val = self._session_id_validator.validate(val)
+ self._session_id_value = val
+ self._session_id_present = True
+
+ @session_id.deleter
+ def session_id(self):
+ self._session_id_value = None
+ self._session_id_present = False
+
+ @property
+ def ip_address(self):
+ """
+ The IP address of the last activity from this session. Might be missing
+ due to historical data gap.
+
+ :rtype: str
+ """
+ if self._ip_address_present:
+ return self._ip_address_value
+ else:
+ return None
+
+ @ip_address.setter
+ def ip_address(self, val):
+ if val is None:
+ del self.ip_address
+ return
+ val = self._ip_address_validator.validate(val)
+ self._ip_address_value = val
+ self._ip_address_present = True
+
+ @ip_address.deleter
+ def ip_address(self):
+ self._ip_address_value = None
+ self._ip_address_present = False
+
+ @property
+ def created(self):
+ """
+ The time this session was created. Might be missing due to historical
+ data gap.
+
+ :rtype: datetime.datetime
+ """
+ if self._created_present:
+ return self._created_value
+ else:
+ return None
+
+ @created.setter
+ def created(self, val):
+ if val is None:
+ del self.created
+ return
+ val = self._created_validator.validate(val)
+ self._created_value = val
+ self._created_present = True
+
+ @created.deleter
+ def created(self):
+ self._created_value = None
+ self._created_present = False
+
+ @property
+ def updated(self):
+ """
+ The time of the last activity from this session. Might be missing due to
+ historical data gap.
+
+ :rtype: datetime.datetime
+ """
+ if self._updated_present:
+ return self._updated_value
+ else:
+ return None
+
+ @updated.setter
+ def updated(self, val):
+ if val is None:
+ del self.updated
+ return
+ val = self._updated_validator.validate(val)
+ self._updated_value = val
+ self._updated_present = True
+
+ @updated.deleter
+ def updated(self):
+ self._updated_value = None
+ self._updated_present = False
+
+ def __repr__(self):
+ return 'DeviceSessionLogInfo(session_id={!r}, ip_address={!r}, created={!r}, updated={!r})'.format(
+ self._session_id_value,
+ self._ip_address_value,
+ self._created_value,
+ self._updated_value,
+ )
+
+DeviceSessionLogInfo_validator = bv.StructTree(DeviceSessionLogInfo)
+
+class DesktopDeviceSessionLogInfo(DeviceSessionLogInfo):
+ """
+ Information about linked Dropbox desktop client sessions
+
+ :ivar host_name: Name of the hosting desktop.
+ :ivar client_type: The Dropbox desktop client type.
+ :ivar client_version: The Dropbox client version.
+ :ivar platform: Information on the hosting platform.
+ :ivar is_delete_on_unlink_supported: Whether itu2019s possible to delete all
+ of the account files upon unlinking.
+ """
+
+ __slots__ = [
+ '_host_name_value',
+ '_host_name_present',
+ '_client_type_value',
+ '_client_type_present',
+ '_client_version_value',
+ '_client_version_present',
+ '_platform_value',
+ '_platform_present',
+ '_is_delete_on_unlink_supported_value',
+ '_is_delete_on_unlink_supported_present',
+ ]
+
+ _has_required_fields = True
+
+ def __init__(self,
+ host_name=None,
+ client_type=None,
+ platform=None,
+ is_delete_on_unlink_supported=None,
+ session_id=None,
+ ip_address=None,
+ created=None,
+ updated=None,
+ client_version=None):
+ super(DesktopDeviceSessionLogInfo, self).__init__(session_id,
+ ip_address,
+ created,
+ updated)
+ self._host_name_value = None
+ self._host_name_present = False
+ self._client_type_value = None
+ self._client_type_present = False
+ self._client_version_value = None
+ self._client_version_present = False
+ self._platform_value = None
+ self._platform_present = False
+ self._is_delete_on_unlink_supported_value = None
+ self._is_delete_on_unlink_supported_present = False
+ if host_name is not None:
+ self.host_name = host_name
+ if client_type is not None:
+ self.client_type = client_type
+ if client_version is not None:
+ self.client_version = client_version
+ if platform is not None:
+ self.platform = platform
+ if is_delete_on_unlink_supported is not None:
+ self.is_delete_on_unlink_supported = is_delete_on_unlink_supported
+
+ @property
+ def host_name(self):
+ """
+ Name of the hosting desktop.
+
+ :rtype: str
+ """
+ if self._host_name_present:
+ return self._host_name_value
+ else:
+ raise AttributeError("missing required field 'host_name'")
+
+ @host_name.setter
+ def host_name(self, val):
+ val = self._host_name_validator.validate(val)
+ self._host_name_value = val
+ self._host_name_present = True
+
+ @host_name.deleter
+ def host_name(self):
+ self._host_name_value = None
+ self._host_name_present = False
+
+ @property
+ def client_type(self):
+ """
+ The Dropbox desktop client type.
+
+ :rtype: team.DesktopPlatform_validator
+ """
+ if self._client_type_present:
+ return self._client_type_value
+ else:
+ raise AttributeError("missing required field 'client_type'")
+
+ @client_type.setter
+ def client_type(self, val):
+ self._client_type_validator.validate_type_only(val)
+ self._client_type_value = val
+ self._client_type_present = True
+
+ @client_type.deleter
+ def client_type(self):
+ self._client_type_value = None
+ self._client_type_present = False
+
+ @property
+ def client_version(self):
+ """
+ The Dropbox client version.
+
+ :rtype: str
+ """
+ if self._client_version_present:
+ return self._client_version_value
+ else:
+ return None
+
+ @client_version.setter
+ def client_version(self, val):
+ if val is None:
+ del self.client_version
+ return
+ val = self._client_version_validator.validate(val)
+ self._client_version_value = val
+ self._client_version_present = True
+
+ @client_version.deleter
+ def client_version(self):
+ self._client_version_value = None
+ self._client_version_present = False
+
+ @property
+ def platform(self):
+ """
+ Information on the hosting platform.
+
+ :rtype: str
+ """
+ if self._platform_present:
+ return self._platform_value
+ else:
+ raise AttributeError("missing required field 'platform'")
+
+ @platform.setter
+ def platform(self, val):
+ val = self._platform_validator.validate(val)
+ self._platform_value = val
+ self._platform_present = True
+
+ @platform.deleter
+ def platform(self):
+ self._platform_value = None
+ self._platform_present = False
+
+ @property
+ def is_delete_on_unlink_supported(self):
+ """
+ Whether itu2019s possible to delete all of the account files upon
+ unlinking.
+
+ :rtype: bool
+ """
+ if self._is_delete_on_unlink_supported_present:
+ return self._is_delete_on_unlink_supported_value
+ else:
+ raise AttributeError("missing required field 'is_delete_on_unlink_supported'")
+
+ @is_delete_on_unlink_supported.setter
+ def is_delete_on_unlink_supported(self, val):
+ val = self._is_delete_on_unlink_supported_validator.validate(val)
+ self._is_delete_on_unlink_supported_value = val
+ self._is_delete_on_unlink_supported_present = True
+
+ @is_delete_on_unlink_supported.deleter
+ def is_delete_on_unlink_supported(self):
+ self._is_delete_on_unlink_supported_value = None
+ self._is_delete_on_unlink_supported_present = False
+
+ def __repr__(self):
+ return 'DesktopDeviceSessionLogInfo(host_name={!r}, client_type={!r}, platform={!r}, is_delete_on_unlink_supported={!r}, session_id={!r}, ip_address={!r}, created={!r}, updated={!r}, client_version={!r})'.format(
+ self._host_name_value,
+ self._client_type_value,
+ self._platform_value,
+ self._is_delete_on_unlink_supported_value,
+ self._session_id_value,
+ self._ip_address_value,
+ self._created_value,
+ self._updated_value,
+ self._client_version_value,
+ )
+
+DesktopDeviceSessionLogInfo_validator = bv.Struct(DesktopDeviceSessionLogInfo)
+
class SessionLogInfo(object):
"""
Session's logged information.
@@ -3327,49 +3836,49 @@ class DeviceChangeIpDesktopDetails(object):
"""
IP address associated with active desktop session changed.
- :ivar device_info: Device information.
+ :ivar device_session_info: Device's session logged information.
"""
__slots__ = [
- '_device_info_value',
- '_device_info_present',
+ '_device_session_info_value',
+ '_device_session_info_present',
]
_has_required_fields = True
def __init__(self,
- device_info=None):
- self._device_info_value = None
- self._device_info_present = False
- if device_info is not None:
- self.device_info = device_info
+ device_session_info=None):
+ self._device_session_info_value = None
+ self._device_session_info_present = False
+ if device_session_info is not None:
+ self.device_session_info = device_session_info
@property
- def device_info(self):
+ def device_session_info(self):
"""
- Device information.
+ Device's session logged information.
- :rtype: DeviceLogInfo
+ :rtype: DeviceSessionLogInfo
"""
- if self._device_info_present:
- return self._device_info_value
+ if self._device_session_info_present:
... 14156 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-dropbox.git
More information about the Python-modules-commits
mailing list