From d18abf31fd6c476468724c13530e73900224d942 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 28 Oct 2026 06:49:10 -0700 Subject: [PATCH 1/5] chore: Update `.codegen.json` with commit hash of `codegen` and `openapi` spec [skip ci] --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 0e0c5ce9..dfbb3166 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "d55532c", "specHash": "e21eebc", "version": "4.19.0" } +{ "engineHash": "4c5a50b", "specHash": "e21eebc", "version": "4.19.0" } From 970f82d7748ec8b14953f252dfe73cbccf8ac1d2 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 28 Oct 2026 06:50:38 -0700 Subject: [PATCH 2/5] feat: add one-time passcode documentation (box/box-openapi#621) --- .codegen.json | 2 +- box_sdk_gen/client.py | 5 + box_sdk_gen/managers/__init__.py | 2 + box_sdk_gen/managers/document_split.py | 272 ++++++++++++++++++ box_sdk_gen/managers/files.py | 12 + box_sdk_gen/managers/folders.py | 12 + box_sdk_gen/managers/shared_links_files.py | 14 + box_sdk_gen/managers/shared_links_folders.py | 14 + .../managers/shared_links_web_links.py | 14 + box_sdk_gen/managers/users.py | 23 +- box_sdk_gen/managers/web_links.py | 12 + box_sdk_gen/schemas/__init__.py | 24 +- box_sdk_gen/schemas/file.py | 45 +++ box_sdk_gen/schemas/folder.py | 45 +++ box_sdk_gen/schemas/keyword_skill_card.py | 2 +- .../shared_link_otp_allowlist_entry.py | 47 +++ ...hared_link_otp_allowlist_entry_writable.py | 34 +++ .../schemas/shared_link_otp_writable.py | 15 + .../shared_link_otp_writable_allowlist.py | 40 +++ .../schemas/shared_link_otp_writable_none.py | 24 ++ .../schemas/shared_link_otp_writable_open.py | 25 ++ box_sdk_gen/schemas/transcript_skill_card.py | 2 +- box_sdk_gen/schemas/upload_session.py | 4 +- box_sdk_gen/schemas/v2026_r0/__init__.py | 36 +++ .../v2026_r0/document_failures_v2026_r0.py | 18 ++ ...nt_split_create_request_manual_v2026_r0.py | 46 +++ ..._create_request_page_selection_v2026_r0.py | 45 +++ ...ent_split_create_request_smart_v2026_r0.py | 28 ++ ...ment_split_create_request_type_v2026_r0.py | 21 ++ .../document_split_create_request_v2026_r0.py | 63 ++++ ...document_split_create_response_v2026_r0.py | 30 ++ .../document_split_failures_v2026_r0.py | 18 ++ .../document_split_output_v2026_r0.py | 37 +++ .../document_split_page_range_v2026_r0.py | 16 ++ ...ment_split_page_selection_item_v2026_r0.py | 40 +++ ...plit_page_selection_page_range_v2026_r0.py | 34 +++ ...t_split_page_selection_segment_v2026_r0.py | 16 ++ ...lit_page_selection_single_page_v2026_r0.py | 30 ++ .../v2026_r0/document_split_v2026_r0.py | 124 ++++++++ .../v2026_r0/document_splits_v2026_r0.py | 34 +++ .../v2026_r0/enterprise_reference_v2026_r0.py | 30 ++ .../v2026_r0/file_reference_v2026_r0.py | 30 ++ box_sdk_gen/schemas/web_link.py | 45 +++ docs/box_sdk_gen/README.md | 1 + docs/box_sdk_gen/document_split.md | 109 +++++++ docs/box_sdk_gen/users.md | 8 +- 46 files changed, 1535 insertions(+), 13 deletions(-) create mode 100644 box_sdk_gen/managers/document_split.py create mode 100644 box_sdk_gen/schemas/shared_link_otp_allowlist_entry.py create mode 100644 box_sdk_gen/schemas/shared_link_otp_allowlist_entry_writable.py create mode 100644 box_sdk_gen/schemas/shared_link_otp_writable.py create mode 100644 box_sdk_gen/schemas/shared_link_otp_writable_allowlist.py create mode 100644 box_sdk_gen/schemas/shared_link_otp_writable_none.py create mode 100644 box_sdk_gen/schemas/shared_link_otp_writable_open.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_failures_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_create_request_manual_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_create_request_page_selection_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_create_request_smart_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_create_request_type_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_create_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_create_response_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_failures_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_output_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_page_range_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_page_selection_item_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_page_selection_page_range_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_page_selection_segment_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_page_selection_single_page_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_split_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/document_splits_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/enterprise_reference_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/file_reference_v2026_r0.py create mode 100644 docs/box_sdk_gen/document_split.md diff --git a/.codegen.json b/.codegen.json index dfbb3166..dc0a9908 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "4c5a50b", "specHash": "e21eebc", "version": "4.19.0" } +{ "engineHash": "4c5a50b", "specHash": "fcfcd5d", "version": "4.19.0" } diff --git a/box_sdk_gen/client.py b/box_sdk_gen/client.py index 05507610..96b011d8 100644 --- a/box_sdk_gen/client.py +++ b/box_sdk_gen/client.py @@ -198,6 +198,8 @@ from box_sdk_gen.managers.notes import NotesManager +from box_sdk_gen.managers.document_split import DocumentSplitManager + from box_sdk_gen.managers.query import QueryManager from box_sdk_gen.networking.auth import Authentication @@ -478,6 +480,9 @@ def __init__( auth=self.auth, network_session=self.network_session ) self.notes = NotesManager(auth=self.auth, network_session=self.network_session) + self.document_split = DocumentSplitManager( + auth=self.auth, network_session=self.network_session + ) self.query = QueryManager(auth=self.auth, network_session=self.network_session) def make_request(self, fetch_options: FetchOptions) -> FetchResponse: diff --git a/box_sdk_gen/managers/__init__.py b/box_sdk_gen/managers/__init__.py index 7ce34c33..84799626 100644 --- a/box_sdk_gen/managers/__init__.py +++ b/box_sdk_gen/managers/__init__.py @@ -168,4 +168,6 @@ from box_sdk_gen.managers.notes import * +from box_sdk_gen.managers.document_split import * + from box_sdk_gen.managers.query import * diff --git a/box_sdk_gen/managers/document_split.py b/box_sdk_gen/managers/document_split.py new file mode 100644 index 00000000..dfa836b2 --- /dev/null +++ b/box_sdk_gen/managers/document_split.py @@ -0,0 +1,272 @@ +from enum import Enum + +from typing import Optional + +from typing import Dict + +from box_sdk_gen.internal.utils import to_string + +from box_sdk_gen.serialization.json import serialize + +from box_sdk_gen.serialization.json import deserialize + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_manual_v2026_r0 import ( + DocumentSplitCreateRequestManualV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_page_selection_v2026_r0 import ( + DocumentSplitCreateRequestPageSelectionV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_smart_v2026_r0 import ( + DocumentSplitCreateRequestSmartV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_type_v2026_r0 import ( + DocumentSplitCreateRequestTypeV2026R0, +) + +from box_sdk_gen.networking.fetch_options import ResponseFormat + +from box_sdk_gen.schemas.v2026_r0.document_split_create_response_v2026_r0 import ( + DocumentSplitCreateResponseV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.client_error_v2026_r0 import ClientErrorV2026R0 + +from box_sdk_gen.parameters.v2026_r0.box_version_header_v2026_r0 import ( + BoxVersionHeaderV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_v2026_r0 import ( + DocumentSplitCreateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_splits_v2026_r0 import DocumentSplitsV2026R0 + +from box_sdk_gen.schemas.v2026_r0.document_split_v2026_r0 import DocumentSplitV2026R0 + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.networking.auth import Authentication + +from box_sdk_gen.networking.network import NetworkSession + +from box_sdk_gen.networking.fetch_options import FetchOptions + +from box_sdk_gen.networking.fetch_response import FetchResponse + +from box_sdk_gen.internal.utils import prepare_params + +from box_sdk_gen.internal.utils import to_string + +from box_sdk_gen.internal.utils import ByteStream + +from box_sdk_gen.serialization.json import sd_to_json + +from box_sdk_gen.serialization.json import SerializedData + + +class CreateDocumentSplitV2026R0InputSource(str, Enum): + API = 'api' + BOX = 'box' + RELAY = 'relay' + SALESFORCE = 'salesforce' + + +class DocumentSplitManager: + def __init__( + self, + *, + auth: Optional[Authentication] = None, + network_session: Optional[NetworkSession] = None + ): + if network_session is None: + network_session = NetworkSession() + self.auth = auth + self.network_session = network_session + + def create_document_split_v2026_r0( + self, + source_file_id: str, + destination_folder_id: str, + input_source: CreateDocumentSplitV2026R0InputSource, + split_input: DocumentSplitCreateRequestTypeV2026R0, + *, + external_id: Optional[str] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> DocumentSplitCreateResponseV2026R0: + """ + Initiates a Document Split job for the supplied source file. The job runs + + asynchronously; clients can poll the returned job ID to track progress. + + + All split-specific input lives under `split_input`. When + + + `split_input.split_type` is `manual`, provide + + + `split_input.split_definition` (continuous page ranges; `version` may be + + + omitted or `v_1`). When `split_input.split_type` is `page_selection`, + + + provide `split_input.page_selection` (non-linear page segments; `version` + + + may be omitted or `v_2`). `split_input.prompt` must not be provided for + + + either of those variants. When `split_input.split_type` is `smart`, + + + `split_input.prompt` is required and neither + + + `split_input.split_definition` nor `split_input.page_selection` must be + + + provided. + + :param source_file_id: The ID of the source file to split. + :type source_file_id: str + :param destination_folder_id: The ID of the folder where the resulting files will be uploaded. + :type destination_folder_id: str + :param input_source: The system that initiated the request, used for analytics and + traceability. + :type input_source: CreateDocumentSplitV2026R0InputSource + :param external_id: An optional identifier supplied by the caller for this Document Split job. + The value is returned on job responses for correlation only. It is not + a Box resource ID, is not required to be unique, and cannot be used to + look up the job., defaults to None + :type external_id: Optional[str], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'source_file_id': source_file_id, + 'destination_folder_id': destination_folder_id, + 'input_source': input_source, + 'split_input': split_input, + 'external_id': external_id, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/document_splits'] + ), + method='POST', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, DocumentSplitCreateResponseV2026R0) + + def get_document_splits_v2026_r0( + self, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> DocumentSplitsV2026R0: + """ + Returns a paginated list of Document Split jobs accessible to the + + authenticated user. + + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + {'marker': to_string(marker), 'limit': to_string(limit)} + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/document_splits'] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, DocumentSplitsV2026R0) + + def get_document_split_by_id_v2026_r0( + self, + document_split_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> DocumentSplitV2026R0: + """ + Returns details for a single Document Split job identified by its ID, + + including the current status, the input definition, and any output files + + + produced by the job. + + :param document_split_id: The unique identifier for the Document Split job. + Example: "1748426" + :type document_split_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/document_splits/', + to_string(document_split_id), + ] + ), + method='GET', + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, DocumentSplitV2026R0) diff --git a/box_sdk_gen/managers/files.py b/box_sdk_gen/managers/files.py index 6bdc09f3..c6fd22e5 100644 --- a/box_sdk_gen/managers/files.py +++ b/box_sdk_gen/managers/files.py @@ -18,12 +18,22 @@ from box_sdk_gen.serialization.json import serialize +from box_sdk_gen.schemas.shared_link_otp_writable_none import SharedLinkOtpWritableNone + +from box_sdk_gen.schemas.shared_link_otp_writable_open import SharedLinkOtpWritableOpen + +from box_sdk_gen.schemas.shared_link_otp_writable_allowlist import ( + SharedLinkOtpWritableAllowlist, +) + from box_sdk_gen.networking.fetch_options import ResponseFormat from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.schemas.client_error import ClientError +from box_sdk_gen.schemas.shared_link_otp_writable import SharedLinkOtpWritable + from box_sdk_gen.box.errors import BoxSDKError from box_sdk_gen.networking.auth import Authentication @@ -89,6 +99,7 @@ def __init__( vanity_name: Optional[str] = None, unshared_at: Optional[DateTime] = None, permissions: Optional[UpdateFileByIdSharedLinkPermissionsField] = None, + one_time_passcode: Optional[SharedLinkOtpWritable] = None, **kwargs ): """ @@ -129,6 +140,7 @@ def __init__( self.vanity_name = vanity_name self.unshared_at = unshared_at self.permissions = permissions + self.one_time_passcode = one_time_passcode class UpdateFileByIdLockAccessField(str, Enum): diff --git a/box_sdk_gen/managers/folders.py b/box_sdk_gen/managers/folders.py index dd7b809c..772014c5 100644 --- a/box_sdk_gen/managers/folders.py +++ b/box_sdk_gen/managers/folders.py @@ -18,12 +18,22 @@ from box_sdk_gen.serialization.json import serialize +from box_sdk_gen.schemas.shared_link_otp_writable_none import SharedLinkOtpWritableNone + +from box_sdk_gen.schemas.shared_link_otp_writable_open import SharedLinkOtpWritableOpen + +from box_sdk_gen.schemas.shared_link_otp_writable_allowlist import ( + SharedLinkOtpWritableAllowlist, +) + from box_sdk_gen.networking.fetch_options import ResponseFormat from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.schemas.client_error import ClientError +from box_sdk_gen.schemas.shared_link_otp_writable import SharedLinkOtpWritable + from box_sdk_gen.schemas.items import Items from box_sdk_gen.box.errors import BoxSDKError @@ -109,6 +119,7 @@ def __init__( vanity_name: Optional[str] = None, unshared_at: Optional[DateTime] = None, permissions: Optional[UpdateFolderByIdSharedLinkPermissionsField] = None, + one_time_passcode: Optional[SharedLinkOtpWritable] = None, **kwargs ): """ @@ -149,6 +160,7 @@ def __init__( self.vanity_name = vanity_name self.unshared_at = unshared_at self.permissions = permissions + self.one_time_passcode = one_time_passcode class UpdateFolderByIdFolderUploadEmailAccessField(str, Enum): diff --git a/box_sdk_gen/managers/shared_links_files.py b/box_sdk_gen/managers/shared_links_files.py index bda3c266..ef60352e 100644 --- a/box_sdk_gen/managers/shared_links_files.py +++ b/box_sdk_gen/managers/shared_links_files.py @@ -18,12 +18,22 @@ from typing import Union +from box_sdk_gen.schemas.shared_link_otp_writable_none import SharedLinkOtpWritableNone + +from box_sdk_gen.schemas.shared_link_otp_writable_open import SharedLinkOtpWritableOpen + +from box_sdk_gen.schemas.shared_link_otp_writable_allowlist import ( + SharedLinkOtpWritableAllowlist, +) + from box_sdk_gen.networking.fetch_options import ResponseFormat from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.schemas.client_error import ClientError +from box_sdk_gen.schemas.shared_link_otp_writable import SharedLinkOtpWritable + from box_sdk_gen.box.errors import BoxSDKError from box_sdk_gen.networking.auth import Authentication @@ -93,6 +103,7 @@ def __init__( vanity_name: Optional[str] = None, unshared_at: Optional[DateTime] = None, permissions: Optional[AddShareLinkToFileSharedLinkPermissionsField] = None, + one_time_passcode: Optional[SharedLinkOtpWritable] = None, **kwargs ): """ @@ -135,6 +146,7 @@ def __init__( self.vanity_name = vanity_name self.unshared_at = unshared_at self.permissions = permissions + self.one_time_passcode = one_time_passcode class UpdateSharedLinkOnFileSharedLinkAccessField(str, Enum): @@ -183,6 +195,7 @@ def __init__( vanity_name: Optional[str] = None, unshared_at: Optional[DateTime] = None, permissions: Optional[UpdateSharedLinkOnFileSharedLinkPermissionsField] = None, + one_time_passcode: Optional[SharedLinkOtpWritable] = None, **kwargs ): """ @@ -225,6 +238,7 @@ def __init__( self.vanity_name = vanity_name self.unshared_at = unshared_at self.permissions = permissions + self.one_time_passcode = one_time_passcode class RemoveSharedLinkFromFileSharedLink(BaseObject): diff --git a/box_sdk_gen/managers/shared_links_folders.py b/box_sdk_gen/managers/shared_links_folders.py index d5c1ae14..5e1fb2e4 100644 --- a/box_sdk_gen/managers/shared_links_folders.py +++ b/box_sdk_gen/managers/shared_links_folders.py @@ -18,12 +18,22 @@ from typing import Union +from box_sdk_gen.schemas.shared_link_otp_writable_none import SharedLinkOtpWritableNone + +from box_sdk_gen.schemas.shared_link_otp_writable_open import SharedLinkOtpWritableOpen + +from box_sdk_gen.schemas.shared_link_otp_writable_allowlist import ( + SharedLinkOtpWritableAllowlist, +) + from box_sdk_gen.networking.fetch_options import ResponseFormat from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.schemas.client_error import ClientError +from box_sdk_gen.schemas.shared_link_otp_writable import SharedLinkOtpWritable + from box_sdk_gen.box.errors import BoxSDKError from box_sdk_gen.networking.auth import Authentication @@ -90,6 +100,7 @@ def __init__( vanity_name: Optional[str] = None, unshared_at: Optional[DateTime] = None, permissions: Optional[AddShareLinkToFolderSharedLinkPermissionsField] = None, + one_time_passcode: Optional[SharedLinkOtpWritable] = None, **kwargs ): """ @@ -132,6 +143,7 @@ def __init__( self.vanity_name = vanity_name self.unshared_at = unshared_at self.permissions = permissions + self.one_time_passcode = one_time_passcode class UpdateSharedLinkOnFolderSharedLinkAccessField(str, Enum): @@ -179,6 +191,7 @@ def __init__( permissions: Optional[ UpdateSharedLinkOnFolderSharedLinkPermissionsField ] = None, + one_time_passcode: Optional[SharedLinkOtpWritable] = None, **kwargs ): """ @@ -221,6 +234,7 @@ def __init__( self.vanity_name = vanity_name self.unshared_at = unshared_at self.permissions = permissions + self.one_time_passcode = one_time_passcode class RemoveSharedLinkFromFolderSharedLink(BaseObject): diff --git a/box_sdk_gen/managers/shared_links_web_links.py b/box_sdk_gen/managers/shared_links_web_links.py index 3c2081b7..686c03b6 100644 --- a/box_sdk_gen/managers/shared_links_web_links.py +++ b/box_sdk_gen/managers/shared_links_web_links.py @@ -18,12 +18,22 @@ from typing import Union +from box_sdk_gen.schemas.shared_link_otp_writable_none import SharedLinkOtpWritableNone + +from box_sdk_gen.schemas.shared_link_otp_writable_open import SharedLinkOtpWritableOpen + +from box_sdk_gen.schemas.shared_link_otp_writable_allowlist import ( + SharedLinkOtpWritableAllowlist, +) + from box_sdk_gen.networking.fetch_options import ResponseFormat from box_sdk_gen.schemas.web_link import WebLink from box_sdk_gen.schemas.client_error import ClientError +from box_sdk_gen.schemas.shared_link_otp_writable import SharedLinkOtpWritable + from box_sdk_gen.box.errors import BoxSDKError from box_sdk_gen.networking.auth import Authentication @@ -89,6 +99,7 @@ def __init__( vanity_name: Optional[str] = None, unshared_at: Optional[DateTime] = None, permissions: Optional[AddShareLinkToWebLinkSharedLinkPermissionsField] = None, + one_time_passcode: Optional[SharedLinkOtpWritable] = None, **kwargs ): """ @@ -131,6 +142,7 @@ def __init__( self.vanity_name = vanity_name self.unshared_at = unshared_at self.permissions = permissions + self.one_time_passcode = one_time_passcode class UpdateSharedLinkOnWebLinkSharedLinkAccessField(str, Enum): @@ -177,6 +189,7 @@ def __init__( permissions: Optional[ UpdateSharedLinkOnWebLinkSharedLinkPermissionsField ] = None, + one_time_passcode: Optional[SharedLinkOtpWritable] = None, **kwargs ): """ @@ -219,6 +232,7 @@ def __init__( self.vanity_name = vanity_name self.unshared_at = unshared_at self.permissions = permissions + self.one_time_passcode = one_time_passcode class RemoveSharedLinkFromWebLinkSharedLink(BaseObject): diff --git a/box_sdk_gen/managers/users.py b/box_sdk_gen/managers/users.py index a59df50c..8c58ef1b 100644 --- a/box_sdk_gen/managers/users.py +++ b/box_sdk_gen/managers/users.py @@ -671,13 +671,34 @@ def delete_user_by_id( the user and their files. + + If the enterprise has a retention policy, including a retired one, or a + + + legal hold that is not fully released, you can't delete a user who owns + + + content, even with `force`. Transfer the user's content first by using the + + + [Transfer owned folders](https://developer.box.com/reference/put-users-id-folders-0) + + + endpoint. + :param user_id: The ID of the user. Example: "12345" :type user_id: str :param notify: Whether the user will receive email notification of the deletion., defaults to None :type notify: Optional[bool], optional - :param force: Specifies whether to delete the user even if they still own files., defaults to None + :param force: Specifies whether to delete the user even if they still own files. + + If the user owns content and the enterprise has a retention policy, + including a retired one, or a legal hold that is not fully released, + setting `force` to `true` doesn't delete the user. The request returns + a `403` error, and you must transfer the user's content before deleting + the user., defaults to None :type force: Optional[bool], optional :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None :type extra_headers: Optional[Dict[str, Optional[str]]], optional diff --git a/box_sdk_gen/managers/web_links.py b/box_sdk_gen/managers/web_links.py index 9b337b76..59eda0fc 100644 --- a/box_sdk_gen/managers/web_links.py +++ b/box_sdk_gen/managers/web_links.py @@ -12,12 +12,22 @@ from box_sdk_gen.internal.utils import to_string +from box_sdk_gen.schemas.shared_link_otp_writable_none import SharedLinkOtpWritableNone + +from box_sdk_gen.schemas.shared_link_otp_writable_open import SharedLinkOtpWritableOpen + +from box_sdk_gen.schemas.shared_link_otp_writable_allowlist import ( + SharedLinkOtpWritableAllowlist, +) + from box_sdk_gen.networking.fetch_options import ResponseFormat from box_sdk_gen.schemas.web_link import WebLink from box_sdk_gen.schemas.client_error import ClientError +from box_sdk_gen.schemas.shared_link_otp_writable import SharedLinkOtpWritable + from box_sdk_gen.box.errors import BoxSDKError from box_sdk_gen.networking.auth import Authentication @@ -80,6 +90,7 @@ def __init__( password: Optional[str] = None, vanity_name: Optional[str] = None, unshared_at: Optional[DateTime] = None, + one_time_passcode: Optional[SharedLinkOtpWritable] = None, **kwargs ): """ @@ -121,6 +132,7 @@ def __init__( self.password = password self.vanity_name = vanity_name self.unshared_at = unshared_at + self.one_time_passcode = one_time_passcode class WebLinksManager: diff --git a/box_sdk_gen/schemas/__init__.py b/box_sdk_gen/schemas/__init__.py index f0b360d7..3763f1d5 100644 --- a/box_sdk_gen/schemas/__init__.py +++ b/box_sdk_gen/schemas/__init__.py @@ -278,6 +278,16 @@ from box_sdk_gen.schemas.session_termination_message import * +from box_sdk_gen.schemas.shared_link_otp_allowlist_entry_writable import * + +from box_sdk_gen.schemas.shared_link_otp_writable_allowlist import * + +from box_sdk_gen.schemas.shared_link_otp_writable_none import * + +from box_sdk_gen.schemas.shared_link_otp_writable_open import * + +from box_sdk_gen.schemas.shared_link_otp_writable import * + from box_sdk_gen.schemas.shield_information_barrier_base import * from box_sdk_gen.schemas.shield_information_barrier_reference import * @@ -468,12 +478,6 @@ from box_sdk_gen.schemas.file_request import * -from box_sdk_gen.schemas.file import * - -from box_sdk_gen.schemas.file_full import * - -from box_sdk_gen.schemas.files import * - from box_sdk_gen.schemas.event_source import * from box_sdk_gen.schemas.device_pinner import * @@ -518,6 +522,14 @@ from box_sdk_gen.schemas.shield_information_barriers import * +from box_sdk_gen.schemas.shared_link_otp_allowlist_entry import * + +from box_sdk_gen.schemas.file import * + +from box_sdk_gen.schemas.file_full import * + +from box_sdk_gen.schemas.files import * + from box_sdk_gen.schemas.folder_lock import * from box_sdk_gen.schemas.folder_locks import * diff --git a/box_sdk_gen/schemas/file.py b/box_sdk_gen/schemas/file.py index 5eaacca2..fc0e636f 100644 --- a/box_sdk_gen/schemas/file.py +++ b/box_sdk_gen/schemas/file.py @@ -18,6 +18,10 @@ from box_sdk_gen.schemas.user_mini import UserMini +from box_sdk_gen.schemas.shared_link_otp_allowlist_entry import ( + SharedLinkOtpAllowlistEntry, +) + from box_sdk_gen.box.errors import BoxSDKError from box_sdk_gen.internal.utils import DateTime @@ -81,6 +85,45 @@ def __init__(self, can_download: bool, can_preview: bool, can_edit: bool, **kwar self.can_edit = can_edit +class FileSharedLinkOneTimePasscodeField(BaseObject): + def __init__( + self, + mode: str, + *, + allowlist: Optional[List[SharedLinkOtpAllowlistEntry]] = None, + **kwargs + ): + """ + :param mode: The current OTP enforcement mode for the shared link. + + * `none` - OTP enforcement is turned off. The shared link is accessible + without any one-time-passcode verification. + * `open` - Any anonymous recipient can request a one-time-passcode to + any email address and access the shared link after verifying it. + Collaborators and registered Box users access the link without + being prompted. + * `allowlist` - Anonymous recipients can request a one-time-passcode + only when they enter an email that matches an entry on the + `allowlist`. + :type mode: str + :param allowlist: The list of email and domain entries that are permitted to access the + shared link when `mode` is `allowlist`. Anonymous users whose + email matches an entry can request and verify a one-time-passcode. + + Because the entries carry recipient email addresses and the identity + of the user who added them, this field is only returned to users + with owner, co-owner, or editor access on the item. For viewer + collaborators and below the field is omitted. + + An allowlist contains at most 1000 entries, matching the limit + enforced when setting the allowlist on a shared link., defaults to None + :type allowlist: Optional[List[SharedLinkOtpAllowlistEntry]], optional + """ + super().__init__(**kwargs) + self.mode = mode + self.allowlist = allowlist + + class FileSharedLinkField(BaseObject): def __init__( self, @@ -90,6 +133,7 @@ def __init__( is_password_enabled: bool, download_count: int, preview_count: int, + one_time_passcode: FileSharedLinkOneTimePasscodeField, *, download_url: Optional[str] = None, vanity_url: Optional[str] = None, @@ -160,6 +204,7 @@ def __init__( self.is_password_enabled = is_password_enabled self.download_count = download_count self.preview_count = preview_count + self.one_time_passcode = one_time_passcode self.download_url = download_url self.vanity_url = vanity_url self.vanity_name = vanity_name diff --git a/box_sdk_gen/schemas/folder.py b/box_sdk_gen/schemas/folder.py index 87118100..0871a2e5 100644 --- a/box_sdk_gen/schemas/folder.py +++ b/box_sdk_gen/schemas/folder.py @@ -14,6 +14,10 @@ from box_sdk_gen.schemas.user_mini import UserMini +from box_sdk_gen.schemas.shared_link_otp_allowlist_entry import ( + SharedLinkOtpAllowlistEntry, +) + from box_sdk_gen.schemas.items import Items from box_sdk_gen.box.errors import BoxSDKError @@ -79,6 +83,45 @@ def __init__(self, can_download: bool, can_preview: bool, can_edit: bool, **kwar self.can_edit = can_edit +class FolderSharedLinkOneTimePasscodeField(BaseObject): + def __init__( + self, + mode: str, + *, + allowlist: Optional[List[SharedLinkOtpAllowlistEntry]] = None, + **kwargs + ): + """ + :param mode: The current OTP enforcement mode for the shared link. + + * `none` - OTP enforcement is turned off. The shared link is accessible + without any one-time-passcode verification. + * `open` - Any anonymous recipient can request a one-time-passcode to + any email address and access the shared link after verifying it. + Collaborators and registered Box users access the link without + being prompted. + * `allowlist` - Anonymous recipients can request a one-time-passcode + only when they enter an email that matches an entry on the + `allowlist`. + :type mode: str + :param allowlist: The list of email and domain entries that are permitted to access the + shared link when `mode` is `allowlist`. Anonymous users whose + email matches an entry can request and verify a one-time-passcode. + + Because the entries carry recipient email addresses and the identity + of the user who added them, this field is only returned to users + with owner, co-owner, or editor access on the item. For viewer + collaborators and below the field is omitted. + + An allowlist contains at most 1000 entries, matching the limit + enforced when setting the allowlist on a shared link., defaults to None + :type allowlist: Optional[List[SharedLinkOtpAllowlistEntry]], optional + """ + super().__init__(**kwargs) + self.mode = mode + self.allowlist = allowlist + + class FolderSharedLinkField(BaseObject): def __init__( self, @@ -88,6 +131,7 @@ def __init__( is_password_enabled: bool, download_count: int, preview_count: int, + one_time_passcode: FolderSharedLinkOneTimePasscodeField, *, download_url: Optional[str] = None, vanity_url: Optional[str] = None, @@ -158,6 +202,7 @@ def __init__( self.is_password_enabled = is_password_enabled self.download_count = download_count self.preview_count = preview_count + self.one_time_passcode = one_time_passcode self.download_url = download_url self.vanity_url = vanity_url self.vanity_name = vanity_name diff --git a/box_sdk_gen/schemas/keyword_skill_card.py b/box_sdk_gen/schemas/keyword_skill_card.py index ba6cf2cc..aa6f0117 100644 --- a/box_sdk_gen/schemas/keyword_skill_card.py +++ b/box_sdk_gen/schemas/keyword_skill_card.py @@ -118,7 +118,7 @@ def __init__( :param invocation: The invocation of this service, used to track which instance of a service applied the metadata. :type invocation: KeywordSkillCardInvocationField - :param entries: An list of entries in the metadata card. + :param entries: A list of entries in the metadata card. :type entries: List[KeywordSkillCardEntriesField] :param created_at: The optional date and time this card was created at., defaults to None :type created_at: Optional[DateTime], optional diff --git a/box_sdk_gen/schemas/shared_link_otp_allowlist_entry.py b/box_sdk_gen/schemas/shared_link_otp_allowlist_entry.py new file mode 100644 index 00000000..ac6d86fc --- /dev/null +++ b/box_sdk_gen/schemas/shared_link_otp_allowlist_entry.py @@ -0,0 +1,47 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.internal.utils import DateTime + + +class SharedLinkOtpAllowlistEntryTypeField(str, Enum): + EMAIL = 'email' + DOMAIN = 'domain' + + +class SharedLinkOtpAllowlistEntry(BaseObject): + _discriminator = 'type', {'email', 'domain'} + + def __init__( + self, + type: SharedLinkOtpAllowlistEntryTypeField, + value: str, + created_at: DateTime, + created_by: UserBase, + **kwargs + ): + """ + :param type: The kind of allowlist entry. + + * `email` - The entry matches a single email address. + * `domain` - The entry matches every email address under the + given domain. + :type type: SharedLinkOtpAllowlistEntryTypeField + :param value: The value of the allowlist entry. + + * For `email` entries, the full email address (must contain `@`). + * For `domain` entries, the bare domain (e.g. `example.com`). + :type value: str + :param created_at: The date and time when the allowlist entry was added. + :type created_at: DateTime + """ + super().__init__(**kwargs) + self.type = type + self.value = value + self.created_at = created_at + self.created_by = created_by diff --git a/box_sdk_gen/schemas/shared_link_otp_allowlist_entry_writable.py b/box_sdk_gen/schemas/shared_link_otp_allowlist_entry_writable.py new file mode 100644 index 00000000..0b0de1b4 --- /dev/null +++ b/box_sdk_gen/schemas/shared_link_otp_allowlist_entry_writable.py @@ -0,0 +1,34 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class SharedLinkOtpAllowlistEntryWritableTypeField(str, Enum): + EMAIL = 'email' + DOMAIN = 'domain' + + +class SharedLinkOtpAllowlistEntryWritable(BaseObject): + _discriminator = 'type', {'email', 'domain'} + + def __init__( + self, type: SharedLinkOtpAllowlistEntryWritableTypeField, value: str, **kwargs + ): + """ + :param type: The kind of allowlist entry. + + * `email` - The entry matches a single email address. + * `domain` - The entry matches every email address under the + given domain. + :type type: SharedLinkOtpAllowlistEntryWritableTypeField + :param value: The value of the allowlist entry. + + * For `email` entries, the full email address (must contain `@`). + * For `domain` entries, the bare domain (e.g. `example.com`). + :type value: str + """ + super().__init__(**kwargs) + self.type = type + self.value = value diff --git a/box_sdk_gen/schemas/shared_link_otp_writable.py b/box_sdk_gen/schemas/shared_link_otp_writable.py new file mode 100644 index 00000000..85f93b35 --- /dev/null +++ b/box_sdk_gen/schemas/shared_link_otp_writable.py @@ -0,0 +1,15 @@ +from typing import Union + +from box_sdk_gen.schemas.shared_link_otp_writable_none import SharedLinkOtpWritableNone + +from box_sdk_gen.schemas.shared_link_otp_writable_open import SharedLinkOtpWritableOpen + +from box_sdk_gen.schemas.shared_link_otp_writable_allowlist import ( + SharedLinkOtpWritableAllowlist, +) + +from box_sdk_gen.box.errors import BoxSDKError + +SharedLinkOtpWritable = Union[ + SharedLinkOtpWritableNone, SharedLinkOtpWritableOpen, SharedLinkOtpWritableAllowlist +] diff --git a/box_sdk_gen/schemas/shared_link_otp_writable_allowlist.py b/box_sdk_gen/schemas/shared_link_otp_writable_allowlist.py new file mode 100644 index 00000000..1389e69b --- /dev/null +++ b/box_sdk_gen/schemas/shared_link_otp_writable_allowlist.py @@ -0,0 +1,40 @@ +from enum import Enum + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shared_link_otp_allowlist_entry_writable import ( + SharedLinkOtpAllowlistEntryWritable, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class SharedLinkOtpWritableAllowlistModeField(str, Enum): + ALLOWLIST = 'allowlist' + + +class SharedLinkOtpWritableAllowlist(BaseObject): + def __init__( + self, + allowlist: List[SharedLinkOtpAllowlistEntryWritable], + *, + mode: SharedLinkOtpWritableAllowlistModeField = SharedLinkOtpWritableAllowlistModeField.ALLOWLIST, + **kwargs + ): + """ + :param allowlist: The list of email and domain entries that are permitted to access the + shared link when `mode` is `allowlist`. Anonymous users whose + email matches an entry can request and verify a one-time-passcode. + + Providing this field replaces the entire existing allowlist; passing + an empty array clears all entries. Required when `mode` is `allowlist`. + :type allowlist: List[SharedLinkOtpAllowlistEntryWritable] + :param mode: Set to `allowlist` to restrict OTP requests to emails matching an + entry on the `allowlist`., defaults to SharedLinkOtpWritableAllowlistModeField.ALLOWLIST + :type mode: SharedLinkOtpWritableAllowlistModeField, optional + """ + super().__init__(**kwargs) + self.allowlist = allowlist + self.mode = mode diff --git a/box_sdk_gen/schemas/shared_link_otp_writable_none.py b/box_sdk_gen/schemas/shared_link_otp_writable_none.py new file mode 100644 index 00000000..b706b564 --- /dev/null +++ b/box_sdk_gen/schemas/shared_link_otp_writable_none.py @@ -0,0 +1,24 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class SharedLinkOtpWritableNoneModeField(str, Enum): + NONE = 'none' + + +class SharedLinkOtpWritableNone(BaseObject): + def __init__( + self, + *, + mode: SharedLinkOtpWritableNoneModeField = SharedLinkOtpWritableNoneModeField.NONE, + **kwargs + ): + """ + :param mode: Set to `none` to disable OTP enforcement for the shared link., defaults to SharedLinkOtpWritableNoneModeField.NONE + :type mode: SharedLinkOtpWritableNoneModeField, optional + """ + super().__init__(**kwargs) + self.mode = mode diff --git a/box_sdk_gen/schemas/shared_link_otp_writable_open.py b/box_sdk_gen/schemas/shared_link_otp_writable_open.py new file mode 100644 index 00000000..2b8c3814 --- /dev/null +++ b/box_sdk_gen/schemas/shared_link_otp_writable_open.py @@ -0,0 +1,25 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class SharedLinkOtpWritableOpenModeField(str, Enum): + OPEN = 'open' + + +class SharedLinkOtpWritableOpen(BaseObject): + def __init__( + self, + *, + mode: SharedLinkOtpWritableOpenModeField = SharedLinkOtpWritableOpenModeField.OPEN, + **kwargs + ): + """ + :param mode: Set to `open` to allow any anonymous recipient to request a + one-time-passcode to any email address., defaults to SharedLinkOtpWritableOpenModeField.OPEN + :type mode: SharedLinkOtpWritableOpenModeField, optional + """ + super().__init__(**kwargs) + self.mode = mode diff --git a/box_sdk_gen/schemas/transcript_skill_card.py b/box_sdk_gen/schemas/transcript_skill_card.py index 43c8742e..b93cef2f 100644 --- a/box_sdk_gen/schemas/transcript_skill_card.py +++ b/box_sdk_gen/schemas/transcript_skill_card.py @@ -141,7 +141,7 @@ def __init__( :param invocation: The invocation of this service, used to track which instance of a service applied the metadata. :type invocation: TranscriptSkillCardInvocationField - :param entries: An list of entries for the card. This represents the individual entries of + :param entries: A list of entries for the card. This represents the individual entries of the transcription. :type entries: List[TranscriptSkillCardEntriesField] :param created_at: The optional date and time this card was created at., defaults to None diff --git a/box_sdk_gen/schemas/upload_session.py b/box_sdk_gen/schemas/upload_session.py index 495284b4..ec26813c 100644 --- a/box_sdk_gen/schemas/upload_session.py +++ b/box_sdk_gen/schemas/upload_session.py @@ -75,7 +75,7 @@ def __init__( :type type: Optional[UploadSessionTypeField], optional :param session_expires_at: The date and time when this session expires., defaults to None :type session_expires_at: Optional[DateTime], optional - :param part_size: The size in bytes that must be used for all parts of of the + :param part_size: The size in bytes that must be used for all parts of the upload. Only the last part is allowed to be of a smaller size., defaults to None @@ -86,7 +86,7 @@ def __init__( :param num_parts_processed: The number of parts that have been uploaded and processed by the server. This starts at `0`. - When committing a file files, inspecting this property can + When committing a file, inspecting this property can provide insight if all parts have been uploaded correctly., defaults to None :type num_parts_processed: Optional[int], optional """ diff --git a/box_sdk_gen/schemas/v2026_r0/__init__.py b/box_sdk_gen/schemas/v2026_r0/__init__.py index 95e2bce5..7aafddb8 100644 --- a/box_sdk_gen/schemas/v2026_r0/__init__.py +++ b/box_sdk_gen/schemas/v2026_r0/__init__.py @@ -4,6 +4,38 @@ from box_sdk_gen.schemas.v2026_r0.client_error_v2026_r0 import * +from box_sdk_gen.schemas.v2026_r0.document_failures_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_failures_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_smart_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_create_response_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_page_range_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_manual_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_page_range_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_single_page_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_segment_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_item_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_page_selection_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_type_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.enterprise_reference_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.file_reference_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_split_output_v2026_r0 import * + from box_sdk_gen.schemas.v2026_r0.folder_reference_v2026_r0 import * from box_sdk_gen.schemas.v2026_r0.notes_convert_request_body_v2026_r0 import * @@ -36,6 +68,10 @@ from box_sdk_gen.schemas.v2026_r0.user_mini_v2026_r0 import * +from box_sdk_gen.schemas.v2026_r0.document_split_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.document_splits_v2026_r0 import * + from box_sdk_gen.schemas.v2026_r0.automate_workflow_action_v2026_r0 import * from box_sdk_gen.schemas.v2026_r0.automate_workflows_v2026_r0 import * diff --git a/box_sdk_gen/schemas/v2026_r0/document_failures_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_failures_v2026_r0.py new file mode 100644 index 00000000..a0c6d496 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_failures_v2026_r0.py @@ -0,0 +1,18 @@ +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentFailuresV2026R0(BaseObject): + def __init__(self, errors: List[str], warnings: List[str], **kwargs): + """ + :param errors: A list of errors that occurred during the document job. + :type errors: List[str] + :param warnings: A list of warnings that occurred during the document job. + :type warnings: List[str] + """ + super().__init__(**kwargs) + self.errors = errors + self.warnings = warnings diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_create_request_manual_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_manual_v2026_r0.py new file mode 100644 index 00000000..f94c664a --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_manual_v2026_r0.py @@ -0,0 +1,46 @@ +from enum import Enum + +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.document_split_page_range_v2026_r0 import ( + DocumentSplitPageRangeV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitCreateRequestManualV2026R0SplitTypeField(str, Enum): + MANUAL = 'manual' + + +class DocumentSplitCreateRequestManualV2026R0VersionField(str, Enum): + V_1 = 'v_1' + + +class DocumentSplitCreateRequestManualV2026R0(BaseObject): + def __init__( + self, + split_definition: List[DocumentSplitPageRangeV2026R0], + *, + split_type: DocumentSplitCreateRequestManualV2026R0SplitTypeField = DocumentSplitCreateRequestManualV2026R0SplitTypeField.MANUAL, + version: Optional[DocumentSplitCreateRequestManualV2026R0VersionField] = None, + **kwargs + ): + """ + :param split_definition: Page ranges that define the split. Each entry produces one output file + containing the inclusive page range `[start, end]`. + :type split_definition: List[DocumentSplitPageRangeV2026R0] + :param split_type: Discriminator. Must be `manual` for this variant., defaults to DocumentSplitCreateRequestManualV2026R0SplitTypeField.MANUAL + :type split_type: DocumentSplitCreateRequestManualV2026R0SplitTypeField, optional + :param version: The version of the manual split input format. Omitted or `v_1` is the + legacy `split_definition` format. Existing clients may omit this field., defaults to None + :type version: Optional[DocumentSplitCreateRequestManualV2026R0VersionField], optional + """ + super().__init__(**kwargs) + self.split_definition = split_definition + self.split_type = split_type + self.version = version diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_create_request_page_selection_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_page_selection_v2026_r0.py new file mode 100644 index 00000000..646a4a06 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_page_selection_v2026_r0.py @@ -0,0 +1,45 @@ +from enum import Enum + +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_item_v2026_r0 import ( + DocumentSplitPageSelectionItemV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField(str, Enum): + PAGE_SELECTION = 'page_selection' + + +class DocumentSplitCreateRequestPageSelectionV2026R0VersionField(str, Enum): + V_2 = 'v_2' + + +class DocumentSplitCreateRequestPageSelectionV2026R0(BaseObject): + def __init__( + self, + page_selection: List[DocumentSplitPageSelectionItemV2026R0], + *, + split_type: DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField = DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField.PAGE_SELECTION, + version: Optional[ + DocumentSplitCreateRequestPageSelectionV2026R0VersionField + ] = None, + **kwargs + ): + """ + :param split_type: Discriminator. Must be `page_selection` for this variant., defaults to DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField.PAGE_SELECTION + :type split_type: DocumentSplitCreateRequestPageSelectionV2026R0SplitTypeField, optional + :param version: The version of the page selection input format. Optional. When provided + must be `v_2`., defaults to None + :type version: Optional[DocumentSplitCreateRequestPageSelectionV2026R0VersionField], optional + """ + super().__init__(**kwargs) + self.page_selection = page_selection + self.split_type = split_type + self.version = version diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_create_request_smart_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_smart_v2026_r0.py new file mode 100644 index 00000000..2eba97c6 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_smart_v2026_r0.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitCreateRequestSmartV2026R0SplitTypeField(str, Enum): + SMART = 'smart' + + +class DocumentSplitCreateRequestSmartV2026R0(BaseObject): + def __init__( + self, + prompt: str, + *, + split_type: DocumentSplitCreateRequestSmartV2026R0SplitTypeField = DocumentSplitCreateRequestSmartV2026R0SplitTypeField.SMART, + **kwargs + ): + """ + :param prompt: A natural language prompt that guides automatic page range detection. + :type prompt: str + :param split_type: Discriminator. Must be `smart` for this variant., defaults to DocumentSplitCreateRequestSmartV2026R0SplitTypeField.SMART + :type split_type: DocumentSplitCreateRequestSmartV2026R0SplitTypeField, optional + """ + super().__init__(**kwargs) + self.prompt = prompt + self.split_type = split_type diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_create_request_type_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_type_v2026_r0.py new file mode 100644 index 00000000..a3e625c6 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_type_v2026_r0.py @@ -0,0 +1,21 @@ +from typing import Union + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_manual_v2026_r0 import ( + DocumentSplitCreateRequestManualV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_page_selection_v2026_r0 import ( + DocumentSplitCreateRequestPageSelectionV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_smart_v2026_r0 import ( + DocumentSplitCreateRequestSmartV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +DocumentSplitCreateRequestTypeV2026R0 = Union[ + DocumentSplitCreateRequestManualV2026R0, + DocumentSplitCreateRequestPageSelectionV2026R0, + DocumentSplitCreateRequestSmartV2026R0, +] diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_create_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_v2026_r0.py new file mode 100644 index 00000000..beb7b4ca --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_create_request_v2026_r0.py @@ -0,0 +1,63 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_manual_v2026_r0 import ( + DocumentSplitCreateRequestManualV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_page_selection_v2026_r0 import ( + DocumentSplitCreateRequestPageSelectionV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_smart_v2026_r0 import ( + DocumentSplitCreateRequestSmartV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_type_v2026_r0 import ( + DocumentSplitCreateRequestTypeV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitCreateRequestV2026R0InputSourceField(str, Enum): + API = 'api' + BOX = 'box' + RELAY = 'relay' + SALESFORCE = 'salesforce' + + +class DocumentSplitCreateRequestV2026R0(BaseObject): + def __init__( + self, + source_file_id: str, + destination_folder_id: str, + input_source: DocumentSplitCreateRequestV2026R0InputSourceField, + split_input: DocumentSplitCreateRequestTypeV2026R0, + *, + external_id: Optional[str] = None, + **kwargs + ): + """ + :param source_file_id: The ID of the source file to split. + :type source_file_id: str + :param destination_folder_id: The ID of the folder where the resulting files will be uploaded. + :type destination_folder_id: str + :param input_source: The system that initiated the request, used for analytics and + traceability. + :type input_source: DocumentSplitCreateRequestV2026R0InputSourceField + :param external_id: An optional identifier supplied by the caller for this Document Split job. + The value is returned on job responses for correlation only. It is not + a Box resource ID, is not required to be unique, and cannot be used to + look up the job., defaults to None + :type external_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.source_file_id = source_file_id + self.destination_folder_id = destination_folder_id + self.input_source = input_source + self.split_input = split_input + self.external_id = external_id diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_create_response_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_create_response_v2026_r0.py new file mode 100644 index 00000000..a108bc99 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_create_response_v2026_r0.py @@ -0,0 +1,30 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitCreateResponseV2026R0TypeField(str, Enum): + DOCUMENT_SPLIT = 'document_split' + + +class DocumentSplitCreateResponseV2026R0(BaseObject): + _discriminator = 'type', {'document_split'} + + def __init__( + self, + id: str, + *, + type: DocumentSplitCreateResponseV2026R0TypeField = DocumentSplitCreateResponseV2026R0TypeField.DOCUMENT_SPLIT, + **kwargs + ): + """ + :param id: The unique identifier of the created Document Split job. + :type id: str + :param type: The value will always be `document_split`., defaults to DocumentSplitCreateResponseV2026R0TypeField.DOCUMENT_SPLIT + :type type: DocumentSplitCreateResponseV2026R0TypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_failures_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_failures_v2026_r0.py new file mode 100644 index 00000000..7250a1eb --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_failures_v2026_r0.py @@ -0,0 +1,18 @@ +from typing import List + +from box_sdk_gen.schemas.v2026_r0.document_failures_v2026_r0 import ( + DocumentFailuresV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitFailuresV2026R0(DocumentFailuresV2026R0): + def __init__(self, errors: List[str], warnings: List[str], **kwargs): + """ + :param errors: A list of errors that occurred during the document job. + :type errors: List[str] + :param warnings: A list of warnings that occurred during the document job. + :type warnings: List[str] + """ + super().__init__(errors=errors, warnings=warnings, **kwargs) diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_output_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_output_v2026_r0.py new file mode 100644 index 00000000..f3c374c9 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_output_v2026_r0.py @@ -0,0 +1,37 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.file_reference_v2026_r0 import FileReferenceV2026R0 + +from box_sdk_gen.schemas.v2026_r0.document_split_page_range_v2026_r0 import ( + DocumentSplitPageRangeV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitOutputV2026R0(BaseObject): + def __init__( + self, + *, + generated_files: Optional[List[FileReferenceV2026R0]] = None, + split_definition: Optional[List[DocumentSplitPageRangeV2026R0]] = None, + **kwargs + ): + """ + :param generated_files: References to the files that were created by the split., defaults to None + :type generated_files: Optional[List[FileReferenceV2026R0]], optional + :param split_definition: The page ranges that Box produced for a `smart` split. Each entry + corresponds to one generated file with the inclusive page range + `[start, end]`. Omitted or `null` for `manual` splits, where the + caller-supplied ranges are available in `split_input.split_definition`. + Omitted for `page_selection` splits, where the caller-supplied page + layout is available in `split_input.page_selection`., defaults to None + :type split_definition: Optional[List[DocumentSplitPageRangeV2026R0]], optional + """ + super().__init__(**kwargs) + self.generated_files = generated_files + self.split_definition = split_definition diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_page_range_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_page_range_v2026_r0.py new file mode 100644 index 00000000..0c7818e4 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_page_range_v2026_r0.py @@ -0,0 +1,16 @@ +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitPageRangeV2026R0(BaseObject): + def __init__(self, start: int, end: int, **kwargs): + """ + :param start: The first page (inclusive) included in this slice. + :type start: int + :param end: The last page (inclusive) included in this slice. + :type end: int + """ + super().__init__(**kwargs) + self.start = start + self.end = end diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_item_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_item_v2026_r0.py new file mode 100644 index 00000000..3d6fb955 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_item_v2026_r0.py @@ -0,0 +1,40 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_single_page_v2026_r0 import ( + DocumentSplitPageSelectionSinglePageV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_page_range_v2026_r0 import ( + DocumentSplitPageSelectionPageRangeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_segment_v2026_r0 import ( + DocumentSplitPageSelectionSegmentV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitPageSelectionItemV2026R0(BaseObject): + def __init__( + self, + segments: List[DocumentSplitPageSelectionSegmentV2026R0], + *, + name: Optional[str] = None, + **kwargs + ): + """ + :param segments: An ordered list of page segments to include in this output file. Each + segment specifies either a single page or a contiguous page range. + :type segments: List[DocumentSplitPageSelectionSegmentV2026R0] + :param name: Optional name for the output file (without extension). When omitted the + system generates a sequential name based on the source file name., defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.segments = segments + self.name = name diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_page_range_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_page_range_v2026_r0.py new file mode 100644 index 00000000..d7b33e84 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_page_range_v2026_r0.py @@ -0,0 +1,34 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitPageSelectionPageRangeV2026R0TypeField(str, Enum): + PAGE_RANGE = 'page_range' + + +class DocumentSplitPageSelectionPageRangeV2026R0(BaseObject): + _discriminator = 'type', {'page_range'} + + def __init__( + self, + start: int, + end: int, + *, + type: DocumentSplitPageSelectionPageRangeV2026R0TypeField = DocumentSplitPageSelectionPageRangeV2026R0TypeField.PAGE_RANGE, + **kwargs + ): + """ + :param start: The first page (inclusive) included in this segment. + :type start: int + :param end: The last page (inclusive) included in this segment. + :type end: int + :param type: Discriminator. Must be `page_range` for this variant., defaults to DocumentSplitPageSelectionPageRangeV2026R0TypeField.PAGE_RANGE + :type type: DocumentSplitPageSelectionPageRangeV2026R0TypeField, optional + """ + super().__init__(**kwargs) + self.start = start + self.end = end + self.type = type diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_segment_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_segment_v2026_r0.py new file mode 100644 index 00000000..177922f7 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_segment_v2026_r0.py @@ -0,0 +1,16 @@ +from typing import Union + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_single_page_v2026_r0 import ( + DocumentSplitPageSelectionSinglePageV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_page_selection_page_range_v2026_r0 import ( + DocumentSplitPageSelectionPageRangeV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +DocumentSplitPageSelectionSegmentV2026R0 = Union[ + DocumentSplitPageSelectionSinglePageV2026R0, + DocumentSplitPageSelectionPageRangeV2026R0, +] diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_single_page_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_single_page_v2026_r0.py new file mode 100644 index 00000000..e2fd2e21 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_page_selection_single_page_v2026_r0.py @@ -0,0 +1,30 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitPageSelectionSinglePageV2026R0TypeField(str, Enum): + SINGLE_PAGE = 'single_page' + + +class DocumentSplitPageSelectionSinglePageV2026R0(BaseObject): + _discriminator = 'type', {'single_page'} + + def __init__( + self, + page: int, + *, + type: DocumentSplitPageSelectionSinglePageV2026R0TypeField = DocumentSplitPageSelectionSinglePageV2026R0TypeField.SINGLE_PAGE, + **kwargs + ): + """ + :param page: A single page number to include. + :type page: int + :param type: Discriminator. Must be `single_page` for this variant., defaults to DocumentSplitPageSelectionSinglePageV2026R0TypeField.SINGLE_PAGE + :type type: DocumentSplitPageSelectionSinglePageV2026R0TypeField, optional + """ + super().__init__(**kwargs) + self.page = page + self.type = type diff --git a/box_sdk_gen/schemas/v2026_r0/document_split_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_split_v2026_r0.py new file mode 100644 index 00000000..83667b8c --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_split_v2026_r0.py @@ -0,0 +1,124 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_manual_v2026_r0 import ( + DocumentSplitCreateRequestManualV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_page_selection_v2026_r0 import ( + DocumentSplitCreateRequestPageSelectionV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_smart_v2026_r0 import ( + DocumentSplitCreateRequestSmartV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.file_reference_v2026_r0 import FileReferenceV2026R0 + +from box_sdk_gen.schemas.v2026_r0.document_split_create_request_type_v2026_r0 import ( + DocumentSplitCreateRequestTypeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_output_v2026_r0 import ( + DocumentSplitOutputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.folder_reference_v2026_r0 import ( + FolderReferenceV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.user_mini_v2026_r0 import UserMiniV2026R0 + +from box_sdk_gen.schemas.v2026_r0.enterprise_reference_v2026_r0 import ( + EnterpriseReferenceV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.document_split_failures_v2026_r0 import ( + DocumentSplitFailuresV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.internal.utils import DateTime + + +class DocumentSplitV2026R0TypeField(str, Enum): + DOCUMENT_SPLIT = 'document_split' + + +class DocumentSplitV2026R0StatusField(str, Enum): + SUBMITTED = 'submitted' + COMPLETED = 'completed' + FAILED = 'failed' + COMPLETED_WITH_ERROR = 'completed_with_error' + + +class DocumentSplitV2026R0InputSourceField(str, Enum): + API = 'api' + BOX = 'box' + RELAY = 'relay' + SALESFORCE = 'salesforce' + + +class DocumentSplitV2026R0(BaseObject): + _discriminator = 'type', {'document_split'} + + def __init__( + self, + id: str, + source_file: FileReferenceV2026R0, + status: DocumentSplitV2026R0StatusField, + split_input: DocumentSplitCreateRequestTypeV2026R0, + destination_folder: FolderReferenceV2026R0, + input_source: DocumentSplitV2026R0InputSourceField, + *, + type: DocumentSplitV2026R0TypeField = DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT, + output: Optional[DocumentSplitOutputV2026R0] = None, + created_at: Optional[DateTime] = None, + created_by: Optional[UserMiniV2026R0] = None, + enterprise: Optional[EnterpriseReferenceV2026R0] = None, + failures: Optional[DocumentSplitFailuresV2026R0] = None, + external_id: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for the Document Split job. + :type id: str + :param status: The current state of the Document Split job. + :type status: DocumentSplitV2026R0StatusField + :param input_source: The system that initiated the request, used for analytics and + traceability. + :type input_source: DocumentSplitV2026R0InputSourceField + :param type: The value will always be `document_split`., defaults to DocumentSplitV2026R0TypeField.DOCUMENT_SPLIT + :type type: DocumentSplitV2026R0TypeField, optional + :param output: The result of the Document Split job. `null` until the job has produced + output., defaults to None + :type output: Optional[DocumentSplitOutputV2026R0], optional + :param created_at: When the Document Split job was created., defaults to None + :type created_at: Optional[DateTime], optional + :param failures: Errors and warnings that occurred during the document split. `null` when + no failures were recorded., defaults to None + :type failures: Optional[DocumentSplitFailuresV2026R0], optional + :param external_id: An optional identifier supplied by the caller when the Document Split + job was created. Returned for correlation only. It is not a Box + resource ID, is not required to be unique, and cannot be used to + look up the job., defaults to None + :type external_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.source_file = source_file + self.status = status + self.split_input = split_input + self.destination_folder = destination_folder + self.input_source = input_source + self.type = type + self.output = output + self.created_at = created_at + self.created_by = created_by + self.enterprise = enterprise + self.failures = failures + self.external_id = external_id diff --git a/box_sdk_gen/schemas/v2026_r0/document_splits_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/document_splits_v2026_r0.py new file mode 100644 index 00000000..53e4018e --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/document_splits_v2026_r0.py @@ -0,0 +1,34 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.document_split_v2026_r0 import DocumentSplitV2026R0 + +from box_sdk_gen.box.errors import BoxSDKError + + +class DocumentSplitsV2026R0(BaseObject): + def __init__( + self, + *, + entries: Optional[List[DocumentSplitV2026R0]] = None, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of Document Split jobs., defaults to None + :type entries: Optional[List[DocumentSplitV2026R0]], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker diff --git a/box_sdk_gen/schemas/v2026_r0/enterprise_reference_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/enterprise_reference_v2026_r0.py new file mode 100644 index 00000000..bbf5bf89 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/enterprise_reference_v2026_r0.py @@ -0,0 +1,30 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class EnterpriseReferenceV2026R0TypeField(str, Enum): + ENTERPRISE = 'enterprise' + + +class EnterpriseReferenceV2026R0(BaseObject): + _discriminator = 'type', {'enterprise'} + + def __init__( + self, + id: str, + *, + type: EnterpriseReferenceV2026R0TypeField = EnterpriseReferenceV2026R0TypeField.ENTERPRISE, + **kwargs + ): + """ + :param id: The unique identifier for this enterprise. + :type id: str + :param type: The value will always be `enterprise`., defaults to EnterpriseReferenceV2026R0TypeField.ENTERPRISE + :type type: EnterpriseReferenceV2026R0TypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/v2026_r0/file_reference_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/file_reference_v2026_r0.py new file mode 100644 index 00000000..4e85c237 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/file_reference_v2026_r0.py @@ -0,0 +1,30 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class FileReferenceV2026R0TypeField(str, Enum): + FILE = 'file' + + +class FileReferenceV2026R0(BaseObject): + _discriminator = 'type', {'file'} + + def __init__( + self, + id: str, + *, + type: FileReferenceV2026R0TypeField = FileReferenceV2026R0TypeField.FILE, + **kwargs + ): + """ + :param id: ID of the file. + :type id: str + :param type: The value will always be `file`., defaults to FileReferenceV2026R0TypeField.FILE + :type type: FileReferenceV2026R0TypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/web_link.py b/box_sdk_gen/schemas/web_link.py index facbdf6a..c165908e 100644 --- a/box_sdk_gen/schemas/web_link.py +++ b/box_sdk_gen/schemas/web_link.py @@ -16,6 +16,10 @@ from box_sdk_gen.schemas.user_mini import UserMini +from box_sdk_gen.schemas.shared_link_otp_allowlist_entry import ( + SharedLinkOtpAllowlistEntry, +) + from box_sdk_gen.schemas.collection import Collection from box_sdk_gen.box.errors import BoxSDKError @@ -81,6 +85,45 @@ def __init__(self, can_download: bool, can_preview: bool, can_edit: bool, **kwar self.can_edit = can_edit +class WebLinkSharedLinkOneTimePasscodeField(BaseObject): + def __init__( + self, + mode: str, + *, + allowlist: Optional[List[SharedLinkOtpAllowlistEntry]] = None, + **kwargs + ): + """ + :param mode: The current OTP enforcement mode for the shared link. + + * `none` - OTP enforcement is turned off. The shared link is accessible + without any one-time-passcode verification. + * `open` - Any anonymous recipient can request a one-time-passcode to + any email address and access the shared link after verifying it. + Collaborators and registered Box users access the link without + being prompted. + * `allowlist` - Anonymous recipients can request a one-time-passcode + only when they enter an email that matches an entry on the + `allowlist`. + :type mode: str + :param allowlist: The list of email and domain entries that are permitted to access the + shared link when `mode` is `allowlist`. Anonymous users whose + email matches an entry can request and verify a one-time-passcode. + + Because the entries carry recipient email addresses and the identity + of the user who added them, this field is only returned to users + with owner, co-owner, or editor access on the item. For viewer + collaborators and below the field is omitted. + + An allowlist contains at most 1000 entries, matching the limit + enforced when setting the allowlist on a shared link., defaults to None + :type allowlist: Optional[List[SharedLinkOtpAllowlistEntry]], optional + """ + super().__init__(**kwargs) + self.mode = mode + self.allowlist = allowlist + + class WebLinkSharedLinkField(BaseObject): def __init__( self, @@ -90,6 +133,7 @@ def __init__( is_password_enabled: bool, download_count: int, preview_count: int, + one_time_passcode: WebLinkSharedLinkOneTimePasscodeField, *, download_url: Optional[str] = None, vanity_url: Optional[str] = None, @@ -160,6 +204,7 @@ def __init__( self.is_password_enabled = is_password_enabled self.download_count = download_count self.preview_count = preview_count + self.one_time_passcode = one_time_passcode self.download_url = download_url self.vanity_url = vanity_url self.vanity_name = vanity_name diff --git a/docs/box_sdk_gen/README.md b/docs/box_sdk_gen/README.md index 271ddc11..44b951b1 100644 --- a/docs/box_sdk_gen/README.md +++ b/docs/box_sdk_gen/README.md @@ -29,6 +29,7 @@ the SDK are available by topic: - [Device pinners](device_pinners.md) - [Docgen](docgen.md) - [Docgen template](docgen_template.md) +- [Document split](document_split.md) - [Downloads](downloads.md) - [Email aliases](email_aliases.md) - [Enterprise configurations](enterprise_configurations.md) diff --git a/docs/box_sdk_gen/document_split.md b/docs/box_sdk_gen/document_split.md new file mode 100644 index 00000000..b3cbaf4a --- /dev/null +++ b/docs/box_sdk_gen/document_split.md @@ -0,0 +1,109 @@ +# DocumentSplitManager + +- [Create Document Split job](#create-document-split-job) +- [List Document Split jobs](#list-document-split-jobs) +- [Get Document Split job by ID](#get-document-split-job-by-id) + +## Create Document Split job + +Initiates a Document Split job for the supplied source file. The job runs +asynchronously; clients can poll the returned job ID to track progress. + +All split-specific input lives under `split_input`. When +`split_input.split_type` is `manual`, provide +`split_input.split_definition` (continuous page ranges; `version` may be +omitted or `v_1`). When `split_input.split_type` is `page_selection`, +provide `split_input.page_selection` (non-linear page segments; `version` +may be omitted or `v_2`). `split_input.prompt` must not be provided for +either of those variants. When `split_input.split_type` is `smart`, +`split_input.prompt` is required and neither +`split_input.split_definition` nor `split_input.page_selection` must be +provided. + +This operation is performed by calling function `create_document_split_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-document-splits/). + +_Currently we don't have an example for calling `create_document_split_v2026_r0` in integration tests_ + +### Arguments + +- source_file_id `str` + - The ID of the source file to split. +- destination_folder_id `str` + - The ID of the folder where the resulting files will be uploaded. +- input_source `CreateDocumentSplitV2026R0InputSource` + - The system that initiated the request, used for analytics and traceability. +- split_input `DocumentSplitCreateRequestTypeV2026R0` + +- external_id `Optional[str]` + - An optional identifier supplied by the caller for this Document Split job. The value is returned on job responses for correlation only. It is not a Box resource ID, is not required to be unique, and cannot be used to look up the job. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `DocumentSplitCreateResponseV2026R0`. + +The Document Split job was accepted for processing. Returns a reference +to the newly created job. + +## List Document Split jobs + +Returns a paginated list of Document Split jobs accessible to the +authenticated user. + +This operation is performed by calling function `get_document_splits_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-document-splits/). + +_Currently we don't have an example for calling `get_document_splits_v2026_r0` in integration tests_ + +### Arguments + +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `DocumentSplitsV2026R0`. + +Returns a paginated list of Document Split jobs. + +## Get Document Split job by ID + +Returns details for a single Document Split job identified by its ID, +including the current status, the input definition, and any output files +produced by the job. + +This operation is performed by calling function `get_document_split_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-document-splits-id/). + +_Currently we don't have an example for calling `get_document_split_by_id_v2026_r0` in integration tests_ + +### Arguments + +- document_split_id `str` + - The unique identifier for the Document Split job. Example: "1748426" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `DocumentSplitV2026R0`. + +Returns the Document Split job. diff --git a/docs/box_sdk_gen/users.md b/docs/box_sdk_gen/users.md index 530b636c..70ff76ad 100644 --- a/docs/box_sdk_gen/users.md +++ b/docs/box_sdk_gen/users.md @@ -285,6 +285,12 @@ still owns any content. To proceed, move their owned content first, or use the `force` parameter to delete the user and their files. +If the enterprise has a retention policy, including a retired one, or a +legal hold that is not fully released, you can't delete a user who owns +content, even with `force`. Transfer the user's content first by using the +[Transfer owned folders](https://developer.box.com/reference/put-users-id-folders-0) +endpoint. + This operation is performed by calling function `delete_user_by_id`. See the endpoint docs at @@ -303,7 +309,7 @@ client.users.delete_user_by_id(user.id) - notify `Optional[bool]` - Whether the user will receive email notification of the deletion. - force `Optional[bool]` - - Specifies whether to delete the user even if they still own files. + - Specifies whether to delete the user even if they still own files. If the user owns content and the enterprise has a retention policy, including a retired one, or a legal hold that is not fully released, setting `force` to `true` doesn't delete the user. The request returns a `403` error, and you must transfer the user's content before deleting the user. - extra_headers `Optional[Dict[str, Optional[str]]]` - Extra headers that will be included in the HTTP request. From 2325f7fc4402cf1ac5f7a791bf7876183ae78bde Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 28 Oct 2026 06:52:10 -0700 Subject: [PATCH 3/5] docs: (DDOC-1687) OTP for public shared links (box/box-openapi#622) --- .codegen.json | 2 +- box_sdk_gen/client.py | 5 + box_sdk_gen/managers/__init__.py | 2 + box_sdk_gen/managers/events.py | 8 + box_sdk_gen/managers/shuttle.py | 2636 +++++++++++++++++ box_sdk_gen/schemas/event.py | 3 + .../schemas/v2025_r0/archive_v2025_r0.py | 8 +- box_sdk_gen/schemas/v2026_r0/__init__.py | 116 + .../shuttle_agent_credentials_v2026_r0.py | 19 + .../shuttle_discovered_subject_v2026_r0.py | 53 + .../shuttle_discovered_subjects_v2026_r0.py | 40 + .../shuttle_job_create_request_v2026_r0.py | 149 + ...b_permission_conflict_strategy_v2026_r0.py | 10 + ...le_job_schedule_create_request_v2026_r0.py | 60 + ...le_job_schedule_trigger_by_job_v2026_r0.py | 42 + ...e_job_schedule_trigger_by_time_v2026_r0.py | 50 + .../shuttle_job_schedule_trigger_v2026_r0.py | 15 + ...le_job_schedule_update_request_v2026_r0.py | 56 + .../v2026_r0/shuttle_job_schedule_v2026_r0.py | 81 + .../shuttle_job_schedules_v2026_r0.py | 40 + .../shuttle_job_start_request_v2026_r0.py | 26 + .../shuttle_job_update_request_v2026_r0.py | 132 + .../schemas/v2026_r0/shuttle_job_v2026_r0.py | 214 ++ .../schemas/v2026_r0/shuttle_jobs_v2026_r0.py | 38 + .../shuttle_mapping_error_v2026_r0.py | 53 + .../shuttle_mapping_errors_v2026_r0.py | 40 + .../v2026_r0/shuttle_path_entries_v2026_r0.py | 40 + ...uttle_path_entry_account_scope_v2026_r0.py | 48 + .../shuttle_path_entry_scope_v2026_r0.py | 15 + ..._path_entry_shared_space_scope_v2026_r0.py | 34 + .../v2026_r0/shuttle_path_entry_v2026_r0.py | 76 + ...tle_path_mapping_account_input_v2026_r0.py | 20 + ...mapping_account_location_input_v2026_r0.py | 48 + ..._account_location_target_input_v2026_r0.py | 43 + ..._path_mapping_account_location_v2026_r0.py | 47 + .../shuttle_path_mapping_account_v2026_r0.py | 29 + ...le_path_mapping_create_request_v2026_r0.py | 56 + ..._mapping_import_create_request_v2026_r0.py | 19 + ...le_path_mapping_location_input_v2026_r0.py | 16 + .../shuttle_path_mapping_location_v2026_r0.py | 16 + ...ng_shared_space_location_input_v2026_r0.py | 47 + ...ed_space_location_target_input_v2026_r0.py | 42 + ..._mapping_shared_space_location_v2026_r0.py | 46 + ..._mapping_target_location_input_v2026_r0.py | 16 + ...le_path_mapping_update_request_v2026_r0.py | 51 + .../v2026_r0/shuttle_path_mapping_v2026_r0.py | 59 + .../shuttle_path_mappings_v2026_r0.py | 40 + .../shuttle_report_create_request_v2026_r0.py | 52 + .../shuttle_report_output_v2026_r0.py | 25 + .../v2026_r0/shuttle_report_v2026_r0.py | 98 + .../v2026_r0/shuttle_reports_v2026_r0.py | 38 + .../schemas/v2026_r0/shuttle_run_v2026_r0.py | 116 + .../schemas/v2026_r0/shuttle_runs_v2026_r0.py | 38 + ...subject_mapping_create_request_v2026_r0.py | 43 + ..._mapping_import_create_request_v2026_r0.py | 19 + ...subject_mapping_update_request_v2026_r0.py | 30 + .../shuttle_subject_mapping_v2026_r0.py | 63 + .../shuttle_subject_mappings_v2026_r0.py | 40 + .../v2026_r0/shuttle_subject_role_v2026_r0.py | 13 + .../v2026_r0/shuttle_subject_v2026_r0.py | 52 + .../shuttle_system_create_request_v2026_r0.py | 29 + .../shuttle_system_update_request_v2026_r0.py | 15 + .../v2026_r0/shuttle_system_v2026_r0.py | 57 + .../v2026_r0/shuttle_systems_v2026_r0.py | 38 + .../shuttle_target_subject_input_v2026_r0.py | 27 + .../shuttle_target_subject_v2026_r0.py | 44 + docs/box_sdk_gen/README.md | 1 + docs/box_sdk_gen/shuttle.md | 1290 ++++++++ 68 files changed, 6829 insertions(+), 5 deletions(-) create mode 100644 box_sdk_gen/managers/shuttle.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_agent_credentials_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_discovered_subject_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_discovered_subjects_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_create_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_permission_conflict_strategy_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_create_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_by_job_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_by_time_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_update_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_schedules_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_start_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_update_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_job_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_jobs_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_mapping_error_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_mapping_errors_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_entries_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_account_scope_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_scope_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_shared_space_scope_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_input_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_input_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_target_input_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_create_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_import_create_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_location_input_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_location_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_input_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_target_input_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_target_location_input_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_update_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_path_mappings_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_report_create_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_report_output_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_report_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_reports_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_run_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_runs_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_create_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_import_create_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_update_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_subject_mappings_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_subject_role_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_subject_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_system_create_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_system_update_request_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_system_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_systems_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_target_subject_input_v2026_r0.py create mode 100644 box_sdk_gen/schemas/v2026_r0/shuttle_target_subject_v2026_r0.py create mode 100644 docs/box_sdk_gen/shuttle.md diff --git a/.codegen.json b/.codegen.json index dc0a9908..4ae42f98 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "4c5a50b", "specHash": "fcfcd5d", "version": "4.19.0" } +{ "engineHash": "4c5a50b", "specHash": "ad8dbb8", "version": "4.19.0" } diff --git a/box_sdk_gen/client.py b/box_sdk_gen/client.py index 96b011d8..8bd2a0dc 100644 --- a/box_sdk_gen/client.py +++ b/box_sdk_gen/client.py @@ -202,6 +202,8 @@ from box_sdk_gen.managers.query import QueryManager +from box_sdk_gen.managers.shuttle import ShuttleManager + from box_sdk_gen.networking.auth import Authentication from box_sdk_gen.networking.network import NetworkSession @@ -484,6 +486,9 @@ def __init__( auth=self.auth, network_session=self.network_session ) self.query = QueryManager(auth=self.auth, network_session=self.network_session) + self.shuttle = ShuttleManager( + auth=self.auth, network_session=self.network_session + ) def make_request(self, fetch_options: FetchOptions) -> FetchResponse: """ diff --git a/box_sdk_gen/managers/__init__.py b/box_sdk_gen/managers/__init__.py index 84799626..ceffc281 100644 --- a/box_sdk_gen/managers/__init__.py +++ b/box_sdk_gen/managers/__init__.py @@ -171,3 +171,5 @@ from box_sdk_gen.managers.document_split import * from box_sdk_gen.managers.query import * + +from box_sdk_gen.managers.shuttle import * diff --git a/box_sdk_gen/managers/events.py b/box_sdk_gen/managers/events.py index abbf56dd..bd84e4ec 100644 --- a/box_sdk_gen/managers/events.py +++ b/box_sdk_gen/managers/events.py @@ -147,6 +147,8 @@ class GetEventsEventType(str, Enum): RENAME = 'RENAME' RETENTION_POLICY_ASSIGNMENT_ADD = 'RETENTION_POLICY_ASSIGNMENT_ADD' SHARE = 'SHARE' + SHARED_LINK_ONE_TIME_PASSCODE_ACCESS = 'SHARED_LINK_ONE_TIME_PASSCODE_ACCESS' + SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE = 'SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE' SHARED_LINK_SEND = 'SHARED_LINK_SEND' SHARE_EXPIRATION = 'SHARE_EXPIRATION' SHIELD_ALERT = 'SHIELD_ALERT' @@ -155,10 +157,12 @@ class GetEventsEventType(str, Enum): SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION = ( 'SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION' ) + SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED = 'SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED' SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED = 'SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED' SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION = ( 'SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION' ) + SHIELD_EXTERNAL_COLLAB_INVITE_JUSTIFIED = 'SHIELD_EXTERNAL_COLLAB_INVITE_JUSTIFIED' SHIELD_JUSTIFICATION_APPROVAL = 'SHIELD_JUSTIFICATION_APPROVAL' SHIELD_PREVIEW_BLOCKED = 'SHIELD_PREVIEW_BLOCKED' SHIELD_SHARED_LINK_ACCESS_BLOCKED = 'SHIELD_SHARED_LINK_ACCESS_BLOCKED' @@ -308,6 +312,8 @@ class GetEventStreamQueryParamsEventTypeField(str, Enum): RENAME = 'RENAME' RETENTION_POLICY_ASSIGNMENT_ADD = 'RETENTION_POLICY_ASSIGNMENT_ADD' SHARE = 'SHARE' + SHARED_LINK_ONE_TIME_PASSCODE_ACCESS = 'SHARED_LINK_ONE_TIME_PASSCODE_ACCESS' + SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE = 'SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE' SHARED_LINK_SEND = 'SHARED_LINK_SEND' SHARE_EXPIRATION = 'SHARE_EXPIRATION' SHIELD_ALERT = 'SHIELD_ALERT' @@ -316,10 +322,12 @@ class GetEventStreamQueryParamsEventTypeField(str, Enum): SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION = ( 'SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION' ) + SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED = 'SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED' SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED = 'SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED' SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION = ( 'SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION' ) + SHIELD_EXTERNAL_COLLAB_INVITE_JUSTIFIED = 'SHIELD_EXTERNAL_COLLAB_INVITE_JUSTIFIED' SHIELD_JUSTIFICATION_APPROVAL = 'SHIELD_JUSTIFICATION_APPROVAL' SHIELD_PREVIEW_BLOCKED = 'SHIELD_PREVIEW_BLOCKED' SHIELD_SHARED_LINK_ACCESS_BLOCKED = 'SHIELD_SHARED_LINK_ACCESS_BLOCKED' diff --git a/box_sdk_gen/managers/shuttle.py b/box_sdk_gen/managers/shuttle.py new file mode 100644 index 00000000..99072814 --- /dev/null +++ b/box_sdk_gen/managers/shuttle.py @@ -0,0 +1,2636 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Dict + +from box_sdk_gen.internal.utils import to_string + +from box_sdk_gen.serialization.json import deserialize + +from box_sdk_gen.serialization.json import serialize + +from typing import List + +from box_sdk_gen.internal.null_value import NullValue + +from typing import Union + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_permission_conflict_strategy_v2026_r0 import ( + ShuttleJobPermissionConflictStrategyV2026R0, +) + +from box_sdk_gen.networking.fetch_options import ResponseFormat + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_time_v2026_r0 import ( + ShuttleJobScheduleTriggerByTimeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_job_v2026_r0 import ( + ShuttleJobScheduleTriggerByJobV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_v2026_r0 import ( + ShuttleJobScheduleTriggerV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_input_v2026_r0 import ( + ShuttlePathMappingAccountLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_input_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_location_input_v2026_r0 import ( + ShuttlePathMappingLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_target_input_v2026_r0 import ( + ShuttlePathMappingAccountLocationTargetInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_target_input_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_target_location_input_v2026_r0 import ( + ShuttlePathMappingTargetLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_target_subject_input_v2026_r0 import ( + ShuttleTargetSubjectInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_systems_v2026_r0 import ShuttleSystemsV2026R0 + +from box_sdk_gen.schemas.v2026_r0.client_error_v2026_r0 import ClientErrorV2026R0 + +from box_sdk_gen.parameters.v2026_r0.box_version_header_v2026_r0 import ( + BoxVersionHeaderV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_system_v2026_r0 import ShuttleSystemV2026R0 + +from box_sdk_gen.schemas.v2026_r0.shuttle_system_create_request_v2026_r0 import ( + ShuttleSystemCreateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_system_update_request_v2026_r0 import ( + ShuttleSystemUpdateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_agent_credentials_v2026_r0 import ( + ShuttleAgentCredentialsV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_jobs_v2026_r0 import ShuttleJobsV2026R0 + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_v2026_r0 import ShuttleJobV2026R0 + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_create_request_v2026_r0 import ( + ShuttleJobCreateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_update_request_v2026_r0 import ( + ShuttleJobUpdateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_start_request_v2026_r0 import ( + ShuttleJobStartRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_runs_v2026_r0 import ShuttleRunsV2026R0 + +from box_sdk_gen.schemas.v2026_r0.shuttle_run_v2026_r0 import ShuttleRunV2026R0 + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedules_v2026_r0 import ( + ShuttleJobSchedulesV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_v2026_r0 import ( + ShuttleJobScheduleV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_create_request_v2026_r0 import ( + ShuttleJobScheduleCreateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_update_request_v2026_r0 import ( + ShuttleJobScheduleUpdateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mappings_v2026_r0 import ( + ShuttlePathMappingsV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_v2026_r0 import ( + ShuttlePathMappingV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_create_request_v2026_r0 import ( + ShuttlePathMappingCreateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_update_request_v2026_r0 import ( + ShuttlePathMappingUpdateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_import_create_request_v2026_r0 import ( + ShuttlePathMappingImportCreateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mapping_import_create_request_v2026_r0 import ( + ShuttleSubjectMappingImportCreateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mappings_v2026_r0 import ( + ShuttleSubjectMappingsV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mapping_v2026_r0 import ( + ShuttleSubjectMappingV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mapping_create_request_v2026_r0 import ( + ShuttleSubjectMappingCreateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mapping_update_request_v2026_r0 import ( + ShuttleSubjectMappingUpdateRequestV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_discovered_subjects_v2026_r0 import ( + ShuttleDiscoveredSubjectsV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entries_v2026_r0 import ( + ShuttlePathEntriesV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_mapping_errors_v2026_r0 import ( + ShuttleMappingErrorsV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_reports_v2026_r0 import ShuttleReportsV2026R0 + +from box_sdk_gen.schemas.v2026_r0.shuttle_report_v2026_r0 import ShuttleReportV2026R0 + +from box_sdk_gen.schemas.v2026_r0.shuttle_report_create_request_v2026_r0 import ( + ShuttleReportCreateRequestV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.networking.auth import Authentication + +from box_sdk_gen.networking.network import NetworkSession + +from box_sdk_gen.networking.fetch_options import FetchOptions + +from box_sdk_gen.networking.fetch_response import FetchResponse + +from box_sdk_gen.internal.utils import prepare_params + +from box_sdk_gen.internal.utils import to_string + +from box_sdk_gen.internal.utils import ByteStream + +from box_sdk_gen.serialization.json import sd_to_json + +from box_sdk_gen.serialization.json import SerializedData + + +class CreateShuttleSystemV2026R0SystemType(str, Enum): + WINDOWS = 'windows' + + +class CreateShuttleJobV2026R0JobType(str, Enum): + TRANSFER = 'transfer' + ANALYSIS = 'analysis' + + +class CreateShuttleJobV2026R0AccountMapping(BaseObject): + def __init__( + self, + *, + is_enabled: Optional[bool] = None, + permission_conflict_strategy: Optional[ + ShuttleJobPermissionConflictStrategyV2026R0 + ] = None, + are_external_shares_mapped: Optional[bool] = None, + are_permissions_mapped: Optional[bool] = None, + **kwargs + ): + """ + :param is_enabled: Whether account mapping is enabled for the shuttle job. Defaults to + `false` when `account_mapping` is omitted on create., defaults to None + :type is_enabled: Optional[bool], optional + :param permission_conflict_strategy: The strategy used to resolve permission conflicts. `null` when + unset., defaults to None + :type permission_conflict_strategy: Optional[ShuttleJobPermissionConflictStrategyV2026R0], optional + :param are_external_shares_mapped: Whether external shares are mapped during the migration., defaults to None + :type are_external_shares_mapped: Optional[bool], optional + :param are_permissions_mapped: Whether permissions are mapped during the migration., defaults to None + :type are_permissions_mapped: Optional[bool], optional + """ + super().__init__(**kwargs) + self.is_enabled = is_enabled + self.permission_conflict_strategy = permission_conflict_strategy + self.are_external_shares_mapped = are_external_shares_mapped + self.are_permissions_mapped = are_permissions_mapped + + +class CreateShuttleJobV2026R0Settings(BaseObject): + def __init__( + self, + *, + bandwidth_limit_bytes_per_sec: Optional[int] = None, + are_deletions_mirrored: Optional[bool] = None, + are_file_versions_synced: Optional[bool] = None, + max_file_versions: Optional[int] = None, + is_overwrite_enabled: Optional[bool] = None, + are_completed_mappings_skipped_on_rerun: Optional[bool] = None, + is_content_scanning_enabled: Optional[bool] = None, + include_shared_source_folders: Optional[bool] = None, + include_shared_destination_folders: Optional[bool] = None, + **kwargs + ): + """ + :param bandwidth_limit_bytes_per_sec: The maximum transfer bandwidth in bytes per second. `null` when + unlimited., defaults to None + :type bandwidth_limit_bytes_per_sec: Optional[int], optional + :param are_deletions_mirrored: Whether deletions in the source system are mirrored in Box., defaults to None + :type are_deletions_mirrored: Optional[bool], optional + :param are_file_versions_synced: Whether prior file versions are synced during the migration., defaults to None + :type are_file_versions_synced: Optional[bool], optional + :param max_file_versions: The maximum number of file versions to sync. `null` when unlimited., defaults to None + :type max_file_versions: Optional[int], optional + :param is_overwrite_enabled: Whether existing files in Box are overwritten., defaults to None + :type is_overwrite_enabled: Optional[bool], optional + :param are_completed_mappings_skipped_on_rerun: Whether mappings that already completed successfully are skipped when + the job is rerun., defaults to None + :type are_completed_mappings_skipped_on_rerun: Optional[bool], optional + :param is_content_scanning_enabled: Whether migrated content is scanned during the migration. Applies + only when the source system supports content scanning; ignored + otherwise., defaults to None + :type is_content_scanning_enabled: Optional[bool], optional + :param include_shared_source_folders: Whether shared folders on the source are included in the migration. + Applies only when the source system supports shared folders; ignored + otherwise., defaults to None + :type include_shared_source_folders: Optional[bool], optional + :param include_shared_destination_folders: Whether shared folders on the destination are included in the + migration. Applies only when the destination system supports shared + folders; ignored otherwise., defaults to None + :type include_shared_destination_folders: Optional[bool], optional + """ + super().__init__(**kwargs) + self.bandwidth_limit_bytes_per_sec = bandwidth_limit_bytes_per_sec + self.are_deletions_mirrored = are_deletions_mirrored + self.are_file_versions_synced = are_file_versions_synced + self.max_file_versions = max_file_versions + self.is_overwrite_enabled = is_overwrite_enabled + self.are_completed_mappings_skipped_on_rerun = ( + are_completed_mappings_skipped_on_rerun + ) + self.is_content_scanning_enabled = is_content_scanning_enabled + self.include_shared_source_folders = include_shared_source_folders + self.include_shared_destination_folders = include_shared_destination_folders + + +class UpdateShuttleJobByIdV2026R0AccountMapping(BaseObject): + def __init__( + self, + *, + is_enabled: Optional[bool] = None, + permission_conflict_strategy: Optional[ + ShuttleJobPermissionConflictStrategyV2026R0 + ] = None, + are_external_shares_mapped: Optional[bool] = None, + are_permissions_mapped: Optional[bool] = None, + **kwargs + ): + """ + :param is_enabled: Whether account mapping is enabled for the shuttle job., defaults to None + :type is_enabled: Optional[bool], optional + :param permission_conflict_strategy: The strategy used to resolve permission conflicts. `null` when + unset., defaults to None + :type permission_conflict_strategy: Optional[ShuttleJobPermissionConflictStrategyV2026R0], optional + :param are_external_shares_mapped: Whether external shares are mapped during the migration., defaults to None + :type are_external_shares_mapped: Optional[bool], optional + :param are_permissions_mapped: Whether permissions are mapped during the migration., defaults to None + :type are_permissions_mapped: Optional[bool], optional + """ + super().__init__(**kwargs) + self.is_enabled = is_enabled + self.permission_conflict_strategy = permission_conflict_strategy + self.are_external_shares_mapped = are_external_shares_mapped + self.are_permissions_mapped = are_permissions_mapped + + +class UpdateShuttleJobByIdV2026R0Settings(BaseObject): + def __init__( + self, + *, + bandwidth_limit_bytes_per_sec: Optional[int] = None, + are_deletions_mirrored: Optional[bool] = None, + are_file_versions_synced: Optional[bool] = None, + max_file_versions: Optional[int] = None, + is_overwrite_enabled: Optional[bool] = None, + are_completed_mappings_skipped_on_rerun: Optional[bool] = None, + is_content_scanning_enabled: Optional[bool] = None, + include_shared_source_folders: Optional[bool] = None, + include_shared_destination_folders: Optional[bool] = None, + **kwargs + ): + """ + :param bandwidth_limit_bytes_per_sec: The maximum transfer bandwidth in bytes per second. `null` when + unlimited., defaults to None + :type bandwidth_limit_bytes_per_sec: Optional[int], optional + :param are_deletions_mirrored: Whether deletions in the source system are mirrored in Box., defaults to None + :type are_deletions_mirrored: Optional[bool], optional + :param are_file_versions_synced: Whether prior file versions are synced during the migration., defaults to None + :type are_file_versions_synced: Optional[bool], optional + :param max_file_versions: The maximum number of file versions to sync. `null` when unlimited., defaults to None + :type max_file_versions: Optional[int], optional + :param is_overwrite_enabled: Whether existing files in Box are overwritten., defaults to None + :type is_overwrite_enabled: Optional[bool], optional + :param are_completed_mappings_skipped_on_rerun: Whether mappings that already completed successfully are skipped when + the job is rerun., defaults to None + :type are_completed_mappings_skipped_on_rerun: Optional[bool], optional + :param is_content_scanning_enabled: Whether migrated content is scanned during the migration. Applies + only when the source system supports content scanning; ignored + otherwise., defaults to None + :type is_content_scanning_enabled: Optional[bool], optional + :param include_shared_source_folders: Whether shared folders on the source are included in the migration. + Applies only when the source system supports shared folders; ignored + otherwise., defaults to None + :type include_shared_source_folders: Optional[bool], optional + :param include_shared_destination_folders: Whether shared folders on the destination are included in the + migration. Applies only when the destination system supports shared + folders; ignored otherwise., defaults to None + :type include_shared_destination_folders: Optional[bool], optional + """ + super().__init__(**kwargs) + self.bandwidth_limit_bytes_per_sec = bandwidth_limit_bytes_per_sec + self.are_deletions_mirrored = are_deletions_mirrored + self.are_file_versions_synced = are_file_versions_synced + self.max_file_versions = max_file_versions + self.is_overwrite_enabled = is_overwrite_enabled + self.are_completed_mappings_skipped_on_rerun = ( + are_completed_mappings_skipped_on_rerun + ) + self.is_content_scanning_enabled = is_content_scanning_enabled + self.include_shared_source_folders = include_shared_source_folders + self.include_shared_destination_folders = include_shared_destination_folders + + +class CreateShuttleJobStartV2026R0Mode(str, Enum): + TRANSFER = 'transfer' + SIMULATION = 'simulation' + SCAN = 'scan' + ANALYSIS = 'analysis' + + +class CreateShuttleJobScheduleV2026R0RunMode(str, Enum): + TRANSFER = 'transfer' + SIMULATION = 'simulation' + ANALYSIS = 'analysis' + + +class CreateShuttleJobScheduleV2026R0State(str, Enum): + ENABLED = 'enabled' + PAUSED = 'paused' + + +class UpdateShuttleJobScheduleByIdV2026R0State(str, Enum): + ENABLED = 'enabled' + PAUSED = 'paused' + + +class UpdateShuttleJobScheduleByIdV2026R0RunMode(str, Enum): + TRANSFER = 'transfer' + SIMULATION = 'simulation' + ANALYSIS = 'analysis' + + +class GetShuttlePathEntriesV2026R0Side(str, Enum): + SOURCE = 'source' + TARGET = 'target' + + +class CreateShuttleReportV2026R0Format(str, Enum): + XLSX = 'xlsx' + CSV = 'csv' + + +class CreateShuttleReportV2026R0UsersScope(str, Enum): + MIGRATED = 'migrated' + ALL = 'all' + + +class ShuttleManager: + def __init__( + self, + *, + auth: Optional[Authentication] = None, + network_session: Optional[NetworkSession] = None + ): + if network_session is None: + network_session = NetworkSession() + self.auth = auth + self.network_session = network_session + + def get_shuttle_systems_v2026_r0( + self, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleSystemsV2026R0: + """ + Returns a paginated list of shuttle systems accessible to the + + authenticated user. + + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + {'marker': to_string(marker), 'limit': to_string(limit)} + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/shuttle_systems'] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleSystemsV2026R0) + + def create_shuttle_system_v2026_r0( + self, + name: str, + *, + system_type: CreateShuttleSystemV2026R0SystemType = CreateShuttleSystemV2026R0SystemType.WINDOWS, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleSystemV2026R0: + """ + Creates a new shuttle system. Only Windows agent systems can be created + + through the public API; other system types must be configured through the + + + Shuttle application. + + :param name: The display name for the new shuttle system. + :type name: str + :param system_type: The public system type identifier for the new shuttle system. Only + `windows` is currently supported through the public API., defaults to CreateShuttleSystemV2026R0SystemType.WINDOWS + :type system_type: CreateShuttleSystemV2026R0SystemType, optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = {'name': name, 'system_type': system_type} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/shuttle_systems'] + ), + method='POST', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleSystemV2026R0) + + def get_shuttle_system_by_id_v2026_r0( + self, + shuttle_system_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleSystemV2026R0: + """ + Returns details for a single shuttle system identified by its ID, + + including its type and connection state. + + :param shuttle_system_id: The unique identifier for the shuttle system. + Example: "6a315c0754833bfc5df067bf" + :type shuttle_system_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_systems/', + to_string(shuttle_system_id), + ] + ), + method='GET', + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleSystemV2026R0) + + def update_shuttle_system_by_id_v2026_r0( + self, + shuttle_system_id: str, + *, + name: Optional[str] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleSystemV2026R0: + """ + Updates the mutable properties of an existing shuttle system identified by + + its ID. Only the fields supplied in the request body are changed. + + :param shuttle_system_id: The unique identifier for the shuttle system. + Example: "6a315c0754833bfc5df067bf" + :type shuttle_system_id: str + :param name: The updated display name for the shuttle system., defaults to None + :type name: Optional[str], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = {'name': name} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_systems/', + to_string(shuttle_system_id), + ] + ), + method='PUT', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleSystemV2026R0) + + def delete_shuttle_system_by_id_v2026_r0( + self, + shuttle_system_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Permanently deletes the shuttle system identified by its ID. This does not + + affect content that has already been migrated. + + :param shuttle_system_id: The unique identifier for the shuttle system. + Example: "6a315c0754833bfc5df067bf" + :type shuttle_system_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_systems/', + to_string(shuttle_system_id), + ] + ), + method='DELETE', + headers=headers_map, + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def create_shuttle_system_issue_registration_token_v2026_r0( + self, + shuttle_system_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleAgentCredentialsV2026R0: + """ + Issues a new installation token for the Windows shuttle system identified + + by its ID. Paste the returned token into the Windows agent installer to + + + register the agent with this system. + + :param shuttle_system_id: The unique identifier for the shuttle system. + Example: "6a315c0754833bfc5df067bf" + :type shuttle_system_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_systems/', + to_string(shuttle_system_id), + '/issue_registration_token', + ] + ), + method='POST', + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleAgentCredentialsV2026R0) + + def get_shuttle_jobs_v2026_r0( + self, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleJobsV2026R0: + """ + Returns a paginated list of shuttle jobs accessible to the authenticated + + user. + + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + {'marker': to_string(marker), 'limit': to_string(limit)} + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/shuttle_jobs'] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleJobsV2026R0) + + def create_shuttle_job_v2026_r0( + self, + name: str, + job_type: CreateShuttleJobV2026R0JobType, + source_system_id: str, + *, + comment: Optional[str] = None, + tags: Optional[List[str]] = None, + account_mapping: Optional[CreateShuttleJobV2026R0AccountMapping] = None, + settings: Optional[CreateShuttleJobV2026R0Settings] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleJobV2026R0: + """ + Creates a new shuttle job that describes a migration from the given source + + system into Box. + + :param name: The human-readable name of the shuttle job. + :type name: str + :param job_type: The type of work the shuttle job performs. + :type job_type: CreateShuttleJobV2026R0JobType + :param source_system_id: The unique identifier of the source system to migrate from. + :type source_system_id: str + :param comment: An optional free-form comment describing the shuttle job., defaults to None + :type comment: Optional[str], optional + :param tags: A list of free-form tags associated with the shuttle job., defaults to None + :type tags: Optional[List[str]], optional + :param account_mapping: The account mapping configuration that controls how source identities + and permissions are translated into Box. When this object is omitted, + the job is created with `is_enabled` set to `false`., defaults to None + :type account_mapping: Optional[CreateShuttleJobV2026R0AccountMapping], optional + :param settings: The tunable settings that control how the shuttle job runs., defaults to None + :type settings: Optional[CreateShuttleJobV2026R0Settings], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'name': name, + 'job_type': job_type, + 'source_system_id': source_system_id, + 'comment': comment, + 'tags': tags, + 'account_mapping': account_mapping, + 'settings': settings, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/shuttle_jobs'] + ), + method='POST', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleJobV2026R0) + + def get_shuttle_job_by_id_v2026_r0( + self, + shuttle_job_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleJobV2026R0: + """ + Returns details for a single shuttle job identified by its ID, including + + its current state, mapping-preparation state, and configured source system. + + :param shuttle_job_id: The unique identifier for the shuttle job. + Example: "6a3ba68e810d9156194530a1" + :type shuttle_job_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_jobs/', + to_string(shuttle_job_id), + ] + ), + method='GET', + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleJobV2026R0) + + def update_shuttle_job_by_id_v2026_r0( + self, + shuttle_job_id: str, + *, + name: Optional[str] = None, + comment: Union[Optional[str], NullValue] = None, + tags: Optional[List[str]] = None, + account_mapping: Optional[UpdateShuttleJobByIdV2026R0AccountMapping] = None, + settings: Optional[UpdateShuttleJobByIdV2026R0Settings] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleJobV2026R0: + """ + Updates the mutable properties of an existing shuttle job identified by its + + ID. Only the fields supplied in the request body are changed. + + :param shuttle_job_id: The unique identifier for the shuttle job. + Example: "6a3ba68e810d9156194530a1" + :type shuttle_job_id: str + :param name: The human-readable name of the shuttle job., defaults to None + :type name: Optional[str], optional + :param comment: An optional free-form comment describing the shuttle job., defaults to None + :type comment: Union[Optional[str], NullValue], optional + :param tags: A list of free-form tags associated with the shuttle job., defaults to None + :type tags: Optional[List[str]], optional + :param account_mapping: The account mapping configuration that controls how source identities + and permissions are translated into Box., defaults to None + :type account_mapping: Optional[UpdateShuttleJobByIdV2026R0AccountMapping], optional + :param settings: The tunable settings that control how the shuttle job runs., defaults to None + :type settings: Optional[UpdateShuttleJobByIdV2026R0Settings], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'name': name, + 'comment': comment, + 'tags': tags, + 'account_mapping': account_mapping, + 'settings': settings, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_jobs/', + to_string(shuttle_job_id), + ] + ), + method='PUT', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleJobV2026R0) + + def delete_shuttle_job_by_id_v2026_r0( + self, + shuttle_job_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Permanently deletes the shuttle job identified by its ID. This does not + + affect content that has already been migrated. + + :param shuttle_job_id: The unique identifier for the shuttle job. + Example: "6a3ba68e810d9156194530a1" + :type shuttle_job_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_jobs/', + to_string(shuttle_job_id), + ] + ), + method='DELETE', + headers=headers_map, + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def create_shuttle_job_start_v2026_r0( + self, + shuttle_job_id: str, + *, + mode: Optional[CreateShuttleJobStartV2026R0Mode] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Starts the job in the given mode. When no body is provided the job runs in + + simulation mode. + + :param shuttle_job_id: The unique identifier for the shuttle job. + Example: "6a3ba68e810d9156194530a1" + :type shuttle_job_id: str + :param mode: The run mode. Defaults to simulation when omitted., defaults to None + :type mode: Optional[CreateShuttleJobStartV2026R0Mode], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = {'mode': mode} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_jobs/', + to_string(shuttle_job_id), + '/start', + ] + ), + method='POST', + headers=headers_map, + data=serialize(request_body) if not request_body == None else None, + content_type='application/json', + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def create_shuttle_job_stop_v2026_r0( + self, + shuttle_job_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Stops a running shuttle job identified by its ID. Any work already in + + progress is allowed to finish before the job transitions to a stopped + + + state. + + :param shuttle_job_id: The unique identifier for the shuttle job. + Example: "6a3ba68e810d9156194530a1" + :type shuttle_job_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_jobs/', + to_string(shuttle_job_id), + '/stop', + ] + ), + method='POST', + headers=headers_map, + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def create_shuttle_job_prepare_migration_v2026_r0( + self, + shuttle_job_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Validates the configured account and path mappings before a transfer. Only + + relevant when account mapping is enabled. + + :param shuttle_job_id: The unique identifier for the shuttle job. + Example: "6a3ba68e810d9156194530a1" + :type shuttle_job_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_jobs/', + to_string(shuttle_job_id), + '/prepare_migration', + ] + ), + method='POST', + headers=headers_map, + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def get_shuttle_runs_v2026_r0( + self, + job_id: str, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleRunsV2026R0: + """ + Returns a paginated list of runs for the shuttle job identified by + + `job_id`. + + :param job_id: The unique identifier of the shuttle job whose runs to list. + :type job_id: str + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + { + 'job_id': to_string(job_id), + 'marker': to_string(marker), + 'limit': to_string(limit), + } + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/shuttle_runs'] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleRunsV2026R0) + + def get_shuttle_run_by_id_v2026_r0( + self, + shuttle_run_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleRunV2026R0: + """ + Returns details for a single shuttle run identified by its ID, including + + its mode, state, timing, and transfer statistics. + + :param shuttle_run_id: The unique identifier for the shuttle run, in the form + `{job_id}:{run_number}`. + Example: "6a3ba68e810d9156194530a1:42" + :type shuttle_run_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_runs/', + to_string(shuttle_run_id), + ] + ), + method='GET', + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleRunV2026R0) + + def get_shuttle_job_schedules_v2026_r0( + self, + job_id: str, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleJobSchedulesV2026R0: + """ + Returns a paginated list of schedules for the shuttle job identified by + + `job_id`. + + :param job_id: The unique identifier of the shuttle job whose schedules to list. + :type job_id: str + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + { + 'job_id': to_string(job_id), + 'marker': to_string(marker), + 'limit': to_string(limit), + } + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_job_schedules', + ] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleJobSchedulesV2026R0) + + def create_shuttle_job_schedule_v2026_r0( + self, + job_id: str, + run_mode: CreateShuttleJobScheduleV2026R0RunMode, + trigger: ShuttleJobScheduleTriggerV2026R0, + *, + state: Optional[CreateShuttleJobScheduleV2026R0State] = None, + description: Union[Optional[str], NullValue] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleJobScheduleV2026R0: + """ + Creates a schedule that starts runs of the shuttle job identified by + + `job_id`. The schedule starts a run either at a wall-clock time or after + + + another job's run meets a condition. Schedules cannot start a run in + + + `scan` mode. + + :param job_id: The unique identifier of the shuttle job this schedule belongs to. + :type job_id: str + :param run_mode: The kind of run the schedule starts. `scan` is not a valid schedule + run mode. + :type run_mode: CreateShuttleJobScheduleV2026R0RunMode + :param state: Whether the schedule is active. When omitted, defaults to `enabled`., defaults to None + :type state: Optional[CreateShuttleJobScheduleV2026R0State], optional + :param description: An optional human-readable description of the schedule., defaults to None + :type description: Union[Optional[str], NullValue], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'job_id': job_id, + 'run_mode': run_mode, + 'state': state, + 'description': description, + 'trigger': trigger, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_job_schedules', + ] + ), + method='POST', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleJobScheduleV2026R0) + + def get_shuttle_job_schedule_by_id_v2026_r0( + self, + shuttle_job_schedule_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleJobScheduleV2026R0: + """ + Retrieves the shuttle job schedule identified by its ID. + :param shuttle_job_schedule_id: The unique identifier for the shuttle job schedule. + Example: "7c1ba68e810d9156194530b2" + :type shuttle_job_schedule_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_job_schedules/', + to_string(shuttle_job_schedule_id), + ] + ), + method='GET', + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleJobScheduleV2026R0) + + def update_shuttle_job_schedule_by_id_v2026_r0( + self, + shuttle_job_schedule_id: str, + *, + state: Optional[UpdateShuttleJobScheduleByIdV2026R0State] = None, + run_mode: Optional[UpdateShuttleJobScheduleByIdV2026R0RunMode] = None, + description: Union[Optional[str], NullValue] = None, + trigger: Optional[ShuttleJobScheduleTriggerV2026R0] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleJobScheduleV2026R0: + """ + Updates the mutable properties of an existing shuttle job schedule + + identified by its ID. Only the fields supplied in the request body are + + + changed. The owning job cannot be changed. + + :param shuttle_job_schedule_id: The unique identifier for the shuttle job schedule. + Example: "7c1ba68e810d9156194530b2" + :type shuttle_job_schedule_id: str + :param state: Whether the schedule is active., defaults to None + :type state: Optional[UpdateShuttleJobScheduleByIdV2026R0State], optional + :param run_mode: The kind of run the schedule starts. `scan` is not a valid schedule + run mode., defaults to None + :type run_mode: Optional[UpdateShuttleJobScheduleByIdV2026R0RunMode], optional + :param description: An optional human-readable description of the schedule., defaults to None + :type description: Union[Optional[str], NullValue], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'state': state, + 'run_mode': run_mode, + 'description': description, + 'trigger': trigger, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_job_schedules/', + to_string(shuttle_job_schedule_id), + ] + ), + method='PUT', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleJobScheduleV2026R0) + + def delete_shuttle_job_schedule_by_id_v2026_r0( + self, + shuttle_job_schedule_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Permanently deletes the shuttle job schedule identified by its ID. This + + does not affect runs that have already started. + + :param shuttle_job_schedule_id: The unique identifier for the shuttle job schedule. + Example: "7c1ba68e810d9156194530b2" + :type shuttle_job_schedule_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_job_schedules/', + to_string(shuttle_job_schedule_id), + ] + ), + method='DELETE', + headers=headers_map, + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def get_shuttle_path_mappings_v2026_r0( + self, + job_id: str, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttlePathMappingsV2026R0: + """ + Returns a paginated list of path mappings for the shuttle job identified + + by `job_id`. + + :param job_id: The unique identifier of the shuttle job whose path mappings to list. + :type job_id: str + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + { + 'job_id': to_string(job_id), + 'marker': to_string(marker), + 'limit': to_string(limit), + } + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_path_mappings', + ] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttlePathMappingsV2026R0) + + def create_shuttle_path_mapping_v2026_r0( + self, + job_id: str, + source: ShuttlePathMappingLocationInputV2026R0, + *, + is_path_skipped: Optional[bool] = None, + target: Optional[ShuttlePathMappingTargetLocationInputV2026R0] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttlePathMappingV2026R0: + """ + Creates a path mapping that connects a source location on the migrated + + system to a destination in Box for the given shuttle job. + + :param job_id: The unique identifier of the shuttle job this mapping belongs to. + :type job_id: str + :param is_path_skipped: Whether this source path should be skipped during the migration. + Defaults to `false`., defaults to None + :type is_path_skipped: Optional[bool], optional + :param target: The destination location to migrate to. Omit or set to `null` when the + source path is skipped., defaults to None + :type target: Optional[ShuttlePathMappingTargetLocationInputV2026R0], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'job_id': job_id, + 'is_path_skipped': is_path_skipped, + 'source': source, + 'target': target, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_path_mappings', + ] + ), + method='POST', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttlePathMappingV2026R0) + + def get_shuttle_path_mapping_by_id_v2026_r0( + self, + shuttle_path_mapping_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttlePathMappingV2026R0: + """ + Returns details for a single shuttle path mapping identified by its ID, + + including the source location and destination, if any. + + :param shuttle_path_mapping_id: The unique identifier for the shuttle path mapping. + Example: "6a3ba7a24ea17bc9461eeacd" + :type shuttle_path_mapping_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_path_mappings/', + to_string(shuttle_path_mapping_id), + ] + ), + method='GET', + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttlePathMappingV2026R0) + + def update_shuttle_path_mapping_by_id_v2026_r0( + self, + shuttle_path_mapping_id: str, + *, + is_path_skipped: Optional[bool] = None, + source: Optional[ShuttlePathMappingLocationInputV2026R0] = None, + target: Optional[ShuttlePathMappingTargetLocationInputV2026R0] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttlePathMappingV2026R0: + """ + Updates the mutable properties of an existing shuttle path mapping + + identified by its ID. Only the fields supplied in the request body are + + + changed. + + :param shuttle_path_mapping_id: The unique identifier for the shuttle path mapping. + Example: "6a3ba7a24ea17bc9461eeacd" + :type shuttle_path_mapping_id: str + :param is_path_skipped: Whether this source path should be skipped during the migration., defaults to None + :type is_path_skipped: Optional[bool], optional + :param target: The destination location to migrate to. Set to `null` to clear the + destination, for example when skipping the source path., defaults to None + :type target: Optional[ShuttlePathMappingTargetLocationInputV2026R0], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'is_path_skipped': is_path_skipped, + 'source': source, + 'target': target, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_path_mappings/', + to_string(shuttle_path_mapping_id), + ] + ), + method='PUT', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttlePathMappingV2026R0) + + def delete_shuttle_path_mapping_by_id_v2026_r0( + self, + shuttle_path_mapping_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Permanently deletes the shuttle path mapping identified by its ID. This + + does not affect content that has already been migrated. + + :param shuttle_path_mapping_id: The unique identifier for the shuttle path mapping. + Example: "6a3ba7a24ea17bc9461eeacd" + :type shuttle_path_mapping_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_path_mappings/', + to_string(shuttle_path_mapping_id), + ] + ), + method='DELETE', + headers=headers_map, + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def create_shuttle_path_mapping_import_v2026_r0( + self, + job_id: str, + file_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Accepts a spreadsheet of path mappings, already stored in Box, and replaces + + the job's path mappings. + + + A file that is not a mapping workbook, or that exceeds the size or row + + + limits (10 MiB Box download limit; 100,000 mapping rows), returns `400` + + + synchronously and leaves the job unchanged. + + + An accepted import always replaces every path mapping on the job. When all + + + rows are valid the workbook is deployed in full. When any row is invalid + + + the job ends with no path mappings and `mapping_state` becomes + + + `paths_import_rejected` until the next import or the next manual + + + path-mapping change. Row problems are listed by + + + `GET /shuttle_mapping_errors?job_id=…` with category `path_import`, messages + + + of the form `Row N: …`, at most 500 entries plus one overflow entry. + + + Validation and deployment are asynchronous after acceptance. Poll + + + `GET /shuttle_jobs/{shuttle_job_id}` while `mapping_state` is + + + `importing_paths`. Only one import may be in flight per job. + + :param job_id: The unique identifier of the shuttle job whose path mappings are + replaced. + :type job_id: str + :param file_id: The unique identifier of the Box file holding the mapping workbook. The + file is read as the calling user, so it must live somewhere that user can + download from. + :type file_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = {'job_id': job_id, 'file_id': file_id} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_path_mapping_imports', + ] + ), + method='POST', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def create_shuttle_subject_mapping_import_v2026_r0( + self, + job_id: str, + file_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Accepts a spreadsheet of subject (user and group) mappings, already stored + + in Box, and replaces the job's subject mappings. + + + A file that is not a subject-mapping workbook, or that exceeds the size or + + + row limits (10 MiB Box download limit; 50,000 mapping rows), returns `400` + + + synchronously and leaves the job unchanged. + + + An accepted import always replaces every subject mapping on the job. When + + + all rows are valid the workbook is deployed in full. When any row is + + + invalid the job ends with no subject mappings and `mapping_state` becomes + + + `subjects_import_rejected` until the next import or the next manual + + + subject-mapping change. Row problems are listed by + + + `GET /shuttle_mapping_errors?job_id=…` with category `subject_import`, + + + messages of the form `Row N: …`, at most 500 entries plus one overflow + + + entry. + + + Validation and deployment are asynchronous after acceptance. Poll + + + `GET /shuttle_jobs/{shuttle_job_id}` while `mapping_state` is + + + `importing_subjects`. Only one import may be in flight per job. The job + + + must map subjects (`account_mapping` enabled) and its source scan must be + + + finished; otherwise the request returns `409`. + + + Expected workbook format (API clients cannot download the UI template): + + + sheets `Users` and/or `Groups` (a sheet named `Subjects` is also accepted). + + + Columns are `Source User `, `Target User `, `Skip` on `Users`, + + + and `Source Group `, `Target Group `, `Skip` on `Groups`, where + + + `` is the primary identifier for that role and system: + + + - Users: `Email` for most systems; `ID` for `SharePoint` (2007/2010/2013); + + + `Name` for Windows (`windows_union`, stored as the user id). + + + - Groups: `Name` for most systems; `Email` for Google Drive admin groups. + + + Source rows for a template can be taken from + + + `GET /shuttle_discovered_subjects`. + + :param job_id: The unique identifier of the shuttle job whose subject mappings are + replaced. + :type job_id: str + :param file_id: The unique identifier of the Box file holding the mapping workbook. The + file is read as the calling user, so it must live somewhere that user can + download from. + :type file_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = {'job_id': job_id, 'file_id': file_id} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_subject_mapping_imports', + ] + ), + method='POST', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def get_shuttle_subject_mappings_v2026_r0( + self, + job_id: str, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleSubjectMappingsV2026R0: + """ + Returns a paginated list of subject mappings for the shuttle job identified + + by `job_id`. + + :param job_id: The unique identifier of the shuttle job whose subject mappings to list. + :type job_id: str + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + { + 'job_id': to_string(job_id), + 'marker': to_string(marker), + 'limit': to_string(limit), + } + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_subject_mappings', + ] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleSubjectMappingsV2026R0) + + def create_shuttle_subject_mapping_v2026_r0( + self, + job_id: str, + discovered_subject_id: str, + *, + revision: Optional[int] = None, + is_subject_skipped: Optional[bool] = None, + target: Optional[ShuttleTargetSubjectInputV2026R0] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleSubjectMappingV2026R0: + """ + Creates a subject mapping that connects a discovered source subject to a + + Box user or group for the given shuttle job. + + :param job_id: The unique identifier of the shuttle job this mapping belongs to. + :type job_id: str + :param discovered_subject_id: The unique identifier of the discovered subject to map. + :type discovered_subject_id: str + :param revision: The discovery-requirements revision to resolve against. Omit to use the + latest revision., defaults to None + :type revision: Optional[int], optional + :param is_subject_skipped: Whether this subject should be skipped during the migration. Defaults + to `false`., defaults to None + :type is_subject_skipped: Optional[bool], optional + :param target: The Box target to map to. Omit or set to `null` when the subject is + skipped., defaults to None + :type target: Optional[ShuttleTargetSubjectInputV2026R0], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'job_id': job_id, + 'discovered_subject_id': discovered_subject_id, + 'revision': revision, + 'is_subject_skipped': is_subject_skipped, + 'target': target, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_subject_mappings', + ] + ), + method='POST', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleSubjectMappingV2026R0) + + def get_shuttle_subject_mapping_by_id_v2026_r0( + self, + shuttle_subject_mapping_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleSubjectMappingV2026R0: + """ + Returns details for a single shuttle subject mapping identified by its ID, + + including the source subject and Box target, if any. + + :param shuttle_subject_mapping_id: The unique identifier for the shuttle subject mapping. + Example: "6a3ba7b12ea17bc9461eeace" + :type shuttle_subject_mapping_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_subject_mappings/', + to_string(shuttle_subject_mapping_id), + ] + ), + method='GET', + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleSubjectMappingV2026R0) + + def update_shuttle_subject_mapping_by_id_v2026_r0( + self, + shuttle_subject_mapping_id: str, + *, + is_subject_skipped: Optional[bool] = None, + target: Optional[ShuttleTargetSubjectInputV2026R0] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleSubjectMappingV2026R0: + """ + Updates the mutable properties of an existing shuttle subject mapping + + identified by its ID. Only the fields supplied in the request body are + + + changed. + + :param shuttle_subject_mapping_id: The unique identifier for the shuttle subject mapping. + Example: "6a3ba7b12ea17bc9461eeace" + :type shuttle_subject_mapping_id: str + :param is_subject_skipped: Whether this subject should be skipped during the migration., defaults to None + :type is_subject_skipped: Optional[bool], optional + :param target: The Box target to map to. Set to `null` only for a skipped subject. + Setting it to `null` while the mapping is active fails validation. + Updating `is_subject_skipped` alone preserves the existing target., defaults to None + :type target: Optional[ShuttleTargetSubjectInputV2026R0], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'is_subject_skipped': is_subject_skipped, + 'target': target, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_subject_mappings/', + to_string(shuttle_subject_mapping_id), + ] + ), + method='PUT', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleSubjectMappingV2026R0) + + def delete_shuttle_subject_mapping_by_id_v2026_r0( + self, + shuttle_subject_mapping_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> None: + """ + Permanently deletes the shuttle subject mapping identified by its ID. + :param shuttle_subject_mapping_id: The unique identifier for the shuttle subject mapping. + Example: "6a3ba7b12ea17bc9461eeace" + :type shuttle_subject_mapping_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_subject_mappings/', + to_string(shuttle_subject_mapping_id), + ] + ), + method='DELETE', + headers=headers_map, + response_format=ResponseFormat.NO_CONTENT, + auth=self.auth, + network_session=self.network_session, + ) + ) + return None + + def get_shuttle_discovered_subjects_v2026_r0( + self, + job_id: str, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleDiscoveredSubjectsV2026R0: + """ + Returns a paginated list of subjects discovered on the source system for + + the shuttle job identified by `job_id`. + + :param job_id: The unique identifier of the shuttle job whose discovered subjects to list. + :type job_id: str + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + { + 'job_id': to_string(job_id), + 'marker': to_string(marker), + 'limit': to_string(limit), + } + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_discovered_subjects', + ] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleDiscoveredSubjectsV2026R0) + + def get_shuttle_path_entries_v2026_r0( + self, + job_id: str, + side: GetShuttlePathEntriesV2026R0Side, + *, + path: Optional[str] = None, + path_id: Optional[str] = None, + account_email: Optional[str] = None, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttlePathEntriesV2026R0: + """ + Returns a paginated list of source or target path entries for a shuttle + + job. Call with only `job_id` and `side` to list the roots, then browse one + + + level at a time using `path`, `path_id`, or both. Each entry includes + + + `path`, `path_id`, `is_directory`, and a `scope` object (`account` or + + + `shared_space`) so a mapping can be created from that row without extra + + + browse state. Valid values depend on the selected system. + + :param job_id: The unique identifier of the shuttle job whose path entries to list. + :type job_id: str + :param side: The side of the migration to browse. + :type side: GetShuttlePathEntriesV2026R0Side + :param path: The human-readable parent path whose children are returned. This can + be used with or without `path_id`. Omit both, or pass `/` as `path`, + to list root entries., defaults to None + :type path: Optional[str], optional + :param path_id: The `path_id` value of the parent entry whose children are + returned. This can be used with or without `path`. It distinguishes + paths with identical names on systems that support stable identifiers., defaults to None + :type path_id: Optional[str], optional + :param account_email: The email of the account whose path entries are returned. This is a + system-native identifier and is not always an RFC 5322 address., defaults to None + :type account_email: Optional[str], optional + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + { + 'job_id': to_string(job_id), + 'side': to_string(side), + 'path': to_string(path), + 'path_id': to_string(path_id), + 'account_email': to_string(account_email), + 'marker': to_string(marker), + 'limit': to_string(limit), + } + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_path_entries', + ] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttlePathEntriesV2026R0) + + def get_shuttle_mapping_errors_v2026_r0( + self, + job_id: str, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleMappingErrorsV2026R0: + """ + Returns a paginated list of mapping errors for a shuttle job. Only the latest + + record for each error is returned. The revision field identifies the mapping + + + revision in which that error was generated. + + :param job_id: The unique identifier of the shuttle job whose mapping errors to list. + :type job_id: str + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + { + 'job_id': to_string(job_id), + 'marker': to_string(marker), + 'limit': to_string(limit), + } + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_mapping_errors', + ] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleMappingErrorsV2026R0) + + def get_shuttle_reports_v2026_r0( + self, + run_id: str, + *, + marker: Optional[str] = None, + limit: Optional[int] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleReportsV2026R0: + """ + Returns a paginated list of reports generated for the shuttle run + + identified by `run_id`. + + :param run_id: The unique identifier of the shuttle run whose reports to list. + :type run_id: str + :param marker: Defines the position marker at which to begin returning results. This is + used when paginating using marker-based pagination. + + This requires `usemarker` to be set to `true`., defaults to None + :type marker: Optional[str], optional + :param limit: The maximum number of items to return per page., defaults to None + :type limit: Optional[int], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + query_params_map: Dict[str, str] = prepare_params( + { + 'run_id': to_string(run_id), + 'marker': to_string(marker), + 'limit': to_string(limit), + } + ) + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/shuttle_reports'] + ), + method='GET', + params=query_params_map, + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleReportsV2026R0) + + def create_shuttle_report_v2026_r0( + self, + run_id: str, + format: CreateShuttleReportV2026R0Format, + sections: List[str], + *, + users_scope: Optional[CreateShuttleReportV2026R0UsersScope] = None, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleReportV2026R0: + """ + Requests asynchronous generation of a report for a shuttle run. The + + report is returned immediately in `pending` or `processing` status. + + + Poll `GET /shuttle_reports/{shuttle_report_id}` while `status` is + + + `pending` or `processing`. Stop when `status` is `complete`, `failed`, + + + `canceled`, or `unknown`. Repeating this request with the same + + + parameters reuses the existing report instead of creating a duplicate. + + :param run_id: The unique identifier of the shuttle run to generate a report for. + :type run_id: str + :param format: The output file format of the report. + :type format: CreateShuttleReportV2026R0Format + :param sections: The sections to include in the report. Must be a non-empty subset of + the run's `available_report_sections`. This is an open list whose set + of values is expected to grow; the currently documented values include + `files_and_folders`, `event_log`, `transfer_overview`, `source_users`, + `target_users`, `source_collaborators`, `target_collaborators`, + `source_collaborations`, and `target_collaborations`. + :type sections: List[str] + :param users_scope: Which users to include in user-related report sections. Defaults to + `migrated` when omitted., defaults to None + :type users_scope: Optional[CreateShuttleReportV2026R0UsersScope], optional + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + request_body: Dict = { + 'run_id': run_id, + 'format': format, + 'sections': sections, + 'users_scope': users_scope, + } + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [self.network_session.base_urls.base_url, '/2.0/shuttle_reports'] + ), + method='POST', + headers=headers_map, + data=serialize(request_body), + content_type='application/json', + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleReportV2026R0) + + def get_shuttle_report_by_id_v2026_r0( + self, + shuttle_report_id: str, + *, + box_version: BoxVersionHeaderV2026R0 = BoxVersionHeaderV2026R0._2026_0, + extra_headers: Optional[Dict[str, Optional[str]]] = None + ) -> ShuttleReportV2026R0: + """ + Returns details for a single shuttle report identified by its ID, + + including generation status and, once generation finishes, the Box + + + output reference. + + :param shuttle_report_id: The unique identifier for the shuttle report. + Example: "6a3ba8d14f2c91e8370b4d12" + :type shuttle_report_id: str + :param box_version: Version header., defaults to BoxVersionHeaderV2026R0._2026_0 + :type box_version: BoxVersionHeaderV2026R0, optional + :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None + :type extra_headers: Optional[Dict[str, Optional[str]]], optional + """ + if extra_headers is None: + extra_headers = {} + headers_map: Dict[str, str] = prepare_params( + {'box-version': to_string(box_version), **extra_headers} + ) + response: FetchResponse = self.network_session.network_client.fetch( + FetchOptions( + url=''.join( + [ + self.network_session.base_urls.base_url, + '/2.0/shuttle_reports/', + to_string(shuttle_report_id), + ] + ), + method='GET', + headers=headers_map, + response_format=ResponseFormat.JSON, + auth=self.auth, + network_session=self.network_session, + ) + ) + return deserialize(response.data, ShuttleReportV2026R0) diff --git a/box_sdk_gen/schemas/event.py b/box_sdk_gen/schemas/event.py index 9488475b..8c220b0b 100644 --- a/box_sdk_gen/schemas/event.py +++ b/box_sdk_gen/schemas/event.py @@ -175,6 +175,8 @@ class EventEventTypeField(str, Enum): RENAME = 'RENAME' RETENTION_POLICY_ASSIGNMENT_ADD = 'RETENTION_POLICY_ASSIGNMENT_ADD' SHARE = 'SHARE' + SHARED_LINK_ONE_TIME_PASSCODE_ACCESS = 'SHARED_LINK_ONE_TIME_PASSCODE_ACCESS' + SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE = 'SHARED_LINK_ONE_TIME_PASSCODE_CHALLENGE' SHARED_LINK_REDIRECT_OUT_OF_SHARED_CONTEXT = ( 'SHARED_LINK_REDIRECT_OUT_OF_SHARED_CONTEXT' ) @@ -189,6 +191,7 @@ class EventEventTypeField(str, Enum): SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION = ( 'SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION' ) + SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED = 'SHIELD_EXTERNAL_COLLAB_ACCESS_JUSTIFIED' SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED = 'SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED' SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION = ( 'SHIELD_EXTERNAL_COLLAB_INVITE_BLOCKED_MISSING_JUSTIFICATION' diff --git a/box_sdk_gen/schemas/v2025_r0/archive_v2025_r0.py b/box_sdk_gen/schemas/v2025_r0/archive_v2025_r0.py index b59ac67a..7367823b 100644 --- a/box_sdk_gen/schemas/v2025_r0/archive_v2025_r0.py +++ b/box_sdk_gen/schemas/v2025_r0/archive_v2025_r0.py @@ -32,10 +32,10 @@ def __init__( id: str, name: str, size: int, + owned_by: ArchiveV2025R0OwnedByField, *, type: ArchiveV2025R0TypeField = ArchiveV2025R0TypeField.ARCHIVE, description: Optional[str] = None, - owned_by: Optional[ArchiveV2025R0OwnedByField] = None, **kwargs ): r""" @@ -50,17 +50,17 @@ def __init__( :type name: str :param size: The size of the archive in bytes. :type size: int + :param owned_by: The part of an archive API response that describes the user who owns the archive. + :type owned_by: ArchiveV2025R0OwnedByField :param type: The value is always `archive`., defaults to ArchiveV2025R0TypeField.ARCHIVE :type type: ArchiveV2025R0TypeField, optional :param description: The description of the archive., defaults to None :type description: Optional[str], optional - :param owned_by: The part of an archive API response that describes the user who owns the archive., defaults to None - :type owned_by: Optional[ArchiveV2025R0OwnedByField], optional """ super().__init__(**kwargs) self.id = id self.name = name self.size = size + self.owned_by = owned_by self.type = type self.description = description - self.owned_by = owned_by diff --git a/box_sdk_gen/schemas/v2026_r0/__init__.py b/box_sdk_gen/schemas/v2026_r0/__init__.py index 7aafddb8..ae356c86 100644 --- a/box_sdk_gen/schemas/v2026_r0/__init__.py +++ b/box_sdk_gen/schemas/v2026_r0/__init__.py @@ -64,6 +64,118 @@ from box_sdk_gen.schemas.v2026_r0.query_results_v2026_r0 import * +from box_sdk_gen.schemas.v2026_r0.shuttle_agent_credentials_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_permission_conflict_strategy_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_update_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_create_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_jobs_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_job_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_time_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_update_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_create_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedules_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_start_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_mapping_error_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_mapping_errors_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_account_scope_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_shared_space_scope_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_scope_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entries_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_input_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_target_input_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_input_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_import_create_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_location_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mappings_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_input_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_location_input_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_target_input_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_target_location_input_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_update_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_create_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_report_create_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_report_output_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_report_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_reports_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mapping_import_create_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_role_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_system_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_systems_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_system_create_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_system_update_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_target_subject_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mapping_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mappings_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_discovered_subject_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_discovered_subjects_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_target_subject_input_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mapping_update_request_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mapping_create_request_v2026_r0 import * + from box_sdk_gen.schemas.v2026_r0.user_base_v2026_r0 import * from box_sdk_gen.schemas.v2026_r0.user_mini_v2026_r0 import * @@ -75,3 +187,7 @@ from box_sdk_gen.schemas.v2026_r0.automate_workflow_action_v2026_r0 import * from box_sdk_gen.schemas.v2026_r0.automate_workflows_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_run_v2026_r0 import * + +from box_sdk_gen.schemas.v2026_r0.shuttle_runs_v2026_r0 import * diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_agent_credentials_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_agent_credentials_v2026_r0.py new file mode 100644 index 00000000..25efe937 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_agent_credentials_v2026_r0.py @@ -0,0 +1,19 @@ +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.internal.utils import DateTime + + +class ShuttleAgentCredentialsV2026R0(BaseObject): + def __init__(self, registration_token: str, expires_at: DateTime, **kwargs): + """ + :param registration_token: The installation token to paste into the Windows agent installer to + register the agent. + :type registration_token: str + :param expires_at: When the registration token expires and can no longer be used. + :type expires_at: DateTime + """ + super().__init__(**kwargs) + self.registration_token = registration_token + self.expires_at = expires_at diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_discovered_subject_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_discovered_subject_v2026_r0.py new file mode 100644 index 00000000..f0e78610 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_discovered_subject_v2026_r0.py @@ -0,0 +1,53 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_v2026_r0 import ShuttleSubjectV2026R0 + +from box_sdk_gen.schemas.v2026_r0.shuttle_target_subject_v2026_r0 import ( + ShuttleTargetSubjectV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleDiscoveredSubjectV2026R0TypeField(str, Enum): + SHUTTLE_DISCOVERED_SUBJECT = 'shuttle_discovered_subject' + + +class ShuttleDiscoveredSubjectV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_discovered_subject'} + + def __init__( + self, + id: str, + job_id: str, + revision: int, + source: ShuttleSubjectV2026R0, + *, + type: ShuttleDiscoveredSubjectV2026R0TypeField = ShuttleDiscoveredSubjectV2026R0TypeField.SHUTTLE_DISCOVERED_SUBJECT, + suggested_target: Optional[ShuttleTargetSubjectV2026R0] = None, + **kwargs + ): + """ + :param id: The unique identifier for the discovered subject. + :type id: str + :param job_id: The unique identifier of the shuttle job this subject belongs to. + :type job_id: str + :param revision: The scan revision this discovered subject belongs to. + :type revision: int + :param type: The value will always be `shuttle_discovered_subject`., defaults to ShuttleDiscoveredSubjectV2026R0TypeField.SHUTTLE_DISCOVERED_SUBJECT + :type type: ShuttleDiscoveredSubjectV2026R0TypeField, optional + :param suggested_target: A suggested Box target inferred during the scan. `null` when no + suggestion was made., defaults to None + :type suggested_target: Optional[ShuttleTargetSubjectV2026R0], optional + """ + super().__init__(**kwargs) + self.id = id + self.job_id = job_id + self.revision = revision + self.source = source + self.type = type + self.suggested_target = suggested_target diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_discovered_subjects_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_discovered_subjects_v2026_r0.py new file mode 100644 index 00000000..2ade2f35 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_discovered_subjects_v2026_r0.py @@ -0,0 +1,40 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_discovered_subject_v2026_r0 import ( + ShuttleDiscoveredSubjectV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleDiscoveredSubjectsV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttleDiscoveredSubjectV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of discovered subjects. + :type entries: List[ShuttleDiscoveredSubjectV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_create_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_create_request_v2026_r0.py new file mode 100644 index 00000000..231e9c41 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_create_request_v2026_r0.py @@ -0,0 +1,149 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_permission_conflict_strategy_v2026_r0 import ( + ShuttleJobPermissionConflictStrategyV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobCreateRequestV2026R0JobTypeField(str, Enum): + TRANSFER = 'transfer' + ANALYSIS = 'analysis' + + +class ShuttleJobCreateRequestV2026R0AccountMappingField(BaseObject): + def __init__( + self, + *, + is_enabled: Optional[bool] = None, + permission_conflict_strategy: Optional[ + ShuttleJobPermissionConflictStrategyV2026R0 + ] = None, + are_external_shares_mapped: Optional[bool] = None, + are_permissions_mapped: Optional[bool] = None, + **kwargs + ): + """ + :param is_enabled: Whether account mapping is enabled for the shuttle job. Defaults to + `false` when `account_mapping` is omitted on create., defaults to None + :type is_enabled: Optional[bool], optional + :param permission_conflict_strategy: The strategy used to resolve permission conflicts. `null` when + unset., defaults to None + :type permission_conflict_strategy: Optional[ShuttleJobPermissionConflictStrategyV2026R0], optional + :param are_external_shares_mapped: Whether external shares are mapped during the migration., defaults to None + :type are_external_shares_mapped: Optional[bool], optional + :param are_permissions_mapped: Whether permissions are mapped during the migration., defaults to None + :type are_permissions_mapped: Optional[bool], optional + """ + super().__init__(**kwargs) + self.is_enabled = is_enabled + self.permission_conflict_strategy = permission_conflict_strategy + self.are_external_shares_mapped = are_external_shares_mapped + self.are_permissions_mapped = are_permissions_mapped + + +class ShuttleJobCreateRequestV2026R0SettingsField(BaseObject): + def __init__( + self, + *, + bandwidth_limit_bytes_per_sec: Optional[int] = None, + are_deletions_mirrored: Optional[bool] = None, + are_file_versions_synced: Optional[bool] = None, + max_file_versions: Optional[int] = None, + is_overwrite_enabled: Optional[bool] = None, + are_completed_mappings_skipped_on_rerun: Optional[bool] = None, + is_content_scanning_enabled: Optional[bool] = None, + include_shared_source_folders: Optional[bool] = None, + include_shared_destination_folders: Optional[bool] = None, + **kwargs + ): + """ + :param bandwidth_limit_bytes_per_sec: The maximum transfer bandwidth in bytes per second. `null` when + unlimited., defaults to None + :type bandwidth_limit_bytes_per_sec: Optional[int], optional + :param are_deletions_mirrored: Whether deletions in the source system are mirrored in Box., defaults to None + :type are_deletions_mirrored: Optional[bool], optional + :param are_file_versions_synced: Whether prior file versions are synced during the migration., defaults to None + :type are_file_versions_synced: Optional[bool], optional + :param max_file_versions: The maximum number of file versions to sync. `null` when unlimited., defaults to None + :type max_file_versions: Optional[int], optional + :param is_overwrite_enabled: Whether existing files in Box are overwritten., defaults to None + :type is_overwrite_enabled: Optional[bool], optional + :param are_completed_mappings_skipped_on_rerun: Whether mappings that already completed successfully are skipped when + the job is rerun., defaults to None + :type are_completed_mappings_skipped_on_rerun: Optional[bool], optional + :param is_content_scanning_enabled: Whether migrated content is scanned during the migration. Applies + only when the source system supports content scanning; ignored + otherwise., defaults to None + :type is_content_scanning_enabled: Optional[bool], optional + :param include_shared_source_folders: Whether shared folders on the source are included in the migration. + Applies only when the source system supports shared folders; ignored + otherwise., defaults to None + :type include_shared_source_folders: Optional[bool], optional + :param include_shared_destination_folders: Whether shared folders on the destination are included in the + migration. Applies only when the destination system supports shared + folders; ignored otherwise., defaults to None + :type include_shared_destination_folders: Optional[bool], optional + """ + super().__init__(**kwargs) + self.bandwidth_limit_bytes_per_sec = bandwidth_limit_bytes_per_sec + self.are_deletions_mirrored = are_deletions_mirrored + self.are_file_versions_synced = are_file_versions_synced + self.max_file_versions = max_file_versions + self.is_overwrite_enabled = is_overwrite_enabled + self.are_completed_mappings_skipped_on_rerun = ( + are_completed_mappings_skipped_on_rerun + ) + self.is_content_scanning_enabled = is_content_scanning_enabled + self.include_shared_source_folders = include_shared_source_folders + self.include_shared_destination_folders = include_shared_destination_folders + + +class ShuttleJobCreateRequestV2026R0(BaseObject): + def __init__( + self, + name: str, + job_type: ShuttleJobCreateRequestV2026R0JobTypeField, + source_system_id: str, + *, + comment: Optional[str] = None, + tags: Optional[List[str]] = None, + account_mapping: Optional[ + ShuttleJobCreateRequestV2026R0AccountMappingField + ] = None, + settings: Optional[ShuttleJobCreateRequestV2026R0SettingsField] = None, + **kwargs + ): + """ + :param name: The human-readable name of the shuttle job. + :type name: str + :param job_type: The type of work the shuttle job performs. + :type job_type: ShuttleJobCreateRequestV2026R0JobTypeField + :param source_system_id: The unique identifier of the source system to migrate from. + :type source_system_id: str + :param comment: An optional free-form comment describing the shuttle job., defaults to None + :type comment: Optional[str], optional + :param tags: A list of free-form tags associated with the shuttle job., defaults to None + :type tags: Optional[List[str]], optional + :param account_mapping: The account mapping configuration that controls how source identities + and permissions are translated into Box. When this object is omitted, + the job is created with `is_enabled` set to `false`., defaults to None + :type account_mapping: Optional[ShuttleJobCreateRequestV2026R0AccountMappingField], optional + :param settings: The tunable settings that control how the shuttle job runs., defaults to None + :type settings: Optional[ShuttleJobCreateRequestV2026R0SettingsField], optional + """ + super().__init__(**kwargs) + self.name = name + self.job_type = job_type + self.source_system_id = source_system_id + self.comment = comment + self.tags = tags + self.account_mapping = account_mapping + self.settings = settings diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_permission_conflict_strategy_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_permission_conflict_strategy_v2026_r0.py new file mode 100644 index 00000000..55e30a49 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_permission_conflict_strategy_v2026_r0.py @@ -0,0 +1,10 @@ +from enum import Enum + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobPermissionConflictStrategyV2026R0(str, Enum): + PRESERVE_STRUCTURE_RESTRICT_SHARING = 'preserve_structure_restrict_sharing' + PRESERVE_STRUCTURE_EXPAND_SHARING = 'preserve_structure_expand_sharing' + PRESERVE_SHARING_MODIFY_STRUCTURE = 'preserve_sharing_modify_structure' + WARN_PERMISSIONS_CONFLICTS = 'warn_permissions_conflicts' diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_create_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_create_request_v2026_r0.py new file mode 100644 index 00000000..8b583663 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_create_request_v2026_r0.py @@ -0,0 +1,60 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_time_v2026_r0 import ( + ShuttleJobScheduleTriggerByTimeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_job_v2026_r0 import ( + ShuttleJobScheduleTriggerByJobV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_v2026_r0 import ( + ShuttleJobScheduleTriggerV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobScheduleCreateRequestV2026R0RunModeField(str, Enum): + TRANSFER = 'transfer' + SIMULATION = 'simulation' + ANALYSIS = 'analysis' + + +class ShuttleJobScheduleCreateRequestV2026R0StateField(str, Enum): + ENABLED = 'enabled' + PAUSED = 'paused' + + +class ShuttleJobScheduleCreateRequestV2026R0(BaseObject): + def __init__( + self, + job_id: str, + run_mode: ShuttleJobScheduleCreateRequestV2026R0RunModeField, + trigger: ShuttleJobScheduleTriggerV2026R0, + *, + state: Optional[ShuttleJobScheduleCreateRequestV2026R0StateField] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :param job_id: The unique identifier of the shuttle job this schedule belongs to. + :type job_id: str + :param run_mode: The kind of run the schedule starts. `scan` is not a valid schedule + run mode. + :type run_mode: ShuttleJobScheduleCreateRequestV2026R0RunModeField + :param state: Whether the schedule is active. When omitted, defaults to `enabled`., defaults to None + :type state: Optional[ShuttleJobScheduleCreateRequestV2026R0StateField], optional + :param description: An optional human-readable description of the schedule., defaults to None + :type description: Optional[str], optional + """ + super().__init__(**kwargs) + self.job_id = job_id + self.run_mode = run_mode + self.trigger = trigger + self.state = state + self.description = description diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_by_job_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_by_job_v2026_r0.py new file mode 100644 index 00000000..eb1e415f --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_by_job_v2026_r0.py @@ -0,0 +1,42 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobScheduleTriggerByJobV2026R0TypeField(str, Enum): + BY_JOB = 'by_job' + + +class ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField(str, Enum): + ALWAYS = 'always' + ON_SUCCESS = 'on_success' + ON_FINISH = 'on_finish' + + +class ShuttleJobScheduleTriggerByJobV2026R0(BaseObject): + _discriminator = 'type', {'by_job'} + + def __init__( + self, + triggered_by_job_id: str, + last_run_condition: ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField, + *, + type: ShuttleJobScheduleTriggerByJobV2026R0TypeField = ShuttleJobScheduleTriggerByJobV2026R0TypeField.BY_JOB, + **kwargs + ): + """ + :param triggered_by_job_id: The unique identifier of the shuttle job whose run starts this + schedule. + :type triggered_by_job_id: str + :param last_run_condition: When this schedule should start a run relative to the last run of + the triggering job. + :type last_run_condition: ShuttleJobScheduleTriggerByJobV2026R0LastRunConditionField + :param type: The value will always be `by_job`., defaults to ShuttleJobScheduleTriggerByJobV2026R0TypeField.BY_JOB + :type type: ShuttleJobScheduleTriggerByJobV2026R0TypeField, optional + """ + super().__init__(**kwargs) + self.triggered_by_job_id = triggered_by_job_id + self.last_run_condition = last_run_condition + self.type = type diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_by_time_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_by_time_v2026_r0.py new file mode 100644 index 00000000..4a68851b --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_by_time_v2026_r0.py @@ -0,0 +1,50 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobScheduleTriggerByTimeV2026R0TypeField(str, Enum): + BY_TIME = 'by_time' + + +class ShuttleJobScheduleTriggerByTimeV2026R0RepeatField(str, Enum): + NONE = 'none' + DAILY = 'daily' + WEEKLY = 'weekly' + WEEKDAYS = 'weekdays' + WEEKENDS = 'weekends' + + +class ShuttleJobScheduleTriggerByTimeV2026R0(BaseObject): + _discriminator = 'type', {'by_time'} + + def __init__( + self, + start_at: str, + time_zone: str, + repeat: ShuttleJobScheduleTriggerByTimeV2026R0RepeatField, + *, + type: ShuttleJobScheduleTriggerByTimeV2026R0TypeField = ShuttleJobScheduleTriggerByTimeV2026R0TypeField.BY_TIME, + **kwargs + ): + """ + :param start_at: The local wall-clock time when the schedule should first start a + run, without an offset or `Z` suffix. Combined with `time_zone` to + determine the instant, including DST. + :type start_at: str + :param time_zone: The IANA time zone that gives `start_at` its calendar meaning (for + example `America/Los_Angeles`). Recurrence and DST transitions are + evaluated in this zone. + :type time_zone: str + :param repeat: How often the schedule repeats after `start_at`. + :type repeat: ShuttleJobScheduleTriggerByTimeV2026R0RepeatField + :param type: The value will always be `by_time`., defaults to ShuttleJobScheduleTriggerByTimeV2026R0TypeField.BY_TIME + :type type: ShuttleJobScheduleTriggerByTimeV2026R0TypeField, optional + """ + super().__init__(**kwargs) + self.start_at = start_at + self.time_zone = time_zone + self.repeat = repeat + self.type = type diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_v2026_r0.py new file mode 100644 index 00000000..16300147 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_trigger_v2026_r0.py @@ -0,0 +1,15 @@ +from typing import Union + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_time_v2026_r0 import ( + ShuttleJobScheduleTriggerByTimeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_job_v2026_r0 import ( + ShuttleJobScheduleTriggerByJobV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +ShuttleJobScheduleTriggerV2026R0 = Union[ + ShuttleJobScheduleTriggerByTimeV2026R0, ShuttleJobScheduleTriggerByJobV2026R0 +] diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_update_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_update_request_v2026_r0.py new file mode 100644 index 00000000..4d92e856 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_update_request_v2026_r0.py @@ -0,0 +1,56 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_time_v2026_r0 import ( + ShuttleJobScheduleTriggerByTimeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_job_v2026_r0 import ( + ShuttleJobScheduleTriggerByJobV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_v2026_r0 import ( + ShuttleJobScheduleTriggerV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobScheduleUpdateRequestV2026R0StateField(str, Enum): + ENABLED = 'enabled' + PAUSED = 'paused' + + +class ShuttleJobScheduleUpdateRequestV2026R0RunModeField(str, Enum): + TRANSFER = 'transfer' + SIMULATION = 'simulation' + ANALYSIS = 'analysis' + + +class ShuttleJobScheduleUpdateRequestV2026R0(BaseObject): + def __init__( + self, + *, + state: Optional[ShuttleJobScheduleUpdateRequestV2026R0StateField] = None, + run_mode: Optional[ShuttleJobScheduleUpdateRequestV2026R0RunModeField] = None, + description: Optional[str] = None, + trigger: Optional[ShuttleJobScheduleTriggerV2026R0] = None, + **kwargs + ): + """ + :param state: Whether the schedule is active., defaults to None + :type state: Optional[ShuttleJobScheduleUpdateRequestV2026R0StateField], optional + :param run_mode: The kind of run the schedule starts. `scan` is not a valid schedule + run mode., defaults to None + :type run_mode: Optional[ShuttleJobScheduleUpdateRequestV2026R0RunModeField], optional + :param description: An optional human-readable description of the schedule., defaults to None + :type description: Optional[str], optional + """ + super().__init__(**kwargs) + self.state = state + self.run_mode = run_mode + self.description = description + self.trigger = trigger diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_v2026_r0.py new file mode 100644 index 00000000..5d50208e --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedule_v2026_r0.py @@ -0,0 +1,81 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_time_v2026_r0 import ( + ShuttleJobScheduleTriggerByTimeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_by_job_v2026_r0 import ( + ShuttleJobScheduleTriggerByJobV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_trigger_v2026_r0 import ( + ShuttleJobScheduleTriggerV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.internal.utils import DateTime + + +class ShuttleJobScheduleV2026R0TypeField(str, Enum): + SHUTTLE_JOB_SCHEDULE = 'shuttle_job_schedule' + + +class ShuttleJobScheduleV2026R0StateField(str, Enum): + ENABLED = 'enabled' + PAUSED = 'paused' + + +class ShuttleJobScheduleV2026R0RunModeField(str, Enum): + TRANSFER = 'transfer' + SIMULATION = 'simulation' + ANALYSIS = 'analysis' + + +class ShuttleJobScheduleV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_job_schedule'} + + def __init__( + self, + id: str, + job_id: str, + state: ShuttleJobScheduleV2026R0StateField, + run_mode: ShuttleJobScheduleV2026R0RunModeField, + trigger: ShuttleJobScheduleTriggerV2026R0, + *, + type: ShuttleJobScheduleV2026R0TypeField = ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE, + description: Optional[str] = None, + last_attempt_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shuttle job schedule. + :type id: str + :param job_id: The unique identifier of the shuttle job this schedule belongs to. + :type job_id: str + :param state: Whether the schedule is active. + :type state: ShuttleJobScheduleV2026R0StateField + :param run_mode: The kind of run the schedule starts. `scan` is not a valid schedule + run mode. + :type run_mode: ShuttleJobScheduleV2026R0RunModeField + :param type: The value will always be `shuttle_job_schedule`., defaults to ShuttleJobScheduleV2026R0TypeField.SHUTTLE_JOB_SCHEDULE + :type type: ShuttleJobScheduleV2026R0TypeField, optional + :param description: An optional human-readable description of the schedule., defaults to None + :type description: Optional[str], optional + :param last_attempt_at: When the schedule last attempted to start a run. `null` when the + schedule has never started a run., defaults to None + :type last_attempt_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.job_id = job_id + self.state = state + self.run_mode = run_mode + self.trigger = trigger + self.type = type + self.description = description + self.last_attempt_at = last_attempt_at diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedules_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedules_v2026_r0.py new file mode 100644 index 00000000..bb4353de --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_schedules_v2026_r0.py @@ -0,0 +1,40 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_schedule_v2026_r0 import ( + ShuttleJobScheduleV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobSchedulesV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttleJobScheduleV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of shuttle job schedules. + :type entries: List[ShuttleJobScheduleV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_start_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_start_request_v2026_r0.py new file mode 100644 index 00000000..37b68c36 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_start_request_v2026_r0.py @@ -0,0 +1,26 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobStartRequestV2026R0ModeField(str, Enum): + TRANSFER = 'transfer' + SIMULATION = 'simulation' + SCAN = 'scan' + ANALYSIS = 'analysis' + + +class ShuttleJobStartRequestV2026R0(BaseObject): + def __init__( + self, *, mode: Optional[ShuttleJobStartRequestV2026R0ModeField] = None, **kwargs + ): + """ + :param mode: The run mode. Defaults to simulation when omitted., defaults to None + :type mode: Optional[ShuttleJobStartRequestV2026R0ModeField], optional + """ + super().__init__(**kwargs) + self.mode = mode diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_update_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_update_request_v2026_r0.py new file mode 100644 index 00000000..c3662024 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_update_request_v2026_r0.py @@ -0,0 +1,132 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_permission_conflict_strategy_v2026_r0 import ( + ShuttleJobPermissionConflictStrategyV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobUpdateRequestV2026R0AccountMappingField(BaseObject): + def __init__( + self, + *, + is_enabled: Optional[bool] = None, + permission_conflict_strategy: Optional[ + ShuttleJobPermissionConflictStrategyV2026R0 + ] = None, + are_external_shares_mapped: Optional[bool] = None, + are_permissions_mapped: Optional[bool] = None, + **kwargs + ): + """ + :param is_enabled: Whether account mapping is enabled for the shuttle job., defaults to None + :type is_enabled: Optional[bool], optional + :param permission_conflict_strategy: The strategy used to resolve permission conflicts. `null` when + unset., defaults to None + :type permission_conflict_strategy: Optional[ShuttleJobPermissionConflictStrategyV2026R0], optional + :param are_external_shares_mapped: Whether external shares are mapped during the migration., defaults to None + :type are_external_shares_mapped: Optional[bool], optional + :param are_permissions_mapped: Whether permissions are mapped during the migration., defaults to None + :type are_permissions_mapped: Optional[bool], optional + """ + super().__init__(**kwargs) + self.is_enabled = is_enabled + self.permission_conflict_strategy = permission_conflict_strategy + self.are_external_shares_mapped = are_external_shares_mapped + self.are_permissions_mapped = are_permissions_mapped + + +class ShuttleJobUpdateRequestV2026R0SettingsField(BaseObject): + def __init__( + self, + *, + bandwidth_limit_bytes_per_sec: Optional[int] = None, + are_deletions_mirrored: Optional[bool] = None, + are_file_versions_synced: Optional[bool] = None, + max_file_versions: Optional[int] = None, + is_overwrite_enabled: Optional[bool] = None, + are_completed_mappings_skipped_on_rerun: Optional[bool] = None, + is_content_scanning_enabled: Optional[bool] = None, + include_shared_source_folders: Optional[bool] = None, + include_shared_destination_folders: Optional[bool] = None, + **kwargs + ): + """ + :param bandwidth_limit_bytes_per_sec: The maximum transfer bandwidth in bytes per second. `null` when + unlimited., defaults to None + :type bandwidth_limit_bytes_per_sec: Optional[int], optional + :param are_deletions_mirrored: Whether deletions in the source system are mirrored in Box., defaults to None + :type are_deletions_mirrored: Optional[bool], optional + :param are_file_versions_synced: Whether prior file versions are synced during the migration., defaults to None + :type are_file_versions_synced: Optional[bool], optional + :param max_file_versions: The maximum number of file versions to sync. `null` when unlimited., defaults to None + :type max_file_versions: Optional[int], optional + :param is_overwrite_enabled: Whether existing files in Box are overwritten., defaults to None + :type is_overwrite_enabled: Optional[bool], optional + :param are_completed_mappings_skipped_on_rerun: Whether mappings that already completed successfully are skipped when + the job is rerun., defaults to None + :type are_completed_mappings_skipped_on_rerun: Optional[bool], optional + :param is_content_scanning_enabled: Whether migrated content is scanned during the migration. Applies + only when the source system supports content scanning; ignored + otherwise., defaults to None + :type is_content_scanning_enabled: Optional[bool], optional + :param include_shared_source_folders: Whether shared folders on the source are included in the migration. + Applies only when the source system supports shared folders; ignored + otherwise., defaults to None + :type include_shared_source_folders: Optional[bool], optional + :param include_shared_destination_folders: Whether shared folders on the destination are included in the + migration. Applies only when the destination system supports shared + folders; ignored otherwise., defaults to None + :type include_shared_destination_folders: Optional[bool], optional + """ + super().__init__(**kwargs) + self.bandwidth_limit_bytes_per_sec = bandwidth_limit_bytes_per_sec + self.are_deletions_mirrored = are_deletions_mirrored + self.are_file_versions_synced = are_file_versions_synced + self.max_file_versions = max_file_versions + self.is_overwrite_enabled = is_overwrite_enabled + self.are_completed_mappings_skipped_on_rerun = ( + are_completed_mappings_skipped_on_rerun + ) + self.is_content_scanning_enabled = is_content_scanning_enabled + self.include_shared_source_folders = include_shared_source_folders + self.include_shared_destination_folders = include_shared_destination_folders + + +class ShuttleJobUpdateRequestV2026R0(BaseObject): + def __init__( + self, + *, + name: Optional[str] = None, + comment: Optional[str] = None, + tags: Optional[List[str]] = None, + account_mapping: Optional[ + ShuttleJobUpdateRequestV2026R0AccountMappingField + ] = None, + settings: Optional[ShuttleJobUpdateRequestV2026R0SettingsField] = None, + **kwargs + ): + """ + :param name: The human-readable name of the shuttle job., defaults to None + :type name: Optional[str], optional + :param comment: An optional free-form comment describing the shuttle job., defaults to None + :type comment: Optional[str], optional + :param tags: A list of free-form tags associated with the shuttle job., defaults to None + :type tags: Optional[List[str]], optional + :param account_mapping: The account mapping configuration that controls how source identities + and permissions are translated into Box., defaults to None + :type account_mapping: Optional[ShuttleJobUpdateRequestV2026R0AccountMappingField], optional + :param settings: The tunable settings that control how the shuttle job runs., defaults to None + :type settings: Optional[ShuttleJobUpdateRequestV2026R0SettingsField], optional + """ + super().__init__(**kwargs) + self.name = name + self.comment = comment + self.tags = tags + self.account_mapping = account_mapping + self.settings = settings diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_job_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_job_v2026_r0.py new file mode 100644 index 00000000..488e9262 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_job_v2026_r0.py @@ -0,0 +1,214 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Optional + +from typing import List + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_permission_conflict_strategy_v2026_r0 import ( + ShuttleJobPermissionConflictStrategyV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobV2026R0TypeField(str, Enum): + SHUTTLE_JOB = 'shuttle_job' + + +class ShuttleJobV2026R0JobTypeField(str, Enum): + TRANSFER = 'transfer' + ANALYSIS = 'analysis' + + +class ShuttleJobV2026R0SourceSystemTypeField(str, Enum): + SHUTTLE_SYSTEM = 'shuttle_system' + + +class ShuttleJobV2026R0SourceSystemField(BaseObject): + _discriminator = 'type', {'shuttle_system'} + + def __init__( + self, + id: str, + name: str, + *, + type: ShuttleJobV2026R0SourceSystemTypeField = ShuttleJobV2026R0SourceSystemTypeField.SHUTTLE_SYSTEM, + **kwargs + ): + """ + :param id: The unique identifier for the source system. + :type id: str + :param name: The human-readable name of the source system. + :type name: str + :param type: The value will always be `shuttle_system`., defaults to ShuttleJobV2026R0SourceSystemTypeField.SHUTTLE_SYSTEM + :type type: ShuttleJobV2026R0SourceSystemTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.type = type + + +class ShuttleJobV2026R0AccountMappingField(BaseObject): + def __init__( + self, + is_enabled: bool, + *, + permission_conflict_strategy: Optional[ + ShuttleJobPermissionConflictStrategyV2026R0 + ] = None, + are_external_shares_mapped: Optional[bool] = None, + are_permissions_mapped: Optional[bool] = None, + **kwargs + ): + """ + :param is_enabled: Whether account mapping is enabled for the shuttle job. + :type is_enabled: bool + :param permission_conflict_strategy: The strategy used to resolve permission conflicts. `null` when + unset., defaults to None + :type permission_conflict_strategy: Optional[ShuttleJobPermissionConflictStrategyV2026R0], optional + :param are_external_shares_mapped: Whether external shares are mapped during the migration., defaults to None + :type are_external_shares_mapped: Optional[bool], optional + :param are_permissions_mapped: Whether permissions are mapped during the migration., defaults to None + :type are_permissions_mapped: Optional[bool], optional + """ + super().__init__(**kwargs) + self.is_enabled = is_enabled + self.permission_conflict_strategy = permission_conflict_strategy + self.are_external_shares_mapped = are_external_shares_mapped + self.are_permissions_mapped = are_permissions_mapped + + +class ShuttleJobV2026R0SettingsField(BaseObject): + def __init__( + self, + *, + bandwidth_limit_bytes_per_sec: Optional[int] = None, + are_deletions_mirrored: Optional[bool] = None, + are_file_versions_synced: Optional[bool] = None, + max_file_versions: Optional[int] = None, + is_overwrite_enabled: Optional[bool] = None, + are_completed_mappings_skipped_on_rerun: Optional[bool] = None, + is_content_scanning_enabled: Optional[bool] = None, + include_shared_source_folders: Optional[bool] = None, + include_shared_destination_folders: Optional[bool] = None, + **kwargs + ): + """ + :param bandwidth_limit_bytes_per_sec: The maximum transfer bandwidth in bytes per second. `null` when + unlimited., defaults to None + :type bandwidth_limit_bytes_per_sec: Optional[int], optional + :param are_deletions_mirrored: Whether deletions in the source system are mirrored in Box., defaults to None + :type are_deletions_mirrored: Optional[bool], optional + :param are_file_versions_synced: Whether prior file versions are synced during the migration., defaults to None + :type are_file_versions_synced: Optional[bool], optional + :param max_file_versions: The maximum number of file versions to sync. `null` when unlimited., defaults to None + :type max_file_versions: Optional[int], optional + :param is_overwrite_enabled: Whether existing files in Box are overwritten., defaults to None + :type is_overwrite_enabled: Optional[bool], optional + :param are_completed_mappings_skipped_on_rerun: Whether mappings that already completed successfully are skipped when + the job is rerun., defaults to None + :type are_completed_mappings_skipped_on_rerun: Optional[bool], optional + :param is_content_scanning_enabled: Whether migrated content is scanned during the migration. Applies + only when the source system supports content scanning; ignored + otherwise., defaults to None + :type is_content_scanning_enabled: Optional[bool], optional + :param include_shared_source_folders: Whether shared folders on the source are included in the migration. + Applies only when the source system supports shared folders; ignored + otherwise., defaults to None + :type include_shared_source_folders: Optional[bool], optional + :param include_shared_destination_folders: Whether shared folders on the destination are included in the + migration. Applies only when the destination system supports shared + folders; ignored otherwise., defaults to None + :type include_shared_destination_folders: Optional[bool], optional + """ + super().__init__(**kwargs) + self.bandwidth_limit_bytes_per_sec = bandwidth_limit_bytes_per_sec + self.are_deletions_mirrored = are_deletions_mirrored + self.are_file_versions_synced = are_file_versions_synced + self.max_file_versions = max_file_versions + self.is_overwrite_enabled = is_overwrite_enabled + self.are_completed_mappings_skipped_on_rerun = ( + are_completed_mappings_skipped_on_rerun + ) + self.is_content_scanning_enabled = is_content_scanning_enabled + self.include_shared_source_folders = include_shared_source_folders + self.include_shared_destination_folders = include_shared_destination_folders + + +class ShuttleJobV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_job'} + + def __init__( + self, + id: str, + name: str, + job_type: ShuttleJobV2026R0JobTypeField, + state: str, + mapping_state: str, + source_system: ShuttleJobV2026R0SourceSystemField, + *, + type: ShuttleJobV2026R0TypeField = ShuttleJobV2026R0TypeField.SHUTTLE_JOB, + comment: Optional[str] = None, + account_mapping: Optional[ShuttleJobV2026R0AccountMappingField] = None, + tags: Optional[List[str]] = None, + settings: Optional[ShuttleJobV2026R0SettingsField] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shuttle job. + :type id: str + :param name: The human-readable name of the shuttle job. + :type name: str + :param job_type: The type of work the shuttle job performs. + :type job_type: ShuttleJobV2026R0JobTypeField + :param state: The current state of the shuttle job. This is an open string whose set + of values is expected to grow; the currently documented values include + `created`, `started`, `stopped`, `completed`, `failed`, `invalid`, and + `unknown`. Clients should treat any value they do not recognize as + `unknown`. + :type state: str + :param mapping_state: The current mapping-preparation state of the job. This is an open string + whose set of values is expected to grow; the currently documented values + include `awaiting_path_mapping`, `importing_paths`, + `paths_import_rejected`, `paths_invalid`, `paths_ready`, + `scanning_source`, `source_scan_failed`, `source_scan_out_of_date`, + `awaiting_subject_mapping`, `importing_subjects`, + `subjects_import_rejected`, `mapping_complete`, `building_map`, + `map_build_failed`, `map_out_of_date`, and `ready`. + `paths_import_rejected` means the last path-mapping spreadsheet was + rejected or failed and the path mappings have not been changed since; + it clears on the next import or the next manual path-mapping change. + `subjects_import_rejected` means the last subject-mapping spreadsheet + was rejected or failed and the subject mappings have not been changed + since; it clears on the next import or the next manual subject-mapping + change. + :type mapping_state: str + :param source_system: The source system the shuttle job migrates content from. + :type source_system: ShuttleJobV2026R0SourceSystemField + :param type: The value will always be `shuttle_job`., defaults to ShuttleJobV2026R0TypeField.SHUTTLE_JOB + :type type: ShuttleJobV2026R0TypeField, optional + :param comment: An optional free-form comment describing the shuttle job., defaults to None + :type comment: Optional[str], optional + :param account_mapping: The account mapping configuration that controls how source identities + and permissions are translated into Box., defaults to None + :type account_mapping: Optional[ShuttleJobV2026R0AccountMappingField], optional + :param tags: A list of free-form tags associated with the shuttle job., defaults to None + :type tags: Optional[List[str]], optional + :param settings: The tunable settings that control how the shuttle job runs., defaults to None + :type settings: Optional[ShuttleJobV2026R0SettingsField], optional + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.job_type = job_type + self.state = state + self.mapping_state = mapping_state + self.source_system = source_system + self.type = type + self.comment = comment + self.account_mapping = account_mapping + self.tags = tags + self.settings = settings diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_jobs_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_jobs_v2026_r0.py new file mode 100644 index 00000000..ae06fc01 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_jobs_v2026_r0.py @@ -0,0 +1,38 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_job_v2026_r0 import ShuttleJobV2026R0 + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleJobsV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttleJobV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of shuttle jobs. + :type entries: List[ShuttleJobV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_mapping_error_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_mapping_error_v2026_r0.py new file mode 100644 index 00000000..1a63ef31 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_mapping_error_v2026_r0.py @@ -0,0 +1,53 @@ +from enum import Enum + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleMappingErrorV2026R0TypeField(str, Enum): + SHUTTLE_MAPPING_ERROR = 'shuttle_mapping_error' + + +class ShuttleMappingErrorV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_mapping_error'} + + def __init__( + self, + id: str, + job_id: str, + revision: int, + category: str, + path: str, + messages: List[str], + *, + type: ShuttleMappingErrorV2026R0TypeField = ShuttleMappingErrorV2026R0TypeField.SHUTTLE_MAPPING_ERROR, + **kwargs + ): + """ + :param id: The unique identifier for the mapping error. + :type id: str + :param job_id: The unique identifier of the shuttle job this error belongs to. + :type job_id: str + :param revision: The mapping revision this error belongs to. + :type revision: int + :param category: The category of mapping work that produced the error. This is an open + string whose set of values can grow. + :type category: str + :param path: The path or subject that the mapping error refers to. + :type path: str + :param messages: Human-readable messages describing the mapping error. + :type messages: List[str] + :param type: The value will always be `shuttle_mapping_error`., defaults to ShuttleMappingErrorV2026R0TypeField.SHUTTLE_MAPPING_ERROR + :type type: ShuttleMappingErrorV2026R0TypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.job_id = job_id + self.revision = revision + self.category = category + self.path = path + self.messages = messages + self.type = type diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_mapping_errors_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_mapping_errors_v2026_r0.py new file mode 100644 index 00000000..926fab25 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_mapping_errors_v2026_r0.py @@ -0,0 +1,40 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_mapping_error_v2026_r0 import ( + ShuttleMappingErrorV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleMappingErrorsV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttleMappingErrorV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of shuttle mapping errors. + :type entries: List[ShuttleMappingErrorV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_entries_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entries_v2026_r0.py new file mode 100644 index 00000000..577b498d --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entries_v2026_r0.py @@ -0,0 +1,40 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_v2026_r0 import ( + ShuttlePathEntryV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathEntriesV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttlePathEntryV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of shuttle path entries. + :type entries: List[ShuttlePathEntryV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_account_scope_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_account_scope_v2026_r0.py new file mode 100644 index 00000000..c38fb1a8 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_account_scope_v2026_r0.py @@ -0,0 +1,48 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathEntryAccountScopeV2026R0TypeField(str, Enum): + ACCOUNT = 'account' + + +class ShuttlePathEntryAccountScopeV2026R0(BaseObject): + _discriminator = 'type', {'account'} + + def __init__( + self, + *, + type: ShuttlePathEntryAccountScopeV2026R0TypeField = ShuttlePathEntryAccountScopeV2026R0TypeField.ACCOUNT, + id: Optional[str] = None, + email: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param type: The value will always be `account`., defaults to ShuttlePathEntryAccountScopeV2026R0TypeField.ACCOUNT + :type type: ShuttlePathEntryAccountScopeV2026R0TypeField, optional + :param id: The platform-native identifier of the account that owns this entry. + `null` when the system does not provide one. This is not the path + entry `id`. Maps to `account.id` on an account-scoped path mapping + location., defaults to None + :type id: Optional[str], optional + :param email: The email of the account that owns this entry. This is a + system-native identifier and is not always an RFC 5322 address. + `null` when unknown. Maps to `account.email` on an account-scoped + path mapping location., defaults to None + :type email: Optional[str], optional + :param name: The display name of the account that owns this entry. `null` when + unknown. Maps to `account.name` on an account-scoped path mapping + location., defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + self.email = email + self.name = name diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_scope_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_scope_v2026_r0.py new file mode 100644 index 00000000..21919a30 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_scope_v2026_r0.py @@ -0,0 +1,15 @@ +from typing import Union + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_account_scope_v2026_r0 import ( + ShuttlePathEntryAccountScopeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_shared_space_scope_v2026_r0 import ( + ShuttlePathEntrySharedSpaceScopeV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +ShuttlePathEntryScopeV2026R0 = Union[ + ShuttlePathEntryAccountScopeV2026R0, ShuttlePathEntrySharedSpaceScopeV2026R0 +] diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_shared_space_scope_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_shared_space_scope_v2026_r0.py new file mode 100644 index 00000000..384585aa --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_shared_space_scope_v2026_r0.py @@ -0,0 +1,34 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathEntrySharedSpaceScopeV2026R0TypeField(str, Enum): + SHARED_SPACE = 'shared_space' + + +class ShuttlePathEntrySharedSpaceScopeV2026R0(BaseObject): + _discriminator = 'type', {'shared_space'} + + def __init__( + self, + *, + type: ShuttlePathEntrySharedSpaceScopeV2026R0TypeField = ShuttlePathEntrySharedSpaceScopeV2026R0TypeField.SHARED_SPACE, + space: Optional[str] = None, + **kwargs + ): + """ + :param type: The value will always be `shared_space`., defaults to ShuttlePathEntrySharedSpaceScopeV2026R0TypeField.SHARED_SPACE + :type type: ShuttlePathEntrySharedSpaceScopeV2026R0TypeField, optional + :param space: The display name of the shared container this entry belongs to. + `null` when the system has a single implicit container. Maps to + `space` on a shared-space path mapping location., defaults to None + :type space: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.space = space diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_v2026_r0.py new file mode 100644 index 00000000..a301975d --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_entry_v2026_r0.py @@ -0,0 +1,76 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_account_scope_v2026_r0 import ( + ShuttlePathEntryAccountScopeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_shared_space_scope_v2026_r0 import ( + ShuttlePathEntrySharedSpaceScopeV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_entry_scope_v2026_r0 import ( + ShuttlePathEntryScopeV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathEntryV2026R0TypeField(str, Enum): + SHUTTLE_PATH_ENTRY = 'shuttle_path_entry' + + +class ShuttlePathEntryV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_path_entry'} + + def __init__( + self, + id: str, + name: str, + path: str, + scope: ShuttlePathEntryScopeV2026R0, + is_directory: bool, + can_map: bool, + *, + type: ShuttlePathEntryV2026R0TypeField = ShuttlePathEntryV2026R0TypeField.SHUTTLE_PATH_ENTRY, + path_id: Optional[str] = None, + parent_path: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier of this browse row. This is not the account + identifier; when `scope.type` is `account`, the account identifier is + `scope.id`. + :type id: str + :param name: The display name of the path entry. + :type name: str + :param path: The human-readable path of the entry. + :type path: str + :param is_directory: Whether the entry is a directory (`true`) or a single file + (`false`). Maps to `is_directory` on a path mapping location. + :type is_directory: bool + :param can_map: Whether the entry can be selected in a path mapping. + :type can_map: bool + :param type: The value will always be `shuttle_path_entry`., defaults to ShuttlePathEntryV2026R0TypeField.SHUTTLE_PATH_ENTRY + :type type: ShuttlePathEntryV2026R0TypeField, optional + :param path_id: The system-native identifier of the path. `null` when the selected + system does not provide one. Maps to `path_id` on a path mapping + location., defaults to None + :type path_id: Optional[str], optional + :param parent_path: The human-readable path of the parent entry, or `null` for a root + entry., defaults to None + :type parent_path: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.path = path + self.scope = scope + self.is_directory = is_directory + self.can_map = can_map + self.type = type + self.path_id = path_id + self.parent_path = parent_path diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_input_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_input_v2026_r0.py new file mode 100644 index 00000000..c8d71c8a --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_input_v2026_r0.py @@ -0,0 +1,20 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingAccountInputV2026R0(BaseObject): + def __init__( + self, *, id: Optional[str] = None, email: Optional[str] = None, **kwargs + ): + """ + :param id: The platform-native identifier of the account., defaults to None + :type id: Optional[str], optional + :param email: The email address of the account., defaults to None + :type email: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.email = email diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_input_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_input_v2026_r0.py new file mode 100644 index 00000000..2f5e202e --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_input_v2026_r0.py @@ -0,0 +1,48 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_input_v2026_r0 import ( + ShuttlePathMappingAccountInputV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingAccountLocationInputV2026R0TypeField(str, Enum): + ACCOUNT = 'account' + + +class ShuttlePathMappingAccountLocationInputV2026R0(BaseObject): + _discriminator = 'type', {'account'} + + def __init__( + self, + path: str, + account: ShuttlePathMappingAccountInputV2026R0, + *, + type: ShuttlePathMappingAccountLocationInputV2026R0TypeField = ShuttlePathMappingAccountLocationInputV2026R0TypeField.ACCOUNT, + path_id: Optional[str] = None, + is_directory: Optional[bool] = None, + **kwargs + ): + """ + :param path: The human-readable path relative to the account root. + :type path: str + :param type: The value will always be `account`., defaults to ShuttlePathMappingAccountLocationInputV2026R0TypeField.ACCOUNT + :type type: ShuttlePathMappingAccountLocationInputV2026R0TypeField, optional + :param path_id: An optional stable identifier of the location, when obtained from + browsing., defaults to None + :type path_id: Optional[str], optional + :param is_directory: Whether the location is a directory. When set, the destination must be + the same kind of object., defaults to None + :type is_directory: Optional[bool], optional + """ + super().__init__(**kwargs) + self.path = path + self.account = account + self.type = type + self.path_id = path_id + self.is_directory = is_directory diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_target_input_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_target_input_v2026_r0.py new file mode 100644 index 00000000..da4ca223 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_target_input_v2026_r0.py @@ -0,0 +1,43 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_input_v2026_r0 import ( + ShuttlePathMappingAccountInputV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField(str, Enum): + ACCOUNT = 'account' + + +class ShuttlePathMappingAccountLocationTargetInputV2026R0(BaseObject): + _discriminator = 'type', {'account'} + + def __init__( + self, + path: str, + account: ShuttlePathMappingAccountInputV2026R0, + *, + type: ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField = ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField.ACCOUNT, + path_id: Optional[str] = None, + **kwargs + ): + """ + :param path: The human-readable path relative to the account root. + :type path: str + :param type: The value will always be `account`., defaults to ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField.ACCOUNT + :type type: ShuttlePathMappingAccountLocationTargetInputV2026R0TypeField, optional + :param path_id: An optional stable identifier of the location, when obtained from + browsing., defaults to None + :type path_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.path = path + self.account = account + self.type = type + self.path_id = path_id diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_v2026_r0.py new file mode 100644 index 00000000..cf6e229d --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_location_v2026_r0.py @@ -0,0 +1,47 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_v2026_r0 import ( + ShuttlePathMappingAccountV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingAccountLocationV2026R0TypeField(str, Enum): + ACCOUNT = 'account' + + +class ShuttlePathMappingAccountLocationV2026R0(BaseObject): + _discriminator = 'type', {'account'} + + def __init__( + self, + path: str, + *, + type: ShuttlePathMappingAccountLocationV2026R0TypeField = ShuttlePathMappingAccountLocationV2026R0TypeField.ACCOUNT, + path_id: Optional[str] = None, + account: Optional[ShuttlePathMappingAccountV2026R0] = None, + is_directory: Optional[bool] = None, + **kwargs + ): + """ + :param path: The human-readable path relative to the account root. + :type path: str + :param type: The value will always be `account`., defaults to ShuttlePathMappingAccountLocationV2026R0TypeField.ACCOUNT + :type type: ShuttlePathMappingAccountLocationV2026R0TypeField, optional + :param path_id: The stable identifier of the location. `null` when the system does not + provide one., defaults to None + :type path_id: Optional[str], optional + :param is_directory: Whether the location is a directory. `null` when unknown., defaults to None + :type is_directory: Optional[bool], optional + """ + super().__init__(**kwargs) + self.path = path + self.type = type + self.path_id = path_id + self.account = account + self.is_directory = is_directory diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_v2026_r0.py new file mode 100644 index 00000000..f363b15c --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_account_v2026_r0.py @@ -0,0 +1,29 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingAccountV2026R0(BaseObject): + def __init__( + self, + *, + id: Optional[str] = None, + email: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param id: The platform-native identifier of the account. `null` when the system + does not provide one., defaults to None + :type id: Optional[str], optional + :param email: The email address of the account. `null` when unknown., defaults to None + :type email: Optional[str], optional + :param name: The display name of the account. `null` when unknown., defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.email = email + self.name = name diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_create_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_create_request_v2026_r0.py new file mode 100644 index 00000000..dc15329d --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_create_request_v2026_r0.py @@ -0,0 +1,56 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_input_v2026_r0 import ( + ShuttlePathMappingAccountLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_input_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_target_input_v2026_r0 import ( + ShuttlePathMappingAccountLocationTargetInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_target_input_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_location_input_v2026_r0 import ( + ShuttlePathMappingLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_target_location_input_v2026_r0 import ( + ShuttlePathMappingTargetLocationInputV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingCreateRequestV2026R0(BaseObject): + def __init__( + self, + job_id: str, + source: ShuttlePathMappingLocationInputV2026R0, + *, + is_path_skipped: Optional[bool] = None, + target: Optional[ShuttlePathMappingTargetLocationInputV2026R0] = None, + **kwargs + ): + """ + :param job_id: The unique identifier of the shuttle job this mapping belongs to. + :type job_id: str + :param is_path_skipped: Whether this source path should be skipped during the migration. + Defaults to `false`., defaults to None + :type is_path_skipped: Optional[bool], optional + :param target: The destination location to migrate to. Omit or set to `null` when the + source path is skipped., defaults to None + :type target: Optional[ShuttlePathMappingTargetLocationInputV2026R0], optional + """ + super().__init__(**kwargs) + self.job_id = job_id + self.source = source + self.is_path_skipped = is_path_skipped + self.target = target diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_import_create_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_import_create_request_v2026_r0.py new file mode 100644 index 00000000..906fe2d8 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_import_create_request_v2026_r0.py @@ -0,0 +1,19 @@ +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingImportCreateRequestV2026R0(BaseObject): + def __init__(self, job_id: str, file_id: str, **kwargs): + """ + :param job_id: The unique identifier of the shuttle job whose path mappings are + replaced. + :type job_id: str + :param file_id: The unique identifier of the Box file holding the mapping workbook. The + file is read as the calling user, so it must live somewhere that user can + download from. + :type file_id: str + """ + super().__init__(**kwargs) + self.job_id = job_id + self.file_id = file_id diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_location_input_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_location_input_v2026_r0.py new file mode 100644 index 00000000..db8281de --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_location_input_v2026_r0.py @@ -0,0 +1,16 @@ +from typing import Union + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_input_v2026_r0 import ( + ShuttlePathMappingAccountLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_input_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationInputV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +ShuttlePathMappingLocationInputV2026R0 = Union[ + ShuttlePathMappingAccountLocationInputV2026R0, + ShuttlePathMappingSharedSpaceLocationInputV2026R0, +] diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_location_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_location_v2026_r0.py new file mode 100644 index 00000000..6149ffbc --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_location_v2026_r0.py @@ -0,0 +1,16 @@ +from typing import Union + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_v2026_r0 import ( + ShuttlePathMappingAccountLocationV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +ShuttlePathMappingLocationV2026R0 = Union[ + ShuttlePathMappingAccountLocationV2026R0, + ShuttlePathMappingSharedSpaceLocationV2026R0, +] diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_input_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_input_v2026_r0.py new file mode 100644 index 00000000..067a8fdc --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_input_v2026_r0.py @@ -0,0 +1,47 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField(str, Enum): + SHARED_SPACE = 'shared_space' + + +class ShuttlePathMappingSharedSpaceLocationInputV2026R0(BaseObject): + _discriminator = 'type', {'shared_space'} + + def __init__( + self, + path: str, + *, + type: ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField = ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField.SHARED_SPACE, + space: Optional[str] = None, + path_id: Optional[str] = None, + is_directory: Optional[bool] = None, + **kwargs + ): + """ + :param path: The human-readable path relative to the shared container. + :type path: str + :param type: The value will always be `shared_space`., defaults to ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField.SHARED_SPACE + :type type: ShuttlePathMappingSharedSpaceLocationInputV2026R0TypeField, optional + :param space: The display name of the shared container. Required for systems with + multiple containers., defaults to None + :type space: Optional[str], optional + :param path_id: An optional stable identifier of the location, when obtained from + browsing., defaults to None + :type path_id: Optional[str], optional + :param is_directory: Whether the location is a directory. When set, the destination must be + the same kind of object., defaults to None + :type is_directory: Optional[bool], optional + """ + super().__init__(**kwargs) + self.path = path + self.type = type + self.space = space + self.path_id = path_id + self.is_directory = is_directory diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_target_input_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_target_input_v2026_r0.py new file mode 100644 index 00000000..7555376d --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_target_input_v2026_r0.py @@ -0,0 +1,42 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField(str, Enum): + SHARED_SPACE = 'shared_space' + + +class ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0(BaseObject): + _discriminator = 'type', {'shared_space'} + + def __init__( + self, + path: str, + *, + type: ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField = ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField.SHARED_SPACE, + space: Optional[str] = None, + path_id: Optional[str] = None, + **kwargs + ): + """ + :param path: The human-readable path relative to the shared container. + :type path: str + :param type: The value will always be `shared_space`., defaults to ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField.SHARED_SPACE + :type type: ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0TypeField, optional + :param space: The display name of the shared container. Required for systems with + multiple containers., defaults to None + :type space: Optional[str], optional + :param path_id: An optional stable identifier of the location, when obtained from + browsing., defaults to None + :type path_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.path = path + self.type = type + self.space = space + self.path_id = path_id diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_v2026_r0.py new file mode 100644 index 00000000..08a69c47 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_shared_space_location_v2026_r0.py @@ -0,0 +1,46 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingSharedSpaceLocationV2026R0TypeField(str, Enum): + SHARED_SPACE = 'shared_space' + + +class ShuttlePathMappingSharedSpaceLocationV2026R0(BaseObject): + _discriminator = 'type', {'shared_space'} + + def __init__( + self, + path: str, + *, + type: ShuttlePathMappingSharedSpaceLocationV2026R0TypeField = ShuttlePathMappingSharedSpaceLocationV2026R0TypeField.SHARED_SPACE, + space: Optional[str] = None, + path_id: Optional[str] = None, + is_directory: Optional[bool] = None, + **kwargs + ): + """ + :param path: The human-readable path relative to the shared container. + :type path: str + :param type: The value will always be `shared_space`., defaults to ShuttlePathMappingSharedSpaceLocationV2026R0TypeField.SHARED_SPACE + :type type: ShuttlePathMappingSharedSpaceLocationV2026R0TypeField, optional + :param space: The display name of the shared container. `null` when the system has a + single implicit container., defaults to None + :type space: Optional[str], optional + :param path_id: The stable identifier of the location. `null` when the system does not + provide one., defaults to None + :type path_id: Optional[str], optional + :param is_directory: Whether the location is a directory. `null` when unknown., defaults to None + :type is_directory: Optional[bool], optional + """ + super().__init__(**kwargs) + self.path = path + self.type = type + self.space = space + self.path_id = path_id + self.is_directory = is_directory diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_target_location_input_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_target_location_input_v2026_r0.py new file mode 100644 index 00000000..db10a3d1 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_target_location_input_v2026_r0.py @@ -0,0 +1,16 @@ +from typing import Union + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_target_input_v2026_r0 import ( + ShuttlePathMappingAccountLocationTargetInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_target_input_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +ShuttlePathMappingTargetLocationInputV2026R0 = Union[ + ShuttlePathMappingAccountLocationTargetInputV2026R0, + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0, +] diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_update_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_update_request_v2026_r0.py new file mode 100644 index 00000000..7c43f144 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_update_request_v2026_r0.py @@ -0,0 +1,51 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_input_v2026_r0 import ( + ShuttlePathMappingAccountLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_input_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_target_input_v2026_r0 import ( + ShuttlePathMappingAccountLocationTargetInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_target_input_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationTargetInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_location_input_v2026_r0 import ( + ShuttlePathMappingLocationInputV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_target_location_input_v2026_r0 import ( + ShuttlePathMappingTargetLocationInputV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingUpdateRequestV2026R0(BaseObject): + def __init__( + self, + *, + is_path_skipped: Optional[bool] = None, + source: Optional[ShuttlePathMappingLocationInputV2026R0] = None, + target: Optional[ShuttlePathMappingTargetLocationInputV2026R0] = None, + **kwargs + ): + """ + :param is_path_skipped: Whether this source path should be skipped during the migration., defaults to None + :type is_path_skipped: Optional[bool], optional + :param target: The destination location to migrate to. Set to `null` to clear the + destination, for example when skipping the source path., defaults to None + :type target: Optional[ShuttlePathMappingTargetLocationInputV2026R0], optional + """ + super().__init__(**kwargs) + self.is_path_skipped = is_path_skipped + self.source = source + self.target = target diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_v2026_r0.py new file mode 100644 index 00000000..fd49f326 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mapping_v2026_r0.py @@ -0,0 +1,59 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_account_location_v2026_r0 import ( + ShuttlePathMappingAccountLocationV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_shared_space_location_v2026_r0 import ( + ShuttlePathMappingSharedSpaceLocationV2026R0, +) + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_location_v2026_r0 import ( + ShuttlePathMappingLocationV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingV2026R0TypeField(str, Enum): + SHUTTLE_PATH_MAPPING = 'shuttle_path_mapping' + + +class ShuttlePathMappingV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_path_mapping'} + + def __init__( + self, + id: str, + job_id: str, + is_path_skipped: bool, + source: ShuttlePathMappingLocationV2026R0, + *, + type: ShuttlePathMappingV2026R0TypeField = ShuttlePathMappingV2026R0TypeField.SHUTTLE_PATH_MAPPING, + target: Optional[ShuttlePathMappingLocationV2026R0] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shuttle path mapping. + :type id: str + :param job_id: The unique identifier of the shuttle job this mapping belongs to. + :type job_id: str + :param is_path_skipped: Whether this source path is skipped during the migration. + :type is_path_skipped: bool + :param type: The value will always be `shuttle_path_mapping`., defaults to ShuttlePathMappingV2026R0TypeField.SHUTTLE_PATH_MAPPING + :type type: ShuttlePathMappingV2026R0TypeField, optional + :param target: The destination location. `null` when the source path is skipped or + the job has no destination, such as an analysis job., defaults to None + :type target: Optional[ShuttlePathMappingLocationV2026R0], optional + """ + super().__init__(**kwargs) + self.id = id + self.job_id = job_id + self.is_path_skipped = is_path_skipped + self.source = source + self.type = type + self.target = target diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_path_mappings_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mappings_v2026_r0.py new file mode 100644 index 00000000..81541dca --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_path_mappings_v2026_r0.py @@ -0,0 +1,40 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_path_mapping_v2026_r0 import ( + ShuttlePathMappingV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttlePathMappingsV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttlePathMappingV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of shuttle path mappings. + :type entries: List[ShuttlePathMappingV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_report_create_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_report_create_request_v2026_r0.py new file mode 100644 index 00000000..91726272 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_report_create_request_v2026_r0.py @@ -0,0 +1,52 @@ +from enum import Enum + +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleReportCreateRequestV2026R0FormatField(str, Enum): + XLSX = 'xlsx' + CSV = 'csv' + + +class ShuttleReportCreateRequestV2026R0UsersScopeField(str, Enum): + MIGRATED = 'migrated' + ALL = 'all' + + +class ShuttleReportCreateRequestV2026R0(BaseObject): + def __init__( + self, + run_id: str, + format: ShuttleReportCreateRequestV2026R0FormatField, + sections: List[str], + *, + users_scope: Optional[ShuttleReportCreateRequestV2026R0UsersScopeField] = None, + **kwargs + ): + """ + :param run_id: The unique identifier of the shuttle run to generate a report for. + :type run_id: str + :param format: The output file format of the report. + :type format: ShuttleReportCreateRequestV2026R0FormatField + :param sections: The sections to include in the report. Must be a non-empty subset of + the run's `available_report_sections`. This is an open list whose set + of values is expected to grow; the currently documented values include + `files_and_folders`, `event_log`, `transfer_overview`, `source_users`, + `target_users`, `source_collaborators`, `target_collaborators`, + `source_collaborations`, and `target_collaborations`. + :type sections: List[str] + :param users_scope: Which users to include in user-related report sections. Defaults to + `migrated` when omitted., defaults to None + :type users_scope: Optional[ShuttleReportCreateRequestV2026R0UsersScopeField], optional + """ + super().__init__(**kwargs) + self.run_id = run_id + self.format = format + self.sections = sections + self.users_scope = users_scope diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_report_output_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_report_output_v2026_r0.py new file mode 100644 index 00000000..78d3716c --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_report_output_v2026_r0.py @@ -0,0 +1,25 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleReportOutputV2026R0TypeField(str, Enum): + FILE = 'file' + FOLDER = 'folder' + + +class ShuttleReportOutputV2026R0(BaseObject): + _discriminator = 'type', {'file', 'folder'} + + def __init__(self, id: str, type: ShuttleReportOutputV2026R0TypeField, **kwargs): + """ + :param id: The unique identifier of the generated Box file or folder. + :type id: str + :param type: The Box object type of the generated file or folder. + :type type: ShuttleReportOutputV2026R0TypeField + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_report_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_report_v2026_r0.py new file mode 100644 index 00000000..edcbf7bf --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_report_v2026_r0.py @@ -0,0 +1,98 @@ +from enum import Enum + +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_report_output_v2026_r0 import ( + ShuttleReportOutputV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.internal.utils import DateTime + + +class ShuttleReportV2026R0TypeField(str, Enum): + SHUTTLE_REPORT = 'shuttle_report' + + +class ShuttleReportV2026R0FormatField(str, Enum): + XLSX = 'xlsx' + CSV = 'csv' + + +class ShuttleReportV2026R0UsersScopeField(str, Enum): + MIGRATED = 'migrated' + ALL = 'all' + + +class ShuttleReportV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_report'} + + def __init__( + self, + id: str, + run_id: str, + status: str, + format: ShuttleReportV2026R0FormatField, + *, + type: ShuttleReportV2026R0TypeField = ShuttleReportV2026R0TypeField.SHUTTLE_REPORT, + sections: Optional[List[str]] = None, + users_scope: Optional[ShuttleReportV2026R0UsersScopeField] = None, + output: Optional[ShuttleReportOutputV2026R0] = None, + created_at: Optional[DateTime] = None, + completed_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shuttle report. + :type id: str + :param run_id: The unique identifier of the shuttle run this report was generated + for. + :type run_id: str + :param status: The generation status of the report. This is an open string whose set + of values is expected to grow; the currently documented values include + `pending`, `processing`, `complete`, `failed`, `canceled`, and + `unknown`. Keep polling `pending` and `processing`. Stop on + `complete`, `failed`, `canceled`, and `unknown`. Treat any value that + is not recognized the same as `unknown`: do not fail parsing, and do + not keep polling. + :type status: str + :param format: The output file format of the report. + :type format: ShuttleReportV2026R0FormatField + :param type: The value will always be `shuttle_report`., defaults to ShuttleReportV2026R0TypeField.SHUTTLE_REPORT + :type type: ShuttleReportV2026R0TypeField, optional + :param sections: The sections included in the report. Echoes the sections requested on + create. This is an open list whose set of values is expected to grow; + the currently documented values include `files_and_folders`, + `event_log`, `transfer_overview`, `source_users`, `target_users`, + `source_collaborators`, `target_collaborators`, + `source_collaborations`, and `target_collaborations`. Omitted on + older reports that have no stored section list. New reports always + include this field., defaults to None + :type sections: Optional[List[str]], optional + :param users_scope: Which users are included in user-related report sections., defaults to None + :type users_scope: Optional[ShuttleReportV2026R0UsersScopeField], optional + :param output: The generated Box file or folder. Always present; `null` until + `status` is `complete`., defaults to None + :type output: Optional[ShuttleReportOutputV2026R0], optional + :param created_at: When report generation was requested., defaults to None + :type created_at: Optional[DateTime], optional + :param completed_at: When report generation finished. Always present; `null` while + generation is still in progress., defaults to None + :type completed_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.run_id = run_id + self.status = status + self.format = format + self.type = type + self.sections = sections + self.users_scope = users_scope + self.output = output + self.created_at = created_at + self.completed_at = completed_at diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_reports_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_reports_v2026_r0.py new file mode 100644 index 00000000..3d733c0c --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_reports_v2026_r0.py @@ -0,0 +1,38 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_report_v2026_r0 import ShuttleReportV2026R0 + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleReportsV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttleReportV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of shuttle reports. + :type entries: List[ShuttleReportV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_run_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_run_v2026_r0.py new file mode 100644 index 00000000..e20c4913 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_run_v2026_r0.py @@ -0,0 +1,116 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + +from box_sdk_gen.schemas.v2026_r0.user_base_v2026_r0 import UserBaseV2026R0 + +from box_sdk_gen.box.errors import BoxSDKError + +from box_sdk_gen.internal.utils import DateTime + + +class ShuttleRunV2026R0TypeField(str, Enum): + SHUTTLE_RUN = 'shuttle_run' + + +class ShuttleRunV2026R0StatsField(BaseObject): + def __init__( + self, + *, + bytes_sent: Optional[int] = None, + files_sent: Optional[int] = None, + folders_created: Optional[int] = None, + is_estimated: Optional[bool] = None, + **kwargs + ): + """ + :param bytes_sent: Bytes transferred during the run., defaults to None + :type bytes_sent: Optional[int], optional + :param files_sent: Files transferred during the run., defaults to None + :type files_sent: Optional[int], optional + :param folders_created: Folders created on the destination during the run., defaults to None + :type folders_created: Optional[int], optional + :param is_estimated: Whether these figures are estimates rather than final counts., defaults to None + :type is_estimated: Optional[bool], optional + """ + super().__init__(**kwargs) + self.bytes_sent = bytes_sent + self.files_sent = files_sent + self.folders_created = folders_created + self.is_estimated = is_estimated + + +class ShuttleRunV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_run'} + + def __init__( + self, + id: str, + job_id: str, + run_mode: str, + state: str, + *, + type: ShuttleRunV2026R0TypeField = ShuttleRunV2026R0TypeField.SHUTTLE_RUN, + started_at: Optional[DateTime] = None, + ended_at: Optional[DateTime] = None, + duration_seconds: Optional[int] = None, + stats: Optional[ShuttleRunV2026R0StatsField] = None, + created_by: Optional[UserBaseV2026R0] = None, + available_report_sections: Optional[List[str]] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shuttle run, in the form + `{job_id}:{run_number}`. + :type id: str + :param job_id: The unique identifier of the shuttle job this run belongs to. + :type job_id: str + :param run_mode: The mode the run was started in. This is an open string whose set of + values is expected to grow; the currently documented values include + `transfer`, `simulation`, `analysis`, `scan`, and `unknown`. Clients + should treat any value they do not recognize as `unknown`. + :type run_mode: str + :param state: The current state of the shuttle run. This is an open string whose set + of values is expected to grow; the currently documented values include + `running`, `stopping`, `completed`, `completed_with_errors`, `stopped`, + `failed`, `timed_out`, and `unknown`. Clients should treat any value + they do not recognize as `unknown`. + :type state: str + :param type: The value will always be `shuttle_run`., defaults to ShuttleRunV2026R0TypeField.SHUTTLE_RUN + :type type: ShuttleRunV2026R0TypeField, optional + :param started_at: When the run started., defaults to None + :type started_at: Optional[DateTime], optional + :param ended_at: When the run ended. `null` while the run is still in progress., defaults to None + :type ended_at: Optional[DateTime], optional + :param duration_seconds: Total duration of the run in seconds. `null` while the run is still in + progress., defaults to None + :type duration_seconds: Optional[int], optional + :param stats: Transfer statistics collected during the run., defaults to None + :type stats: Optional[ShuttleRunV2026R0StatsField], optional + :param created_by: The user who started the run. `null` for schedule- or system-initiated + runs., defaults to None + :type created_by: Optional[UserBaseV2026R0], optional + :param available_report_sections: Report sections that can be requested for this run. This is an open + list whose set of values is expected to grow; the currently documented + values include `files_and_folders`, `event_log`, `transfer_overview`, + `source_users`, `target_users`, `source_collaborators`, + `target_collaborators`, `source_collaborations`, and + `target_collaborations`., defaults to None + :type available_report_sections: Optional[List[str]], optional + """ + super().__init__(**kwargs) + self.id = id + self.job_id = job_id + self.run_mode = run_mode + self.state = state + self.type = type + self.started_at = started_at + self.ended_at = ended_at + self.duration_seconds = duration_seconds + self.stats = stats + self.created_by = created_by + self.available_report_sections = available_report_sections diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_runs_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_runs_v2026_r0.py new file mode 100644 index 00000000..57662610 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_runs_v2026_r0.py @@ -0,0 +1,38 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_run_v2026_r0 import ShuttleRunV2026R0 + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleRunsV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttleRunV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of shuttle runs. + :type entries: List[ShuttleRunV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_create_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_create_request_v2026_r0.py new file mode 100644 index 00000000..4cab3dba --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_create_request_v2026_r0.py @@ -0,0 +1,43 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_target_subject_input_v2026_r0 import ( + ShuttleTargetSubjectInputV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSubjectMappingCreateRequestV2026R0(BaseObject): + def __init__( + self, + job_id: str, + discovered_subject_id: str, + *, + revision: Optional[int] = None, + is_subject_skipped: Optional[bool] = None, + target: Optional[ShuttleTargetSubjectInputV2026R0] = None, + **kwargs + ): + """ + :param job_id: The unique identifier of the shuttle job this mapping belongs to. + :type job_id: str + :param discovered_subject_id: The unique identifier of the discovered subject to map. + :type discovered_subject_id: str + :param revision: The discovery-requirements revision to resolve against. Omit to use the + latest revision., defaults to None + :type revision: Optional[int], optional + :param is_subject_skipped: Whether this subject should be skipped during the migration. Defaults + to `false`., defaults to None + :type is_subject_skipped: Optional[bool], optional + :param target: The Box target to map to. Omit or set to `null` when the subject is + skipped., defaults to None + :type target: Optional[ShuttleTargetSubjectInputV2026R0], optional + """ + super().__init__(**kwargs) + self.job_id = job_id + self.discovered_subject_id = discovered_subject_id + self.revision = revision + self.is_subject_skipped = is_subject_skipped + self.target = target diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_import_create_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_import_create_request_v2026_r0.py new file mode 100644 index 00000000..b4643980 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_import_create_request_v2026_r0.py @@ -0,0 +1,19 @@ +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSubjectMappingImportCreateRequestV2026R0(BaseObject): + def __init__(self, job_id: str, file_id: str, **kwargs): + """ + :param job_id: The unique identifier of the shuttle job whose subject mappings are + replaced. + :type job_id: str + :param file_id: The unique identifier of the Box file holding the mapping workbook. The + file is read as the calling user, so it must live somewhere that user can + download from. + :type file_id: str + """ + super().__init__(**kwargs) + self.job_id = job_id + self.file_id = file_id diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_update_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_update_request_v2026_r0.py new file mode 100644 index 00000000..cfdd4c74 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_update_request_v2026_r0.py @@ -0,0 +1,30 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_target_subject_input_v2026_r0 import ( + ShuttleTargetSubjectInputV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSubjectMappingUpdateRequestV2026R0(BaseObject): + def __init__( + self, + *, + is_subject_skipped: Optional[bool] = None, + target: Optional[ShuttleTargetSubjectInputV2026R0] = None, + **kwargs + ): + """ + :param is_subject_skipped: Whether this subject should be skipped during the migration., defaults to None + :type is_subject_skipped: Optional[bool], optional + :param target: The Box target to map to. Set to `null` only for a skipped subject. + Setting it to `null` while the mapping is active fails validation. + Updating `is_subject_skipped` alone preserves the existing target., defaults to None + :type target: Optional[ShuttleTargetSubjectInputV2026R0], optional + """ + super().__init__(**kwargs) + self.is_subject_skipped = is_subject_skipped + self.target = target diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_v2026_r0.py new file mode 100644 index 00000000..da035f2f --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mapping_v2026_r0.py @@ -0,0 +1,63 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_v2026_r0 import ShuttleSubjectV2026R0 + +from box_sdk_gen.schemas.v2026_r0.shuttle_target_subject_v2026_r0 import ( + ShuttleTargetSubjectV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSubjectMappingV2026R0TypeField(str, Enum): + SHUTTLE_SUBJECT_MAPPING = 'shuttle_subject_mapping' + + +class ShuttleSubjectMappingV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_subject_mapping'} + + def __init__( + self, + id: str, + job_id: str, + is_subject_skipped: bool, + source: ShuttleSubjectV2026R0, + *, + type: ShuttleSubjectMappingV2026R0TypeField = ShuttleSubjectMappingV2026R0TypeField.SHUTTLE_SUBJECT_MAPPING, + discovered_subject_id: Optional[str] = None, + revision: Optional[int] = None, + target: Optional[ShuttleTargetSubjectV2026R0] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shuttle subject mapping. + :type id: str + :param job_id: The unique identifier of the shuttle job this mapping belongs to. + :type job_id: str + :param is_subject_skipped: Whether this subject is skipped during the migration. + :type is_subject_skipped: bool + :param type: The value will always be `shuttle_subject_mapping`., defaults to ShuttleSubjectMappingV2026R0TypeField.SHUTTLE_SUBJECT_MAPPING + :type type: ShuttleSubjectMappingV2026R0TypeField, optional + :param discovered_subject_id: The unique identifier of the discovered subject this mapping applies to. + `null` for legacy mappings created before this field was tracked., defaults to None + :type discovered_subject_id: Optional[str], optional + :param revision: The discovery-requirements revision this mapping was resolved against. + `null` for legacy mappings., defaults to None + :type revision: Optional[int], optional + :param target: The Box target subject. `null` when the subject is skipped or not yet + assigned., defaults to None + :type target: Optional[ShuttleTargetSubjectV2026R0], optional + """ + super().__init__(**kwargs) + self.id = id + self.job_id = job_id + self.is_subject_skipped = is_subject_skipped + self.source = source + self.type = type + self.discovered_subject_id = discovered_subject_id + self.revision = revision + self.target = target diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mappings_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mappings_v2026_r0.py new file mode 100644 index 00000000..232cf9fa --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_mappings_v2026_r0.py @@ -0,0 +1,40 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_mapping_v2026_r0 import ( + ShuttleSubjectMappingV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSubjectMappingsV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttleSubjectMappingV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of shuttle subject mappings. + :type entries: List[ShuttleSubjectMappingV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_subject_role_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_role_v2026_r0.py new file mode 100644 index 00000000..cd85e69a --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_role_v2026_r0.py @@ -0,0 +1,13 @@ +from enum import Enum + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSubjectRoleV2026R0(str, Enum): + OWNER = 'owner' + CREATOR = 'creator' + UPDATER = 'updater' + NAMESPACE_ACCOUNT = 'namespace_account' + SHAREE = 'sharee' + ACCOUNT_HOLDER = 'account_holder' + UNKNOWN = 'unknown' diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_subject_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_v2026_r0.py new file mode 100644 index 00000000..6f001846 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_subject_v2026_r0.py @@ -0,0 +1,52 @@ +from enum import Enum + +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_subject_role_v2026_r0 import ( + ShuttleSubjectRoleV2026R0, +) + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSubjectV2026R0TypeField(str, Enum): + USER = 'user' + GROUP = 'group' + + +class ShuttleSubjectV2026R0(BaseObject): + _discriminator = 'type', {'user', 'group'} + + def __init__( + self, + type: ShuttleSubjectV2026R0TypeField, + *, + id: Optional[str] = None, + email: Optional[str] = None, + name: Optional[str] = None, + roles: Optional[List[ShuttleSubjectRoleV2026R0]] = None, + **kwargs + ): + """ + :param type: Whether this subject is a user or a group. + :type type: ShuttleSubjectV2026R0TypeField + :param id: The platform-native identifier of the subject. `null` when the system + does not provide one., defaults to None + :type id: Optional[str], optional + :param email: The email address of the subject. `null` when unknown., defaults to None + :type email: Optional[str], optional + :param name: The display name of the subject. `null` when unknown., defaults to None + :type name: Optional[str], optional + :param roles: Roles this subject holds on the source. `null` when no roles are known., defaults to None + :type roles: Optional[List[ShuttleSubjectRoleV2026R0]], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + self.email = email + self.name = name + self.roles = roles diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_system_create_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_system_create_request_v2026_r0.py new file mode 100644 index 00000000..28807f23 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_system_create_request_v2026_r0.py @@ -0,0 +1,29 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSystemCreateRequestV2026R0SystemTypeField(str, Enum): + WINDOWS = 'windows' + + +class ShuttleSystemCreateRequestV2026R0(BaseObject): + def __init__( + self, + name: str, + *, + system_type: ShuttleSystemCreateRequestV2026R0SystemTypeField = ShuttleSystemCreateRequestV2026R0SystemTypeField.WINDOWS, + **kwargs + ): + """ + :param name: The display name for the new shuttle system. + :type name: str + :param system_type: The public system type identifier for the new shuttle system. Only + `windows` is currently supported through the public API., defaults to ShuttleSystemCreateRequestV2026R0SystemTypeField.WINDOWS + :type system_type: ShuttleSystemCreateRequestV2026R0SystemTypeField, optional + """ + super().__init__(**kwargs) + self.name = name + self.system_type = system_type diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_system_update_request_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_system_update_request_v2026_r0.py new file mode 100644 index 00000000..4934f9c1 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_system_update_request_v2026_r0.py @@ -0,0 +1,15 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSystemUpdateRequestV2026R0(BaseObject): + def __init__(self, *, name: Optional[str] = None, **kwargs): + """ + :param name: The updated display name for the shuttle system., defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.name = name diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_system_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_system_v2026_r0.py new file mode 100644 index 00000000..2937b616 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_system_v2026_r0.py @@ -0,0 +1,57 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSystemV2026R0TypeField(str, Enum): + SHUTTLE_SYSTEM = 'shuttle_system' + + +class ShuttleSystemV2026R0StateField(str, Enum): + CONNECTED = 'connected' + DISCONNECTED = 'disconnected' + UNKNOWN = 'unknown' + + +class ShuttleSystemV2026R0(BaseObject): + _discriminator = 'type', {'shuttle_system'} + + def __init__( + self, + id: str, + name: str, + system_type: str, + state: ShuttleSystemV2026R0StateField, + *, + type: ShuttleSystemV2026R0TypeField = ShuttleSystemV2026R0TypeField.SHUTTLE_SYSTEM, + label: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shuttle system. + :type id: str + :param name: The display name of the shuttle system. + :type name: str + :param system_type: Identifies the kind of source or destination this system represents, for + example `box`, `windows`, `sharepoint`, or `amazon_s3`. New system types + are added over time, so clients must tolerate values they do not + recognize rather than treating this as a fixed set. + :type system_type: str + :param state: The current connection state of the shuttle system. + :type state: ShuttleSystemV2026R0StateField + :param type: The value will always be `shuttle_system`., defaults to ShuttleSystemV2026R0TypeField.SHUTTLE_SYSTEM + :type type: ShuttleSystemV2026R0TypeField, optional + :param label: A server-computed display label for the system., defaults to None + :type label: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.system_type = system_type + self.state = state + self.type = type + self.label = label diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_systems_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_systems_v2026_r0.py new file mode 100644 index 00000000..8e0bd0f1 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_systems_v2026_r0.py @@ -0,0 +1,38 @@ +from typing import List + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.v2026_r0.shuttle_system_v2026_r0 import ShuttleSystemV2026R0 + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleSystemsV2026R0(BaseObject): + def __init__( + self, + entries: List[ShuttleSystemV2026R0], + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of shuttle systems. + :type entries: List[ShuttleSystemV2026R0] + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + :param prev_marker: The marker for the start of the previous page of results., defaults to None + :type prev_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_target_subject_input_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_target_subject_input_v2026_r0.py new file mode 100644 index 00000000..fb7b497a --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_target_subject_input_v2026_r0.py @@ -0,0 +1,27 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleTargetSubjectInputV2026R0TypeField(str, Enum): + USER = 'user' + GROUP = 'group' + + +class ShuttleTargetSubjectInputV2026R0(BaseObject): + _discriminator = 'type', {'user', 'group'} + + def __init__( + self, type: ShuttleTargetSubjectInputV2026R0TypeField, id: str, **kwargs + ): + """ + :param type: Whether the Box target is a user or a group. + :type type: ShuttleTargetSubjectInputV2026R0TypeField + :param id: The identifier of the target Box subject. + :type id: str + """ + super().__init__(**kwargs) + self.type = type + self.id = id diff --git a/box_sdk_gen/schemas/v2026_r0/shuttle_target_subject_v2026_r0.py b/box_sdk_gen/schemas/v2026_r0/shuttle_target_subject_v2026_r0.py new file mode 100644 index 00000000..e9823b30 --- /dev/null +++ b/box_sdk_gen/schemas/v2026_r0/shuttle_target_subject_v2026_r0.py @@ -0,0 +1,44 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.box.errors import BoxSDKError + + +class ShuttleTargetSubjectV2026R0TypeField(str, Enum): + USER = 'user' + GROUP = 'group' + + +class ShuttleTargetSubjectV2026R0(BaseObject): + _discriminator = 'type', {'user', 'group'} + + def __init__( + self, + type: ShuttleTargetSubjectV2026R0TypeField, + *, + id: Optional[str] = None, + email: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param type: Whether the Box target is a user or a group. + :type type: ShuttleTargetSubjectV2026R0TypeField + :param id: The Box user or group ID. `null` when the mapping was not created + through this API and is identified by email (user) or name (group) + instead. Skip is represented by `target: null`, not a missing `id`. + Create and update always send `id`., defaults to None + :type id: Optional[str], optional + :param email: The email address of the target. `null` when unknown., defaults to None + :type email: Optional[str], optional + :param name: The display name of the target. `null` when unknown., defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + self.email = email + self.name = name diff --git a/docs/box_sdk_gen/README.md b/docs/box_sdk_gen/README.md index 44b951b1..0a73477d 100644 --- a/docs/box_sdk_gen/README.md +++ b/docs/box_sdk_gen/README.md @@ -79,6 +79,7 @@ the SDK are available by topic: - [Shield information barrier segments](shield_information_barrier_segments.md) - [Shield information barriers](shield_information_barriers.md) - [Shield lists](shield_lists.md) +- [Shuttle](shuttle.md) - [Sign requests](sign_requests.md) - [Sign templates](sign_templates.md) - [Skills](skills.md) diff --git a/docs/box_sdk_gen/shuttle.md b/docs/box_sdk_gen/shuttle.md new file mode 100644 index 00000000..e831c06a --- /dev/null +++ b/docs/box_sdk_gen/shuttle.md @@ -0,0 +1,1290 @@ +# ShuttleManager + +- [List shuttle systems](#list-shuttle-systems) +- [Create shuttle system](#create-shuttle-system) +- [Get shuttle system by ID](#get-shuttle-system-by-id) +- [Update shuttle system](#update-shuttle-system) +- [Delete shuttle system](#delete-shuttle-system) +- [Issue registration token for Windows system](#issue-registration-token-for-windows-system) +- [List shuttle jobs](#list-shuttle-jobs) +- [Create shuttle job](#create-shuttle-job) +- [Get shuttle job by ID](#get-shuttle-job-by-id) +- [Update shuttle job](#update-shuttle-job) +- [Delete shuttle job](#delete-shuttle-job) +- [Start shuttle job](#start-shuttle-job) +- [Stop shuttle job](#stop-shuttle-job) +- [Prepare migration](#prepare-migration) +- [List shuttle runs](#list-shuttle-runs) +- [Get shuttle run by ID](#get-shuttle-run-by-id) +- [List shuttle job schedules](#list-shuttle-job-schedules) +- [Create shuttle job schedule](#create-shuttle-job-schedule) +- [Get shuttle job schedule](#get-shuttle-job-schedule) +- [Update shuttle job schedule](#update-shuttle-job-schedule) +- [Delete shuttle job schedule](#delete-shuttle-job-schedule) +- [List shuttle path mappings](#list-shuttle-path-mappings) +- [Create shuttle path mapping](#create-shuttle-path-mapping) +- [Get shuttle path mapping by ID](#get-shuttle-path-mapping-by-id) +- [Update shuttle path mapping](#update-shuttle-path-mapping) +- [Delete shuttle path mapping](#delete-shuttle-path-mapping) +- [Create shuttle path mapping import](#create-shuttle-path-mapping-import) +- [Create shuttle subject mapping import](#create-shuttle-subject-mapping-import) +- [List shuttle subject mappings](#list-shuttle-subject-mappings) +- [Create shuttle subject mapping](#create-shuttle-subject-mapping) +- [Get shuttle subject mapping by ID](#get-shuttle-subject-mapping-by-id) +- [Update shuttle subject mapping](#update-shuttle-subject-mapping) +- [Delete shuttle subject mapping](#delete-shuttle-subject-mapping) +- [List shuttle discovered subjects](#list-shuttle-discovered-subjects) +- [List shuttle path entries](#list-shuttle-path-entries) +- [List shuttle mapping errors](#list-shuttle-mapping-errors) +- [List shuttle reports](#list-shuttle-reports) +- [Create shuttle report](#create-shuttle-report) +- [Get shuttle report by ID](#get-shuttle-report-by-id) + +## List shuttle systems + +Returns a paginated list of shuttle systems accessible to the +authenticated user. + +This operation is performed by calling function `get_shuttle_systems_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-systems/). + +_Currently we don't have an example for calling `get_shuttle_systems_v2026_r0` in integration tests_ + +### Arguments + +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleSystemsV2026R0`. + +Returns a paginated list of shuttle systems. + +## Create shuttle system + +Creates a new shuttle system. Only Windows agent systems can be created +through the public API; other system types must be configured through the +Shuttle application. + +This operation is performed by calling function `create_shuttle_system_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-systems/). + +_Currently we don't have an example for calling `create_shuttle_system_v2026_r0` in integration tests_ + +### Arguments + +- name `str` + - The display name for the new shuttle system. +- system_type `CreateShuttleSystemV2026R0SystemType` + - The public system type identifier for the new shuttle system. Only `windows` is currently supported through the public API. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleSystemV2026R0`. + +Returns the newly created shuttle system. + +## Get shuttle system by ID + +Returns details for a single shuttle system identified by its ID, +including its type and connection state. + +This operation is performed by calling function `get_shuttle_system_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-systems-id/). + +_Currently we don't have an example for calling `get_shuttle_system_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_system_id `str` + - The unique identifier for the shuttle system. Example: "6a315c0754833bfc5df067bf" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleSystemV2026R0`. + +Returns the shuttle system. + +## Update shuttle system + +Updates the mutable properties of an existing shuttle system identified by +its ID. Only the fields supplied in the request body are changed. + +This operation is performed by calling function `update_shuttle_system_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-systems-id/). + +_Currently we don't have an example for calling `update_shuttle_system_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_system_id `str` + - The unique identifier for the shuttle system. Example: "6a315c0754833bfc5df067bf" +- name `Optional[str]` + - The updated display name for the shuttle system. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleSystemV2026R0`. + +Returns the updated shuttle system. + +## Delete shuttle system + +Permanently deletes the shuttle system identified by its ID. This does not +affect content that has already been migrated. + +This operation is performed by calling function `delete_shuttle_system_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-systems-id/). + +_Currently we don't have an example for calling `delete_shuttle_system_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_system_id `str` + - The unique identifier for the shuttle system. Example: "6a315c0754833bfc5df067bf" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +Returns an empty response when the shuttle system was successfully +deleted. + +## Issue registration token for Windows system + +Issues a new installation token for the Windows shuttle system identified +by its ID. Paste the returned token into the Windows agent installer to +register the agent with this system. + +This operation is performed by calling function `create_shuttle_system_issue_registration_token_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-systems-id-issue-registration-token/). + +_Currently we don't have an example for calling `create_shuttle_system_issue_registration_token_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_system_id `str` + - The unique identifier for the shuttle system. Example: "6a315c0754833bfc5df067bf" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleAgentCredentialsV2026R0`. + +Returns the agent installation credentials for the Windows system. + +## List shuttle jobs + +Returns a paginated list of shuttle jobs accessible to the authenticated +user. + +This operation is performed by calling function `get_shuttle_jobs_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-jobs/). + +_Currently we don't have an example for calling `get_shuttle_jobs_v2026_r0` in integration tests_ + +### Arguments + +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleJobsV2026R0`. + +Returns a paginated list of shuttle jobs. + +## Create shuttle job + +Creates a new shuttle job that describes a migration from the given source +system into Box. + +This operation is performed by calling function `create_shuttle_job_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-jobs/). + +_Currently we don't have an example for calling `create_shuttle_job_v2026_r0` in integration tests_ + +### Arguments + +- name `str` + - The human-readable name of the shuttle job. +- job_type `CreateShuttleJobV2026R0JobType` + - The type of work the shuttle job performs. +- source_system_id `str` + - The unique identifier of the source system to migrate from. +- comment `Optional[str]` + - An optional free-form comment describing the shuttle job. +- tags `Optional[List[str]]` + - A list of free-form tags associated with the shuttle job. +- account_mapping `Optional[CreateShuttleJobV2026R0AccountMapping]` + - The account mapping configuration that controls how source identities and permissions are translated into Box. When this object is omitted, the job is created with `is_enabled` set to `false`. +- settings `Optional[CreateShuttleJobV2026R0Settings]` + - The tunable settings that control how the shuttle job runs. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleJobV2026R0`. + +Returns the newly created shuttle job. + +## Get shuttle job by ID + +Returns details for a single shuttle job identified by its ID, including +its current state, mapping-preparation state, and configured source system. + +This operation is performed by calling function `get_shuttle_job_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-jobs-id/). + +_Currently we don't have an example for calling `get_shuttle_job_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_job_id `str` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleJobV2026R0`. + +Returns the shuttle job. + +## Update shuttle job + +Updates the mutable properties of an existing shuttle job identified by its +ID. Only the fields supplied in the request body are changed. + +This operation is performed by calling function `update_shuttle_job_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-jobs-id/). + +_Currently we don't have an example for calling `update_shuttle_job_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_job_id `str` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- name `Optional[str]` + - The human-readable name of the shuttle job. +- comment `Optional[str]` + - An optional free-form comment describing the shuttle job. +- tags `Optional[List[str]]` + - A list of free-form tags associated with the shuttle job. +- account_mapping `Optional[UpdateShuttleJobByIdV2026R0AccountMapping]` + - The account mapping configuration that controls how source identities and permissions are translated into Box. +- settings `Optional[UpdateShuttleJobByIdV2026R0Settings]` + - The tunable settings that control how the shuttle job runs. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleJobV2026R0`. + +Returns the updated shuttle job. + +## Delete shuttle job + +Permanently deletes the shuttle job identified by its ID. This does not +affect content that has already been migrated. + +This operation is performed by calling function `delete_shuttle_job_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-jobs-id/). + +_Currently we don't have an example for calling `delete_shuttle_job_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_job_id `str` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +Returns an empty response when the shuttle job was successfully deleted. + +## Start shuttle job + +Starts the job in the given mode. When no body is provided the job runs in +simulation mode. + +This operation is performed by calling function `create_shuttle_job_start_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-jobs-id-start/). + +_Currently we don't have an example for calling `create_shuttle_job_start_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_job_id `str` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- mode `Optional[CreateShuttleJobStartV2026R0Mode]` + - The run mode. Defaults to simulation when omitted. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +The shuttle job was accepted and is being started. + +## Stop shuttle job + +Stops a running shuttle job identified by its ID. Any work already in +progress is allowed to finish before the job transitions to a stopped +state. + +This operation is performed by calling function `create_shuttle_job_stop_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-jobs-id-stop/). + +_Currently we don't have an example for calling `create_shuttle_job_stop_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_job_id `str` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +The shuttle job was accepted and is being stopped. + +## Prepare migration + +Validates the configured account and path mappings before a transfer. Only +relevant when account mapping is enabled. + +This operation is performed by calling function `create_shuttle_job_prepare_migration_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-jobs-id-prepare-migration/). + +_Currently we don't have an example for calling `create_shuttle_job_prepare_migration_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_job_id `str` + - The unique identifier for the shuttle job. Example: "6a3ba68e810d9156194530a1" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +The migration preparation was accepted and is being processed. + +## List shuttle runs + +Returns a paginated list of runs for the shuttle job identified by +`job_id`. + +This operation is performed by calling function `get_shuttle_runs_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-runs/). + +_Currently we don't have an example for calling `get_shuttle_runs_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job whose runs to list. +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleRunsV2026R0`. + +Returns a paginated list of shuttle runs. + +## Get shuttle run by ID + +Returns details for a single shuttle run identified by its ID, including +its mode, state, timing, and transfer statistics. + +This operation is performed by calling function `get_shuttle_run_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-runs-id/). + +_Currently we don't have an example for calling `get_shuttle_run_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_run_id `str` + - The unique identifier for the shuttle run, in the form `{job_id}:{run_number}`. Example: "6a3ba68e810d9156194530a1:42" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleRunV2026R0`. + +Returns the shuttle run. + +## List shuttle job schedules + +Returns a paginated list of schedules for the shuttle job identified by +`job_id`. + +This operation is performed by calling function `get_shuttle_job_schedules_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-job-schedules/). + +_Currently we don't have an example for calling `get_shuttle_job_schedules_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job whose schedules to list. +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleJobSchedulesV2026R0`. + +Returns a paginated list of shuttle job schedules. + +## Create shuttle job schedule + +Creates a schedule that starts runs of the shuttle job identified by +`job_id`. The schedule starts a run either at a wall-clock time or after +another job's run meets a condition. Schedules cannot start a run in +`scan` mode. + +This operation is performed by calling function `create_shuttle_job_schedule_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-job-schedules/). + +_Currently we don't have an example for calling `create_shuttle_job_schedule_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job this schedule belongs to. +- run_mode `CreateShuttleJobScheduleV2026R0RunMode` + - The kind of run the schedule starts. `scan` is not a valid schedule run mode. +- state `Optional[CreateShuttleJobScheduleV2026R0State]` + - Whether the schedule is active. When omitted, defaults to `enabled`. +- description `Optional[str]` + - An optional human-readable description of the schedule. +- trigger `ShuttleJobScheduleTriggerV2026R0` + +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleJobScheduleV2026R0`. + +Returns the newly created shuttle job schedule. + +## Get shuttle job schedule + +Retrieves the shuttle job schedule identified by its ID. + +This operation is performed by calling function `get_shuttle_job_schedule_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-job-schedules-id/). + +_Currently we don't have an example for calling `get_shuttle_job_schedule_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_job_schedule_id `str` + - The unique identifier for the shuttle job schedule. Example: "7c1ba68e810d9156194530b2" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleJobScheduleV2026R0`. + +Returns the shuttle job schedule. + +## Update shuttle job schedule + +Updates the mutable properties of an existing shuttle job schedule +identified by its ID. Only the fields supplied in the request body are +changed. The owning job cannot be changed. + +This operation is performed by calling function `update_shuttle_job_schedule_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-job-schedules-id/). + +_Currently we don't have an example for calling `update_shuttle_job_schedule_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_job_schedule_id `str` + - The unique identifier for the shuttle job schedule. Example: "7c1ba68e810d9156194530b2" +- state `Optional[UpdateShuttleJobScheduleByIdV2026R0State]` + - Whether the schedule is active. +- run_mode `Optional[UpdateShuttleJobScheduleByIdV2026R0RunMode]` + - The kind of run the schedule starts. `scan` is not a valid schedule run mode. +- description `Optional[str]` + - An optional human-readable description of the schedule. +- trigger `Optional[ShuttleJobScheduleTriggerV2026R0]` + +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleJobScheduleV2026R0`. + +Returns the updated shuttle job schedule. + +## Delete shuttle job schedule + +Permanently deletes the shuttle job schedule identified by its ID. This +does not affect runs that have already started. + +This operation is performed by calling function `delete_shuttle_job_schedule_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-job-schedules-id/). + +_Currently we don't have an example for calling `delete_shuttle_job_schedule_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_job_schedule_id `str` + - The unique identifier for the shuttle job schedule. Example: "7c1ba68e810d9156194530b2" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +Returns an empty response when the shuttle job schedule was +successfully deleted. + +## List shuttle path mappings + +Returns a paginated list of path mappings for the shuttle job identified +by `job_id`. + +This operation is performed by calling function `get_shuttle_path_mappings_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-path-mappings/). + +_Currently we don't have an example for calling `get_shuttle_path_mappings_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job whose path mappings to list. +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttlePathMappingsV2026R0`. + +Returns a paginated list of shuttle path mappings. + +## Create shuttle path mapping + +Creates a path mapping that connects a source location on the migrated +system to a destination in Box for the given shuttle job. + +This operation is performed by calling function `create_shuttle_path_mapping_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-path-mappings/). + +_Currently we don't have an example for calling `create_shuttle_path_mapping_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job this mapping belongs to. +- is_path_skipped `Optional[bool]` + - Whether this source path should be skipped during the migration. Defaults to `false`. +- source `ShuttlePathMappingLocationInputV2026R0` + +- target `Optional[ShuttlePathMappingTargetLocationInputV2026R0]` + - The destination location to migrate to. Omit or set to `null` when the source path is skipped. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttlePathMappingV2026R0`. + +Returns the newly created shuttle path mapping. + +## Get shuttle path mapping by ID + +Returns details for a single shuttle path mapping identified by its ID, +including the source location and destination, if any. + +This operation is performed by calling function `get_shuttle_path_mapping_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-path-mappings-id/). + +_Currently we don't have an example for calling `get_shuttle_path_mapping_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_path_mapping_id `str` + - The unique identifier for the shuttle path mapping. Example: "6a3ba7a24ea17bc9461eeacd" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttlePathMappingV2026R0`. + +Returns the shuttle path mapping. + +## Update shuttle path mapping + +Updates the mutable properties of an existing shuttle path mapping +identified by its ID. Only the fields supplied in the request body are +changed. + +This operation is performed by calling function `update_shuttle_path_mapping_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-path-mappings-id/). + +_Currently we don't have an example for calling `update_shuttle_path_mapping_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_path_mapping_id `str` + - The unique identifier for the shuttle path mapping. Example: "6a3ba7a24ea17bc9461eeacd" +- is_path_skipped `Optional[bool]` + - Whether this source path should be skipped during the migration. +- source `Optional[ShuttlePathMappingLocationInputV2026R0]` + +- target `Optional[ShuttlePathMappingTargetLocationInputV2026R0]` + - The destination location to migrate to. Set to `null` to clear the destination, for example when skipping the source path. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttlePathMappingV2026R0`. + +Returns the updated shuttle path mapping. + +## Delete shuttle path mapping + +Permanently deletes the shuttle path mapping identified by its ID. This +does not affect content that has already been migrated. + +This operation is performed by calling function `delete_shuttle_path_mapping_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-path-mappings-id/). + +_Currently we don't have an example for calling `delete_shuttle_path_mapping_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_path_mapping_id `str` + - The unique identifier for the shuttle path mapping. Example: "6a3ba7a24ea17bc9461eeacd" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +Returns an empty response when the shuttle path mapping was +successfully deleted. + +## Create shuttle path mapping import + +Accepts a spreadsheet of path mappings, already stored in Box, and replaces +the job's path mappings. +A file that is not a mapping workbook, or that exceeds the size or row +limits (10 MiB Box download limit; 100,000 mapping rows), returns `400` +synchronously and leaves the job unchanged. +An accepted import always replaces every path mapping on the job. When all +rows are valid the workbook is deployed in full. When any row is invalid +the job ends with no path mappings and `mapping_state` becomes +`paths_import_rejected` until the next import or the next manual +path-mapping change. Row problems are listed by +`GET /shuttle_mapping_errors?job_id=…` with category `path_import`, messages +of the form `Row N: …`, at most 500 entries plus one overflow entry. +Validation and deployment are asynchronous after acceptance. Poll +`GET /shuttle_jobs/{shuttle_job_id}` while `mapping_state` is +`importing_paths`. Only one import may be in flight per job. + +This operation is performed by calling function `create_shuttle_path_mapping_import_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-path-mapping-imports/). + +_Currently we don't have an example for calling `create_shuttle_path_mapping_import_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job whose path mappings are replaced. +- file_id `str` + - The unique identifier of the Box file holding the mapping workbook. The file is read as the calling user, so it must live somewhere that user can download from. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +The import was accepted. Validation and deployment continue +asynchronously. Poll `GET /shuttle_jobs/{shuttle_job_id}` until +`mapping_state` is no longer `importing_paths`. A rejected import ends +with `mapping_state` `paths_import_rejected` and an empty path-mapping +list; a successful import moves on to a later mapping-preparation state +such as `paths_ready` or `ready`. + +## Create shuttle subject mapping import + +Accepts a spreadsheet of subject (user and group) mappings, already stored +in Box, and replaces the job's subject mappings. +A file that is not a subject-mapping workbook, or that exceeds the size or +row limits (10 MiB Box download limit; 50,000 mapping rows), returns `400` +synchronously and leaves the job unchanged. +An accepted import always replaces every subject mapping on the job. When +all rows are valid the workbook is deployed in full. When any row is +invalid the job ends with no subject mappings and `mapping_state` becomes +`subjects_import_rejected` until the next import or the next manual +subject-mapping change. Row problems are listed by +`GET /shuttle_mapping_errors?job_id=…` with category `subject_import`, +messages of the form `Row N: …`, at most 500 entries plus one overflow +entry. +Validation and deployment are asynchronous after acceptance. Poll +`GET /shuttle_jobs/{shuttle_job_id}` while `mapping_state` is +`importing_subjects`. Only one import may be in flight per job. The job +must map subjects (`account_mapping` enabled) and its source scan must be +finished; otherwise the request returns `409`. + +Expected workbook format (API clients cannot download the UI template): +sheets `Users` and/or `Groups` (a sheet named `Subjects` is also accepted). +Columns are `Source User `, `Target User `, `Skip` on `Users`, +and `Source Group `, `Target Group `, `Skip` on `Groups`, where +`` is the primary identifier for that role and system: + +- Users: `Email` for most systems; `ID` for `SharePoint` (2007/2010/2013); + `Name` for Windows (`windows_union`, stored as the user id). +- Groups: `Name` for most systems; `Email` for Google Drive admin groups. + Source rows for a template can be taken from + `GET /shuttle_discovered_subjects`. + +This operation is performed by calling function `create_shuttle_subject_mapping_import_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-subject-mapping-imports/). + +_Currently we don't have an example for calling `create_shuttle_subject_mapping_import_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job whose subject mappings are replaced. +- file_id `str` + - The unique identifier of the Box file holding the mapping workbook. The file is read as the calling user, so it must live somewhere that user can download from. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +The import was accepted. Validation and deployment continue +asynchronously. Poll `GET /shuttle_jobs/{shuttle_job_id}` until +`mapping_state` is no longer `importing_subjects`. A rejected import +ends with `mapping_state` `subjects_import_rejected` and an empty +subject-mapping list; a successful import moves on to a later +mapping-preparation state such as `mapping_complete` or `ready`. + +## List shuttle subject mappings + +Returns a paginated list of subject mappings for the shuttle job identified +by `job_id`. + +This operation is performed by calling function `get_shuttle_subject_mappings_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-subject-mappings/). + +_Currently we don't have an example for calling `get_shuttle_subject_mappings_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job whose subject mappings to list. +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleSubjectMappingsV2026R0`. + +Returns a paginated list of shuttle subject mappings. + +## Create shuttle subject mapping + +Creates a subject mapping that connects a discovered source subject to a +Box user or group for the given shuttle job. + +This operation is performed by calling function `create_shuttle_subject_mapping_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-subject-mappings/). + +_Currently we don't have an example for calling `create_shuttle_subject_mapping_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job this mapping belongs to. +- discovered_subject_id `str` + - The unique identifier of the discovered subject to map. +- revision `Optional[int]` + - The discovery-requirements revision to resolve against. Omit to use the latest revision. +- is_subject_skipped `Optional[bool]` + - Whether this subject should be skipped during the migration. Defaults to `false`. +- target `Optional[ShuttleTargetSubjectInputV2026R0]` + - The Box target to map to. Omit or set to `null` when the subject is skipped. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleSubjectMappingV2026R0`. + +Returns the newly created shuttle subject mapping. + +## Get shuttle subject mapping by ID + +Returns details for a single shuttle subject mapping identified by its ID, +including the source subject and Box target, if any. + +This operation is performed by calling function `get_shuttle_subject_mapping_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-subject-mappings-id/). + +_Currently we don't have an example for calling `get_shuttle_subject_mapping_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_subject_mapping_id `str` + - The unique identifier for the shuttle subject mapping. Example: "6a3ba7b12ea17bc9461eeace" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleSubjectMappingV2026R0`. + +Returns the shuttle subject mapping. + +## Update shuttle subject mapping + +Updates the mutable properties of an existing shuttle subject mapping +identified by its ID. Only the fields supplied in the request body are +changed. + +This operation is performed by calling function `update_shuttle_subject_mapping_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/put-shuttle-subject-mappings-id/). + +_Currently we don't have an example for calling `update_shuttle_subject_mapping_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_subject_mapping_id `str` + - The unique identifier for the shuttle subject mapping. Example: "6a3ba7b12ea17bc9461eeace" +- is_subject_skipped `Optional[bool]` + - Whether this subject should be skipped during the migration. +- target `Optional[ShuttleTargetSubjectInputV2026R0]` + - The Box target to map to. Set to `null` only for a skipped subject. Setting it to `null` while the mapping is active fails validation. Updating `is_subject_skipped` alone preserves the existing target. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleSubjectMappingV2026R0`. + +Returns the updated shuttle subject mapping. + +## Delete shuttle subject mapping + +Permanently deletes the shuttle subject mapping identified by its ID. + +This operation is performed by calling function `delete_shuttle_subject_mapping_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/delete-shuttle-subject-mappings-id/). + +_Currently we don't have an example for calling `delete_shuttle_subject_mapping_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_subject_mapping_id `str` + - The unique identifier for the shuttle subject mapping. Example: "6a3ba7b12ea17bc9461eeace" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `None`. + +Returns an empty response when the shuttle subject mapping was +successfully deleted. + +## List shuttle discovered subjects + +Returns a paginated list of subjects discovered on the source system for +the shuttle job identified by `job_id`. + +This operation is performed by calling function `get_shuttle_discovered_subjects_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-discovered-subjects/). + +_Currently we don't have an example for calling `get_shuttle_discovered_subjects_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job whose discovered subjects to list. +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleDiscoveredSubjectsV2026R0`. + +Returns a paginated list of discovered subjects. + +## List shuttle path entries + +Returns a paginated list of source or target path entries for a shuttle +job. Call with only `job_id` and `side` to list the roots, then browse one +level at a time using `path`, `path_id`, or both. Each entry includes +`path`, `path_id`, `is_directory`, and a `scope` object (`account` or +`shared_space`) so a mapping can be created from that row without extra +browse state. Valid values depend on the selected system. + +This operation is performed by calling function `get_shuttle_path_entries_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-path-entries/). + +_Currently we don't have an example for calling `get_shuttle_path_entries_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job whose path entries to list. +- side `GetShuttlePathEntriesV2026R0Side` + - The side of the migration to browse. +- path `Optional[str]` + - The human-readable parent path whose children are returned. This can be used with or without `path_id`. Omit both, or pass `/` as `path`, to list root entries. +- path_id `Optional[str]` + - The `path_id` value of the parent entry whose children are returned. This can be used with or without `path`. It distinguishes paths with identical names on systems that support stable identifiers. +- account_email `Optional[str]` + - The email of the account whose path entries are returned. This is a system-native identifier and is not always an RFC 5322 address. +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttlePathEntriesV2026R0`. + +Returns a paginated list of shuttle path entries. + +## List shuttle mapping errors + +Returns a paginated list of mapping errors for a shuttle job. Only the latest +record for each error is returned. The revision field identifies the mapping +revision in which that error was generated. + +This operation is performed by calling function `get_shuttle_mapping_errors_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-mapping-errors/). + +_Currently we don't have an example for calling `get_shuttle_mapping_errors_v2026_r0` in integration tests_ + +### Arguments + +- job_id `str` + - The unique identifier of the shuttle job whose mapping errors to list. +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleMappingErrorsV2026R0`. + +Returns a paginated list of shuttle mapping errors. + +## List shuttle reports + +Returns a paginated list of reports generated for the shuttle run +identified by `run_id`. + +This operation is performed by calling function `get_shuttle_reports_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-reports/). + +_Currently we don't have an example for calling `get_shuttle_reports_v2026_r0` in integration tests_ + +### Arguments + +- run_id `str` + - The unique identifier of the shuttle run whose reports to list. +- marker `Optional[str]` + - Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`. +- limit `Optional[int]` + - The maximum number of items to return per page. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleReportsV2026R0`. + +Returns a paginated list of shuttle reports. + +## Create shuttle report + +Requests asynchronous generation of a report for a shuttle run. The +report is returned immediately in `pending` or `processing` status. +Poll `GET /shuttle_reports/{shuttle_report_id}` while `status` is +`pending` or `processing`. Stop when `status` is `complete`, `failed`, +`canceled`, or `unknown`. Repeating this request with the same +parameters reuses the existing report instead of creating a duplicate. + +This operation is performed by calling function `create_shuttle_report_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/post-shuttle-reports/). + +_Currently we don't have an example for calling `create_shuttle_report_v2026_r0` in integration tests_ + +### Arguments + +- run_id `str` + - The unique identifier of the shuttle run to generate a report for. +- format `CreateShuttleReportV2026R0Format` + - The output file format of the report. +- sections `List[str]` + - The sections to include in the report. Must be a non-empty subset of the run's `available_report_sections`. This is an open list whose set of values is expected to grow; the currently documented values include `files_and_folders`, `event_log`, `transfer_overview`, `source_users`, `target_users`, `source_collaborators`, `target_collaborators`, `source_collaborations`, and `target_collaborations`. +- users_scope `Optional[CreateShuttleReportV2026R0UsersScope]` + - Which users to include in user-related report sections. Defaults to `migrated` when omitted. +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleReportV2026R0`. + +The report was accepted for generation. Returns the shuttle report; +generation continues asynchronously. Repeating this request with the +same parameters reuses the existing report instead of creating a +duplicate. + +## Get shuttle report by ID + +Returns details for a single shuttle report identified by its ID, +including generation status and, once generation finishes, the Box +output reference. + +This operation is performed by calling function `get_shuttle_report_by_id_v2026_r0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2026.0/get-shuttle-reports-id/). + +_Currently we don't have an example for calling `get_shuttle_report_by_id_v2026_r0` in integration tests_ + +### Arguments + +- shuttle_report_id `str` + - The unique identifier for the shuttle report. Example: "6a3ba8d14f2c91e8370b4d12" +- box_version `BoxVersionHeaderV2026R0` + - Version header. +- extra_headers `Optional[Dict[str, Optional[str]]]` + - Extra headers that will be included in the HTTP request. + +### Returns + +This function returns a value of type `ShuttleReportV2026R0`. + +Returns the shuttle report. From c808f4ab634b27f2ced1bd61eb9b78d1bb368ce2 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 28 Oct 2026 06:53:43 -0700 Subject: [PATCH 4/5] docs: (DDOC-1921) Note embed_url_external_user_id for suppress_notifications (box/box-openapi#623) --- .codegen.json | 2 +- box_sdk_gen/schemas/sign_request_create_signer.py | 4 +++- box_sdk_gen/schemas/sign_request_signer.py | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.codegen.json b/.codegen.json index 4ae42f98..43455d86 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "4c5a50b", "specHash": "ad8dbb8", "version": "4.19.0" } +{ "engineHash": "4c5a50b", "specHash": "a0e8038", "version": "4.19.0" } diff --git a/box_sdk_gen/schemas/sign_request_create_signer.py b/box_sdk_gen/schemas/sign_request_create_signer.py index 4c556348..53831664 100644 --- a/box_sdk_gen/schemas/sign_request_create_signer.py +++ b/box_sdk_gen/schemas/sign_request_create_signer.py @@ -81,7 +81,9 @@ def __init__( determine which signers belongs to same group. A successful response will provide a generated UUID value instead for signers in the same signer group., defaults to None :type signer_group_id: Optional[str], optional - :param suppress_notifications: If true, no emails about the sign request will be sent., defaults to None + :param suppress_notifications: If true, no emails about the sign request are sent. + The `embed_url_external_user_id` parameter is required when using + `suppress_notifications` for a signer., defaults to None :type suppress_notifications: Optional[bool], optional :param language: The language of the user, formatted in modified version of the [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format., defaults to None diff --git a/box_sdk_gen/schemas/sign_request_signer.py b/box_sdk_gen/schemas/sign_request_signer.py index 35b70826..9694fbd1 100644 --- a/box_sdk_gen/schemas/sign_request_signer.py +++ b/box_sdk_gen/schemas/sign_request_signer.py @@ -142,7 +142,9 @@ def __init__( determine which signers belongs to same group. A successful response will provide a generated UUID value instead for signers in the same signer group., defaults to None :type signer_group_id: Optional[str], optional - :param suppress_notifications: If true, no emails about the sign request will be sent., defaults to None + :param suppress_notifications: If true, no emails about the sign request are sent. + The `embed_url_external_user_id` parameter is required when using + `suppress_notifications` for a signer., defaults to None :type suppress_notifications: Optional[bool], optional :param language: The language of the user, formatted in modified version of the [ISO 639-1](https://developer.box.com/guides/api-calls/language-codes) format., defaults to None From 425a03e9e0ff72d60fbfa49d35af6fb77428716f Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Thu, 29 Oct 2026 02:42:24 -0700 Subject: [PATCH 5/5] chore: Update `.codegen.json` with commit hash of `codegen` and `openapi` spec [skip ci] --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 43455d86..49b1336d 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "4c5a50b", "specHash": "a0e8038", "version": "4.19.0" } +{ "engineHash": "976bbb9", "specHash": "a0e8038", "version": "4.19.0" }