Skip to content

Commit 543507a

Browse files
committed
feat: Add watermarking permissions and sources information (box/box-openapi#579)
1 parent 3849f98 commit 543507a

3 files changed

Lines changed: 43 additions & 7 deletions

File tree

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "3e11b6f", "specHash": "425a724", "version": "10.3.0" }
1+
{ "engineHash": "3e11b6f", "specHash": "4beaa19", "version": "10.3.0" }

box_sdk_gen/schemas/file_full.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
from typing import Optional
2+
13
from box_sdk_gen.internal.base_object import BaseObject
24

35
from enum import Enum
46

5-
from typing import Optional
6-
77
from typing import List
88

99
from box_sdk_gen.schemas.file_base import FileBaseTypeField
@@ -50,6 +50,8 @@ def __init__(
5050
can_upload: bool,
5151
can_view_annotations_all: bool,
5252
can_view_annotations_self: bool,
53+
*,
54+
can_apply_watermark: Optional[bool] = None,
5355
**kwargs
5456
):
5557
"""
@@ -82,6 +84,8 @@ def __init__(
8284
:param can_view_annotations_self: Specifies if the user view annotations placed by themselves
8385
on this file.
8486
:type can_view_annotations_self: bool
87+
:param can_apply_watermark: Specifies if the user can apply a watermark to this file., defaults to None
88+
:type can_apply_watermark: Optional[bool], optional
8589
"""
8690
super().__init__(**kwargs)
8791
self.can_delete = can_delete
@@ -96,6 +100,7 @@ def __init__(
96100
self.can_upload = can_upload
97101
self.can_view_annotations_all = can_view_annotations_all
98102
self.can_view_annotations_self = can_view_annotations_self
103+
self.can_apply_watermark = can_apply_watermark
99104

100105

101106
class FileFullLockTypeField(str, Enum):
@@ -190,13 +195,26 @@ def __init__(
190195

191196

192197
class FileFullWatermarkInfoField(BaseObject):
193-
def __init__(self, *, is_watermarked: Optional[bool] = None, **kwargs):
198+
def __init__(
199+
self,
200+
*,
201+
is_watermarked: Optional[bool] = None,
202+
is_watermark_inherited: Optional[bool] = None,
203+
is_watermarked_by_access_policy: Optional[bool] = None,
204+
**kwargs
205+
):
194206
"""
195207
:param is_watermarked: Specifies if this item has a watermark applied., defaults to None
196208
:type is_watermarked: Optional[bool], optional
209+
:param is_watermark_inherited: Specifies if the watermark is inherited from any parent folder in the hierarchy., defaults to None
210+
:type is_watermark_inherited: Optional[bool], optional
211+
:param is_watermarked_by_access_policy: Specifies if the watermark is enforced by an access policy., defaults to None
212+
:type is_watermarked_by_access_policy: Optional[bool], optional
197213
"""
198214
super().__init__(**kwargs)
199215
self.is_watermarked = is_watermarked
216+
self.is_watermark_inherited = is_watermark_inherited
217+
self.is_watermarked_by_access_policy = is_watermarked_by_access_policy
200218

201219

202220
class FileFullAllowedInviteeRolesField(str, Enum):

box_sdk_gen/schemas/folder_full.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from enum import Enum
22

3-
from box_sdk_gen.internal.base_object import BaseObject
4-
53
from typing import Optional
64

5+
from box_sdk_gen.internal.base_object import BaseObject
6+
77
from typing import List
88

99
from box_sdk_gen.schemas.folder_base import FolderBaseTypeField
@@ -49,6 +49,8 @@ def __init__(
4949
can_set_share_access: bool,
5050
can_share: bool,
5151
can_upload: bool,
52+
*,
53+
can_apply_watermark: Optional[bool] = None,
5254
**kwargs
5355
):
5456
"""
@@ -70,6 +72,8 @@ def __init__(
7072
:type can_share: bool
7173
:param can_upload: Specifies if the user can upload into this folder.
7274
:type can_upload: bool
75+
:param can_apply_watermark: Specifies if the user can apply a watermark to this folder and its contents., defaults to None
76+
:type can_apply_watermark: Optional[bool], optional
7377
"""
7478
super().__init__(**kwargs)
7579
self.can_delete = can_delete
@@ -79,6 +83,7 @@ def __init__(
7983
self.can_set_share_access = can_set_share_access
8084
self.can_share = can_share
8185
self.can_upload = can_upload
86+
self.can_apply_watermark = can_apply_watermark
8287

8388

8489
class FolderFullMetadataField(BaseObject):
@@ -104,13 +109,26 @@ class FolderFullAllowedInviteeRolesField(str, Enum):
104109

105110

106111
class FolderFullWatermarkInfoField(BaseObject):
107-
def __init__(self, *, is_watermarked: Optional[bool] = None, **kwargs):
112+
def __init__(
113+
self,
114+
*,
115+
is_watermarked: Optional[bool] = None,
116+
is_watermark_inherited: Optional[bool] = None,
117+
is_watermarked_by_access_policy: Optional[bool] = None,
118+
**kwargs
119+
):
108120
"""
109121
:param is_watermarked: Specifies if this item has a watermark applied., defaults to None
110122
:type is_watermarked: Optional[bool], optional
123+
:param is_watermark_inherited: Specifies if the watermark is inherited from any parent folder in the hierarchy., defaults to None
124+
:type is_watermark_inherited: Optional[bool], optional
125+
:param is_watermarked_by_access_policy: Specifies if the watermark is enforced by an access policy., defaults to None
126+
:type is_watermarked_by_access_policy: Optional[bool], optional
111127
"""
112128
super().__init__(**kwargs)
113129
self.is_watermarked = is_watermarked
130+
self.is_watermark_inherited = is_watermark_inherited
131+
self.is_watermarked_by_access_policy = is_watermarked_by_access_policy
114132

115133

116134
class FolderFullClassificationField(BaseObject):

0 commit comments

Comments
 (0)