Skip to content

Commit 6a4cd2b

Browse files
committed
fix: correct enum value for legal hold policy changes (box/box-openapi#581)
1 parent 79108c3 commit 6a4cd2b

4 files changed

Lines changed: 15 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": "f9e2519", "specHash": "ad08e8c", "version": "4.3.0" }
1+
{ "engineHash": "f9e2519", "specHash": "f8fb08c", "version": "4.3.0" }

box_sdk_gen/managers/legal_hold_policy_assignments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class CreateLegalHoldPolicyAssignmentAssignToTypeField(str, Enum):
6060
FOLDER = 'folder'
6161
USER = 'user'
6262
OWNERSHIP = 'ownership'
63-
INTERACTION = 'interaction'
63+
INTERACTIONS = 'interactions'
6464

6565

6666
class CreateLegalHoldPolicyAssignmentAssignTo(BaseObject):
@@ -70,7 +70,7 @@ class CreateLegalHoldPolicyAssignmentAssignTo(BaseObject):
7070
'folder',
7171
'user',
7272
'ownership',
73-
'interaction',
73+
'interactions',
7474
}
7575

7676
def __init__(
@@ -179,7 +179,7 @@ def create_legal_hold_policy_assignment(
179179
extra_headers: Optional[Dict[str, Optional[str]]] = None
180180
) -> LegalHoldPolicyAssignment:
181181
"""
182-
Assign a legal hold to a file, file version, folder, or user.
182+
Assign a legal hold to an item type of: file, file version, folder, user, ownership, or interactions.
183183
:param policy_id: The ID of the policy to assign.
184184
:type policy_id: str
185185
:param assign_to: The item to assign the policy to.

box_sdk_gen/schemas/legal_hold_policy.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,31 @@ def __init__(
3030
folder: Optional[int] = None,
3131
file: Optional[int] = None,
3232
file_version: Optional[int] = None,
33+
ownership: Optional[int] = None,
34+
interactions: Optional[int] = None,
3335
**kwargs
3436
):
3537
"""
36-
:param user: The number of users this policy is applied to., defaults to None
38+
:param user: The number of users this policy is applied to with the `access` type assignment., defaults to None
3739
:type user: Optional[int], optional
3840
:param folder: The number of folders this policy is applied to., defaults to None
3941
:type folder: Optional[int], optional
4042
:param file: The number of files this policy is applied to., defaults to None
4143
:type file: Optional[int], optional
4244
:param file_version: The number of file versions this policy is applied to., defaults to None
4345
:type file_version: Optional[int], optional
46+
:param ownership: The number of users this policy is applied to with the `ownership` type assignment., defaults to None
47+
:type ownership: Optional[int], optional
48+
:param interactions: The number of users this policy is applied to with the `interactions` type assignment., defaults to None
49+
:type interactions: Optional[int], optional
4450
"""
4551
super().__init__(**kwargs)
4652
self.user = user
4753
self.folder = folder
4854
self.file = file
4955
self.file_version = file_version
56+
self.ownership = ownership
57+
self.interactions = interactions
5058

5159

5260
class LegalHoldPolicy(LegalHoldPolicyMini):
@@ -84,7 +92,7 @@ def __init__(
8492
of being released.
8593
* 'released' - the policy is no longer active., defaults to None
8694
:type status: Optional[LegalHoldPolicyStatusField], optional
87-
:param assignment_counts: Counts of assignments within this a legal hold policy by item type., defaults to None
95+
:param assignment_counts: Counts of assignments within a legal hold policy by item type., defaults to None
8896
:type assignment_counts: Optional[LegalHoldPolicyAssignmentCountsField], optional
8997
:param created_at: When the legal hold policy object was created., defaults to None
9098
:type created_at: Optional[DateTime], optional

docs/box_sdk_gen/legal_hold_policy_assignments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Returns a list of legal hold policy assignments.
4646

4747
## Assign legal hold policy
4848

49-
Assign a legal hold to a file, file version, folder, or user.
49+
Assign a legal hold to an item type of: file, file version, folder, user, ownership, or interactions.
5050

5151
This operation is performed by calling function `create_legal_hold_policy_assignment`.
5252

0 commit comments

Comments
 (0)