From 250b116f77b8f22351c1e2e0eb625d0d19f86f2c Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 10 Feb 2021 11:16:06 -0800 Subject: [PATCH] Automated Spec Update (#323) 0ba804f8549058d48474fb9f77638a2ee3889993 Change Notes: Files Namespace: - Update ExportInfo struct to include export_options - Update ExportError union to include invalid_export_format - Update ExportArg struct to include export_format - Update ExportMetadata to include paper_revision - Update GetTemporaryLinkError union to include not_allowed - Update Comments Team Log Generated Namespace: - Add RecipicientsConfiguration, ObjectLabelAddedDetails, ObjectLabelRemoveDetails, ObjectLabelUpdatedValueDetails, ObjectLabelAddedType, ObjectLabelRemoved, and ObjectLabelUpdatedValue structs - Add AlertRecipientsSettingType, AdminAlertingAlertSensitivity, and LabelType unions - Update AdminAlertSeverityEnum to include sensitivity_level and recipients_settings - Update PlacementRestriction union to include uk_only - Update EventDetails union to include object_label_added_details, object_label_removed_details and object_label_updated_value_details - Update EventType union to include object_label_added, object_label_removed and object_label_updated_value - Update EventTypeArg union to include object_label_added, object_label_removed, and object_label_updated_value - Update Examples Co-authored-by: DropboxBot --- dropbox/base.py | 66 ++-- dropbox/files.py | 106 +++++- dropbox/team_log.py | 775 +++++++++++++++++++++++++++++++++++++++++++- spec | 2 +- 4 files changed, 908 insertions(+), 41 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index bfc3597e..a660fcdd 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -1372,13 +1372,19 @@ def files_download_zip_to_file(self, return r[0] def files_export(self, - path): + path, + export_format=None): """ Export a file from a user's Dropbox. This route only supports exporting files that cannot be downloaded directly and whose ``ExportResult.file_metadata`` has ``ExportInfo.export_as`` populated. :param str path: The path of the file to be exported. + :param Nullable[str] export_format: The file format to which the file + should be exported. This must be one of the formats listed in the + file's export_options returned by :meth:`files_get_metadata`. If + none is specified, the default format (specified in export_as in + file metadata) will be used. :rtype: (:class:`dropbox.files.ExportResult`, :class:`requests.models.Response`) :raises: :class:`.exceptions.ApiError` @@ -1392,7 +1398,8 @@ def files_export(self, `_ context manager to ensure this. """ - arg = files.ExportArg(path) + arg = files.ExportArg(path, + export_format) r = self.request( files.export, 'files', @@ -1403,7 +1410,8 @@ def files_export(self, def files_export_to_file(self, download_path, - path): + path, + export_format=None): """ Export a file from a user's Dropbox. This route only supports exporting files that cannot be downloaded directly and whose @@ -1411,13 +1419,19 @@ def files_export_to_file(self, :param str download_path: Path on local machine to save file. :param str path: The path of the file to be exported. + :param Nullable[str] export_format: The file format to which the file + should be exported. This must be one of the formats listed in the + file's export_options returned by :meth:`files_get_metadata`. If + none is specified, the default format (specified in export_as in + file metadata) will be used. :rtype: :class:`dropbox.files.ExportResult` :raises: :class:`.exceptions.ApiError` If this raises, ApiError will contain: :class:`dropbox.files.ExportError` """ - arg = files.ExportArg(path) + arg = files.ExportArg(path, + export_format) r = self.request( files.export, 'files', @@ -1647,9 +1661,9 @@ def files_get_thumbnail(self, mode=files.ThumbnailMode.strict): """ Get a thumbnail for an image. This method currently supports files with - the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. - Photos that are larger than 20MB in size won't be converted to a - thumbnail. + the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm + and bmp. Photos that are larger than 20MB in size won't be converted to + a thumbnail. :param str path: The path to the image file you want to thumbnail. :param format: The format for the thumbnail image, jpeg (default) or @@ -1694,9 +1708,9 @@ def files_get_thumbnail_to_file(self, mode=files.ThumbnailMode.strict): """ Get a thumbnail for an image. This method currently supports files with - the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. - Photos that are larger than 20MB in size won't be converted to a - thumbnail. + the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm + and bmp. Photos that are larger than 20MB in size won't be converted to + a thumbnail. :param str download_path: Path on local machine to save file. :param str path: The path to the image file you want to thumbnail. @@ -1734,7 +1748,10 @@ def files_get_thumbnail_v2(self, size=files.ThumbnailSize.w64h64, mode=files.ThumbnailMode.strict): """ - Get a thumbnail for a file. + Get a thumbnail for an image. This method currently supports files with + the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm + and bmp. Photos that are larger than 20MB in size won't be converted to + a thumbnail. :param resource: Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a @@ -1781,7 +1798,10 @@ def files_get_thumbnail_to_file_v2(self, size=files.ThumbnailSize.w64h64, mode=files.ThumbnailMode.strict): """ - Get a thumbnail for a file. + Get a thumbnail for an image. This method currently supports files with + the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm + and bmp. Photos that are larger than 20MB in size won't be converted to + a thumbnail. :param str download_path: Path on local machine to save file. :param resource: Information specifying which file to preview. This @@ -1821,8 +1841,9 @@ def files_get_thumbnail_batch(self, """ Get thumbnails for a list of images. We allow up to 25 thumbnails in a single batch. This method currently supports files with the following - file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are - larger than 20MB in size won't be converted to a thumbnail. + file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. + Photos that are larger than 20MB in size won't be converted to a + thumbnail. :param List[:class:`dropbox.files.ThumbnailArg`] entries: List of files to get thumbnails. @@ -2826,7 +2847,7 @@ def files_upload_session_append(self, :param bytes f: Contents to upload. :param str session_id: The upload session ID (returned by :meth:`files_upload_session_start`). - :param int offset: The amount of data that has been uploaded so far. We + :param int offset: Offset in bytes at which data should be appended. We use this to make sure upload data isn't lost or duplicated in the event of a network error. :rtype: None @@ -2958,15 +2979,14 @@ def files_upload_session_start(self, :meth:`files_upload_session_finish` to save all the data to a file in Dropbox. A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. An - upload session can be used for a maximum of 48 hours. Attempting to use - an ``UploadSessionStartResult.session_id`` with + upload session can be used for a maximum of 7 days. Attempting to use an + ``UploadSessionStartResult.session_id`` with :meth:`files_upload_session_append_v2` or - :meth:`files_upload_session_finish` more than 48 hours after its - creation will return a ``UploadSessionLookupError.not_found``. Calls to - this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls - allowed per month. For more information, see the `Data transport limit - page + :meth:`files_upload_session_finish` more than 7 days after its creation + will return a ``UploadSessionLookupError.not_found``. Calls to this + endpoint will count as data transport calls for any Dropbox Business + teams with a limit on the number of data transport calls allowed per + month. For more information, see the `Data transport limit page `_. By default, upload sessions require you to send content of the file in sequential order via consecutive :meth:`files_upload_session_start`, diff --git a/dropbox/files.py b/dropbox/files.py index c81c6ad4..8b8e472c 100644 --- a/dropbox/files.py +++ b/dropbox/files.py @@ -1785,23 +1785,37 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): class ExportArg(bb.Struct): """ :ivar files.ExportArg.path: The path of the file to be exported. + :ivar files.ExportArg.export_format: The file format to which the file + should be exported. This must be one of the formats listed in the file's + export_options returned by + :meth:`dropbox.dropbox_client.Dropbox.files_get_metadata`. If none is + specified, the default format (specified in export_as in file metadata) + will be used. """ __slots__ = [ '_path_value', + '_export_format_value', ] _has_required_fields = True def __init__(self, - path=None): + path=None, + export_format=None): self._path_value = bb.NOT_SET + self._export_format_value = bb.NOT_SET if path is not None: self.path = path + if export_format is not None: + self.export_format = export_format # Instance attribute type: str (validator is set below) path = bb.Attribute("path") + # Instance attribute type: str (validator is set below) + export_format = bb.Attribute("export_format", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportArg, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -1815,6 +1829,8 @@ class ExportError(bb.Union): :ivar files.ExportError.non_exportable: This file type cannot be exported. Use :meth:`dropbox.dropbox_client.Dropbox.files_download` instead. + :ivar files.ExportError.invalid_export_format: The specified export format + is not a valid option for this file type. :ivar files.ExportError.retry_error: The exportable content is not yet available. Please retry later. """ @@ -1823,6 +1839,8 @@ class ExportError(bb.Union): # Attribute is overwritten below the class definition non_exportable = None # Attribute is overwritten below the class definition + invalid_export_format = None + # Attribute is overwritten below the class definition retry_error = None # Attribute is overwritten below the class definition other = None @@ -1854,6 +1872,14 @@ def is_non_exportable(self): """ return self._tag == 'non_exportable' + def is_invalid_export_format(self): + """ + Check if the union tag is ``invalid_export_format``. + + :rtype: bool + """ + return self._tag == 'invalid_export_format' + def is_retry_error(self): """ Check if the union tag is ``retry_error``. @@ -1891,23 +1917,34 @@ class ExportInfo(bb.Struct): :ivar files.ExportInfo.export_as: Format to which the file can be exported to. + :ivar files.ExportInfo.export_options: Additional formats to which the file + can be exported. These values can be specified as the export_format in + /files/export. """ __slots__ = [ '_export_as_value', + '_export_options_value', ] _has_required_fields = False def __init__(self, - export_as=None): + export_as=None, + export_options=None): self._export_as_value = bb.NOT_SET + self._export_options_value = bb.NOT_SET if export_as is not None: self.export_as = export_as + if export_options is not None: + self.export_options = export_options # Instance attribute type: str (validator is set below) export_as = bb.Attribute("export_as", nullable=True) + # Instance attribute type: list of [str] (validator is set below) + export_options = bb.Attribute("export_options", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportInfo, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -1922,12 +1959,15 @@ class ExportMetadata(bb.Struct): content. This field can be used to verify data integrity. Similar to content hash. For more information see our `Content hash `_ page. + :ivar files.ExportMetadata.paper_revision: If the file is a Paper doc, this + gives the latest doc revision. """ __slots__ = [ '_name_value', '_size_value', '_export_hash_value', + '_paper_revision_value', ] _has_required_fields = True @@ -1935,16 +1975,20 @@ class ExportMetadata(bb.Struct): def __init__(self, name=None, size=None, - export_hash=None): + export_hash=None, + paper_revision=None): self._name_value = bb.NOT_SET self._size_value = bb.NOT_SET self._export_hash_value = bb.NOT_SET + self._paper_revision_value = bb.NOT_SET if name is not None: self.name = name if size is not None: self.size = size if export_hash is not None: self.export_hash = export_hash + if paper_revision is not None: + self.paper_revision = paper_revision # Instance attribute type: str (validator is set below) name = bb.Attribute("name") @@ -1955,6 +1999,9 @@ def __init__(self, # Instance attribute type: str (validator is set below) export_hash = bb.Attribute("export_hash", nullable=True) + # Instance attribute type: int (validator is set below) + paper_revision = bb.Attribute("paper_revision", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(ExportMetadata, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -2864,6 +2911,10 @@ class GetTemporaryLinkError(bb.Union): :ivar files.GetTemporaryLinkError.unsupported_file: Cannot get temporary link to this file type; use :meth:`dropbox.dropbox_client.Dropbox.files_export` instead. + :ivar files.GetTemporaryLinkError.not_allowed: The user is not allowed to + request a temporary link to the specified file. For example, this can + occur if the file is restricted or if the user's links are `banned + `_. """ _catch_all = 'other' @@ -2872,6 +2923,8 @@ class GetTemporaryLinkError(bb.Union): # Attribute is overwritten below the class definition unsupported_file = None # Attribute is overwritten below the class definition + not_allowed = None + # Attribute is overwritten below the class definition other = None @classmethod @@ -2909,6 +2962,14 @@ def is_unsupported_file(self): """ return self._tag == 'unsupported_file' + def is_not_allowed(self): + """ + Check if the union tag is ``not_allowed``. + + :rtype: bool + """ + return self._tag == 'not_allowed' + def is_other(self): """ Check if the union tag is ``other``. @@ -8389,8 +8450,8 @@ class UploadSessionCursor(bb.Struct): """ :ivar files.UploadSessionCursor.session_id: The upload session ID (returned by :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_start`). - :ivar files.UploadSessionCursor.offset: The amount of data that has been - uploaded so far. We use this to make sure upload data isn't lost or + :ivar files.UploadSessionCursor.offset: Offset in bytes at which data should + be appended. We use this to make sure upload data isn't lost or duplicated in the event of a network error. """ @@ -8889,7 +8950,7 @@ class UploadSessionLookupError(bb.Union): corresponding ``get_*`` method. :ivar files.UploadSessionLookupError.not_found: The upload session ID was - not found or has expired. Upload sessions are valid for 48 hours. + not found or has expired. Upload sessions are valid for 7 days. :ivar UploadSessionOffsetError UploadSessionLookupError.incorrect_offset: The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and @@ -9169,7 +9230,7 @@ class UploadSessionType(bb.Union): return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. - :ivar files.UploadSessionType.sequential: Pieces of content are uploaded + :ivar files.UploadSessionType.sequential: Pieces of data are uploaded sequentially one after another. This is the default behavior. :ivar files.UploadSessionType.concurrent: Pieces of data can be uploaded in concurrent RPCs in any order. @@ -9975,40 +10036,60 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): DownloadZipResult._all_fields_ = [('metadata', DownloadZipResult.metadata.validator)] ExportArg.path.validator = ReadPath_validator -ExportArg._all_field_names_ = set(['path']) -ExportArg._all_fields_ = [('path', ExportArg.path.validator)] +ExportArg.export_format.validator = bv.Nullable(bv.String()) +ExportArg._all_field_names_ = set([ + 'path', + 'export_format', +]) +ExportArg._all_fields_ = [ + ('path', ExportArg.path.validator), + ('export_format', ExportArg.export_format.validator), +] ExportError._path_validator = LookupError_validator ExportError._non_exportable_validator = bv.Void() +ExportError._invalid_export_format_validator = bv.Void() ExportError._retry_error_validator = bv.Void() ExportError._other_validator = bv.Void() ExportError._tagmap = { 'path': ExportError._path_validator, 'non_exportable': ExportError._non_exportable_validator, + 'invalid_export_format': ExportError._invalid_export_format_validator, 'retry_error': ExportError._retry_error_validator, 'other': ExportError._other_validator, } ExportError.non_exportable = ExportError('non_exportable') +ExportError.invalid_export_format = ExportError('invalid_export_format') ExportError.retry_error = ExportError('retry_error') ExportError.other = ExportError('other') ExportInfo.export_as.validator = bv.Nullable(bv.String()) -ExportInfo._all_field_names_ = set(['export_as']) -ExportInfo._all_fields_ = [('export_as', ExportInfo.export_as.validator)] +ExportInfo.export_options.validator = bv.Nullable(bv.List(bv.String())) +ExportInfo._all_field_names_ = set([ + 'export_as', + 'export_options', +]) +ExportInfo._all_fields_ = [ + ('export_as', ExportInfo.export_as.validator), + ('export_options', ExportInfo.export_options.validator), +] ExportMetadata.name.validator = bv.String() ExportMetadata.size.validator = bv.UInt64() ExportMetadata.export_hash.validator = bv.Nullable(Sha256HexHash_validator) +ExportMetadata.paper_revision.validator = bv.Nullable(bv.Int64()) ExportMetadata._all_field_names_ = set([ 'name', 'size', 'export_hash', + 'paper_revision', ]) ExportMetadata._all_fields_ = [ ('name', ExportMetadata.name.validator), ('size', ExportMetadata.size.validator), ('export_hash', ExportMetadata.export_hash.validator), + ('paper_revision', ExportMetadata.paper_revision.validator), ] ExportResult.export_metadata.validator = ExportMetadata_validator @@ -10239,16 +10320,19 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetTemporaryLinkError._path_validator = LookupError_validator GetTemporaryLinkError._email_not_verified_validator = bv.Void() GetTemporaryLinkError._unsupported_file_validator = bv.Void() +GetTemporaryLinkError._not_allowed_validator = bv.Void() GetTemporaryLinkError._other_validator = bv.Void() GetTemporaryLinkError._tagmap = { 'path': GetTemporaryLinkError._path_validator, 'email_not_verified': GetTemporaryLinkError._email_not_verified_validator, 'unsupported_file': GetTemporaryLinkError._unsupported_file_validator, + 'not_allowed': GetTemporaryLinkError._not_allowed_validator, 'other': GetTemporaryLinkError._other_validator, } GetTemporaryLinkError.email_not_verified = GetTemporaryLinkError('email_not_verified') GetTemporaryLinkError.unsupported_file = GetTemporaryLinkError('unsupported_file') +GetTemporaryLinkError.not_allowed = GetTemporaryLinkError('not_allowed') GetTemporaryLinkError.other = GetTemporaryLinkError('other') GetTemporaryLinkResult.metadata.validator = FileMetadata_validator diff --git a/dropbox/team_log.py b/dropbox/team_log.py index 73f2267c..7f8e326e 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1237,28 +1237,134 @@ class AdminAlertingAlertConfiguration(bb.Struct): Alert configurations :ivar team_log.AdminAlertingAlertConfiguration.alert_state: Alert state. + :ivar team_log.AdminAlertingAlertConfiguration.sensitivity_level: + Sensitivity level. + :ivar team_log.AdminAlertingAlertConfiguration.recipients_settings: + Recipient settings. """ __slots__ = [ '_alert_state_value', + '_sensitivity_level_value', + '_recipients_settings_value', ] - _has_required_fields = True + _has_required_fields = False def __init__(self, - alert_state=None): + alert_state=None, + sensitivity_level=None, + recipients_settings=None): self._alert_state_value = bb.NOT_SET + self._sensitivity_level_value = bb.NOT_SET + self._recipients_settings_value = bb.NOT_SET if alert_state is not None: self.alert_state = alert_state + if sensitivity_level is not None: + self.sensitivity_level = sensitivity_level + if recipients_settings is not None: + self.recipients_settings = recipients_settings # Instance attribute type: AdminAlertingAlertStatePolicy (validator is set below) - alert_state = bb.Attribute("alert_state", user_defined=True) + alert_state = bb.Attribute("alert_state", nullable=True, user_defined=True) + + # Instance attribute type: AdminAlertingAlertSensitivity (validator is set below) + sensitivity_level = bb.Attribute("sensitivity_level", nullable=True, user_defined=True) + + # Instance attribute type: RecipientsConfiguration (validator is set below) + recipients_settings = bb.Attribute("recipients_settings", nullable=True, user_defined=True) def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminAlertingAlertConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor) AdminAlertingAlertConfiguration_validator = bv.Struct(AdminAlertingAlertConfiguration) +class AdminAlertingAlertSensitivity(bb.Union): + """ + Alert sensitivity + + 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 + high = None + # Attribute is overwritten below the class definition + highest = None + # Attribute is overwritten below the class definition + invalid = None + # Attribute is overwritten below the class definition + low = None + # Attribute is overwritten below the class definition + lowest = None + # Attribute is overwritten below the class definition + medium = None + # Attribute is overwritten below the class definition + other = None + + def is_high(self): + """ + Check if the union tag is ``high``. + + :rtype: bool + """ + return self._tag == 'high' + + def is_highest(self): + """ + Check if the union tag is ``highest``. + + :rtype: bool + """ + return self._tag == 'highest' + + def is_invalid(self): + """ + Check if the union tag is ``invalid``. + + :rtype: bool + """ + return self._tag == 'invalid' + + def is_low(self): + """ + Check if the union tag is ``low``. + + :rtype: bool + """ + return self._tag == 'low' + + def is_lowest(self): + """ + Check if the union tag is ``lowest``. + + :rtype: bool + """ + return self._tag == 'lowest' + + def is_medium(self): + """ + Check if the union tag is ``medium``. + + :rtype: bool + """ + return self._tag == 'medium' + + 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(AdminAlertingAlertSensitivity, self)._process_custom_annotations(annotation_type, field_path, processor) + +AdminAlertingAlertSensitivity_validator = bv.Union(AdminAlertingAlertSensitivity) + class AdminAlertingAlertStatePolicy(bb.Union): """ Policy for controlling whether an alert can be triggered or not @@ -1528,6 +1634,72 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminRole_validator = bv.Union(AdminRole) +class AlertRecipientsSettingType(bb.Union): + """ + Alert recipients setting type + + 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 + custom_list = None + # Attribute is overwritten below the class definition + invalid = None + # Attribute is overwritten below the class definition + none = None + # Attribute is overwritten below the class definition + team_admins = None + # Attribute is overwritten below the class definition + other = None + + def is_custom_list(self): + """ + Check if the union tag is ``custom_list``. + + :rtype: bool + """ + return self._tag == 'custom_list' + + def is_invalid(self): + """ + Check if the union tag is ``invalid``. + + :rtype: bool + """ + return self._tag == 'invalid' + + def is_none(self): + """ + Check if the union tag is ``none``. + + :rtype: bool + """ + return self._tag == 'none' + + def is_team_admins(self): + """ + Check if the union tag is ``team_admins``. + + :rtype: bool + """ + return self._tag == 'team_admins' + + 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(AlertRecipientsSettingType, self)._process_custom_annotations(annotation_type, field_path, processor) + +AlertRecipientsSettingType_validator = bv.Union(AlertRecipientsSettingType) + class AllowDownloadDisabledDetails(bb.Struct): """ Disabled downloads. @@ -7767,6 +7939,39 @@ def folder_overview_item_unpinned_details(cls, val): """ return cls('folder_overview_item_unpinned_details', val) + @classmethod + def object_label_added_details(cls, val): + """ + Create an instance of this class set to the + ``object_label_added_details`` tag with value ``val``. + + :param ObjectLabelAddedDetails val: + :rtype: EventDetails + """ + return cls('object_label_added_details', val) + + @classmethod + def object_label_removed_details(cls, val): + """ + Create an instance of this class set to the + ``object_label_removed_details`` tag with value ``val``. + + :param ObjectLabelRemovedDetails val: + :rtype: EventDetails + """ + return cls('object_label_removed_details', val) + + @classmethod + def object_label_updated_value_details(cls, val): + """ + Create an instance of this class set to the + ``object_label_updated_value_details`` tag with value ``val``. + + :param ObjectLabelUpdatedValueDetails val: + :rtype: EventDetails + """ + return cls('object_label_updated_value_details', val) + @classmethod def rewind_folder_details(cls, val): """ @@ -12572,6 +12777,30 @@ def is_folder_overview_item_unpinned_details(self): """ return self._tag == 'folder_overview_item_unpinned_details' + def is_object_label_added_details(self): + """ + Check if the union tag is ``object_label_added_details``. + + :rtype: bool + """ + return self._tag == 'object_label_added_details' + + def is_object_label_removed_details(self): + """ + Check if the union tag is ``object_label_removed_details``. + + :rtype: bool + """ + return self._tag == 'object_label_removed_details' + + def is_object_label_updated_value_details(self): + """ + Check if the union tag is ``object_label_updated_value_details``. + + :rtype: bool + """ + return self._tag == 'object_label_updated_value_details' + def is_rewind_folder_details(self): """ Check if the union tag is ``rewind_folder_details``. @@ -16400,6 +16629,36 @@ def get_folder_overview_item_unpinned_details(self): raise AttributeError("tag 'folder_overview_item_unpinned_details' not set") return self._value + def get_object_label_added_details(self): + """ + Only call this if :meth:`is_object_label_added_details` is true. + + :rtype: ObjectLabelAddedDetails + """ + if not self.is_object_label_added_details(): + raise AttributeError("tag 'object_label_added_details' not set") + return self._value + + def get_object_label_removed_details(self): + """ + Only call this if :meth:`is_object_label_removed_details` is true. + + :rtype: ObjectLabelRemovedDetails + """ + if not self.is_object_label_removed_details(): + raise AttributeError("tag 'object_label_removed_details' not set") + return self._value + + def get_object_label_updated_value_details(self): + """ + Only call this if :meth:`is_object_label_updated_value_details` is true. + + :rtype: ObjectLabelUpdatedValueDetails + """ + if not self.is_object_label_updated_value_details(): + raise AttributeError("tag 'object_label_updated_value_details' not set") + return self._value + def get_rewind_folder_details(self): """ Only call this if :meth:`is_rewind_folder_details` is true. @@ -20318,6 +20577,12 @@ class EventType(bb.Union): :ivar FolderOverviewItemUnpinnedType EventType.folder_overview_item_unpinned: (file_operations) Unpinned item from folder overview + :ivar ObjectLabelAddedType EventType.object_label_added: (file_operations) + Added a label + :ivar ObjectLabelRemovedType EventType.object_label_removed: + (file_operations) Removed a label + :ivar ObjectLabelUpdatedValueType EventType.object_label_updated_value: + (file_operations) Updated a label's value :ivar RewindFolderType EventType.rewind_folder: (file_operations) Rewound a folder :ivar FileRequestChangeType EventType.file_request_change: (file_requests) @@ -22173,6 +22438,39 @@ def folder_overview_item_unpinned(cls, val): """ return cls('folder_overview_item_unpinned', val) + @classmethod + def object_label_added(cls, val): + """ + Create an instance of this class set to the ``object_label_added`` tag + with value ``val``. + + :param ObjectLabelAddedType val: + :rtype: EventType + """ + return cls('object_label_added', val) + + @classmethod + def object_label_removed(cls, val): + """ + Create an instance of this class set to the ``object_label_removed`` tag + with value ``val``. + + :param ObjectLabelRemovedType val: + :rtype: EventType + """ + return cls('object_label_removed', val) + + @classmethod + def object_label_updated_value(cls, val): + """ + Create an instance of this class set to the + ``object_label_updated_value`` tag with value ``val``. + + :param ObjectLabelUpdatedValueType val: + :rtype: EventType + """ + return cls('object_label_updated_value', val) + @classmethod def rewind_folder(cls, val): """ @@ -26934,6 +27232,30 @@ def is_folder_overview_item_unpinned(self): """ return self._tag == 'folder_overview_item_unpinned' + def is_object_label_added(self): + """ + Check if the union tag is ``object_label_added``. + + :rtype: bool + """ + return self._tag == 'object_label_added' + + def is_object_label_removed(self): + """ + Check if the union tag is ``object_label_removed``. + + :rtype: bool + """ + return self._tag == 'object_label_removed' + + def is_object_label_updated_value(self): + """ + Check if the union tag is ``object_label_updated_value``. + + :rtype: bool + """ + return self._tag == 'object_label_updated_value' + def is_rewind_folder(self): """ Check if the union tag is ``rewind_folder``. @@ -30931,6 +31253,42 @@ def get_folder_overview_item_unpinned(self): raise AttributeError("tag 'folder_overview_item_unpinned' not set") return self._value + def get_object_label_added(self): + """ + (file_operations) Added a label + + Only call this if :meth:`is_object_label_added` is true. + + :rtype: ObjectLabelAddedType + """ + if not self.is_object_label_added(): + raise AttributeError("tag 'object_label_added' not set") + return self._value + + def get_object_label_removed(self): + """ + (file_operations) Removed a label + + Only call this if :meth:`is_object_label_removed` is true. + + :rtype: ObjectLabelRemovedType + """ + if not self.is_object_label_removed(): + raise AttributeError("tag 'object_label_removed' not set") + return self._value + + def get_object_label_updated_value(self): + """ + (file_operations) Updated a label's value + + Only call this if :meth:`is_object_label_updated_value` is true. + + :rtype: ObjectLabelUpdatedValueType + """ + if not self.is_object_label_updated_value(): + raise AttributeError("tag 'object_label_updated_value' not set") + return self._value + def get_rewind_folder(self): """ (file_operations) Rewound a folder @@ -35614,6 +35972,12 @@ class EventTypeArg(bb.Union): Pinned item to folder overview :ivar team_log.EventTypeArg.folder_overview_item_unpinned: (file_operations) Unpinned item from folder overview + :ivar team_log.EventTypeArg.object_label_added: (file_operations) Added a + label + :ivar team_log.EventTypeArg.object_label_removed: (file_operations) Removed + a label + :ivar team_log.EventTypeArg.object_label_updated_value: (file_operations) + Updated a label's value :ivar team_log.EventTypeArg.rewind_folder: (file_operations) Rewound a folder :ivar team_log.EventTypeArg.file_request_change: (file_requests) Changed @@ -36562,6 +36926,12 @@ class EventTypeArg(bb.Union): # Attribute is overwritten below the class definition folder_overview_item_unpinned = None # Attribute is overwritten below the class definition + object_label_added = None + # Attribute is overwritten below the class definition + object_label_removed = None + # Attribute is overwritten below the class definition + object_label_updated_value = None + # Attribute is overwritten below the class definition rewind_folder = None # Attribute is overwritten below the class definition file_request_change = None @@ -37990,6 +38360,30 @@ def is_folder_overview_item_unpinned(self): """ return self._tag == 'folder_overview_item_unpinned' + def is_object_label_added(self): + """ + Check if the union tag is ``object_label_added``. + + :rtype: bool + """ + return self._tag == 'object_label_added' + + def is_object_label_removed(self): + """ + Check if the union tag is ``object_label_removed``. + + :rtype: bool + """ + return self._tag == 'object_label_removed' + + def is_object_label_updated_value(self): + """ + Check if the union tag is ``object_label_updated_value``. + + :rtype: bool + """ + return self._tag == 'object_label_updated_value' + def is_rewind_folder(self): """ Check if the union tag is ``rewind_folder``. @@ -47041,6 +47435,42 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): JoinTeamDetails_validator = bv.Struct(JoinTeamDetails) +class LabelType(bb.Union): + """ + Label type + + 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 + personal_information = None + # Attribute is overwritten below the class definition + other = None + + def is_personal_information(self): + """ + Check if the union tag is ``personal_information``. + + :rtype: bool + """ + return self._tag == 'personal_information' + + 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(LabelType, self)._process_custom_annotations(annotation_type, field_path, processor) + +LabelType_validator = bv.Union(LabelType) + class LegacyDeviceSessionLogInfo(DeviceSessionLogInfo): """ Information on sessions, in legacy format @@ -51144,6 +51574,156 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): NoteSharedType_validator = bv.Struct(NoteSharedType) +class ObjectLabelAddedDetails(bb.Struct): + """ + Added a label. + + :ivar team_log.ObjectLabelAddedDetails.label_type: Labels mark a file or + folder. + """ + + __slots__ = [ + '_label_type_value', + ] + + _has_required_fields = True + + def __init__(self, + label_type=None): + self._label_type_value = bb.NOT_SET + if label_type is not None: + self.label_type = label_type + + # Instance attribute type: LabelType (validator is set below) + label_type = bb.Attribute("label_type", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelAddedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelAddedDetails_validator = bv.Struct(ObjectLabelAddedDetails) + +class ObjectLabelAddedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelAddedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelAddedType_validator = bv.Struct(ObjectLabelAddedType) + +class ObjectLabelRemovedDetails(bb.Struct): + """ + Removed a label. + + :ivar team_log.ObjectLabelRemovedDetails.label_type: Labels mark a file or + folder. + """ + + __slots__ = [ + '_label_type_value', + ] + + _has_required_fields = True + + def __init__(self, + label_type=None): + self._label_type_value = bb.NOT_SET + if label_type is not None: + self.label_type = label_type + + # Instance attribute type: LabelType (validator is set below) + label_type = bb.Attribute("label_type", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelRemovedDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelRemovedDetails_validator = bv.Struct(ObjectLabelRemovedDetails) + +class ObjectLabelRemovedType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelRemovedType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelRemovedType_validator = bv.Struct(ObjectLabelRemovedType) + +class ObjectLabelUpdatedValueDetails(bb.Struct): + """ + Updated a label's value. + + :ivar team_log.ObjectLabelUpdatedValueDetails.label_type: Labels mark a file + or folder. + """ + + __slots__ = [ + '_label_type_value', + ] + + _has_required_fields = True + + def __init__(self, + label_type=None): + self._label_type_value = bb.NOT_SET + if label_type is not None: + self.label_type = label_type + + # Instance attribute type: LabelType (validator is set below) + label_type = bb.Attribute("label_type", user_defined=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelUpdatedValueDetails, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelUpdatedValueDetails_validator = bv.Struct(ObjectLabelUpdatedValueDetails) + +class ObjectLabelUpdatedValueType(bb.Struct): + + __slots__ = [ + '_description_value', + ] + + _has_required_fields = True + + def __init__(self, + description=None): + self._description_value = bb.NOT_SET + if description is not None: + self.description = description + + # Instance attribute type: str (validator is set below) + description = bb.Attribute("description") + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(ObjectLabelUpdatedValueType, self)._process_custom_annotations(annotation_type, field_path, processor) + +ObjectLabelUpdatedValueType_validator = bv.Struct(ObjectLabelUpdatedValueType) + class OpenNoteSharedDetails(bb.Struct): """ Opened shared Paper doc. @@ -54940,6 +55520,8 @@ class PlacementRestriction(bb.Union): # Attribute is overwritten below the class definition none = None # Attribute is overwritten below the class definition + uk_only = None + # Attribute is overwritten below the class definition other = None def is_australia_only(self): @@ -54974,6 +55556,14 @@ def is_none(self): """ return self._tag == 'none' + def is_uk_only(self): + """ + Check if the union tag is ``uk_only``. + + :rtype: bool + """ + return self._tag == 'uk_only' + def is_other(self): """ Check if the union tag is ``other``. @@ -55269,6 +55859,53 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): QuickActionType_validator = bv.Union(QuickActionType) +class RecipientsConfiguration(bb.Struct): + """ + Recipients Configuration + + :ivar team_log.RecipientsConfiguration.recipient_setting_type: Recipients + setting type. + :ivar team_log.RecipientsConfiguration.emails: A list of user emails to + notify. + :ivar team_log.RecipientsConfiguration.groups: A list of groups to notify. + """ + + __slots__ = [ + '_recipient_setting_type_value', + '_emails_value', + '_groups_value', + ] + + _has_required_fields = False + + def __init__(self, + recipient_setting_type=None, + emails=None, + groups=None): + self._recipient_setting_type_value = bb.NOT_SET + self._emails_value = bb.NOT_SET + self._groups_value = bb.NOT_SET + if recipient_setting_type is not None: + self.recipient_setting_type = recipient_setting_type + if emails is not None: + self.emails = emails + if groups is not None: + self.groups = groups + + # Instance attribute type: AlertRecipientsSettingType (validator is set below) + recipient_setting_type = bb.Attribute("recipient_setting_type", nullable=True, user_defined=True) + + # Instance attribute type: list of [str] (validator is set below) + emails = bb.Attribute("emails", nullable=True) + + # Instance attribute type: list of [str] (validator is set below) + groups = bb.Attribute("groups", nullable=True) + + def _process_custom_annotations(self, annotation_type, field_path, processor): + super(RecipientsConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor) + +RecipientsConfiguration_validator = bv.Struct(RecipientsConfiguration) + class RelocateAssetReferencesLogInfo(bb.Struct): """ Provides the indices of the source asset and the destination asset for a @@ -68416,9 +69053,44 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertSeverityEnum.na = AdminAlertSeverityEnum('na') AdminAlertSeverityEnum.other = AdminAlertSeverityEnum('other') -AdminAlertingAlertConfiguration.alert_state.validator = AdminAlertingAlertStatePolicy_validator -AdminAlertingAlertConfiguration._all_field_names_ = set(['alert_state']) -AdminAlertingAlertConfiguration._all_fields_ = [('alert_state', AdminAlertingAlertConfiguration.alert_state.validator)] +AdminAlertingAlertConfiguration.alert_state.validator = bv.Nullable(AdminAlertingAlertStatePolicy_validator) +AdminAlertingAlertConfiguration.sensitivity_level.validator = bv.Nullable(AdminAlertingAlertSensitivity_validator) +AdminAlertingAlertConfiguration.recipients_settings.validator = bv.Nullable(RecipientsConfiguration_validator) +AdminAlertingAlertConfiguration._all_field_names_ = set([ + 'alert_state', + 'sensitivity_level', + 'recipients_settings', +]) +AdminAlertingAlertConfiguration._all_fields_ = [ + ('alert_state', AdminAlertingAlertConfiguration.alert_state.validator), + ('sensitivity_level', AdminAlertingAlertConfiguration.sensitivity_level.validator), + ('recipients_settings', AdminAlertingAlertConfiguration.recipients_settings.validator), +] + +AdminAlertingAlertSensitivity._high_validator = bv.Void() +AdminAlertingAlertSensitivity._highest_validator = bv.Void() +AdminAlertingAlertSensitivity._invalid_validator = bv.Void() +AdminAlertingAlertSensitivity._low_validator = bv.Void() +AdminAlertingAlertSensitivity._lowest_validator = bv.Void() +AdminAlertingAlertSensitivity._medium_validator = bv.Void() +AdminAlertingAlertSensitivity._other_validator = bv.Void() +AdminAlertingAlertSensitivity._tagmap = { + 'high': AdminAlertingAlertSensitivity._high_validator, + 'highest': AdminAlertingAlertSensitivity._highest_validator, + 'invalid': AdminAlertingAlertSensitivity._invalid_validator, + 'low': AdminAlertingAlertSensitivity._low_validator, + 'lowest': AdminAlertingAlertSensitivity._lowest_validator, + 'medium': AdminAlertingAlertSensitivity._medium_validator, + 'other': AdminAlertingAlertSensitivity._other_validator, +} + +AdminAlertingAlertSensitivity.high = AdminAlertingAlertSensitivity('high') +AdminAlertingAlertSensitivity.highest = AdminAlertingAlertSensitivity('highest') +AdminAlertingAlertSensitivity.invalid = AdminAlertingAlertSensitivity('invalid') +AdminAlertingAlertSensitivity.low = AdminAlertingAlertSensitivity('low') +AdminAlertingAlertSensitivity.lowest = AdminAlertingAlertSensitivity('lowest') +AdminAlertingAlertSensitivity.medium = AdminAlertingAlertSensitivity('medium') +AdminAlertingAlertSensitivity.other = AdminAlertingAlertSensitivity('other') AdminAlertingAlertStatePolicy._off_validator = bv.Void() AdminAlertingAlertStatePolicy._on_validator = bv.Void() @@ -68494,6 +69166,25 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminRole.user_management_admin = AdminRole('user_management_admin') AdminRole.other = AdminRole('other') +AlertRecipientsSettingType._custom_list_validator = bv.Void() +AlertRecipientsSettingType._invalid_validator = bv.Void() +AlertRecipientsSettingType._none_validator = bv.Void() +AlertRecipientsSettingType._team_admins_validator = bv.Void() +AlertRecipientsSettingType._other_validator = bv.Void() +AlertRecipientsSettingType._tagmap = { + 'custom_list': AlertRecipientsSettingType._custom_list_validator, + 'invalid': AlertRecipientsSettingType._invalid_validator, + 'none': AlertRecipientsSettingType._none_validator, + 'team_admins': AlertRecipientsSettingType._team_admins_validator, + 'other': AlertRecipientsSettingType._other_validator, +} + +AlertRecipientsSettingType.custom_list = AlertRecipientsSettingType('custom_list') +AlertRecipientsSettingType.invalid = AlertRecipientsSettingType('invalid') +AlertRecipientsSettingType.none = AlertRecipientsSettingType('none') +AlertRecipientsSettingType.team_admins = AlertRecipientsSettingType('team_admins') +AlertRecipientsSettingType.other = AlertRecipientsSettingType('other') + AllowDownloadDisabledDetails._all_field_names_ = set([]) AllowDownloadDisabledDetails._all_fields_ = [] @@ -69780,6 +70471,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventDetails._folder_overview_description_changed_details_validator = FolderOverviewDescriptionChangedDetails_validator EventDetails._folder_overview_item_pinned_details_validator = FolderOverviewItemPinnedDetails_validator EventDetails._folder_overview_item_unpinned_details_validator = FolderOverviewItemUnpinnedDetails_validator +EventDetails._object_label_added_details_validator = ObjectLabelAddedDetails_validator +EventDetails._object_label_removed_details_validator = ObjectLabelRemovedDetails_validator +EventDetails._object_label_updated_value_details_validator = ObjectLabelUpdatedValueDetails_validator EventDetails._rewind_folder_details_validator = RewindFolderDetails_validator EventDetails._file_request_change_details_validator = FileRequestChangeDetails_validator EventDetails._file_request_close_details_validator = FileRequestCloseDetails_validator @@ -70238,6 +70932,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'folder_overview_description_changed_details': EventDetails._folder_overview_description_changed_details_validator, 'folder_overview_item_pinned_details': EventDetails._folder_overview_item_pinned_details_validator, 'folder_overview_item_unpinned_details': EventDetails._folder_overview_item_unpinned_details_validator, + 'object_label_added_details': EventDetails._object_label_added_details_validator, + 'object_label_removed_details': EventDetails._object_label_removed_details_validator, + 'object_label_updated_value_details': EventDetails._object_label_updated_value_details_validator, 'rewind_folder_details': EventDetails._rewind_folder_details_validator, 'file_request_change_details': EventDetails._file_request_change_details_validator, 'file_request_close_details': EventDetails._file_request_close_details_validator, @@ -70699,6 +71396,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventType._folder_overview_description_changed_validator = FolderOverviewDescriptionChangedType_validator EventType._folder_overview_item_pinned_validator = FolderOverviewItemPinnedType_validator EventType._folder_overview_item_unpinned_validator = FolderOverviewItemUnpinnedType_validator +EventType._object_label_added_validator = ObjectLabelAddedType_validator +EventType._object_label_removed_validator = ObjectLabelRemovedType_validator +EventType._object_label_updated_value_validator = ObjectLabelUpdatedValueType_validator EventType._rewind_folder_validator = RewindFolderType_validator EventType._file_request_change_validator = FileRequestChangeType_validator EventType._file_request_close_validator = FileRequestCloseType_validator @@ -71156,6 +71856,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'folder_overview_description_changed': EventType._folder_overview_description_changed_validator, 'folder_overview_item_pinned': EventType._folder_overview_item_pinned_validator, 'folder_overview_item_unpinned': EventType._folder_overview_item_unpinned_validator, + 'object_label_added': EventType._object_label_added_validator, + 'object_label_removed': EventType._object_label_removed_validator, + 'object_label_updated_value': EventType._object_label_updated_value_validator, 'rewind_folder': EventType._rewind_folder_validator, 'file_request_change': EventType._file_request_change_validator, 'file_request_close': EventType._file_request_close_validator, @@ -71616,6 +72319,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg._folder_overview_description_changed_validator = bv.Void() EventTypeArg._folder_overview_item_pinned_validator = bv.Void() EventTypeArg._folder_overview_item_unpinned_validator = bv.Void() +EventTypeArg._object_label_added_validator = bv.Void() +EventTypeArg._object_label_removed_validator = bv.Void() +EventTypeArg._object_label_updated_value_validator = bv.Void() EventTypeArg._rewind_folder_validator = bv.Void() EventTypeArg._file_request_change_validator = bv.Void() EventTypeArg._file_request_close_validator = bv.Void() @@ -72073,6 +72779,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'folder_overview_description_changed': EventTypeArg._folder_overview_description_changed_validator, 'folder_overview_item_pinned': EventTypeArg._folder_overview_item_pinned_validator, 'folder_overview_item_unpinned': EventTypeArg._folder_overview_item_unpinned_validator, + 'object_label_added': EventTypeArg._object_label_added_validator, + 'object_label_removed': EventTypeArg._object_label_removed_validator, + 'object_label_updated_value': EventTypeArg._object_label_updated_value_validator, 'rewind_folder': EventTypeArg._rewind_folder_validator, 'file_request_change': EventTypeArg._file_request_change_validator, 'file_request_close': EventTypeArg._file_request_close_validator, @@ -72531,6 +73240,9 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): EventTypeArg.folder_overview_description_changed = EventTypeArg('folder_overview_description_changed') EventTypeArg.folder_overview_item_pinned = EventTypeArg('folder_overview_item_pinned') EventTypeArg.folder_overview_item_unpinned = EventTypeArg('folder_overview_item_unpinned') +EventTypeArg.object_label_added = EventTypeArg('object_label_added') +EventTypeArg.object_label_removed = EventTypeArg('object_label_removed') +EventTypeArg.object_label_updated_value = EventTypeArg('object_label_updated_value') EventTypeArg.rewind_folder = EventTypeArg('rewind_folder') EventTypeArg.file_request_change = EventTypeArg('file_request_change') EventTypeArg.file_request_close = EventTypeArg('file_request_close') @@ -74285,6 +74997,16 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): ('has_linked_shared_folders', JoinTeamDetails.has_linked_shared_folders.validator), ] +LabelType._personal_information_validator = bv.Void() +LabelType._other_validator = bv.Void() +LabelType._tagmap = { + 'personal_information': LabelType._personal_information_validator, + 'other': LabelType._other_validator, +} + +LabelType.personal_information = LabelType('personal_information') +LabelType.other = LabelType('other') + LegacyDeviceSessionLogInfo.session_info.validator = bv.Nullable(SessionLogInfo_validator) LegacyDeviceSessionLogInfo.display_name.validator = bv.Nullable(bv.String()) LegacyDeviceSessionLogInfo.is_emm_managed.validator = bv.Nullable(bv.Boolean()) @@ -75266,6 +75988,30 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): NoteSharedType._all_field_names_ = set(['description']) NoteSharedType._all_fields_ = [('description', NoteSharedType.description.validator)] +ObjectLabelAddedDetails.label_type.validator = LabelType_validator +ObjectLabelAddedDetails._all_field_names_ = set(['label_type']) +ObjectLabelAddedDetails._all_fields_ = [('label_type', ObjectLabelAddedDetails.label_type.validator)] + +ObjectLabelAddedType.description.validator = bv.String() +ObjectLabelAddedType._all_field_names_ = set(['description']) +ObjectLabelAddedType._all_fields_ = [('description', ObjectLabelAddedType.description.validator)] + +ObjectLabelRemovedDetails.label_type.validator = LabelType_validator +ObjectLabelRemovedDetails._all_field_names_ = set(['label_type']) +ObjectLabelRemovedDetails._all_fields_ = [('label_type', ObjectLabelRemovedDetails.label_type.validator)] + +ObjectLabelRemovedType.description.validator = bv.String() +ObjectLabelRemovedType._all_field_names_ = set(['description']) +ObjectLabelRemovedType._all_fields_ = [('description', ObjectLabelRemovedType.description.validator)] + +ObjectLabelUpdatedValueDetails.label_type.validator = LabelType_validator +ObjectLabelUpdatedValueDetails._all_field_names_ = set(['label_type']) +ObjectLabelUpdatedValueDetails._all_fields_ = [('label_type', ObjectLabelUpdatedValueDetails.label_type.validator)] + +ObjectLabelUpdatedValueType.description.validator = bv.String() +ObjectLabelUpdatedValueType._all_field_names_ = set(['description']) +ObjectLabelUpdatedValueType._all_fields_ = [('description', ObjectLabelUpdatedValueType.description.validator)] + OpenNoteSharedDetails._all_field_names_ = set([]) OpenNoteSharedDetails._all_fields_ = [] @@ -76066,12 +76812,14 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PlacementRestriction._europe_only_validator = bv.Void() PlacementRestriction._japan_only_validator = bv.Void() PlacementRestriction._none_validator = bv.Void() +PlacementRestriction._uk_only_validator = bv.Void() PlacementRestriction._other_validator = bv.Void() PlacementRestriction._tagmap = { 'australia_only': PlacementRestriction._australia_only_validator, 'europe_only': PlacementRestriction._europe_only_validator, 'japan_only': PlacementRestriction._japan_only_validator, 'none': PlacementRestriction._none_validator, + 'uk_only': PlacementRestriction._uk_only_validator, 'other': PlacementRestriction._other_validator, } @@ -76079,6 +76827,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PlacementRestriction.europe_only = PlacementRestriction('europe_only') PlacementRestriction.japan_only = PlacementRestriction('japan_only') PlacementRestriction.none = PlacementRestriction('none') +PlacementRestriction.uk_only = PlacementRestriction('uk_only') PlacementRestriction.other = PlacementRestriction('other') PolicyType._disposition_validator = bv.Void() @@ -76163,6 +76912,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): QuickActionType.unlink_session = QuickActionType('unlink_session') QuickActionType.other = QuickActionType('other') +RecipientsConfiguration.recipient_setting_type.validator = bv.Nullable(AlertRecipientsSettingType_validator) +RecipientsConfiguration.emails.validator = bv.Nullable(bv.List(EmailAddress_validator)) +RecipientsConfiguration.groups.validator = bv.Nullable(bv.List(bv.String())) +RecipientsConfiguration._all_field_names_ = set([ + 'recipient_setting_type', + 'emails', + 'groups', +]) +RecipientsConfiguration._all_fields_ = [ + ('recipient_setting_type', RecipientsConfiguration.recipient_setting_type.validator), + ('emails', RecipientsConfiguration.emails.validator), + ('groups', RecipientsConfiguration.groups.validator), +] + RelocateAssetReferencesLogInfo.src_asset_index.validator = bv.UInt64() RelocateAssetReferencesLogInfo.dest_asset_index.validator = bv.UInt64() RelocateAssetReferencesLogInfo._all_field_names_ = set([ diff --git a/spec b/spec index cce31b9a..0ba804f8 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit cce31b9a2e810b260c4f9fa6250030d00e968533 +Subproject commit 0ba804f8549058d48474fb9f77638a2ee3889993