diff --git a/.codegen.json b/.codegen.json index 3923ac83..24d578e8 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "4c5a50b", "specHash": "e21eebc", "version": "10.18.0" } +{ "engineHash": "4c5a50b", "specHash": "ad8dbb8", "version": "10.18.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/README.md b/docs/README.md index 44b951b1..0a73477d 100644 --- a/docs/README.md +++ b/docs/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/shuttle.md b/docs/shuttle.md new file mode 100644 index 00000000..e831c06a --- /dev/null +++ b/docs/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.