From 791315814a72133eb67fa95ba245ce3bc4326c8a Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Thu, 27 Aug 2020 14:08:06 -0700 Subject: [PATCH 1/2] Remove Stone Submodule - Remove Stone as submodule and pin in requirements.txt - Pin Stone to major version 1.* until work can be done to upgrade to 2.* - Update Spec Files Namespace Add internal_error to SearchError union. Add locked to LookupError union. Add cant_move_into_vault to RelocationError union. Add MoveIntoVaultError union. Add SearchMatchFieldOptions struct. Add optional match_field_options to SearchV2Arg struct. Doc/example changes. Sharing Namespace Add is_vault to SharePathError union. Add invalid_shared_folder to AddFolderMemberError union. Team Namespace Make members field of LegalHoldsPolicyUpdateArg struct optional. Add app_folder_removal_not_supported to RevokeLinkedAppError union. Doc/example changes. Team Log Namespace Add auto_approve to InviteMethod union. Add moved_from_another_team to InviteMethod union. Add moved_from_another_team to MemberStatus union. Add no_one to SharedLinkVisibility union. Add optional new_team to MemberChangeStatusDetails struct. Add optional previous_team to MemberChangeStatusDetails struct. Add external_sharing_create_report_details to EventDetails union. Add external_sharing_report_failed to EventDetails union. Add content_administration_policy_changed_details to EventDetails Add external_sharing_create_report to EventType. Add external_sharing_report_failed to EventType. Add content_administration_policy_changed to EventType. union. Add send_for_signature_policy_changed_details to EventDetails union. Add external_sharing_create_report to EventTypeArgs union. Add external_sharing_report_failed to EventTypeArgs union. Add content_administration_policy_changed to EventTypeArgs union. Add send_for_signature_policy_changed to EventTypeArgs union. Add SendForSignaturePolicy union. Add ExternalSharingCreateReportDetails struct. Add ExternalSharingReportFailedDetails struct. Add ContentAdministrationPolicyChangedDetails struct. Add SendForSignaturePolicyChangedDetails struct. Add ExternalSharingCreateReportType struct. Add ExternalSharingReportFailedType struct. Add ContentAdministrationPolicyChangedType struct. Add SendForSignaturePolicyChangedType struct. --- .gitmodules | 3 - dropbox/base.py | 14 +- dropbox/base_team.py | 41 +- dropbox/files.py | 225 +++++++- dropbox/sharing.py | 30 + dropbox/stone_validators.py | 2 +- dropbox/team.py | 51 +- dropbox/team_log.py | 1023 ++++++++++++++++++++++++++++++++++- requirements.txt | 1 + spec | 2 +- 10 files changed, 1341 insertions(+), 51 deletions(-) diff --git a/.gitmodules b/.gitmodules index f92aff3c..bdb7b0a0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "stone"] - path = stone - url = https://github.com/dropbox/stone.git [submodule "spec"] path = spec url = https://github.com/dropbox/dropbox-api-spec.git diff --git a/dropbox/base.py b/dropbox/base.py index f848fb28..8e94e7ce 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -1799,7 +1799,7 @@ def files_get_temporary_upload_link(self, upload path at any given time. The POST request on the temporary upload link must have its Content-Type set to "application/octet-stream". Example temporary upload link consumption request: curl -X POST - https://dl.dropboxusercontent.com/apitul/1/bNi2uIYF51cVBND --header + https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND --header "Content-Type: application/octet-stream" --data-binary @local_file.txt A successful temporary upload link consumption request returns the content hash of the uploaded data in JSON format. Example succesful @@ -2776,8 +2776,9 @@ def files_search(self, max_results=100, mode=files.SearchMode.filename): """ - Searches for files and folders. Note: Recent changes may not immediately - be reflected in search results due to a short delay in indexing. + Searches for files and folders. Note: Recent changes will be reflected + in search results within a few seconds and older revisions of existing + files may still match your query for up to a few days. :param str path: The path in the user's Dropbox to search. Should probably be a folder. @@ -2819,6 +2820,7 @@ def files_search(self, def files_search_v2(self, query, options=None, + match_field_options=None, include_highlights=False): """ Searches for files and folders. Note: :meth:`files_search_v2` along with @@ -2831,7 +2833,10 @@ def files_search_v2(self, fields based on the request arguments. Query string may be rewritten to improve relevance of results. :param Nullable options: Options for more targeted search results. - :type include_highlights: bool + :param Nullable match_field_options: Options for search results match + fields. + :param bool include_highlights: Deprecated and moved this option to + SearchMatchFieldOptions. :rtype: :class:`dropbox.files.SearchV2Result` :raises: :class:`.exceptions.ApiError` @@ -2840,6 +2845,7 @@ def files_search_v2(self, """ arg = files.SearchV2Arg(query, options, + match_field_options, include_highlights) r = self.request( files.search_v2, diff --git a/dropbox/base_team.py b/dropbox/base_team.py index d5440b95..9a8e97e7 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -736,11 +736,12 @@ def team_legal_holds_create_policy(self, start_date=None, end_date=None): """ - Creates new legal hold policy. Permission : Team member file access. + Creates new legal hold policy. Note: Legal Holds is a paid add-on. Not + all teams have the feature. Permission : Team member file access. :param str name: Policy name. :param Nullable description: A description of the legal hold policy. - :param list members: List of team members added to the hold. + :param list members: List of team member IDs added to the hold. :param Nullable start_date: start date of the legal hold policy. :param Nullable end_date: end date of the legal hold policy. :rtype: :class:`dropbox.team.LegalHoldPolicy` @@ -765,7 +766,8 @@ def team_legal_holds_create_policy(self, def team_legal_holds_get_policy(self, id): """ - Gets a legal hold by Id. Permission : Team member file access. + Gets a legal hold by Id. Note: Legal Holds is a paid add-on. Not all + teams have the feature. Permission : Team member file access. :param str id: The legal hold Id. :rtype: :class:`dropbox.team.LegalHoldPolicy` @@ -786,7 +788,8 @@ def team_legal_holds_get_policy(self, def team_legal_holds_list_held_revisions(self, id): """ - List the file metadata that's under the hold. Permission : Team member + List the file metadata that's under the hold. Note: Legal Holds is a + paid add-on. Not all teams have the feature. Permission : Team member file access. :param str id: The legal hold Id. @@ -809,7 +812,8 @@ def team_legal_holds_list_held_revisions_continue(self, id, cursor=None): """ - Continue listing the file metadata that's under the hold. Permission : + Continue listing the file metadata that's under the hold. Note: Legal + Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access. :param str id: The legal hold Id. @@ -835,7 +839,8 @@ def team_legal_holds_list_held_revisions_continue(self, def team_legal_holds_list_policies(self, include_released=False): """ - Lists legal holds on a team. Permission : Team member file access. + Lists legal holds on a team. Note: Legal Holds is a paid add-on. Not all + teams have the feature. Permission : Team member file access. :param bool include_released: Whether to return holds that were released. @@ -857,7 +862,8 @@ def team_legal_holds_list_policies(self, def team_legal_holds_release_policy(self, id): """ - Releases a legal hold by Id. Permission : Team member file access. + Releases a legal hold by Id. Note: Legal Holds is a paid add-on. Not all + teams have the feature. Permission : Team member file access. :param str id: The legal hold Id. :rtype: None @@ -877,16 +883,17 @@ def team_legal_holds_release_policy(self, def team_legal_holds_update_policy(self, id, - members, name=None, - description=None): + description=None, + members=None): """ - Updates a legal hold. Permission : Team member file access. + Updates a legal hold. Note: Legal Holds is a paid add-on. Not all teams + have the feature. Permission : Team member file access. :param str id: The legal hold Id. :param Nullable name: Policy new name. :param Nullable description: Policy new description. - :param list members: List of team members to apply the policy on. + :param Nullable members: List of team member IDs to apply the policy on. :rtype: :class:`dropbox.team.LegalHoldPolicy` :raises: :class:`.exceptions.ApiError` @@ -894,9 +901,9 @@ def team_legal_holds_update_policy(self, :class:`dropbox.team.LegalHoldsPolicyUpdateError` """ arg = team.LegalHoldsPolicyUpdateArg(id, - members, name, - description) + description, + members) r = self.request( team.legal_holds_update_policy, 'team', @@ -993,8 +1000,9 @@ def team_linked_apps_revoke_linked_app(self, :param str app_id: The application's unique id. :param str team_member_id: The unique id of the member owning the device. - :param bool keep_app_folder: Whether to keep the application dedicated - folder (in case the application uses one). + :param bool keep_app_folder: This flag is not longer supported, the + application dedicated folder (in case the application uses one) + will be kept. :rtype: None :raises: :class:`.exceptions.ApiError` @@ -2282,7 +2290,8 @@ def team_log_get_events(self, Participants. :param Nullable time: Filter by time range. :param Nullable category: Filter the returned events to a single - category. + category. Note that category shouldn't be provided together with + event_type. :param Nullable event_type: Filter the returned events to a single event type. Note that event_type shouldn't be provided together with category. diff --git a/dropbox/files.py b/dropbox/files.py index 00e5531c..774d8fab 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -7884,6 +7884,7 @@ class LookupError(bb.Union): legal restrictions due to copyright claims. :ivar files.LookupError.unsupported_content_type: This operation is not supported for this content type. + :ivar files.LookupError.locked: The given path is locked. """ _catch_all = 'other' @@ -7898,6 +7899,8 @@ class LookupError(bb.Union): # Attribute is overwritten below the class definition unsupported_content_type = None # Attribute is overwritten below the class definition + locked = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -7959,6 +7962,14 @@ def is_unsupported_content_type(self): """ return self._tag == 'unsupported_content_type' + def is_locked(self): + """ + Check if the union tag is ``locked``. + + :rtype: bool + """ + return self._tag == 'locked' + def is_other(self): """ Check if the union tag is ``other``. @@ -8551,6 +8562,46 @@ def __repr__(self): MoveBatchArg_validator = bv.Struct(MoveBatchArg) +class MoveIntoVaultError(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. + + :ivar files.MoveIntoVaultError.is_shared_folder: Moving shared folder into + Vault is not allowed. + """ + + _catch_all = 'other' + # Attribute is overwritten below the class definition + is_shared_folder = None + # Attribute is overwritten below the class definition + other = None + + def is_is_shared_folder(self): + """ + Check if the union tag is ``is_shared_folder``. + + :rtype: bool + """ + return self._tag == 'is_shared_folder' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(MoveIntoVaultError, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'MoveIntoVaultError(%r, %r)' % (self._tag, self._value) + +MoveIntoVaultError_validator = bv.Union(MoveIntoVaultError) + class PathOrLink(bb.Union): """ This class acts as a tagged union. Only one of the ``is_*`` methods will @@ -9286,6 +9337,9 @@ class RelocationError(bb.Union): taking succeeded, and if not, try again. This should happen very rarely. :ivar files.RelocationError.cant_move_shared_folder: Can't move the shared folder to the given destination. + :ivar MoveIntoVaultError RelocationError.cant_move_into_vault: Some content + cannot be moved into Vault under certain circumstances, see detailed + error. """ _catch_all = 'other' @@ -9343,6 +9397,17 @@ def to(cls, val): """ return cls('to', val) + @classmethod + def cant_move_into_vault(cls, val): + """ + Create an instance of this class set to the ``cant_move_into_vault`` tag + with value ``val``. + + :param MoveIntoVaultError val: + :rtype: RelocationError + """ + return cls('cant_move_into_vault', val) + def is_from_lookup(self): """ Check if the union tag is ``from_lookup``. @@ -9439,6 +9504,14 @@ def is_cant_move_shared_folder(self): """ return self._tag == 'cant_move_shared_folder' + def is_cant_move_into_vault(self): + """ + Check if the union tag is ``cant_move_into_vault``. + + :rtype: bool + """ + return self._tag == 'cant_move_into_vault' + def is_other(self): """ Check if the union tag is ``other``. @@ -9477,6 +9550,19 @@ def get_to(self): raise AttributeError("tag 'to' not set") return self._value + def get_cant_move_into_vault(self): + """ + Some content cannot be moved into Vault under certain circumstances, see + detailed error. + + Only call this if :meth:`is_cant_move_into_vault` is true. + + :rtype: MoveIntoVaultError + """ + if not self.is_cant_move_into_vault(): + raise AttributeError("tag 'cant_move_into_vault' not set") + return self._value + def _process_custom_annotations(self, annotation_type, field_path, processor): super(RelocationError, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -11080,10 +11166,15 @@ class SearchError(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. + + :ivar files.SearchError.internal_error: Something went wrong, please try + again. """ _catch_all = 'other' # Attribute is overwritten below the class definition + internal_error = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -11124,6 +11215,14 @@ def is_invalid_argument(self): """ return self._tag == 'invalid_argument' + def is_internal_error(self): + """ + Check if the union tag is ``internal_error``. + + :rtype: bool + """ + return self._tag == 'internal_error' + def is_other(self): """ Check if the union tag is ``other``. @@ -11245,6 +11344,59 @@ def __repr__(self): SearchMatch_validator = bv.Struct(SearchMatch) +class SearchMatchFieldOptions(bb.Struct): + """ + :ivar files.SearchMatchFieldOptions.include_highlights: Whether to include + highlight span from file title. + """ + + __slots__ = [ + '_include_highlights_value', + '_include_highlights_present', + ] + + _has_required_fields = False + + def __init__(self, + include_highlights=None): + self._include_highlights_value = None + self._include_highlights_present = False + if include_highlights is not None: + self.include_highlights = include_highlights + + @property + def include_highlights(self): + """ + Whether to include highlight span from file title. + + :rtype: bool + """ + if self._include_highlights_present: + return self._include_highlights_value + else: + return False + + @include_highlights.setter + def include_highlights(self, val): + val = self._include_highlights_validator.validate(val) + self._include_highlights_value = val + self._include_highlights_present = True + + @include_highlights.deleter + def include_highlights(self): + self._include_highlights_value = None + self._include_highlights_present = False + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SearchMatchFieldOptions, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'SearchMatchFieldOptions(include_highlights={!r})'.format( + self._include_highlights_value, + ) + +SearchMatchFieldOptions_validator = bv.Struct(SearchMatchFieldOptions) + class SearchMatchType(bb.Union): """ Indicates what type of match was found for a given item. @@ -11306,7 +11458,7 @@ class SearchMatchV2(bb.Struct): :ivar files.SearchMatchV2.metadata: The metadata for the matched file or folder. :ivar files.SearchMatchV2.highlight_spans: The list of HighlightSpan - determines which parts of the result should be highlighted. + determines which parts of the file title should be highlighted. """ __slots__ = [ @@ -11356,8 +11508,8 @@ def metadata(self): @property def highlight_spans(self): """ - The list of HighlightSpan determines which parts of the result should be - highlighted. + The list of HighlightSpan determines which parts of the file title + should be highlighted. :rtype: list of [HighlightSpan] """ @@ -11805,6 +11957,10 @@ class SearchV2Arg(bb.Struct): multiple fields based on the request arguments. Query string may be rewritten to improve relevance of results. :ivar files.SearchV2Arg.options: Options for more targeted search results. + :ivar files.SearchV2Arg.match_field_options: Options for search results + match fields. + :ivar files.SearchV2Arg.include_highlights: Deprecated and moved this option + to SearchMatchFieldOptions. """ __slots__ = [ @@ -11812,6 +11968,8 @@ class SearchV2Arg(bb.Struct): '_query_present', '_options_value', '_options_present', + '_match_field_options_value', + '_match_field_options_present', '_include_highlights_value', '_include_highlights_present', ] @@ -11821,17 +11979,22 @@ class SearchV2Arg(bb.Struct): def __init__(self, query=None, options=None, + match_field_options=None, include_highlights=None): self._query_value = None self._query_present = False self._options_value = None self._options_present = False + self._match_field_options_value = None + self._match_field_options_present = False self._include_highlights_value = None self._include_highlights_present = False if query is not None: self.query = query if options is not None: self.options = options + if match_field_options is not None: + self.match_field_options = match_field_options if include_highlights is not None: self.include_highlights = include_highlights @@ -11886,9 +12049,37 @@ def options(self): self._options_value = None self._options_present = False + @property + def match_field_options(self): + """ + Options for search results match fields. + + :rtype: SearchMatchFieldOptions + """ + if self._match_field_options_present: + return self._match_field_options_value + else: + return None + + @match_field_options.setter + def match_field_options(self, val): + if val is None: + del self.match_field_options + return + self._match_field_options_validator.validate_type_only(val) + self._match_field_options_value = val + self._match_field_options_present = True + + @match_field_options.deleter + def match_field_options(self): + self._match_field_options_value = None + self._match_field_options_present = False + @property def include_highlights(self): """ + Deprecated and moved this option to SearchMatchFieldOptions. + :rtype: bool """ if self._include_highlights_present: @@ -11911,9 +12102,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): super(SearchV2Arg, self)._process_custom_annotations(annotation_type, field_path, processor) def __repr__(self): - return 'SearchV2Arg(query={!r}, options={!r}, include_highlights={!r})'.format( + return 'SearchV2Arg(query={!r}, options={!r}, match_field_options={!r}, include_highlights={!r})'.format( self._query_value, self._options_value, + self._match_field_options_value, self._include_highlights_value, ) @@ -16084,6 +16276,7 @@ def __repr__(self): LookupError._not_folder_validator = bv.Void() LookupError._restricted_content_validator = bv.Void() LookupError._unsupported_content_type_validator = bv.Void() +LookupError._locked_validator = bv.Void() LookupError._other_validator = bv.Void() LookupError._tagmap = { 'malformed_path': LookupError._malformed_path_validator, @@ -16092,6 +16285,7 @@ def __repr__(self): 'not_folder': LookupError._not_folder_validator, 'restricted_content': LookupError._restricted_content_validator, 'unsupported_content_type': LookupError._unsupported_content_type_validator, + 'locked': LookupError._locked_validator, 'other': LookupError._other_validator, } @@ -16100,6 +16294,7 @@ def __repr__(self): LookupError.not_folder = LookupError('not_folder') LookupError.restricted_content = LookupError('restricted_content') LookupError.unsupported_content_type = LookupError('unsupported_content_type') +LookupError.locked = LookupError('locked') LookupError.other = LookupError('other') MediaInfo._pending_validator = bv.Void() @@ -16178,6 +16373,16 @@ def __repr__(self): MoveBatchArg._all_field_names_ = RelocationBatchArgBase._all_field_names_.union(set(['allow_ownership_transfer'])) MoveBatchArg._all_fields_ = RelocationBatchArgBase._all_fields_ + [('allow_ownership_transfer', MoveBatchArg._allow_ownership_transfer_validator)] +MoveIntoVaultError._is_shared_folder_validator = bv.Void() +MoveIntoVaultError._other_validator = bv.Void() +MoveIntoVaultError._tagmap = { + 'is_shared_folder': MoveIntoVaultError._is_shared_folder_validator, + 'other': MoveIntoVaultError._other_validator, +} + +MoveIntoVaultError.is_shared_folder = MoveIntoVaultError('is_shared_folder') +MoveIntoVaultError.other = MoveIntoVaultError('other') + PathOrLink._path_validator = ReadPath_validator PathOrLink._link_validator = SharedLinkFileInfo_validator PathOrLink._other_validator = bv.Void() @@ -16279,6 +16484,7 @@ def __repr__(self): RelocationError._insufficient_quota_validator = bv.Void() RelocationError._internal_error_validator = bv.Void() RelocationError._cant_move_shared_folder_validator = bv.Void() +RelocationError._cant_move_into_vault_validator = MoveIntoVaultError_validator RelocationError._other_validator = bv.Void() RelocationError._tagmap = { 'from_lookup': RelocationError._from_lookup_validator, @@ -16293,6 +16499,7 @@ def __repr__(self): 'insufficient_quota': RelocationError._insufficient_quota_validator, 'internal_error': RelocationError._internal_error_validator, 'cant_move_shared_folder': RelocationError._cant_move_shared_folder_validator, + 'cant_move_into_vault': RelocationError._cant_move_into_vault_validator, 'other': RelocationError._other_validator, } @@ -16513,13 +16720,16 @@ def __repr__(self): SearchError._path_validator = LookupError_validator SearchError._invalid_argument_validator = bv.Nullable(bv.String()) +SearchError._internal_error_validator = bv.Void() SearchError._other_validator = bv.Void() SearchError._tagmap = { 'path': SearchError._path_validator, 'invalid_argument': SearchError._invalid_argument_validator, + 'internal_error': SearchError._internal_error_validator, 'other': SearchError._other_validator, } +SearchError.internal_error = SearchError('internal_error') SearchError.other = SearchError('other') SearchMatch._match_type_validator = SearchMatchType_validator @@ -16533,6 +16743,10 @@ def __repr__(self): ('metadata', SearchMatch._metadata_validator), ] +SearchMatchFieldOptions._include_highlights_validator = bv.Boolean() +SearchMatchFieldOptions._all_field_names_ = set(['include_highlights']) +SearchMatchFieldOptions._all_fields_ = [('include_highlights', SearchMatchFieldOptions._include_highlights_validator)] + SearchMatchType._filename_validator = bv.Void() SearchMatchType._content_validator = bv.Void() SearchMatchType._both_validator = bv.Void() @@ -16609,15 +16823,18 @@ def __repr__(self): SearchV2Arg._query_validator = bv.String() SearchV2Arg._options_validator = bv.Nullable(SearchOptions_validator) +SearchV2Arg._match_field_options_validator = bv.Nullable(SearchMatchFieldOptions_validator) SearchV2Arg._include_highlights_validator = bv.Boolean() SearchV2Arg._all_field_names_ = set([ 'query', 'options', + 'match_field_options', 'include_highlights', ]) SearchV2Arg._all_fields_ = [ ('query', SearchV2Arg._query_validator), ('options', SearchV2Arg._options_validator), + ('match_field_options', SearchV2Arg._match_field_options_validator), ('include_highlights', SearchV2Arg._include_highlights_validator), ] diff --git a/dropbox/sharing.py b/dropbox/sharing.py index 809721c7..22e78b5d 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -751,6 +751,8 @@ class AddFolderMemberError(bb.Union): performed on a team shared folder. :ivar sharing.AddFolderMemberError.no_permission: The current user does not have permission to perform this action. + :ivar sharing.AddFolderMemberError.invalid_shared_folder: Invalid shared + folder error will be returned as an access_error. """ _catch_all = 'other' @@ -771,6 +773,8 @@ class AddFolderMemberError(bb.Union): # Attribute is overwritten below the class definition no_permission = None # Attribute is overwritten below the class definition + invalid_shared_folder = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -913,6 +917,14 @@ def is_no_permission(self): """ return self._tag == 'no_permission' + def is_invalid_shared_folder(self): + """ + Check if the union tag is ``invalid_shared_folder``. + + :rtype: bool + """ + return self._tag == 'invalid_shared_folder' + def is_other(self): """ Check if the union tag is ``other``. @@ -12601,6 +12613,8 @@ class SharePathError(bb.Union): OS X package. :ivar sharing.SharePathError.inside_osx_package: We do not support sharing a folder inside a Mac OS X package. + :ivar sharing.SharePathError.is_vault: We do not support sharing the Vault + folder. """ _catch_all = 'other' @@ -12629,6 +12643,8 @@ class SharePathError(bb.Union): # Attribute is overwritten below the class definition inside_osx_package = None # Attribute is overwritten below the class definition + is_vault = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -12746,6 +12762,14 @@ def is_inside_osx_package(self): """ return self._tag == 'inside_osx_package' + def is_is_vault(self): + """ + Check if the union tag is ``is_vault``. + + :rtype: bool + """ + return self._tag == 'is_vault' + def is_other(self): """ Check if the union tag is ``other``. @@ -17295,6 +17319,7 @@ def __repr__(self): AddFolderMemberError._insufficient_plan_validator = bv.Void() AddFolderMemberError._team_folder_validator = bv.Void() AddFolderMemberError._no_permission_validator = bv.Void() +AddFolderMemberError._invalid_shared_folder_validator = bv.Void() AddFolderMemberError._other_validator = bv.Void() AddFolderMemberError._tagmap = { 'access_error': AddFolderMemberError._access_error_validator, @@ -17309,6 +17334,7 @@ def __repr__(self): 'insufficient_plan': AddFolderMemberError._insufficient_plan_validator, 'team_folder': AddFolderMemberError._team_folder_validator, 'no_permission': AddFolderMemberError._no_permission_validator, + 'invalid_shared_folder': AddFolderMemberError._invalid_shared_folder_validator, 'other': AddFolderMemberError._other_validator, } @@ -17320,6 +17346,7 @@ def __repr__(self): AddFolderMemberError.insufficient_plan = AddFolderMemberError('insufficient_plan') AddFolderMemberError.team_folder = AddFolderMemberError('team_folder') AddFolderMemberError.no_permission = AddFolderMemberError('no_permission') +AddFolderMemberError.invalid_shared_folder = AddFolderMemberError('invalid_shared_folder') AddFolderMemberError.other = AddFolderMemberError('other') AddMember._member_validator = MemberSelector_validator @@ -18881,6 +18908,7 @@ def __repr__(self): SharePathError._invalid_path_validator = bv.Void() SharePathError._is_osx_package_validator = bv.Void() SharePathError._inside_osx_package_validator = bv.Void() +SharePathError._is_vault_validator = bv.Void() SharePathError._other_validator = bv.Void() SharePathError._tagmap = { 'is_file': SharePathError._is_file_validator, @@ -18896,6 +18924,7 @@ def __repr__(self): 'invalid_path': SharePathError._invalid_path_validator, 'is_osx_package': SharePathError._is_osx_package_validator, 'inside_osx_package': SharePathError._inside_osx_package_validator, + 'is_vault': SharePathError._is_vault_validator, 'other': SharePathError._other_validator, } @@ -18911,6 +18940,7 @@ def __repr__(self): SharePathError.invalid_path = SharePathError('invalid_path') SharePathError.is_osx_package = SharePathError('is_osx_package') SharePathError.inside_osx_package = SharePathError('inside_osx_package') +SharePathError.is_vault = SharePathError('is_vault') SharePathError.other = SharePathError('other') SharedContentLinkMetadata._audience_exceptions_validator = bv.Nullable(AudienceExceptions_validator) diff --git a/dropbox/stone_validators.py b/dropbox/stone_validators.py index c8534b84..372d0a4d 100644 --- a/dropbox/stone_validators.py +++ b/dropbox/stone_validators.py @@ -305,7 +305,7 @@ def validate(self, val): try: val = val.decode('utf-8') except UnicodeDecodeError: - raise ValidationError("'%s' was not valid utf-8" % val) + raise ValidationError("'%s' was not valid utf-8") if self.max_length is not None and len(val) > self.max_length: raise ValidationError("'%s' must be at most %d characters, got %d" diff --git a/dropbox/team.py b/dropbox/team.py index a943cbf3..4445b897 100644 --- a/dropbox/team.py +++ b/dropbox/team.py @@ -8642,8 +8642,8 @@ class LegalHoldsPolicyCreateArg(bb.Struct): :ivar team.LegalHoldsPolicyCreateArg.name: Policy name. :ivar team.LegalHoldsPolicyCreateArg.description: A description of the legal hold policy. - :ivar team.LegalHoldsPolicyCreateArg.members: List of team members added to - the hold. + :ivar team.LegalHoldsPolicyCreateArg.members: List of team member IDs added + to the hold. :ivar team.LegalHoldsPolicyCreateArg.start_date: start date of the legal hold policy. :ivar team.LegalHoldsPolicyCreateArg.end_date: end date of the legal hold @@ -8744,7 +8744,7 @@ def description(self): @property def members(self): """ - List of team members added to the hold. + List of team member IDs added to the hold. :rtype: list of [str] """ @@ -9043,8 +9043,8 @@ class LegalHoldsPolicyUpdateArg(bb.Struct): :ivar team.LegalHoldsPolicyUpdateArg.id: The legal hold Id. :ivar team.LegalHoldsPolicyUpdateArg.name: Policy new name. :ivar team.LegalHoldsPolicyUpdateArg.description: Policy new description. - :ivar team.LegalHoldsPolicyUpdateArg.members: List of team members to apply - the policy on. + :ivar team.LegalHoldsPolicyUpdateArg.members: List of team member IDs to + apply the policy on. """ __slots__ = [ @@ -9062,9 +9062,9 @@ class LegalHoldsPolicyUpdateArg(bb.Struct): def __init__(self, id=None, - members=None, name=None, - description=None): + description=None, + members=None): self._id_value = None self._id_present = False self._name_value = None @@ -9160,17 +9160,20 @@ def description(self): @property def members(self): """ - List of team members to apply the policy on. + List of team member IDs to apply the policy on. :rtype: list of [str] """ if self._members_present: return self._members_value else: - raise AttributeError("missing required field 'members'") + return None @members.setter def members(self, val): + if val is None: + del self.members + return val = self._members_validator.validate(val) self._members_value = val self._members_present = True @@ -9184,11 +9187,11 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): super(LegalHoldsPolicyUpdateArg, self)._process_custom_annotations(annotation_type, field_path, processor) def __repr__(self): - return 'LegalHoldsPolicyUpdateArg(id={!r}, members={!r}, name={!r}, description={!r})'.format( + return 'LegalHoldsPolicyUpdateArg(id={!r}, name={!r}, description={!r}, members={!r})'.format( self._id_value, - self._members_value, self._name_value, self._description_value, + self._members_value, ) LegalHoldsPolicyUpdateArg_validator = bv.Struct(LegalHoldsPolicyUpdateArg) @@ -16721,8 +16724,9 @@ class RevokeLinkedApiAppArg(bb.Struct): :ivar team.RevokeLinkedApiAppArg.app_id: The application's unique id. :ivar team.RevokeLinkedApiAppArg.team_member_id: The unique id of the member owning the device. - :ivar team.RevokeLinkedApiAppArg.keep_app_folder: Whether to keep the - application dedicated folder (in case the application uses one). + :ivar team.RevokeLinkedApiAppArg.keep_app_folder: This flag is not longer + supported, the application dedicated folder (in case the application + uses one) will be kept. """ __slots__ = [ @@ -16802,8 +16806,8 @@ def team_member_id(self): @property def keep_app_folder(self): """ - Whether to keep the application dedicated folder (in case the - application uses one). + This flag is not longer supported, the application dedicated folder (in + case the application uses one) will be kept. :rtype: bool """ @@ -16970,6 +16974,8 @@ class RevokeLinkedAppError(bb.Union): :ivar team.RevokeLinkedAppError.app_not_found: Application not found. :ivar team.RevokeLinkedAppError.member_not_found: Member not found. + :ivar team.RevokeLinkedAppError.app_folder_removal_not_supported: App folder + removal is not supported. """ _catch_all = 'other' @@ -16978,6 +16984,8 @@ class RevokeLinkedAppError(bb.Union): # Attribute is overwritten below the class definition member_not_found = None # Attribute is overwritten below the class definition + app_folder_removal_not_supported = None + # Attribute is overwritten below the class definition other = None def is_app_not_found(self): @@ -16996,6 +17004,14 @@ def is_member_not_found(self): """ return self._tag == 'member_not_found' + def is_app_folder_removal_not_supported(self): + """ + Check if the union tag is ``app_folder_removal_not_supported``. + + :rtype: bool + """ + return self._tag == 'app_folder_removal_not_supported' + def is_other(self): """ Check if the union tag is ``other``. @@ -22211,7 +22227,7 @@ def __repr__(self): LegalHoldsPolicyUpdateArg._id_validator = LegalHoldId_validator LegalHoldsPolicyUpdateArg._name_validator = bv.Nullable(LegalHoldPolicyName_validator) LegalHoldsPolicyUpdateArg._description_validator = bv.Nullable(LegalHoldPolicyDescription_validator) -LegalHoldsPolicyUpdateArg._members_validator = bv.List(team_common.TeamMemberId_validator) +LegalHoldsPolicyUpdateArg._members_validator = bv.Nullable(bv.List(team_common.TeamMemberId_validator)) LegalHoldsPolicyUpdateArg._all_field_names_ = set([ 'id', 'name', @@ -23244,15 +23260,18 @@ def __repr__(self): RevokeLinkedAppError._app_not_found_validator = bv.Void() RevokeLinkedAppError._member_not_found_validator = bv.Void() +RevokeLinkedAppError._app_folder_removal_not_supported_validator = bv.Void() RevokeLinkedAppError._other_validator = bv.Void() RevokeLinkedAppError._tagmap = { 'app_not_found': RevokeLinkedAppError._app_not_found_validator, 'member_not_found': RevokeLinkedAppError._member_not_found_validator, + 'app_folder_removal_not_supported': RevokeLinkedAppError._app_folder_removal_not_supported_validator, 'other': RevokeLinkedAppError._other_validator, } RevokeLinkedAppError.app_not_found = RevokeLinkedAppError('app_not_found') RevokeLinkedAppError.member_not_found = RevokeLinkedAppError('member_not_found') +RevokeLinkedAppError.app_folder_removal_not_supported = RevokeLinkedAppError('app_folder_removal_not_supported') RevokeLinkedAppError.other = RevokeLinkedAppError('other') RevokeLinkedAppStatus._success_validator = bv.Boolean() diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 2b659de5..ff511742 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -4843,6 +4843,141 @@ def __repr__(self): ConnectedTeamName_validator = bv.Struct(ConnectedTeamName) +class ContentAdministrationPolicyChangedDetails(bb.Struct): + """ + Changed content management setting. + + :ivar team_log.ContentAdministrationPolicyChangedDetails.new_value: New + content administration policy. + :ivar team_log.ContentAdministrationPolicyChangedDetails.previous_value: + Previous content administration policy. + """ + + __slots__ = [ + '_new_value_value', + '_new_value_present', + '_previous_value_value', + '_previous_value_present', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = None + self._new_value_present = False + self._previous_value_value = None + self._previous_value_present = False + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + @property + def new_value(self): + """ + New content administration policy. + + :rtype: str + """ + if self._new_value_present: + return self._new_value_value + else: + raise AttributeError("missing required field 'new_value'") + + @new_value.setter + def new_value(self, val): + val = self._new_value_validator.validate(val) + self._new_value_value = val + self._new_value_present = True + + @new_value.deleter + def new_value(self): + self._new_value_value = None + self._new_value_present = False + + @property + def previous_value(self): + """ + Previous content administration policy. + + :rtype: str + """ + if self._previous_value_present: + return self._previous_value_value + else: + raise AttributeError("missing required field 'previous_value'") + + @previous_value.setter + def previous_value(self, val): + val = self._previous_value_validator.validate(val) + self._previous_value_value = val + self._previous_value_present = True + + @previous_value.deleter + def previous_value(self): + self._previous_value_value = None + self._previous_value_present = False + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ContentAdministrationPolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ContentAdministrationPolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( + self._new_value_value, + self._previous_value_value, + ) + +ContentAdministrationPolicyChangedDetails_validator = bv.Struct(ContentAdministrationPolicyChangedDetails) + +class ContentAdministrationPolicyChangedType(bb.Struct): + + __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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(ContentAdministrationPolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ContentAdministrationPolicyChangedType(description={!r})'.format( + self._description_value, + ) + +ContentAdministrationPolicyChangedType_validator = bv.Struct(ContentAdministrationPolicyChangedType) + class ContentPermanentDeletePolicy(bb.Union): """ Policy for pemanent content deletion @@ -12633,6 +12768,28 @@ def export_members_report_fail_details(cls, val): """ return cls('export_members_report_fail_details', val) + @classmethod + def external_sharing_create_report_details(cls, val): + """ + Create an instance of this class set to the + ``external_sharing_create_report_details`` tag with value ``val``. + + :param ExternalSharingCreateReportDetails val: + :rtype: EventDetails + """ + return cls('external_sharing_create_report_details', val) + + @classmethod + def external_sharing_report_failed_details(cls, val): + """ + Create an instance of this class set to the + ``external_sharing_report_failed_details`` tag with value ``val``. + + :param ExternalSharingReportFailedDetails val: + :rtype: EventDetails + """ + return cls('external_sharing_report_failed_details', val) + @classmethod def no_expiration_link_gen_create_report_details(cls, val): """ @@ -14139,6 +14296,18 @@ def camera_uploads_policy_changed_details(cls, val): """ return cls('camera_uploads_policy_changed_details', val) + @classmethod + def content_administration_policy_changed_details(cls, val): + """ + Create an instance of this class set to the + ``content_administration_policy_changed_details`` tag with value + ``val``. + + :param ContentAdministrationPolicyChangedDetails val: + :rtype: EventDetails + """ + return cls('content_administration_policy_changed_details', val) + @classmethod def data_placement_restriction_change_policy_details(cls, val): """ @@ -14634,6 +14803,17 @@ def rewind_policy_changed_details(cls, val): """ return cls('rewind_policy_changed_details', val) + @classmethod + def send_for_signature_policy_changed_details(cls, val): + """ + Create an instance of this class set to the + ``send_for_signature_policy_changed_details`` tag with value ``val``. + + :param SendForSignaturePolicyChangedDetails val: + :rtype: EventDetails + """ + return cls('send_for_signature_policy_changed_details', val) + @classmethod def sharing_change_folder_join_policy_details(cls, val): """ @@ -16802,6 +16982,22 @@ def is_export_members_report_fail_details(self): """ return self._tag == 'export_members_report_fail_details' + def is_external_sharing_create_report_details(self): + """ + Check if the union tag is ``external_sharing_create_report_details``. + + :rtype: bool + """ + return self._tag == 'external_sharing_create_report_details' + + def is_external_sharing_report_failed_details(self): + """ + Check if the union tag is ``external_sharing_report_failed_details``. + + :rtype: bool + """ + return self._tag == 'external_sharing_report_failed_details' + def is_no_expiration_link_gen_create_report_details(self): """ Check if the union tag is ``no_expiration_link_gen_create_report_details``. @@ -17890,6 +18086,14 @@ def is_camera_uploads_policy_changed_details(self): """ return self._tag == 'camera_uploads_policy_changed_details' + def is_content_administration_policy_changed_details(self): + """ + Check if the union tag is ``content_administration_policy_changed_details``. + + :rtype: bool + """ + return self._tag == 'content_administration_policy_changed_details' + def is_data_placement_restriction_change_policy_details(self): """ Check if the union tag is ``data_placement_restriction_change_policy_details``. @@ -18242,6 +18446,14 @@ def is_rewind_policy_changed_details(self): """ return self._tag == 'rewind_policy_changed_details' + def is_send_for_signature_policy_changed_details(self): + """ + Check if the union tag is ``send_for_signature_policy_changed_details``. + + :rtype: bool + """ + return self._tag == 'send_for_signature_policy_changed_details' + def is_sharing_change_folder_join_policy_details(self): """ Check if the union tag is ``sharing_change_folder_join_policy_details``. @@ -20574,6 +20786,26 @@ def get_export_members_report_fail_details(self): raise AttributeError("tag 'export_members_report_fail_details' not set") return self._value + def get_external_sharing_create_report_details(self): + """ + Only call this if :meth:`is_external_sharing_create_report_details` is true. + + :rtype: ExternalSharingCreateReportDetails + """ + if not self.is_external_sharing_create_report_details(): + raise AttributeError("tag 'external_sharing_create_report_details' not set") + return self._value + + def get_external_sharing_report_failed_details(self): + """ + Only call this if :meth:`is_external_sharing_report_failed_details` is true. + + :rtype: ExternalSharingReportFailedDetails + """ + if not self.is_external_sharing_report_failed_details(): + raise AttributeError("tag 'external_sharing_report_failed_details' not set") + return self._value + def get_no_expiration_link_gen_create_report_details(self): """ Only call this if :meth:`is_no_expiration_link_gen_create_report_details` is true. @@ -21934,6 +22166,16 @@ def get_camera_uploads_policy_changed_details(self): raise AttributeError("tag 'camera_uploads_policy_changed_details' not set") return self._value + def get_content_administration_policy_changed_details(self): + """ + Only call this if :meth:`is_content_administration_policy_changed_details` is true. + + :rtype: ContentAdministrationPolicyChangedDetails + """ + if not self.is_content_administration_policy_changed_details(): + raise AttributeError("tag 'content_administration_policy_changed_details' not set") + return self._value + def get_data_placement_restriction_change_policy_details(self): """ Only call this if :meth:`is_data_placement_restriction_change_policy_details` is true. @@ -22374,6 +22616,16 @@ def get_rewind_policy_changed_details(self): raise AttributeError("tag 'rewind_policy_changed_details' not set") return self._value + def get_send_for_signature_policy_changed_details(self): + """ + Only call this if :meth:`is_send_for_signature_policy_changed_details` is true. + + :rtype: SendForSignaturePolicyChangedDetails + """ + if not self.is_send_for_signature_policy_changed_details(): + raise AttributeError("tag 'send_for_signature_policy_changed_details' not set") + return self._value + def get_sharing_change_folder_join_policy_details(self): """ Only call this if :meth:`is_sharing_change_folder_join_policy_details` is true. @@ -23419,6 +23671,12 @@ class EventType(bb.Union): Created member data report :ivar ExportMembersReportFailType EventType.export_members_report_fail: (reports) Failed to create members data report + :ivar ExternalSharingCreateReportType + EventType.external_sharing_create_report: (reports) Report created: Data + shared outside the team + :ivar ExternalSharingReportFailedType + EventType.external_sharing_report_failed: (reports) Couldn't create + report: Data shared outside the team :ivar NoExpirationLinkGenCreateReportType EventType.no_expiration_link_gen_create_report: (reports) Report created: Links created with no expiration @@ -23748,6 +24006,9 @@ class EventType(bb.Union): :ivar CameraUploadsPolicyChangedType EventType.camera_uploads_policy_changed: (team_policies) Changed camera uploads setting for team + :ivar ContentAdministrationPolicyChangedType + EventType.content_administration_policy_changed: (team_policies) Changed + content management setting :ivar DataPlacementRestrictionChangePolicyType EventType.data_placement_restriction_change_policy: (team_policies) Set restrictions on data center locations where team data resides @@ -23875,6 +24136,9 @@ class EventType(bb.Union): Enabled/disabled reseller support :ivar RewindPolicyChangedType EventType.rewind_policy_changed: (team_policies) Changed Rewind policy for team + :ivar SendForSignaturePolicyChangedType + EventType.send_for_signature_policy_changed: (team_policies) Changed + send for signature policy for team :ivar SharingChangeFolderJoinPolicyType EventType.sharing_change_folder_join_policy: (team_policies) Changed whether team members can join shared folders owned outside team @@ -26053,6 +26317,28 @@ def export_members_report_fail(cls, val): """ return cls('export_members_report_fail', val) + @classmethod + def external_sharing_create_report(cls, val): + """ + Create an instance of this class set to the + ``external_sharing_create_report`` tag with value ``val``. + + :param ExternalSharingCreateReportType val: + :rtype: EventType + """ + return cls('external_sharing_create_report', val) + + @classmethod + def external_sharing_report_failed(cls, val): + """ + Create an instance of this class set to the + ``external_sharing_report_failed`` tag with value ``val``. + + :param ExternalSharingReportFailedType val: + :rtype: EventType + """ + return cls('external_sharing_report_failed', val) + @classmethod def no_expiration_link_gen_create_report(cls, val): """ @@ -27551,6 +27837,17 @@ def camera_uploads_policy_changed(cls, val): """ return cls('camera_uploads_policy_changed', val) + @classmethod + def content_administration_policy_changed(cls, val): + """ + Create an instance of this class set to the + ``content_administration_policy_changed`` tag with value ``val``. + + :param ContentAdministrationPolicyChangedType val: + :rtype: EventType + """ + return cls('content_administration_policy_changed', val) + @classmethod def data_placement_restriction_change_policy(cls, val): """ @@ -28035,6 +28332,17 @@ def rewind_policy_changed(cls, val): """ return cls('rewind_policy_changed', val) + @classmethod + def send_for_signature_policy_changed(cls, val): + """ + Create an instance of this class set to the + ``send_for_signature_policy_changed`` tag with value ``val``. + + :param SendForSignaturePolicyChangedType val: + :rtype: EventType + """ + return cls('send_for_signature_policy_changed', val) + @classmethod def sharing_change_folder_join_policy(cls, val): """ @@ -30185,6 +30493,22 @@ def is_export_members_report_fail(self): """ return self._tag == 'export_members_report_fail' + def is_external_sharing_create_report(self): + """ + Check if the union tag is ``external_sharing_create_report``. + + :rtype: bool + """ + return self._tag == 'external_sharing_create_report' + + def is_external_sharing_report_failed(self): + """ + Check if the union tag is ``external_sharing_report_failed``. + + :rtype: bool + """ + return self._tag == 'external_sharing_report_failed' + def is_no_expiration_link_gen_create_report(self): """ Check if the union tag is ``no_expiration_link_gen_create_report``. @@ -31273,6 +31597,14 @@ def is_camera_uploads_policy_changed(self): """ return self._tag == 'camera_uploads_policy_changed' + def is_content_administration_policy_changed(self): + """ + Check if the union tag is ``content_administration_policy_changed``. + + :rtype: bool + """ + return self._tag == 'content_administration_policy_changed' + def is_data_placement_restriction_change_policy(self): """ Check if the union tag is ``data_placement_restriction_change_policy``. @@ -31625,6 +31957,14 @@ def is_rewind_policy_changed(self): """ return self._tag == 'rewind_policy_changed' + def is_send_for_signature_policy_changed(self): + """ + Check if the union tag is ``send_for_signature_policy_changed``. + + :rtype: bool + """ + return self._tag == 'send_for_signature_policy_changed' + def is_sharing_change_folder_join_policy(self): """ Check if the union tag is ``sharing_change_folder_join_policy``. @@ -34330,6 +34670,30 @@ def get_export_members_report_fail(self): raise AttributeError("tag 'export_members_report_fail' not set") return self._value + def get_external_sharing_create_report(self): + """ + (reports) Report created: Data shared outside the team + + Only call this if :meth:`is_external_sharing_create_report` is true. + + :rtype: ExternalSharingCreateReportType + """ + if not self.is_external_sharing_create_report(): + raise AttributeError("tag 'external_sharing_create_report' not set") + return self._value + + def get_external_sharing_report_failed(self): + """ + (reports) Couldn't create report: Data shared outside the team + + Only call this if :meth:`is_external_sharing_report_failed` is true. + + :rtype: ExternalSharingReportFailedType + """ + if not self.is_external_sharing_report_failed(): + raise AttributeError("tag 'external_sharing_report_failed' not set") + return self._value + def get_no_expiration_link_gen_create_report(self): """ (reports) Report created: Links created with no expiration @@ -35989,6 +36353,18 @@ def get_camera_uploads_policy_changed(self): raise AttributeError("tag 'camera_uploads_policy_changed' not set") return self._value + def get_content_administration_policy_changed(self): + """ + (team_policies) Changed content management setting + + Only call this if :meth:`is_content_administration_policy_changed` is true. + + :rtype: ContentAdministrationPolicyChangedType + """ + if not self.is_content_administration_policy_changed(): + raise AttributeError("tag 'content_administration_policy_changed' not set") + return self._value + def get_data_placement_restriction_change_policy(self): """ (team_policies) Set restrictions on data center locations where team @@ -36532,6 +36908,18 @@ def get_rewind_policy_changed(self): raise AttributeError("tag 'rewind_policy_changed' not set") return self._value + def get_send_for_signature_policy_changed(self): + """ + (team_policies) Changed send for signature policy for team + + Only call this if :meth:`is_send_for_signature_policy_changed` is true. + + :rtype: SendForSignaturePolicyChangedType + """ + if not self.is_send_for_signature_policy_changed(): + raise AttributeError("tag 'send_for_signature_policy_changed' not set") + return self._value + def get_sharing_change_folder_join_policy(self): """ (team_policies) Changed whether team members can join shared folders @@ -37662,6 +38050,10 @@ class EventTypeArg(bb.Union): data report :ivar team_log.EventTypeArg.export_members_report_fail: (reports) Failed to create members data report + :ivar team_log.EventTypeArg.external_sharing_create_report: (reports) Report + created: Data shared outside the team + :ivar team_log.EventTypeArg.external_sharing_report_failed: (reports) + Couldn't create report: Data shared outside the team :ivar team_log.EventTypeArg.no_expiration_link_gen_create_report: (reports) Report created: Links created with no expiration :ivar team_log.EventTypeArg.no_expiration_link_gen_report_failed: (reports) @@ -37940,6 +38332,8 @@ class EventTypeArg(bb.Union): downloads (deprecated, no longer logged) :ivar team_log.EventTypeArg.camera_uploads_policy_changed: (team_policies) Changed camera uploads setting for team + :ivar team_log.EventTypeArg.content_administration_policy_changed: + (team_policies) Changed content management setting :ivar team_log.EventTypeArg.data_placement_restriction_change_policy: (team_policies) Set restrictions on data center locations where team data resides @@ -38039,6 +38433,8 @@ class EventTypeArg(bb.Union): Enabled/disabled reseller support :ivar team_log.EventTypeArg.rewind_policy_changed: (team_policies) Changed Rewind policy for team + :ivar team_log.EventTypeArg.send_for_signature_policy_changed: + (team_policies) Changed send for signature policy for team :ivar team_log.EventTypeArg.sharing_change_folder_join_policy: (team_policies) Changed whether team members can join shared folders owned outside team @@ -38558,6 +38954,10 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition export_members_report_fail = None # Attribute is overwritten below the class definition + external_sharing_create_report = None + # Attribute is overwritten below the class definition + external_sharing_report_failed = None + # Attribute is overwritten below the class definition no_expiration_link_gen_create_report = None # Attribute is overwritten below the class definition no_expiration_link_gen_report_failed = None @@ -38830,6 +39230,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition camera_uploads_policy_changed = None # Attribute is overwritten below the class definition + content_administration_policy_changed = None + # Attribute is overwritten below the class definition data_placement_restriction_change_policy = None # Attribute is overwritten below the class definition data_placement_restriction_satisfy_policy = None @@ -38918,6 +39320,8 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition rewind_policy_changed = None # Attribute is overwritten below the class definition + send_for_signature_policy_changed = None + # Attribute is overwritten below the class definition sharing_change_folder_join_policy = None # Attribute is overwritten below the class definition sharing_change_link_policy = None @@ -40500,6 +40904,22 @@ def is_export_members_report_fail(self): """ return self._tag == 'export_members_report_fail' + def is_external_sharing_create_report(self): + """ + Check if the union tag is ``external_sharing_create_report``. + + :rtype: bool + """ + return self._tag == 'external_sharing_create_report' + + def is_external_sharing_report_failed(self): + """ + Check if the union tag is ``external_sharing_report_failed``. + + :rtype: bool + """ + return self._tag == 'external_sharing_report_failed' + def is_no_expiration_link_gen_create_report(self): """ Check if the union tag is ``no_expiration_link_gen_create_report``. @@ -41588,6 +42008,14 @@ def is_camera_uploads_policy_changed(self): """ return self._tag == 'camera_uploads_policy_changed' + def is_content_administration_policy_changed(self): + """ + Check if the union tag is ``content_administration_policy_changed``. + + :rtype: bool + """ + return self._tag == 'content_administration_policy_changed' + def is_data_placement_restriction_change_policy(self): """ Check if the union tag is ``data_placement_restriction_change_policy``. @@ -41940,6 +42368,14 @@ def is_rewind_policy_changed(self): """ return self._tag == 'rewind_policy_changed' + def is_send_for_signature_policy_changed(self): + """ + Check if the union tag is ``send_for_signature_policy_changed``. + + :rtype: bool + """ + return self._tag == 'send_for_signature_policy_changed' + def is_sharing_change_folder_join_policy(self): """ Check if the union tag is ``sharing_change_folder_join_policy``. @@ -42829,6 +43265,176 @@ def __repr__(self): ExtendedVersionHistoryPolicy_validator = bv.Union(ExtendedVersionHistoryPolicy) +class ExternalSharingCreateReportDetails(bb.Struct): + """ + Report created: Data shared outside the team. + """ + + __slots__ = [ + ] + + _has_required_fields = False + + def __init__(self): + pass + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalSharingCreateReportDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ExternalSharingCreateReportDetails()' + +ExternalSharingCreateReportDetails_validator = bv.Struct(ExternalSharingCreateReportDetails) + +class ExternalSharingCreateReportType(bb.Struct): + + __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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalSharingCreateReportType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ExternalSharingCreateReportType(description={!r})'.format( + self._description_value, + ) + +ExternalSharingCreateReportType_validator = bv.Struct(ExternalSharingCreateReportType) + +class ExternalSharingReportFailedDetails(bb.Struct): + """ + Couldn't create report: Data shared outside the team. + + :ivar team_log.ExternalSharingReportFailedDetails.failure_reason: Failure + reason. + """ + + __slots__ = [ + '_failure_reason_value', + '_failure_reason_present', + ] + + _has_required_fields = True + + def __init__(self, + failure_reason=None): + self._failure_reason_value = None + self._failure_reason_present = False + if failure_reason is not None: + self.failure_reason = failure_reason + + @property + def failure_reason(self): + """ + Failure reason. + + :rtype: team.TeamReportFailureReason + """ + if self._failure_reason_present: + return self._failure_reason_value + else: + raise AttributeError("missing required field 'failure_reason'") + + @failure_reason.setter + def failure_reason(self, val): + self._failure_reason_validator.validate_type_only(val) + self._failure_reason_value = val + self._failure_reason_present = True + + @failure_reason.deleter + def failure_reason(self): + self._failure_reason_value = None + self._failure_reason_present = False + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalSharingReportFailedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ExternalSharingReportFailedDetails(failure_reason={!r})'.format( + self._failure_reason_value, + ) + +ExternalSharingReportFailedDetails_validator = bv.Struct(ExternalSharingReportFailedDetails) + +class ExternalSharingReportFailedType(bb.Struct): + + __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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(ExternalSharingReportFailedType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'ExternalSharingReportFailedType(description={!r})'.format( + self._description_value, + ) + +ExternalSharingReportFailedType_validator = bv.Struct(ExternalSharingReportFailedType) + class ExternalUserLogInfo(bb.Struct): """ A user without a Dropbox account. @@ -48737,7 +49343,8 @@ class GetTeamEventsArg(bb.Struct): Participants. :ivar team_log.GetTeamEventsArg.time: Filter by time range. :ivar team_log.GetTeamEventsArg.category: Filter the returned events to a - single category. + single category. Note that category shouldn't be provided together with + event_type. :ivar team_log.GetTeamEventsArg.event_type: Filter the returned events to a single event type. Note that event_type shouldn't be provided together with category. @@ -48868,7 +49475,8 @@ def time(self): @property def category(self): """ - Filter the returned events to a single category. + Filter the returned events to a single category. Note that category + shouldn't be provided together with event_type. :rtype: EventCategory """ @@ -49085,8 +49693,8 @@ class GetTeamEventsError(bb.Union): :ivar team_log.GetTeamEventsError.account_id_not_found: No user found matching the provided account_id. :ivar team_log.GetTeamEventsError.invalid_time_range: Invalid time range. - :ivar team_log.GetTeamEventsError.invalid_filters: Invalid filters. - event_type and category should not be provided together. + :ivar team_log.GetTeamEventsError.invalid_filters: Invalid filters. Do not + specify both event_type and category parameters for the same call. """ _catch_all = 'other' @@ -52214,6 +52822,10 @@ class InviteMethod(bb.Union): # Attribute is overwritten below the class definition invite_link = None # Attribute is overwritten below the class definition + auto_approve = None + # Attribute is overwritten below the class definition + moved_from_another_team = None + # Attribute is overwritten below the class definition other = None def is_invite_link(self): @@ -52224,6 +52836,22 @@ def is_invite_link(self): """ return self._tag == 'invite_link' + def is_auto_approve(self): + """ + Check if the union tag is ``auto_approve``. + + :rtype: bool + """ + return self._tag == 'auto_approve' + + def is_moved_from_another_team(self): + """ + Check if the union tag is ``moved_from_another_team``. + + :rtype: bool + """ + return self._tag == 'moved_from_another_team' + def is_other(self): """ Check if the union tag is ``other``. @@ -56370,6 +56998,11 @@ class MemberChangeStatusDetails(bb.Struct): :ivar team_log.MemberChangeStatusDetails.new_value: New member status. :ivar team_log.MemberChangeStatusDetails.action: Additional information indicating the action taken that caused status change. + :ivar team_log.MemberChangeStatusDetails.new_team: The user's new team name. + This field is relevant when the user is transferred off the team. + :ivar team_log.MemberChangeStatusDetails.previous_team: The user's previous + team name. This field is relevant when the user is transferred onto the + team. """ __slots__ = [ @@ -56379,6 +57012,10 @@ class MemberChangeStatusDetails(bb.Struct): '_new_value_present', '_action_value', '_action_present', + '_new_team_value', + '_new_team_present', + '_previous_team_value', + '_previous_team_present', ] _has_required_fields = True @@ -56386,19 +57023,29 @@ class MemberChangeStatusDetails(bb.Struct): def __init__(self, new_value=None, previous_value=None, - action=None): + action=None, + new_team=None, + previous_team=None): self._previous_value_value = None self._previous_value_present = False self._new_value_value = None self._new_value_present = False self._action_value = None self._action_present = False + self._new_team_value = None + self._new_team_present = False + self._previous_team_value = None + self._previous_team_present = False if previous_value is not None: self.previous_value = previous_value if new_value is not None: self.new_value = new_value if action is not None: self.action = action + if new_team is not None: + self.new_team = new_team + if previous_team is not None: + self.previous_team = previous_team @property def previous_value(self): @@ -56476,14 +57123,70 @@ def action(self): self._action_value = None self._action_present = False + @property + def new_team(self): + """ + The user's new team name. This field is relevant when the user is + transferred off the team. + + :rtype: str + """ + if self._new_team_present: + return self._new_team_value + else: + return None + + @new_team.setter + def new_team(self, val): + if val is None: + del self.new_team + return + val = self._new_team_validator.validate(val) + self._new_team_value = val + self._new_team_present = True + + @new_team.deleter + def new_team(self): + self._new_team_value = None + self._new_team_present = False + + @property + def previous_team(self): + """ + The user's previous team name. This field is relevant when the user is + transferred onto the team. + + :rtype: str + """ + if self._previous_team_present: + return self._previous_team_value + else: + return None + + @previous_team.setter + def previous_team(self, val): + if val is None: + del self.previous_team + return + val = self._previous_team_validator.validate(val) + self._previous_team_value = val + self._previous_team_present = True + + @previous_team.deleter + def previous_team(self): + self._previous_team_value = None + self._previous_team_present = False + def _process_custom_annotations(self, annotation_type, field_path, processor): super(MemberChangeStatusDetails, self)._process_custom_annotations(annotation_type, field_path, processor) def __repr__(self): - return 'MemberChangeStatusDetails(new_value={!r}, previous_value={!r}, action={!r})'.format( + return 'MemberChangeStatusDetails(new_value={!r}, previous_value={!r}, action={!r}, new_team={!r}, previous_team={!r})'.format( self._new_value_value, self._previous_value_value, self._action_value, + self._new_team_value, + self._previous_team_value, ) MemberChangeStatusDetails_validator = bv.Struct(MemberChangeStatusDetails) @@ -58242,6 +58945,8 @@ class MemberStatus(bb.Union): # Attribute is overwritten below the class definition removed = None # Attribute is overwritten below the class definition + moved_to_another_team = None + # Attribute is overwritten below the class definition other = None def is_not_joined(self): @@ -58284,6 +58989,14 @@ def is_removed(self): """ return self._tag == 'removed' + def is_moved_to_another_team(self): + """ + Check if the union tag is ``moved_to_another_team``. + + :rtype: bool + """ + return self._tag == 'moved_to_another_team' + def is_other(self): """ Check if the union tag is ``other``. @@ -70410,6 +71123,190 @@ def __repr__(self): SecondaryTeamRequestReminderDetails_validator = bv.Struct(SecondaryTeamRequestReminderDetails) +class SendForSignaturePolicy(bb.Union): + """ + Policy for controlling team access to send for signature feature + + 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 + disabled = None + # Attribute is overwritten below the class definition + enabled = None + # Attribute is overwritten below the class definition + other = None + + def is_disabled(self): + """ + Check if the union tag is ``disabled``. + + :rtype: bool + """ + return self._tag == 'disabled' + + def is_enabled(self): + """ + Check if the union tag is ``enabled``. + + :rtype: bool + """ + return self._tag == 'enabled' + + def is_other(self): + """ + Check if the union tag is ``other``. + + :rtype: bool + """ + return self._tag == 'other' + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SendForSignaturePolicy, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'SendForSignaturePolicy(%r, %r)' % (self._tag, self._value) + +SendForSignaturePolicy_validator = bv.Union(SendForSignaturePolicy) + +class SendForSignaturePolicyChangedDetails(bb.Struct): + """ + Changed send for signature policy for team. + + :ivar team_log.SendForSignaturePolicyChangedDetails.new_value: New send for + signature policy. + :ivar team_log.SendForSignaturePolicyChangedDetails.previous_value: Previous + send for signature policy. + """ + + __slots__ = [ + '_new_value_value', + '_new_value_present', + '_previous_value_value', + '_previous_value_present', + ] + + _has_required_fields = True + + def __init__(self, + new_value=None, + previous_value=None): + self._new_value_value = None + self._new_value_present = False + self._previous_value_value = None + self._previous_value_present = False + if new_value is not None: + self.new_value = new_value + if previous_value is not None: + self.previous_value = previous_value + + @property + def new_value(self): + """ + New send for signature policy. + + :rtype: SendForSignaturePolicy + """ + if self._new_value_present: + return self._new_value_value + else: + raise AttributeError("missing required field 'new_value'") + + @new_value.setter + def new_value(self, val): + self._new_value_validator.validate_type_only(val) + self._new_value_value = val + self._new_value_present = True + + @new_value.deleter + def new_value(self): + self._new_value_value = None + self._new_value_present = False + + @property + def previous_value(self): + """ + Previous send for signature policy. + + :rtype: SendForSignaturePolicy + """ + if self._previous_value_present: + return self._previous_value_value + else: + raise AttributeError("missing required field 'previous_value'") + + @previous_value.setter + def previous_value(self, val): + self._previous_value_validator.validate_type_only(val) + self._previous_value_value = val + self._previous_value_present = True + + @previous_value.deleter + def previous_value(self): + self._previous_value_value = None + self._previous_value_present = False + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(SendForSignaturePolicyChangedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'SendForSignaturePolicyChangedDetails(new_value={!r}, previous_value={!r})'.format( + self._new_value_value, + self._previous_value_value, + ) + +SendForSignaturePolicyChangedDetails_validator = bv.Struct(SendForSignaturePolicyChangedDetails) + +class SendForSignaturePolicyChangedType(bb.Struct): + + __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 _process_custom_annotations(self, annotation_type, field_path, processor): + super(SendForSignaturePolicyChangedType, self)._process_custom_annotations(annotation_type, field_path, processor) + + def __repr__(self): + return 'SendForSignaturePolicyChangedType(description={!r})'.format( + self._description_value, + ) + +SendForSignaturePolicyChangedType_validator = bv.Struct(SendForSignaturePolicyChangedType) + class SfAddGroupDetails(bb.Struct): """ Added team to shared folder. @@ -79438,6 +80335,8 @@ class SharedLinkVisibility(bb.Union): _catch_all = 'other' # Attribute is overwritten below the class definition + no_one = None + # Attribute is overwritten below the class definition password = None # Attribute is overwritten below the class definition public = None @@ -79446,6 +80345,14 @@ class SharedLinkVisibility(bb.Union): # Attribute is overwritten below the class definition other = None + def is_no_one(self): + """ + Check if the union tag is ``no_one``. + + :rtype: bool + """ + return self._tag == 'no_one' + def is_password(self): """ Check if the union tag is ``password``. @@ -94621,6 +95528,21 @@ def __repr__(self): ConnectedTeamName._all_field_names_ = set(['team']) ConnectedTeamName._all_fields_ = [('team', ConnectedTeamName._team_validator)] +ContentAdministrationPolicyChangedDetails._new_value_validator = bv.String() +ContentAdministrationPolicyChangedDetails._previous_value_validator = bv.String() +ContentAdministrationPolicyChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +ContentAdministrationPolicyChangedDetails._all_fields_ = [ + ('new_value', ContentAdministrationPolicyChangedDetails._new_value_validator), + ('previous_value', ContentAdministrationPolicyChangedDetails._previous_value_validator), +] + +ContentAdministrationPolicyChangedType._description_validator = bv.String() +ContentAdministrationPolicyChangedType._all_field_names_ = set(['description']) +ContentAdministrationPolicyChangedType._all_fields_ = [('description', ContentAdministrationPolicyChangedType._description_validator)] + ContentPermanentDeletePolicy._disabled_validator = bv.Void() ContentPermanentDeletePolicy._enabled_validator = bv.Void() ContentPermanentDeletePolicy._other_validator = bv.Void() @@ -95497,6 +96419,8 @@ def __repr__(self): EventDetails._emm_create_usage_report_details_validator = EmmCreateUsageReportDetails_validator EventDetails._export_members_report_details_validator = ExportMembersReportDetails_validator EventDetails._export_members_report_fail_details_validator = ExportMembersReportFailDetails_validator +EventDetails._external_sharing_create_report_details_validator = ExternalSharingCreateReportDetails_validator +EventDetails._external_sharing_report_failed_details_validator = ExternalSharingReportFailedDetails_validator EventDetails._no_expiration_link_gen_create_report_details_validator = NoExpirationLinkGenCreateReportDetails_validator EventDetails._no_expiration_link_gen_report_failed_details_validator = NoExpirationLinkGenReportFailedDetails_validator EventDetails._no_password_link_gen_create_report_details_validator = NoPasswordLinkGenCreateReportDetails_validator @@ -95633,6 +96557,7 @@ def __repr__(self): EventDetails._allow_download_disabled_details_validator = AllowDownloadDisabledDetails_validator EventDetails._allow_download_enabled_details_validator = AllowDownloadEnabledDetails_validator EventDetails._camera_uploads_policy_changed_details_validator = CameraUploadsPolicyChangedDetails_validator +EventDetails._content_administration_policy_changed_details_validator = ContentAdministrationPolicyChangedDetails_validator EventDetails._data_placement_restriction_change_policy_details_validator = DataPlacementRestrictionChangePolicyDetails_validator EventDetails._data_placement_restriction_satisfy_policy_details_validator = DataPlacementRestrictionSatisfyPolicyDetails_validator EventDetails._device_approvals_add_exception_details_validator = DeviceApprovalsAddExceptionDetails_validator @@ -95677,6 +96602,7 @@ def __repr__(self): EventDetails._permanent_delete_change_policy_details_validator = PermanentDeleteChangePolicyDetails_validator EventDetails._reseller_support_change_policy_details_validator = ResellerSupportChangePolicyDetails_validator EventDetails._rewind_policy_changed_details_validator = RewindPolicyChangedDetails_validator +EventDetails._send_for_signature_policy_changed_details_validator = SendForSignaturePolicyChangedDetails_validator EventDetails._sharing_change_folder_join_policy_details_validator = SharingChangeFolderJoinPolicyDetails_validator EventDetails._sharing_change_link_policy_details_validator = SharingChangeLinkPolicyDetails_validator EventDetails._sharing_change_member_policy_details_validator = SharingChangeMemberPolicyDetails_validator @@ -95924,6 +96850,8 @@ def __repr__(self): 'emm_create_usage_report_details': EventDetails._emm_create_usage_report_details_validator, 'export_members_report_details': EventDetails._export_members_report_details_validator, 'export_members_report_fail_details': EventDetails._export_members_report_fail_details_validator, + 'external_sharing_create_report_details': EventDetails._external_sharing_create_report_details_validator, + 'external_sharing_report_failed_details': EventDetails._external_sharing_report_failed_details_validator, 'no_expiration_link_gen_create_report_details': EventDetails._no_expiration_link_gen_create_report_details_validator, 'no_expiration_link_gen_report_failed_details': EventDetails._no_expiration_link_gen_report_failed_details_validator, 'no_password_link_gen_create_report_details': EventDetails._no_password_link_gen_create_report_details_validator, @@ -96060,6 +96988,7 @@ def __repr__(self): 'allow_download_disabled_details': EventDetails._allow_download_disabled_details_validator, 'allow_download_enabled_details': EventDetails._allow_download_enabled_details_validator, 'camera_uploads_policy_changed_details': EventDetails._camera_uploads_policy_changed_details_validator, + 'content_administration_policy_changed_details': EventDetails._content_administration_policy_changed_details_validator, 'data_placement_restriction_change_policy_details': EventDetails._data_placement_restriction_change_policy_details_validator, 'data_placement_restriction_satisfy_policy_details': EventDetails._data_placement_restriction_satisfy_policy_details_validator, 'device_approvals_add_exception_details': EventDetails._device_approvals_add_exception_details_validator, @@ -96104,6 +97033,7 @@ def __repr__(self): 'permanent_delete_change_policy_details': EventDetails._permanent_delete_change_policy_details_validator, 'reseller_support_change_policy_details': EventDetails._reseller_support_change_policy_details_validator, 'rewind_policy_changed_details': EventDetails._rewind_policy_changed_details_validator, + 'send_for_signature_policy_changed_details': EventDetails._send_for_signature_policy_changed_details_validator, 'sharing_change_folder_join_policy_details': EventDetails._sharing_change_folder_join_policy_details_validator, 'sharing_change_link_policy_details': EventDetails._sharing_change_link_policy_details_validator, 'sharing_change_member_policy_details': EventDetails._sharing_change_member_policy_details_validator, @@ -96354,6 +97284,8 @@ def __repr__(self): EventType._emm_create_usage_report_validator = EmmCreateUsageReportType_validator EventType._export_members_report_validator = ExportMembersReportType_validator EventType._export_members_report_fail_validator = ExportMembersReportFailType_validator +EventType._external_sharing_create_report_validator = ExternalSharingCreateReportType_validator +EventType._external_sharing_report_failed_validator = ExternalSharingReportFailedType_validator EventType._no_expiration_link_gen_create_report_validator = NoExpirationLinkGenCreateReportType_validator EventType._no_expiration_link_gen_report_failed_validator = NoExpirationLinkGenReportFailedType_validator EventType._no_password_link_gen_create_report_validator = NoPasswordLinkGenCreateReportType_validator @@ -96490,6 +97422,7 @@ def __repr__(self): EventType._allow_download_disabled_validator = AllowDownloadDisabledType_validator EventType._allow_download_enabled_validator = AllowDownloadEnabledType_validator EventType._camera_uploads_policy_changed_validator = CameraUploadsPolicyChangedType_validator +EventType._content_administration_policy_changed_validator = ContentAdministrationPolicyChangedType_validator EventType._data_placement_restriction_change_policy_validator = DataPlacementRestrictionChangePolicyType_validator EventType._data_placement_restriction_satisfy_policy_validator = DataPlacementRestrictionSatisfyPolicyType_validator EventType._device_approvals_add_exception_validator = DeviceApprovalsAddExceptionType_validator @@ -96534,6 +97467,7 @@ def __repr__(self): EventType._permanent_delete_change_policy_validator = PermanentDeleteChangePolicyType_validator EventType._reseller_support_change_policy_validator = ResellerSupportChangePolicyType_validator EventType._rewind_policy_changed_validator = RewindPolicyChangedType_validator +EventType._send_for_signature_policy_changed_validator = SendForSignaturePolicyChangedType_validator EventType._sharing_change_folder_join_policy_validator = SharingChangeFolderJoinPolicyType_validator EventType._sharing_change_link_policy_validator = SharingChangeLinkPolicyType_validator EventType._sharing_change_member_policy_validator = SharingChangeMemberPolicyType_validator @@ -96780,6 +97714,8 @@ def __repr__(self): 'emm_create_usage_report': EventType._emm_create_usage_report_validator, 'export_members_report': EventType._export_members_report_validator, 'export_members_report_fail': EventType._export_members_report_fail_validator, + 'external_sharing_create_report': EventType._external_sharing_create_report_validator, + 'external_sharing_report_failed': EventType._external_sharing_report_failed_validator, 'no_expiration_link_gen_create_report': EventType._no_expiration_link_gen_create_report_validator, 'no_expiration_link_gen_report_failed': EventType._no_expiration_link_gen_report_failed_validator, 'no_password_link_gen_create_report': EventType._no_password_link_gen_create_report_validator, @@ -96916,6 +97852,7 @@ def __repr__(self): 'allow_download_disabled': EventType._allow_download_disabled_validator, 'allow_download_enabled': EventType._allow_download_enabled_validator, 'camera_uploads_policy_changed': EventType._camera_uploads_policy_changed_validator, + 'content_administration_policy_changed': EventType._content_administration_policy_changed_validator, 'data_placement_restriction_change_policy': EventType._data_placement_restriction_change_policy_validator, 'data_placement_restriction_satisfy_policy': EventType._data_placement_restriction_satisfy_policy_validator, 'device_approvals_add_exception': EventType._device_approvals_add_exception_validator, @@ -96960,6 +97897,7 @@ def __repr__(self): 'permanent_delete_change_policy': EventType._permanent_delete_change_policy_validator, 'reseller_support_change_policy': EventType._reseller_support_change_policy_validator, 'rewind_policy_changed': EventType._rewind_policy_changed_validator, + 'send_for_signature_policy_changed': EventType._send_for_signature_policy_changed_validator, 'sharing_change_folder_join_policy': EventType._sharing_change_folder_join_policy_validator, 'sharing_change_link_policy': EventType._sharing_change_link_policy_validator, 'sharing_change_member_policy': EventType._sharing_change_member_policy_validator, @@ -97209,6 +98147,8 @@ def __repr__(self): EventTypeArg._emm_create_usage_report_validator = bv.Void() EventTypeArg._export_members_report_validator = bv.Void() EventTypeArg._export_members_report_fail_validator = bv.Void() +EventTypeArg._external_sharing_create_report_validator = bv.Void() +EventTypeArg._external_sharing_report_failed_validator = bv.Void() EventTypeArg._no_expiration_link_gen_create_report_validator = bv.Void() EventTypeArg._no_expiration_link_gen_report_failed_validator = bv.Void() EventTypeArg._no_password_link_gen_create_report_validator = bv.Void() @@ -97345,6 +98285,7 @@ def __repr__(self): EventTypeArg._allow_download_disabled_validator = bv.Void() EventTypeArg._allow_download_enabled_validator = bv.Void() EventTypeArg._camera_uploads_policy_changed_validator = bv.Void() +EventTypeArg._content_administration_policy_changed_validator = bv.Void() EventTypeArg._data_placement_restriction_change_policy_validator = bv.Void() EventTypeArg._data_placement_restriction_satisfy_policy_validator = bv.Void() EventTypeArg._device_approvals_add_exception_validator = bv.Void() @@ -97389,6 +98330,7 @@ def __repr__(self): EventTypeArg._permanent_delete_change_policy_validator = bv.Void() EventTypeArg._reseller_support_change_policy_validator = bv.Void() EventTypeArg._rewind_policy_changed_validator = bv.Void() +EventTypeArg._send_for_signature_policy_changed_validator = bv.Void() EventTypeArg._sharing_change_folder_join_policy_validator = bv.Void() EventTypeArg._sharing_change_link_policy_validator = bv.Void() EventTypeArg._sharing_change_member_policy_validator = bv.Void() @@ -97635,6 +98577,8 @@ def __repr__(self): 'emm_create_usage_report': EventTypeArg._emm_create_usage_report_validator, 'export_members_report': EventTypeArg._export_members_report_validator, 'export_members_report_fail': EventTypeArg._export_members_report_fail_validator, + 'external_sharing_create_report': EventTypeArg._external_sharing_create_report_validator, + 'external_sharing_report_failed': EventTypeArg._external_sharing_report_failed_validator, 'no_expiration_link_gen_create_report': EventTypeArg._no_expiration_link_gen_create_report_validator, 'no_expiration_link_gen_report_failed': EventTypeArg._no_expiration_link_gen_report_failed_validator, 'no_password_link_gen_create_report': EventTypeArg._no_password_link_gen_create_report_validator, @@ -97771,6 +98715,7 @@ def __repr__(self): 'allow_download_disabled': EventTypeArg._allow_download_disabled_validator, 'allow_download_enabled': EventTypeArg._allow_download_enabled_validator, 'camera_uploads_policy_changed': EventTypeArg._camera_uploads_policy_changed_validator, + 'content_administration_policy_changed': EventTypeArg._content_administration_policy_changed_validator, 'data_placement_restriction_change_policy': EventTypeArg._data_placement_restriction_change_policy_validator, 'data_placement_restriction_satisfy_policy': EventTypeArg._data_placement_restriction_satisfy_policy_validator, 'device_approvals_add_exception': EventTypeArg._device_approvals_add_exception_validator, @@ -97815,6 +98760,7 @@ def __repr__(self): 'permanent_delete_change_policy': EventTypeArg._permanent_delete_change_policy_validator, 'reseller_support_change_policy': EventTypeArg._reseller_support_change_policy_validator, 'rewind_policy_changed': EventTypeArg._rewind_policy_changed_validator, + 'send_for_signature_policy_changed': EventTypeArg._send_for_signature_policy_changed_validator, 'sharing_change_folder_join_policy': EventTypeArg._sharing_change_folder_join_policy_validator, 'sharing_change_link_policy': EventTypeArg._sharing_change_link_policy_validator, 'sharing_change_member_policy': EventTypeArg._sharing_change_member_policy_validator, @@ -98062,6 +99008,8 @@ def __repr__(self): EventTypeArg.emm_create_usage_report = EventTypeArg('emm_create_usage_report') EventTypeArg.export_members_report = EventTypeArg('export_members_report') EventTypeArg.export_members_report_fail = EventTypeArg('export_members_report_fail') +EventTypeArg.external_sharing_create_report = EventTypeArg('external_sharing_create_report') +EventTypeArg.external_sharing_report_failed = EventTypeArg('external_sharing_report_failed') EventTypeArg.no_expiration_link_gen_create_report = EventTypeArg('no_expiration_link_gen_create_report') EventTypeArg.no_expiration_link_gen_report_failed = EventTypeArg('no_expiration_link_gen_report_failed') EventTypeArg.no_password_link_gen_create_report = EventTypeArg('no_password_link_gen_create_report') @@ -98198,6 +99146,7 @@ def __repr__(self): EventTypeArg.allow_download_disabled = EventTypeArg('allow_download_disabled') EventTypeArg.allow_download_enabled = EventTypeArg('allow_download_enabled') EventTypeArg.camera_uploads_policy_changed = EventTypeArg('camera_uploads_policy_changed') +EventTypeArg.content_administration_policy_changed = EventTypeArg('content_administration_policy_changed') EventTypeArg.data_placement_restriction_change_policy = EventTypeArg('data_placement_restriction_change_policy') EventTypeArg.data_placement_restriction_satisfy_policy = EventTypeArg('data_placement_restriction_satisfy_policy') EventTypeArg.device_approvals_add_exception = EventTypeArg('device_approvals_add_exception') @@ -98242,6 +99191,7 @@ def __repr__(self): EventTypeArg.permanent_delete_change_policy = EventTypeArg('permanent_delete_change_policy') EventTypeArg.reseller_support_change_policy = EventTypeArg('reseller_support_change_policy') EventTypeArg.rewind_policy_changed = EventTypeArg('rewind_policy_changed') +EventTypeArg.send_for_signature_policy_changed = EventTypeArg('send_for_signature_policy_changed') EventTypeArg.sharing_change_folder_join_policy = EventTypeArg('sharing_change_folder_join_policy') EventTypeArg.sharing_change_link_policy = EventTypeArg('sharing_change_link_policy') EventTypeArg.sharing_change_member_policy = EventTypeArg('sharing_change_member_policy') @@ -98355,6 +99305,21 @@ def __repr__(self): ExtendedVersionHistoryPolicy.implicitly_unlimited = ExtendedVersionHistoryPolicy('implicitly_unlimited') ExtendedVersionHistoryPolicy.other = ExtendedVersionHistoryPolicy('other') +ExternalSharingCreateReportDetails._all_field_names_ = set([]) +ExternalSharingCreateReportDetails._all_fields_ = [] + +ExternalSharingCreateReportType._description_validator = bv.String() +ExternalSharingCreateReportType._all_field_names_ = set(['description']) +ExternalSharingCreateReportType._all_fields_ = [('description', ExternalSharingCreateReportType._description_validator)] + +ExternalSharingReportFailedDetails._failure_reason_validator = team.TeamReportFailureReason_validator +ExternalSharingReportFailedDetails._all_field_names_ = set(['failure_reason']) +ExternalSharingReportFailedDetails._all_fields_ = [('failure_reason', ExternalSharingReportFailedDetails._failure_reason_validator)] + +ExternalSharingReportFailedType._description_validator = bv.String() +ExternalSharingReportFailedType._all_field_names_ = set(['description']) +ExternalSharingReportFailedType._all_fields_ = [('description', ExternalSharingReportFailedType._description_validator)] + ExternalUserLogInfo._user_identifier_validator = bv.String() ExternalUserLogInfo._identifier_type_validator = IdentifierType_validator ExternalUserLogInfo._all_field_names_ = set([ @@ -99378,13 +100343,19 @@ def __repr__(self): IntegrationPolicyChangedType._all_fields_ = [('description', IntegrationPolicyChangedType._description_validator)] InviteMethod._invite_link_validator = bv.Void() +InviteMethod._auto_approve_validator = bv.Void() +InviteMethod._moved_from_another_team_validator = bv.Void() InviteMethod._other_validator = bv.Void() InviteMethod._tagmap = { 'invite_link': InviteMethod._invite_link_validator, + 'auto_approve': InviteMethod._auto_approve_validator, + 'moved_from_another_team': InviteMethod._moved_from_another_team_validator, 'other': InviteMethod._other_validator, } InviteMethod.invite_link = InviteMethod('invite_link') +InviteMethod.auto_approve = InviteMethod('auto_approve') +InviteMethod.moved_from_another_team = InviteMethod('moved_from_another_team') InviteMethod.other = InviteMethod('other') JoinTeamDetails._linked_apps_validator = bv.List(UserLinkedAppLogInfo_validator) @@ -99844,15 +100815,21 @@ def __repr__(self): MemberChangeStatusDetails._previous_value_validator = bv.Nullable(MemberStatus_validator) MemberChangeStatusDetails._new_value_validator = MemberStatus_validator MemberChangeStatusDetails._action_validator = bv.Nullable(ActionDetails_validator) +MemberChangeStatusDetails._new_team_validator = bv.Nullable(bv.String()) +MemberChangeStatusDetails._previous_team_validator = bv.Nullable(bv.String()) MemberChangeStatusDetails._all_field_names_ = set([ 'previous_value', 'new_value', 'action', + 'new_team', + 'previous_team', ]) MemberChangeStatusDetails._all_fields_ = [ ('previous_value', MemberChangeStatusDetails._previous_value_validator), ('new_value', MemberChangeStatusDetails._new_value_validator), ('action', MemberChangeStatusDetails._action_validator), + ('new_team', MemberChangeStatusDetails._new_team_validator), + ('previous_team', MemberChangeStatusDetails._previous_team_validator), ] MemberChangeStatusType._description_validator = bv.String() @@ -100070,6 +101047,7 @@ def __repr__(self): MemberStatus._active_validator = bv.Void() MemberStatus._suspended_validator = bv.Void() MemberStatus._removed_validator = bv.Void() +MemberStatus._moved_to_another_team_validator = bv.Void() MemberStatus._other_validator = bv.Void() MemberStatus._tagmap = { 'not_joined': MemberStatus._not_joined_validator, @@ -100077,6 +101055,7 @@ def __repr__(self): 'active': MemberStatus._active_validator, 'suspended': MemberStatus._suspended_validator, 'removed': MemberStatus._removed_validator, + 'moved_to_another_team': MemberStatus._moved_to_another_team_validator, 'other': MemberStatus._other_validator, } @@ -100085,6 +101064,7 @@ def __repr__(self): MemberStatus.active = MemberStatus('active') MemberStatus.suspended = MemberStatus('suspended') MemberStatus.removed = MemberStatus('removed') +MemberStatus.moved_to_another_team = MemberStatus('moved_to_another_team') MemberStatus.other = MemberStatus('other') MemberSuggestDetails._suggested_members_validator = bv.List(EmailAddress_validator) @@ -101433,6 +102413,34 @@ def __repr__(self): SecondaryTeamRequestReminderDetails._all_field_names_ = set(['sent_to']) SecondaryTeamRequestReminderDetails._all_fields_ = [('sent_to', SecondaryTeamRequestReminderDetails._sent_to_validator)] +SendForSignaturePolicy._disabled_validator = bv.Void() +SendForSignaturePolicy._enabled_validator = bv.Void() +SendForSignaturePolicy._other_validator = bv.Void() +SendForSignaturePolicy._tagmap = { + 'disabled': SendForSignaturePolicy._disabled_validator, + 'enabled': SendForSignaturePolicy._enabled_validator, + 'other': SendForSignaturePolicy._other_validator, +} + +SendForSignaturePolicy.disabled = SendForSignaturePolicy('disabled') +SendForSignaturePolicy.enabled = SendForSignaturePolicy('enabled') +SendForSignaturePolicy.other = SendForSignaturePolicy('other') + +SendForSignaturePolicyChangedDetails._new_value_validator = SendForSignaturePolicy_validator +SendForSignaturePolicyChangedDetails._previous_value_validator = SendForSignaturePolicy_validator +SendForSignaturePolicyChangedDetails._all_field_names_ = set([ + 'new_value', + 'previous_value', +]) +SendForSignaturePolicyChangedDetails._all_fields_ = [ + ('new_value', SendForSignaturePolicyChangedDetails._new_value_validator), + ('previous_value', SendForSignaturePolicyChangedDetails._previous_value_validator), +] + +SendForSignaturePolicyChangedType._description_validator = bv.String() +SendForSignaturePolicyChangedType._all_field_names_ = set(['description']) +SendForSignaturePolicyChangedType._all_fields_ = [('description', SendForSignaturePolicyChangedType._description_validator)] + SfAddGroupDetails._target_asset_index_validator = bv.UInt64() SfAddGroupDetails._original_folder_name_validator = bv.String() SfAddGroupDetails._sharing_permission_validator = bv.Nullable(bv.String()) @@ -102347,17 +103355,20 @@ def __repr__(self): SharedLinkViewType._all_field_names_ = set(['description']) SharedLinkViewType._all_fields_ = [('description', SharedLinkViewType._description_validator)] +SharedLinkVisibility._no_one_validator = bv.Void() SharedLinkVisibility._password_validator = bv.Void() SharedLinkVisibility._public_validator = bv.Void() SharedLinkVisibility._team_only_validator = bv.Void() SharedLinkVisibility._other_validator = bv.Void() SharedLinkVisibility._tagmap = { + 'no_one': SharedLinkVisibility._no_one_validator, 'password': SharedLinkVisibility._password_validator, 'public': SharedLinkVisibility._public_validator, 'team_only': SharedLinkVisibility._team_only_validator, 'other': SharedLinkVisibility._other_validator, } +SharedLinkVisibility.no_one = SharedLinkVisibility('no_one') SharedLinkVisibility.password = SharedLinkVisibility('password') SharedLinkVisibility.public = SharedLinkVisibility('public') SharedLinkVisibility.team_only = SharedLinkVisibility('team_only') diff --git a/requirements.txt b/requirements.txt index e793457c..a8710b5c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ six==1.14.0 sphinx twine wheel +stone==1.* diff --git a/spec b/spec index ec2d7022..8eabdf93 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit ec2d7022f4ca2b9735bd93356ae339b36b602637 +Subproject commit 8eabdf930352bcc2d5913765fd62c6f742d7c5bf From 956a5b2e77963069c58dd3b1d14aca496b9f74e2 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Thu, 27 Aug 2020 14:11:53 -0700 Subject: [PATCH 2/2] Remove stone folder --- stone | 1 - 1 file changed, 1 deletion(-) delete mode 160000 stone diff --git a/stone b/stone deleted file mode 160000 index d7a5fe84..00000000 --- a/stone +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d7a5fe8400d83d1ba2aef78c382941809502d9f3