From 95fe2ac3f046a19cf106cedac1d66ad06ba4ac39 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Fri, 10 May 2024 02:41:54 -0700 Subject: [PATCH] feat: Move schemas to separate modules (box/box-codegen#483) --- .codegen.json | 2 +- box_sdk_gen/box/__init__.py | 8 +- box_sdk_gen/box/ccg_auth.py | 12 +- box_sdk_gen/box/developer_token_auth.py | 10 +- box_sdk_gen/box/jwt_auth.py | 10 +- box_sdk_gen/box/oauth.py | 10 +- box_sdk_gen/box/token_storage.py | 2 +- box_sdk_gen/managers/ai.py | 8 +- box_sdk_gen/managers/authorization.py | 18 +- box_sdk_gen/managers/avatars.py | 4 +- box_sdk_gen/managers/chunked_uploads.py | 14 +- box_sdk_gen/managers/classifications.py | 4 +- .../collaboration_allowlist_entries.py | 10 +- .../collaboration_allowlist_exempt_targets.py | 10 +- box_sdk_gen/managers/collections.py | 6 +- box_sdk_gen/managers/comments.py | 6 +- box_sdk_gen/managers/device_pinners.py | 6 +- box_sdk_gen/managers/downloads.py | 2 +- box_sdk_gen/managers/email_aliases.py | 6 +- box_sdk_gen/managers/events.py | 6 +- box_sdk_gen/managers/file_classifications.py | 4 +- box_sdk_gen/managers/file_metadata.py | 6 +- box_sdk_gen/managers/file_requests.py | 8 +- .../managers/file_version_legal_holds.py | 6 +- .../managers/file_version_retentions.py | 6 +- box_sdk_gen/managers/file_versions.py | 6 +- box_sdk_gen/managers/file_watermarks.py | 4 +- box_sdk_gen/managers/files.py | 4 +- .../managers/folder_classifications.py | 4 +- box_sdk_gen/managers/folder_locks.py | 6 +- box_sdk_gen/managers/folder_metadata.py | 6 +- box_sdk_gen/managers/folder_watermarks.py | 4 +- box_sdk_gen/managers/folders.py | 6 +- box_sdk_gen/managers/groups.py | 6 +- box_sdk_gen/managers/integration_mappings.py | 22 +- box_sdk_gen/managers/invites.py | 4 +- box_sdk_gen/managers/legal_hold_policies.py | 6 +- .../managers/legal_hold_policy_assignments.py | 8 +- box_sdk_gen/managers/list_collaborations.py | 4 +- box_sdk_gen/managers/memberships.py | 6 +- .../managers/metadata_cascade_policies.py | 8 +- box_sdk_gen/managers/metadata_templates.py | 6 +- box_sdk_gen/managers/recent_items.py | 4 +- box_sdk_gen/managers/retention_policies.py | 10 +- .../managers/retention_policy_assignments.py | 8 +- box_sdk_gen/managers/search.py | 14 +- box_sdk_gen/managers/session_termination.py | 4 +- box_sdk_gen/managers/shared_links_files.py | 4 +- box_sdk_gen/managers/shared_links_folders.py | 4 +- .../managers/shared_links_web_links.py | 4 +- .../shield_information_barrier_reports.py | 18 +- ...eld_information_barrier_segment_members.py | 16 +- ...nformation_barrier_segment_restrictions.py | 14 +- .../shield_information_barrier_segments.py | 14 +- .../managers/shield_information_barriers.py | 8 +- box_sdk_gen/managers/sign_requests.py | 16 +- box_sdk_gen/managers/sign_templates.py | 6 +- box_sdk_gen/managers/skills.py | 12 +- box_sdk_gen/managers/storage_policies.py | 6 +- .../managers/storage_policy_assignments.py | 6 +- box_sdk_gen/managers/task_assignments.py | 6 +- box_sdk_gen/managers/tasks.py | 6 +- .../terms_of_service_user_statuses.py | 8 +- box_sdk_gen/managers/terms_of_services.py | 6 +- box_sdk_gen/managers/transfer.py | 4 +- box_sdk_gen/managers/trashed_files.py | 6 +- box_sdk_gen/managers/trashed_folders.py | 6 +- box_sdk_gen/managers/trashed_items.py | 4 +- box_sdk_gen/managers/trashed_web_links.py | 6 +- box_sdk_gen/managers/uploads.py | 8 +- box_sdk_gen/managers/user_collaborations.py | 4 +- box_sdk_gen/managers/users.py | 8 +- box_sdk_gen/managers/web_links.py | 4 +- box_sdk_gen/managers/webhooks.py | 6 +- box_sdk_gen/managers/workflows.py | 6 +- box_sdk_gen/managers/zip_downloads.py | 8 +- box_sdk_gen/networking/auth.py | 2 +- box_sdk_gen/schemas.py | 13042 ---------------- box_sdk_gen/schemas/__init__.py | 401 + box_sdk_gen/schemas/access_token.py | 58 + box_sdk_gen/schemas/ai_ask.py | 59 + box_sdk_gen/schemas/ai_response.py | 28 + box_sdk_gen/schemas/ai_text_gen.py | 84 + box_sdk_gen/schemas/classification.py | 86 + .../schemas/classification_template.py | 244 + box_sdk_gen/schemas/client_error.py | 83 + box_sdk_gen/schemas/collaboration.py | 213 + .../collaboration_allowlist_entries.py | 38 + .../schemas/collaboration_allowlist_entry.py | 81 + .../collaboration_allowlist_exempt_target.py | 75 + .../collaboration_allowlist_exempt_targets.py | 40 + box_sdk_gen/schemas/collaborations.py | 78 + box_sdk_gen/schemas/collaborator_variable.py | 68 + box_sdk_gen/schemas/collection.py | 48 + box_sdk_gen/schemas/collections.py | 78 + box_sdk_gen/schemas/comment.py | 64 + box_sdk_gen/schemas/comment_base.py | 30 + box_sdk_gen/schemas/comment_full.py | 62 + box_sdk_gen/schemas/comments.py | 78 + .../schemas/completion_rule_variable.py | 49 + box_sdk_gen/schemas/conflict_error.py | 69 + box_sdk_gen/schemas/device_pinner.py | 38 + box_sdk_gen/schemas/device_pinners.py | 66 + box_sdk_gen/schemas/email_alias.py | 38 + box_sdk_gen/schemas/email_aliases.py | 26 + box_sdk_gen/schemas/enterprise_base.py | 30 + box_sdk_gen/schemas/event.py | 227 + box_sdk_gen/schemas/event_source.py | 64 + box_sdk_gen/schemas/events.py | 31 + box_sdk_gen/schemas/file.py | 274 + box_sdk_gen/schemas/file_base.py | 42 + box_sdk_gen/schemas/file_conflict.py | 55 + box_sdk_gen/schemas/file_full.py | 567 + box_sdk_gen/schemas/file_mini.py | 59 + box_sdk_gen/schemas/file_or_folder_scope.py | 43 + box_sdk_gen/schemas/file_request.py | 127 + .../schemas/file_request_copy_request.py | 111 + .../schemas/file_request_update_request.py | 78 + box_sdk_gen/schemas/file_version.py | 67 + box_sdk_gen/schemas/file_version_base.py | 28 + box_sdk_gen/schemas/file_version_full.py | 78 + .../schemas/file_version_legal_hold.py | 53 + .../schemas/file_version_legal_holds.py | 36 + box_sdk_gen/schemas/file_version_mini.py | 37 + box_sdk_gen/schemas/file_version_retention.py | 54 + .../schemas/file_version_retentions.py | 36 + box_sdk_gen/schemas/file_versions.py | 78 + box_sdk_gen/schemas/files.py | 26 + box_sdk_gen/schemas/files_under_retention.py | 36 + box_sdk_gen/schemas/folder.py | 311 + box_sdk_gen/schemas/folder_base.py | 42 + box_sdk_gen/schemas/folder_full.py | 306 + box_sdk_gen/schemas/folder_lock.py | 60 + box_sdk_gen/schemas/folder_locks.py | 32 + box_sdk_gen/schemas/folder_mini.py | 39 + box_sdk_gen/schemas/generic_source.py | 0 box_sdk_gen/schemas/group.py | 42 + box_sdk_gen/schemas/group_base.py | 28 + box_sdk_gen/schemas/group_full.py | 126 + box_sdk_gen/schemas/group_membership.py | 57 + box_sdk_gen/schemas/group_memberships.py | 78 + box_sdk_gen/schemas/group_mini.py | 37 + box_sdk_gen/schemas/groups.py | 78 + box_sdk_gen/schemas/integration_mapping.py | 92 + .../schemas/integration_mapping_base.py | 33 + .../integration_mapping_box_item_slack.py | 28 + .../schemas/integration_mapping_mini.py | 55 + .../integration_mapping_partner_item_slack.py | 38 + ...ntegration_mapping_slack_create_request.py | 30 + .../integration_mapping_slack_options.py | 19 + box_sdk_gen/schemas/integration_mappings.py | 32 + box_sdk_gen/schemas/invite.py | 83 + box_sdk_gen/schemas/items.py | 84 + box_sdk_gen/schemas/keyword_skill_card.py | 137 + box_sdk_gen/schemas/legal_hold_policies.py | 36 + box_sdk_gen/schemas/legal_hold_policy.py | 119 + .../schemas/legal_hold_policy_assignment.py | 59 + .../legal_hold_policy_assignment_base.py | 30 + .../schemas/legal_hold_policy_assignments.py | 37 + box_sdk_gen/schemas/legal_hold_policy_mini.py | 28 + box_sdk_gen/schemas/metadata.py | 34 + box_sdk_gen/schemas/metadata_base.py | 53 + .../schemas/metadata_cascade_policies.py | 36 + .../schemas/metadata_cascade_policy.py | 124 + .../metadata_field_filter_date_range.py | 26 + .../metadata_field_filter_float_range.py | 24 + box_sdk_gen/schemas/metadata_filter.py | 88 + box_sdk_gen/schemas/metadata_full.py | 74 + box_sdk_gen/schemas/metadata_query.py | 127 + box_sdk_gen/schemas/metadata_query_index.py | 64 + box_sdk_gen/schemas/metadata_query_results.py | 41 + box_sdk_gen/schemas/metadata_template.py | 173 + box_sdk_gen/schemas/metadata_templates.py | 36 + box_sdk_gen/schemas/metadatas.py | 26 + box_sdk_gen/schemas/o_auth_2_error.py | 22 + box_sdk_gen/schemas/outcome.py | 34 + box_sdk_gen/schemas/post_o_auth_2_revoke.py | 28 + box_sdk_gen/schemas/post_o_auth_2_token.py | 144 + ...ost_o_auth_2_token_refresh_access_token.py | 34 + box_sdk_gen/schemas/realtime_server.py | 41 + box_sdk_gen/schemas/realtime_servers.py | 26 + box_sdk_gen/schemas/recent_item.py | 54 + box_sdk_gen/schemas/recent_items.py | 36 + box_sdk_gen/schemas/retention_policies.py | 32 + box_sdk_gen/schemas/retention_policy.py | 171 + .../schemas/retention_policy_assignment.py | 111 + .../retention_policy_assignment_base.py | 28 + .../schemas/retention_policy_assignments.py | 32 + box_sdk_gen/schemas/retention_policy_base.py | 28 + box_sdk_gen/schemas/retention_policy_mini.py | 52 + box_sdk_gen/schemas/role_variable.py | 47 + .../schemas/search_result_with_shared_link.py | 35 + box_sdk_gen/schemas/search_results.py | 57 + .../search_results_with_shared_links.py | 55 + .../schemas/session_termination_message.py | 13 + .../schemas/shield_information_barrier.py | 75 + .../shield_information_barrier_base.py | 30 + .../shield_information_barrier_reference.py | 18 + .../shield_information_barrier_report.py | 67 + .../shield_information_barrier_report_base.py | 30 + ...ield_information_barrier_report_details.py | 24 + .../shield_information_barrier_reports.py | 35 + .../shield_information_barrier_segment.py | 62 + ...ield_information_barrier_segment_member.py | 99 + ...information_barrier_segment_member_base.py | 33 + ...information_barrier_segment_member_mini.py | 33 + ...eld_information_barrier_segment_members.py | 35 + ...information_barrier_segment_restriction.py | 81 + ...mation_barrier_segment_restriction_base.py | 33 + ...mation_barrier_segment_restriction_mini.py | 105 + ...nformation_barrier_segment_restrictions.py | 35 + .../shield_information_barrier_segments.py | 35 + .../schemas/shield_information_barriers.py | 32 + box_sdk_gen/schemas/sign_request.py | 170 + box_sdk_gen/schemas/sign_request_base.py | 72 + .../schemas/sign_request_create_request.py | 100 + .../schemas/sign_request_create_signer.py | 91 + .../schemas/sign_request_prefill_tag.py | 32 + box_sdk_gen/schemas/sign_request_signer.py | 152 + .../schemas/sign_request_signer_input.py | 79 + box_sdk_gen/schemas/sign_requests.py | 32 + box_sdk_gen/schemas/sign_template.py | 213 + box_sdk_gen/schemas/sign_templates.py | 36 + box_sdk_gen/schemas/skill_cards_metadata.py | 100 + box_sdk_gen/schemas/skill_invocation.py | 255 + box_sdk_gen/schemas/status_skill_card.py | 156 + box_sdk_gen/schemas/storage_policies.py | 36 + box_sdk_gen/schemas/storage_policy.py | 26 + .../schemas/storage_policy_assignment.py | 51 + .../schemas/storage_policy_assignments.py | 36 + box_sdk_gen/schemas/storage_policy_mini.py | 28 + box_sdk_gen/schemas/task.py | 85 + box_sdk_gen/schemas/task_assignment.py | 74 + box_sdk_gen/schemas/task_assignments.py | 26 + box_sdk_gen/schemas/tasks.py | 28 + box_sdk_gen/schemas/template_signer.py | 56 + box_sdk_gen/schemas/template_signer_input.py | 142 + box_sdk_gen/schemas/terms_of_service.py | 90 + box_sdk_gen/schemas/terms_of_service_base.py | 28 + .../schemas/terms_of_service_user_status.py | 52 + .../schemas/terms_of_service_user_statuses.py | 26 + box_sdk_gen/schemas/terms_of_services.py | 26 + box_sdk_gen/schemas/timeline_skill_card.py | 180 + box_sdk_gen/schemas/tracking_code.py | 35 + box_sdk_gen/schemas/transcript_skill_card.py | 167 + box_sdk_gen/schemas/trash_file.py | 196 + box_sdk_gen/schemas/trash_file_restored.py | 155 + box_sdk_gen/schemas/trash_folder.py | 186 + box_sdk_gen/schemas/trash_folder_restored.py | 145 + box_sdk_gen/schemas/trash_web_link.py | 158 + .../schemas/trash_web_link_restored.py | 118 + box_sdk_gen/schemas/upload_part.py | 40 + box_sdk_gen/schemas/upload_part_mini.py | 28 + box_sdk_gen/schemas/upload_parts.py | 79 + box_sdk_gen/schemas/upload_session.py | 93 + box_sdk_gen/schemas/upload_url.py | 23 + box_sdk_gen/schemas/uploaded_part.py | 11 + box_sdk_gen/schemas/user.py | 118 + box_sdk_gen/schemas/user_avatar.py | 36 + box_sdk_gen/schemas/user_base.py | 28 + box_sdk_gen/schemas/user_collaborations.py | 30 + box_sdk_gen/schemas/user_full.py | 197 + .../schemas/user_integration_mappings.py | 30 + box_sdk_gen/schemas/user_mini.py | 30 + box_sdk_gen/schemas/users.py | 78 + box_sdk_gen/schemas/watermark.py | 32 + box_sdk_gen/schemas/web_link.py | 246 + box_sdk_gen/schemas/web_link_base.py | 35 + box_sdk_gen/schemas/web_link_mini.py | 36 + box_sdk_gen/schemas/webhook.py | 94 + box_sdk_gen/schemas/webhook_invocation.py | 98 + box_sdk_gen/schemas/webhook_mini.py | 60 + box_sdk_gen/schemas/webhooks.py | 36 + box_sdk_gen/schemas/workflow.py | 293 + box_sdk_gen/schemas/workflow_full.py | 64 + box_sdk_gen/schemas/workflow_mini.py | 42 + box_sdk_gen/schemas/workflows.py | 36 + box_sdk_gen/schemas/zip_download.py | 101 + box_sdk_gen/schemas/zip_download_request.py | 49 + box_sdk_gen/schemas/zip_download_status.py | 48 + docs/file_metadata.md | 2 +- docs/files.md | 4 +- docs/folder_metadata.md | 2 +- docs/folders.md | 8 +- docs/groups.md | 2 +- docs/legal_hold_policies.md | 4 +- docs/metadata_templates.md | 4 +- docs/retention_policies.md | 2 +- docs/retention_policy_assignments.md | 2 +- docs/shield_information_barrier_segments.md | 4 +- docs/tasks.md | 2 +- docs/trashed_files.md | 2 +- docs/user_collaborations.md | 4 +- docs/users.md | 4 +- docs/web_links.md | 4 +- test/ai.py | 4 +- test/auth.py | 12 +- test/avatars.py | 4 +- test/chunked_uploads.py | 2 +- test/classifications.py | 6 +- test/client.py | 2 +- test/collaboration_allowlist_entries.py | 10 +- .../collaboration_allowlist_exempt_targets.py | 12 +- test/collections.py | 8 +- test/comments.py | 8 +- test/commons.py | 22 +- test/device_pinners.py | 2 +- test/downloads.py | 4 +- test/email_aliases.py | 6 +- test/events.py | 16 +- test/file_classifications.py | 10 +- test/file_metadata.py | 6 +- test/file_requests.py | 2 +- test/file_version_legal_holds.py | 6 +- test/file_version_retentions.py | 14 +- test/file_versions.py | 8 +- test/file_watermarks.py | 6 +- test/files.py | 6 +- test/folder_classifications.py | 10 +- test/folder_locks.py | 6 +- test/folder_metadata.py | 8 +- test/folder_watermarks.py | 4 +- test/folders.py | 4 +- test/groups.py | 4 +- test/integration_mappings.py | 12 +- test/invites.py | 4 +- test/legal_hold_policies.py | 4 +- test/legal_hold_policy_assignments.py | 8 +- test/list_collaborations.py | 10 +- test/memberships.py | 8 +- test/metadata_cascade_policies.py | 6 +- test/metadata_templates.py | 8 +- test/recent_items.py | 2 +- test/retention_policies.py | 4 +- test/retention_policy_assignments.py | 14 +- test/search.py | 28 +- test/session_termination.py | 6 +- test/shared_links_files.py | 4 +- test/shared_links_folders.py | 2 +- test/shared_links_web_links.py | 4 +- test/shield_information_barrier_reports.py | 20 +- ...eld_information_barrier_segment_members.py | 24 +- ...nformation_barrier_segment_restrictions.py | 22 +- test/shield_information_barrier_segments.py | 18 +- test/shield_information_barriers.py | 4 +- test/sign_requests.py | 16 +- test/sign_templates.py | 4 +- test/skills.py | 22 +- test/storage_policicy_assignments.py | 10 +- test/storage_policies.py | 4 +- test/task_assignments.py | 10 +- test/tasks.py | 8 +- test/terms_of_service_user_statuses.py | 10 +- test/terms_of_services.py | 4 +- test/transfer.py | 4 +- test/trashed_files.py | 8 +- test/trashed_folders.py | 6 +- test/trashed_items.py | 4 +- test/trashed_web_links.py | 8 +- test/uploads.py | 4 +- test/user_collaborations.py | 6 +- test/users.py | 4 +- test/webhooks.py | 6 +- test/weblinks.py | 4 +- test/workflows.py | 8 +- test/zip_downloads.py | 8 +- 366 files changed, 15944 insertions(+), 13582 deletions(-) delete mode 100644 box_sdk_gen/schemas.py create mode 100644 box_sdk_gen/schemas/__init__.py create mode 100644 box_sdk_gen/schemas/access_token.py create mode 100644 box_sdk_gen/schemas/ai_ask.py create mode 100644 box_sdk_gen/schemas/ai_response.py create mode 100644 box_sdk_gen/schemas/ai_text_gen.py create mode 100644 box_sdk_gen/schemas/classification.py create mode 100644 box_sdk_gen/schemas/classification_template.py create mode 100644 box_sdk_gen/schemas/client_error.py create mode 100644 box_sdk_gen/schemas/collaboration.py create mode 100644 box_sdk_gen/schemas/collaboration_allowlist_entries.py create mode 100644 box_sdk_gen/schemas/collaboration_allowlist_entry.py create mode 100644 box_sdk_gen/schemas/collaboration_allowlist_exempt_target.py create mode 100644 box_sdk_gen/schemas/collaboration_allowlist_exempt_targets.py create mode 100644 box_sdk_gen/schemas/collaborations.py create mode 100644 box_sdk_gen/schemas/collaborator_variable.py create mode 100644 box_sdk_gen/schemas/collection.py create mode 100644 box_sdk_gen/schemas/collections.py create mode 100644 box_sdk_gen/schemas/comment.py create mode 100644 box_sdk_gen/schemas/comment_base.py create mode 100644 box_sdk_gen/schemas/comment_full.py create mode 100644 box_sdk_gen/schemas/comments.py create mode 100644 box_sdk_gen/schemas/completion_rule_variable.py create mode 100644 box_sdk_gen/schemas/conflict_error.py create mode 100644 box_sdk_gen/schemas/device_pinner.py create mode 100644 box_sdk_gen/schemas/device_pinners.py create mode 100644 box_sdk_gen/schemas/email_alias.py create mode 100644 box_sdk_gen/schemas/email_aliases.py create mode 100644 box_sdk_gen/schemas/enterprise_base.py create mode 100644 box_sdk_gen/schemas/event.py create mode 100644 box_sdk_gen/schemas/event_source.py create mode 100644 box_sdk_gen/schemas/events.py create mode 100644 box_sdk_gen/schemas/file.py create mode 100644 box_sdk_gen/schemas/file_base.py create mode 100644 box_sdk_gen/schemas/file_conflict.py create mode 100644 box_sdk_gen/schemas/file_full.py create mode 100644 box_sdk_gen/schemas/file_mini.py create mode 100644 box_sdk_gen/schemas/file_or_folder_scope.py create mode 100644 box_sdk_gen/schemas/file_request.py create mode 100644 box_sdk_gen/schemas/file_request_copy_request.py create mode 100644 box_sdk_gen/schemas/file_request_update_request.py create mode 100644 box_sdk_gen/schemas/file_version.py create mode 100644 box_sdk_gen/schemas/file_version_base.py create mode 100644 box_sdk_gen/schemas/file_version_full.py create mode 100644 box_sdk_gen/schemas/file_version_legal_hold.py create mode 100644 box_sdk_gen/schemas/file_version_legal_holds.py create mode 100644 box_sdk_gen/schemas/file_version_mini.py create mode 100644 box_sdk_gen/schemas/file_version_retention.py create mode 100644 box_sdk_gen/schemas/file_version_retentions.py create mode 100644 box_sdk_gen/schemas/file_versions.py create mode 100644 box_sdk_gen/schemas/files.py create mode 100644 box_sdk_gen/schemas/files_under_retention.py create mode 100644 box_sdk_gen/schemas/folder.py create mode 100644 box_sdk_gen/schemas/folder_base.py create mode 100644 box_sdk_gen/schemas/folder_full.py create mode 100644 box_sdk_gen/schemas/folder_lock.py create mode 100644 box_sdk_gen/schemas/folder_locks.py create mode 100644 box_sdk_gen/schemas/folder_mini.py create mode 100644 box_sdk_gen/schemas/generic_source.py create mode 100644 box_sdk_gen/schemas/group.py create mode 100644 box_sdk_gen/schemas/group_base.py create mode 100644 box_sdk_gen/schemas/group_full.py create mode 100644 box_sdk_gen/schemas/group_membership.py create mode 100644 box_sdk_gen/schemas/group_memberships.py create mode 100644 box_sdk_gen/schemas/group_mini.py create mode 100644 box_sdk_gen/schemas/groups.py create mode 100644 box_sdk_gen/schemas/integration_mapping.py create mode 100644 box_sdk_gen/schemas/integration_mapping_base.py create mode 100644 box_sdk_gen/schemas/integration_mapping_box_item_slack.py create mode 100644 box_sdk_gen/schemas/integration_mapping_mini.py create mode 100644 box_sdk_gen/schemas/integration_mapping_partner_item_slack.py create mode 100644 box_sdk_gen/schemas/integration_mapping_slack_create_request.py create mode 100644 box_sdk_gen/schemas/integration_mapping_slack_options.py create mode 100644 box_sdk_gen/schemas/integration_mappings.py create mode 100644 box_sdk_gen/schemas/invite.py create mode 100644 box_sdk_gen/schemas/items.py create mode 100644 box_sdk_gen/schemas/keyword_skill_card.py create mode 100644 box_sdk_gen/schemas/legal_hold_policies.py create mode 100644 box_sdk_gen/schemas/legal_hold_policy.py create mode 100644 box_sdk_gen/schemas/legal_hold_policy_assignment.py create mode 100644 box_sdk_gen/schemas/legal_hold_policy_assignment_base.py create mode 100644 box_sdk_gen/schemas/legal_hold_policy_assignments.py create mode 100644 box_sdk_gen/schemas/legal_hold_policy_mini.py create mode 100644 box_sdk_gen/schemas/metadata.py create mode 100644 box_sdk_gen/schemas/metadata_base.py create mode 100644 box_sdk_gen/schemas/metadata_cascade_policies.py create mode 100644 box_sdk_gen/schemas/metadata_cascade_policy.py create mode 100644 box_sdk_gen/schemas/metadata_field_filter_date_range.py create mode 100644 box_sdk_gen/schemas/metadata_field_filter_float_range.py create mode 100644 box_sdk_gen/schemas/metadata_filter.py create mode 100644 box_sdk_gen/schemas/metadata_full.py create mode 100644 box_sdk_gen/schemas/metadata_query.py create mode 100644 box_sdk_gen/schemas/metadata_query_index.py create mode 100644 box_sdk_gen/schemas/metadata_query_results.py create mode 100644 box_sdk_gen/schemas/metadata_template.py create mode 100644 box_sdk_gen/schemas/metadata_templates.py create mode 100644 box_sdk_gen/schemas/metadatas.py create mode 100644 box_sdk_gen/schemas/o_auth_2_error.py create mode 100644 box_sdk_gen/schemas/outcome.py create mode 100644 box_sdk_gen/schemas/post_o_auth_2_revoke.py create mode 100644 box_sdk_gen/schemas/post_o_auth_2_token.py create mode 100644 box_sdk_gen/schemas/post_o_auth_2_token_refresh_access_token.py create mode 100644 box_sdk_gen/schemas/realtime_server.py create mode 100644 box_sdk_gen/schemas/realtime_servers.py create mode 100644 box_sdk_gen/schemas/recent_item.py create mode 100644 box_sdk_gen/schemas/recent_items.py create mode 100644 box_sdk_gen/schemas/retention_policies.py create mode 100644 box_sdk_gen/schemas/retention_policy.py create mode 100644 box_sdk_gen/schemas/retention_policy_assignment.py create mode 100644 box_sdk_gen/schemas/retention_policy_assignment_base.py create mode 100644 box_sdk_gen/schemas/retention_policy_assignments.py create mode 100644 box_sdk_gen/schemas/retention_policy_base.py create mode 100644 box_sdk_gen/schemas/retention_policy_mini.py create mode 100644 box_sdk_gen/schemas/role_variable.py create mode 100644 box_sdk_gen/schemas/search_result_with_shared_link.py create mode 100644 box_sdk_gen/schemas/search_results.py create mode 100644 box_sdk_gen/schemas/search_results_with_shared_links.py create mode 100644 box_sdk_gen/schemas/session_termination_message.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_base.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_reference.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_report.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_report_base.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_report_details.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_reports.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segment.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segment_member.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segment_member_base.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segment_member_mini.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segment_members.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segment_restriction.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segment_restriction_base.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segment_restriction_mini.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segment_restrictions.py create mode 100644 box_sdk_gen/schemas/shield_information_barrier_segments.py create mode 100644 box_sdk_gen/schemas/shield_information_barriers.py create mode 100644 box_sdk_gen/schemas/sign_request.py create mode 100644 box_sdk_gen/schemas/sign_request_base.py create mode 100644 box_sdk_gen/schemas/sign_request_create_request.py create mode 100644 box_sdk_gen/schemas/sign_request_create_signer.py create mode 100644 box_sdk_gen/schemas/sign_request_prefill_tag.py create mode 100644 box_sdk_gen/schemas/sign_request_signer.py create mode 100644 box_sdk_gen/schemas/sign_request_signer_input.py create mode 100644 box_sdk_gen/schemas/sign_requests.py create mode 100644 box_sdk_gen/schemas/sign_template.py create mode 100644 box_sdk_gen/schemas/sign_templates.py create mode 100644 box_sdk_gen/schemas/skill_cards_metadata.py create mode 100644 box_sdk_gen/schemas/skill_invocation.py create mode 100644 box_sdk_gen/schemas/status_skill_card.py create mode 100644 box_sdk_gen/schemas/storage_policies.py create mode 100644 box_sdk_gen/schemas/storage_policy.py create mode 100644 box_sdk_gen/schemas/storage_policy_assignment.py create mode 100644 box_sdk_gen/schemas/storage_policy_assignments.py create mode 100644 box_sdk_gen/schemas/storage_policy_mini.py create mode 100644 box_sdk_gen/schemas/task.py create mode 100644 box_sdk_gen/schemas/task_assignment.py create mode 100644 box_sdk_gen/schemas/task_assignments.py create mode 100644 box_sdk_gen/schemas/tasks.py create mode 100644 box_sdk_gen/schemas/template_signer.py create mode 100644 box_sdk_gen/schemas/template_signer_input.py create mode 100644 box_sdk_gen/schemas/terms_of_service.py create mode 100644 box_sdk_gen/schemas/terms_of_service_base.py create mode 100644 box_sdk_gen/schemas/terms_of_service_user_status.py create mode 100644 box_sdk_gen/schemas/terms_of_service_user_statuses.py create mode 100644 box_sdk_gen/schemas/terms_of_services.py create mode 100644 box_sdk_gen/schemas/timeline_skill_card.py create mode 100644 box_sdk_gen/schemas/tracking_code.py create mode 100644 box_sdk_gen/schemas/transcript_skill_card.py create mode 100644 box_sdk_gen/schemas/trash_file.py create mode 100644 box_sdk_gen/schemas/trash_file_restored.py create mode 100644 box_sdk_gen/schemas/trash_folder.py create mode 100644 box_sdk_gen/schemas/trash_folder_restored.py create mode 100644 box_sdk_gen/schemas/trash_web_link.py create mode 100644 box_sdk_gen/schemas/trash_web_link_restored.py create mode 100644 box_sdk_gen/schemas/upload_part.py create mode 100644 box_sdk_gen/schemas/upload_part_mini.py create mode 100644 box_sdk_gen/schemas/upload_parts.py create mode 100644 box_sdk_gen/schemas/upload_session.py create mode 100644 box_sdk_gen/schemas/upload_url.py create mode 100644 box_sdk_gen/schemas/uploaded_part.py create mode 100644 box_sdk_gen/schemas/user.py create mode 100644 box_sdk_gen/schemas/user_avatar.py create mode 100644 box_sdk_gen/schemas/user_base.py create mode 100644 box_sdk_gen/schemas/user_collaborations.py create mode 100644 box_sdk_gen/schemas/user_full.py create mode 100644 box_sdk_gen/schemas/user_integration_mappings.py create mode 100644 box_sdk_gen/schemas/user_mini.py create mode 100644 box_sdk_gen/schemas/users.py create mode 100644 box_sdk_gen/schemas/watermark.py create mode 100644 box_sdk_gen/schemas/web_link.py create mode 100644 box_sdk_gen/schemas/web_link_base.py create mode 100644 box_sdk_gen/schemas/web_link_mini.py create mode 100644 box_sdk_gen/schemas/webhook.py create mode 100644 box_sdk_gen/schemas/webhook_invocation.py create mode 100644 box_sdk_gen/schemas/webhook_mini.py create mode 100644 box_sdk_gen/schemas/webhooks.py create mode 100644 box_sdk_gen/schemas/workflow.py create mode 100644 box_sdk_gen/schemas/workflow_full.py create mode 100644 box_sdk_gen/schemas/workflow_mini.py create mode 100644 box_sdk_gen/schemas/workflows.py create mode 100644 box_sdk_gen/schemas/zip_download.py create mode 100644 box_sdk_gen/schemas/zip_download_request.py create mode 100644 box_sdk_gen/schemas/zip_download_status.py diff --git a/.codegen.json b/.codegen.json index 7d324ec..024d4f5 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "030ab26", "specHash": "d5769a1", "version": "0.6.5" } +{ "engineHash": "2fccaa2", "specHash": "d5769a1", "version": "0.6.5" } diff --git a/box_sdk_gen/box/__init__.py b/box_sdk_gen/box/__init__.py index a13c323..78c1411 100644 --- a/box_sdk_gen/box/__init__.py +++ b/box_sdk_gen/box/__init__.py @@ -2,10 +2,10 @@ from box_sdk_gen.box.token_storage import * -from box_sdk_gen.box.ccg_auth import * - -from box_sdk_gen.box.jwt_auth import * +from box_sdk_gen.box.developer_token_auth import * from box_sdk_gen.box.oauth import * -from box_sdk_gen.box.developer_token_auth import * +from box_sdk_gen.box.jwt_auth import * + +from box_sdk_gen.box.ccg_auth import * diff --git a/box_sdk_gen/box/ccg_auth.py b/box_sdk_gen/box/ccg_auth.py index 65346a7..f79fc62 100644 --- a/box_sdk_gen/box/ccg_auth.py +++ b/box_sdk_gen/box/ccg_auth.py @@ -2,13 +2,13 @@ from typing import List -from box_sdk_gen.schemas import PostOAuth2TokenGrantTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenGrantTypeField -from box_sdk_gen.schemas import PostOAuth2TokenSubjectTokenTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenSubjectTokenTypeField -from box_sdk_gen.schemas import AccessToken +from box_sdk_gen.schemas.access_token import AccessToken -from box_sdk_gen.schemas import PostOAuth2TokenBoxSubjectTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenBoxSubjectTypeField from box_sdk_gen.networking.auth import Authentication @@ -22,9 +22,9 @@ from box_sdk_gen.box.errors import BoxSDKError -from box_sdk_gen.schemas import PostOAuth2Token +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2Token -from box_sdk_gen.schemas import PostOAuth2Revoke +from box_sdk_gen.schemas.post_o_auth_2_revoke import PostOAuth2Revoke class CCGConfig: diff --git a/box_sdk_gen/box/developer_token_auth.py b/box_sdk_gen/box/developer_token_auth.py index d5b8ebb..0bba899 100644 --- a/box_sdk_gen/box/developer_token_auth.py +++ b/box_sdk_gen/box/developer_token_auth.py @@ -2,11 +2,11 @@ from typing import List -from box_sdk_gen.schemas import PostOAuth2TokenGrantTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenGrantTypeField -from box_sdk_gen.schemas import PostOAuth2TokenSubjectTokenTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenSubjectTokenTypeField -from box_sdk_gen.schemas import AccessToken +from box_sdk_gen.schemas.access_token import AccessToken from box_sdk_gen.networking.auth import Authentication @@ -20,9 +20,9 @@ from box_sdk_gen.managers.authorization import AuthorizationManager -from box_sdk_gen.schemas import PostOAuth2Token +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2Token -from box_sdk_gen.schemas import PostOAuth2Revoke +from box_sdk_gen.schemas.post_o_auth_2_revoke import PostOAuth2Revoke class DeveloperTokenConfig: diff --git a/box_sdk_gen/box/jwt_auth.py b/box_sdk_gen/box/jwt_auth.py index 33734a8..cbbddb0 100644 --- a/box_sdk_gen/box/jwt_auth.py +++ b/box_sdk_gen/box/jwt_auth.py @@ -8,19 +8,19 @@ from typing import List -from box_sdk_gen.schemas import PostOAuth2TokenGrantTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenGrantTypeField -from box_sdk_gen.schemas import PostOAuth2TokenSubjectTokenTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenSubjectTokenTypeField from box_sdk_gen.networking.auth import Authentication from box_sdk_gen.networking.network import NetworkSession -from box_sdk_gen.schemas import AccessToken +from box_sdk_gen.schemas.access_token import AccessToken -from box_sdk_gen.schemas import PostOAuth2Token +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2Token -from box_sdk_gen.schemas import PostOAuth2Revoke +from box_sdk_gen.schemas.post_o_auth_2_revoke import PostOAuth2Revoke from box_sdk_gen.box.token_storage import TokenStorage diff --git a/box_sdk_gen/box/oauth.py b/box_sdk_gen/box/oauth.py index 4c32470..0e4fa15 100644 --- a/box_sdk_gen/box/oauth.py +++ b/box_sdk_gen/box/oauth.py @@ -6,19 +6,19 @@ from typing import List -from box_sdk_gen.schemas import PostOAuth2TokenGrantTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenGrantTypeField -from box_sdk_gen.schemas import PostOAuth2TokenSubjectTokenTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenSubjectTokenTypeField from box_sdk_gen.networking.auth import Authentication from box_sdk_gen.networking.network import NetworkSession -from box_sdk_gen.schemas import AccessToken +from box_sdk_gen.schemas.access_token import AccessToken -from box_sdk_gen.schemas import PostOAuth2Token +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2Token -from box_sdk_gen.schemas import PostOAuth2Revoke +from box_sdk_gen.schemas.post_o_auth_2_revoke import PostOAuth2Revoke from box_sdk_gen.managers.authorization import AuthorizationManager diff --git a/box_sdk_gen/box/token_storage.py b/box_sdk_gen/box/token_storage.py index 7a964b5..5b4d2e4 100644 --- a/box_sdk_gen/box/token_storage.py +++ b/box_sdk_gen/box/token_storage.py @@ -2,7 +2,7 @@ from abc import abstractmethod from typing import Optional -from ..schemas import AccessToken +from ..schemas.access_token import AccessToken class TokenStorage: diff --git a/box_sdk_gen/managers/ai.py b/box_sdk_gen/managers/ai.py index 2054e56..ae2d070 100644 --- a/box_sdk_gen/managers/ai.py +++ b/box_sdk_gen/managers/ai.py @@ -14,13 +14,13 @@ from box_sdk_gen.internal.utils import DateTime -from box_sdk_gen.schemas import AiResponse +from box_sdk_gen.schemas.ai_response import AiResponse -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import AiAsk +from box_sdk_gen.schemas.ai_ask import AiAsk -from box_sdk_gen.schemas import AiTextGen +from box_sdk_gen.schemas.ai_text_gen import AiTextGen from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/authorization.py b/box_sdk_gen/managers/authorization.py index 355b077..c5f2958 100644 --- a/box_sdk_gen/managers/authorization.py +++ b/box_sdk_gen/managers/authorization.py @@ -10,21 +10,23 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import PostOAuth2TokenGrantTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenGrantTypeField -from box_sdk_gen.schemas import PostOAuth2TokenSubjectTokenTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenSubjectTokenTypeField -from box_sdk_gen.schemas import PostOAuth2TokenBoxSubjectTypeField +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2TokenBoxSubjectTypeField -from box_sdk_gen.schemas import AccessToken +from box_sdk_gen.schemas.access_token import AccessToken -from box_sdk_gen.schemas import OAuth2Error +from box_sdk_gen.schemas.o_auth_2_error import OAuth2Error -from box_sdk_gen.schemas import PostOAuth2Token +from box_sdk_gen.schemas.post_o_auth_2_token import PostOAuth2Token -from box_sdk_gen.schemas import PostOAuth2TokenRefreshAccessToken +from box_sdk_gen.schemas.post_o_auth_2_token_refresh_access_token import ( + PostOAuth2TokenRefreshAccessToken, +) -from box_sdk_gen.schemas import PostOAuth2Revoke +from box_sdk_gen.schemas.post_o_auth_2_revoke import PostOAuth2Revoke from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/avatars.py b/box_sdk_gen/managers/avatars.py index 2e5cef1..672c91f 100644 --- a/box_sdk_gen/managers/avatars.py +++ b/box_sdk_gen/managers/avatars.py @@ -6,9 +6,9 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import UserAvatar +from box_sdk_gen.schemas.user_avatar import UserAvatar from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/chunked_uploads.py b/box_sdk_gen/managers/chunked_uploads.py index 44244af..9a8bee5 100644 --- a/box_sdk_gen/managers/chunked_uploads.py +++ b/box_sdk_gen/managers/chunked_uploads.py @@ -14,21 +14,21 @@ from box_sdk_gen.internal.utils import HashName -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.internal.utils import Iterator -from box_sdk_gen.schemas import UploadSession +from box_sdk_gen.schemas.upload_session import UploadSession -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import UploadedPart +from box_sdk_gen.schemas.uploaded_part import UploadedPart -from box_sdk_gen.schemas import UploadParts +from box_sdk_gen.schemas.upload_parts import UploadParts -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files -from box_sdk_gen.schemas import UploadPart +from box_sdk_gen.schemas.upload_part import UploadPart from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/classifications.py b/box_sdk_gen/managers/classifications.py index 6044128..1f33b96 100644 --- a/box_sdk_gen/managers/classifications.py +++ b/box_sdk_gen/managers/classifications.py @@ -12,9 +12,9 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import ClassificationTemplate +from box_sdk_gen.schemas.classification_template import ClassificationTemplate -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/collaboration_allowlist_entries.py b/box_sdk_gen/managers/collaboration_allowlist_entries.py index 1f6207b..3ea6984 100644 --- a/box_sdk_gen/managers/collaboration_allowlist_entries.py +++ b/box_sdk_gen/managers/collaboration_allowlist_entries.py @@ -10,11 +10,15 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import CollaborationAllowlistEntries +from box_sdk_gen.schemas.collaboration_allowlist_entries import ( + CollaborationAllowlistEntries, +) -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import CollaborationAllowlistEntry +from box_sdk_gen.schemas.collaboration_allowlist_entry import ( + CollaborationAllowlistEntry, +) from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/collaboration_allowlist_exempt_targets.py b/box_sdk_gen/managers/collaboration_allowlist_exempt_targets.py index 859579e..92750e3 100644 --- a/box_sdk_gen/managers/collaboration_allowlist_exempt_targets.py +++ b/box_sdk_gen/managers/collaboration_allowlist_exempt_targets.py @@ -10,11 +10,15 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import CollaborationAllowlistExemptTargets +from box_sdk_gen.schemas.collaboration_allowlist_exempt_targets import ( + CollaborationAllowlistExemptTargets, +) -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import CollaborationAllowlistExemptTarget +from box_sdk_gen.schemas.collaboration_allowlist_exempt_target import ( + CollaborationAllowlistExemptTarget, +) from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/collections.py b/box_sdk_gen/managers/collections.py index e49738f..b2bb953 100644 --- a/box_sdk_gen/managers/collections.py +++ b/box_sdk_gen/managers/collections.py @@ -8,11 +8,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import Collections +from box_sdk_gen.schemas.collections import Collections -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import Items +from box_sdk_gen.schemas.items import Items from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/comments.py b/box_sdk_gen/managers/comments.py index 339a462..0d78460 100644 --- a/box_sdk_gen/managers/comments.py +++ b/box_sdk_gen/managers/comments.py @@ -14,11 +14,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import Comments +from box_sdk_gen.schemas.comments import Comments -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import CommentFull +from box_sdk_gen.schemas.comment_full import CommentFull from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/device_pinners.py b/box_sdk_gen/managers/device_pinners.py index 40dd92f..4fcc1c9 100644 --- a/box_sdk_gen/managers/device_pinners.py +++ b/box_sdk_gen/managers/device_pinners.py @@ -8,11 +8,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import DevicePinner +from box_sdk_gen.schemas.device_pinner import DevicePinner -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import DevicePinners +from box_sdk_gen.schemas.device_pinners import DevicePinners from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/downloads.py b/box_sdk_gen/managers/downloads.py index bd3fc7a..c655faa 100644 --- a/box_sdk_gen/managers/downloads.py +++ b/box_sdk_gen/managers/downloads.py @@ -4,7 +4,7 @@ from box_sdk_gen.internal.utils import to_string -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/email_aliases.py b/box_sdk_gen/managers/email_aliases.py index b456e34..3dadc47 100644 --- a/box_sdk_gen/managers/email_aliases.py +++ b/box_sdk_gen/managers/email_aliases.py @@ -8,11 +8,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import EmailAliases +from box_sdk_gen.schemas.email_aliases import EmailAliases -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import EmailAlias +from box_sdk_gen.schemas.email_alias import EmailAlias from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/events.py b/box_sdk_gen/managers/events.py index 7b9a3e5..71e3d2b 100644 --- a/box_sdk_gen/managers/events.py +++ b/box_sdk_gen/managers/events.py @@ -10,11 +10,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import Events +from box_sdk_gen.schemas.events import Events -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import RealtimeServers +from box_sdk_gen.schemas.realtime_servers import RealtimeServers from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/file_classifications.py b/box_sdk_gen/managers/file_classifications.py index 25b1cb5..d935932 100644 --- a/box_sdk_gen/managers/file_classifications.py +++ b/box_sdk_gen/managers/file_classifications.py @@ -14,9 +14,9 @@ from typing import List -from box_sdk_gen.schemas import Classification +from box_sdk_gen.schemas.classification import Classification -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/file_metadata.py b/box_sdk_gen/managers/file_metadata.py index 8920feb..54281aa 100644 --- a/box_sdk_gen/managers/file_metadata.py +++ b/box_sdk_gen/managers/file_metadata.py @@ -14,11 +14,11 @@ from typing import List -from box_sdk_gen.schemas import Metadatas +from box_sdk_gen.schemas.metadatas import Metadatas -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import MetadataFull +from box_sdk_gen.schemas.metadata_full import MetadataFull from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/file_requests.py b/box_sdk_gen/managers/file_requests.py index c0aa261..759a379 100644 --- a/box_sdk_gen/managers/file_requests.py +++ b/box_sdk_gen/managers/file_requests.py @@ -14,13 +14,13 @@ from box_sdk_gen.internal.utils import DateTime -from box_sdk_gen.schemas import FileRequest +from box_sdk_gen.schemas.file_request import FileRequest -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import FileRequestUpdateRequest +from box_sdk_gen.schemas.file_request_update_request import FileRequestUpdateRequest -from box_sdk_gen.schemas import FileRequestCopyRequest +from box_sdk_gen.schemas.file_request_copy_request import FileRequestCopyRequest from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/file_version_legal_holds.py b/box_sdk_gen/managers/file_version_legal_holds.py index d9e9c77..2e088fe 100644 --- a/box_sdk_gen/managers/file_version_legal_holds.py +++ b/box_sdk_gen/managers/file_version_legal_holds.py @@ -6,11 +6,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import FileVersionLegalHold +from box_sdk_gen.schemas.file_version_legal_hold import FileVersionLegalHold -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import FileVersionLegalHolds +from box_sdk_gen.schemas.file_version_legal_holds import FileVersionLegalHolds from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/file_version_retentions.py b/box_sdk_gen/managers/file_version_retentions.py index 56f6075..dfab361 100644 --- a/box_sdk_gen/managers/file_version_retentions.py +++ b/box_sdk_gen/managers/file_version_retentions.py @@ -8,11 +8,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import FileVersionRetentions +from box_sdk_gen.schemas.file_version_retentions import FileVersionRetentions -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import FileVersionRetention +from box_sdk_gen.schemas.file_version_retention import FileVersionRetention from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/file_versions.py b/box_sdk_gen/managers/file_versions.py index fc63ac3..0594ca1 100644 --- a/box_sdk_gen/managers/file_versions.py +++ b/box_sdk_gen/managers/file_versions.py @@ -12,11 +12,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import FileVersions +from box_sdk_gen.schemas.file_versions import FileVersions -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import FileVersionFull +from box_sdk_gen.schemas.file_version_full import FileVersionFull from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/file_watermarks.py b/box_sdk_gen/managers/file_watermarks.py index cdc731f..f6b929b 100644 --- a/box_sdk_gen/managers/file_watermarks.py +++ b/box_sdk_gen/managers/file_watermarks.py @@ -12,9 +12,9 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import Watermark +from box_sdk_gen.schemas.watermark import Watermark -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/files.py b/box_sdk_gen/managers/files.py index ada5830..1113133 100644 --- a/box_sdk_gen/managers/files.py +++ b/box_sdk_gen/managers/files.py @@ -14,9 +14,9 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/folder_classifications.py b/box_sdk_gen/managers/folder_classifications.py index 796279c..c03232e 100644 --- a/box_sdk_gen/managers/folder_classifications.py +++ b/box_sdk_gen/managers/folder_classifications.py @@ -14,9 +14,9 @@ from typing import List -from box_sdk_gen.schemas import Classification +from box_sdk_gen.schemas.classification import Classification -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/folder_locks.py b/box_sdk_gen/managers/folder_locks.py index c3de521..207b95a 100644 --- a/box_sdk_gen/managers/folder_locks.py +++ b/box_sdk_gen/managers/folder_locks.py @@ -10,11 +10,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import FolderLocks +from box_sdk_gen.schemas.folder_locks import FolderLocks -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import FolderLock +from box_sdk_gen.schemas.folder_lock import FolderLock from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/folder_metadata.py b/box_sdk_gen/managers/folder_metadata.py index e31c963..32dc976 100644 --- a/box_sdk_gen/managers/folder_metadata.py +++ b/box_sdk_gen/managers/folder_metadata.py @@ -14,11 +14,11 @@ from typing import List -from box_sdk_gen.schemas import Metadatas +from box_sdk_gen.schemas.metadatas import Metadatas -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import MetadataFull +from box_sdk_gen.schemas.metadata_full import MetadataFull from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/folder_watermarks.py b/box_sdk_gen/managers/folder_watermarks.py index 7156a8d..aa4081c 100644 --- a/box_sdk_gen/managers/folder_watermarks.py +++ b/box_sdk_gen/managers/folder_watermarks.py @@ -12,9 +12,9 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import Watermark +from box_sdk_gen.schemas.watermark import Watermark -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/folders.py b/box_sdk_gen/managers/folders.py index ec8a9ac..4196db4 100644 --- a/box_sdk_gen/managers/folders.py +++ b/box_sdk_gen/managers/folders.py @@ -14,11 +14,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import Items +from box_sdk_gen.schemas.items import Items from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/groups.py b/box_sdk_gen/managers/groups.py index 483f3ea..bae1994 100644 --- a/box_sdk_gen/managers/groups.py +++ b/box_sdk_gen/managers/groups.py @@ -12,11 +12,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import Groups +from box_sdk_gen.schemas.groups import Groups -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import GroupFull +from box_sdk_gen.schemas.group_full import GroupFull from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/integration_mappings.py b/box_sdk_gen/managers/integration_mappings.py index 60adefe..b5d46e6 100644 --- a/box_sdk_gen/managers/integration_mappings.py +++ b/box_sdk_gen/managers/integration_mappings.py @@ -10,19 +10,27 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import IntegrationMappingPartnerItemSlack +from box_sdk_gen.schemas.integration_mapping_partner_item_slack import ( + IntegrationMappingPartnerItemSlack, +) -from box_sdk_gen.schemas import IntegrationMappings +from box_sdk_gen.schemas.integration_mappings import IntegrationMappings -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import IntegrationMapping +from box_sdk_gen.schemas.integration_mapping import IntegrationMapping -from box_sdk_gen.schemas import IntegrationMappingSlackCreateRequest +from box_sdk_gen.schemas.integration_mapping_slack_create_request import ( + IntegrationMappingSlackCreateRequest, +) -from box_sdk_gen.schemas import IntegrationMappingBoxItemSlack +from box_sdk_gen.schemas.integration_mapping_box_item_slack import ( + IntegrationMappingBoxItemSlack, +) -from box_sdk_gen.schemas import IntegrationMappingSlackOptions +from box_sdk_gen.schemas.integration_mapping_slack_options import ( + IntegrationMappingSlackOptions, +) from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/invites.py b/box_sdk_gen/managers/invites.py index cea0195..6e7d699 100644 --- a/box_sdk_gen/managers/invites.py +++ b/box_sdk_gen/managers/invites.py @@ -12,9 +12,9 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import Invite +from box_sdk_gen.schemas.invite import Invite -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/legal_hold_policies.py b/box_sdk_gen/managers/legal_hold_policies.py index 8635276..20c961a 100644 --- a/box_sdk_gen/managers/legal_hold_policies.py +++ b/box_sdk_gen/managers/legal_hold_policies.py @@ -10,11 +10,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import LegalHoldPolicies +from box_sdk_gen.schemas.legal_hold_policies import LegalHoldPolicies -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import LegalHoldPolicy +from box_sdk_gen.schemas.legal_hold_policy import LegalHoldPolicy from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/legal_hold_policy_assignments.py b/box_sdk_gen/managers/legal_hold_policy_assignments.py index f5eff15..417bf63 100644 --- a/box_sdk_gen/managers/legal_hold_policy_assignments.py +++ b/box_sdk_gen/managers/legal_hold_policy_assignments.py @@ -14,13 +14,13 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import LegalHoldPolicyAssignments +from box_sdk_gen.schemas.legal_hold_policy_assignments import LegalHoldPolicyAssignments -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import LegalHoldPolicyAssignment +from box_sdk_gen.schemas.legal_hold_policy_assignment import LegalHoldPolicyAssignment -from box_sdk_gen.schemas import FileVersionLegalHolds +from box_sdk_gen.schemas.file_version_legal_holds import FileVersionLegalHolds from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/list_collaborations.py b/box_sdk_gen/managers/list_collaborations.py index 3904d38..2770d25 100644 --- a/box_sdk_gen/managers/list_collaborations.py +++ b/box_sdk_gen/managers/list_collaborations.py @@ -10,9 +10,9 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import Collaborations +from box_sdk_gen.schemas.collaborations import Collaborations -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/memberships.py b/box_sdk_gen/managers/memberships.py index 7dfe071..3ae05ff 100644 --- a/box_sdk_gen/managers/memberships.py +++ b/box_sdk_gen/managers/memberships.py @@ -14,11 +14,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import GroupMemberships +from box_sdk_gen.schemas.group_memberships import GroupMemberships -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import GroupMembership +from box_sdk_gen.schemas.group_membership import GroupMembership from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/metadata_cascade_policies.py b/box_sdk_gen/managers/metadata_cascade_policies.py index d139c88..20a9f56 100644 --- a/box_sdk_gen/managers/metadata_cascade_policies.py +++ b/box_sdk_gen/managers/metadata_cascade_policies.py @@ -10,13 +10,13 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import MetadataCascadePolicies +from box_sdk_gen.schemas.metadata_cascade_policies import MetadataCascadePolicies -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import MetadataCascadePolicy +from box_sdk_gen.schemas.metadata_cascade_policy import MetadataCascadePolicy -from box_sdk_gen.schemas import ConflictError +from box_sdk_gen.schemas.conflict_error import ConflictError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/metadata_templates.py b/box_sdk_gen/managers/metadata_templates.py index beb3cb2..e72195a 100644 --- a/box_sdk_gen/managers/metadata_templates.py +++ b/box_sdk_gen/managers/metadata_templates.py @@ -14,11 +14,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import MetadataTemplates +from box_sdk_gen.schemas.metadata_templates import MetadataTemplates -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import MetadataTemplate +from box_sdk_gen.schemas.metadata_template import MetadataTemplate from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/recent_items.py b/box_sdk_gen/managers/recent_items.py index 4ffe45a..e07206c 100644 --- a/box_sdk_gen/managers/recent_items.py +++ b/box_sdk_gen/managers/recent_items.py @@ -8,9 +8,9 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import RecentItems +from box_sdk_gen.schemas.recent_items import RecentItems -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/retention_policies.py b/box_sdk_gen/managers/retention_policies.py index 6aa40c0..b700e3f 100644 --- a/box_sdk_gen/managers/retention_policies.py +++ b/box_sdk_gen/managers/retention_policies.py @@ -12,15 +12,15 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import RetentionPolicies +from box_sdk_gen.schemas.retention_policies import RetentionPolicies -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import RetentionPolicy +from box_sdk_gen.schemas.retention_policy import RetentionPolicy -from box_sdk_gen.schemas import UserMini +from box_sdk_gen.schemas.user_mini import UserMini -from box_sdk_gen.schemas import UserBase +from box_sdk_gen.schemas.user_base import UserBase from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/retention_policy_assignments.py b/box_sdk_gen/managers/retention_policy_assignments.py index a7a33a2..8ea9686 100644 --- a/box_sdk_gen/managers/retention_policy_assignments.py +++ b/box_sdk_gen/managers/retention_policy_assignments.py @@ -14,13 +14,13 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import RetentionPolicyAssignments +from box_sdk_gen.schemas.retention_policy_assignments import RetentionPolicyAssignments -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import RetentionPolicyAssignment +from box_sdk_gen.schemas.retention_policy_assignment import RetentionPolicyAssignment -from box_sdk_gen.schemas import FilesUnderRetention +from box_sdk_gen.schemas.files_under_retention import FilesUnderRetention from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/search.py b/box_sdk_gen/managers/search.py index 74d32ad..749e27f 100644 --- a/box_sdk_gen/managers/search.py +++ b/box_sdk_gen/managers/search.py @@ -16,17 +16,19 @@ from typing import Union -from box_sdk_gen.schemas import MetadataQueryResults +from box_sdk_gen.schemas.metadata_query_results import MetadataQueryResults -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import MetadataQuery +from box_sdk_gen.schemas.metadata_query import MetadataQuery -from box_sdk_gen.schemas import SearchResults +from box_sdk_gen.schemas.search_results import SearchResults -from box_sdk_gen.schemas import SearchResultsWithSharedLinks +from box_sdk_gen.schemas.search_results_with_shared_links import ( + SearchResultsWithSharedLinks, +) -from box_sdk_gen.schemas import MetadataFilter +from box_sdk_gen.schemas.metadata_filter import MetadataFilter from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/session_termination.py b/box_sdk_gen/managers/session_termination.py index 378ad64..c9a666e 100644 --- a/box_sdk_gen/managers/session_termination.py +++ b/box_sdk_gen/managers/session_termination.py @@ -8,9 +8,9 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import SessionTerminationMessage +from box_sdk_gen.schemas.session_termination_message import SessionTerminationMessage -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/shared_links_files.py b/box_sdk_gen/managers/shared_links_files.py index 583e342..df5068f 100644 --- a/box_sdk_gen/managers/shared_links_files.py +++ b/box_sdk_gen/managers/shared_links_files.py @@ -14,9 +14,9 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/shared_links_folders.py b/box_sdk_gen/managers/shared_links_folders.py index 2c8fa92..efa0d88 100644 --- a/box_sdk_gen/managers/shared_links_folders.py +++ b/box_sdk_gen/managers/shared_links_folders.py @@ -14,9 +14,9 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/shared_links_web_links.py b/box_sdk_gen/managers/shared_links_web_links.py index c676c9b..19db80e 100644 --- a/box_sdk_gen/managers/shared_links_web_links.py +++ b/box_sdk_gen/managers/shared_links_web_links.py @@ -14,9 +14,9 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import WebLink +from box_sdk_gen.schemas.web_link import WebLink -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/shield_information_barrier_reports.py b/box_sdk_gen/managers/shield_information_barrier_reports.py index cfdc703..eefd83c 100644 --- a/box_sdk_gen/managers/shield_information_barrier_reports.py +++ b/box_sdk_gen/managers/shield_information_barrier_reports.py @@ -8,15 +8,23 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import ShieldInformationBarrierBase +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) -from box_sdk_gen.schemas import ShieldInformationBarrierReports +from box_sdk_gen.schemas.shield_information_barrier_reports import ( + ShieldInformationBarrierReports, +) -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import ShieldInformationBarrierReport +from box_sdk_gen.schemas.shield_information_barrier_report import ( + ShieldInformationBarrierReport, +) -from box_sdk_gen.schemas import ShieldInformationBarrierReference +from box_sdk_gen.schemas.shield_information_barrier_reference import ( + ShieldInformationBarrierReference, +) from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/shield_information_barrier_segment_members.py b/box_sdk_gen/managers/shield_information_barrier_segment_members.py index 3812733..bcf9689 100644 --- a/box_sdk_gen/managers/shield_information_barrier_segment_members.py +++ b/box_sdk_gen/managers/shield_information_barrier_segment_members.py @@ -12,15 +12,21 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import ShieldInformationBarrierSegmentMember +from box_sdk_gen.schemas.shield_information_barrier_segment_member import ( + ShieldInformationBarrierSegmentMember, +) -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import ShieldInformationBarrierSegmentMembers +from box_sdk_gen.schemas.shield_information_barrier_segment_members import ( + ShieldInformationBarrierSegmentMembers, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBase +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) -from box_sdk_gen.schemas import UserBase +from box_sdk_gen.schemas.user_base import UserBase from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/shield_information_barrier_segment_restrictions.py b/box_sdk_gen/managers/shield_information_barrier_segment_restrictions.py index 31b6278..b2fe867 100644 --- a/box_sdk_gen/managers/shield_information_barrier_segment_restrictions.py +++ b/box_sdk_gen/managers/shield_information_barrier_segment_restrictions.py @@ -12,13 +12,19 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import ShieldInformationBarrierSegmentRestriction +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction import ( + ShieldInformationBarrierSegmentRestriction, +) -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import ShieldInformationBarrierSegmentRestrictions +from box_sdk_gen.schemas.shield_information_barrier_segment_restrictions import ( + ShieldInformationBarrierSegmentRestrictions, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBase +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/shield_information_barrier_segments.py b/box_sdk_gen/managers/shield_information_barrier_segments.py index b835325..3270452 100644 --- a/box_sdk_gen/managers/shield_information_barrier_segments.py +++ b/box_sdk_gen/managers/shield_information_barrier_segments.py @@ -8,13 +8,19 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import ShieldInformationBarrierSegment +from box_sdk_gen.schemas.shield_information_barrier_segment import ( + ShieldInformationBarrierSegment, +) -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import ShieldInformationBarrierSegments +from box_sdk_gen.schemas.shield_information_barrier_segments import ( + ShieldInformationBarrierSegments, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBase +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/shield_information_barriers.py b/box_sdk_gen/managers/shield_information_barriers.py index b0b9674..3051021 100644 --- a/box_sdk_gen/managers/shield_information_barriers.py +++ b/box_sdk_gen/managers/shield_information_barriers.py @@ -10,13 +10,13 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import ShieldInformationBarrier +from box_sdk_gen.schemas.shield_information_barrier import ShieldInformationBarrier -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import ShieldInformationBarriers +from box_sdk_gen.schemas.shield_information_barriers import ShieldInformationBarriers -from box_sdk_gen.schemas import EnterpriseBase +from box_sdk_gen.schemas.enterprise_base import EnterpriseBase from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/sign_requests.py b/box_sdk_gen/managers/sign_requests.py index a14f0af..adaf931 100644 --- a/box_sdk_gen/managers/sign_requests.py +++ b/box_sdk_gen/managers/sign_requests.py @@ -12,21 +12,21 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import FileBase +from box_sdk_gen.schemas.file_base import FileBase -from box_sdk_gen.schemas import SignRequestCreateSigner +from box_sdk_gen.schemas.sign_request_create_signer import SignRequestCreateSigner -from box_sdk_gen.schemas import FolderMini +from box_sdk_gen.schemas.folder_mini import FolderMini -from box_sdk_gen.schemas import SignRequestPrefillTag +from box_sdk_gen.schemas.sign_request_prefill_tag import SignRequestPrefillTag -from box_sdk_gen.schemas import SignRequest +from box_sdk_gen.schemas.sign_request import SignRequest -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import SignRequests +from box_sdk_gen.schemas.sign_requests import SignRequests -from box_sdk_gen.schemas import SignRequestCreateRequest +from box_sdk_gen.schemas.sign_request_create_request import SignRequestCreateRequest from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/sign_templates.py b/box_sdk_gen/managers/sign_templates.py index 75d503d..bbb0b33 100644 --- a/box_sdk_gen/managers/sign_templates.py +++ b/box_sdk_gen/managers/sign_templates.py @@ -6,11 +6,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import SignTemplates +from box_sdk_gen.schemas.sign_templates import SignTemplates -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import SignTemplate +from box_sdk_gen.schemas.sign_template import SignTemplate from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/skills.py b/box_sdk_gen/managers/skills.py index 23bce91..843bc81 100644 --- a/box_sdk_gen/managers/skills.py +++ b/box_sdk_gen/managers/skills.py @@ -16,17 +16,17 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import SkillCardsMetadata +from box_sdk_gen.schemas.skill_cards_metadata import SkillCardsMetadata -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import KeywordSkillCard +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCard -from box_sdk_gen.schemas import TimelineSkillCard +from box_sdk_gen.schemas.timeline_skill_card import TimelineSkillCard -from box_sdk_gen.schemas import TranscriptSkillCard +from box_sdk_gen.schemas.transcript_skill_card import TranscriptSkillCard -from box_sdk_gen.schemas import StatusSkillCard +from box_sdk_gen.schemas.status_skill_card import StatusSkillCard from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/storage_policies.py b/box_sdk_gen/managers/storage_policies.py index 96f1f6f..ed779b5 100644 --- a/box_sdk_gen/managers/storage_policies.py +++ b/box_sdk_gen/managers/storage_policies.py @@ -8,11 +8,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import StoragePolicies +from box_sdk_gen.schemas.storage_policies import StoragePolicies -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import StoragePolicy +from box_sdk_gen.schemas.storage_policy import StoragePolicy from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/storage_policy_assignments.py b/box_sdk_gen/managers/storage_policy_assignments.py index fb5c380..4e38010 100644 --- a/box_sdk_gen/managers/storage_policy_assignments.py +++ b/box_sdk_gen/managers/storage_policy_assignments.py @@ -12,11 +12,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import StoragePolicyAssignments +from box_sdk_gen.schemas.storage_policy_assignments import StoragePolicyAssignments -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import StoragePolicyAssignment +from box_sdk_gen.schemas.storage_policy_assignment import StoragePolicyAssignment from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/task_assignments.py b/box_sdk_gen/managers/task_assignments.py index ccc3910..d6147d9 100644 --- a/box_sdk_gen/managers/task_assignments.py +++ b/box_sdk_gen/managers/task_assignments.py @@ -12,11 +12,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import TaskAssignments +from box_sdk_gen.schemas.task_assignments import TaskAssignments -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import TaskAssignment +from box_sdk_gen.schemas.task_assignment import TaskAssignment from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/tasks.py b/box_sdk_gen/managers/tasks.py index 39150e6..f9fc275 100644 --- a/box_sdk_gen/managers/tasks.py +++ b/box_sdk_gen/managers/tasks.py @@ -12,11 +12,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import Tasks +from box_sdk_gen.schemas.tasks import Tasks -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import Task +from box_sdk_gen.schemas.task import Task from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/terms_of_service_user_statuses.py b/box_sdk_gen/managers/terms_of_service_user_statuses.py index ac5f568..3262296 100644 --- a/box_sdk_gen/managers/terms_of_service_user_statuses.py +++ b/box_sdk_gen/managers/terms_of_service_user_statuses.py @@ -12,11 +12,13 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import TermsOfServiceUserStatuses +from box_sdk_gen.schemas.terms_of_service_user_statuses import ( + TermsOfServiceUserStatuses, +) -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import TermsOfServiceUserStatus +from box_sdk_gen.schemas.terms_of_service_user_status import TermsOfServiceUserStatus from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/terms_of_services.py b/box_sdk_gen/managers/terms_of_services.py index ce26c8c..ac7d596 100644 --- a/box_sdk_gen/managers/terms_of_services.py +++ b/box_sdk_gen/managers/terms_of_services.py @@ -10,11 +10,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import TermsOfServices +from box_sdk_gen.schemas.terms_of_services import TermsOfServices -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import TermsOfService +from box_sdk_gen.schemas.terms_of_service import TermsOfService from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/transfer.py b/box_sdk_gen/managers/transfer.py index 7b108ce..6fd48e7 100644 --- a/box_sdk_gen/managers/transfer.py +++ b/box_sdk_gen/managers/transfer.py @@ -12,9 +12,9 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/trashed_files.py b/box_sdk_gen/managers/trashed_files.py index 889c5a4..2a8c1ec 100644 --- a/box_sdk_gen/managers/trashed_files.py +++ b/box_sdk_gen/managers/trashed_files.py @@ -12,11 +12,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import TrashFileRestored +from box_sdk_gen.schemas.trash_file_restored import TrashFileRestored -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import TrashFile +from box_sdk_gen.schemas.trash_file import TrashFile from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/trashed_folders.py b/box_sdk_gen/managers/trashed_folders.py index 21d47ae..7065053 100644 --- a/box_sdk_gen/managers/trashed_folders.py +++ b/box_sdk_gen/managers/trashed_folders.py @@ -12,11 +12,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import TrashFolderRestored +from box_sdk_gen.schemas.trash_folder_restored import TrashFolderRestored -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import TrashFolder +from box_sdk_gen.schemas.trash_folder import TrashFolder from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/trashed_items.py b/box_sdk_gen/managers/trashed_items.py index 51e3b9f..56a25fd 100644 --- a/box_sdk_gen/managers/trashed_items.py +++ b/box_sdk_gen/managers/trashed_items.py @@ -10,9 +10,9 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import Items +from box_sdk_gen.schemas.items import Items -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/trashed_web_links.py b/box_sdk_gen/managers/trashed_web_links.py index fc05c23..52e0923 100644 --- a/box_sdk_gen/managers/trashed_web_links.py +++ b/box_sdk_gen/managers/trashed_web_links.py @@ -12,11 +12,11 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import TrashWebLinkRestored +from box_sdk_gen.schemas.trash_web_link_restored import TrashWebLinkRestored -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import TrashWebLink +from box_sdk_gen.schemas.trash_web_link import TrashWebLink from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/uploads.py b/box_sdk_gen/managers/uploads.py index 3686088..5c1f2c3 100644 --- a/box_sdk_gen/managers/uploads.py +++ b/box_sdk_gen/managers/uploads.py @@ -12,13 +12,13 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import UploadUrl +from box_sdk_gen.schemas.upload_url import UploadUrl -from box_sdk_gen.schemas import ConflictError +from box_sdk_gen.schemas.conflict_error import ConflictError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/user_collaborations.py b/box_sdk_gen/managers/user_collaborations.py index 021316d..77dc4e2 100644 --- a/box_sdk_gen/managers/user_collaborations.py +++ b/box_sdk_gen/managers/user_collaborations.py @@ -14,9 +14,9 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import Collaboration +from box_sdk_gen.schemas.collaboration import Collaboration -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/users.py b/box_sdk_gen/managers/users.py index 9392b0f..0433066 100644 --- a/box_sdk_gen/managers/users.py +++ b/box_sdk_gen/managers/users.py @@ -14,13 +14,13 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import Users +from box_sdk_gen.schemas.users import Users -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import TrackingCode +from box_sdk_gen.schemas.tracking_code import TrackingCode from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/web_links.py b/box_sdk_gen/managers/web_links.py index cb0009e..80747d2 100644 --- a/box_sdk_gen/managers/web_links.py +++ b/box_sdk_gen/managers/web_links.py @@ -12,9 +12,9 @@ from box_sdk_gen.internal.utils import to_string -from box_sdk_gen.schemas import WebLink +from box_sdk_gen.schemas.web_link import WebLink -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/webhooks.py b/box_sdk_gen/managers/webhooks.py index dac9f56..2da1c24 100644 --- a/box_sdk_gen/managers/webhooks.py +++ b/box_sdk_gen/managers/webhooks.py @@ -14,11 +14,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import Webhooks +from box_sdk_gen.schemas.webhooks import Webhooks -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import Webhook +from box_sdk_gen.schemas.webhook import Webhook from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/workflows.py b/box_sdk_gen/managers/workflows.py index a694be5..142d310 100644 --- a/box_sdk_gen/managers/workflows.py +++ b/box_sdk_gen/managers/workflows.py @@ -14,11 +14,11 @@ from box_sdk_gen.serialization.json.serializer import serialize -from box_sdk_gen.schemas import Workflows +from box_sdk_gen.schemas.workflows import Workflows -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import Outcome +from box_sdk_gen.schemas.outcome import Outcome from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/managers/zip_downloads.py b/box_sdk_gen/managers/zip_downloads.py index 5103876..2428ef9 100644 --- a/box_sdk_gen/managers/zip_downloads.py +++ b/box_sdk_gen/managers/zip_downloads.py @@ -12,13 +12,13 @@ from box_sdk_gen.serialization.json.serializer import deserialize -from box_sdk_gen.schemas import ZipDownload +from box_sdk_gen.schemas.zip_download import ZipDownload -from box_sdk_gen.schemas import ClientError +from box_sdk_gen.schemas.client_error import ClientError -from box_sdk_gen.schemas import ZipDownloadRequest +from box_sdk_gen.schemas.zip_download_request import ZipDownloadRequest -from box_sdk_gen.schemas import ZipDownloadStatus +from box_sdk_gen.schemas.zip_download_status import ZipDownloadStatus from box_sdk_gen.networking.auth import Authentication diff --git a/box_sdk_gen/networking/auth.py b/box_sdk_gen/networking/auth.py index f976406..61347ff 100644 --- a/box_sdk_gen/networking/auth.py +++ b/box_sdk_gen/networking/auth.py @@ -4,7 +4,7 @@ from typing import List -from box_sdk_gen.schemas import AccessToken +from box_sdk_gen.schemas.access_token import AccessToken from box_sdk_gen.networking.network import NetworkSession diff --git a/box_sdk_gen/schemas.py b/box_sdk_gen/schemas.py deleted file mode 100644 index 318e92e..0000000 --- a/box_sdk_gen/schemas.py +++ /dev/null @@ -1,13042 +0,0 @@ -from enum import Enum - -from typing import Optional - -from box_sdk_gen.internal.base_object import BaseObject - -from typing import List - -from typing import Dict - -from typing import Union - -from box_sdk_gen.internal.utils import DateTime - -from box_sdk_gen.internal.utils import Date - - -class AiAskModeField(str, Enum): - MULTIPLE_ITEM_QA = 'multiple_item_qa' - SINGLE_ITEM_QA = 'single_item_qa' - - -class AiAskItemsTypeField(str, Enum): - FILE = 'file' - - -class AiAskItemsField(BaseObject): - _discriminator = 'type', {'file'} - - def __init__( - self, - id: str, - *, - type: AiAskItemsTypeField = AiAskItemsTypeField.FILE.value, - content: Optional[str] = None, - **kwargs - ): - """ - :param id: The id of the item - :type id: str - :param type: The type of the item, defaults to AiAskItemsTypeField.FILE.value - :type type: AiAskItemsTypeField, optional - :param content: The content of the item, often the text representation., defaults to None - :type content: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.content = content - - -class AiAsk(BaseObject): - def __init__( - self, mode: AiAskModeField, prompt: str, items: List[AiAskItemsField], **kwargs - ): - """ - :param mode: The mode specifies if this request is for a single or multiple items. - :type mode: AiAskModeField - :param prompt: The prompt provided by the client to be answered by the LLM. - :type prompt: str - :param items: The items to be processed by the LLM, often files. - :type items: List[AiAskItemsField] - """ - super().__init__(**kwargs) - self.mode = mode - self.prompt = prompt - self.items = items - - -class AiTextGenItemsTypeField(str, Enum): - FILE = 'file' - - -class AiTextGenItemsField(BaseObject): - _discriminator = 'type', {'file'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[AiTextGenItemsTypeField] = None, - content: Optional[str] = None, - **kwargs - ): - """ - :param id: The id of the item., defaults to None - :type id: Optional[str], optional - :param type: The type of the item., defaults to None - :type type: Optional[AiTextGenItemsTypeField], optional - :param content: The content to use as context for generating new text or editing existing text., defaults to None - :type content: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.content = content - - -class AiTextGenDialogueHistoryField(BaseObject): - def __init__( - self, - *, - prompt: Optional[str] = None, - answer: Optional[str] = None, - created_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param prompt: The prompt previously provided by the client and answered by the LLM., defaults to None - :type prompt: Optional[str], optional - :param answer: The answer previously provided by the LLM., defaults to None - :type answer: Optional[str], optional - :param created_at: The ISO date formatted timestamp of when the previous answer to the prompt was created., defaults to None - :type created_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.prompt = prompt - self.answer = answer - self.created_at = created_at - - -class AiTextGen(BaseObject): - def __init__( - self, - prompt: str, - items: List[AiTextGenItemsField], - *, - dialogue_history: Optional[List[AiTextGenDialogueHistoryField]] = None, - **kwargs - ): - """ - :param prompt: The prompt provided by the client to be answered by the LLM. - :type prompt: str - :param items: The items to be processed by the LLM, often files. - :type items: List[AiTextGenItemsField] - :param dialogue_history: The history of prompts and answers previously passed to the LLM. This provides additional context to the LLM in generating the response., defaults to None - :type dialogue_history: Optional[List[AiTextGenDialogueHistoryField]], optional - """ - super().__init__(**kwargs) - self.prompt = prompt - self.items = items - self.dialogue_history = dialogue_history - - -class PostOAuth2TokenGrantTypeField(str, Enum): - AUTHORIZATION_CODE = 'authorization_code' - REFRESH_TOKEN = 'refresh_token' - CLIENT_CREDENTIALS = 'client_credentials' - URN_IETF_PARAMS_OAUTH_GRANT_TYPE_JWT_BEARER = ( - 'urn:ietf:params:oauth:grant-type:jwt-bearer' - ) - URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE = ( - 'urn:ietf:params:oauth:grant-type:token-exchange' - ) - - -class PostOAuth2TokenSubjectTokenTypeField(str, Enum): - URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN = ( - 'urn:ietf:params:oauth:token-type:access_token' - ) - - -class PostOAuth2TokenActorTokenTypeField(str, Enum): - URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ID_TOKEN = ( - 'urn:ietf:params:oauth:token-type:id_token' - ) - - -class PostOAuth2TokenBoxSubjectTypeField(str, Enum): - ENTERPRISE = 'enterprise' - USER = 'user' - - -class PostOAuth2Token(BaseObject): - def __init__( - self, - grant_type: PostOAuth2TokenGrantTypeField, - *, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - code: Optional[str] = None, - refresh_token: Optional[str] = None, - assertion: Optional[str] = None, - subject_token: Optional[str] = None, - subject_token_type: Optional[PostOAuth2TokenSubjectTokenTypeField] = None, - actor_token: Optional[str] = None, - actor_token_type: Optional[PostOAuth2TokenActorTokenTypeField] = None, - scope: Optional[str] = None, - resource: Optional[str] = None, - box_subject_type: Optional[PostOAuth2TokenBoxSubjectTypeField] = None, - box_subject_id: Optional[str] = None, - box_shared_link: Optional[str] = None, - **kwargs - ): - """ - :param grant_type: The type of request being made, either using a client-side obtained - authorization code, a refresh token, a JWT assertion, client credentials - grant or another access token for the purpose of downscoping a token. - :type grant_type: PostOAuth2TokenGrantTypeField - :param client_id: The Client ID of the application requesting an access token. - - Used in combination with `authorization_code`, `client_credentials`, or - `urn:ietf:params:oauth:grant-type:jwt-bearer` as the `grant_type`., defaults to None - :type client_id: Optional[str], optional - :param client_secret: The client secret of the application requesting an access token. - - Used in combination with `authorization_code`, `client_credentials`, or - `urn:ietf:params:oauth:grant-type:jwt-bearer` as the `grant_type`., defaults to None - :type client_secret: Optional[str], optional - :param code: The client-side authorization code passed to your application by - Box in the browser redirect after the user has successfully - granted your application permission to make API calls on their - behalf. - - Used in combination with `authorization_code` as the `grant_type`., defaults to None - :type code: Optional[str], optional - :param refresh_token: A refresh token used to get a new access token with. - - Used in combination with `refresh_token` as the `grant_type`., defaults to None - :type refresh_token: Optional[str], optional - :param assertion: A JWT assertion for which to request a new access token. - - Used in combination with `urn:ietf:params:oauth:grant-type:jwt-bearer` - as the `grant_type`., defaults to None - :type assertion: Optional[str], optional - :param subject_token: The token to exchange for a downscoped token. This can be a regular - access token, a JWT assertion, or an app token. - - Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` - as the `grant_type`., defaults to None - :type subject_token: Optional[str], optional - :param subject_token_type: The type of `subject_token` passed in. - - Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` - as the `grant_type`., defaults to None - :type subject_token_type: Optional[PostOAuth2TokenSubjectTokenTypeField], optional - :param actor_token: The token used to create an annotator token. - This is a JWT assertion. - - Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` - as the `grant_type`., defaults to None - :type actor_token: Optional[str], optional - :param actor_token_type: The type of `actor_token` passed in. - - Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` - as the `grant_type`., defaults to None - :type actor_token_type: Optional[PostOAuth2TokenActorTokenTypeField], optional - :param scope: The space-delimited list of scopes that you want apply to the - new access token. - - The `subject_token` will need to have all of these scopes or - the call will error with **401 Unauthorized**., defaults to None - :type scope: Optional[str], optional - :param resource: Full URL for the file that the token should be generated for., defaults to None - :type resource: Optional[str], optional - :param box_subject_type: Used in combination with `client_credentials` as the `grant_type`., defaults to None - :type box_subject_type: Optional[PostOAuth2TokenBoxSubjectTypeField], optional - :param box_subject_id: Used in combination with `client_credentials` as the `grant_type`. - Value is determined by `box_subject_type`. If `user` use user ID and if - `enterprise` use enterprise ID., defaults to None - :type box_subject_id: Optional[str], optional - :param box_shared_link: Full URL of the shared link on the file or folder - that the token should be generated for., defaults to None - :type box_shared_link: Optional[str], optional - """ - super().__init__(**kwargs) - self.grant_type = grant_type - self.client_id = client_id - self.client_secret = client_secret - self.code = code - self.refresh_token = refresh_token - self.assertion = assertion - self.subject_token = subject_token - self.subject_token_type = subject_token_type - self.actor_token = actor_token - self.actor_token_type = actor_token_type - self.scope = scope - self.resource = resource - self.box_subject_type = box_subject_type - self.box_subject_id = box_subject_id - self.box_shared_link = box_shared_link - - -class PostOAuth2TokenRefreshAccessTokenGrantTypeField(str, Enum): - REFRESH_TOKEN = 'refresh_token' - - -class PostOAuth2TokenRefreshAccessToken(BaseObject): - def __init__( - self, - client_id: str, - client_secret: str, - refresh_token: str, - *, - grant_type: PostOAuth2TokenRefreshAccessTokenGrantTypeField = PostOAuth2TokenRefreshAccessTokenGrantTypeField.REFRESH_TOKEN.value, - **kwargs - ): - """ - :param client_id: The client ID of the application requesting to refresh the token. - :type client_id: str - :param client_secret: The client secret of the application requesting to refresh the token. - :type client_secret: str - :param refresh_token: The refresh token to refresh. - :type refresh_token: str - :param grant_type: The type of request being made, in this case a refresh request., defaults to PostOAuth2TokenRefreshAccessTokenGrantTypeField.REFRESH_TOKEN.value - :type grant_type: PostOAuth2TokenRefreshAccessTokenGrantTypeField, optional - """ - super().__init__(**kwargs) - self.client_id = client_id - self.client_secret = client_secret - self.refresh_token = refresh_token - self.grant_type = grant_type - - -class PostOAuth2Revoke(BaseObject): - def __init__( - self, - *, - client_id: Optional[str] = None, - client_secret: Optional[str] = None, - token: Optional[str] = None, - **kwargs - ): - """ - :param client_id: The Client ID of the application requesting to revoke the - access token., defaults to None - :type client_id: Optional[str], optional - :param client_secret: The client secret of the application requesting to revoke - an access token., defaults to None - :type client_secret: Optional[str], optional - :param token: The access token to revoke., defaults to None - :type token: Optional[str], optional - """ - super().__init__(**kwargs) - self.client_id = client_id - self.client_secret = client_secret - self.token = token - - -class ZipDownloadRequestItemsTypeField(str, Enum): - FILE = 'file' - FOLDER = 'folder' - - -class ZipDownloadRequestItemsField(BaseObject): - _discriminator = 'type', {'file', 'folder'} - - def __init__(self, type: ZipDownloadRequestItemsTypeField, id: str, **kwargs): - """ - :param type: The type of the item to add to the archive. - :type type: ZipDownloadRequestItemsTypeField - :param id: The identifier of the item to add to the archive. When this item is - a folder then this can not be the root folder with ID `0`. - :type id: str - """ - super().__init__(**kwargs) - self.type = type - self.id = id - - -class ZipDownloadRequest(BaseObject): - def __init__( - self, - items: List[ZipDownloadRequestItemsField], - *, - download_file_name: Optional[str] = None, - **kwargs - ): - """ - :param items: A list of items to add to the `zip` archive. These can - be folders or files. - :type items: List[ZipDownloadRequestItemsField] - :param download_file_name: The optional name of the `zip` archive. This name will be appended by the - `.zip` file extension, for example `January Financials.zip`., defaults to None - :type download_file_name: Optional[str], optional - """ - super().__init__(**kwargs) - self.items = items - self.download_file_name = download_file_name - - -class MetadataQueryOrderByDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class MetadataQueryOrderByField(BaseObject): - def __init__( - self, - *, - field_key: Optional[str] = None, - direction: Optional[MetadataQueryOrderByDirectionField] = None, - **kwargs - ): - """ - :param field_key: The metadata template field to order by. - - The `field_key` represents the `key` value of a field from the - metadata template being searched for., defaults to None - :type field_key: Optional[str], optional - :param direction: The direction to order by, either ascending or descending. - - The `ordering` direction must be the same for each item in the - array., defaults to None - :type direction: Optional[MetadataQueryOrderByDirectionField], optional - """ - super().__init__(**kwargs) - self.field_key = field_key - self.direction = direction - - -class MetadataQuery(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'from_': 'from', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'from': 'from_', - **BaseObject._json_to_fields_mapping, - } - - def __init__( - self, - from_: str, - ancestor_folder_id: str, - *, - query: Optional[str] = None, - query_params: Optional[Dict[str, str]] = None, - order_by: Optional[List[MetadataQueryOrderByField]] = None, - limit: Optional[int] = None, - marker: Optional[str] = None, - fields: Optional[List[str]] = None, - **kwargs - ): - """ - :param from_: Specifies the template used in the query. Must be in the form - `scope.templateKey`. Not all templates can be used in this field, - most notably the built-in, Box-provided classification templates - can not be used in a query. - :type from_: str - :param ancestor_folder_id: The ID of the folder that you are restricting the query to. A - value of zero will return results from all folders you have access - to. A non-zero value will only return results found in the folder - corresponding to the ID or in any of its subfolders. - :type ancestor_folder_id: str - :param query: The query to perform. A query is a logical expression that is very similar - to a SQL `SELECT` statement. Values in the search query can be turned into - parameters specified in the `query_param` arguments list to prevent having - to manually insert search values into the query string. - - For example, a value of `:amount` would represent the `amount` value in - `query_params` object., defaults to None - :type query: Optional[str], optional - :param query_params: Set of arguments corresponding to the parameters specified in the - `query`. The type of each parameter used in the `query_params` must match - the type of the corresponding metadata template field., defaults to None - :type query_params: Optional[Dict[str, str]], optional - :param order_by: A list of template fields and directions to sort the metadata query - results by. - - The ordering `direction` must be the same for each item in the array., defaults to None - :type order_by: Optional[List[MetadataQueryOrderByField]], optional - :param limit: A value between 0 and 100 that indicates the maximum number of results - to return for a single request. This only specifies a maximum - boundary and will not guarantee the minimum number of results - returned., defaults to None - :type limit: Optional[int], optional - :param marker: Marker to use for requesting the next page., defaults to None - :type marker: Optional[str], optional - :param fields: By default, this endpoint returns only the most basic info about the items for - which the query matches. This attribute can be used to specify a list of - additional attributes to return for any item, including its metadata. - - This attribute takes a list of item fields, metadata template identifiers, - or metadata template field identifiers. - - For example: - - * `created_by` will add the details of the user who created the item to - the response. - * `metadata..` will return the mini-representation - of the metadata instance identified by the `scope` and `templateKey`. - * `metadata...` will return all the mini-representation - of the metadata instance identified by the `scope` and `templateKey` plus - the field specified by the `field` name. Multiple fields for the same - `scope` and `templateKey` can be defined., defaults to None - :type fields: Optional[List[str]], optional - """ - super().__init__(**kwargs) - self.from_ = from_ - self.ancestor_folder_id = ancestor_folder_id - self.query = query - self.query_params = query_params - self.order_by = order_by - self.limit = limit - self.marker = marker - self.fields = fields - - -class FileRequestUpdateRequestStatusField(str, Enum): - ACTIVE = 'active' - INACTIVE = 'inactive' - - -class FileRequestUpdateRequest(BaseObject): - def __init__( - self, - *, - title: Optional[str] = None, - description: Optional[str] = None, - status: Optional[FileRequestUpdateRequestStatusField] = None, - is_email_required: Optional[bool] = None, - is_description_required: Optional[bool] = None, - expires_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param title: An optional new title for the file request. This can be - used to change the title of the file request. - - This will default to the value on the existing file request., defaults to None - :type title: Optional[str], optional - :param description: An optional new description for the file request. This can be - used to change the description of the file request. - - This will default to the value on the existing file request., defaults to None - :type description: Optional[str], optional - :param status: An optional new status of the file request. - - When the status is set to `inactive`, the file request - will no longer accept new submissions, and any visitor - to the file request URL will receive a `HTTP 404` status - code. - - This will default to the value on the existing file request., defaults to None - :type status: Optional[FileRequestUpdateRequestStatusField], optional - :param is_email_required: Whether a file request submitter is required to provide - their email address. - - When this setting is set to true, the Box UI will show - an email field on the file request form. - - This will default to the value on the existing file request., defaults to None - :type is_email_required: Optional[bool], optional - :param is_description_required: Whether a file request submitter is required to provide - a description of the files they are submitting. - - When this setting is set to true, the Box UI will show - a description field on the file request form. - - This will default to the value on the existing file request., defaults to None - :type is_description_required: Optional[bool], optional - :param expires_at: The date after which a file request will no longer accept new - submissions. - - After this date, the `status` will automatically be set to - `inactive`. - - This will default to the value on the existing file request., defaults to None - :type expires_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.title = title - self.description = description - self.status = status - self.is_email_required = is_email_required - self.is_description_required = is_description_required - self.expires_at = expires_at - - -class FileRequestCopyRequestFolderTypeField(str, Enum): - FOLDER = 'folder' - - -class FileRequestCopyRequestFolderField(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - id: str, - *, - type: Optional[FileRequestCopyRequestFolderTypeField] = None, - **kwargs - ): - """ - :param id: The ID of the folder to associate the new - file request to. - :type id: str - :param type: `folder`, defaults to None - :type type: Optional[FileRequestCopyRequestFolderTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class FileRequestCopyRequest(FileRequestUpdateRequest): - def __init__( - self, - folder: FileRequestCopyRequestFolderField, - *, - title: Optional[str] = None, - description: Optional[str] = None, - status: Optional[FileRequestUpdateRequestStatusField] = None, - is_email_required: Optional[bool] = None, - is_description_required: Optional[bool] = None, - expires_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param folder: The folder to associate the new file request to. - :type folder: FileRequestCopyRequestFolderField - :param title: An optional new title for the file request. This can be - used to change the title of the file request. - - This will default to the value on the existing file request., defaults to None - :type title: Optional[str], optional - :param description: An optional new description for the file request. This can be - used to change the description of the file request. - - This will default to the value on the existing file request., defaults to None - :type description: Optional[str], optional - :param status: An optional new status of the file request. - - When the status is set to `inactive`, the file request - will no longer accept new submissions, and any visitor - to the file request URL will receive a `HTTP 404` status - code. - - This will default to the value on the existing file request., defaults to None - :type status: Optional[FileRequestUpdateRequestStatusField], optional - :param is_email_required: Whether a file request submitter is required to provide - their email address. - - When this setting is set to true, the Box UI will show - an email field on the file request form. - - This will default to the value on the existing file request., defaults to None - :type is_email_required: Optional[bool], optional - :param is_description_required: Whether a file request submitter is required to provide - a description of the files they are submitting. - - When this setting is set to true, the Box UI will show - a description field on the file request form. - - This will default to the value on the existing file request., defaults to None - :type is_description_required: Optional[bool], optional - :param expires_at: The date after which a file request will no longer accept new - submissions. - - After this date, the `status` will automatically be set to - `inactive`. - - This will default to the value on the existing file request., defaults to None - :type expires_at: Optional[DateTime], optional - """ - super().__init__( - title=title, - description=description, - status=status, - is_email_required=is_email_required, - is_description_required=is_description_required, - expires_at=expires_at, - **kwargs - ) - self.folder = folder - - -class ClientErrorTypeField(str, Enum): - ERROR = 'error' - - -class ClientErrorCodeField(str, Enum): - CREATED = 'created' - ACCEPTED = 'accepted' - NO_CONTENT = 'no_content' - REDIRECT = 'redirect' - NOT_MODIFIED = 'not_modified' - BAD_REQUEST = 'bad_request' - UNAUTHORIZED = 'unauthorized' - FORBIDDEN = 'forbidden' - NOT_FOUND = 'not_found' - METHOD_NOT_ALLOWED = 'method_not_allowed' - CONFLICT = 'conflict' - PRECONDITION_FAILED = 'precondition_failed' - TOO_MANY_REQUESTS = 'too_many_requests' - INTERNAL_SERVER_ERROR = 'internal_server_error' - UNAVAILABLE = 'unavailable' - ITEM_NAME_INVALID = 'item_name_invalid' - INSUFFICIENT_SCOPE = 'insufficient_scope' - - -class ClientErrorContextInfoField(BaseObject): - def __init__(self, *, message: Optional[str] = None, **kwargs): - """ - :param message: More details on the error., defaults to None - :type message: Optional[str], optional - """ - super().__init__(**kwargs) - self.message = message - - -class ClientError(BaseObject): - _discriminator = 'type', {'error'} - - def __init__( - self, - *, - type: Optional[ClientErrorTypeField] = None, - status: Optional[int] = None, - code: Optional[ClientErrorCodeField] = None, - message: Optional[str] = None, - context_info: Optional[ClientErrorContextInfoField] = None, - help_url: Optional[str] = None, - request_id: Optional[str] = None, - **kwargs - ): - """ - :param type: error, defaults to None - :type type: Optional[ClientErrorTypeField], optional - :param status: The HTTP status of the response., defaults to None - :type status: Optional[int], optional - :param code: A Box-specific error code, defaults to None - :type code: Optional[ClientErrorCodeField], optional - :param message: A short message describing the error., defaults to None - :type message: Optional[str], optional - :param context_info: A free-form object that contains additional context - about the error. The possible fields are defined on - a per-endpoint basis. `message` is only one example., defaults to None - :type context_info: Optional[ClientErrorContextInfoField], optional - :param help_url: A URL that links to more information about why this error occurred., defaults to None - :type help_url: Optional[str], optional - :param request_id: A unique identifier for this response, which can be used - when contacting Box support., defaults to None - :type request_id: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.status = status - self.code = code - self.message = message - self.context_info = context_info - self.help_url = help_url - self.request_id = request_id - - -class OAuth2Error(BaseObject): - def __init__( - self, - *, - error: Optional[str] = None, - error_description: Optional[str] = None, - **kwargs - ): - """ - :param error: The type of the error returned., defaults to None - :type error: Optional[str], optional - :param error_description: The type of the error returned., defaults to None - :type error_description: Optional[str], optional - """ - super().__init__(**kwargs) - self.error = error - self.error_description = error_description - - -class AiResponse(BaseObject): - def __init__( - self, - answer: str, - created_at: DateTime, - *, - completion_reason: Optional[str] = None, - **kwargs - ): - """ - :param answer: The answer provided by the LLM. - :type answer: str - :param created_at: The ISO date formatted timestamp of when the answer to the prompt was created. - :type created_at: DateTime - :param completion_reason: The reason the response finishes., defaults to None - :type completion_reason: Optional[str], optional - """ - super().__init__(**kwargs) - self.answer = answer - self.created_at = created_at - self.completion_reason = completion_reason - - -class ClassificationTemplateField(str, Enum): - SECURITYCLASSIFICATION_6VMVOCHWUWO = 'securityClassification-6VMVochwUWo' - - -class Classification(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'box_security_classification_key': 'Box__Security__Classification__Key', - 'parent': '$parent', - 'template': '$template', - 'scope': '$scope', - 'version': '$version', - 'type': '$type', - 'type_version': '$typeVersion', - 'can_edit': '$canEdit', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'Box__Security__Classification__Key': 'box_security_classification_key', - '$parent': 'parent', - '$template': 'template', - '$scope': 'scope', - '$version': 'version', - '$type': 'type', - '$typeVersion': 'type_version', - '$canEdit': 'can_edit', - **BaseObject._json_to_fields_mapping, - } - - def __init__( - self, - *, - box_security_classification_key: Optional[str] = None, - parent: Optional[str] = None, - template: Optional[ClassificationTemplateField] = None, - scope: Optional[str] = None, - version: Optional[int] = None, - type: Optional[str] = None, - type_version: Optional[float] = None, - can_edit: Optional[bool] = None, - **kwargs - ): - """ - :param box_security_classification_key: The name of the classification applied to the item., defaults to None - :type box_security_classification_key: Optional[str], optional - :param parent: The identifier of the item that this metadata instance - has been attached to. This combines the `type` and the `id` - of the parent in the form `{type}_{id}`., defaults to None - :type parent: Optional[str], optional - :param template: `securityClassification-6VMVochwUWo`, defaults to None - :type template: Optional[ClassificationTemplateField], optional - :param scope: The scope of the enterprise that this classification has been - applied for. - - This will be in the format `enterprise_{enterprise_id}`., defaults to None - :type scope: Optional[str], optional - :param version: The version of the metadata instance. This version starts at 0 and - increases every time a classification is updated., defaults to None - :type version: Optional[int], optional - :param type: The unique ID of this classification instance. This will be include - the name of the classification template and a unique ID., defaults to None - :type type: Optional[str], optional - :param type_version: The version of the metadata template. This version starts at 0 and - increases every time the template is updated. This is mostly for internal - use., defaults to None - :type type_version: Optional[float], optional - :param can_edit: Whether an end user can change the classification., defaults to None - :type can_edit: Optional[bool], optional - """ - super().__init__(**kwargs) - self.box_security_classification_key = box_security_classification_key - self.parent = parent - self.template = template - self.scope = scope - self.version = version - self.type = type - self.type_version = type_version - self.can_edit = can_edit - - -class ClassificationTemplateTypeField(str, Enum): - METADATA_TEMPLATE = 'metadata_template' - - -class ClassificationTemplateTemplateKeyField(str, Enum): - SECURITYCLASSIFICATION_6VMVOCHWUWO = 'securityClassification-6VMVochwUWo' - - -class ClassificationTemplateDisplayNameField(str, Enum): - CLASSIFICATION = 'Classification' - - -class ClassificationTemplateFieldsTypeField(str, Enum): - ENUM = 'enum' - - -class ClassificationTemplateFieldsKeyField(str, Enum): - BOX__SECURITY__CLASSIFICATION__KEY = 'Box__Security__Classification__Key' - - -class ClassificationTemplateFieldsDisplayNameField(str, Enum): - CLASSIFICATION = 'Classification' - - -class ClassificationTemplateFieldsOptionsStaticConfigClassificationField(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'classification_definition': 'classificationDefinition', - 'color_id': 'colorID', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'classificationDefinition': 'classification_definition', - 'colorID': 'color_id', - **BaseObject._json_to_fields_mapping, - } - - def __init__( - self, - *, - classification_definition: Optional[str] = None, - color_id: Optional[int] = None, - **kwargs - ): - """ - :param classification_definition: A longer description of the classification., defaults to None - :type classification_definition: Optional[str], optional - :param color_id: An internal Box identifier used to assign a color to - a classification label. - - Mapping between a `colorID` and a color may change - without notice. Currently, the color mappings are as - follows. - - * `0`: Yellow - * `1`: Orange - * `2`: Watermelon red - * `3`: Purple rain - * `4`: Light blue - * `5`: Dark blue - * `6`: Light green - * `7`: Gray, defaults to None - :type color_id: Optional[int], optional - """ - super().__init__(**kwargs) - self.classification_definition = classification_definition - self.color_id = color_id - - -class ClassificationTemplateFieldsOptionsStaticConfigField(BaseObject): - def __init__( - self, - *, - classification: Optional[ - ClassificationTemplateFieldsOptionsStaticConfigClassificationField - ] = None, - **kwargs - ): - """ - :param classification: Additional information about the classification. - - This is not an exclusive list of properties, and - more object fields might be returned. These fields - are used for internal Box Shield and Box Governance - purposes and no additional value must be derived from - these fields., defaults to None - :type classification: Optional[ClassificationTemplateFieldsOptionsStaticConfigClassificationField], optional - """ - super().__init__(**kwargs) - self.classification = classification - - -class ClassificationTemplateFieldsOptionsField(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'static_config': 'staticConfig', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'staticConfig': 'static_config', - **BaseObject._json_to_fields_mapping, - } - - def __init__( - self, - id: str, - key: str, - *, - static_config: Optional[ - ClassificationTemplateFieldsOptionsStaticConfigField - ] = None, - **kwargs - ): - """ - :param id: The unique ID of this classification. - :type id: str - :param key: The display name and key for this classification. - :type key: str - :param static_config: Additional information about the classification., defaults to None - :type static_config: Optional[ClassificationTemplateFieldsOptionsStaticConfigField], optional - """ - super().__init__(**kwargs) - self.id = id - self.key = key - self.static_config = static_config - - -class ClassificationTemplateFieldsField(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'display_name': 'displayName', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'displayName': 'display_name', - **BaseObject._json_to_fields_mapping, - } - _discriminator = 'type', {'enum'} - - def __init__( - self, - id: str, - options: List[ClassificationTemplateFieldsOptionsField], - *, - type: ClassificationTemplateFieldsTypeField = ClassificationTemplateFieldsTypeField.ENUM.value, - key: ClassificationTemplateFieldsKeyField = ClassificationTemplateFieldsKeyField.BOX__SECURITY__CLASSIFICATION__KEY.value, - display_name: ClassificationTemplateFieldsDisplayNameField = ClassificationTemplateFieldsDisplayNameField.CLASSIFICATION.value, - hidden: Optional[bool] = None, - **kwargs - ): - """ - :param id: The unique ID of the field. - :type id: str - :param options: A list of classifications available in this enterprise. - :type options: List[ClassificationTemplateFieldsOptionsField] - :param type: The array item type., defaults to ClassificationTemplateFieldsTypeField.ENUM.value - :type type: ClassificationTemplateFieldsTypeField, optional - :param key: Defines classifications - available in the enterprise., defaults to ClassificationTemplateFieldsKeyField.BOX__SECURITY__CLASSIFICATION__KEY.value - :type key: ClassificationTemplateFieldsKeyField, optional - :param display_name: `Classification`, defaults to ClassificationTemplateFieldsDisplayNameField.CLASSIFICATION.value - :type display_name: ClassificationTemplateFieldsDisplayNameField, optional - :param hidden: Classifications are always visible to web and mobile users., defaults to None - :type hidden: Optional[bool], optional - """ - super().__init__(**kwargs) - self.id = id - self.options = options - self.type = type - self.key = key - self.display_name = display_name - self.hidden = hidden - - -class ClassificationTemplate(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'template_key': 'templateKey', - 'display_name': 'displayName', - 'copy_instance_on_item_copy': 'copyInstanceOnItemCopy', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'templateKey': 'template_key', - 'displayName': 'display_name', - 'copyInstanceOnItemCopy': 'copy_instance_on_item_copy', - **BaseObject._json_to_fields_mapping, - } - _discriminator = 'type', {'metadata_template'} - - def __init__( - self, - id: str, - scope: str, - fields: List[ClassificationTemplateFieldsField], - *, - type: ClassificationTemplateTypeField = ClassificationTemplateTypeField.METADATA_TEMPLATE.value, - template_key: ClassificationTemplateTemplateKeyField = ClassificationTemplateTemplateKeyField.SECURITYCLASSIFICATION_6VMVOCHWUWO.value, - display_name: ClassificationTemplateDisplayNameField = ClassificationTemplateDisplayNameField.CLASSIFICATION.value, - hidden: Optional[bool] = None, - copy_instance_on_item_copy: Optional[bool] = None, - **kwargs - ): - """ - :param id: The ID of the classification template. - :type id: str - :param scope: The scope of the classification template. This is in the format - `enterprise_{id}` where the `id` is the enterprise ID. - :type scope: str - :param fields: A list of fields for this classification template. This includes - only one field, the `Box__Security__Classification__Key`, which defines - the different classifications available in this enterprise. - :type fields: List[ClassificationTemplateFieldsField] - :param type: `metadata_template`, defaults to ClassificationTemplateTypeField.METADATA_TEMPLATE.value - :type type: ClassificationTemplateTypeField, optional - :param template_key: `securityClassification-6VMVochwUWo`, defaults to ClassificationTemplateTemplateKeyField.SECURITYCLASSIFICATION_6VMVOCHWUWO.value - :type template_key: ClassificationTemplateTemplateKeyField, optional - :param display_name: The name of this template as shown in web and mobile interfaces., defaults to ClassificationTemplateDisplayNameField.CLASSIFICATION.value - :type display_name: ClassificationTemplateDisplayNameField, optional - :param hidden: Determines if the - template is always available in web and mobile interfaces., defaults to None - :type hidden: Optional[bool], optional - :param copy_instance_on_item_copy: Determines if - classifications are - copied along when the file or folder is - copied., defaults to None - :type copy_instance_on_item_copy: Optional[bool], optional - """ - super().__init__(**kwargs) - self.id = id - self.scope = scope - self.fields = fields - self.type = type - self.template_key = template_key - self.display_name = display_name - self.hidden = hidden - self.copy_instance_on_item_copy = copy_instance_on_item_copy - - -class CollaborationAllowlistEntryTypeField(str, Enum): - COLLABORATION_WHITELIST_ENTRY = 'collaboration_whitelist_entry' - - -class CollaborationAllowlistEntryDirectionField(str, Enum): - INBOUND = 'inbound' - OUTBOUND = 'outbound' - BOTH = 'both' - - -class CollaborationAllowlistEntryEnterpriseTypeField(str, Enum): - ENTERPRISE = 'enterprise' - - -class CollaborationAllowlistEntryEnterpriseField(BaseObject): - _discriminator = 'type', {'enterprise'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[CollaborationAllowlistEntryEnterpriseTypeField] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this enterprise., defaults to None - :type id: Optional[str], optional - :param type: `enterprise`, defaults to None - :type type: Optional[CollaborationAllowlistEntryEnterpriseTypeField], optional - :param name: The name of the enterprise, defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - - -class CollaborationAllowlistEntry(BaseObject): - _discriminator = 'type', {'collaboration_whitelist_entry'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[CollaborationAllowlistEntryTypeField] = None, - domain: Optional[str] = None, - direction: Optional[CollaborationAllowlistEntryDirectionField] = None, - enterprise: Optional[CollaborationAllowlistEntryEnterpriseField] = None, - created_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param id: The unique identifier for this entry, defaults to None - :type id: Optional[str], optional - :param type: `collaboration_whitelist_entry`, defaults to None - :type type: Optional[CollaborationAllowlistEntryTypeField], optional - :param domain: The whitelisted domain, defaults to None - :type domain: Optional[str], optional - :param direction: The direction of the collaborations to allow., defaults to None - :type direction: Optional[CollaborationAllowlistEntryDirectionField], optional - :param created_at: The time the entry was created at, defaults to None - :type created_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.domain = domain - self.direction = direction - self.enterprise = enterprise - self.created_at = created_at - - -class CollaborationAllowlistEntries(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[CollaborationAllowlistEntry]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of allowed collaboration domains, defaults to None - :type entries: Optional[List[CollaborationAllowlistEntry]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class CollectionTypeField(str, Enum): - COLLECTION = 'collection' - - -class CollectionNameField(str, Enum): - FAVORITES = 'Favorites' - - -class CollectionCollectionTypeField(str, Enum): - FAVORITES = 'favorites' - - -class Collection(BaseObject): - _discriminator = 'type', {'collection'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[CollectionTypeField] = None, - name: Optional[CollectionNameField] = None, - collection_type: Optional[CollectionCollectionTypeField] = None, - **kwargs - ): - """ - :param id: The unique identifier for this collection., defaults to None - :type id: Optional[str], optional - :param type: `collection`, defaults to None - :type type: Optional[CollectionTypeField], optional - :param name: The name of the collection., defaults to None - :type name: Optional[CollectionNameField], optional - :param collection_type: The type of the collection. This is used to - determine the proper visual treatment for - collections., defaults to None - :type collection_type: Optional[CollectionCollectionTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - self.collection_type = collection_type - - -class CollectionsOrderDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class CollectionsOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[str] = None, - direction: Optional[CollectionsOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field to order by, defaults to None - :type by: Optional[str], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[CollectionsOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class Collections(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - order: Optional[List[CollectionsOrderField]] = None, - entries: Optional[List[Collection]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type offset: Optional[int], optional - :param order: The order by which items are returned. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type order: Optional[List[CollectionsOrderField]], optional - :param entries: A list of collections, defaults to None - :type entries: Optional[List[Collection]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.order = order - self.entries = entries - - -class CommentBaseTypeField(str, Enum): - COMMENT = 'comment' - - -class CommentBase(BaseObject): - _discriminator = 'type', {'comment'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[CommentBaseTypeField] = None, - **kwargs - ): - """ - :param id: The unique identifier for this comment., defaults to None - :type id: Optional[str], optional - :param type: `comment`, defaults to None - :type type: Optional[CommentBaseTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class EmailAliasTypeField(str, Enum): - EMAIL_ALIAS = 'email_alias' - - -class EmailAlias(BaseObject): - _discriminator = 'type', {'email_alias'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[EmailAliasTypeField] = None, - email: Optional[str] = None, - is_confirmed: Optional[bool] = None, - **kwargs - ): - """ - :param id: The unique identifier for this object, defaults to None - :type id: Optional[str], optional - :param type: `email_alias`, defaults to None - :type type: Optional[EmailAliasTypeField], optional - :param email: The email address, defaults to None - :type email: Optional[str], optional - :param is_confirmed: Whether the email address has been confirmed, defaults to None - :type is_confirmed: Optional[bool], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.email = email - self.is_confirmed = is_confirmed - - -class EmailAliases(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - entries: Optional[List[EmailAlias]] = None, - **kwargs - ): - """ - :param total_count: The number of email aliases., defaults to None - :type total_count: Optional[int], optional - :param entries: A list of email aliases, defaults to None - :type entries: Optional[List[EmailAlias]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class EnterpriseBaseTypeField(str, Enum): - ENTERPRISE = 'enterprise' - - -class EnterpriseBase(BaseObject): - _discriminator = 'type', {'enterprise'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[EnterpriseBaseTypeField] = None, - **kwargs - ): - """ - :param id: The unique identifier for this enterprise, defaults to None - :type id: Optional[str], optional - :param type: `enterprise`, defaults to None - :type type: Optional[EnterpriseBaseTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class FileBaseTypeField(str, Enum): - FILE = 'file' - - -class FileBase(BaseObject): - _discriminator = 'type', {'file'} - - def __init__( - self, - id: str, - *, - etag: Optional[str] = None, - type: FileBaseTypeField = FileBaseTypeField.FILE.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a file. - - The ID for any file can be determined - by visiting a file in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/files/123` - the `file_id` is `123`. - :type id: str - :param etag: The HTTP `etag` of this file. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the file if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `file`, defaults to FileBaseTypeField.FILE.value - :type type: FileBaseTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.etag = etag - self.type = type - - -class FileVersionBaseTypeField(str, Enum): - FILE_VERSION = 'file_version' - - -class FileVersionBase(BaseObject): - _discriminator = 'type', {'file_version'} - - def __init__( - self, - id: str, - *, - type: FileVersionBaseTypeField = FileVersionBaseTypeField.FILE_VERSION.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a file version. - :type id: str - :param type: `file_version`, defaults to FileVersionBaseTypeField.FILE_VERSION.value - :type type: FileVersionBaseTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class FileVersionMini(FileVersionBase): - _fields_to_json_mapping: Dict[str, str] = { - 'sha_1': 'sha1', - **FileVersionBase._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'sha1': 'sha_1', - **FileVersionBase._json_to_fields_mapping, - } - - def __init__( - self, - id: str, - *, - sha_1: Optional[str] = None, - type: FileVersionBaseTypeField = FileVersionBaseTypeField.FILE_VERSION.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a file version. - :type id: str - :param sha_1: The SHA1 hash of this version of the file., defaults to None - :type sha_1: Optional[str], optional - :param type: `file_version`, defaults to FileVersionBaseTypeField.FILE_VERSION.value - :type type: FileVersionBaseTypeField, optional - """ - super().__init__(id=id, type=type, **kwargs) - self.sha_1 = sha_1 - - -class FileMini(FileBase): - _fields_to_json_mapping: Dict[str, str] = { - 'sha_1': 'sha1', - **FileBase._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'sha1': 'sha_1', - **FileBase._json_to_fields_mapping, - } - - def __init__( - self, - id: str, - *, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - sha_1: Optional[str] = None, - file_version: Optional[FileVersionMini] = None, - etag: Optional[str] = None, - type: FileBaseTypeField = FileBaseTypeField.FILE.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a file. - - The ID for any file can be determined - by visiting a file in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/files/123` - the `file_id` is `123`. - :type id: str - :param name: The name of the file, defaults to None - :type name: Optional[str], optional - :param sha_1: The SHA1 hash of the file. This can be used to compare the contents - of a file on Box with a local file., defaults to None - :type sha_1: Optional[str], optional - :param etag: The HTTP `etag` of this file. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the file if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `file`, defaults to FileBaseTypeField.FILE.value - :type type: FileBaseTypeField, optional - """ - super().__init__(id=id, etag=etag, type=type, **kwargs) - self.sequence_id = sequence_id - self.name = name - self.sha_1 = sha_1 - self.file_version = file_version - - -class FilesUnderRetention(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[FileMini]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of files, defaults to None - :type entries: Optional[List[FileMini]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class FileConflict(FileMini): - def __init__( - self, - id: str, - *, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - sha_1: Optional[str] = None, - file_version: Optional[FileVersionMini] = None, - etag: Optional[str] = None, - type: FileBaseTypeField = FileBaseTypeField.FILE.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a file. - - The ID for any file can be determined - by visiting a file in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/files/123` - the `file_id` is `123`. - :type id: str - :param name: The name of the file, defaults to None - :type name: Optional[str], optional - :param sha_1: The SHA1 hash of the file. This can be used to compare the contents - of a file on Box with a local file., defaults to None - :type sha_1: Optional[str], optional - :param etag: The HTTP `etag` of this file. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the file if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `file`, defaults to FileBaseTypeField.FILE.value - :type type: FileBaseTypeField, optional - """ - super().__init__( - id=id, - sequence_id=sequence_id, - name=name, - sha_1=sha_1, - file_version=file_version, - etag=etag, - type=type, - **kwargs - ) - - -class ConflictErrorContextInfoField(BaseObject): - def __init__(self, *, conflicts: Optional[List[FileConflict]] = None, **kwargs): - """ - :param conflicts: A list of the file conflicts that caused this error., defaults to None - :type conflicts: Optional[List[FileConflict]], optional - """ - super().__init__(**kwargs) - self.conflicts = conflicts - - -class ConflictError(ClientError): - def __init__( - self, - *, - type: Optional[ClientErrorTypeField] = None, - status: Optional[int] = None, - code: Optional[ClientErrorCodeField] = None, - message: Optional[str] = None, - context_info: Optional[ClientErrorContextInfoField] = None, - help_url: Optional[str] = None, - request_id: Optional[str] = None, - **kwargs - ): - """ - :param type: error, defaults to None - :type type: Optional[ClientErrorTypeField], optional - :param status: The HTTP status of the response., defaults to None - :type status: Optional[int], optional - :param code: A Box-specific error code, defaults to None - :type code: Optional[ClientErrorCodeField], optional - :param message: A short message describing the error., defaults to None - :type message: Optional[str], optional - :param context_info: A free-form object that contains additional context - about the error. The possible fields are defined on - a per-endpoint basis. `message` is only one example., defaults to None - :type context_info: Optional[ClientErrorContextInfoField], optional - :param help_url: A URL that links to more information about why this error occurred., defaults to None - :type help_url: Optional[str], optional - :param request_id: A unique identifier for this response, which can be used - when contacting Box support., defaults to None - :type request_id: Optional[str], optional - """ - super().__init__( - type=type, - status=status, - code=code, - message=message, - context_info=context_info, - help_url=help_url, - request_id=request_id, - **kwargs - ) - - -class FolderBaseTypeField(str, Enum): - FOLDER = 'folder' - - -class FolderBase(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - id: str, - *, - etag: Optional[str] = None, - type: FolderBaseTypeField = FolderBaseTypeField.FOLDER.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a folder. - - The ID for any folder can be determined - by visiting a folder in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/folders/123` - the `folder_id` is `123`. - :type id: str - :param etag: The HTTP `etag` of this folder. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the folder if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `folder`, defaults to FolderBaseTypeField.FOLDER.value - :type type: FolderBaseTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.etag = etag - self.type = type - - -class FolderMini(FolderBase): - def __init__( - self, - id: str, - *, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: FolderBaseTypeField = FolderBaseTypeField.FOLDER.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a folder. - - The ID for any folder can be determined - by visiting a folder in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/folders/123` - the `folder_id` is `123`. - :type id: str - :param name: The name of the folder., defaults to None - :type name: Optional[str], optional - :param etag: The HTTP `etag` of this folder. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the folder if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `folder`, defaults to FolderBaseTypeField.FOLDER.value - :type type: FolderBaseTypeField, optional - """ - super().__init__(id=id, etag=etag, type=type, **kwargs) - self.sequence_id = sequence_id - self.name = name - - -class FileOrFolderScopeScopeField(str, Enum): - ANNOTATION_EDIT = 'annotation_edit' - ANNOTATION_VIEW_ALL = 'annotation_view_all' - ANNOTATION_VIEW_SELF = 'annotation_view_self' - BASE_EXPLORER = 'base_explorer' - BASE_PICKER = 'base_picker' - BASE_PREVIEW = 'base_preview' - BASE_UPLOAD = 'base_upload' - ITEM_DELETE = 'item_delete' - ITEM_DOWNLOAD = 'item_download' - ITEM_PREVIEW = 'item_preview' - ITEM_RENAME = 'item_rename' - ITEM_SHARE = 'item_share' - - -class FileOrFolderScope(BaseObject): - def __init__( - self, - *, - scope: Optional[FileOrFolderScopeScopeField] = None, - object: Optional[Union[FolderMini, FileMini]] = None, - **kwargs - ): - """ - :param scope: The scopes for the resource access, defaults to None - :type scope: Optional[FileOrFolderScopeScopeField], optional - """ - super().__init__(**kwargs) - self.scope = scope - self.object = object - - -class AccessTokenTokenTypeField(str, Enum): - BEARER = 'bearer' - - -class AccessTokenIssuedTokenTypeField(str, Enum): - URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN = ( - 'urn:ietf:params:oauth:token-type:access_token' - ) - - -class AccessToken(BaseObject): - def __init__( - self, - *, - access_token: Optional[str] = None, - expires_in: Optional[int] = None, - token_type: Optional[AccessTokenTokenTypeField] = None, - restricted_to: Optional[List[FileOrFolderScope]] = None, - refresh_token: Optional[str] = None, - issued_token_type: Optional[AccessTokenIssuedTokenTypeField] = None, - **kwargs - ): - """ - :param access_token: The requested access token., defaults to None - :type access_token: Optional[str], optional - :param expires_in: The time in seconds by which this token will expire., defaults to None - :type expires_in: Optional[int], optional - :param token_type: The type of access token returned., defaults to None - :type token_type: Optional[AccessTokenTokenTypeField], optional - :param restricted_to: The permissions that this access token permits, - providing a list of resources (files, folders, etc) - and the scopes permitted for each of those resources., defaults to None - :type restricted_to: Optional[List[FileOrFolderScope]], optional - :param refresh_token: The refresh token for this access token, which can be used - to request a new access token when the current one expires., defaults to None - :type refresh_token: Optional[str], optional - :param issued_token_type: The type of downscoped access token returned. This is only - returned if an access token has been downscoped., defaults to None - :type issued_token_type: Optional[AccessTokenIssuedTokenTypeField], optional - """ - super().__init__(**kwargs) - self.access_token = access_token - self.expires_in = expires_in - self.token_type = token_type - self.restricted_to = restricted_to - self.refresh_token = refresh_token - self.issued_token_type = issued_token_type - - -class IntegrationMappingBaseIntegrationTypeField(str, Enum): - SLACK = 'slack' - - -class IntegrationMappingBase(BaseObject): - def __init__( - self, - *, - id: Optional[str] = None, - integration_type: Optional[IntegrationMappingBaseIntegrationTypeField] = None, - **kwargs - ): - """ - :param id: A unique identifier of a folder mapping - (part of a composite key together - with `integration_type`), defaults to None - :type id: Optional[str], optional - :param integration_type: Identifies the Box partner app, - with which the mapping is associated. - Currently only supports Slack. - (part of the composite key together with `id`), defaults to None - :type integration_type: Optional[IntegrationMappingBaseIntegrationTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.integration_type = integration_type - - -class IntegrationMappingMiniPartnerItemTypeField(str, Enum): - CHANNEL = 'channel' - - -class IntegrationMappingMiniBoxItemTypeField(str, Enum): - FOLDER = 'folder' - - -class IntegrationMappingMini(IntegrationMappingBase): - def __init__( - self, - *, - partner_item_id: Optional[str] = None, - partner_item_type: Optional[IntegrationMappingMiniPartnerItemTypeField] = None, - box_item_id: Optional[str] = None, - box_item_type: Optional[IntegrationMappingMiniBoxItemTypeField] = None, - id: Optional[str] = None, - integration_type: Optional[IntegrationMappingBaseIntegrationTypeField] = None, - **kwargs - ): - """ - :param partner_item_id: ID of the mapped partner item, defaults to None - :type partner_item_id: Optional[str], optional - :param partner_item_type: Domain-specific type of the mapped partner item, defaults to None - :type partner_item_type: Optional[IntegrationMappingMiniPartnerItemTypeField], optional - :param box_item_id: ID of the Box item mapped to the object referenced in `partner_item_id`, defaults to None - :type box_item_id: Optional[str], optional - :param box_item_type: Type of the Box object referenced in `box_item_id`, defaults to None - :type box_item_type: Optional[IntegrationMappingMiniBoxItemTypeField], optional - :param id: A unique identifier of a folder mapping - (part of a composite key together - with `integration_type`), defaults to None - :type id: Optional[str], optional - :param integration_type: Identifies the Box partner app, - with which the mapping is associated. - Currently only supports Slack. - (part of the composite key together with `id`), defaults to None - :type integration_type: Optional[IntegrationMappingBaseIntegrationTypeField], optional - """ - super().__init__(id=id, integration_type=integration_type, **kwargs) - self.partner_item_id = partner_item_id - self.partner_item_type = partner_item_type - self.box_item_id = box_item_id - self.box_item_type = box_item_type - - -class GroupBaseTypeField(str, Enum): - GROUP = 'group' - - -class GroupBase(BaseObject): - _discriminator = 'type', {'group'} - - def __init__( - self, - id: str, - *, - type: GroupBaseTypeField = GroupBaseTypeField.GROUP.value, - **kwargs - ): - """ - :param id: The unique identifier for this object - :type id: str - :param type: `group`, defaults to GroupBaseTypeField.GROUP.value - :type type: GroupBaseTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class GroupMiniGroupTypeField(str, Enum): - MANAGED_GROUP = 'managed_group' - ALL_USERS_GROUP = 'all_users_group' - - -class GroupMini(GroupBase): - def __init__( - self, - id: str, - *, - name: Optional[str] = None, - group_type: Optional[GroupMiniGroupTypeField] = None, - type: GroupBaseTypeField = GroupBaseTypeField.GROUP.value, - **kwargs - ): - """ - :param id: The unique identifier for this object - :type id: str - :param name: The name of the group, defaults to None - :type name: Optional[str], optional - :param group_type: The type of the group., defaults to None - :type group_type: Optional[GroupMiniGroupTypeField], optional - :param type: `group`, defaults to GroupBaseTypeField.GROUP.value - :type type: GroupBaseTypeField, optional - """ - super().__init__(id=id, type=type, **kwargs) - self.name = name - self.group_type = group_type - - -class Group(GroupMini): - def __init__( - self, - id: str, - *, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - name: Optional[str] = None, - group_type: Optional[GroupMiniGroupTypeField] = None, - type: GroupBaseTypeField = GroupBaseTypeField.GROUP.value, - **kwargs - ): - """ - :param id: The unique identifier for this object - :type id: str - :param created_at: When the group object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the group object was last modified, defaults to None - :type modified_at: Optional[DateTime], optional - :param name: The name of the group, defaults to None - :type name: Optional[str], optional - :param group_type: The type of the group., defaults to None - :type group_type: Optional[GroupMiniGroupTypeField], optional - :param type: `group`, defaults to GroupBaseTypeField.GROUP.value - :type type: GroupBaseTypeField, optional - """ - super().__init__(id=id, name=name, group_type=group_type, type=type, **kwargs) - self.created_at = created_at - self.modified_at = modified_at - - -class GroupFullInvitabilityLevelField(str, Enum): - ADMINS_ONLY = 'admins_only' - ADMINS_AND_MEMBERS = 'admins_and_members' - ALL_MANAGED_USERS = 'all_managed_users' - - -class GroupFullMemberViewabilityLevelField(str, Enum): - ADMINS_ONLY = 'admins_only' - ADMINS_AND_MEMBERS = 'admins_and_members' - ALL_MANAGED_USERS = 'all_managed_users' - - -class GroupFullPermissionsField(BaseObject): - def __init__(self, *, can_invite_as_collaborator: Optional[bool] = None, **kwargs): - """ - :param can_invite_as_collaborator: Specifies if the user can invite the group to collaborate on any items., defaults to None - :type can_invite_as_collaborator: Optional[bool], optional - """ - super().__init__(**kwargs) - self.can_invite_as_collaborator = can_invite_as_collaborator - - -class GroupFull(Group): - def __init__( - self, - id: str, - *, - provenance: Optional[str] = None, - external_sync_identifier: Optional[str] = None, - description: Optional[str] = None, - invitability_level: Optional[GroupFullInvitabilityLevelField] = None, - member_viewability_level: Optional[GroupFullMemberViewabilityLevelField] = None, - permissions: Optional[GroupFullPermissionsField] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - name: Optional[str] = None, - group_type: Optional[GroupMiniGroupTypeField] = None, - type: GroupBaseTypeField = GroupBaseTypeField.GROUP.value, - **kwargs - ): - """ - :param id: The unique identifier for this object - :type id: str - :param provenance: Keeps track of which external source this group is - coming from (e.g. "Active Directory", "Google Groups", - "Facebook Groups"). Setting this will - also prevent Box users from editing the group name - and its members directly via the Box web application. - This is desirable for one-way syncing of groups., defaults to None - :type provenance: Optional[str], optional - :param external_sync_identifier: An arbitrary identifier that can be used by - external group sync tools to link this Box Group to - an external group. Example values of this field - could be an Active Directory Object ID or a Google - Group ID. We recommend you use of this field in - order to avoid issues when group names are updated in - either Box or external systems., defaults to None - :type external_sync_identifier: Optional[str], optional - :param description: Human readable description of the group., defaults to None - :type description: Optional[str], optional - :param invitability_level: Specifies who can invite the group to collaborate - on items. - - When set to `admins_only` the enterprise admin, co-admins, - and the group's admin can invite the group. - - When set to `admins_and_members` all the admins listed - above and group members can invite the group. - - When set to `all_managed_users` all managed users in the - enterprise can invite the group., defaults to None - :type invitability_level: Optional[GroupFullInvitabilityLevelField], optional - :param member_viewability_level: Specifies who can view the members of the group - (Get Memberships for Group). - - * `admins_only` - the enterprise admin, co-admins, group's - group admin - * `admins_and_members` - all admins and group members - * `all_managed_users` - all managed users in the - enterprise, defaults to None - :type member_viewability_level: Optional[GroupFullMemberViewabilityLevelField], optional - :param created_at: When the group object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the group object was last modified, defaults to None - :type modified_at: Optional[DateTime], optional - :param name: The name of the group, defaults to None - :type name: Optional[str], optional - :param group_type: The type of the group., defaults to None - :type group_type: Optional[GroupMiniGroupTypeField], optional - :param type: `group`, defaults to GroupBaseTypeField.GROUP.value - :type type: GroupBaseTypeField, optional - """ - super().__init__( - id=id, - created_at=created_at, - modified_at=modified_at, - name=name, - group_type=group_type, - type=type, - **kwargs - ) - self.provenance = provenance - self.external_sync_identifier = external_sync_identifier - self.description = description - self.invitability_level = invitability_level - self.member_viewability_level = member_viewability_level - self.permissions = permissions - - -class GroupsOrderDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class GroupsOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[str] = None, - direction: Optional[GroupsOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field to order by, defaults to None - :type by: Optional[str], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[GroupsOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class Groups(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - order: Optional[List[GroupsOrderField]] = None, - entries: Optional[List[GroupFull]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type offset: Optional[int], optional - :param order: The order by which items are returned. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type order: Optional[List[GroupsOrderField]], optional - :param entries: A list of groups, defaults to None - :type entries: Optional[List[GroupFull]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.order = order - self.entries = entries - - -class LegalHoldPolicyMiniTypeField(str, Enum): - LEGAL_HOLD_POLICY = 'legal_hold_policy' - - -class LegalHoldPolicyMini(BaseObject): - _discriminator = 'type', {'legal_hold_policy'} - - def __init__( - self, - id: str, - *, - type: LegalHoldPolicyMiniTypeField = LegalHoldPolicyMiniTypeField.LEGAL_HOLD_POLICY.value, - **kwargs - ): - """ - :param id: The unique identifier for this legal hold policy - :type id: str - :param type: `legal_hold_policy`, defaults to LegalHoldPolicyMiniTypeField.LEGAL_HOLD_POLICY.value - :type type: LegalHoldPolicyMiniTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class LegalHoldPolicyAssignmentBaseTypeField(str, Enum): - LEGAL_HOLD_POLICY_ASSIGNMENT = 'legal_hold_policy_assignment' - - -class LegalHoldPolicyAssignmentBase(BaseObject): - _discriminator = 'type', {'legal_hold_policy_assignment'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[LegalHoldPolicyAssignmentBaseTypeField] = None, - **kwargs - ): - """ - :param id: The unique identifier for this legal hold assignment, defaults to None - :type id: Optional[str], optional - :param type: `legal_hold_policy_assignment`, defaults to None - :type type: Optional[LegalHoldPolicyAssignmentBaseTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class MetadataBase(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'parent': '$parent', - 'template': '$template', - 'scope': '$scope', - 'version': '$version', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - '$parent': 'parent', - '$template': 'template', - '$scope': 'scope', - '$version': 'version', - **BaseObject._json_to_fields_mapping, - } - - def __init__( - self, - *, - parent: Optional[str] = None, - template: Optional[str] = None, - scope: Optional[str] = None, - version: Optional[int] = None, - **kwargs - ): - """ - :param parent: The identifier of the item that this metadata instance - has been attached to. This combines the `type` and the `id` - of the parent in the form `{type}_{id}`., defaults to None - :type parent: Optional[str], optional - :param template: The name of the template, defaults to None - :type template: Optional[str], optional - :param scope: An ID for the scope in which this template - has been applied. This will be `enterprise_{enterprise_id}` for templates - defined for use in this enterprise, and `global` for general templates - that are available to all enterprises using Box., defaults to None - :type scope: Optional[str], optional - :param version: The version of the metadata instance. This version starts at 0 and - increases every time a user-defined property is modified., defaults to None - :type version: Optional[int], optional - """ - super().__init__(**kwargs) - self.parent = parent - self.template = template - self.scope = scope - self.version = version - - -class Metadata(MetadataBase): - def __init__( - self, - *, - parent: Optional[str] = None, - template: Optional[str] = None, - scope: Optional[str] = None, - version: Optional[int] = None, - **kwargs - ): - """ - :param parent: The identifier of the item that this metadata instance - has been attached to. This combines the `type` and the `id` - of the parent in the form `{type}_{id}`., defaults to None - :type parent: Optional[str], optional - :param template: The name of the template, defaults to None - :type template: Optional[str], optional - :param scope: An ID for the scope in which this template - has been applied. This will be `enterprise_{enterprise_id}` for templates - defined for use in this enterprise, and `global` for general templates - that are available to all enterprises using Box., defaults to None - :type scope: Optional[str], optional - :param version: The version of the metadata instance. This version starts at 0 and - increases every time a user-defined property is modified., defaults to None - :type version: Optional[int], optional - """ - super().__init__( - parent=parent, template=template, scope=scope, version=version, **kwargs - ) - - -class Metadatas(BaseObject): - def __init__( - self, - *, - entries: Optional[List[Metadata]] = None, - limit: Optional[int] = None, - **kwargs - ): - """ - :param entries: A list of metadata instances, as applied to this file or folder., defaults to None - :type entries: Optional[List[Metadata]], optional - :param limit: The limit that was used for this page of results., defaults to None - :type limit: Optional[int], optional - """ - super().__init__(**kwargs) - self.entries = entries - self.limit = limit - - -class MetadataFull(Metadata): - _fields_to_json_mapping: Dict[str, str] = { - 'can_edit': '$canEdit', - 'id': '$id', - 'type': '$type', - 'type_version': '$typeVersion', - **Metadata._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - '$canEdit': 'can_edit', - '$id': 'id', - '$type': 'type', - '$typeVersion': 'type_version', - **Metadata._json_to_fields_mapping, - } - - def __init__( - self, - *, - can_edit: Optional[bool] = None, - id: Optional[str] = None, - type: Optional[str] = None, - type_version: Optional[int] = None, - parent: Optional[str] = None, - template: Optional[str] = None, - scope: Optional[str] = None, - version: Optional[int] = None, - **kwargs - ): - """ - :param can_edit: Whether the user can edit this metadata instance., defaults to None - :type can_edit: Optional[bool], optional - :param id: A UUID to identify the metadata instance., defaults to None - :type id: Optional[str], optional - :param type: A unique identifier for the "type" of this instance. This is an - internal system property and should not be used by a client - application., defaults to None - :type type: Optional[str], optional - :param type_version: The last-known version of the template of the object. This is an - internal system property and should not be used by a client - application., defaults to None - :type type_version: Optional[int], optional - :param parent: The identifier of the item that this metadata instance - has been attached to. This combines the `type` and the `id` - of the parent in the form `{type}_{id}`., defaults to None - :type parent: Optional[str], optional - :param template: The name of the template, defaults to None - :type template: Optional[str], optional - :param scope: An ID for the scope in which this template - has been applied. This will be `enterprise_{enterprise_id}` for templates - defined for use in this enterprise, and `global` for general templates - that are available to all enterprises using Box., defaults to None - :type scope: Optional[str], optional - :param version: The version of the metadata instance. This version starts at 0 and - increases every time a user-defined property is modified., defaults to None - :type version: Optional[int], optional - """ - super().__init__( - parent=parent, template=template, scope=scope, version=version, **kwargs - ) - self.can_edit = can_edit - self.id = id - self.type = type - self.type_version = type_version - self.extra_data = kwargs - - -class MetadataCascadePolicyTypeField(str, Enum): - METADATA_CASCADE_POLICY = 'metadata_cascade_policy' - - -class MetadataCascadePolicyOwnerEnterpriseTypeField(str, Enum): - ENTERPRISE = 'enterprise' - - -class MetadataCascadePolicyOwnerEnterpriseField(BaseObject): - _discriminator = 'type', {'enterprise'} - - def __init__( - self, - *, - type: Optional[MetadataCascadePolicyOwnerEnterpriseTypeField] = None, - id: Optional[str] = None, - **kwargs - ): - """ - :param type: `enterprise`, defaults to None - :type type: Optional[MetadataCascadePolicyOwnerEnterpriseTypeField], optional - :param id: The ID of the enterprise that owns the policy., defaults to None - :type id: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - - -class MetadataCascadePolicyParentTypeField(str, Enum): - FOLDER = 'folder' - - -class MetadataCascadePolicyParentField(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - *, - type: Optional[MetadataCascadePolicyParentTypeField] = None, - id: Optional[str] = None, - **kwargs - ): - """ - :param type: `folder`, defaults to None - :type type: Optional[MetadataCascadePolicyParentTypeField], optional - :param id: The ID of the folder the policy is applied to., defaults to None - :type id: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - - -class MetadataCascadePolicy(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'template_key': 'templateKey', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'templateKey': 'template_key', - **BaseObject._json_to_fields_mapping, - } - _discriminator = 'type', {'metadata_cascade_policy'} - - def __init__( - self, - id: str, - *, - type: MetadataCascadePolicyTypeField = MetadataCascadePolicyTypeField.METADATA_CASCADE_POLICY.value, - owner_enterprise: Optional[MetadataCascadePolicyOwnerEnterpriseField] = None, - parent: Optional[MetadataCascadePolicyParentField] = None, - scope: Optional[str] = None, - template_key: Optional[str] = None, - **kwargs - ): - """ - :param id: The ID of the metadata cascade policy object - :type id: str - :param type: `metadata_cascade_policy`, defaults to MetadataCascadePolicyTypeField.METADATA_CASCADE_POLICY.value - :type type: MetadataCascadePolicyTypeField, optional - :param owner_enterprise: The enterprise that owns this policy., defaults to None - :type owner_enterprise: Optional[MetadataCascadePolicyOwnerEnterpriseField], optional - :param parent: Represent the folder the policy is applied to., defaults to None - :type parent: Optional[MetadataCascadePolicyParentField], optional - :param scope: The scope of the metadata cascade policy can either be `global` or - `enterprise_*`. The `global` scope is used for policies that are - available to any Box enterprise. The `enterprise_*` scope represents - policies that have been created within a specific enterprise, where `*` - will be the ID of that enterprise., defaults to None - :type scope: Optional[str], optional - :param template_key: The key of the template that is cascaded down to the folder's - children. - - In many cases the template key is automatically derived - of its display name, for example `Contract Template` would - become `contractTemplate`. In some cases the creator of the - template will have provided its own template key. - - Please [list the templates for an enterprise][list], or - get all instances on a [file][file] or [folder][folder] - to inspect a template's key. - - [list]: e://get-metadata-templates-enterprise - [file]: e://get-files-id-metadata - [folder]: e://get-folders-id-metadata, defaults to None - :type template_key: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.owner_enterprise = owner_enterprise - self.parent = parent - self.scope = scope - self.template_key = template_key - - -class MetadataCascadePolicies(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[MetadataCascadePolicy]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of metadata cascade policies, defaults to None - :type entries: Optional[List[MetadataCascadePolicy]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class MetadataQueryIndexStatusField(str, Enum): - BUILDING = 'building' - ACTIVE = 'active' - DISABLED = 'disabled' - - -class MetadataQueryIndexFieldsSortDirectionField(str, Enum): - ASC = 'asc' - DESC = 'desc' - - -class MetadataQueryIndexFieldsField(BaseObject): - def __init__( - self, - *, - key: Optional[str] = None, - sort_direction: Optional[MetadataQueryIndexFieldsSortDirectionField] = None, - **kwargs - ): - """ - :param key: The metadata template field key., defaults to None - :type key: Optional[str], optional - :param sort_direction: The sort direction of the field., defaults to None - :type sort_direction: Optional[MetadataQueryIndexFieldsSortDirectionField], optional - """ - super().__init__(**kwargs) - self.key = key - self.sort_direction = sort_direction - - -class MetadataQueryIndex(BaseObject): - def __init__( - self, - type: str, - status: MetadataQueryIndexStatusField, - *, - id: Optional[str] = None, - fields: Optional[List[MetadataQueryIndexFieldsField]] = None, - **kwargs - ): - """ - :param type: Value is always `metadata_query_index` - :type type: str - :param status: The status of the metadata query index - :type status: MetadataQueryIndexStatusField - :param id: The ID of the metadata query index., defaults to None - :type id: Optional[str], optional - :param fields: A list of template fields which make up the index., defaults to None - :type fields: Optional[List[MetadataQueryIndexFieldsField]], optional - """ - super().__init__(**kwargs) - self.type = type - self.status = status - self.id = id - self.fields = fields - - -class MetadataTemplateTypeField(str, Enum): - METADATA_TEMPLATE = 'metadata_template' - - -class MetadataTemplateFieldsTypeField(str, Enum): - STRING = 'string' - FLOAT = 'float' - DATE = 'date' - ENUM = 'enum' - MULTISELECT = 'multiSelect' - INTEGER = 'integer' - - -class MetadataTemplateFieldsOptionsField(BaseObject): - def __init__(self, key: str, *, id: Optional[str] = None, **kwargs): - """ - :param key: The text value of the option. This represents both the display name of the - option and the internal key used when updating templates. - :type key: str - :param id: The internal unique identifier of the the option., defaults to None - :type id: Optional[str], optional - """ - super().__init__(**kwargs) - self.key = key - self.id = id - - -class MetadataTemplateFieldsField(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'display_name': 'displayName', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'displayName': 'display_name', - **BaseObject._json_to_fields_mapping, - } - _discriminator = 'type', { - 'string', - 'float', - 'date', - 'enum', - 'multiSelect', - 'integer', - } - - def __init__( - self, - type: MetadataTemplateFieldsTypeField, - key: str, - display_name: str, - *, - description: Optional[str] = None, - hidden: Optional[bool] = None, - options: Optional[List[MetadataTemplateFieldsOptionsField]] = None, - id: Optional[str] = None, - **kwargs - ): - """ - :param type: The type of field. The basic fields are a `string` field for text, a - `float` field for numbers, and a `date` fields to present the user with a - date-time picker. - - Additionally, metadata templates support an `enum` field for a basic list - of items, and ` multiSelect` field for a similar list of items where the - user can select more than one value. - - **Note**: The `integer` value is deprecated. - It is still present in the response, - but cannot be used in the POST request. - :type type: MetadataTemplateFieldsTypeField - :param key: A unique identifier for the field. The identifier must - be unique within the template to which it belongs. - :type key: str - :param display_name: The display name of the field as it is shown to the user in the web and - mobile apps. - :type display_name: str - :param description: A description of the field. This is not shown to the user., defaults to None - :type description: Optional[str], optional - :param hidden: Whether this field is hidden in the UI for the user and can only be set - through the API instead., defaults to None - :type hidden: Optional[bool], optional - :param options: A list of options for this field. This is used in combination - with the `enum` and `multiSelect` field types., defaults to None - :type options: Optional[List[MetadataTemplateFieldsOptionsField]], optional - :param id: The unique ID of the metadata template field., defaults to None - :type id: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.key = key - self.display_name = display_name - self.description = description - self.hidden = hidden - self.options = options - self.id = id - - -class MetadataTemplate(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'template_key': 'templateKey', - 'display_name': 'displayName', - 'copy_instance_on_item_copy': 'copyInstanceOnItemCopy', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'templateKey': 'template_key', - 'displayName': 'display_name', - 'copyInstanceOnItemCopy': 'copy_instance_on_item_copy', - **BaseObject._json_to_fields_mapping, - } - _discriminator = 'type', {'metadata_template'} - - def __init__( - self, - id: str, - *, - type: MetadataTemplateTypeField = MetadataTemplateTypeField.METADATA_TEMPLATE.value, - scope: Optional[str] = None, - template_key: Optional[str] = None, - display_name: Optional[str] = None, - hidden: Optional[bool] = None, - fields: Optional[List[MetadataTemplateFieldsField]] = None, - copy_instance_on_item_copy: Optional[bool] = None, - **kwargs - ): - """ - :param id: The ID of the metadata template. - :type id: str - :param type: `metadata_template`, defaults to MetadataTemplateTypeField.METADATA_TEMPLATE.value - :type type: MetadataTemplateTypeField, optional - :param scope: The scope of the metadata template can either be `global` or - `enterprise_*`. The `global` scope is used for templates that are - available to any Box enterprise. The `enterprise_*` scope represents - templates that have been created within a specific enterprise, where `*` - will be the ID of that enterprise., defaults to None - :type scope: Optional[str], optional - :param template_key: A unique identifier for the template. This identifier is unique across - the `scope` of the enterprise to which the metadata template is being - applied, yet is not necessarily unique across different enterprises., defaults to None - :type template_key: Optional[str], optional - :param display_name: The display name of the template. This can be seen in the Box web app - and mobile apps., defaults to None - :type display_name: Optional[str], optional - :param hidden: Defines if this template is visible in the Box web app UI, or if - it is purely intended for usage through the API., defaults to None - :type hidden: Optional[bool], optional - :param fields: An ordered list of template fields which are part of the template. Each - field can be a regular text field, date field, number field, as well as a - single or multi-select list., defaults to None - :type fields: Optional[List[MetadataTemplateFieldsField]], optional - :param copy_instance_on_item_copy: Whether or not to include the metadata when a file or folder is copied., defaults to None - :type copy_instance_on_item_copy: Optional[bool], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.scope = scope - self.template_key = template_key - self.display_name = display_name - self.hidden = hidden - self.fields = fields - self.copy_instance_on_item_copy = copy_instance_on_item_copy - - -class MetadataTemplates(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[MetadataTemplate]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of metadata templates, defaults to None - :type entries: Optional[List[MetadataTemplate]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class RealtimeServer(BaseObject): - def __init__( - self, - *, - type: Optional[str] = None, - url: Optional[str] = None, - ttl: Optional[int] = None, - max_retries: Optional[int] = None, - retry_timeout: Optional[int] = None, - **kwargs - ): - """ - :param type: `realtime_server`, defaults to None - :type type: Optional[str], optional - :param url: The URL for the server., defaults to None - :type url: Optional[str], optional - :param ttl: The time in minutes for which this server is available, defaults to None - :type ttl: Optional[int], optional - :param max_retries: The maximum number of retries this server will - allow before a new long poll should be started by - getting a [new list of server](#options-events)., defaults to None - :type max_retries: Optional[int], optional - :param retry_timeout: The maximum number of seconds without a response - after which you should retry the long poll connection. - - This helps to overcome network issues where the long - poll looks to be working but no packages are coming - through., defaults to None - :type retry_timeout: Optional[int], optional - """ - super().__init__(**kwargs) - self.type = type - self.url = url - self.ttl = ttl - self.max_retries = max_retries - self.retry_timeout = retry_timeout - - -class RealtimeServers(BaseObject): - def __init__( - self, - *, - chunk_size: Optional[int] = None, - entries: Optional[List[RealtimeServer]] = None, - **kwargs - ): - """ - :param chunk_size: The number of items in this response., defaults to None - :type chunk_size: Optional[int], optional - :param entries: A list of real-time servers, defaults to None - :type entries: Optional[List[RealtimeServer]], optional - """ - super().__init__(**kwargs) - self.chunk_size = chunk_size - self.entries = entries - - -class RetentionPolicyBaseTypeField(str, Enum): - RETENTION_POLICY = 'retention_policy' - - -class RetentionPolicyBase(BaseObject): - _discriminator = 'type', {'retention_policy'} - - def __init__( - self, - id: str, - *, - type: RetentionPolicyBaseTypeField = RetentionPolicyBaseTypeField.RETENTION_POLICY.value, - **kwargs - ): - """ - :param id: The unique identifier that represents a retention policy. - :type id: str - :param type: `retention_policy`, defaults to RetentionPolicyBaseTypeField.RETENTION_POLICY.value - :type type: RetentionPolicyBaseTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class RetentionPolicyMiniDispositionActionField(str, Enum): - PERMANENTLY_DELETE = 'permanently_delete' - REMOVE_RETENTION = 'remove_retention' - - -class RetentionPolicyMini(RetentionPolicyBase): - def __init__( - self, - id: str, - *, - policy_name: Optional[str] = None, - retention_length: Optional[str] = None, - disposition_action: Optional[RetentionPolicyMiniDispositionActionField] = None, - type: RetentionPolicyBaseTypeField = RetentionPolicyBaseTypeField.RETENTION_POLICY.value, - **kwargs - ): - """ - :param id: The unique identifier that represents a retention policy. - :type id: str - :param policy_name: The name given to the retention policy., defaults to None - :type policy_name: Optional[str], optional - :param retention_length: The length of the retention policy. This value - specifies the duration in days that the retention - policy will be active for after being assigned to - content. If the policy has a `policy_type` of - `indefinite`, the `retention_length` will also be - `indefinite`., defaults to None - :type retention_length: Optional[str], optional - :param disposition_action: The disposition action of the retention policy. - This action can be `permanently_delete`, which - will cause the content retained by the policy - to be permanently deleted, or `remove_retention`, - which will lift the retention policy from the content, - allowing it to be deleted by users, - once the retention policy has expired., defaults to None - :type disposition_action: Optional[RetentionPolicyMiniDispositionActionField], optional - :param type: `retention_policy`, defaults to RetentionPolicyBaseTypeField.RETENTION_POLICY.value - :type type: RetentionPolicyBaseTypeField, optional - """ - super().__init__(id=id, type=type, **kwargs) - self.policy_name = policy_name - self.retention_length = retention_length - self.disposition_action = disposition_action - - -class FileVersionRetentionTypeField(str, Enum): - FILE_VERSION_RETENTION = 'file_version_retention' - - -class FileVersionRetention(BaseObject): - _discriminator = 'type', {'file_version_retention'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[FileVersionRetentionTypeField] = None, - file_version: Optional[FileVersionMini] = None, - file: Optional[FileMini] = None, - applied_at: Optional[DateTime] = None, - disposition_at: Optional[DateTime] = None, - winning_retention_policy: Optional[RetentionPolicyMini] = None, - **kwargs - ): - """ - :param id: The unique identifier for this file version retention., defaults to None - :type id: Optional[str], optional - :param type: `file_version_retention`, defaults to None - :type type: Optional[FileVersionRetentionTypeField], optional - :param applied_at: When this file version retention object was - created, defaults to None - :type applied_at: Optional[DateTime], optional - :param disposition_at: When the retention expires on this file - version retention, defaults to None - :type disposition_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.file_version = file_version - self.file = file - self.applied_at = applied_at - self.disposition_at = disposition_at - self.winning_retention_policy = winning_retention_policy - - -class FileVersionRetentions(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[FileVersionRetention]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of file version retentions, defaults to None - :type entries: Optional[List[FileVersionRetention]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class RetentionPolicyAssignmentBaseTypeField(str, Enum): - RETENTION_POLICY_ASSIGNMENT = 'retention_policy_assignment' - - -class RetentionPolicyAssignmentBase(BaseObject): - _discriminator = 'type', {'retention_policy_assignment'} - - def __init__( - self, - id: str, - *, - type: RetentionPolicyAssignmentBaseTypeField = RetentionPolicyAssignmentBaseTypeField.RETENTION_POLICY_ASSIGNMENT.value, - **kwargs - ): - """ - :param id: The unique identifier that represents a file version. - :type id: str - :param type: `retention_policy_assignment`, defaults to RetentionPolicyAssignmentBaseTypeField.RETENTION_POLICY_ASSIGNMENT.value - :type type: RetentionPolicyAssignmentBaseTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class ShieldInformationBarrierBaseTypeField(str, Enum): - SHIELD_INFORMATION_BARRIER = 'shield_information_barrier' - - -class ShieldInformationBarrierBase(BaseObject): - _discriminator = 'type', {'shield_information_barrier'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[ShieldInformationBarrierBaseTypeField] = None, - **kwargs - ): - """ - :param id: The unique identifier for the shield information barrier, defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier, defaults to None - :type type: Optional[ShieldInformationBarrierBaseTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class ShieldInformationBarrierReference(BaseObject): - def __init__( - self, - *, - shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, - **kwargs - ): - super().__init__(**kwargs) - self.shield_information_barrier = shield_information_barrier - - -class ShieldInformationBarrierReportBaseTypeField(str, Enum): - SHIELD_INFORMATION_BARRIER_REPORT = 'shield_information_barrier_report' - - -class ShieldInformationBarrierReportBase(BaseObject): - _discriminator = 'type', {'shield_information_barrier_report'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[ShieldInformationBarrierReportBaseTypeField] = None, - **kwargs - ): - """ - :param id: The unique identifier for the shield information barrier report, defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier report, defaults to None - :type type: Optional[ShieldInformationBarrierReportBaseTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class ShieldInformationBarrierSegmentMemberBaseTypeField(str, Enum): - SHIELD_INFORMATION_BARRIER_SEGMENT_MEMBER = ( - 'shield_information_barrier_segment_member' - ) - - -class ShieldInformationBarrierSegmentMemberBase(BaseObject): - _discriminator = 'type', {'shield_information_barrier_segment_member'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField] = None, - **kwargs - ): - """ - :param id: The unique identifier for the - shield information barrier segment member, defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier segment member, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class ShieldInformationBarrierSegmentRestrictionBaseTypeField(str, Enum): - SHIELD_INFORMATION_BARRIER_SEGMENT_RESTRICTION = ( - 'shield_information_barrier_segment_restriction' - ) - - -class ShieldInformationBarrierSegmentRestrictionBase(BaseObject): - _discriminator = 'type', {'shield_information_barrier_segment_restriction'} - - def __init__( - self, - *, - type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField] = None, - id: Optional[str] = None, - **kwargs - ): - """ - :param type: Shield information barrier segment restriction, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField], optional - :param id: The unique identifier for the - shield information barrier segment restriction., defaults to None - :type id: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - - -class ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentTypeField( - str, Enum -): - SHIELD_INFORMATION_BARRIER_SEGMENT = 'shield_information_barrier_segment' - - -class ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField( - BaseObject -): - _discriminator = 'type', {'shield_information_barrier_segment'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[ - ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentTypeField - ] = None, - **kwargs - ): - """ - :param id: The ID reference of the - requesting shield information barrier segment., defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier segment, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentTypeField( - str, Enum -): - SHIELD_INFORMATION_BARRIER_SEGMENT = 'shield_information_barrier_segment' - - -class ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField(BaseObject): - _discriminator = 'type', {'shield_information_barrier_segment'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[ - ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentTypeField - ] = None, - **kwargs - ): - """ - :param id: The ID reference of the - restricted shield information barrier segment., defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information segment, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class ShieldInformationBarrierSegmentRestrictionMini( - ShieldInformationBarrierSegmentRestrictionBase -): - def __init__( - self, - shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField, - restricted_segment: ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField, - *, - type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField] = None, - id: Optional[str] = None, - **kwargs - ): - """ - :param shield_information_barrier_segment: The `type` and `id` of the - requested shield information barrier segment. - :type shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField - :param restricted_segment: The `type` and `id` of the - restricted shield information barrier segment. - :type restricted_segment: ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField - :param type: Shield information barrier segment restriction, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField], optional - :param id: The unique identifier for the - shield information barrier segment restriction., defaults to None - :type id: Optional[str], optional - """ - super().__init__(type=type, id=id, **kwargs) - self.shield_information_barrier_segment = shield_information_barrier_segment - self.restricted_segment = restricted_segment - - -class SessionTerminationMessage(BaseObject): - def __init__(self, *, message: Optional[str] = None, **kwargs): - """ - :param message: The unique identifier for the termination job status, defaults to None - :type message: Optional[str], optional - """ - super().__init__(**kwargs) - self.message = message - - -class StoragePolicyMiniTypeField(str, Enum): - STORAGE_POLICY = 'storage_policy' - - -class StoragePolicyMini(BaseObject): - _discriminator = 'type', {'storage_policy'} - - def __init__( - self, - id: str, - *, - type: StoragePolicyMiniTypeField = StoragePolicyMiniTypeField.STORAGE_POLICY.value, - **kwargs - ): - """ - :param id: The unique identifier for this storage policy - :type id: str - :param type: `storage_policy`, defaults to StoragePolicyMiniTypeField.STORAGE_POLICY.value - :type type: StoragePolicyMiniTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class StoragePolicyAssignmentTypeField(str, Enum): - STORAGE_POLICY_ASSIGNMENT = 'storage_policy_assignment' - - -class StoragePolicyAssignmentAssignedToField(BaseObject): - def __init__( - self, *, id: Optional[str] = None, type: Optional[str] = None, **kwargs - ): - """ - :param id: The unique identifier for this object, defaults to None - :type id: Optional[str], optional - :param type: The type for this object, defaults to None - :type type: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class StoragePolicyAssignment(BaseObject): - _discriminator = 'type', {'storage_policy_assignment'} - - def __init__( - self, - id: str, - *, - type: StoragePolicyAssignmentTypeField = StoragePolicyAssignmentTypeField.STORAGE_POLICY_ASSIGNMENT.value, - storage_policy: Optional[StoragePolicyMini] = None, - assigned_to: Optional[StoragePolicyAssignmentAssignedToField] = None, - **kwargs - ): - """ - :param id: The unique identifier for a storage policy assignment. - :type id: str - :param type: `storage_policy_assignment`, defaults to StoragePolicyAssignmentTypeField.STORAGE_POLICY_ASSIGNMENT.value - :type type: StoragePolicyAssignmentTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.storage_policy = storage_policy - self.assigned_to = assigned_to - - -class StoragePolicyAssignments(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[StoragePolicyAssignment]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of storage policy assignments, defaults to None - :type entries: Optional[List[StoragePolicyAssignment]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class StoragePolicy(StoragePolicyMini): - def __init__( - self, - id: str, - *, - name: Optional[str] = None, - type: StoragePolicyMiniTypeField = StoragePolicyMiniTypeField.STORAGE_POLICY.value, - **kwargs - ): - """ - :param id: The unique identifier for this storage policy - :type id: str - :param name: A descriptive name of the region, defaults to None - :type name: Optional[str], optional - :param type: `storage_policy`, defaults to StoragePolicyMiniTypeField.STORAGE_POLICY.value - :type type: StoragePolicyMiniTypeField, optional - """ - super().__init__(id=id, type=type, **kwargs) - self.name = name - - -class StoragePolicies(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[StoragePolicy]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of storage policies, defaults to None - :type entries: Optional[List[StoragePolicy]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class TermsOfServiceBaseTypeField(str, Enum): - TERMS_OF_SERVICE = 'terms_of_service' - - -class TermsOfServiceBase(BaseObject): - _discriminator = 'type', {'terms_of_service'} - - def __init__( - self, - id: str, - *, - type: TermsOfServiceBaseTypeField = TermsOfServiceBaseTypeField.TERMS_OF_SERVICE.value, - **kwargs - ): - """ - :param id: The unique identifier for this terms of service. - :type id: str - :param type: `terms_of_service`, defaults to TermsOfServiceBaseTypeField.TERMS_OF_SERVICE.value - :type type: TermsOfServiceBaseTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class TermsOfServiceStatusField(str, Enum): - ENABLED = 'enabled' - DISABLED = 'disabled' - - -class TermsOfServiceEnterpriseTypeField(str, Enum): - ENTERPRISE = 'enterprise' - - -class TermsOfServiceEnterpriseField(BaseObject): - _discriminator = 'type', {'enterprise'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[TermsOfServiceEnterpriseTypeField] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this enterprise., defaults to None - :type id: Optional[str], optional - :param type: `enterprise`, defaults to None - :type type: Optional[TermsOfServiceEnterpriseTypeField], optional - :param name: The name of the enterprise, defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - - -class TermsOfServiceTosTypeField(str, Enum): - MANAGED = 'managed' - EXTERNAL = 'external' - - -class TermsOfService(TermsOfServiceBase): - def __init__( - self, - id: str, - *, - status: Optional[TermsOfServiceStatusField] = None, - enterprise: Optional[TermsOfServiceEnterpriseField] = None, - tos_type: Optional[TermsOfServiceTosTypeField] = None, - text: Optional[str] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - type: TermsOfServiceBaseTypeField = TermsOfServiceBaseTypeField.TERMS_OF_SERVICE.value, - **kwargs - ): - """ - :param id: The unique identifier for this terms of service. - :type id: str - :param status: Whether these terms are enabled or not, defaults to None - :type status: Optional[TermsOfServiceStatusField], optional - :param tos_type: Whether to apply these terms to managed users or external users, defaults to None - :type tos_type: Optional[TermsOfServiceTosTypeField], optional - :param text: The text for your terms and conditions. This text could be - empty if the `status` is set to `disabled`., defaults to None - :type text: Optional[str], optional - :param created_at: When the legal item was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the legal item was modified., defaults to None - :type modified_at: Optional[DateTime], optional - :param type: `terms_of_service`, defaults to TermsOfServiceBaseTypeField.TERMS_OF_SERVICE.value - :type type: TermsOfServiceBaseTypeField, optional - """ - super().__init__(id=id, type=type, **kwargs) - self.status = status - self.enterprise = enterprise - self.tos_type = tos_type - self.text = text - self.created_at = created_at - self.modified_at = modified_at - - -class TermsOfServices(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - entries: Optional[List[TermsOfService]] = None, - **kwargs - ): - """ - :param total_count: The total number of objects., defaults to None - :type total_count: Optional[int], optional - :param entries: A list of terms of service objects, defaults to None - :type entries: Optional[List[TermsOfService]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class UploadPartMini(BaseObject): - def __init__( - self, - *, - part_id: Optional[str] = None, - offset: Optional[int] = None, - size: Optional[int] = None, - **kwargs - ): - """ - :param part_id: The unique ID of the chunk., defaults to None - :type part_id: Optional[str], optional - :param offset: The offset of the chunk within the file - in bytes. The lower bound of the position - of the chunk within the file., defaults to None - :type offset: Optional[int], optional - :param size: The size of the chunk in bytes., defaults to None - :type size: Optional[int], optional - """ - super().__init__(**kwargs) - self.part_id = part_id - self.offset = offset - self.size = size - - -class UploadPart(UploadPartMini): - _fields_to_json_mapping: Dict[str, str] = { - 'sha_1': 'sha1', - **UploadPartMini._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'sha1': 'sha_1', - **UploadPartMini._json_to_fields_mapping, - } - - def __init__( - self, - *, - sha_1: Optional[str] = None, - part_id: Optional[str] = None, - offset: Optional[int] = None, - size: Optional[int] = None, - **kwargs - ): - """ - :param sha_1: The SHA1 hash of the chunk., defaults to None - :type sha_1: Optional[str], optional - :param part_id: The unique ID of the chunk., defaults to None - :type part_id: Optional[str], optional - :param offset: The offset of the chunk within the file - in bytes. The lower bound of the position - of the chunk within the file., defaults to None - :type offset: Optional[int], optional - :param size: The size of the chunk in bytes., defaults to None - :type size: Optional[int], optional - """ - super().__init__(part_id=part_id, offset=offset, size=size, **kwargs) - self.sha_1 = sha_1 - - -class UploadPartsOrderDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class UploadPartsOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[str] = None, - direction: Optional[UploadPartsOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field to order by, defaults to None - :type by: Optional[str], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[UploadPartsOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class UploadParts(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - order: Optional[List[UploadPartsOrderField]] = None, - entries: Optional[List[UploadPart]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type offset: Optional[int], optional - :param order: The order by which items are returned. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type order: Optional[List[UploadPartsOrderField]], optional - :param entries: A list of uploaded chunks for an upload - session, defaults to None - :type entries: Optional[List[UploadPart]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.order = order - self.entries = entries - - -class UploadedPart(BaseObject): - def __init__(self, *, part: Optional[UploadPart] = None, **kwargs): - super().__init__(**kwargs) - self.part = part - - -class UploadSessionTypeField(str, Enum): - UPLOAD_SESSION = 'upload_session' - - -class UploadSessionSessionEndpointsField(BaseObject): - def __init__( - self, - *, - upload_part: Optional[str] = None, - commit: Optional[str] = None, - abort: Optional[str] = None, - list_parts: Optional[str] = None, - status: Optional[str] = None, - log_event: Optional[str] = None, - **kwargs - ): - """ - :param upload_part: The URL to upload parts to, defaults to None - :type upload_part: Optional[str], optional - :param commit: The URL used to commit the file, defaults to None - :type commit: Optional[str], optional - :param abort: The URL for used to abort the session., defaults to None - :type abort: Optional[str], optional - :param list_parts: The URL users to list all parts., defaults to None - :type list_parts: Optional[str], optional - :param status: The URL used to get the status of the upload., defaults to None - :type status: Optional[str], optional - :param log_event: The URL used to get the upload log from., defaults to None - :type log_event: Optional[str], optional - """ - super().__init__(**kwargs) - self.upload_part = upload_part - self.commit = commit - self.abort = abort - self.list_parts = list_parts - self.status = status - self.log_event = log_event - - -class UploadSession(BaseObject): - _discriminator = 'type', {'upload_session'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[UploadSessionTypeField] = None, - session_expires_at: Optional[DateTime] = None, - part_size: Optional[int] = None, - total_parts: Optional[int] = None, - num_parts_processed: Optional[int] = None, - session_endpoints: Optional[UploadSessionSessionEndpointsField] = None, - **kwargs - ): - """ - :param id: The unique identifier for this session, defaults to None - :type id: Optional[str], optional - :param type: `upload_session`, defaults to None - :type type: Optional[UploadSessionTypeField], optional - :param session_expires_at: The date and time when this session expires., defaults to None - :type session_expires_at: Optional[DateTime], optional - :param part_size: The size in bytes that must be used for all parts of of the - upload. - - Only the last part is allowed to be of a smaller size., defaults to None - :type part_size: Optional[int], optional - :param total_parts: The total number of parts expected in this upload session, - as determined by the file size and part size., defaults to None - :type total_parts: Optional[int], optional - :param num_parts_processed: The number of parts that have been uploaded and processed - by the server. This starts at `0`. - - When committing a file files, inspecting this property can - provide insight if all parts have been uploaded correctly., defaults to None - :type num_parts_processed: Optional[int], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.session_expires_at = session_expires_at - self.part_size = part_size - self.total_parts = total_parts - self.num_parts_processed = num_parts_processed - self.session_endpoints = session_endpoints - - -class UploadUrl(BaseObject): - def __init__( - self, - *, - upload_url: Optional[str] = None, - upload_token: Optional[str] = None, - **kwargs - ): - """ - :param upload_url: A URL for an upload session that can be used to upload - the file., defaults to None - :type upload_url: Optional[str], optional - :param upload_token: An optional access token to use to upload the file, defaults to None - :type upload_token: Optional[str], optional - """ - super().__init__(**kwargs) - self.upload_url = upload_url - self.upload_token = upload_token - - -class UserAvatarPicUrlsField(BaseObject): - def __init__( - self, - *, - small: Optional[str] = None, - large: Optional[str] = None, - preview: Optional[str] = None, - **kwargs - ): - """ - :param small: The location of a small-sized avatar., defaults to None - :type small: Optional[str], optional - :param large: The location of a large-sized avatar., defaults to None - :type large: Optional[str], optional - :param preview: The location of the avatar preview., defaults to None - :type preview: Optional[str], optional - """ - super().__init__(**kwargs) - self.small = small - self.large = large - self.preview = preview - - -class UserAvatar(BaseObject): - def __init__(self, *, pic_urls: Optional[UserAvatarPicUrlsField] = None, **kwargs): - """ - :param pic_urls: Represents an object with user avatar URLs., defaults to None - :type pic_urls: Optional[UserAvatarPicUrlsField], optional - """ - super().__init__(**kwargs) - self.pic_urls = pic_urls - - -class UserBaseTypeField(str, Enum): - USER = 'user' - - -class UserBase(BaseObject): - _discriminator = 'type', {'user'} - - def __init__( - self, - id: str, - *, - type: UserBaseTypeField = UserBaseTypeField.USER.value, - **kwargs - ): - """ - :param id: The unique identifier for this user - :type id: str - :param type: `user`, defaults to UserBaseTypeField.USER.value - :type type: UserBaseTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class UserIntegrationMappings(UserBase): - def __init__( - self, - id: str, - *, - name: Optional[str] = None, - login: Optional[str] = None, - type: UserBaseTypeField = UserBaseTypeField.USER.value, - **kwargs - ): - """ - :param id: The unique identifier for this user - :type id: str - :param name: The display name of this user, defaults to None - :type name: Optional[str], optional - :param login: The primary email address of this user, defaults to None - :type login: Optional[str], optional - :param type: `user`, defaults to UserBaseTypeField.USER.value - :type type: UserBaseTypeField, optional - """ - super().__init__(id=id, type=type, **kwargs) - self.name = name - self.login = login - - -class UserCollaborations(UserBase): - def __init__( - self, - id: str, - *, - name: Optional[str] = None, - login: Optional[str] = None, - type: UserBaseTypeField = UserBaseTypeField.USER.value, - **kwargs - ): - """ - :param id: The unique identifier for this user - :type id: str - :param name: The display name of this user. If the collaboration status is `pending`, an empty string is returned., defaults to None - :type name: Optional[str], optional - :param login: The primary email address of this user. If the collaboration status is `pending`, an empty string is returned., defaults to None - :type login: Optional[str], optional - :param type: `user`, defaults to UserBaseTypeField.USER.value - :type type: UserBaseTypeField, optional - """ - super().__init__(id=id, type=type, **kwargs) - self.name = name - self.login = login - - -class UserMini(UserBase): - def __init__( - self, - id: str, - *, - name: Optional[str] = None, - login: Optional[str] = None, - type: UserBaseTypeField = UserBaseTypeField.USER.value, - **kwargs - ): - """ - :param id: The unique identifier for this user - :type id: str - :param name: The display name of this user, defaults to None - :type name: Optional[str], optional - :param login: The primary email address of this user, defaults to None - :type login: Optional[str], optional - :param type: `user`, defaults to UserBaseTypeField.USER.value - :type type: UserBaseTypeField, optional - """ - super().__init__(id=id, type=type, **kwargs) - self.name = name - self.login = login - - -class EventSourceItemTypeField(str, Enum): - FILE = 'file' - FOLDER = 'folder' - - -class EventSourceClassificationField(BaseObject): - def __init__(self, *, name: Optional[str] = None, **kwargs): - """ - :param name: The classification's name, defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.name = name - - -class EventSource(BaseObject): - _discriminator = 'item_type', {'file', 'folder'} - - def __init__( - self, - item_type: EventSourceItemTypeField, - item_id: str, - item_name: str, - *, - classification: Optional[EventSourceClassificationField] = None, - parent: Optional[FolderMini] = None, - owned_by: Optional[UserMini] = None, - **kwargs - ): - """ - :param item_type: The type of the item that the event - represents. Can be `file` or `folder`. - - :type item_type: EventSourceItemTypeField - :param item_id: The unique identifier that represents the - item. - - :type item_id: str - :param item_name: The name of the item. - - :type item_name: str - :param classification: The object containing classification information for the item that - triggered the event. This field will not appear if the item does not - have a classification set., defaults to None - :type classification: Optional[EventSourceClassificationField], optional - """ - super().__init__(**kwargs) - self.item_type = item_type - self.item_id = item_id - self.item_name = item_name - self.classification = classification - self.parent = parent - self.owned_by = owned_by - - -class UserStatusField(str, Enum): - ACTIVE = 'active' - INACTIVE = 'inactive' - CANNOT_DELETE_EDIT = 'cannot_delete_edit' - CANNOT_DELETE_EDIT_UPLOAD = 'cannot_delete_edit_upload' - - -class UserNotificationEmailField(BaseObject): - def __init__( - self, - *, - email: Optional[str] = None, - is_confirmed: Optional[bool] = None, - **kwargs - ): - """ - :param email: The email address to send the notifications to., defaults to None - :type email: Optional[str], optional - :param is_confirmed: Specifies if this email address has been confirmed., defaults to None - :type is_confirmed: Optional[bool], optional - """ - super().__init__(**kwargs) - self.email = email - self.is_confirmed = is_confirmed - - -class User(UserMini): - def __init__( - self, - id: str, - *, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - language: Optional[str] = None, - timezone: Optional[str] = None, - space_amount: Optional[int] = None, - space_used: Optional[int] = None, - max_upload_size: Optional[int] = None, - status: Optional[UserStatusField] = None, - job_title: Optional[str] = None, - phone: Optional[str] = None, - address: Optional[str] = None, - avatar_url: Optional[str] = None, - notification_email: Optional[UserNotificationEmailField] = None, - name: Optional[str] = None, - login: Optional[str] = None, - type: UserBaseTypeField = UserBaseTypeField.USER.value, - **kwargs - ): - """ - :param id: The unique identifier for this user - :type id: str - :param created_at: When the user object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the user object was last modified, defaults to None - :type modified_at: Optional[DateTime], optional - :param language: The language of the user, formatted in modified version of the - [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None - :type language: Optional[str], optional - :param timezone: The user's timezone, defaults to None - :type timezone: Optional[str], optional - :param space_amount: The user’s total available space amount in bytes, defaults to None - :type space_amount: Optional[int], optional - :param space_used: The amount of space in use by the user, defaults to None - :type space_used: Optional[int], optional - :param max_upload_size: The maximum individual file size in bytes the user can have, defaults to None - :type max_upload_size: Optional[int], optional - :param status: The user's account status, defaults to None - :type status: Optional[UserStatusField], optional - :param job_title: The user’s job title, defaults to None - :type job_title: Optional[str], optional - :param phone: The user’s phone number, defaults to None - :type phone: Optional[str], optional - :param address: The user’s address, defaults to None - :type address: Optional[str], optional - :param avatar_url: URL of the user’s avatar image, defaults to None - :type avatar_url: Optional[str], optional - :param notification_email: An alternate notification email address to which email - notifications are sent. When it's confirmed, this will be - the email address to which notifications are sent instead of - to the primary email address., defaults to None - :type notification_email: Optional[UserNotificationEmailField], optional - :param name: The display name of this user, defaults to None - :type name: Optional[str], optional - :param login: The primary email address of this user, defaults to None - :type login: Optional[str], optional - :param type: `user`, defaults to UserBaseTypeField.USER.value - :type type: UserBaseTypeField, optional - """ - super().__init__(id=id, name=name, login=login, type=type, **kwargs) - self.created_at = created_at - self.modified_at = modified_at - self.language = language - self.timezone = timezone - self.space_amount = space_amount - self.space_used = space_used - self.max_upload_size = max_upload_size - self.status = status - self.job_title = job_title - self.phone = phone - self.address = address - self.avatar_url = avatar_url - self.notification_email = notification_email - - -class TrashWebLinkRestoredTypeField(str, Enum): - WEB_LINK = 'web_link' - - -class TrashWebLinkRestoredPathCollectionField(BaseObject): - def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): - """ - :param total_count: The number of folders in this list. - :type total_count: int - :param entries: The parent folders for this item - :type entries: List[FolderMini] - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class TrashWebLinkRestoredItemStatusField(str, Enum): - ACTIVE = 'active' - TRASHED = 'trashed' - DELETED = 'deleted' - - -class TrashWebLinkRestored(BaseObject): - _discriminator = 'type', {'web_link'} - - def __init__( - self, - sequence_id: str, - path_collection: TrashWebLinkRestoredPathCollectionField, - *, - type: Optional[TrashWebLinkRestoredTypeField] = None, - id: Optional[str] = None, - etag: Optional[str] = None, - name: Optional[str] = None, - url: Optional[str] = None, - parent: Optional[FolderMini] = None, - description: Optional[str] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, - created_by: Optional[UserMini] = None, - modified_by: Optional[UserMini] = None, - owned_by: Optional[UserMini] = None, - shared_link: Optional[str] = None, - item_status: Optional[TrashWebLinkRestoredItemStatusField] = None, - **kwargs - ): - """ - :param type: `web_link`, defaults to None - :type type: Optional[TrashWebLinkRestoredTypeField], optional - :param id: The unique identifier for this web link, defaults to None - :type id: Optional[str], optional - :param etag: The entity tag of this web link. Used with `If-Match` - headers., defaults to None - :type etag: Optional[str], optional - :param name: The name of the web link, defaults to None - :type name: Optional[str], optional - :param url: The URL this web link points to, defaults to None - :type url: Optional[str], optional - :param description: The description accompanying the web link. This is - visible within the Box web application., defaults to None - :type description: Optional[str], optional - :param created_at: When this file was created on Box’s servers., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When this file was last updated on the Box - servers., defaults to None - :type modified_at: Optional[DateTime], optional - :param trashed_at: The time at which this bookmark was put in the - trash - becomes `null` after restore., defaults to None - :type trashed_at: Optional[str], optional - :param purged_at: The time at which this bookmark will be permanently - deleted - becomes `null` after restore., defaults to None - :type purged_at: Optional[str], optional - :param shared_link: The shared link for this bookmark. This will - be `null` if a bookmark had been trashed, even though the original shared - link does become active again., defaults to None - :type shared_link: Optional[str], optional - :param item_status: Whether this item is deleted or not. Values include `active`, - `trashed` if the file has been moved to the trash, and `deleted` if - the file has been permanently deleted, defaults to None - :type item_status: Optional[TrashWebLinkRestoredItemStatusField], optional - """ - super().__init__(**kwargs) - self.sequence_id = sequence_id - self.path_collection = path_collection - self.type = type - self.id = id - self.etag = etag - self.name = name - self.url = url - self.parent = parent - self.description = description - self.created_at = created_at - self.modified_at = modified_at - self.trashed_at = trashed_at - self.purged_at = purged_at - self.created_by = created_by - self.modified_by = modified_by - self.owned_by = owned_by - self.shared_link = shared_link - self.item_status = item_status - - -class TrashFolderRestoredTypeField(str, Enum): - FOLDER = 'folder' - - -class TrashFolderRestoredPathCollectionField(BaseObject): - def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): - """ - :param total_count: The number of folders in this list. - :type total_count: int - :param entries: The parent folders for this item - :type entries: List[FolderMini] - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class TrashFolderRestoredItemStatusField(str, Enum): - ACTIVE = 'active' - TRASHED = 'trashed' - DELETED = 'deleted' - - -class TrashFolderRestored(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - *, - id: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[TrashFolderRestoredTypeField] = None, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - description: Optional[str] = None, - size: Optional[int] = None, - path_collection: Optional[TrashFolderRestoredPathCollectionField] = None, - created_by: Optional[UserMini] = None, - modified_by: Optional[UserMini] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, - content_created_at: Optional[DateTime] = None, - content_modified_at: Optional[DateTime] = None, - owned_by: Optional[UserMini] = None, - shared_link: Optional[str] = None, - folder_upload_email: Optional[str] = None, - parent: Optional[FolderMini] = None, - item_status: Optional[TrashFolderRestoredItemStatusField] = None, - **kwargs - ): - """ - :param id: The unique identifier that represent a folder. - - The ID for any folder can be determined - by visiting a folder in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/folders/123` - the `folder_id` is `123`., defaults to None - :type id: Optional[str], optional - :param etag: The HTTP `etag` of this folder. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the folder if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `folder`, defaults to None - :type type: Optional[TrashFolderRestoredTypeField], optional - :param name: The name of the folder., defaults to None - :type name: Optional[str], optional - :param created_at: The date and time when the folder was created. This value may - be `null` for some folders such as the root folder or the trash - folder., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The date and time when the folder was last updated. This value may - be `null` for some folders such as the root folder or the trash - folder., defaults to None - :type modified_at: Optional[DateTime], optional - :param size: The folder size in bytes. - - Be careful parsing this integer as its - value can get very large., defaults to None - :type size: Optional[int], optional - :param trashed_at: The time at which this folder was put in the - trash - becomes `null` after restore., defaults to None - :type trashed_at: Optional[str], optional - :param purged_at: The time at which this folder is expected to be purged - from the trash - becomes `null` after restore., defaults to None - :type purged_at: Optional[str], optional - :param content_created_at: The date and time at which this folder was originally - created., defaults to None - :type content_created_at: Optional[DateTime], optional - :param content_modified_at: The date and time at which this folder was last updated., defaults to None - :type content_modified_at: Optional[DateTime], optional - :param shared_link: The shared link for this file. This will - be `null` if a folder had been trashed, even though the original shared - link does become active again., defaults to None - :type shared_link: Optional[str], optional - :param folder_upload_email: The folder upload email for this folder. This will - be `null` if a folder has been trashed, even though the original upload - email does become active again., defaults to None - :type folder_upload_email: Optional[str], optional - :param item_status: Defines if this item has been deleted or not. - - * `active` when the item has is not in the trash - * `trashed` when the item has been moved to the trash but not deleted - * `deleted` when the item has been permanently deleted., defaults to None - :type item_status: Optional[TrashFolderRestoredItemStatusField], optional - """ - super().__init__(**kwargs) - self.id = id - self.etag = etag - self.type = type - self.sequence_id = sequence_id - self.name = name - self.created_at = created_at - self.modified_at = modified_at - self.description = description - self.size = size - self.path_collection = path_collection - self.created_by = created_by - self.modified_by = modified_by - self.trashed_at = trashed_at - self.purged_at = purged_at - self.content_created_at = content_created_at - self.content_modified_at = content_modified_at - self.owned_by = owned_by - self.shared_link = shared_link - self.folder_upload_email = folder_upload_email - self.parent = parent - self.item_status = item_status - - -class TrashFileRestoredTypeField(str, Enum): - FILE = 'file' - - -class TrashFileRestoredPathCollectionField(BaseObject): - def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): - """ - :param total_count: The number of folders in this list. - :type total_count: int - :param entries: The parent folders for this item - :type entries: List[FolderMini] - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class TrashFileRestoredItemStatusField(str, Enum): - ACTIVE = 'active' - TRASHED = 'trashed' - DELETED = 'deleted' - - -class TrashFileRestored(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'sha_1': 'sha1', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'sha1': 'sha_1', - **BaseObject._json_to_fields_mapping, - } - _discriminator = 'type', {'file'} - - def __init__( - self, - id: str, - sequence_id: str, - sha_1: str, - description: str, - size: int, - path_collection: TrashFileRestoredPathCollectionField, - created_at: DateTime, - modified_at: DateTime, - modified_by: UserMini, - owned_by: UserMini, - item_status: TrashFileRestoredItemStatusField, - *, - etag: Optional[str] = None, - type: TrashFileRestoredTypeField = TrashFileRestoredTypeField.FILE.value, - name: Optional[str] = None, - file_version: Optional[FileVersionMini] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, - content_created_at: Optional[DateTime] = None, - content_modified_at: Optional[DateTime] = None, - created_by: Optional[UserMini] = None, - shared_link: Optional[str] = None, - parent: Optional[FolderMini] = None, - **kwargs - ): - """ - :param id: The unique identifier that represent a file. - - The ID for any file can be determined - by visiting a file in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/files/123` - the `file_id` is `123`. - :type id: str - :param sha_1: The SHA1 hash of the file. This can be used to compare the contents - of a file on Box with a local file. - :type sha_1: str - :param description: The optional description of this file - :type description: str - :param size: The file size in bytes. Be careful parsing this integer as it can - get very large and cause an integer overflow. - :type size: int - :param created_at: The date and time when the file was created on Box. - :type created_at: DateTime - :param modified_at: The date and time when the file was last updated on Box. - :type modified_at: DateTime - :param item_status: Defines if this item has been deleted or not. - - * `active` when the item has is not in the trash - * `trashed` when the item has been moved to the trash but not deleted - * `deleted` when the item has been permanently deleted. - :type item_status: TrashFileRestoredItemStatusField - :param etag: The HTTP `etag` of this file. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the file if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `file`, defaults to TrashFileRestoredTypeField.FILE.value - :type type: TrashFileRestoredTypeField, optional - :param name: The name of the file, defaults to None - :type name: Optional[str], optional - :param trashed_at: The time at which this file was put in the - trash - becomes `null` after restore., defaults to None - :type trashed_at: Optional[str], optional - :param purged_at: The time at which this file is expected to be purged - from the trash - becomes `null` after restore., defaults to None - :type purged_at: Optional[str], optional - :param content_created_at: The date and time at which this file was originally - created, which might be before it was uploaded to Box., defaults to None - :type content_created_at: Optional[DateTime], optional - :param content_modified_at: The date and time at which this file was last updated, - which might be before it was uploaded to Box., defaults to None - :type content_modified_at: Optional[DateTime], optional - :param shared_link: The shared link for this file. This will - be `null` if a file had been trashed, even though the original shared - link does become active again., defaults to None - :type shared_link: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.sequence_id = sequence_id - self.sha_1 = sha_1 - self.description = description - self.size = size - self.path_collection = path_collection - self.created_at = created_at - self.modified_at = modified_at - self.modified_by = modified_by - self.owned_by = owned_by - self.item_status = item_status - self.etag = etag - self.type = type - self.name = name - self.file_version = file_version - self.trashed_at = trashed_at - self.purged_at = purged_at - self.content_created_at = content_created_at - self.content_modified_at = content_modified_at - self.created_by = created_by - self.shared_link = shared_link - self.parent = parent - - -class TrashWebLinkTypeField(str, Enum): - WEB_LINK = 'web_link' - - -class TrashWebLinkPathCollectionEntriesTypeField(str, Enum): - FOLDER = 'folder' - - -class TrashWebLinkPathCollectionEntriesField(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - *, - type: Optional[TrashWebLinkPathCollectionEntriesTypeField] = None, - id: Optional[str] = None, - sequence_id: Optional[str] = None, - etag: Optional[str] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :param type: `folder`, defaults to None - :type type: Optional[TrashWebLinkPathCollectionEntriesTypeField], optional - :param id: The unique identifier that represent a folder., defaults to None - :type id: Optional[str], optional - :param sequence_id: This field is null for the Trash folder, defaults to None - :type sequence_id: Optional[str], optional - :param etag: This field is null for the Trash folder, defaults to None - :type etag: Optional[str], optional - :param name: The name of the Trash folder., defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - self.sequence_id = sequence_id - self.etag = etag - self.name = name - - -class TrashWebLinkPathCollectionField(BaseObject): - def __init__( - self, - total_count: int, - entries: List[TrashWebLinkPathCollectionEntriesField], - **kwargs - ): - """ - :param total_count: The number of folders in this list. - :type total_count: int - :param entries: Array of folders for this item's path collection - :type entries: List[TrashWebLinkPathCollectionEntriesField] - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class TrashWebLinkItemStatusField(str, Enum): - ACTIVE = 'active' - TRASHED = 'trashed' - DELETED = 'deleted' - - -class TrashWebLink(BaseObject): - _discriminator = 'type', {'web_link'} - - def __init__( - self, - *, - type: Optional[TrashWebLinkTypeField] = None, - id: Optional[str] = None, - sequence_id: Optional[str] = None, - etag: Optional[str] = None, - name: Optional[str] = None, - url: Optional[str] = None, - parent: Optional[FolderMini] = None, - description: Optional[str] = None, - path_collection: Optional[TrashWebLinkPathCollectionField] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - trashed_at: Optional[DateTime] = None, - purged_at: Optional[DateTime] = None, - created_by: Optional[UserMini] = None, - modified_by: Optional[UserMini] = None, - owned_by: Optional[UserMini] = None, - shared_link: Optional[str] = None, - item_status: Optional[TrashWebLinkItemStatusField] = None, - **kwargs - ): - """ - :param type: `web_link`, defaults to None - :type type: Optional[TrashWebLinkTypeField], optional - :param id: The unique identifier for this web link, defaults to None - :type id: Optional[str], optional - :param etag: The entity tag of this web link. Used with `If-Match` - headers., defaults to None - :type etag: Optional[str], optional - :param name: The name of the web link, defaults to None - :type name: Optional[str], optional - :param url: The URL this web link points to, defaults to None - :type url: Optional[str], optional - :param description: The description accompanying the web link. This is - visible within the Box web application., defaults to None - :type description: Optional[str], optional - :param created_at: When this file was created on Box’s servers., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When this file was last updated on the Box - servers., defaults to None - :type modified_at: Optional[DateTime], optional - :param trashed_at: When this file was last moved to the trash., defaults to None - :type trashed_at: Optional[DateTime], optional - :param purged_at: When this file will be permanently deleted., defaults to None - :type purged_at: Optional[DateTime], optional - :param shared_link: The shared link for this bookmark. This will - be `null` if a bookmark has been trashed, since the link will no longer - be active., defaults to None - :type shared_link: Optional[str], optional - :param item_status: Whether this item is deleted or not. Values include `active`, - `trashed` if the file has been moved to the trash, and `deleted` if - the file has been permanently deleted, defaults to None - :type item_status: Optional[TrashWebLinkItemStatusField], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - self.sequence_id = sequence_id - self.etag = etag - self.name = name - self.url = url - self.parent = parent - self.description = description - self.path_collection = path_collection - self.created_at = created_at - self.modified_at = modified_at - self.trashed_at = trashed_at - self.purged_at = purged_at - self.created_by = created_by - self.modified_by = modified_by - self.owned_by = owned_by - self.shared_link = shared_link - self.item_status = item_status - - -class TrashFolderTypeField(str, Enum): - FOLDER = 'folder' - - -class TrashFolderPathCollectionEntriesTypeField(str, Enum): - FOLDER = 'folder' - - -class TrashFolderPathCollectionEntriesField(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - *, - type: Optional[TrashFolderPathCollectionEntriesTypeField] = None, - id: Optional[str] = None, - sequence_id: Optional[str] = None, - etag: Optional[str] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :param type: `folder`, defaults to None - :type type: Optional[TrashFolderPathCollectionEntriesTypeField], optional - :param id: The unique identifier that represent a folder., defaults to None - :type id: Optional[str], optional - :param sequence_id: This field is null for the Trash folder, defaults to None - :type sequence_id: Optional[str], optional - :param etag: This field is null for the Trash folder, defaults to None - :type etag: Optional[str], optional - :param name: The name of the Trash folder., defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - self.sequence_id = sequence_id - self.etag = etag - self.name = name - - -class TrashFolderPathCollectionField(BaseObject): - def __init__( - self, - total_count: int, - entries: List[TrashFolderPathCollectionEntriesField], - **kwargs - ): - """ - :param total_count: The number of folders in this list. - :type total_count: int - :param entries: Array of folders for this item's path collection - :type entries: List[TrashFolderPathCollectionEntriesField] - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class TrashFolderItemStatusField(str, Enum): - ACTIVE = 'active' - TRASHED = 'trashed' - DELETED = 'deleted' - - -class TrashFolder(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - id: str, - name: str, - description: str, - size: int, - path_collection: TrashFolderPathCollectionField, - created_by: UserMini, - modified_by: UserMini, - owned_by: UserMini, - item_status: TrashFolderItemStatusField, - *, - etag: Optional[str] = None, - type: TrashFolderTypeField = TrashFolderTypeField.FOLDER.value, - sequence_id: Optional[str] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - trashed_at: Optional[DateTime] = None, - purged_at: Optional[DateTime] = None, - content_created_at: Optional[DateTime] = None, - content_modified_at: Optional[DateTime] = None, - shared_link: Optional[str] = None, - folder_upload_email: Optional[str] = None, - parent: Optional[FolderMini] = None, - **kwargs - ): - """ - :param id: The unique identifier that represent a folder. - - The ID for any folder can be determined - by visiting a folder in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/folders/123` - the `folder_id` is `123`. - :type id: str - :param name: The name of the folder. - :type name: str - :param size: The folder size in bytes. - - Be careful parsing this integer as its - value can get very large. - :type size: int - :param item_status: Defines if this item has been deleted or not. - - * `active` when the item has is not in the trash - * `trashed` when the item has been moved to the trash but not deleted - * `deleted` when the item has been permanently deleted. - :type item_status: TrashFolderItemStatusField - :param etag: The HTTP `etag` of this folder. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the folder if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `folder`, defaults to TrashFolderTypeField.FOLDER.value - :type type: TrashFolderTypeField, optional - :param created_at: The date and time when the folder was created. This value may - be `null` for some folders such as the root folder or the trash - folder., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The date and time when the folder was last updated. This value may - be `null` for some folders such as the root folder or the trash - folder., defaults to None - :type modified_at: Optional[DateTime], optional - :param trashed_at: The time at which this folder was put in the trash., defaults to None - :type trashed_at: Optional[DateTime], optional - :param purged_at: The time at which this folder is expected to be purged - from the trash., defaults to None - :type purged_at: Optional[DateTime], optional - :param content_created_at: The date and time at which this folder was originally - created., defaults to None - :type content_created_at: Optional[DateTime], optional - :param content_modified_at: The date and time at which this folder was last updated., defaults to None - :type content_modified_at: Optional[DateTime], optional - :param shared_link: The shared link for this folder. This will - be `null` if a folder has been trashed, since the link will no longer - be active., defaults to None - :type shared_link: Optional[str], optional - :param folder_upload_email: The folder upload email for this folder. This will - be `null` if a folder has been trashed, since the upload will no longer - work., defaults to None - :type folder_upload_email: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.name = name - self.description = description - self.size = size - self.path_collection = path_collection - self.created_by = created_by - self.modified_by = modified_by - self.owned_by = owned_by - self.item_status = item_status - self.etag = etag - self.type = type - self.sequence_id = sequence_id - self.created_at = created_at - self.modified_at = modified_at - self.trashed_at = trashed_at - self.purged_at = purged_at - self.content_created_at = content_created_at - self.content_modified_at = content_modified_at - self.shared_link = shared_link - self.folder_upload_email = folder_upload_email - self.parent = parent - - -class TrashFileTypeField(str, Enum): - FILE = 'file' - - -class TrashFilePathCollectionEntriesTypeField(str, Enum): - FOLDER = 'folder' - - -class TrashFilePathCollectionEntriesField(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - *, - type: Optional[TrashFilePathCollectionEntriesTypeField] = None, - id: Optional[str] = None, - sequence_id: Optional[str] = None, - etag: Optional[str] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :param type: `folder`, defaults to None - :type type: Optional[TrashFilePathCollectionEntriesTypeField], optional - :param id: The unique identifier that represent a folder., defaults to None - :type id: Optional[str], optional - :param sequence_id: This field is null for the Trash folder, defaults to None - :type sequence_id: Optional[str], optional - :param etag: This field is null for the Trash folder, defaults to None - :type etag: Optional[str], optional - :param name: The name of the Trash folder., defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - self.sequence_id = sequence_id - self.etag = etag - self.name = name - - -class TrashFilePathCollectionField(BaseObject): - def __init__( - self, - total_count: int, - entries: List[TrashFilePathCollectionEntriesField], - **kwargs - ): - """ - :param total_count: The number of folders in this list. - :type total_count: int - :param entries: Array of folders for this item's path collection - :type entries: List[TrashFilePathCollectionEntriesField] - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class TrashFileItemStatusField(str, Enum): - ACTIVE = 'active' - TRASHED = 'trashed' - DELETED = 'deleted' - - -class TrashFile(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'sha_1': 'sha1', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'sha1': 'sha_1', - **BaseObject._json_to_fields_mapping, - } - _discriminator = 'type', {'file'} - - def __init__( - self, - id: str, - sequence_id: str, - sha_1: str, - description: str, - size: int, - path_collection: TrashFilePathCollectionField, - created_at: DateTime, - modified_at: DateTime, - modified_by: UserMini, - owned_by: UserMini, - item_status: TrashFileItemStatusField, - *, - etag: Optional[str] = None, - type: TrashFileTypeField = TrashFileTypeField.FILE.value, - name: Optional[str] = None, - file_version: Optional[FileVersionMini] = None, - trashed_at: Optional[DateTime] = None, - purged_at: Optional[DateTime] = None, - content_created_at: Optional[DateTime] = None, - content_modified_at: Optional[DateTime] = None, - created_by: Optional[UserMini] = None, - shared_link: Optional[str] = None, - parent: Optional[FolderMini] = None, - **kwargs - ): - """ - :param id: The unique identifier that represent a file. - - The ID for any file can be determined - by visiting a file in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/files/123` - the `file_id` is `123`. - :type id: str - :param sha_1: The SHA1 hash of the file. This can be used to compare the contents - of a file on Box with a local file. - :type sha_1: str - :param description: The optional description of this file - :type description: str - :param size: The file size in bytes. Be careful parsing this integer as it can - get very large and cause an integer overflow. - :type size: int - :param created_at: The date and time when the file was created on Box. - :type created_at: DateTime - :param modified_at: The date and time when the file was last updated on Box. - :type modified_at: DateTime - :param item_status: Defines if this item has been deleted or not. - - * `active` when the item has is not in the trash - * `trashed` when the item has been moved to the trash but not deleted - * `deleted` when the item has been permanently deleted. - :type item_status: TrashFileItemStatusField - :param etag: The HTTP `etag` of this file. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the file if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `file`, defaults to TrashFileTypeField.FILE.value - :type type: TrashFileTypeField, optional - :param name: The name of the file, defaults to None - :type name: Optional[str], optional - :param trashed_at: The time at which this file was put in the trash., defaults to None - :type trashed_at: Optional[DateTime], optional - :param purged_at: The time at which this file is expected to be purged - from the trash., defaults to None - :type purged_at: Optional[DateTime], optional - :param content_created_at: The date and time at which this file was originally - created, which might be before it was uploaded to Box., defaults to None - :type content_created_at: Optional[DateTime], optional - :param content_modified_at: The date and time at which this file was last updated, - which might be before it was uploaded to Box., defaults to None - :type content_modified_at: Optional[DateTime], optional - :param shared_link: The shared link for this file. This will - be `null` if a file has been trashed, since the link will no longer - be active., defaults to None - :type shared_link: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.sequence_id = sequence_id - self.sha_1 = sha_1 - self.description = description - self.size = size - self.path_collection = path_collection - self.created_at = created_at - self.modified_at = modified_at - self.modified_by = modified_by - self.owned_by = owned_by - self.item_status = item_status - self.etag = etag - self.type = type - self.name = name - self.file_version = file_version - self.trashed_at = trashed_at - self.purged_at = purged_at - self.content_created_at = content_created_at - self.content_modified_at = content_modified_at - self.created_by = created_by - self.shared_link = shared_link - self.parent = parent - - -class TermsOfServiceUserStatusTypeField(str, Enum): - TERMS_OF_SERVICE_USER_STATUS = 'terms_of_service_user_status' - - -class TermsOfServiceUserStatus(BaseObject): - _discriminator = 'type', {'terms_of_service_user_status'} - - def __init__( - self, - id: str, - *, - type: TermsOfServiceUserStatusTypeField = TermsOfServiceUserStatusTypeField.TERMS_OF_SERVICE_USER_STATUS.value, - tos: Optional[TermsOfServiceBase] = None, - user: Optional[UserMini] = None, - is_accepted: Optional[bool] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param id: The unique identifier for this terms of service user status - :type id: str - :param type: `terms_of_service_user_status`, defaults to TermsOfServiceUserStatusTypeField.TERMS_OF_SERVICE_USER_STATUS.value - :type type: TermsOfServiceUserStatusTypeField, optional - :param is_accepted: If the user has accepted the terms of services, defaults to None - :type is_accepted: Optional[bool], optional - :param created_at: When the legal item was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the legal item was modified., defaults to None - :type modified_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.tos = tos - self.user = user - self.is_accepted = is_accepted - self.created_at = created_at - self.modified_at = modified_at - - -class TermsOfServiceUserStatuses(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - entries: Optional[List[TermsOfServiceUserStatus]] = None, - **kwargs - ): - """ - :param total_count: The total number of objects., defaults to None - :type total_count: Optional[int], optional - :param entries: A list of terms of service user statuses, defaults to None - :type entries: Optional[List[TermsOfServiceUserStatus]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class TaskAssignmentTypeField(str, Enum): - TASK_ASSIGNMENT = 'task_assignment' - - -class TaskAssignmentResolutionStateField(str, Enum): - COMPLETED = 'completed' - INCOMPLETE = 'incomplete' - APPROVED = 'approved' - REJECTED = 'rejected' - - -class TaskAssignment(BaseObject): - _discriminator = 'type', {'task_assignment'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[TaskAssignmentTypeField] = None, - item: Optional[FileMini] = None, - assigned_to: Optional[UserMini] = None, - message: Optional[str] = None, - completed_at: Optional[DateTime] = None, - assigned_at: Optional[DateTime] = None, - reminded_at: Optional[DateTime] = None, - resolution_state: Optional[TaskAssignmentResolutionStateField] = None, - assigned_by: Optional[UserMini] = None, - **kwargs - ): - """ - :param id: The unique identifier for this task assignment, defaults to None - :type id: Optional[str], optional - :param type: `task_assignment`, defaults to None - :type type: Optional[TaskAssignmentTypeField], optional - :param message: A message that will is included with the task - assignment. This is visible to the assigned user in the web and mobile - UI., defaults to None - :type message: Optional[str], optional - :param completed_at: The date at which this task assignment was - completed. This will be `null` if the task is not completed yet., defaults to None - :type completed_at: Optional[DateTime], optional - :param assigned_at: The date at which this task was assigned to the user., defaults to None - :type assigned_at: Optional[DateTime], optional - :param reminded_at: The date at which the assigned user was reminded of this task - assignment., defaults to None - :type reminded_at: Optional[DateTime], optional - :param resolution_state: The current state of the assignment. The available states depend on - the `action` value of the task object., defaults to None - :type resolution_state: Optional[TaskAssignmentResolutionStateField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.item = item - self.assigned_to = assigned_to - self.message = message - self.completed_at = completed_at - self.assigned_at = assigned_at - self.reminded_at = reminded_at - self.resolution_state = resolution_state - self.assigned_by = assigned_by - - -class TaskAssignments(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - entries: Optional[List[TaskAssignment]] = None, - **kwargs - ): - """ - :param total_count: The total number of items in this collection., defaults to None - :type total_count: Optional[int], optional - :param entries: A list of task assignments, defaults to None - :type entries: Optional[List[TaskAssignment]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class TaskTypeField(str, Enum): - TASK = 'task' - - -class TaskActionField(str, Enum): - REVIEW = 'review' - COMPLETE = 'complete' - - -class TaskCompletionRuleField(str, Enum): - ALL_ASSIGNEES = 'all_assignees' - ANY_ASSIGNEE = 'any_assignee' - - -class Task(BaseObject): - _discriminator = 'type', {'task'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[TaskTypeField] = None, - item: Optional[FileMini] = None, - due_at: Optional[DateTime] = None, - action: Optional[TaskActionField] = None, - message: Optional[str] = None, - task_assignment_collection: Optional[TaskAssignments] = None, - is_completed: Optional[bool] = None, - created_by: Optional[UserMini] = None, - created_at: Optional[DateTime] = None, - completion_rule: Optional[TaskCompletionRuleField] = None, - **kwargs - ): - """ - :param id: The unique identifier for this task, defaults to None - :type id: Optional[str], optional - :param type: `task`, defaults to None - :type type: Optional[TaskTypeField], optional - :param due_at: When the task is due, defaults to None - :type due_at: Optional[DateTime], optional - :param action: The type of task the task assignee will be prompted to - perform., defaults to None - :type action: Optional[TaskActionField], optional - :param message: A message that will be included with the task, defaults to None - :type message: Optional[str], optional - :param is_completed: Whether the task has been completed, defaults to None - :type is_completed: Optional[bool], optional - :param created_at: When the task object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param completion_rule: Defines which assignees need to complete this task before the task - is considered completed. - - * `all_assignees` requires all assignees to review or - approve the the task in order for it to be considered completed. - * `any_assignee` accepts any one assignee to review or - approve the the task in order for it to be considered completed., defaults to None - :type completion_rule: Optional[TaskCompletionRuleField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.item = item - self.due_at = due_at - self.action = action - self.message = message - self.task_assignment_collection = task_assignment_collection - self.is_completed = is_completed - self.created_by = created_by - self.created_at = created_at - self.completion_rule = completion_rule - - -class Tasks(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - entries: Optional[List[Task]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`., defaults to None - :type total_count: Optional[int], optional - :param entries: A list of tasks, defaults to None - :type entries: Optional[List[Task]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class RetentionPolicyAssignmentTypeField(str, Enum): - RETENTION_POLICY_ASSIGNMENT = 'retention_policy_assignment' - - -class RetentionPolicyAssignmentAssignedToTypeField(str, Enum): - FOLDER = 'folder' - ENTERPRISE = 'enterprise' - METADATA_TEMPLATE = 'metadata_template' - - -class RetentionPolicyAssignmentAssignedToField(BaseObject): - _discriminator = 'type', {'folder', 'enterprise', 'metadata_template'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[RetentionPolicyAssignmentAssignedToTypeField] = None, - **kwargs - ): - """ - :param id: The ID of the folder, enterprise, or metadata template - the policy is assigned to. - Set to null or omit when type is set to enterprise., defaults to None - :type id: Optional[str], optional - :param type: The type of resource the policy is assigned to., defaults to None - :type type: Optional[RetentionPolicyAssignmentAssignedToTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class RetentionPolicyAssignmentFilterFieldsField(BaseObject): - def __init__( - self, *, field: Optional[str] = None, value: Optional[str] = None, **kwargs - ): - """ - :param field: The metadata attribute key id., defaults to None - :type field: Optional[str], optional - :param value: The metadata attribute field id. For value, only - enum and multiselect types are supported., defaults to None - :type value: Optional[str], optional - """ - super().__init__(**kwargs) - self.field = field - self.value = value - - -class RetentionPolicyAssignment(BaseObject): - _discriminator = 'type', {'retention_policy_assignment'} - - def __init__( - self, - id: str, - *, - type: RetentionPolicyAssignmentTypeField = RetentionPolicyAssignmentTypeField.RETENTION_POLICY_ASSIGNMENT.value, - retention_policy: Optional[RetentionPolicyMini] = None, - assigned_to: Optional[RetentionPolicyAssignmentAssignedToField] = None, - filter_fields: Optional[ - List[RetentionPolicyAssignmentFilterFieldsField] - ] = None, - assigned_by: Optional[UserMini] = None, - assigned_at: Optional[DateTime] = None, - start_date_field: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for a retention policy assignment. - :type id: str - :param type: `retention_policy_assignment`, defaults to RetentionPolicyAssignmentTypeField.RETENTION_POLICY_ASSIGNMENT.value - :type type: RetentionPolicyAssignmentTypeField, optional - :param assigned_to: The `type` and `id` of the content that is under - retention. The `type` can either be `folder` - `enterprise`, or `metadata_template`., defaults to None - :type assigned_to: Optional[RetentionPolicyAssignmentAssignedToField], optional - :param filter_fields: An array of field objects. Values are only returned if the `assigned_to` - type is `metadata_template`. Otherwise, the array is blank., defaults to None - :type filter_fields: Optional[List[RetentionPolicyAssignmentFilterFieldsField]], optional - :param assigned_at: When the retention policy assignment object was - created., defaults to None - :type assigned_at: Optional[DateTime], optional - :param start_date_field: The date the retention policy assignment begins. - If the `assigned_to` type is `metadata_template`, - this field can be a date field's metadata attribute key id., defaults to None - :type start_date_field: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.retention_policy = retention_policy - self.assigned_to = assigned_to - self.filter_fields = filter_fields - self.assigned_by = assigned_by - self.assigned_at = assigned_at - self.start_date_field = start_date_field - - -class RetentionPolicyAssignments(BaseObject): - def __init__( - self, - *, - entries: Optional[List[RetentionPolicyAssignment]] = None, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - **kwargs - ): - """ - :param entries: A list of retention policy assignments, defaults to None - :type entries: Optional[List[RetentionPolicyAssignment]], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param next_marker: The marker for the start of the next page of results., defaults to None - :type next_marker: Optional[str], optional - """ - super().__init__(**kwargs) - self.entries = entries - self.limit = limit - self.next_marker = next_marker - - -class RetentionPolicyPolicyTypeField(str, Enum): - FINITE = 'finite' - INDEFINITE = 'indefinite' - - -class RetentionPolicyRetentionTypeField(str, Enum): - MODIFIABLE = 'modifiable' - NON_MODIFIABLE = 'non_modifiable' - - -class RetentionPolicyStatusField(str, Enum): - ACTIVE = 'active' - RETIRED = 'retired' - - -class RetentionPolicyAssignmentCountsField(BaseObject): - def __init__( - self, - *, - enterprise: Optional[int] = None, - folder: Optional[int] = None, - metadata_template: Optional[int] = None, - **kwargs - ): - """ - :param enterprise: The number of enterprise assignments this policy has. The maximum value is 1., defaults to None - :type enterprise: Optional[int], optional - :param folder: The number of folder assignments this policy has., defaults to None - :type folder: Optional[int], optional - :param metadata_template: The number of metadata template assignments this policy has., defaults to None - :type metadata_template: Optional[int], optional - """ - super().__init__(**kwargs) - self.enterprise = enterprise - self.folder = folder - self.metadata_template = metadata_template - - -class RetentionPolicy(RetentionPolicyMini): - def __init__( - self, - id: str, - *, - description: Optional[str] = None, - policy_type: Optional[RetentionPolicyPolicyTypeField] = None, - retention_type: Optional[RetentionPolicyRetentionTypeField] = None, - status: Optional[RetentionPolicyStatusField] = None, - created_by: Optional[UserMini] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - can_owner_extend_retention: Optional[bool] = None, - are_owners_notified: Optional[bool] = None, - custom_notification_recipients: Optional[List[UserMini]] = None, - assignment_counts: Optional[RetentionPolicyAssignmentCountsField] = None, - policy_name: Optional[str] = None, - retention_length: Optional[str] = None, - disposition_action: Optional[RetentionPolicyMiniDispositionActionField] = None, - type: RetentionPolicyBaseTypeField = RetentionPolicyBaseTypeField.RETENTION_POLICY.value, - **kwargs - ): - """ - :param id: The unique identifier that represents a retention policy. - :type id: str - :param description: The additional text description of the retention policy., defaults to None - :type description: Optional[str], optional - :param policy_type: The type of the retention policy. A retention - policy type can either be `finite`, where a - specific amount of time to retain the content is known - upfront, or `indefinite`, where the amount of time - to retain the content is still unknown., defaults to None - :type policy_type: Optional[RetentionPolicyPolicyTypeField], optional - :param retention_type: Specifies the retention type: - - * `modifiable`: You can modify the retention policy. For example, - you can add or remove folders, shorten or lengthen - the policy duration, or delete the assignment. - Use this type if your retention policy - is not related to any regulatory purposes. - - * `non-modifiable`: You can modify the retention policy - only in a limited way: add a folder, lengthen the duration, - retire the policy, change the disposition action - or notification settings. You cannot perform other actions, - such as deleting the assignment or shortening the - policy duration. Use this type to ensure - compliance with regulatory retention policies., defaults to None - :type retention_type: Optional[RetentionPolicyRetentionTypeField], optional - :param status: The status of the retention policy. The status of - a policy will be `active`, unless explicitly retired by an - administrator, in which case the status will be `retired`. - Once a policy has been retired, it cannot become - active again., defaults to None - :type status: Optional[RetentionPolicyStatusField], optional - :param created_at: When the retention policy object was created., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the retention policy object was last modified., defaults to None - :type modified_at: Optional[DateTime], optional - :param can_owner_extend_retention: Determines if the owner of items under the policy - can extend the retention when the original - retention duration is about to end., defaults to None - :type can_owner_extend_retention: Optional[bool], optional - :param are_owners_notified: Determines if owners and co-owners of items - under the policy are notified when - the retention duration is about to end., defaults to None - :type are_owners_notified: Optional[bool], optional - :param custom_notification_recipients: A list of users notified when the retention policy duration is about to end., defaults to None - :type custom_notification_recipients: Optional[List[UserMini]], optional - :param assignment_counts: Counts the retention policy assignments for each item type., defaults to None - :type assignment_counts: Optional[RetentionPolicyAssignmentCountsField], optional - :param policy_name: The name given to the retention policy., defaults to None - :type policy_name: Optional[str], optional - :param retention_length: The length of the retention policy. This value - specifies the duration in days that the retention - policy will be active for after being assigned to - content. If the policy has a `policy_type` of - `indefinite`, the `retention_length` will also be - `indefinite`., defaults to None - :type retention_length: Optional[str], optional - :param disposition_action: The disposition action of the retention policy. - This action can be `permanently_delete`, which - will cause the content retained by the policy - to be permanently deleted, or `remove_retention`, - which will lift the retention policy from the content, - allowing it to be deleted by users, - once the retention policy has expired., defaults to None - :type disposition_action: Optional[RetentionPolicyMiniDispositionActionField], optional - :param type: `retention_policy`, defaults to RetentionPolicyBaseTypeField.RETENTION_POLICY.value - :type type: RetentionPolicyBaseTypeField, optional - """ - super().__init__( - id=id, - policy_name=policy_name, - retention_length=retention_length, - disposition_action=disposition_action, - type=type, - **kwargs - ) - self.description = description - self.policy_type = policy_type - self.retention_type = retention_type - self.status = status - self.created_by = created_by - self.created_at = created_at - self.modified_at = modified_at - self.can_owner_extend_retention = can_owner_extend_retention - self.are_owners_notified = are_owners_notified - self.custom_notification_recipients = custom_notification_recipients - self.assignment_counts = assignment_counts - - -class RetentionPolicies(BaseObject): - def __init__( - self, - *, - entries: Optional[List[RetentionPolicy]] = None, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - **kwargs - ): - """ - :param entries: A list in which each entry represents a retention policy object., defaults to None - :type entries: Optional[List[RetentionPolicy]], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param next_marker: The marker for the start of the next page of results., defaults to None - :type next_marker: Optional[str], optional - """ - super().__init__(**kwargs) - self.entries = entries - self.limit = limit - self.next_marker = next_marker - - -class LegalHoldPolicyStatusField(str, Enum): - ACTIVE = 'active' - APPLYING = 'applying' - RELEASING = 'releasing' - RELEASED = 'released' - - -class LegalHoldPolicyAssignmentCountsField(BaseObject): - def __init__( - self, - *, - user: Optional[int] = None, - folder: Optional[int] = None, - file: Optional[int] = None, - file_version: Optional[int] = None, - **kwargs - ): - """ - :param user: The number of users this policy is applied to, defaults to None - :type user: Optional[int], optional - :param folder: The number of folders this policy is applied to, defaults to None - :type folder: Optional[int], optional - :param file: The number of files this policy is applied to, defaults to None - :type file: Optional[int], optional - :param file_version: The number of file versions this policy is applied to, defaults to None - :type file_version: Optional[int], optional - """ - super().__init__(**kwargs) - self.user = user - self.folder = folder - self.file = file - self.file_version = file_version - - -class LegalHoldPolicy(LegalHoldPolicyMini): - def __init__( - self, - id: str, - *, - policy_name: Optional[str] = None, - description: Optional[str] = None, - status: Optional[LegalHoldPolicyStatusField] = None, - assignment_counts: Optional[LegalHoldPolicyAssignmentCountsField] = None, - created_by: Optional[UserMini] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - deleted_at: Optional[DateTime] = None, - filter_started_at: Optional[DateTime] = None, - filter_ended_at: Optional[DateTime] = None, - release_notes: Optional[str] = None, - type: LegalHoldPolicyMiniTypeField = LegalHoldPolicyMiniTypeField.LEGAL_HOLD_POLICY.value, - **kwargs - ): - """ - :param id: The unique identifier for this legal hold policy - :type id: str - :param policy_name: Name of the legal hold policy., defaults to None - :type policy_name: Optional[str], optional - :param description: Description of the legal hold policy. Optional - property with a 500 character limit., defaults to None - :type description: Optional[str], optional - :param status: * 'active' - the policy is not in a transition state - * 'applying' - that the policy is in the process of - being applied - * 'releasing' - that the process is in the process - of being released - * 'released' - the policy is no longer active, defaults to None - :type status: Optional[LegalHoldPolicyStatusField], optional - :param assignment_counts: Counts of assignments within this a legal hold policy by item type, defaults to None - :type assignment_counts: Optional[LegalHoldPolicyAssignmentCountsField], optional - :param created_at: When the legal hold policy object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the legal hold policy object was modified. - Does not update when assignments are added or removed., defaults to None - :type modified_at: Optional[DateTime], optional - :param deleted_at: When the policy release request was sent. (Because - it can take time for a policy to fully delete, this - isn't quite the same time that the policy is fully deleted). - - If `null`, the policy was not deleted., defaults to None - :type deleted_at: Optional[DateTime], optional - :param filter_started_at: User-specified, optional date filter applies to - Custodian assignments only, defaults to None - :type filter_started_at: Optional[DateTime], optional - :param filter_ended_at: User-specified, optional date filter applies to - Custodian assignments only, defaults to None - :type filter_ended_at: Optional[DateTime], optional - :param release_notes: Optional notes about why the policy was created., defaults to None - :type release_notes: Optional[str], optional - :param type: `legal_hold_policy`, defaults to LegalHoldPolicyMiniTypeField.LEGAL_HOLD_POLICY.value - :type type: LegalHoldPolicyMiniTypeField, optional - """ - super().__init__(id=id, type=type, **kwargs) - self.policy_name = policy_name - self.description = description - self.status = status - self.assignment_counts = assignment_counts - self.created_by = created_by - self.created_at = created_at - self.modified_at = modified_at - self.deleted_at = deleted_at - self.filter_started_at = filter_started_at - self.filter_ended_at = filter_ended_at - self.release_notes = release_notes - - -class LegalHoldPolicies(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[LegalHoldPolicy]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of legal hold policies, defaults to None - :type entries: Optional[List[LegalHoldPolicy]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class InviteTypeField(str, Enum): - INVITE = 'invite' - - -class InviteInvitedToTypeField(str, Enum): - ENTERPRISE = 'enterprise' - - -class InviteInvitedToField(BaseObject): - _discriminator = 'type', {'enterprise'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[InviteInvitedToTypeField] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this enterprise., defaults to None - :type id: Optional[str], optional - :param type: `enterprise`, defaults to None - :type type: Optional[InviteInvitedToTypeField], optional - :param name: The name of the enterprise, defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - - -class Invite(BaseObject): - _discriminator = 'type', {'invite'} - - def __init__( - self, - id: str, - *, - type: InviteTypeField = InviteTypeField.INVITE.value, - invited_to: Optional[InviteInvitedToField] = None, - actionable_by: Optional[UserMini] = None, - invited_by: Optional[UserMini] = None, - status: Optional[str] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param id: The unique identifier for this invite - :type id: str - :param type: `invite`, defaults to InviteTypeField.INVITE.value - :type type: InviteTypeField, optional - :param invited_to: A representation of a Box enterprise, defaults to None - :type invited_to: Optional[InviteInvitedToField], optional - :param status: The status of the invite, defaults to None - :type status: Optional[str], optional - :param created_at: When the invite was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the invite was modified., defaults to None - :type modified_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.invited_to = invited_to - self.actionable_by = actionable_by - self.invited_by = invited_by - self.status = status - self.created_at = created_at - self.modified_at = modified_at - - -class GroupMembershipTypeField(str, Enum): - GROUP_MEMBERSHIP = 'group_membership' - - -class GroupMembershipRoleField(str, Enum): - MEMBER = 'member' - ADMIN = 'admin' - - -class GroupMembership(BaseObject): - _discriminator = 'type', {'group_membership'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[GroupMembershipTypeField] = None, - user: Optional[UserMini] = None, - group: Optional[GroupMini] = None, - role: Optional[GroupMembershipRoleField] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param id: The unique identifier for this group membership, defaults to None - :type id: Optional[str], optional - :param type: `group_membership`, defaults to None - :type type: Optional[GroupMembershipTypeField], optional - :param role: The role of the user in the group., defaults to None - :type role: Optional[GroupMembershipRoleField], optional - :param created_at: The time this membership was created., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The time this membership was last modified., defaults to None - :type modified_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.user = user - self.group = group - self.role = role - self.created_at = created_at - self.modified_at = modified_at - - -class GroupMembershipsOrderDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class GroupMembershipsOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[str] = None, - direction: Optional[GroupMembershipsOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field to order by, defaults to None - :type by: Optional[str], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[GroupMembershipsOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class GroupMemberships(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - order: Optional[List[GroupMembershipsOrderField]] = None, - entries: Optional[List[GroupMembership]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type offset: Optional[int], optional - :param order: The order by which items are returned. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type order: Optional[List[GroupMembershipsOrderField]], optional - :param entries: A list of group memberships, defaults to None - :type entries: Optional[List[GroupMembership]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.order = order - self.entries = entries - - -class FileVersion(FileVersionMini): - def __init__( - self, - id: str, - *, - name: Optional[str] = None, - size: Optional[int] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - modified_by: Optional[UserMini] = None, - trashed_at: Optional[DateTime] = None, - trashed_by: Optional[UserMini] = None, - restored_at: Optional[DateTime] = None, - restored_by: Optional[UserMini] = None, - purged_at: Optional[DateTime] = None, - uploader_display_name: Optional[str] = None, - sha_1: Optional[str] = None, - type: FileVersionBaseTypeField = FileVersionBaseTypeField.FILE_VERSION.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a file version. - :type id: str - :param name: The name of the file version, defaults to None - :type name: Optional[str], optional - :param size: Size of the file version in bytes, defaults to None - :type size: Optional[int], optional - :param created_at: When the file version object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the file version object was last updated, defaults to None - :type modified_at: Optional[DateTime], optional - :param trashed_at: When the file version object was trashed., defaults to None - :type trashed_at: Optional[DateTime], optional - :param restored_at: When the file version was restored from the trash., defaults to None - :type restored_at: Optional[DateTime], optional - :param purged_at: When the file version object will be permanently deleted., defaults to None - :type purged_at: Optional[DateTime], optional - :param sha_1: The SHA1 hash of this version of the file., defaults to None - :type sha_1: Optional[str], optional - :param type: `file_version`, defaults to FileVersionBaseTypeField.FILE_VERSION.value - :type type: FileVersionBaseTypeField, optional - """ - super().__init__(id=id, sha_1=sha_1, type=type, **kwargs) - self.name = name - self.size = size - self.created_at = created_at - self.modified_at = modified_at - self.modified_by = modified_by - self.trashed_at = trashed_at - self.trashed_by = trashed_by - self.restored_at = restored_at - self.restored_by = restored_by - self.purged_at = purged_at - self.uploader_display_name = uploader_display_name - - -class FileVersionFull(FileVersion): - def __init__( - self, - id: str, - *, - version_number: Optional[str] = None, - name: Optional[str] = None, - size: Optional[int] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - modified_by: Optional[UserMini] = None, - trashed_at: Optional[DateTime] = None, - trashed_by: Optional[UserMini] = None, - restored_at: Optional[DateTime] = None, - restored_by: Optional[UserMini] = None, - purged_at: Optional[DateTime] = None, - uploader_display_name: Optional[str] = None, - sha_1: Optional[str] = None, - type: FileVersionBaseTypeField = FileVersionBaseTypeField.FILE_VERSION.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a file version. - :type id: str - :param version_number: The version number of this file version, defaults to None - :type version_number: Optional[str], optional - :param name: The name of the file version, defaults to None - :type name: Optional[str], optional - :param size: Size of the file version in bytes, defaults to None - :type size: Optional[int], optional - :param created_at: When the file version object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the file version object was last updated, defaults to None - :type modified_at: Optional[DateTime], optional - :param trashed_at: When the file version object was trashed., defaults to None - :type trashed_at: Optional[DateTime], optional - :param restored_at: When the file version was restored from the trash., defaults to None - :type restored_at: Optional[DateTime], optional - :param purged_at: When the file version object will be permanently deleted., defaults to None - :type purged_at: Optional[DateTime], optional - :param sha_1: The SHA1 hash of this version of the file., defaults to None - :type sha_1: Optional[str], optional - :param type: `file_version`, defaults to FileVersionBaseTypeField.FILE_VERSION.value - :type type: FileVersionBaseTypeField, optional - """ - super().__init__( - id=id, - name=name, - size=size, - created_at=created_at, - modified_at=modified_at, - modified_by=modified_by, - trashed_at=trashed_at, - trashed_by=trashed_by, - restored_at=restored_at, - restored_by=restored_by, - purged_at=purged_at, - uploader_display_name=uploader_display_name, - sha_1=sha_1, - type=type, - **kwargs - ) - self.version_number = version_number - - -class FileVersionsOrderDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class FileVersionsOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[str] = None, - direction: Optional[FileVersionsOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field to order by, defaults to None - :type by: Optional[str], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[FileVersionsOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class FileVersions(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - order: Optional[List[FileVersionsOrderField]] = None, - entries: Optional[List[FileVersionFull]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type offset: Optional[int], optional - :param order: The order by which items are returned. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type order: Optional[List[FileVersionsOrderField]], optional - :param entries: A list of file versions, defaults to None - :type entries: Optional[List[FileVersionFull]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.order = order - self.entries = entries - - -class FileRequestTypeField(str, Enum): - FILE_REQUEST = 'file_request' - - -class FileRequestStatusField(str, Enum): - ACTIVE = 'active' - INACTIVE = 'inactive' - - -class FileRequest(BaseObject): - _discriminator = 'type', {'file_request'} - - def __init__( - self, - id: str, - folder: FolderMini, - created_at: DateTime, - updated_at: DateTime, - *, - type: FileRequestTypeField = FileRequestTypeField.FILE_REQUEST.value, - title: Optional[str] = None, - description: Optional[str] = None, - status: Optional[FileRequestStatusField] = None, - is_email_required: Optional[bool] = None, - is_description_required: Optional[bool] = None, - expires_at: Optional[DateTime] = None, - url: Optional[str] = None, - etag: Optional[str] = None, - created_by: Optional[UserMini] = None, - updated_by: Optional[UserMini] = None, - **kwargs - ): - """ - :param id: The unique identifier for this file request. - :type id: str - :param created_at: The date and time when the file request was created. - :type created_at: DateTime - :param updated_at: The date and time when the file request was last updated. - :type updated_at: DateTime - :param type: `file_request`, defaults to FileRequestTypeField.FILE_REQUEST.value - :type type: FileRequestTypeField, optional - :param title: The title of file request. This is shown - in the Box UI to users uploading files. - - This defaults to title of the file request that was - copied to create this file request., defaults to None - :type title: Optional[str], optional - :param description: The optional description of this file request. This is - shown in the Box UI to users uploading files. - - This defaults to description of the file request that was - copied to create this file request., defaults to None - :type description: Optional[str], optional - :param status: The status of the file request. This defaults - to `active`. - - When the status is set to `inactive`, the file request - will no longer accept new submissions, and any visitor - to the file request URL will receive a `HTTP 404` status - code. - - This defaults to status of file request that was - copied to create this file request., defaults to None - :type status: Optional[FileRequestStatusField], optional - :param is_email_required: Whether a file request submitter is required to provide - their email address. - - When this setting is set to true, the Box UI will show - an email field on the file request form. - - This defaults to setting of file request that was - copied to create this file request., defaults to None - :type is_email_required: Optional[bool], optional - :param is_description_required: Whether a file request submitter is required to provide - a description of the files they are submitting. - - When this setting is set to true, the Box UI will show - a description field on the file request form. - - This defaults to setting of file request that was - copied to create this file request., defaults to None - :type is_description_required: Optional[bool], optional - :param expires_at: The date after which a file request will no longer accept new - submissions. - - After this date, the `status` will automatically be set to - `inactive`., defaults to None - :type expires_at: Optional[DateTime], optional - :param url: The generated URL for this file request. This URL can be shared - with users to let them upload files to the associated folder., defaults to None - :type url: Optional[str], optional - :param etag: The HTTP `etag` of this file. This can be used in combination with - the `If-Match` header when updating a file request. By providing that - header, a change will only be performed on the file request if the `etag` - on the file request still matches the `etag` provided in the `If-Match` - header., defaults to None - :type etag: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.folder = folder - self.created_at = created_at - self.updated_at = updated_at - self.type = type - self.title = title - self.description = description - self.status = status - self.is_email_required = is_email_required - self.is_description_required = is_description_required - self.expires_at = expires_at - self.url = url - self.etag = etag - self.created_by = created_by - self.updated_by = updated_by - - -class FilePathCollectionField(BaseObject): - def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): - """ - :param total_count: The number of folders in this list. - :type total_count: int - :param entries: The parent folders for this item - :type entries: List[FolderMini] - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class FileSharedLinkAccessField(str, Enum): - OPEN = 'open' - COMPANY = 'company' - COLLABORATORS = 'collaborators' - - -class FileSharedLinkEffectiveAccessField(str, Enum): - OPEN = 'open' - COMPANY = 'company' - COLLABORATORS = 'collaborators' - - -class FileSharedLinkEffectivePermissionField(str, Enum): - CAN_EDIT = 'can_edit' - CAN_DOWNLOAD = 'can_download' - CAN_PREVIEW = 'can_preview' - NO_ACCESS = 'no_access' - - -class FileSharedLinkPermissionsField(BaseObject): - def __init__(self, can_download: bool, can_preview: bool, can_edit: bool, **kwargs): - """ - :param can_download: Defines if the shared link allows for the item to be downloaded. For - shared links on folders, this also applies to any items in the folder. - - This value can be set to `true` when the effective access level is - set to `open` or `company`, not `collaborators`. - :type can_download: bool - :param can_preview: Defines if the shared link allows for the item to be previewed. - - This value is always `true`. For shared links on folders this also - applies to any items in the folder. - :type can_preview: bool - :param can_edit: Defines if the shared link allows for the item to be edited. - - This value can only be `true` if `can_download` is also `true` and if - the item has a type of `file`. - :type can_edit: bool - """ - super().__init__(**kwargs) - self.can_download = can_download - self.can_preview = can_preview - self.can_edit = can_edit - - -class FileSharedLinkField(BaseObject): - def __init__( - self, - url: str, - effective_access: FileSharedLinkEffectiveAccessField, - effective_permission: FileSharedLinkEffectivePermissionField, - is_password_enabled: bool, - download_count: int, - preview_count: int, - *, - download_url: Optional[str] = None, - vanity_url: Optional[str] = None, - vanity_name: Optional[str] = None, - access: Optional[FileSharedLinkAccessField] = None, - unshared_at: Optional[DateTime] = None, - permissions: Optional[FileSharedLinkPermissionsField] = None, - **kwargs - ): - """ - :param url: The URL that can be used to access the item on Box. - - This URL will display the item in Box's preview UI where the file - can be downloaded if allowed. - - This URL will continue to work even when a custom `vanity_url` - has been set for this shared link. - :type url: str - :param effective_access: The effective access level for the shared link. This can be a more - restrictive access level than the value in the `access` field when the - enterprise settings restrict the allowed access levels. - :type effective_access: FileSharedLinkEffectiveAccessField - :param effective_permission: The effective permissions for this shared link. - These result in the more restrictive combination of - the share link permissions and the item permissions set - by the administrator, the owner, and any ancestor item - such as a folder. - :type effective_permission: FileSharedLinkEffectivePermissionField - :param is_password_enabled: Defines if the shared link requires a password to access the item. - :type is_password_enabled: bool - :param download_count: The number of times this item has been downloaded. - :type download_count: int - :param preview_count: The number of times this item has been previewed. - :type preview_count: int - :param download_url: A URL that can be used to download the file. This URL can be used in - a browser to download the file. This URL includes the file - extension so that the file will be saved with the right file type. - - This property will be `null` for folders., defaults to None - :type download_url: Optional[str], optional - :param vanity_url: The "Custom URL" that can also be used to preview the item on Box. Custom - URLs can only be created or modified in the Box Web application., defaults to None - :type vanity_url: Optional[str], optional - :param vanity_name: The custom name of a shared link, as used in the `vanity_url` field., defaults to None - :type vanity_name: Optional[str], optional - :param access: The access level for this shared link. - - * `open` - provides access to this item to anyone with this link - * `company` - only provides access to this item to people the same company - * `collaborators` - only provides access to this item to people who are - collaborators on this item - - If this field is omitted when creating the shared link, the access level - will be set to the default access level specified by the enterprise admin., defaults to None - :type access: Optional[FileSharedLinkAccessField], optional - :param unshared_at: The date and time when this link will be unshared. This field can only be - set by users with paid accounts., defaults to None - :type unshared_at: Optional[DateTime], optional - :param permissions: Defines if this link allows a user to preview, edit, and download an item. - These permissions refer to the shared link only and - do not supersede permissions applied to the item itself., defaults to None - :type permissions: Optional[FileSharedLinkPermissionsField], optional - """ - super().__init__(**kwargs) - self.url = url - self.effective_access = effective_access - self.effective_permission = effective_permission - self.is_password_enabled = is_password_enabled - self.download_count = download_count - self.preview_count = preview_count - self.download_url = download_url - self.vanity_url = vanity_url - self.vanity_name = vanity_name - self.access = access - self.unshared_at = unshared_at - self.permissions = permissions - - -class FileItemStatusField(str, Enum): - ACTIVE = 'active' - TRASHED = 'trashed' - DELETED = 'deleted' - - -class File(FileMini): - def __init__( - self, - id: str, - *, - description: Optional[str] = None, - size: Optional[int] = None, - path_collection: Optional[FilePathCollectionField] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - trashed_at: Optional[DateTime] = None, - purged_at: Optional[DateTime] = None, - content_created_at: Optional[DateTime] = None, - content_modified_at: Optional[DateTime] = None, - created_by: Optional[UserMini] = None, - modified_by: Optional[UserMini] = None, - owned_by: Optional[UserMini] = None, - shared_link: Optional[FileSharedLinkField] = None, - parent: Optional[FolderMini] = None, - item_status: Optional[FileItemStatusField] = None, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - sha_1: Optional[str] = None, - file_version: Optional[FileVersionMini] = None, - etag: Optional[str] = None, - type: FileBaseTypeField = FileBaseTypeField.FILE.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a file. - - The ID for any file can be determined - by visiting a file in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/files/123` - the `file_id` is `123`. - :type id: str - :param description: The optional description of this file, defaults to None - :type description: Optional[str], optional - :param size: The file size in bytes. Be careful parsing this integer as it can - get very large and cause an integer overflow., defaults to None - :type size: Optional[int], optional - :param created_at: The date and time when the file was created on Box., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The date and time when the file was last updated on Box., defaults to None - :type modified_at: Optional[DateTime], optional - :param trashed_at: The time at which this file was put in the trash., defaults to None - :type trashed_at: Optional[DateTime], optional - :param purged_at: The time at which this file is expected to be purged - from the trash., defaults to None - :type purged_at: Optional[DateTime], optional - :param content_created_at: The date and time at which this file was originally - created, which might be before it was uploaded to Box., defaults to None - :type content_created_at: Optional[DateTime], optional - :param content_modified_at: The date and time at which this file was last updated, - which might be before it was uploaded to Box., defaults to None - :type content_modified_at: Optional[DateTime], optional - :param item_status: Defines if this item has been deleted or not. - - * `active` when the item has is not in the trash - * `trashed` when the item has been moved to the trash but not deleted - * `deleted` when the item has been permanently deleted., defaults to None - :type item_status: Optional[FileItemStatusField], optional - :param name: The name of the file, defaults to None - :type name: Optional[str], optional - :param sha_1: The SHA1 hash of the file. This can be used to compare the contents - of a file on Box with a local file., defaults to None - :type sha_1: Optional[str], optional - :param etag: The HTTP `etag` of this file. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the file if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `file`, defaults to FileBaseTypeField.FILE.value - :type type: FileBaseTypeField, optional - """ - super().__init__( - id=id, - sequence_id=sequence_id, - name=name, - sha_1=sha_1, - file_version=file_version, - etag=etag, - type=type, - **kwargs - ) - self.description = description - self.size = size - self.path_collection = path_collection - self.created_at = created_at - self.modified_at = modified_at - self.trashed_at = trashed_at - self.purged_at = purged_at - self.content_created_at = content_created_at - self.content_modified_at = content_modified_at - self.created_by = created_by - self.modified_by = modified_by - self.owned_by = owned_by - self.shared_link = shared_link - self.parent = parent - self.item_status = item_status - - -class FileFullPermissionsField(BaseObject): - def __init__( - self, - can_delete: bool, - can_download: bool, - can_invite_collaborator: bool, - can_rename: bool, - can_set_share_access: bool, - can_share: bool, - *, - can_annotate: Optional[bool] = None, - can_comment: Optional[bool] = None, - can_preview: Optional[bool] = None, - can_upload: Optional[bool] = None, - can_view_annotations_all: Optional[bool] = None, - can_view_annotations_self: Optional[bool] = None, - **kwargs - ): - """ - :param can_delete: Specifies if the current user can delete this item. - :type can_delete: bool - :param can_download: Specifies if the current user can download this item. - :type can_download: bool - :param can_invite_collaborator: Specifies if the current user can invite new - users to collaborate on this item, and if the user can - update the role of a user already collaborated on this - item. - :type can_invite_collaborator: bool - :param can_rename: Specifies if the user can rename this item. - :type can_rename: bool - :param can_set_share_access: Specifies if the user can change the access level of an - existing shared link on this item. - :type can_set_share_access: bool - :param can_share: Specifies if the user can create a shared link for this item. - :type can_share: bool - :param can_annotate: Specifies if the user can place annotations on this file., defaults to None - :type can_annotate: Optional[bool], optional - :param can_comment: Specifies if the user can place comments on this file., defaults to None - :type can_comment: Optional[bool], optional - :param can_preview: Specifies if the user can preview this file., defaults to None - :type can_preview: Optional[bool], optional - :param can_upload: Specifies if the user can upload a new version of this file., defaults to None - :type can_upload: Optional[bool], optional - :param can_view_annotations_all: Specifies if the user view all annotations placed on this file, defaults to None - :type can_view_annotations_all: Optional[bool], optional - :param can_view_annotations_self: Specifies if the user view annotations placed by themselves - on this file, defaults to None - :type can_view_annotations_self: Optional[bool], optional - """ - super().__init__(**kwargs) - self.can_delete = can_delete - self.can_download = can_download - self.can_invite_collaborator = can_invite_collaborator - self.can_rename = can_rename - self.can_set_share_access = can_set_share_access - self.can_share = can_share - self.can_annotate = can_annotate - self.can_comment = can_comment - self.can_preview = can_preview - self.can_upload = can_upload - self.can_view_annotations_all = can_view_annotations_all - self.can_view_annotations_self = can_view_annotations_self - - -class FileFullLockTypeField(str, Enum): - LOCK = 'lock' - - -class FileFullLockAppTypeField(str, Enum): - GSUITE = 'gsuite' - OFFICE_WOPI = 'office_wopi' - OFFICE_WOPIPLUS = 'office_wopiplus' - OTHER = 'other' - - -class FileFullLockField(BaseObject): - _discriminator = 'type', {'lock'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[FileFullLockTypeField] = None, - created_by: Optional[UserMini] = None, - created_at: Optional[DateTime] = None, - expired_at: Optional[DateTime] = None, - is_download_prevented: Optional[bool] = None, - app_type: Optional[FileFullLockAppTypeField] = None, - **kwargs - ): - """ - :param id: The unique identifier for this lock, defaults to None - :type id: Optional[str], optional - :param type: `lock`, defaults to None - :type type: Optional[FileFullLockTypeField], optional - :param created_at: The time this lock was created at., defaults to None - :type created_at: Optional[DateTime], optional - :param expired_at: The time this lock is to expire at, which might be in the past., defaults to None - :type expired_at: Optional[DateTime], optional - :param is_download_prevented: Whether or not the file can be downloaded while locked., defaults to None - :type is_download_prevented: Optional[bool], optional - :param app_type: If the lock is managed by an application rather than a user, this - field identifies the type of the application that holds the lock. - This is an open enum and may be extended with additional values in - the future., defaults to None - :type app_type: Optional[FileFullLockAppTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.created_by = created_by - self.created_at = created_at - self.expired_at = expired_at - self.is_download_prevented = is_download_prevented - self.app_type = app_type - - -class FileFullExpiringEmbedLinkTokenTypeField(str, Enum): - BEARER = 'bearer' - - -class FileFullExpiringEmbedLinkField(BaseObject): - def __init__( - self, - *, - access_token: Optional[str] = None, - expires_in: Optional[int] = None, - token_type: Optional[FileFullExpiringEmbedLinkTokenTypeField] = None, - restricted_to: Optional[List[FileOrFolderScope]] = None, - url: Optional[str] = None, - **kwargs - ): - """ - :param access_token: The requested access token., defaults to None - :type access_token: Optional[str], optional - :param expires_in: The time in seconds by which this token will expire., defaults to None - :type expires_in: Optional[int], optional - :param token_type: The type of access token returned., defaults to None - :type token_type: Optional[FileFullExpiringEmbedLinkTokenTypeField], optional - :param restricted_to: The permissions that this access token permits, - providing a list of resources (files, folders, etc) - and the scopes permitted for each of those resources., defaults to None - :type restricted_to: Optional[List[FileOrFolderScope]], optional - :param url: The actual expiring embed URL for this file, constructed - from the file ID and access tokens specified in this object., defaults to None - :type url: Optional[str], optional - """ - super().__init__(**kwargs) - self.access_token = access_token - self.expires_in = expires_in - self.token_type = token_type - self.restricted_to = restricted_to - self.url = url - - -class FileFullWatermarkInfoField(BaseObject): - def __init__(self, *, is_watermarked: Optional[bool] = None, **kwargs): - """ - :param is_watermarked: Specifies if this item has a watermark applied., defaults to None - :type is_watermarked: Optional[bool], optional - """ - super().__init__(**kwargs) - self.is_watermarked = is_watermarked - - -class FileFullAllowedInviteeRolesField(str, Enum): - EDITOR = 'editor' - VIEWER = 'viewer' - PREVIEWER = 'previewer' - UPLOADER = 'uploader' - PREVIEWER_UPLOADER = 'previewer uploader' - VIEWER_UPLOADER = 'viewer uploader' - CO_OWNER = 'co-owner' - - -class FileFullMetadataField(BaseObject): - def __init__(self, **kwargs): - super().__init__(**kwargs) - self.extra_data = kwargs - - -class FileFullRepresentationsEntriesContentField(BaseObject): - def __init__(self, *, url_template: Optional[str] = None, **kwargs): - """ - :param url_template: The download URL that can be used to fetch the representation. - Make sure to make an authenticated API call to this endpoint. - - This URL is a template and will require the `{+asset_path}` to - be replaced by a path. In general, for unpaged representations - it can be replaced by an empty string. - - For paged representations, replace the `{+asset_path}` with the - page to request plus the extension for the file, for example - `1.pdf`. - - When requesting the download URL the following additional - query params can be passed along. - - * `set_content_disposition_type` - Sets the - `Content-Disposition` header in the API response with the - specified disposition type of either `inline` or `attachment`. - If not supplied, the `Content-Disposition` header is not - included in the response. - - * `set_content_disposition_filename` - Allows the application to - define the representation's file name used in the - `Content-Disposition` header. If not defined, the filename - is derived from the source file name in Box combined with the - extension of the representation., defaults to None - :type url_template: Optional[str], optional - """ - super().__init__(**kwargs) - self.url_template = url_template - - -class FileFullRepresentationsEntriesInfoField(BaseObject): - def __init__(self, *, url: Optional[str] = None, **kwargs): - """ - :param url: The API URL that can be used to get more info on this file - representation. Make sure to make an authenticated API call - to this endpoint., defaults to None - :type url: Optional[str], optional - """ - super().__init__(**kwargs) - self.url = url - - -class FileFullRepresentationsEntriesPropertiesField(BaseObject): - def __init__( - self, - *, - dimensions: Optional[str] = None, - paged: Optional[bool] = None, - thumb: Optional[bool] = None, - **kwargs - ): - """ - :param dimensions: The width by height size of this representation in pixels., defaults to None - :type dimensions: Optional[str], optional - :param paged: Indicates if the representation is build up out of multiple - pages., defaults to None - :type paged: Optional[bool], optional - :param thumb: Indicates if the representation can be used as a thumbnail of - the file., defaults to None - :type thumb: Optional[bool], optional - """ - super().__init__(**kwargs) - self.dimensions = dimensions - self.paged = paged - self.thumb = thumb - - -class FileFullRepresentationsEntriesStatusStateField(str, Enum): - SUCCESS = 'success' - VIEWABLE = 'viewable' - PENDING = 'pending' - NONE = 'none' - - -class FileFullRepresentationsEntriesStatusField(BaseObject): - def __init__( - self, - *, - state: Optional[FileFullRepresentationsEntriesStatusStateField] = None, - **kwargs - ): - """ - :param state: The status of the representation. - - * `success` defines the representation as ready to be viewed. - * `viewable` defines a video to be ready for viewing. - * `pending` defines the representation as to be generated. Retry - this endpoint to re-check the status. - * `none` defines that the representation will be created when - requested. Request the URL defined in the `info` object to - trigger this generation., defaults to None - :type state: Optional[FileFullRepresentationsEntriesStatusStateField], optional - """ - super().__init__(**kwargs) - self.state = state - - -class FileFullRepresentationsEntriesField(BaseObject): - def __init__( - self, - *, - content: Optional[FileFullRepresentationsEntriesContentField] = None, - info: Optional[FileFullRepresentationsEntriesInfoField] = None, - properties: Optional[FileFullRepresentationsEntriesPropertiesField] = None, - representation: Optional[str] = None, - status: Optional[FileFullRepresentationsEntriesStatusField] = None, - **kwargs - ): - """ - :param content: An object containing the URL that can be used to actually fetch - the representation., defaults to None - :type content: Optional[FileFullRepresentationsEntriesContentField], optional - :param info: An object containing the URL that can be used to fetch more info - on this representation., defaults to None - :type info: Optional[FileFullRepresentationsEntriesInfoField], optional - :param properties: An object containing the size and type of this presentation., defaults to None - :type properties: Optional[FileFullRepresentationsEntriesPropertiesField], optional - :param representation: Indicates the file type of the returned representation., defaults to None - :type representation: Optional[str], optional - :param status: An object containing the status of this representation., defaults to None - :type status: Optional[FileFullRepresentationsEntriesStatusField], optional - """ - super().__init__(**kwargs) - self.content = content - self.info = info - self.properties = properties - self.representation = representation - self.status = status - - -class FileFullRepresentationsField(BaseObject): - def __init__( - self, - *, - entries: Optional[List[FileFullRepresentationsEntriesField]] = None, - **kwargs - ): - """ - :param entries: A list of files, defaults to None - :type entries: Optional[List[FileFullRepresentationsEntriesField]], optional - """ - super().__init__(**kwargs) - self.entries = entries - - -class FileFullClassificationField(BaseObject): - def __init__( - self, - *, - name: Optional[str] = None, - definition: Optional[str] = None, - color: Optional[str] = None, - **kwargs - ): - """ - :param name: The name of the classification, defaults to None - :type name: Optional[str], optional - :param definition: An explanation of the meaning of this classification., defaults to None - :type definition: Optional[str], optional - :param color: The color that is used to display the - classification label in a user-interface. Colors are defined by the admin - or co-admin who created the classification in the Box web app., defaults to None - :type color: Optional[str], optional - """ - super().__init__(**kwargs) - self.name = name - self.definition = definition - self.color = color - - -class FileFullSharedLinkPermissionOptionsField(str, Enum): - CAN_PREVIEW = 'can_preview' - CAN_DOWNLOAD = 'can_download' - CAN_EDIT = 'can_edit' - - -class FileFull(File): - def __init__( - self, - id: str, - *, - version_number: Optional[str] = None, - comment_count: Optional[int] = None, - permissions: Optional[FileFullPermissionsField] = None, - tags: Optional[List[str]] = None, - lock: Optional[FileFullLockField] = None, - extension: Optional[str] = None, - is_package: Optional[bool] = None, - expiring_embed_link: Optional[FileFullExpiringEmbedLinkField] = None, - watermark_info: Optional[FileFullWatermarkInfoField] = None, - is_accessible_via_shared_link: Optional[bool] = None, - allowed_invitee_roles: Optional[List[FileFullAllowedInviteeRolesField]] = None, - is_externally_owned: Optional[bool] = None, - has_collaborations: Optional[bool] = None, - metadata: Optional[FileFullMetadataField] = None, - expires_at: Optional[DateTime] = None, - representations: Optional[FileFullRepresentationsField] = None, - classification: Optional[FileFullClassificationField] = None, - uploader_display_name: Optional[str] = None, - disposition_at: Optional[DateTime] = None, - shared_link_permission_options: Optional[ - List[FileFullSharedLinkPermissionOptionsField] - ] = None, - description: Optional[str] = None, - size: Optional[int] = None, - path_collection: Optional[FilePathCollectionField] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - trashed_at: Optional[DateTime] = None, - purged_at: Optional[DateTime] = None, - content_created_at: Optional[DateTime] = None, - content_modified_at: Optional[DateTime] = None, - created_by: Optional[UserMini] = None, - modified_by: Optional[UserMini] = None, - owned_by: Optional[UserMini] = None, - shared_link: Optional[FileSharedLinkField] = None, - parent: Optional[FolderMini] = None, - item_status: Optional[FileItemStatusField] = None, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - sha_1: Optional[str] = None, - file_version: Optional[FileVersionMini] = None, - etag: Optional[str] = None, - type: FileBaseTypeField = FileBaseTypeField.FILE.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a file. - - The ID for any file can be determined - by visiting a file in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/files/123` - the `file_id` is `123`. - :type id: str - :param version_number: The version number of this file, defaults to None - :type version_number: Optional[str], optional - :param comment_count: The number of comments on this file, defaults to None - :type comment_count: Optional[int], optional - :param extension: Indicates the (optional) file extension for this file. By default, - this is set to an empty string., defaults to None - :type extension: Optional[str], optional - :param is_package: Indicates if the file is a package. Packages are commonly used - by Mac Applications and can include iWork files., defaults to None - :type is_package: Optional[bool], optional - :param is_accessible_via_shared_link: Specifies if the file can be accessed - via the direct shared link or a shared link - to a parent folder., defaults to None - :type is_accessible_via_shared_link: Optional[bool], optional - :param allowed_invitee_roles: A list of the types of roles that user can be invited at - when sharing this file., defaults to None - :type allowed_invitee_roles: Optional[List[FileFullAllowedInviteeRolesField]], optional - :param is_externally_owned: Specifies if this file is owned by a user outside of the - authenticated enterprise., defaults to None - :type is_externally_owned: Optional[bool], optional - :param has_collaborations: Specifies if this file has any other collaborators., defaults to None - :type has_collaborations: Optional[bool], optional - :param expires_at: When the file will automatically be deleted, defaults to None - :type expires_at: Optional[DateTime], optional - :param disposition_at: The retention expiration timestamp for the given file, defaults to None - :type disposition_at: Optional[DateTime], optional - :param shared_link_permission_options: A list of the types of roles that user can be invited at - when sharing this file., defaults to None - :type shared_link_permission_options: Optional[List[FileFullSharedLinkPermissionOptionsField]], optional - :param description: The optional description of this file, defaults to None - :type description: Optional[str], optional - :param size: The file size in bytes. Be careful parsing this integer as it can - get very large and cause an integer overflow., defaults to None - :type size: Optional[int], optional - :param created_at: The date and time when the file was created on Box., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The date and time when the file was last updated on Box., defaults to None - :type modified_at: Optional[DateTime], optional - :param trashed_at: The time at which this file was put in the trash., defaults to None - :type trashed_at: Optional[DateTime], optional - :param purged_at: The time at which this file is expected to be purged - from the trash., defaults to None - :type purged_at: Optional[DateTime], optional - :param content_created_at: The date and time at which this file was originally - created, which might be before it was uploaded to Box., defaults to None - :type content_created_at: Optional[DateTime], optional - :param content_modified_at: The date and time at which this file was last updated, - which might be before it was uploaded to Box., defaults to None - :type content_modified_at: Optional[DateTime], optional - :param item_status: Defines if this item has been deleted or not. - - * `active` when the item has is not in the trash - * `trashed` when the item has been moved to the trash but not deleted - * `deleted` when the item has been permanently deleted., defaults to None - :type item_status: Optional[FileItemStatusField], optional - :param name: The name of the file, defaults to None - :type name: Optional[str], optional - :param sha_1: The SHA1 hash of the file. This can be used to compare the contents - of a file on Box with a local file., defaults to None - :type sha_1: Optional[str], optional - :param etag: The HTTP `etag` of this file. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the file if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `file`, defaults to FileBaseTypeField.FILE.value - :type type: FileBaseTypeField, optional - """ - super().__init__( - id=id, - description=description, - size=size, - path_collection=path_collection, - created_at=created_at, - modified_at=modified_at, - trashed_at=trashed_at, - purged_at=purged_at, - content_created_at=content_created_at, - content_modified_at=content_modified_at, - created_by=created_by, - modified_by=modified_by, - owned_by=owned_by, - shared_link=shared_link, - parent=parent, - item_status=item_status, - sequence_id=sequence_id, - name=name, - sha_1=sha_1, - file_version=file_version, - etag=etag, - type=type, - **kwargs - ) - self.version_number = version_number - self.comment_count = comment_count - self.permissions = permissions - self.tags = tags - self.lock = lock - self.extension = extension - self.is_package = is_package - self.expiring_embed_link = expiring_embed_link - self.watermark_info = watermark_info - self.is_accessible_via_shared_link = is_accessible_via_shared_link - self.allowed_invitee_roles = allowed_invitee_roles - self.is_externally_owned = is_externally_owned - self.has_collaborations = has_collaborations - self.metadata = metadata - self.expires_at = expires_at - self.representations = representations - self.classification = classification - self.uploader_display_name = uploader_display_name - self.disposition_at = disposition_at - self.shared_link_permission_options = shared_link_permission_options - - -class Files(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - entries: Optional[List[FileFull]] = None, - **kwargs - ): - """ - :param total_count: The number of files., defaults to None - :type total_count: Optional[int], optional - :param entries: A list of files, defaults to None - :type entries: Optional[List[FileFull]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class DevicePinnerTypeField(str, Enum): - DEVICE_PINNER = 'device_pinner' - - -class DevicePinner(BaseObject): - _discriminator = 'type', {'device_pinner'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[DevicePinnerTypeField] = None, - owned_by: Optional[UserMini] = None, - product_name: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this device pin., defaults to None - :type id: Optional[str], optional - :param type: `device_pinner`, defaults to None - :type type: Optional[DevicePinnerTypeField], optional - :param product_name: The type of device being pinned, defaults to None - :type product_name: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.owned_by = owned_by - self.product_name = product_name - - -class DevicePinnersOrderByField(str, Enum): - ID = 'id' - - -class DevicePinnersOrderDirectionField(str, Enum): - ASC = 'asc' - DESC = 'desc' - - -class DevicePinnersOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[DevicePinnersOrderByField] = None, - direction: Optional[DevicePinnersOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field that is ordered by, defaults to None - :type by: Optional[DevicePinnersOrderByField], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[DevicePinnersOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class DevicePinners(BaseObject): - def __init__( - self, - *, - entries: Optional[List[DevicePinner]] = None, - limit: Optional[int] = None, - next_marker: Optional[int] = None, - order: Optional[List[DevicePinnersOrderField]] = None, - **kwargs - ): - """ - :param entries: A list of device pins, defaults to None - :type entries: Optional[List[DevicePinner]], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed., 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[int], optional - :param order: The order by which items are returned., defaults to None - :type order: Optional[List[DevicePinnersOrderField]], optional - """ - super().__init__(**kwargs) - self.entries = entries - self.limit = limit - self.next_marker = next_marker - self.order = order - - -class CommentItemField(BaseObject): - def __init__( - self, *, id: Optional[str] = None, type: Optional[str] = None, **kwargs - ): - """ - :param id: The unique identifier for this object, defaults to None - :type id: Optional[str], optional - :param type: The type for this object, defaults to None - :type type: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class Comment(CommentBase): - def __init__( - self, - *, - is_reply_comment: Optional[bool] = None, - message: Optional[str] = None, - created_by: Optional[UserMini] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - item: Optional[CommentItemField] = None, - id: Optional[str] = None, - type: Optional[CommentBaseTypeField] = None, - **kwargs - ): - """ - :param is_reply_comment: Whether or not this comment is a reply to another - comment, defaults to None - :type is_reply_comment: Optional[bool], optional - :param message: The text of the comment, as provided by the user, defaults to None - :type message: Optional[str], optional - :param created_at: The time this comment was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The time this comment was last modified, defaults to None - :type modified_at: Optional[DateTime], optional - :param id: The unique identifier for this comment., defaults to None - :type id: Optional[str], optional - :param type: `comment`, defaults to None - :type type: Optional[CommentBaseTypeField], optional - """ - super().__init__(id=id, type=type, **kwargs) - self.is_reply_comment = is_reply_comment - self.message = message - self.created_by = created_by - self.created_at = created_at - self.modified_at = modified_at - self.item = item - - -class CommentFull(Comment): - def __init__( - self, - *, - tagged_message: Optional[str] = None, - is_reply_comment: Optional[bool] = None, - message: Optional[str] = None, - created_by: Optional[UserMini] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - item: Optional[CommentItemField] = None, - id: Optional[str] = None, - type: Optional[CommentBaseTypeField] = None, - **kwargs - ): - """ - :param tagged_message: The string representing the comment text with - @mentions included. @mention format is @[id:username] - where `id` is user's Box ID and `username` is - their display name., defaults to None - :type tagged_message: Optional[str], optional - :param is_reply_comment: Whether or not this comment is a reply to another - comment, defaults to None - :type is_reply_comment: Optional[bool], optional - :param message: The text of the comment, as provided by the user, defaults to None - :type message: Optional[str], optional - :param created_at: The time this comment was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The time this comment was last modified, defaults to None - :type modified_at: Optional[DateTime], optional - :param id: The unique identifier for this comment., defaults to None - :type id: Optional[str], optional - :param type: `comment`, defaults to None - :type type: Optional[CommentBaseTypeField], optional - """ - super().__init__( - is_reply_comment=is_reply_comment, - message=message, - created_by=created_by, - created_at=created_at, - modified_at=modified_at, - item=item, - id=id, - type=type, - **kwargs - ) - self.tagged_message = tagged_message - - -class CommentsOrderDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class CommentsOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[str] = None, - direction: Optional[CommentsOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field to order by, defaults to None - :type by: Optional[str], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[CommentsOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class Comments(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - order: Optional[List[CommentsOrderField]] = None, - entries: Optional[List[CommentFull]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type offset: Optional[int], optional - :param order: The order by which items are returned. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type order: Optional[List[CommentsOrderField]], optional - :param entries: A list of comments, defaults to None - :type entries: Optional[List[CommentFull]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.order = order - self.entries = entries - - -class CollaborationAllowlistExemptTargetTypeField(str, Enum): - COLLABORATION_WHITELIST_EXEMPT_TARGET = 'collaboration_whitelist_exempt_target' - - -class CollaborationAllowlistExemptTargetEnterpriseTypeField(str, Enum): - ENTERPRISE = 'enterprise' - - -class CollaborationAllowlistExemptTargetEnterpriseField(BaseObject): - _discriminator = 'type', {'enterprise'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[CollaborationAllowlistExemptTargetEnterpriseTypeField] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this enterprise., defaults to None - :type id: Optional[str], optional - :param type: `enterprise`, defaults to None - :type type: Optional[CollaborationAllowlistExemptTargetEnterpriseTypeField], optional - :param name: The name of the enterprise, defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - - -class CollaborationAllowlistExemptTarget(BaseObject): - _discriminator = 'type', {'collaboration_whitelist_exempt_target'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[CollaborationAllowlistExemptTargetTypeField] = None, - enterprise: Optional[CollaborationAllowlistExemptTargetEnterpriseField] = None, - user: Optional[UserMini] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param id: The unique identifier for this exemption, defaults to None - :type id: Optional[str], optional - :param type: `collaboration_whitelist_exempt_target`, defaults to None - :type type: Optional[CollaborationAllowlistExemptTargetTypeField], optional - :param created_at: The time the entry was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The time the entry was modified, defaults to None - :type modified_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.enterprise = enterprise - self.user = user - self.created_at = created_at - self.modified_at = modified_at - - -class CollaborationAllowlistExemptTargets(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[CollaborationAllowlistExemptTarget]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of users exempt from any of the restrictions - imposed by the list of allowed collaboration domains - for this enterprise., defaults to None - :type entries: Optional[List[CollaborationAllowlistExemptTarget]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class ShieldInformationBarrierSegmentRestriction( - ShieldInformationBarrierSegmentRestrictionMini -): - def __init__( - self, - shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField, - restricted_segment: ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField, - *, - shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, - created_at: Optional[DateTime] = None, - created_by: Optional[UserBase] = None, - updated_at: Optional[DateTime] = None, - updated_by: Optional[UserBase] = None, - type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField] = None, - id: Optional[str] = None, - **kwargs - ): - """ - :param shield_information_barrier_segment: The `type` and `id` of the - requested shield information barrier segment. - :type shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField - :param restricted_segment: The `type` and `id` of the - restricted shield information barrier segment. - :type restricted_segment: ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField - :param created_at: ISO date time string when this - shield information barrier - Segment Restriction object was created., defaults to None - :type created_at: Optional[DateTime], optional - :param updated_at: ISO date time string when this - shield information barrier segment - Restriction was updated., defaults to None - :type updated_at: Optional[DateTime], optional - :param type: Shield information barrier segment restriction, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField], optional - :param id: The unique identifier for the - shield information barrier segment restriction., defaults to None - :type id: Optional[str], optional - """ - super().__init__( - shield_information_barrier_segment=shield_information_barrier_segment, - restricted_segment=restricted_segment, - type=type, - id=id, - **kwargs - ) - self.shield_information_barrier = shield_information_barrier - self.created_at = created_at - self.created_by = created_by - self.updated_at = updated_at - self.updated_by = updated_by - - -class ShieldInformationBarrierSegmentRestrictions(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - entries: Optional[List[ShieldInformationBarrierSegmentRestriction]] = None, - **kwargs - ): - """ - :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 entries: A list of shield information barrier - segment restriction objects, defaults to None - :type entries: Optional[List[ShieldInformationBarrierSegmentRestriction]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.entries = entries - - -class ShieldInformationBarrierSegmentMemberMini( - ShieldInformationBarrierSegmentMemberBase -): - def __init__( - self, - *, - user: Optional[UserBase] = None, - id: Optional[str] = None, - type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField] = None, - **kwargs - ): - """ - :param id: The unique identifier for the - shield information barrier segment member, defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier segment member, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField], optional - """ - super().__init__(id=id, type=type, **kwargs) - self.user = user - - -class ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField( - str, Enum -): - SHIELD_INFORMATION_BARRIER_SEGMENT = 'shield_information_barrier_segment' - - -class ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField( - BaseObject -): - _discriminator = 'type', {'shield_information_barrier_segment'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[ - ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField - ] = None, - **kwargs - ): - """ - :param id: The ID reference of the requesting - shield information barrier segment., defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier segment, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class ShieldInformationBarrierSegmentMember(ShieldInformationBarrierSegmentMemberMini): - def __init__( - self, - *, - shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, - shield_information_barrier_segment: Optional[ - ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField - ] = None, - created_at: Optional[DateTime] = None, - created_by: Optional[UserBase] = None, - updated_at: Optional[DateTime] = None, - updated_by: Optional[UserBase] = None, - user: Optional[UserBase] = None, - id: Optional[str] = None, - type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField] = None, - **kwargs - ): - """ - :param shield_information_barrier_segment: The `type` and `id` of the requested - shield information barrier segment., defaults to None - :type shield_information_barrier_segment: Optional[ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField], optional - :param created_at: ISO date time string when this shield - information barrier object was created., defaults to None - :type created_at: Optional[DateTime], optional - :param updated_at: ISO date time string when this - shield information barrier segment Member was updated., defaults to None - :type updated_at: Optional[DateTime], optional - :param id: The unique identifier for the - shield information barrier segment member, defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier segment member, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField], optional - """ - super().__init__(user=user, id=id, type=type, **kwargs) - self.shield_information_barrier = shield_information_barrier - self.shield_information_barrier_segment = shield_information_barrier_segment - self.created_at = created_at - self.created_by = created_by - self.updated_at = updated_at - self.updated_by = updated_by - - -class ShieldInformationBarrierSegmentMembers(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - entries: Optional[List[ShieldInformationBarrierSegmentMember]] = None, - **kwargs - ): - """ - :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 entries: A list of shield information - barrier segment members, defaults to None - :type entries: Optional[List[ShieldInformationBarrierSegmentMember]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.entries = entries - - -class ShieldInformationBarrierSegmentTypeField(str, Enum): - SHIELD_INFORMATION_BARRIER_SEGMENT = 'shield_information_barrier_segment' - - -class ShieldInformationBarrierSegment(BaseObject): - _discriminator = 'type', {'shield_information_barrier_segment'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[ShieldInformationBarrierSegmentTypeField] = None, - shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, - name: Optional[str] = None, - description: Optional[str] = None, - created_at: Optional[DateTime] = None, - created_by: Optional[UserBase] = None, - updated_at: Optional[DateTime] = None, - updated_by: Optional[UserBase] = None, - **kwargs - ): - """ - :param id: The unique identifier for the shield information barrier segment, defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier segment, defaults to None - :type type: Optional[ShieldInformationBarrierSegmentTypeField], optional - :param name: Name of the shield information barrier segment, defaults to None - :type name: Optional[str], optional - :param description: Description of the shield information barrier segment, defaults to None - :type description: Optional[str], optional - :param created_at: ISO date time string when this shield information - barrier object was created., defaults to None - :type created_at: Optional[DateTime], optional - :param updated_at: ISO date time string when this - shield information barrier segment was updated., defaults to None - :type updated_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.shield_information_barrier = shield_information_barrier - self.name = name - self.description = description - self.created_at = created_at - self.created_by = created_by - self.updated_at = updated_at - self.updated_by = updated_by - - -class ShieldInformationBarrierSegments(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - entries: Optional[List[ShieldInformationBarrierSegment]] = None, - **kwargs - ): - """ - :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 entries: A list of shield information barrier - segments, defaults to None - :type entries: Optional[List[ShieldInformationBarrierSegment]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.entries = entries - - -class ShieldInformationBarrierTypeField(str, Enum): - SHIELD_INFORMATION_BARRIER = 'shield_information_barrier' - - -class ShieldInformationBarrierStatusField(str, Enum): - DRAFT = 'draft' - PENDING = 'pending' - DISABLED = 'disabled' - ENABLED = 'enabled' - INVALID = 'invalid' - - -class ShieldInformationBarrier(BaseObject): - _discriminator = 'type', {'shield_information_barrier'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[ShieldInformationBarrierTypeField] = None, - enterprise: Optional[EnterpriseBase] = None, - status: Optional[ShieldInformationBarrierStatusField] = None, - created_at: Optional[DateTime] = None, - created_by: Optional[UserBase] = None, - updated_at: Optional[DateTime] = None, - updated_by: Optional[UserBase] = None, - enabled_at: Optional[DateTime] = None, - enabled_by: Optional[UserBase] = None, - **kwargs - ): - """ - :param id: The unique identifier for the shield information barrier, defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier, defaults to None - :type type: Optional[ShieldInformationBarrierTypeField], optional - :param enterprise: The `type` and `id` of enterprise this barrier is under., defaults to None - :type enterprise: Optional[EnterpriseBase], optional - :param status: Status of the shield information barrier, defaults to None - :type status: Optional[ShieldInformationBarrierStatusField], optional - :param created_at: ISO date time string when this - shield information barrier object was created., defaults to None - :type created_at: Optional[DateTime], optional - :param created_by: The user who created this shield information barrier., defaults to None - :type created_by: Optional[UserBase], optional - :param updated_at: ISO date time string when this shield information barrier was updated., defaults to None - :type updated_at: Optional[DateTime], optional - :param updated_by: The user that updated this shield information barrier., defaults to None - :type updated_by: Optional[UserBase], optional - :param enabled_at: ISO date time string when this shield information barrier was enabled., defaults to None - :type enabled_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.enterprise = enterprise - self.status = status - self.created_at = created_at - self.created_by = created_by - self.updated_at = updated_at - self.updated_by = updated_by - self.enabled_at = enabled_at - self.enabled_by = enabled_by - - -class ShieldInformationBarriers(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - entries: Optional[List[ShieldInformationBarrier]] = None, - **kwargs - ): - """ - :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 entries: A list of shield information barrier objects, defaults to None - :type entries: Optional[List[ShieldInformationBarrier]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.entries = entries - - -class FolderLockLockedOperationsField(BaseObject): - def __init__(self, move: bool, delete: bool, **kwargs): - """ - :param move: Whether moving the folder is restricted. - :type move: bool - :param delete: Whether deleting the folder is restricted. - :type delete: bool - """ - super().__init__(**kwargs) - self.move = move - self.delete = delete - - -class FolderLock(BaseObject): - def __init__( - self, - *, - folder: Optional[FolderMini] = None, - id: Optional[str] = None, - type: Optional[str] = None, - created_by: Optional[UserBase] = None, - created_at: Optional[DateTime] = None, - locked_operations: Optional[FolderLockLockedOperationsField] = None, - lock_type: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this folder lock., defaults to None - :type id: Optional[str], optional - :param type: The object type, always `folder_lock`., defaults to None - :type type: Optional[str], optional - :param created_at: When the folder lock object was created., defaults to None - :type created_at: Optional[DateTime], optional - :param locked_operations: The operations that have been locked. Currently the `move` - and `delete` operations cannot be locked separately, and both need to be - set to `true`. - , defaults to None - :type locked_operations: Optional[FolderLockLockedOperationsField], optional - :param lock_type: The lock type, always `freeze`., defaults to None - :type lock_type: Optional[str], optional - """ - super().__init__(**kwargs) - self.folder = folder - self.id = id - self.type = type - self.created_by = created_by - self.created_at = created_at - self.locked_operations = locked_operations - self.lock_type = lock_type - - -class FolderLocks(BaseObject): - def __init__( - self, - *, - entries: Optional[List[FolderLock]] = None, - limit: Optional[str] = None, - next_marker: Optional[str] = None, - **kwargs - ): - """ - :param entries: A list of folder locks, defaults to None - :type entries: Optional[List[FolderLock]], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[str], optional - :param next_marker: The marker for the start of the next page of results., defaults to None - :type next_marker: Optional[str], optional - """ - super().__init__(**kwargs) - self.entries = entries - self.limit = limit - self.next_marker = next_marker - - -class WatermarkWatermarkField(BaseObject): - def __init__( - self, - *, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param created_at: When this watermark was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When this task was modified, defaults to None - :type modified_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.created_at = created_at - self.modified_at = modified_at - - -class Watermark(BaseObject): - def __init__( - self, *, watermark: Optional[WatermarkWatermarkField] = None, **kwargs - ): - super().__init__(**kwargs) - self.watermark = watermark - - -class WebhookMiniTypeField(str, Enum): - WEBHOOK = 'webhook' - - -class WebhookMiniTargetTypeField(str, Enum): - FILE = 'file' - FOLDER = 'folder' - - -class WebhookMiniTargetField(BaseObject): - _discriminator = 'type', {'file', 'folder'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[WebhookMiniTargetTypeField] = None, - **kwargs - ): - """ - :param id: The ID of the item to trigger a webhook, defaults to None - :type id: Optional[str], optional - :param type: The type of item to trigger a webhook, defaults to None - :type type: Optional[WebhookMiniTargetTypeField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class WebhookMini(BaseObject): - _discriminator = 'type', {'webhook'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[WebhookMiniTypeField] = None, - target: Optional[WebhookMiniTargetField] = None, - **kwargs - ): - """ - :param id: The unique identifier for this webhook., defaults to None - :type id: Optional[str], optional - :param type: `webhook`, defaults to None - :type type: Optional[WebhookMiniTypeField], optional - :param target: The item that will trigger the webhook, defaults to None - :type target: Optional[WebhookMiniTargetField], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.target = target - - -class Webhooks(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[WebhookMini]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of webhooks, defaults to None - :type entries: Optional[List[WebhookMini]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class WebhookTriggersField(str, Enum): - FILE_UPLOADED = 'FILE.UPLOADED' - FILE_PREVIEWED = 'FILE.PREVIEWED' - FILE_DOWNLOADED = 'FILE.DOWNLOADED' - FILE_TRASHED = 'FILE.TRASHED' - FILE_DELETED = 'FILE.DELETED' - FILE_RESTORED = 'FILE.RESTORED' - FILE_COPIED = 'FILE.COPIED' - FILE_MOVED = 'FILE.MOVED' - FILE_LOCKED = 'FILE.LOCKED' - FILE_UNLOCKED = 'FILE.UNLOCKED' - FILE_RENAMED = 'FILE.RENAMED' - COMMENT_CREATED = 'COMMENT.CREATED' - COMMENT_UPDATED = 'COMMENT.UPDATED' - COMMENT_DELETED = 'COMMENT.DELETED' - TASK_ASSIGNMENT_CREATED = 'TASK_ASSIGNMENT.CREATED' - TASK_ASSIGNMENT_UPDATED = 'TASK_ASSIGNMENT.UPDATED' - METADATA_INSTANCE_CREATED = 'METADATA_INSTANCE.CREATED' - METADATA_INSTANCE_UPDATED = 'METADATA_INSTANCE.UPDATED' - METADATA_INSTANCE_DELETED = 'METADATA_INSTANCE.DELETED' - FOLDER_CREATED = 'FOLDER.CREATED' - FOLDER_RENAMED = 'FOLDER.RENAMED' - FOLDER_DOWNLOADED = 'FOLDER.DOWNLOADED' - FOLDER_RESTORED = 'FOLDER.RESTORED' - FOLDER_DELETED = 'FOLDER.DELETED' - FOLDER_COPIED = 'FOLDER.COPIED' - FOLDER_MOVED = 'FOLDER.MOVED' - FOLDER_TRASHED = 'FOLDER.TRASHED' - WEBHOOK_DELETED = 'WEBHOOK.DELETED' - COLLABORATION_CREATED = 'COLLABORATION.CREATED' - COLLABORATION_ACCEPTED = 'COLLABORATION.ACCEPTED' - COLLABORATION_REJECTED = 'COLLABORATION.REJECTED' - COLLABORATION_REMOVED = 'COLLABORATION.REMOVED' - COLLABORATION_UPDATED = 'COLLABORATION.UPDATED' - SHARED_LINK_DELETED = 'SHARED_LINK.DELETED' - SHARED_LINK_CREATED = 'SHARED_LINK.CREATED' - SHARED_LINK_UPDATED = 'SHARED_LINK.UPDATED' - SIGN_REQUEST_COMPLETED = 'SIGN_REQUEST.COMPLETED' - SIGN_REQUEST_DECLINED = 'SIGN_REQUEST.DECLINED' - SIGN_REQUEST_EXPIRED = 'SIGN_REQUEST.EXPIRED' - SIGN_REQUEST_SIGNER_EMAIL_BOUNCED = 'SIGN_REQUEST.SIGNER_EMAIL_BOUNCED' - - -class Webhook(WebhookMini): - def __init__( - self, - *, - created_by: Optional[UserMini] = None, - created_at: Optional[DateTime] = None, - address: Optional[str] = None, - triggers: Optional[List[WebhookTriggersField]] = None, - id: Optional[str] = None, - type: Optional[WebhookMiniTypeField] = None, - target: Optional[WebhookMiniTargetField] = None, - **kwargs - ): - """ - :param created_at: A timestamp identifying the time that - the webhook was created., defaults to None - :type created_at: Optional[DateTime], optional - :param address: The URL that is notified by this webhook, defaults to None - :type address: Optional[str], optional - :param triggers: An array of event names that this webhook is - to be triggered for, defaults to None - :type triggers: Optional[List[WebhookTriggersField]], optional - :param id: The unique identifier for this webhook., defaults to None - :type id: Optional[str], optional - :param type: `webhook`, defaults to None - :type type: Optional[WebhookMiniTypeField], optional - :param target: The item that will trigger the webhook, defaults to None - :type target: Optional[WebhookMiniTargetField], optional - """ - super().__init__(id=id, type=type, target=target, **kwargs) - self.created_by = created_by - self.created_at = created_at - self.address = address - self.triggers = triggers - - -class WebLinkBaseTypeField(str, Enum): - WEB_LINK = 'web_link' - - -class WebLinkBase(BaseObject): - _discriminator = 'type', {'web_link'} - - def __init__( - self, - id: str, - *, - type: WebLinkBaseTypeField = WebLinkBaseTypeField.WEB_LINK.value, - etag: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this web link - :type id: str - :param type: `web_link`, defaults to WebLinkBaseTypeField.WEB_LINK.value - :type type: WebLinkBaseTypeField, optional - :param etag: The entity tag of this web link. Used with `If-Match` - headers., defaults to None - :type etag: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.etag = etag - - -class WebLinkMini(WebLinkBase): - def __init__( - self, - id: str, - *, - url: Optional[str] = None, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - type: WebLinkBaseTypeField = WebLinkBaseTypeField.WEB_LINK.value, - etag: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this web link - :type id: str - :param url: The URL this web link points to, defaults to None - :type url: Optional[str], optional - :param name: The name of the web link, defaults to None - :type name: Optional[str], optional - :param type: `web_link`, defaults to WebLinkBaseTypeField.WEB_LINK.value - :type type: WebLinkBaseTypeField, optional - :param etag: The entity tag of this web link. Used with `If-Match` - headers., defaults to None - :type etag: Optional[str], optional - """ - super().__init__(id=id, type=type, etag=etag, **kwargs) - self.url = url - self.sequence_id = sequence_id - self.name = name - - -class WebLinkPathCollectionField(BaseObject): - def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): - """ - :param total_count: The number of folders in this list. - :type total_count: int - :param entries: The parent folders for this item - :type entries: List[FolderMini] - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class WebLinkSharedLinkAccessField(str, Enum): - OPEN = 'open' - COMPANY = 'company' - COLLABORATORS = 'collaborators' - - -class WebLinkSharedLinkEffectiveAccessField(str, Enum): - OPEN = 'open' - COMPANY = 'company' - COLLABORATORS = 'collaborators' - - -class WebLinkSharedLinkEffectivePermissionField(str, Enum): - CAN_EDIT = 'can_edit' - CAN_DOWNLOAD = 'can_download' - CAN_PREVIEW = 'can_preview' - NO_ACCESS = 'no_access' - - -class WebLinkSharedLinkPermissionsField(BaseObject): - def __init__(self, can_download: bool, can_preview: bool, can_edit: bool, **kwargs): - """ - :param can_download: Defines if the shared link allows for the item to be downloaded. For - shared links on folders, this also applies to any items in the folder. - - This value can be set to `true` when the effective access level is - set to `open` or `company`, not `collaborators`. - :type can_download: bool - :param can_preview: Defines if the shared link allows for the item to be previewed. - - This value is always `true`. For shared links on folders this also - applies to any items in the folder. - :type can_preview: bool - :param can_edit: Defines if the shared link allows for the item to be edited. - - This value can only be `true` if `can_download` is also `true` and if - the item has a type of `file`. - :type can_edit: bool - """ - super().__init__(**kwargs) - self.can_download = can_download - self.can_preview = can_preview - self.can_edit = can_edit - - -class WebLinkSharedLinkField(BaseObject): - def __init__( - self, - url: str, - effective_access: WebLinkSharedLinkEffectiveAccessField, - effective_permission: WebLinkSharedLinkEffectivePermissionField, - is_password_enabled: bool, - download_count: int, - preview_count: int, - *, - download_url: Optional[str] = None, - vanity_url: Optional[str] = None, - vanity_name: Optional[str] = None, - access: Optional[WebLinkSharedLinkAccessField] = None, - unshared_at: Optional[DateTime] = None, - permissions: Optional[WebLinkSharedLinkPermissionsField] = None, - **kwargs - ): - """ - :param url: The URL that can be used to access the item on Box. - - This URL will display the item in Box's preview UI where the file - can be downloaded if allowed. - - This URL will continue to work even when a custom `vanity_url` - has been set for this shared link. - :type url: str - :param effective_access: The effective access level for the shared link. This can be a more - restrictive access level than the value in the `access` field when the - enterprise settings restrict the allowed access levels. - :type effective_access: WebLinkSharedLinkEffectiveAccessField - :param effective_permission: The effective permissions for this shared link. - These result in the more restrictive combination of - the share link permissions and the item permissions set - by the administrator, the owner, and any ancestor item - such as a folder. - :type effective_permission: WebLinkSharedLinkEffectivePermissionField - :param is_password_enabled: Defines if the shared link requires a password to access the item. - :type is_password_enabled: bool - :param download_count: The number of times this item has been downloaded. - :type download_count: int - :param preview_count: The number of times this item has been previewed. - :type preview_count: int - :param download_url: A URL that can be used to download the file. This URL can be used in - a browser to download the file. This URL includes the file - extension so that the file will be saved with the right file type. - - This property will be `null` for folders., defaults to None - :type download_url: Optional[str], optional - :param vanity_url: The "Custom URL" that can also be used to preview the item on Box. Custom - URLs can only be created or modified in the Box Web application., defaults to None - :type vanity_url: Optional[str], optional - :param vanity_name: The custom name of a shared link, as used in the `vanity_url` field., defaults to None - :type vanity_name: Optional[str], optional - :param access: The access level for this shared link. - - * `open` - provides access to this item to anyone with this link - * `company` - only provides access to this item to people the same company - * `collaborators` - only provides access to this item to people who are - collaborators on this item - - If this field is omitted when creating the shared link, the access level - will be set to the default access level specified by the enterprise admin., defaults to None - :type access: Optional[WebLinkSharedLinkAccessField], optional - :param unshared_at: The date and time when this link will be unshared. This field can only be - set by users with paid accounts., defaults to None - :type unshared_at: Optional[DateTime], optional - :param permissions: Defines if this link allows a user to preview, edit, and download an item. - These permissions refer to the shared link only and - do not supersede permissions applied to the item itself., defaults to None - :type permissions: Optional[WebLinkSharedLinkPermissionsField], optional - """ - super().__init__(**kwargs) - self.url = url - self.effective_access = effective_access - self.effective_permission = effective_permission - self.is_password_enabled = is_password_enabled - self.download_count = download_count - self.preview_count = preview_count - self.download_url = download_url - self.vanity_url = vanity_url - self.vanity_name = vanity_name - self.access = access - self.unshared_at = unshared_at - self.permissions = permissions - - -class WebLinkItemStatusField(str, Enum): - ACTIVE = 'active' - TRASHED = 'trashed' - DELETED = 'deleted' - - -class WebLink(WebLinkMini): - def __init__( - self, - id: str, - *, - parent: Optional[FolderMini] = None, - description: Optional[str] = None, - path_collection: Optional[WebLinkPathCollectionField] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - trashed_at: Optional[DateTime] = None, - purged_at: Optional[DateTime] = None, - created_by: Optional[UserMini] = None, - modified_by: Optional[UserMini] = None, - owned_by: Optional[UserMini] = None, - shared_link: Optional[WebLinkSharedLinkField] = None, - item_status: Optional[WebLinkItemStatusField] = None, - url: Optional[str] = None, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - type: WebLinkBaseTypeField = WebLinkBaseTypeField.WEB_LINK.value, - etag: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this web link - :type id: str - :param description: The description accompanying the web link. This is - visible within the Box web application., defaults to None - :type description: Optional[str], optional - :param created_at: When this file was created on Box’s servers., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When this file was last updated on the Box - servers., defaults to None - :type modified_at: Optional[DateTime], optional - :param trashed_at: When this file was moved to the trash., defaults to None - :type trashed_at: Optional[DateTime], optional - :param purged_at: When this file will be permanently deleted., defaults to None - :type purged_at: Optional[DateTime], optional - :param item_status: Whether this item is deleted or not. Values include `active`, - `trashed` if the file has been moved to the trash, and `deleted` if - the file has been permanently deleted, defaults to None - :type item_status: Optional[WebLinkItemStatusField], optional - :param url: The URL this web link points to, defaults to None - :type url: Optional[str], optional - :param name: The name of the web link, defaults to None - :type name: Optional[str], optional - :param type: `web_link`, defaults to WebLinkBaseTypeField.WEB_LINK.value - :type type: WebLinkBaseTypeField, optional - :param etag: The entity tag of this web link. Used with `If-Match` - headers., defaults to None - :type etag: Optional[str], optional - """ - super().__init__( - id=id, - url=url, - sequence_id=sequence_id, - name=name, - type=type, - etag=etag, - **kwargs - ) - self.parent = parent - self.description = description - self.path_collection = path_collection - self.created_at = created_at - self.modified_at = modified_at - self.trashed_at = trashed_at - self.purged_at = purged_at - self.created_by = created_by - self.modified_by = modified_by - self.owned_by = owned_by - self.shared_link = shared_link - self.item_status = item_status - - -class ItemsOrderDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class ItemsOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[str] = None, - direction: Optional[ItemsOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field to order by, defaults to None - :type by: Optional[str], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[ItemsOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class Items(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - order: Optional[List[ItemsOrderField]] = None, - entries: Optional[List[Union[FileFull, FolderMini, WebLink]]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type offset: Optional[int], optional - :param order: The order by which items are returned. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type order: Optional[List[ItemsOrderField]], optional - :param entries: The items in this collection., defaults to None - :type entries: Optional[List[Union[FileFull, FolderMini, WebLink]]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.order = order - self.entries = entries - - -class FolderPathCollectionField(BaseObject): - def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): - """ - :param total_count: The number of folders in this list. - :type total_count: int - :param entries: The parent folders for this item - :type entries: List[FolderMini] - """ - super().__init__(**kwargs) - self.total_count = total_count - self.entries = entries - - -class FolderSharedLinkAccessField(str, Enum): - OPEN = 'open' - COMPANY = 'company' - COLLABORATORS = 'collaborators' - - -class FolderSharedLinkEffectiveAccessField(str, Enum): - OPEN = 'open' - COMPANY = 'company' - COLLABORATORS = 'collaborators' - - -class FolderSharedLinkEffectivePermissionField(str, Enum): - CAN_EDIT = 'can_edit' - CAN_DOWNLOAD = 'can_download' - CAN_PREVIEW = 'can_preview' - NO_ACCESS = 'no_access' - - -class FolderSharedLinkPermissionsField(BaseObject): - def __init__(self, can_download: bool, can_preview: bool, can_edit: bool, **kwargs): - """ - :param can_download: Defines if the shared link allows for the item to be downloaded. For - shared links on folders, this also applies to any items in the folder. - - This value can be set to `true` when the effective access level is - set to `open` or `company`, not `collaborators`. - :type can_download: bool - :param can_preview: Defines if the shared link allows for the item to be previewed. - - This value is always `true`. For shared links on folders this also - applies to any items in the folder. - :type can_preview: bool - :param can_edit: Defines if the shared link allows for the item to be edited. - - This value can only be `true` if `can_download` is also `true` and if - the item has a type of `file`. - :type can_edit: bool - """ - super().__init__(**kwargs) - self.can_download = can_download - self.can_preview = can_preview - self.can_edit = can_edit - - -class FolderSharedLinkField(BaseObject): - def __init__( - self, - url: str, - effective_access: FolderSharedLinkEffectiveAccessField, - effective_permission: FolderSharedLinkEffectivePermissionField, - is_password_enabled: bool, - download_count: int, - preview_count: int, - *, - download_url: Optional[str] = None, - vanity_url: Optional[str] = None, - vanity_name: Optional[str] = None, - access: Optional[FolderSharedLinkAccessField] = None, - unshared_at: Optional[DateTime] = None, - permissions: Optional[FolderSharedLinkPermissionsField] = None, - **kwargs - ): - """ - :param url: The URL that can be used to access the item on Box. - - This URL will display the item in Box's preview UI where the file - can be downloaded if allowed. - - This URL will continue to work even when a custom `vanity_url` - has been set for this shared link. - :type url: str - :param effective_access: The effective access level for the shared link. This can be a more - restrictive access level than the value in the `access` field when the - enterprise settings restrict the allowed access levels. - :type effective_access: FolderSharedLinkEffectiveAccessField - :param effective_permission: The effective permissions for this shared link. - These result in the more restrictive combination of - the share link permissions and the item permissions set - by the administrator, the owner, and any ancestor item - such as a folder. - :type effective_permission: FolderSharedLinkEffectivePermissionField - :param is_password_enabled: Defines if the shared link requires a password to access the item. - :type is_password_enabled: bool - :param download_count: The number of times this item has been downloaded. - :type download_count: int - :param preview_count: The number of times this item has been previewed. - :type preview_count: int - :param download_url: A URL that can be used to download the file. This URL can be used in - a browser to download the file. This URL includes the file - extension so that the file will be saved with the right file type. - - This property will be `null` for folders., defaults to None - :type download_url: Optional[str], optional - :param vanity_url: The "Custom URL" that can also be used to preview the item on Box. Custom - URLs can only be created or modified in the Box Web application., defaults to None - :type vanity_url: Optional[str], optional - :param vanity_name: The custom name of a shared link, as used in the `vanity_url` field., defaults to None - :type vanity_name: Optional[str], optional - :param access: The access level for this shared link. - - * `open` - provides access to this item to anyone with this link - * `company` - only provides access to this item to people the same company - * `collaborators` - only provides access to this item to people who are - collaborators on this item - - If this field is omitted when creating the shared link, the access level - will be set to the default access level specified by the enterprise admin., defaults to None - :type access: Optional[FolderSharedLinkAccessField], optional - :param unshared_at: The date and time when this link will be unshared. This field can only be - set by users with paid accounts., defaults to None - :type unshared_at: Optional[DateTime], optional - :param permissions: Defines if this link allows a user to preview, edit, and download an item. - These permissions refer to the shared link only and - do not supersede permissions applied to the item itself., defaults to None - :type permissions: Optional[FolderSharedLinkPermissionsField], optional - """ - super().__init__(**kwargs) - self.url = url - self.effective_access = effective_access - self.effective_permission = effective_permission - self.is_password_enabled = is_password_enabled - self.download_count = download_count - self.preview_count = preview_count - self.download_url = download_url - self.vanity_url = vanity_url - self.vanity_name = vanity_name - self.access = access - self.unshared_at = unshared_at - self.permissions = permissions - - -class FolderFolderUploadEmailAccessField(str, Enum): - OPEN = 'open' - COLLABORATORS = 'collaborators' - - -class FolderFolderUploadEmailField(BaseObject): - def __init__( - self, - *, - access: Optional[FolderFolderUploadEmailAccessField] = None, - email: Optional[str] = None, - **kwargs - ): - """ - :param access: When this parameter has been set, users can email files - to the email address that has been automatically - created for this folder. - - To create an email address, set this property either when - creating or updating the folder. - - When set to `collaborators`, only emails from registered email - addresses for collaborators will be accepted. This includes - any email aliases a user might have registered. - - When set to `open` it will accept emails from any email - address., defaults to None - :type access: Optional[FolderFolderUploadEmailAccessField], optional - :param email: The optional upload email address for this folder., defaults to None - :type email: Optional[str], optional - """ - super().__init__(**kwargs) - self.access = access - self.email = email - - -class FolderItemStatusField(str, Enum): - ACTIVE = 'active' - TRASHED = 'trashed' - DELETED = 'deleted' - - -class Folder(FolderMini): - def __init__( - self, - id: str, - *, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - description: Optional[str] = None, - size: Optional[int] = None, - path_collection: Optional[FolderPathCollectionField] = None, - created_by: Optional[UserMini] = None, - modified_by: Optional[UserMini] = None, - trashed_at: Optional[DateTime] = None, - purged_at: Optional[DateTime] = None, - content_created_at: Optional[DateTime] = None, - content_modified_at: Optional[DateTime] = None, - owned_by: Optional[UserMini] = None, - shared_link: Optional[FolderSharedLinkField] = None, - folder_upload_email: Optional[FolderFolderUploadEmailField] = None, - parent: Optional[FolderMini] = None, - item_status: Optional[FolderItemStatusField] = None, - item_collection: Optional[Items] = None, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: FolderBaseTypeField = FolderBaseTypeField.FOLDER.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a folder. - - The ID for any folder can be determined - by visiting a folder in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/folders/123` - the `folder_id` is `123`. - :type id: str - :param created_at: The date and time when the folder was created. This value may - be `null` for some folders such as the root folder or the trash - folder., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The date and time when the folder was last updated. This value may - be `null` for some folders such as the root folder or the trash - folder., defaults to None - :type modified_at: Optional[DateTime], optional - :param size: The folder size in bytes. - - Be careful parsing this integer as its - value can get very large., defaults to None - :type size: Optional[int], optional - :param trashed_at: The time at which this folder was put in the trash., defaults to None - :type trashed_at: Optional[DateTime], optional - :param purged_at: The time at which this folder is expected to be purged - from the trash., defaults to None - :type purged_at: Optional[DateTime], optional - :param content_created_at: The date and time at which this folder was originally - created., defaults to None - :type content_created_at: Optional[DateTime], optional - :param content_modified_at: The date and time at which this folder was last updated., defaults to None - :type content_modified_at: Optional[DateTime], optional - :param folder_upload_email: The `folder_upload_email` parameter is not `null` if one of the following options is **true**: - - * The **Allow uploads to this folder via email** and the **Only allow email uploads from collaborators in this folder** are [enabled for a folder in the Admin Console](https://support.box.com/hc/en-us/articles/360043697534-Upload-to-Box-Through-Email), and the user has at least **Upload** permissions granted. - - * The **Allow uploads to this folder via email** setting is enabled for a folder in the Admin Console, and the **Only allow email uploads from collaborators in this folder** setting is deactivated (unchecked). - - If the conditions are not met, the parameter will have the following value: `folder_upload_email: null`, defaults to None - :type folder_upload_email: Optional[FolderFolderUploadEmailField], optional - :param item_status: Defines if this item has been deleted or not. - - * `active` when the item has is not in the trash - * `trashed` when the item has been moved to the trash but not deleted - * `deleted` when the item has been permanently deleted., defaults to None - :type item_status: Optional[FolderItemStatusField], optional - :param name: The name of the folder., defaults to None - :type name: Optional[str], optional - :param etag: The HTTP `etag` of this folder. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the folder if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `folder`, defaults to FolderBaseTypeField.FOLDER.value - :type type: FolderBaseTypeField, optional - """ - super().__init__( - id=id, sequence_id=sequence_id, name=name, etag=etag, type=type, **kwargs - ) - self.created_at = created_at - self.modified_at = modified_at - self.description = description - self.size = size - self.path_collection = path_collection - self.created_by = created_by - self.modified_by = modified_by - self.trashed_at = trashed_at - self.purged_at = purged_at - self.content_created_at = content_created_at - self.content_modified_at = content_modified_at - self.owned_by = owned_by - self.shared_link = shared_link - self.folder_upload_email = folder_upload_email - self.parent = parent - self.item_status = item_status - self.item_collection = item_collection - - -class MetadataQueryResults(BaseObject): - def __init__( - self, - *, - entries: Optional[List[Union[File, Folder]]] = None, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - **kwargs - ): - """ - :param entries: The mini representation of the files and folders that match the search - terms. - - By default, this endpoint returns only the most basic info about the - items. To get additional fields for each item, including any of the - metadata, use the `fields` attribute in the query., defaults to None - :type entries: Optional[List[Union[File, Folder]]], optional - :param limit: The limit that was used for this search. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed., defaults to None - :type limit: Optional[int], optional - :param next_marker: The marker for the start of the next page of results., defaults to None - :type next_marker: Optional[str], optional - """ - super().__init__(**kwargs) - self.entries = entries - self.limit = limit - self.next_marker = next_marker - - -class LegalHoldPolicyAssignment(LegalHoldPolicyAssignmentBase): - def __init__( - self, - *, - legal_hold_policy: Optional[LegalHoldPolicyMini] = None, - assigned_to: Optional[Union[File, Folder, WebLink]] = None, - assigned_by: Optional[UserMini] = None, - assigned_at: Optional[DateTime] = None, - deleted_at: Optional[DateTime] = None, - id: Optional[str] = None, - type: Optional[LegalHoldPolicyAssignmentBaseTypeField] = None, - **kwargs - ): - """ - :param assigned_at: When the legal hold policy assignment object was - created, defaults to None - :type assigned_at: Optional[DateTime], optional - :param deleted_at: When the assignment release request was sent. - (Because it can take time for an assignment to fully - delete, this isn't quite the same time that the - assignment is fully deleted). If null, Assignment - was not deleted., defaults to None - :type deleted_at: Optional[DateTime], optional - :param id: The unique identifier for this legal hold assignment, defaults to None - :type id: Optional[str], optional - :param type: `legal_hold_policy_assignment`, defaults to None - :type type: Optional[LegalHoldPolicyAssignmentBaseTypeField], optional - """ - super().__init__(id=id, type=type, **kwargs) - self.legal_hold_policy = legal_hold_policy - self.assigned_to = assigned_to - self.assigned_by = assigned_by - self.assigned_at = assigned_at - self.deleted_at = deleted_at - - -class LegalHoldPolicyAssignments(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[LegalHoldPolicyAssignment]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of legal hold - policy assignments, defaults to None - :type entries: Optional[List[LegalHoldPolicyAssignment]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class FileVersionLegalHoldTypeField(str, Enum): - FILE_VERSION_LEGAL_HOLD = 'file_version_legal_hold' - - -class FileVersionLegalHold(BaseObject): - _discriminator = 'type', {'file_version_legal_hold'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[FileVersionLegalHoldTypeField] = None, - file_version: Optional[FileVersionMini] = None, - file: Optional[FileMini] = None, - legal_hold_policy_assignments: Optional[List[LegalHoldPolicyAssignment]] = None, - deleted_at: Optional[DateTime] = None, - **kwargs - ): - """ - :param id: The unique identifier for this file version legal hold, defaults to None - :type id: Optional[str], optional - :param type: `file_version_legal_hold`, defaults to None - :type type: Optional[FileVersionLegalHoldTypeField], optional - :param legal_hold_policy_assignments: List of assignments contributing to this Hold., defaults to None - :type legal_hold_policy_assignments: Optional[List[LegalHoldPolicyAssignment]], optional - :param deleted_at: Time that this File-Version-Legal-Hold was - deleted., defaults to None - :type deleted_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.file_version = file_version - self.file = file - self.legal_hold_policy_assignments = legal_hold_policy_assignments - self.deleted_at = deleted_at - - -class FileVersionLegalHolds(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[FileVersionLegalHold]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of file version legal holds, defaults to None - :type entries: Optional[List[FileVersionLegalHold]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class FolderFullSyncStateField(str, Enum): - SYNCED = 'synced' - NOT_SYNCED = 'not_synced' - PARTIALLY_SYNCED = 'partially_synced' - - -class FolderFullPermissionsField(BaseObject): - def __init__( - self, - can_delete: bool, - can_download: bool, - can_invite_collaborator: bool, - can_rename: bool, - can_set_share_access: bool, - can_share: bool, - *, - can_upload: Optional[bool] = None, - **kwargs - ): - """ - :param can_delete: Specifies if the current user can delete this item. - :type can_delete: bool - :param can_download: Specifies if the current user can download this item. - :type can_download: bool - :param can_invite_collaborator: Specifies if the current user can invite new - users to collaborate on this item, and if the user can - update the role of a user already collaborated on this - item. - :type can_invite_collaborator: bool - :param can_rename: Specifies if the user can rename this item. - :type can_rename: bool - :param can_set_share_access: Specifies if the user can change the access level of an - existing shared link on this item. - :type can_set_share_access: bool - :param can_share: Specifies if the user can create a shared link for this item. - :type can_share: bool - :param can_upload: Specifies if the user can upload into this folder., defaults to None - :type can_upload: Optional[bool], optional - """ - super().__init__(**kwargs) - self.can_delete = can_delete - self.can_download = can_download - self.can_invite_collaborator = can_invite_collaborator - self.can_rename = can_rename - self.can_set_share_access = can_set_share_access - self.can_share = can_share - self.can_upload = can_upload - - -class FolderFullMetadataField(BaseObject): - def __init__(self, **kwargs): - super().__init__(**kwargs) - self.extra_data = kwargs - - -class FolderFullAllowedSharedLinkAccessLevelsField(str, Enum): - OPEN = 'open' - COMPANY = 'company' - COLLABORATORS = 'collaborators' - - -class FolderFullAllowedInviteeRolesField(str, Enum): - EDITOR = 'editor' - VIEWER = 'viewer' - PREVIEWER = 'previewer' - UPLOADER = 'uploader' - PREVIEWER_UPLOADER = 'previewer uploader' - VIEWER_UPLOADER = 'viewer uploader' - CO_OWNER = 'co-owner' - - -class FolderFullWatermarkInfoField(BaseObject): - def __init__(self, *, is_watermarked: Optional[bool] = None, **kwargs): - """ - :param is_watermarked: Specifies if this item has a watermark applied., defaults to None - :type is_watermarked: Optional[bool], optional - """ - super().__init__(**kwargs) - self.is_watermarked = is_watermarked - - -class FolderFullClassificationField(BaseObject): - def __init__( - self, - *, - name: Optional[str] = None, - definition: Optional[str] = None, - color: Optional[str] = None, - **kwargs - ): - """ - :param name: The name of the classification, defaults to None - :type name: Optional[str], optional - :param definition: An explanation of the meaning of this classification., defaults to None - :type definition: Optional[str], optional - :param color: The color that is used to display the - classification label in a user-interface. Colors are defined by the admin - or co-admin who created the classification in the Box web app., defaults to None - :type color: Optional[str], optional - """ - super().__init__(**kwargs) - self.name = name - self.definition = definition - self.color = color - - -class FolderFull(Folder): - def __init__( - self, - id: str, - *, - sync_state: Optional[FolderFullSyncStateField] = None, - has_collaborations: Optional[bool] = None, - permissions: Optional[FolderFullPermissionsField] = None, - tags: Optional[List[str]] = None, - can_non_owners_invite: Optional[bool] = None, - is_externally_owned: Optional[bool] = None, - metadata: Optional[FolderFullMetadataField] = None, - is_collaboration_restricted_to_enterprise: Optional[bool] = None, - allowed_shared_link_access_levels: Optional[ - List[FolderFullAllowedSharedLinkAccessLevelsField] - ] = None, - allowed_invitee_roles: Optional[ - List[FolderFullAllowedInviteeRolesField] - ] = None, - watermark_info: Optional[FolderFullWatermarkInfoField] = None, - is_accessible_via_shared_link: Optional[bool] = None, - can_non_owners_view_collaborators: Optional[bool] = None, - classification: Optional[FolderFullClassificationField] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - description: Optional[str] = None, - size: Optional[int] = None, - path_collection: Optional[FolderPathCollectionField] = None, - created_by: Optional[UserMini] = None, - modified_by: Optional[UserMini] = None, - trashed_at: Optional[DateTime] = None, - purged_at: Optional[DateTime] = None, - content_created_at: Optional[DateTime] = None, - content_modified_at: Optional[DateTime] = None, - owned_by: Optional[UserMini] = None, - shared_link: Optional[FolderSharedLinkField] = None, - folder_upload_email: Optional[FolderFolderUploadEmailField] = None, - parent: Optional[FolderMini] = None, - item_status: Optional[FolderItemStatusField] = None, - item_collection: Optional[Items] = None, - sequence_id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: FolderBaseTypeField = FolderBaseTypeField.FOLDER.value, - **kwargs - ): - """ - :param id: The unique identifier that represent a folder. - - The ID for any folder can be determined - by visiting a folder in the web application - and copying the ID from the URL. For example, - for the URL `https://*.app.box.com/folders/123` - the `folder_id` is `123`. - :type id: str - :param has_collaborations: Specifies if this folder has any other collaborators., defaults to None - :type has_collaborations: Optional[bool], optional - :param is_externally_owned: Specifies if this folder is owned by a user outside of the - authenticated enterprise., defaults to None - :type is_externally_owned: Optional[bool], optional - :param allowed_shared_link_access_levels: A list of access levels that are available - for this folder. - - For some folders, like the root folder, this will always - be an empty list as sharing is not allowed at that level., defaults to None - :type allowed_shared_link_access_levels: Optional[List[FolderFullAllowedSharedLinkAccessLevelsField]], optional - :param allowed_invitee_roles: A list of the types of roles that user can be invited at - when sharing this folder., defaults to None - :type allowed_invitee_roles: Optional[List[FolderFullAllowedInviteeRolesField]], optional - :param is_accessible_via_shared_link: Specifies if the folder can be accessed - with the direct shared link or a shared link - to a parent folder., defaults to None - :type is_accessible_via_shared_link: Optional[bool], optional - :param can_non_owners_view_collaborators: Specifies if collaborators who are not owners - of this folder are restricted from viewing other - collaborations on this folder. - - It also restricts non-owners from inviting new - collaborators., defaults to None - :type can_non_owners_view_collaborators: Optional[bool], optional - :param created_at: The date and time when the folder was created. This value may - be `null` for some folders such as the root folder or the trash - folder., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The date and time when the folder was last updated. This value may - be `null` for some folders such as the root folder or the trash - folder., defaults to None - :type modified_at: Optional[DateTime], optional - :param size: The folder size in bytes. - - Be careful parsing this integer as its - value can get very large., defaults to None - :type size: Optional[int], optional - :param trashed_at: The time at which this folder was put in the trash., defaults to None - :type trashed_at: Optional[DateTime], optional - :param purged_at: The time at which this folder is expected to be purged - from the trash., defaults to None - :type purged_at: Optional[DateTime], optional - :param content_created_at: The date and time at which this folder was originally - created., defaults to None - :type content_created_at: Optional[DateTime], optional - :param content_modified_at: The date and time at which this folder was last updated., defaults to None - :type content_modified_at: Optional[DateTime], optional - :param folder_upload_email: The `folder_upload_email` parameter is not `null` if one of the following options is **true**: - - * The **Allow uploads to this folder via email** and the **Only allow email uploads from collaborators in this folder** are [enabled for a folder in the Admin Console](https://support.box.com/hc/en-us/articles/360043697534-Upload-to-Box-Through-Email), and the user has at least **Upload** permissions granted. - - * The **Allow uploads to this folder via email** setting is enabled for a folder in the Admin Console, and the **Only allow email uploads from collaborators in this folder** setting is deactivated (unchecked). - - If the conditions are not met, the parameter will have the following value: `folder_upload_email: null`, defaults to None - :type folder_upload_email: Optional[FolderFolderUploadEmailField], optional - :param item_status: Defines if this item has been deleted or not. - - * `active` when the item has is not in the trash - * `trashed` when the item has been moved to the trash but not deleted - * `deleted` when the item has been permanently deleted., defaults to None - :type item_status: Optional[FolderItemStatusField], optional - :param name: The name of the folder., defaults to None - :type name: Optional[str], optional - :param etag: The HTTP `etag` of this folder. This can be used within some API - endpoints in the `If-Match` and `If-None-Match` headers to only - perform changes on the folder if (no) changes have happened., defaults to None - :type etag: Optional[str], optional - :param type: `folder`, defaults to FolderBaseTypeField.FOLDER.value - :type type: FolderBaseTypeField, optional - """ - super().__init__( - id=id, - created_at=created_at, - modified_at=modified_at, - description=description, - size=size, - path_collection=path_collection, - created_by=created_by, - modified_by=modified_by, - trashed_at=trashed_at, - purged_at=purged_at, - content_created_at=content_created_at, - content_modified_at=content_modified_at, - owned_by=owned_by, - shared_link=shared_link, - folder_upload_email=folder_upload_email, - parent=parent, - item_status=item_status, - item_collection=item_collection, - sequence_id=sequence_id, - name=name, - etag=etag, - type=type, - **kwargs - ) - self.sync_state = sync_state - self.has_collaborations = has_collaborations - self.permissions = permissions - self.tags = tags - self.can_non_owners_invite = can_non_owners_invite - self.is_externally_owned = is_externally_owned - self.metadata = metadata - self.is_collaboration_restricted_to_enterprise = ( - is_collaboration_restricted_to_enterprise - ) - self.allowed_shared_link_access_levels = allowed_shared_link_access_levels - self.allowed_invitee_roles = allowed_invitee_roles - self.watermark_info = watermark_info - self.is_accessible_via_shared_link = is_accessible_via_shared_link - self.can_non_owners_view_collaborators = can_non_owners_view_collaborators - self.classification = classification - - -class SearchResultWithSharedLink(BaseObject): - def __init__( - self, - *, - accessible_via_shared_link: Optional[str] = None, - item: Optional[Union[FileFull, FolderFull, WebLink]] = None, - type: Optional[str] = None, - **kwargs - ): - """ - :param accessible_via_shared_link: The optional shared link through which the user has access to this - item. This value is only returned for items for which the user has - recently accessed the file through a shared link. For all other - items this value will return `null`., defaults to None - :type accessible_via_shared_link: Optional[str], optional - :param type: The result type. The value is always `search_result`., defaults to None - :type type: Optional[str], optional - """ - super().__init__(**kwargs) - self.accessible_via_shared_link = accessible_via_shared_link - self.item = item - self.type = type - - -class SearchResultsWithSharedLinksTypeField(str, Enum): - SEARCH_RESULTS_WITH_SHARED_LINKS = 'search_results_with_shared_links' - - -class SearchResultsWithSharedLinks(BaseObject): - _discriminator = 'type', {'search_results_with_shared_links'} - - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - type: SearchResultsWithSharedLinksTypeField = SearchResultsWithSharedLinksTypeField.SEARCH_RESULTS_WITH_SHARED_LINKS.value, - entries: Optional[List[SearchResultWithSharedLink]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the search results. - The total number of entries in the collection may be less than - `total_count`., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for this search. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter used., defaults to None - :type offset: Optional[int], optional - :param type: Specifies the response as search result items with shared links, defaults to SearchResultsWithSharedLinksTypeField.SEARCH_RESULTS_WITH_SHARED_LINKS.value - :type type: SearchResultsWithSharedLinksTypeField, optional - :param entries: The search results for the query provided, including the - additional information about any shared links through - which the item has been shared with the user., defaults to None - :type entries: Optional[List[SearchResultWithSharedLink]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.type = type - self.entries = entries - - -class SearchResultsTypeField(str, Enum): - SEARCH_RESULTS_ITEMS = 'search_results_items' - - -class SearchResults(BaseObject): - _discriminator = 'type', {'search_results_items'} - - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - type: SearchResultsTypeField = SearchResultsTypeField.SEARCH_RESULTS_ITEMS.value, - entries: Optional[List[Union[FileFull, FolderFull, WebLink]]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the search results. - The total number of entries in the collection may be less than - `total_count`., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for this search. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter used., defaults to None - :type offset: Optional[int], optional - :param type: Specifies the response as search result items without shared links, defaults to SearchResultsTypeField.SEARCH_RESULTS_ITEMS.value - :type type: SearchResultsTypeField, optional - :param entries: The search results for the query provided., defaults to None - :type entries: Optional[List[Union[FileFull, FolderFull, WebLink]]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.type = type - self.entries = entries - - -class RecentItemInteractionTypeField(str, Enum): - ITEM_PREVIEW = 'item_preview' - ITEM_UPLOAD = 'item_upload' - ITEM_COMMENT = 'item_comment' - ITEM_OPEN = 'item_open' - ITEM_MODIFY = 'item_modify' - - -class RecentItem(BaseObject): - def __init__( - self, - *, - type: Optional[str] = None, - item: Optional[Union[FileFull, FolderFull, WebLink]] = None, - interaction_type: Optional[RecentItemInteractionTypeField] = None, - interacted_at: Optional[DateTime] = None, - interaction_shared_link: Optional[str] = None, - **kwargs - ): - """ - :param type: `recent_item`, defaults to None - :type type: Optional[str], optional - :param interaction_type: The most recent type of access the user performed on - the item., defaults to None - :type interaction_type: Optional[RecentItemInteractionTypeField], optional - :param interacted_at: The time of the most recent interaction., defaults to None - :type interacted_at: Optional[DateTime], optional - :param interaction_shared_link: If the item was accessed through a shared link it will appear here, - otherwise this will be null., defaults to None - :type interaction_shared_link: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.item = item - self.interaction_type = interaction_type - self.interacted_at = interacted_at - self.interaction_shared_link = interaction_shared_link - - -class RecentItems(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[RecentItem]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of recent items, defaults to None - :type entries: Optional[List[RecentItem]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class EventEventTypeField(str, Enum): - ACCESS_GRANTED = 'ACCESS_GRANTED' - ACCESS_REVOKED = 'ACCESS_REVOKED' - ADD_DEVICE_ASSOCIATION = 'ADD_DEVICE_ASSOCIATION' - ADD_LOGIN_ACTIVITY_DEVICE = 'ADD_LOGIN_ACTIVITY_DEVICE' - ADMIN_LOGIN = 'ADMIN_LOGIN' - APPLICATION_CREATED = 'APPLICATION_CREATED' - APPLICATION_PUBLIC_KEY_ADDED = 'APPLICATION_PUBLIC_KEY_ADDED' - APPLICATION_PUBLIC_KEY_DELETED = 'APPLICATION_PUBLIC_KEY_DELETED' - CHANGE_ADMIN_ROLE = 'CHANGE_ADMIN_ROLE' - CHANGE_FOLDER_PERMISSION = 'CHANGE_FOLDER_PERMISSION' - COLLABORATION_ACCEPT = 'COLLABORATION_ACCEPT' - COLLABORATION_EXPIRATION = 'COLLABORATION_EXPIRATION' - COLLABORATION_INVITE = 'COLLABORATION_INVITE' - COLLABORATION_REMOVE = 'COLLABORATION_REMOVE' - COLLABORATION_ROLE_CHANGE = 'COLLABORATION_ROLE_CHANGE' - COLLAB_ADD_COLLABORATOR = 'COLLAB_ADD_COLLABORATOR' - COLLAB_INVITE_COLLABORATOR = 'COLLAB_INVITE_COLLABORATOR' - COLLAB_REMOVE_COLLABORATOR = 'COLLAB_REMOVE_COLLABORATOR' - COLLAB_ROLE_CHANGE = 'COLLAB_ROLE_CHANGE' - COMMENT_CREATE = 'COMMENT_CREATE' - COMMENT_DELETE = 'COMMENT_DELETE' - CONTENT_ACCESS = 'CONTENT_ACCESS' - CONTENT_WORKFLOW_ABNORMAL_DOWNLOAD_ACTIVITY = ( - 'CONTENT_WORKFLOW_ABNORMAL_DOWNLOAD_ACTIVITY' - ) - CONTENT_WORKFLOW_AUTOMATION_ADD = 'CONTENT_WORKFLOW_AUTOMATION_ADD' - CONTENT_WORKFLOW_AUTOMATION_DELETE = 'CONTENT_WORKFLOW_AUTOMATION_DELETE' - CONTENT_WORKFLOW_POLICY_ADD = 'CONTENT_WORKFLOW_POLICY_ADD' - CONTENT_WORKFLOW_SHARING_POLICY_VIOLATION = ( - 'CONTENT_WORKFLOW_SHARING_POLICY_VIOLATION' - ) - CONTENT_WORKFLOW_UPLOAD_POLICY_VIOLATION = ( - 'CONTENT_WORKFLOW_UPLOAD_POLICY_VIOLATION' - ) - COPY = 'COPY' - DATA_RETENTION_CREATE_RETENTION = 'DATA_RETENTION_CREATE_RETENTION' - DATA_RETENTION_REMOVE_RETENTION = 'DATA_RETENTION_REMOVE_RETENTION' - DELETE = 'DELETE' - DELETE_USER = 'DELETE_USER' - DEVICE_TRUST_CHECK_FAILED = 'DEVICE_TRUST_CHECK_FAILED' - DOWNLOAD = 'DOWNLOAD' - EDIT = 'EDIT' - EDIT_USER = 'EDIT_USER' - EMAIL_ALIAS_CONFIRM = 'EMAIL_ALIAS_CONFIRM' - EMAIL_ALIAS_REMOVE = 'EMAIL_ALIAS_REMOVE' - ENABLE_TWO_FACTOR_AUTH = 'ENABLE_TWO_FACTOR_AUTH' - ENTERPRISE_APP_AUTHORIZATION_UPDATE = 'ENTERPRISE_APP_AUTHORIZATION_UPDATE' - FAILED_LOGIN = 'FAILED_LOGIN' - FILE_MARKED_MALICIOUS = 'FILE_MARKED_MALICIOUS' - FILE_WATERMARKED_DOWNLOAD = 'FILE_WATERMARKED_DOWNLOAD' - GROUP_ADD_ITEM = 'GROUP_ADD_ITEM' - GROUP_ADD_USER = 'GROUP_ADD_USER' - GROUP_CREATION = 'GROUP_CREATION' - GROUP_DELETION = 'GROUP_DELETION' - GROUP_EDITED = 'GROUP_EDITED' - GROUP_REMOVE_ITEM = 'GROUP_REMOVE_ITEM' - GROUP_REMOVE_USER = 'GROUP_REMOVE_USER' - ITEM_COPY = 'ITEM_COPY' - ITEM_CREATE = 'ITEM_CREATE' - ITEM_DOWNLOAD = 'ITEM_DOWNLOAD' - ITEM_EMAIL_SEND = 'ITEM_EMAIL_SEND' - ITEM_MAKE_CURRENT_VERSION = 'ITEM_MAKE_CURRENT_VERSION' - ITEM_MODIFY = 'ITEM_MODIFY' - ITEM_MOVE = 'ITEM_MOVE' - ITEM_OPEN = 'ITEM_OPEN' - ITEM_PREVIEW = 'ITEM_PREVIEW' - ITEM_RENAME = 'ITEM_RENAME' - ITEM_SHARED = 'ITEM_SHARED' - ITEM_SHARED_CREATE = 'ITEM_SHARED_CREATE' - ITEM_SHARED_UNSHARE = 'ITEM_SHARED_UNSHARE' - ITEM_SHARED_UPDATE = 'ITEM_SHARED_UPDATE' - ITEM_SYNC = 'ITEM_SYNC' - ITEM_TRASH = 'ITEM_TRASH' - ITEM_UNDELETE_VIA_TRASH = 'ITEM_UNDELETE_VIA_TRASH' - ITEM_UNSYNC = 'ITEM_UNSYNC' - ITEM_UPLOAD = 'ITEM_UPLOAD' - LEGAL_HOLD_ASSIGNMENT_CREATE = 'LEGAL_HOLD_ASSIGNMENT_CREATE' - LEGAL_HOLD_ASSIGNMENT_DELETE = 'LEGAL_HOLD_ASSIGNMENT_DELETE' - LEGAL_HOLD_POLICY_CREATE = 'LEGAL_HOLD_POLICY_CREATE' - LEGAL_HOLD_POLICY_DELETE = 'LEGAL_HOLD_POLICY_DELETE' - LEGAL_HOLD_POLICY_UPDATE = 'LEGAL_HOLD_POLICY_UPDATE' - LOCK = 'LOCK' - LOCK_CREATE = 'LOCK_CREATE' - LOCK_DESTROY = 'LOCK_DESTROY' - LOGIN = 'LOGIN' - MASTER_INVITE_ACCEPT = 'MASTER_INVITE_ACCEPT' - MASTER_INVITE_REJECT = 'MASTER_INVITE_REJECT' - METADATA_INSTANCE_CREATE = 'METADATA_INSTANCE_CREATE' - METADATA_INSTANCE_DELETE = 'METADATA_INSTANCE_DELETE' - METADATA_INSTANCE_UPDATE = 'METADATA_INSTANCE_UPDATE' - METADATA_TEMPLATE_CREATE = 'METADATA_TEMPLATE_CREATE' - METADATA_TEMPLATE_DELETE = 'METADATA_TEMPLATE_DELETE' - METADATA_TEMPLATE_UPDATE = 'METADATA_TEMPLATE_UPDATE' - MOVE = 'MOVE' - NEW_USER = 'NEW_USER' - PREVIEW = 'PREVIEW' - REMOVE_DEVICE_ASSOCIATION = 'REMOVE_DEVICE_ASSOCIATION' - REMOVE_LOGIN_ACTIVITY_DEVICE = 'REMOVE_LOGIN_ACTIVITY_DEVICE' - RENAME = 'RENAME' - RETENTION_POLICY_ASSIGNMENT_ADD = 'RETENTION_POLICY_ASSIGNMENT_ADD' - SHARE = 'SHARE' - SHARED_LINK_SEND = 'SHARED_LINK_SEND' - SHARE_EXPIRATION = 'SHARE_EXPIRATION' - SHIELD_ALERT = 'SHIELD_ALERT' - SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED = 'SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED' - SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION = ( - 'SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION' - ) - 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_JUSTIFICATION_APPROVAL = 'SHIELD_JUSTIFICATION_APPROVAL' - SHIELD_SHARED_LINK_ACCESS_BLOCKED = 'SHIELD_SHARED_LINK_ACCESS_BLOCKED' - SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_CREATE = ( - 'SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_CREATE' - ) - SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_UPDATE = ( - 'SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_UPDATE' - ) - SIGN_DOCUMENT_ASSIGNED = 'SIGN_DOCUMENT_ASSIGNED' - SIGN_DOCUMENT_CANCELLED = 'SIGN_DOCUMENT_CANCELLED' - SIGN_DOCUMENT_COMPLETED = 'SIGN_DOCUMENT_COMPLETED' - SIGN_DOCUMENT_CONVERTED = 'SIGN_DOCUMENT_CONVERTED' - SIGN_DOCUMENT_CREATED = 'SIGN_DOCUMENT_CREATED' - SIGN_DOCUMENT_DECLINED = 'SIGN_DOCUMENT_DECLINED' - SIGN_DOCUMENT_EXPIRED = 'SIGN_DOCUMENT_EXPIRED' - SIGN_DOCUMENT_SIGNED = 'SIGN_DOCUMENT_SIGNED' - SIGN_DOCUMENT_VIEWED_BY_SIGNED = 'SIGN_DOCUMENT_VIEWED_BY_SIGNED' - SIGNER_DOWNLOADED = 'SIGNER_DOWNLOADED' - SIGNER_FORWARDED = 'SIGNER_FORWARDED' - STORAGE_EXPIRATION = 'STORAGE_EXPIRATION' - TAG_ITEM_CREATE = 'TAG_ITEM_CREATE' - TASK_ASSIGNMENT_CREATE = 'TASK_ASSIGNMENT_CREATE' - TASK_ASSIGNMENT_DELETE = 'TASK_ASSIGNMENT_DELETE' - TASK_ASSIGNMENT_UPDATE = 'TASK_ASSIGNMENT_UPDATE' - TASK_CREATE = 'TASK_CREATE' - TASK_UPDATE = 'TASK_UPDATE' - TERMS_OF_SERVICE_ACCEPT = 'TERMS_OF_SERVICE_ACCEPT' - TERMS_OF_SERVICE_REJECT = 'TERMS_OF_SERVICE_REJECT' - UNDELETE = 'UNDELETE' - UNLOCK = 'UNLOCK' - UNSHARE = 'UNSHARE' - UPDATE_COLLABORATION_EXPIRATION = 'UPDATE_COLLABORATION_EXPIRATION' - UPDATE_SHARE_EXPIRATION = 'UPDATE_SHARE_EXPIRATION' - UPLOAD = 'UPLOAD' - USER_AUTHENTICATE_OAUTH2_ACCESS_TOKEN_CREATE = ( - 'USER_AUTHENTICATE_OAUTH2_ACCESS_TOKEN_CREATE' - ) - WATERMARK_LABEL_CREATE = 'WATERMARK_LABEL_CREATE' - WATERMARK_LABEL_DELETE = 'WATERMARK_LABEL_DELETE' - - -class EventAdditionalDetailsField(BaseObject): - def __init__(self, **kwargs): - super().__init__(**kwargs) - - -class Event(BaseObject): - def __init__( - self, - *, - type: Optional[str] = None, - created_at: Optional[DateTime] = None, - recorded_at: Optional[DateTime] = None, - event_id: Optional[str] = None, - created_by: Optional[UserMini] = None, - event_type: Optional[EventEventTypeField] = None, - session_id: Optional[str] = None, - source: Optional[Union[User, EventSource, File, Folder, Dict]] = None, - additional_details: Optional[EventAdditionalDetailsField] = None, - **kwargs - ): - """ - :param type: `event`, defaults to None - :type type: Optional[str], optional - :param created_at: When the event object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param recorded_at: When the event object was recorded in database, defaults to None - :type recorded_at: Optional[DateTime], optional - :param event_id: The ID of the event object. You can use this to detect duplicate events, defaults to None - :type event_id: Optional[str], optional - :param session_id: The session of the user that performed the action. Not all events will - populate this attribute., defaults to None - :type session_id: Optional[str], optional - :param additional_details: This object provides additional information about the event if available. - - This can include how a user performed an event as well as additional - information to correlate an event to external KeySafe logs. Not all events - have an `additional_details` object. This object is only available in the - Enterprise Events., defaults to None - :type additional_details: Optional[EventAdditionalDetailsField], optional - """ - super().__init__(**kwargs) - self.type = type - self.created_at = created_at - self.recorded_at = recorded_at - self.event_id = event_id - self.created_by = created_by - self.event_type = event_type - self.session_id = session_id - self.source = source - self.additional_details = additional_details - - -class Events(BaseObject): - def __init__( - self, - *, - chunk_size: Optional[int] = None, - next_stream_position: Optional[str] = None, - entries: Optional[List[Event]] = None, - **kwargs - ): - """ - :param chunk_size: The number of events returned in this response., defaults to None - :type chunk_size: Optional[int], optional - :param next_stream_position: The stream position of the start of the next page (chunk) - of events., defaults to None - :type next_stream_position: Optional[str], optional - :param entries: A list of events, defaults to None - :type entries: Optional[List[Event]], optional - """ - super().__init__(**kwargs) - self.chunk_size = chunk_size - self.next_stream_position = next_stream_position - self.entries = entries - - -class SkillInvocationTypeField(str, Enum): - SKILL_INVOCATION = 'skill_invocation' - - -class SkillInvocationSkillTypeField(str, Enum): - SKILL = 'skill' - - -class SkillInvocationSkillField(BaseObject): - _discriminator = 'type', {'skill'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[SkillInvocationSkillTypeField] = None, - name: Optional[str] = None, - api_key: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this skill, defaults to None - :type id: Optional[str], optional - :param type: `skill`, defaults to None - :type type: Optional[SkillInvocationSkillTypeField], optional - :param name: The name of the skill, defaults to None - :type name: Optional[str], optional - :param api_key: The client ID of the application, defaults to None - :type api_key: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - self.api_key = api_key - - -class SkillInvocationTokenReadTokenTypeField(str, Enum): - BEARER = 'bearer' - - -class SkillInvocationTokenReadField(BaseObject): - def __init__( - self, - *, - access_token: Optional[str] = None, - expires_in: Optional[int] = None, - token_type: Optional[SkillInvocationTokenReadTokenTypeField] = None, - restricted_to: Optional[str] = None, - **kwargs - ): - """ - :param access_token: The requested access token., defaults to None - :type access_token: Optional[str], optional - :param expires_in: The time in seconds by which this token will expire., defaults to None - :type expires_in: Optional[int], optional - :param token_type: The type of access token returned., defaults to None - :type token_type: Optional[SkillInvocationTokenReadTokenTypeField], optional - :param restricted_to: The permissions that this access token permits, - providing a list of resources (files, folders, etc) - and the scopes permitted for each of those resources., defaults to None - :type restricted_to: Optional[str], optional - """ - super().__init__(**kwargs) - self.access_token = access_token - self.expires_in = expires_in - self.token_type = token_type - self.restricted_to = restricted_to - - -class SkillInvocationTokenWriteTokenTypeField(str, Enum): - BEARER = 'bearer' - - -class SkillInvocationTokenWriteField(BaseObject): - def __init__( - self, - *, - access_token: Optional[str] = None, - expires_in: Optional[int] = None, - token_type: Optional[SkillInvocationTokenWriteTokenTypeField] = None, - restricted_to: Optional[str] = None, - **kwargs - ): - """ - :param access_token: The requested access token., defaults to None - :type access_token: Optional[str], optional - :param expires_in: The time in seconds by which this token will expire., defaults to None - :type expires_in: Optional[int], optional - :param token_type: The type of access token returned., defaults to None - :type token_type: Optional[SkillInvocationTokenWriteTokenTypeField], optional - :param restricted_to: The permissions that this access token permits, - providing a list of resources (files, folders, etc) - and the scopes permitted for each of those resources., defaults to None - :type restricted_to: Optional[str], optional - """ - super().__init__(**kwargs) - self.access_token = access_token - self.expires_in = expires_in - self.token_type = token_type - self.restricted_to = restricted_to - - -class SkillInvocationTokenField(BaseObject): - def __init__( - self, - *, - read: Optional[SkillInvocationTokenReadField] = None, - write: Optional[SkillInvocationTokenWriteField] = None, - **kwargs - ): - """ - :param read: The basics of an access token, defaults to None - :type read: Optional[SkillInvocationTokenReadField], optional - :param write: The basics of an access token, defaults to None - :type write: Optional[SkillInvocationTokenWriteField], optional - """ - super().__init__(**kwargs) - self.read = read - self.write = write - - -class SkillInvocationStatusStateField(str, Enum): - INVOKED = 'invoked' - PROCESSING = 'processing' - SUCCESS = 'success' - TRANSIENT_FAILURE = 'transient_failure' - PERMANENT_FAILURE = 'permanent_failure' - - -class SkillInvocationStatusField(BaseObject): - def __init__( - self, - *, - state: Optional[SkillInvocationStatusStateField] = None, - message: Optional[str] = None, - error_code: Optional[str] = None, - additional_info: Optional[str] = None, - **kwargs - ): - """ - :param state: The state of this event. - - * `invoked` - Triggered the skill with event details to start - applying skill on the file. - * `processing` - Currently processing. - * `success` - Completed processing with a success. - * `transient_failure` - Encountered an issue which can be - retried. - * `permanent_failure` - Encountered a permanent issue and - retry would not help., defaults to None - :type state: Optional[SkillInvocationStatusStateField], optional - :param message: Status information, defaults to None - :type message: Optional[str], optional - :param error_code: Error code information, if error occurred., defaults to None - :type error_code: Optional[str], optional - :param additional_info: Additional status information., defaults to None - :type additional_info: Optional[str], optional - """ - super().__init__(**kwargs) - self.state = state - self.message = message - self.error_code = error_code - self.additional_info = additional_info - - -class SkillInvocationEnterpriseTypeField(str, Enum): - ENTERPRISE = 'enterprise' - - -class SkillInvocationEnterpriseField(BaseObject): - _discriminator = 'type', {'enterprise'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[SkillInvocationEnterpriseTypeField] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this enterprise., defaults to None - :type id: Optional[str], optional - :param type: `enterprise`, defaults to None - :type type: Optional[SkillInvocationEnterpriseTypeField], optional - :param name: The name of the enterprise, defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - - -class SkillInvocation(BaseObject): - _discriminator = 'type', {'skill_invocation'} - - def __init__( - self, - *, - type: Optional[SkillInvocationTypeField] = None, - id: Optional[str] = None, - skill: Optional[SkillInvocationSkillField] = None, - token: Optional[SkillInvocationTokenField] = None, - status: Optional[SkillInvocationStatusField] = None, - created_at: Optional[DateTime] = None, - trigger: Optional[str] = None, - enterprise: Optional[SkillInvocationEnterpriseField] = None, - source: Optional[Union[File, Folder]] = None, - event: Optional[Event] = None, - **kwargs - ): - """ - :param type: `skill_invocation`, defaults to None - :type type: Optional[SkillInvocationTypeField], optional - :param id: Unique identifier for the invocation request., defaults to None - :type id: Optional[str], optional - :param token: The read-only and read-write access tokens for this item, defaults to None - :type token: Optional[SkillInvocationTokenField], optional - :param status: The details status of this event., defaults to None - :type status: Optional[SkillInvocationStatusField], optional - :param created_at: The time this invocation was created., defaults to None - :type created_at: Optional[DateTime], optional - :param trigger: Action that triggered the invocation, defaults to None - :type trigger: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - self.skill = skill - self.token = token - self.status = status - self.created_at = created_at - self.trigger = trigger - self.enterprise = enterprise - self.source = source - self.event = event - - -class CollaborationTypeField(str, Enum): - COLLABORATION = 'collaboration' - - -class CollaborationRoleField(str, Enum): - EDITOR = 'editor' - VIEWER = 'viewer' - PREVIEWER = 'previewer' - UPLOADER = 'uploader' - PREVIEWER_UPLOADER = 'previewer uploader' - VIEWER_UPLOADER = 'viewer uploader' - CO_OWNER = 'co-owner' - OWNER = 'owner' - - -class CollaborationStatusField(str, Enum): - ACCEPTED = 'accepted' - PENDING = 'pending' - REJECTED = 'rejected' - - -class CollaborationAcceptanceRequirementsStatusTermsOfServiceRequirementField( - BaseObject -): - def __init__( - self, - *, - is_accepted: Optional[bool] = None, - terms_of_service: Optional[TermsOfServiceBase] = None, - **kwargs - ): - """ - :param is_accepted: Whether or not the terms of service have been accepted. The - field is `null` when there is no terms of service required., defaults to None - :type is_accepted: Optional[bool], optional - """ - super().__init__(**kwargs) - self.is_accepted = is_accepted - self.terms_of_service = terms_of_service - - -class CollaborationAcceptanceRequirementsStatusStrongPasswordRequirementField( - BaseObject -): - def __init__( - self, - *, - enterprise_has_strong_password_required_for_external_users: Optional[ - bool - ] = None, - user_has_strong_password: Optional[bool] = None, - **kwargs - ): - """ - :param enterprise_has_strong_password_required_for_external_users: Whether or not the enterprise that owns the content requires - a strong password to collaborate on the content., defaults to None - :type enterprise_has_strong_password_required_for_external_users: Optional[bool], optional - :param user_has_strong_password: Whether or not the user has a strong password set for their - account. The field is `null` when a strong password is not - required., defaults to None - :type user_has_strong_password: Optional[bool], optional - """ - super().__init__(**kwargs) - self.enterprise_has_strong_password_required_for_external_users = ( - enterprise_has_strong_password_required_for_external_users - ) - self.user_has_strong_password = user_has_strong_password - - -class CollaborationAcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField( - BaseObject -): - def __init__( - self, - *, - enterprise_has_two_factor_auth_enabled: Optional[bool] = None, - user_has_two_factor_authentication_enabled: Optional[bool] = None, - **kwargs - ): - """ - :param enterprise_has_two_factor_auth_enabled: Whether or not the enterprise that owns the content requires - two-factor authentication to be enabled in order to - collaborate on the content., defaults to None - :type enterprise_has_two_factor_auth_enabled: Optional[bool], optional - :param user_has_two_factor_authentication_enabled: Whether or not the user has two-factor authentication - enabled. The field is `null` when two-factor - authentication is not required., defaults to None - :type user_has_two_factor_authentication_enabled: Optional[bool], optional - """ - super().__init__(**kwargs) - self.enterprise_has_two_factor_auth_enabled = ( - enterprise_has_two_factor_auth_enabled - ) - self.user_has_two_factor_authentication_enabled = ( - user_has_two_factor_authentication_enabled - ) - - -class CollaborationAcceptanceRequirementsStatusField(BaseObject): - def __init__( - self, - *, - terms_of_service_requirement: Optional[ - CollaborationAcceptanceRequirementsStatusTermsOfServiceRequirementField - ] = None, - strong_password_requirement: Optional[ - CollaborationAcceptanceRequirementsStatusStrongPasswordRequirementField - ] = None, - two_factor_authentication_requirement: Optional[ - CollaborationAcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField - ] = None, - **kwargs - ): - super().__init__(**kwargs) - self.terms_of_service_requirement = terms_of_service_requirement - self.strong_password_requirement = strong_password_requirement - self.two_factor_authentication_requirement = ( - two_factor_authentication_requirement - ) - - -class Collaboration(BaseObject): - _discriminator = 'type', {'collaboration'} - - def __init__( - self, - id: str, - *, - type: CollaborationTypeField = CollaborationTypeField.COLLABORATION.value, - item: Optional[Union[File, Folder, WebLink]] = None, - accessible_by: Optional[Union[UserCollaborations, GroupMini]] = None, - invite_email: Optional[str] = None, - role: Optional[CollaborationRoleField] = None, - expires_at: Optional[DateTime] = None, - is_access_only: Optional[bool] = None, - status: Optional[CollaborationStatusField] = None, - acknowledged_at: Optional[DateTime] = None, - created_by: Optional[UserCollaborations] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - acceptance_requirements_status: Optional[ - CollaborationAcceptanceRequirementsStatusField - ] = None, - **kwargs - ): - """ - :param id: The unique identifier for this collaboration. - :type id: str - :param type: `collaboration`, defaults to CollaborationTypeField.COLLABORATION.value - :type type: CollaborationTypeField, optional - :param invite_email: The email address used to invite an unregistered collaborator, if - they are not a registered user., defaults to None - :type invite_email: Optional[str], optional - :param role: The level of access granted., defaults to None - :type role: Optional[CollaborationRoleField], optional - :param expires_at: When the collaboration will expire, or `null` if no expiration - date is set., defaults to None - :type expires_at: Optional[DateTime], optional - :param is_access_only: If set to `true`, collaborators have access to - shared items, but such items won't be visible in the - All Files list. Additionally, collaborators won't - see the the path to the root folder for the - shared item., defaults to None - :type is_access_only: Optional[bool], optional - :param status: The status of the collaboration invitation. If the status - is `pending`, `login` and `name` return an empty string., defaults to None - :type status: Optional[CollaborationStatusField], optional - :param acknowledged_at: When the `status` of the collaboration object changed to - `accepted` or `rejected`., defaults to None - :type acknowledged_at: Optional[DateTime], optional - :param created_at: When the collaboration object was created., defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the collaboration object was last modified., defaults to None - :type modified_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.item = item - self.accessible_by = accessible_by - self.invite_email = invite_email - self.role = role - self.expires_at = expires_at - self.is_access_only = is_access_only - self.status = status - self.acknowledged_at = acknowledged_at - self.created_by = created_by - self.created_at = created_at - self.modified_at = modified_at - self.acceptance_requirements_status = acceptance_requirements_status - - -class CollaborationsOrderDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class CollaborationsOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[str] = None, - direction: Optional[CollaborationsOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field to order by, defaults to None - :type by: Optional[str], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[CollaborationsOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class Collaborations(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - order: Optional[List[CollaborationsOrderField]] = None, - entries: Optional[List[Collaboration]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type offset: Optional[int], optional - :param order: The order by which items are returned. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type order: Optional[List[CollaborationsOrderField]], optional - :param entries: A list of collaborations, defaults to None - :type entries: Optional[List[Collaboration]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.order = order - self.entries = entries - - -class WebhookInvocationTypeField(str, Enum): - WEBHOOK_EVENT = 'webhook_event' - - -class WebhookInvocationTriggerField(str, Enum): - FILE_UPLOADED = 'FILE.UPLOADED' - FILE_PREVIEWED = 'FILE.PREVIEWED' - FILE_DOWNLOADED = 'FILE.DOWNLOADED' - FILE_TRASHED = 'FILE.TRASHED' - FILE_DELETED = 'FILE.DELETED' - FILE_RESTORED = 'FILE.RESTORED' - FILE_COPIED = 'FILE.COPIED' - FILE_MOVED = 'FILE.MOVED' - FILE_LOCKED = 'FILE.LOCKED' - FILE_UNLOCKED = 'FILE.UNLOCKED' - FILE_RENAMED = 'FILE.RENAMED' - COMMENT_CREATED = 'COMMENT.CREATED' - COMMENT_UPDATED = 'COMMENT.UPDATED' - COMMENT_DELETED = 'COMMENT.DELETED' - TASK_ASSIGNMENT_CREATED = 'TASK_ASSIGNMENT.CREATED' - TASK_ASSIGNMENT_UPDATED = 'TASK_ASSIGNMENT.UPDATED' - METADATA_INSTANCE_CREATED = 'METADATA_INSTANCE.CREATED' - METADATA_INSTANCE_UPDATED = 'METADATA_INSTANCE.UPDATED' - METADATA_INSTANCE_DELETED = 'METADATA_INSTANCE.DELETED' - FOLDER_CREATED = 'FOLDER.CREATED' - FOLDER_RENAMED = 'FOLDER.RENAMED' - FOLDER_DOWNLOADED = 'FOLDER.DOWNLOADED' - FOLDER_RESTORED = 'FOLDER.RESTORED' - FOLDER_DELETED = 'FOLDER.DELETED' - FOLDER_COPIED = 'FOLDER.COPIED' - FOLDER_MOVED = 'FOLDER.MOVED' - FOLDER_TRASHED = 'FOLDER.TRASHED' - WEBHOOK_DELETED = 'WEBHOOK.DELETED' - COLLABORATION_CREATED = 'COLLABORATION.CREATED' - COLLABORATION_ACCEPTED = 'COLLABORATION.ACCEPTED' - COLLABORATION_REJECTED = 'COLLABORATION.REJECTED' - COLLABORATION_REMOVED = 'COLLABORATION.REMOVED' - COLLABORATION_UPDATED = 'COLLABORATION.UPDATED' - SHARED_LINK_DELETED = 'SHARED_LINK.DELETED' - SHARED_LINK_CREATED = 'SHARED_LINK.CREATED' - SHARED_LINK_UPDATED = 'SHARED_LINK.UPDATED' - SIGN_REQUEST_COMPLETED = 'SIGN_REQUEST.COMPLETED' - SIGN_REQUEST_DECLINED = 'SIGN_REQUEST.DECLINED' - SIGN_REQUEST_EXPIRED = 'SIGN_REQUEST.EXPIRED' - SIGN_REQUEST_SIGNER_EMAIL_BOUNCED = 'SIGN_REQUEST.SIGNER_EMAIL_BOUNCED' - - -class WebhookInvocation(BaseObject): - _discriminator = 'type', {'webhook_event'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[WebhookInvocationTypeField] = None, - webhook: Optional[Webhook] = None, - created_by: Optional[UserMini] = None, - created_at: Optional[DateTime] = None, - trigger: Optional[WebhookInvocationTriggerField] = None, - source: Optional[Union[File, Folder]] = None, - **kwargs - ): - """ - :param id: The unique identifier for this webhook invocation, defaults to None - :type id: Optional[str], optional - :param type: `webhook_event`, defaults to None - :type type: Optional[WebhookInvocationTypeField], optional - :param created_at: A timestamp identifying the time that - the webhook event was triggered., defaults to None - :type created_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.webhook = webhook - self.created_by = created_by - self.created_at = created_at - self.trigger = trigger - self.source = source - - -class WorkflowMiniTypeField(str, Enum): - WORKFLOW = 'workflow' - - -class WorkflowMini(BaseObject): - _discriminator = 'type', {'workflow'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[WorkflowMiniTypeField] = None, - name: Optional[str] = None, - description: Optional[str] = None, - is_enabled: Optional[bool] = None, - **kwargs - ): - """ - :param id: The unique identifier for the workflow, defaults to None - :type id: Optional[str], optional - :param type: `workflow`, defaults to None - :type type: Optional[WorkflowMiniTypeField], optional - :param name: The name of the workflow, defaults to None - :type name: Optional[str], optional - :param description: The description for a workflow., defaults to None - :type description: Optional[str], optional - :param is_enabled: Specifies if this workflow is enabled, defaults to None - :type is_enabled: Optional[bool], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - self.description = description - self.is_enabled = is_enabled - - -class WorkflowFlowsTypeField(str, Enum): - FLOW = 'flow' - - -class WorkflowFlowsTriggerTypeField(str, Enum): - TRIGGER = 'trigger' - - -class WorkflowFlowsTriggerTriggerTypeField(str, Enum): - WORKFLOW_MANUAL_START = 'WORKFLOW_MANUAL_START' - - -class WorkflowFlowsTriggerScopeTypeField(str, Enum): - TRIGGER_SCOPE = 'trigger_scope' - - -class WorkflowFlowsTriggerScopeObjectTypeField(str, Enum): - FOLDER = 'folder' - - -class WorkflowFlowsTriggerScopeObjectField(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - *, - type: Optional[WorkflowFlowsTriggerScopeObjectTypeField] = None, - id: Optional[str] = None, - **kwargs - ): - """ - :param type: The type of the object, defaults to None - :type type: Optional[WorkflowFlowsTriggerScopeObjectTypeField], optional - :param id: The id of the object, defaults to None - :type id: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - - -class WorkflowFlowsTriggerScopeField(BaseObject): - _discriminator = 'type', {'trigger_scope'} - - def __init__( - self, - *, - type: Optional[WorkflowFlowsTriggerScopeTypeField] = None, - ref: Optional[str] = None, - object: Optional[WorkflowFlowsTriggerScopeObjectField] = None, - **kwargs - ): - """ - :param type: The trigger scope's resource type, defaults to None - :type type: Optional[WorkflowFlowsTriggerScopeTypeField], optional - :param ref: Indicates the path of the condition value to check, defaults to None - :type ref: Optional[str], optional - :param object: The object the `ref` points to, defaults to None - :type object: Optional[WorkflowFlowsTriggerScopeObjectField], optional - """ - super().__init__(**kwargs) - self.type = type - self.ref = ref - self.object = object - - -class WorkflowFlowsTriggerField(BaseObject): - _discriminator = 'type', {'trigger'} - - def __init__( - self, - *, - type: Optional[WorkflowFlowsTriggerTypeField] = None, - trigger_type: Optional[WorkflowFlowsTriggerTriggerTypeField] = None, - scope: Optional[List[WorkflowFlowsTriggerScopeField]] = None, - **kwargs - ): - """ - :param type: The trigger's resource type, defaults to None - :type type: Optional[WorkflowFlowsTriggerTypeField], optional - :param trigger_type: The type of trigger selected for this flow, defaults to None - :type trigger_type: Optional[WorkflowFlowsTriggerTriggerTypeField], optional - :param scope: List of trigger scopes, defaults to None - :type scope: Optional[List[WorkflowFlowsTriggerScopeField]], optional - """ - super().__init__(**kwargs) - self.type = type - self.trigger_type = trigger_type - self.scope = scope - - -class WorkflowFlowsOutcomesTypeField(str, Enum): - OUTCOME = 'outcome' - - -class WorkflowFlowsOutcomesActionTypeField(str, Enum): - ADD_METADATA = 'add_metadata' - ASSIGN_TASK = 'assign_task' - COPY_FILE = 'copy_file' - COPY_FOLDER = 'copy_folder' - CREATE_FOLDER = 'create_folder' - DELETE_FILE = 'delete_file' - DELETE_FOLDER = 'delete_folder' - LOCK_FILE = 'lock_file' - MOVE_FILE = 'move_file' - MOVE_FOLDER = 'move_folder' - REMOVE_WATERMARK_FILE = 'remove_watermark_file' - RENAME_FOLDER = 'rename_folder' - RESTORE_FOLDER = 'restore_folder' - SHARE_FILE = 'share_file' - SHARE_FOLDER = 'share_folder' - UNLOCK_FILE = 'unlock_file' - UPLOAD_FILE = 'upload_file' - WAIT_FOR_TASK = 'wait_for_task' - WATERMARK_FILE = 'watermark_file' - GO_BACK_TO_STEP = 'go_back_to_step' - APPLY_FILE_CLASSIFICATION = 'apply_file_classification' - APPLY_FOLDER_CLASSIFICATION = 'apply_folder_classification' - SEND_NOTIFICATION = 'send_notification' - - -class WorkflowFlowsOutcomesIfRejectedTypeField(str, Enum): - OUTCOME = 'outcome' - - -class WorkflowFlowsOutcomesIfRejectedActionTypeField(str, Enum): - ADD_METADATA = 'add_metadata' - ASSIGN_TASK = 'assign_task' - COPY_FILE = 'copy_file' - COPY_FOLDER = 'copy_folder' - CREATE_FOLDER = 'create_folder' - DELETE_FILE = 'delete_file' - DELETE_FOLDER = 'delete_folder' - LOCK_FILE = 'lock_file' - MOVE_FILE = 'move_file' - MOVE_FOLDER = 'move_folder' - REMOVE_WATERMARK_FILE = 'remove_watermark_file' - RENAME_FOLDER = 'rename_folder' - RESTORE_FOLDER = 'restore_folder' - SHARE_FILE = 'share_file' - SHARE_FOLDER = 'share_folder' - UNLOCK_FILE = 'unlock_file' - UPLOAD_FILE = 'upload_file' - WAIT_FOR_TASK = 'wait_for_task' - WATERMARK_FILE = 'watermark_file' - GO_BACK_TO_STEP = 'go_back_to_step' - APPLY_FILE_CLASSIFICATION = 'apply_file_classification' - APPLY_FOLDER_CLASSIFICATION = 'apply_folder_classification' - SEND_NOTIFICATION = 'send_notification' - - -class WorkflowFlowsOutcomesIfRejectedField(BaseObject): - _discriminator = 'type', {'outcome'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[WorkflowFlowsOutcomesIfRejectedTypeField] = None, - name: Optional[str] = None, - action_type: Optional[WorkflowFlowsOutcomesIfRejectedActionTypeField] = None, - **kwargs - ): - """ - :param id: The identifier of the outcome, defaults to None - :type id: Optional[str], optional - :param type: The outcomes resource type, defaults to None - :type type: Optional[WorkflowFlowsOutcomesIfRejectedTypeField], optional - :param name: The name of the outcome, defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - self.action_type = action_type - - -class WorkflowFlowsOutcomesField(BaseObject): - _discriminator = 'type', {'outcome'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[WorkflowFlowsOutcomesTypeField] = None, - name: Optional[str] = None, - action_type: Optional[WorkflowFlowsOutcomesActionTypeField] = None, - if_rejected: Optional[List[WorkflowFlowsOutcomesIfRejectedField]] = None, - **kwargs - ): - """ - :param id: The identifier of the outcome, defaults to None - :type id: Optional[str], optional - :param type: The outcomes resource type, defaults to None - :type type: Optional[WorkflowFlowsOutcomesTypeField], optional - :param name: The name of the outcome, defaults to None - :type name: Optional[str], optional - :param if_rejected: If `action_type` is `assign_task` and the task is rejected, returns a - list of outcomes to complete, defaults to None - :type if_rejected: Optional[List[WorkflowFlowsOutcomesIfRejectedField]], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - self.action_type = action_type - self.if_rejected = if_rejected - - -class WorkflowFlowsField(BaseObject): - _discriminator = 'type', {'flow'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[WorkflowFlowsTypeField] = None, - trigger: Optional[WorkflowFlowsTriggerField] = None, - outcomes: Optional[List[WorkflowFlowsOutcomesField]] = None, - created_at: Optional[DateTime] = None, - created_by: Optional[UserBase] = None, - **kwargs - ): - """ - :param id: The identifier of the flow, defaults to None - :type id: Optional[str], optional - :param type: The flow's resource type, defaults to None - :type type: Optional[WorkflowFlowsTypeField], optional - :param created_at: When this flow was created, defaults to None - :type created_at: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.trigger = trigger - self.outcomes = outcomes - self.created_at = created_at - self.created_by = created_by - - -class Workflow(WorkflowMini): - def __init__( - self, - *, - flows: Optional[List[WorkflowFlowsField]] = None, - id: Optional[str] = None, - type: Optional[WorkflowMiniTypeField] = None, - name: Optional[str] = None, - description: Optional[str] = None, - is_enabled: Optional[bool] = None, - **kwargs - ): - """ - :param flows: A list of flows assigned to a workflow., defaults to None - :type flows: Optional[List[WorkflowFlowsField]], optional - :param id: The unique identifier for the workflow, defaults to None - :type id: Optional[str], optional - :param type: `workflow`, defaults to None - :type type: Optional[WorkflowMiniTypeField], optional - :param name: The name of the workflow, defaults to None - :type name: Optional[str], optional - :param description: The description for a workflow., defaults to None - :type description: Optional[str], optional - :param is_enabled: Specifies if this workflow is enabled, defaults to None - :type is_enabled: Optional[bool], optional - """ - super().__init__( - id=id, - type=type, - name=name, - description=description, - is_enabled=is_enabled, - **kwargs - ) - self.flows = flows - - -class Workflows(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[Workflow]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of workflows, defaults to None - :type entries: Optional[List[Workflow]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class WorkflowFull(Workflow): - def __init__( - self, - *, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - created_by: Optional[UserBase] = None, - modified_by: Optional[UserBase] = None, - flows: Optional[List[WorkflowFlowsField]] = None, - id: Optional[str] = None, - type: Optional[WorkflowMiniTypeField] = None, - name: Optional[str] = None, - description: Optional[str] = None, - is_enabled: Optional[bool] = None, - **kwargs - ): - """ - :param created_at: The date and time when the workflow was created on Box, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: The date and time when the workflow was last updated on Box, defaults to None - :type modified_at: Optional[DateTime], optional - :param flows: A list of flows assigned to a workflow., defaults to None - :type flows: Optional[List[WorkflowFlowsField]], optional - :param id: The unique identifier for the workflow, defaults to None - :type id: Optional[str], optional - :param type: `workflow`, defaults to None - :type type: Optional[WorkflowMiniTypeField], optional - :param name: The name of the workflow, defaults to None - :type name: Optional[str], optional - :param description: The description for a workflow., defaults to None - :type description: Optional[str], optional - :param is_enabled: Specifies if this workflow is enabled, defaults to None - :type is_enabled: Optional[bool], optional - """ - super().__init__( - flows=flows, - id=id, - type=type, - name=name, - description=description, - is_enabled=is_enabled, - **kwargs - ) - self.created_at = created_at - self.modified_at = modified_at - self.created_by = created_by - self.modified_by = modified_by - - -class ZipDownloadNameConflictsTypeField(str, Enum): - FILE = 'file' - FOLDER = 'folder' - - -class ZipDownloadNameConflictsField(BaseObject): - _discriminator = 'type', {'file', 'folder'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[ZipDownloadNameConflictsTypeField] = None, - original_name: Optional[str] = None, - download_name: Optional[str] = None, - **kwargs - ): - """ - :param id: The identifier of the item, defaults to None - :type id: Optional[str], optional - :param type: The type of this item, defaults to None - :type type: Optional[ZipDownloadNameConflictsTypeField], optional - :param original_name: The original name of this item, defaults to None - :type original_name: Optional[str], optional - :param download_name: The new name of this item as it will appear in the - downloaded `zip` archive., defaults to None - :type download_name: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.original_name = original_name - self.download_name = download_name - - -class ZipDownload(BaseObject): - def __init__( - self, - *, - download_url: Optional[str] = None, - status_url: Optional[str] = None, - expires_at: Optional[DateTime] = None, - name_conflicts: Optional[List[List[ZipDownloadNameConflictsField]]] = None, - **kwargs - ): - """ - :param download_url: The URL that can be used to download the `zip` archive. A `Get` request to - this URL will start streaming the items requested. By default, this URL - is only valid for a few seconds, until the `expires_at` time, unless a - download is started after which it is valid for the duration of the - download. - - It is important to note that the domain and path of this URL might change - between API calls, and therefore it's important to use this URL as-is., defaults to None - :type download_url: Optional[str], optional - :param status_url: The URL that can be used to get the status of the `zip` archive being - downloaded. A `Get` request to this URL will return the number of files - in the archive as well as the number of items already downloaded or - skipped. By default, this URL is only valid for a few seconds, until the - `expires_at` time, unless a download is started after which the URL is - valid for 12 hours from the start of the download. - - It is important to note that the domain and path of this URL might change - between API calls, and therefore it's important to use this URL as-is., defaults to None - :type status_url: Optional[str], optional - :param expires_at: The time and date when this archive will expire. After this time the - `status_url` and `download_url` will return an error. - - By default, these URLs are only valid for a few seconds, unless a download - is started after which the `download_url` is valid for the duration of the - download, and the `status_url` is valid for 12 hours from the start of the - download., defaults to None - :type expires_at: Optional[DateTime], optional - :param name_conflicts: A list of conflicts that occurred when trying to create the archive. This - would occur when multiple items have been requested with the - same name. - - To solve these conflicts, the API will automatically rename an item - and return a mapping between the original item's name and its new - name. - - For every conflict, both files will be renamed and therefore this list - will always be a multiple of 2., defaults to None - :type name_conflicts: Optional[List[List[ZipDownloadNameConflictsField]]], optional - """ - super().__init__(**kwargs) - self.download_url = download_url - self.status_url = status_url - self.expires_at = expires_at - self.name_conflicts = name_conflicts - - -class ZipDownloadStatusStateField(str, Enum): - IN_PROGRESS = 'in_progress' - FAILED = 'failed' - SUCCEEDED = 'succeeded' - - -class ZipDownloadStatus(BaseObject): - def __init__( - self, - *, - total_file_count: Optional[int] = None, - downloaded_file_count: Optional[int] = None, - skipped_file_count: Optional[int] = None, - skipped_folder_count: Optional[int] = None, - state: Optional[ZipDownloadStatusStateField] = None, - **kwargs - ): - """ - :param total_file_count: The total number of files in the archive., defaults to None - :type total_file_count: Optional[int], optional - :param downloaded_file_count: The number of files that have already been downloaded., defaults to None - :type downloaded_file_count: Optional[int], optional - :param skipped_file_count: The number of files that have been skipped as they could not be - downloaded. In many cases this is due to permission issues that have - surfaced between the creation of the request for the archive and the - archive being downloaded., defaults to None - :type skipped_file_count: Optional[int], optional - :param skipped_folder_count: The number of folders that have been skipped as they could not be - downloaded. In many cases this is due to permission issues that have - surfaced between the creation of the request for the archive and the - archive being downloaded., defaults to None - :type skipped_folder_count: Optional[int], optional - :param state: The state of the archive being downloaded., defaults to None - :type state: Optional[ZipDownloadStatusStateField], optional - """ - super().__init__(**kwargs) - self.total_file_count = total_file_count - self.downloaded_file_count = downloaded_file_count - self.skipped_file_count = skipped_file_count - self.skipped_folder_count = skipped_folder_count - self.state = state - - -class CompletionRuleVariableTypeField(str, Enum): - VARIABLE = 'variable' - - -class CompletionRuleVariableVariableTypeField(str, Enum): - TASK_COMPLETION_RULE = 'task_completion_rule' - - -class CompletionRuleVariableVariableValueField(str, Enum): - ALL_ASSIGNEES = 'all_assignees' - ANY_ASSIGNEES = 'any_assignees' - - -class CompletionRuleVariable(BaseObject): - _discriminator = 'type', {'variable'} - - def __init__( - self, - variable_value: CompletionRuleVariableVariableValueField, - *, - type: CompletionRuleVariableTypeField = CompletionRuleVariableTypeField.VARIABLE.value, - variable_type: CompletionRuleVariableVariableTypeField = CompletionRuleVariableVariableTypeField.TASK_COMPLETION_RULE.value, - **kwargs - ): - """ - :param variable_value: Variable - values for a completion - rule. - - :type variable_value: CompletionRuleVariableVariableValueField - :param type: Completion - Rule object type. - , defaults to CompletionRuleVariableTypeField.VARIABLE.value - :type type: CompletionRuleVariableTypeField, optional - :param variable_type: Variable type - for the Completion - Rule object. - , defaults to CompletionRuleVariableVariableTypeField.TASK_COMPLETION_RULE.value - :type variable_type: CompletionRuleVariableVariableTypeField, optional - """ - super().__init__(**kwargs) - self.variable_value = variable_value - self.type = type - self.variable_type = variable_type - - -class CollaboratorVariableTypeField(str, Enum): - VARIABLE = 'variable' - - -class CollaboratorVariableVariableTypeField(str, Enum): - USER_LIST = 'user_list' - - -class CollaboratorVariableVariableValueTypeField(str, Enum): - USER = 'user' - - -class CollaboratorVariableVariableValueField(BaseObject): - _discriminator = 'type', {'user'} - - def __init__( - self, - id: str, - *, - type: CollaboratorVariableVariableValueTypeField = CollaboratorVariableVariableValueTypeField.USER.value, - **kwargs - ): - """ - :param id: User's ID. - :type id: str - :param type: The object type., defaults to CollaboratorVariableVariableValueTypeField.USER.value - :type type: CollaboratorVariableVariableValueTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class CollaboratorVariable(BaseObject): - _discriminator = 'type', {'variable'} - - def __init__( - self, - variable_value: List[CollaboratorVariableVariableValueField], - *, - type: CollaboratorVariableTypeField = CollaboratorVariableTypeField.VARIABLE.value, - variable_type: CollaboratorVariableVariableTypeField = CollaboratorVariableVariableTypeField.USER_LIST.value, - **kwargs - ): - """ - :param variable_value: A list of user IDs. - :type variable_value: List[CollaboratorVariableVariableValueField] - :param type: Collaborator - object type. - , defaults to CollaboratorVariableTypeField.VARIABLE.value - :type type: CollaboratorVariableTypeField, optional - :param variable_type: Variable type - for the Collaborator - object. - , defaults to CollaboratorVariableVariableTypeField.USER_LIST.value - :type variable_type: CollaboratorVariableVariableTypeField, optional - """ - super().__init__(**kwargs) - self.variable_value = variable_value - self.type = type - self.variable_type = variable_type - - -class KeywordSkillCardTypeField(str, Enum): - SKILL_CARD = 'skill_card' - - -class KeywordSkillCardSkillCardTypeField(str, Enum): - KEYWORD = 'keyword' - - -class KeywordSkillCardSkillCardTitleField(BaseObject): - def __init__(self, message: str, *, code: Optional[str] = None, **kwargs): - """ - :param message: The actual title to show in the UI. - :type message: str - :param code: An optional identifier for the title., defaults to None - :type code: Optional[str], optional - """ - super().__init__(**kwargs) - self.message = message - self.code = code - - -class KeywordSkillCardSkillTypeField(str, Enum): - SERVICE = 'service' - - -class KeywordSkillCardSkillField(BaseObject): - _discriminator = 'type', {'service'} - - def __init__( - self, - id: str, - *, - type: KeywordSkillCardSkillTypeField = KeywordSkillCardSkillTypeField.SERVICE.value, - **kwargs - ): - """ - :param id: A custom identifier that represent the service that - applied this metadata. - :type id: str - :param type: `service`, defaults to KeywordSkillCardSkillTypeField.SERVICE.value - :type type: KeywordSkillCardSkillTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class KeywordSkillCardInvocationTypeField(str, Enum): - SKILL_INVOCATION = 'skill_invocation' - - -class KeywordSkillCardInvocationField(BaseObject): - _discriminator = 'type', {'skill_invocation'} - - def __init__( - self, - id: str, - *, - type: KeywordSkillCardInvocationTypeField = KeywordSkillCardInvocationTypeField.SKILL_INVOCATION.value, - **kwargs - ): - """ - :param id: A custom identifier that represent the instance of - the service that applied this metadata. For example, - if your `image-recognition-service` runs on multiple - nodes, this field can be used to identify the ID of - the node that was used to apply the metadata. - :type id: str - :param type: `skill_invocation`, defaults to KeywordSkillCardInvocationTypeField.SKILL_INVOCATION.value - :type type: KeywordSkillCardInvocationTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class KeywordSkillCardEntriesField(BaseObject): - def __init__(self, *, text: Optional[str] = None, **kwargs): - """ - :param text: The text of the keyword., defaults to None - :type text: Optional[str], optional - """ - super().__init__(**kwargs) - self.text = text - - -class KeywordSkillCard(BaseObject): - _discriminator = 'skill_card_type', {'keyword'} - - def __init__( - self, - skill: KeywordSkillCardSkillField, - invocation: KeywordSkillCardInvocationField, - entries: List[KeywordSkillCardEntriesField], - *, - created_at: Optional[DateTime] = None, - type: KeywordSkillCardTypeField = KeywordSkillCardTypeField.SKILL_CARD.value, - skill_card_type: KeywordSkillCardSkillCardTypeField = KeywordSkillCardSkillCardTypeField.KEYWORD.value, - skill_card_title: Optional[KeywordSkillCardSkillCardTitleField] = None, - **kwargs - ): - """ - :param skill: The service that applied this metadata. - :type skill: KeywordSkillCardSkillField - :param invocation: The invocation of this service, used to track - which instance of a service applied the metadata. - :type invocation: KeywordSkillCardInvocationField - :param entries: An list of entries in the metadata card. - :type entries: List[KeywordSkillCardEntriesField] - :param created_at: The optional date and time this card was created at., defaults to None - :type created_at: Optional[DateTime], optional - :param type: `skill_card`, defaults to KeywordSkillCardTypeField.SKILL_CARD.value - :type type: KeywordSkillCardTypeField, optional - :param skill_card_type: `keyword`, defaults to KeywordSkillCardSkillCardTypeField.KEYWORD.value - :type skill_card_type: KeywordSkillCardSkillCardTypeField, optional - :param skill_card_title: The title of the card., defaults to None - :type skill_card_title: Optional[KeywordSkillCardSkillCardTitleField], optional - """ - super().__init__(**kwargs) - self.skill = skill - self.invocation = invocation - self.entries = entries - self.created_at = created_at - self.type = type - self.skill_card_type = skill_card_type - self.skill_card_title = skill_card_title - - -class IntegrationMappingSlackOptions(BaseObject): - def __init__( - self, *, is_access_management_disabled: Optional[bool] = None, **kwargs - ): - """ - :param is_access_management_disabled: Indicates whether or not channel member - access to the underlying box item - should be automatically managed. - Depending on type of channel, access is managed - through creating collaborations or shared links., defaults to None - :type is_access_management_disabled: Optional[bool], optional - """ - super().__init__(**kwargs) - self.is_access_management_disabled = is_access_management_disabled - - -class IntegrationMappingPartnerItemSlackTypeField(str, Enum): - CHANNEL = 'channel' - - -class IntegrationMappingPartnerItemSlack(BaseObject): - _discriminator = 'type', {'channel'} - - def __init__( - self, - id: str, - *, - type: IntegrationMappingPartnerItemSlackTypeField = IntegrationMappingPartnerItemSlackTypeField.CHANNEL.value, - slack_workspace_id: Optional[str] = None, - slack_org_id: Optional[str] = None, - **kwargs - ): - """ - :param id: ID of the mapped item (of type referenced in `type`) - :type id: str - :param type: Type of the mapped item referenced in `id`, defaults to IntegrationMappingPartnerItemSlackTypeField.CHANNEL.value - :type type: IntegrationMappingPartnerItemSlackTypeField, optional - :param slack_workspace_id: ID of the Slack workspace with which the item is associated. Use this parameter if Box for Slack is installed at a workspace level. Do not use `slack_org_id` at the same time., defaults to None - :type slack_workspace_id: Optional[str], optional - :param slack_org_id: ID of the Slack org with which the item is associated. Use this parameter if Box for Slack is installed at the org level. Do not use `slack_workspace_id` at the same time., defaults to None - :type slack_org_id: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.slack_workspace_id = slack_workspace_id - self.slack_org_id = slack_org_id - - -class IntegrationMappingTypeField(str, Enum): - INTEGRATION_MAPPING = 'integration_mapping' - - -class IntegrationMapping(IntegrationMappingBase): - def __init__( - self, - partner_item: Union[IntegrationMappingPartnerItemSlack], - box_item: FolderMini, - *, - type: IntegrationMappingTypeField = IntegrationMappingTypeField.INTEGRATION_MAPPING.value, - is_manually_created: Optional[bool] = None, - options: Optional[IntegrationMappingSlackOptions] = None, - created_by: Optional[UserIntegrationMappings] = None, - modified_by: Optional[UserIntegrationMappings] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - id: Optional[str] = None, - integration_type: Optional[IntegrationMappingBaseIntegrationTypeField] = None, - **kwargs - ): - """ - :param partner_item: Mapped item object for Slack - :type partner_item: Union[IntegrationMappingPartnerItemSlack] - :param box_item: The Box folder, to which the object from the - partner app domain (referenced in `partner_item_id`) is mapped - :type box_item: FolderMini - :param type: Mapping type, defaults to IntegrationMappingTypeField.INTEGRATION_MAPPING.value - :type type: IntegrationMappingTypeField, optional - :param is_manually_created: Identifies whether the mapping has - been manually set - (as opposed to being automatically created), defaults to None - :type is_manually_created: Optional[bool], optional - :param options: Integration mapping options for Slack, defaults to None - :type options: Optional[IntegrationMappingSlackOptions], optional - :param created_by: An object representing the user who - created the integration mapping, defaults to None - :type created_by: Optional[UserIntegrationMappings], optional - :param modified_by: The user who - last modified the integration mapping, defaults to None - :type modified_by: Optional[UserIntegrationMappings], optional - :param created_at: When the integration mapping object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the integration mapping object was last modified, defaults to None - :type modified_at: Optional[DateTime], optional - :param id: A unique identifier of a folder mapping - (part of a composite key together - with `integration_type`), defaults to None - :type id: Optional[str], optional - :param integration_type: Identifies the Box partner app, - with which the mapping is associated. - Currently only supports Slack. - (part of the composite key together with `id`), defaults to None - :type integration_type: Optional[IntegrationMappingBaseIntegrationTypeField], optional - """ - super().__init__(id=id, integration_type=integration_type, **kwargs) - self.partner_item = partner_item - self.box_item = box_item - self.type = type - self.is_manually_created = is_manually_created - self.options = options - self.created_by = created_by - self.modified_by = modified_by - self.created_at = created_at - self.modified_at = modified_at - - -class IntegrationMappings(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - entries: Optional[List[IntegrationMapping]] = None, - **kwargs - ): - """ - :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 entries: A list of integration mappings, defaults to None - :type entries: Optional[List[IntegrationMapping]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.entries = entries - - -class IntegrationMappingBoxItemSlackTypeField(str, Enum): - FOLDER = 'folder' - - -class IntegrationMappingBoxItemSlack(BaseObject): - _discriminator = 'type', {'folder'} - - def __init__( - self, - id: str, - *, - type: IntegrationMappingBoxItemSlackTypeField = IntegrationMappingBoxItemSlackTypeField.FOLDER.value, - **kwargs - ): - """ - :param id: ID of the mapped item (of type referenced in `type`) - :type id: str - :param type: Type of the mapped item referenced in `id`, defaults to IntegrationMappingBoxItemSlackTypeField.FOLDER.value - :type type: IntegrationMappingBoxItemSlackTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class IntegrationMappingSlackCreateRequest(BaseObject): - def __init__( - self, - partner_item: IntegrationMappingPartnerItemSlack, - box_item: IntegrationMappingBoxItemSlack, - *, - options: Optional[IntegrationMappingSlackOptions] = None, - **kwargs - ): - super().__init__(**kwargs) - self.partner_item = partner_item - self.box_item = box_item - self.options = options - - -class RoleVariableTypeField(str, Enum): - VARIABLE = 'variable' - - -class RoleVariableVariableTypeField(str, Enum): - COLLABORATOR_ROLE = 'collaborator_role' - - -class RoleVariableVariableValueField(str, Enum): - EDITOR = 'editor' - VIEWER = 'viewer' - PREVIEWER = 'previewer' - UPLOADER = 'uploader' - PREVIEWER_UPLOADER = 'previewer uploader' - VIEWER_UPLOADER = 'viewer uploader' - CO_OWNER = 'co-owner' - - -class RoleVariable(BaseObject): - _discriminator = 'type', {'variable'} - - def __init__( - self, - variable_value: RoleVariableVariableValueField, - *, - type: RoleVariableTypeField = RoleVariableTypeField.VARIABLE.value, - variable_type: RoleVariableVariableTypeField = RoleVariableVariableTypeField.COLLABORATOR_ROLE.value, - **kwargs - ): - """ - :param type: Role object type. - , defaults to RoleVariableTypeField.VARIABLE.value - :type type: RoleVariableTypeField, optional - :param variable_type: The variable type used - by the object. - , defaults to RoleVariableVariableTypeField.COLLABORATOR_ROLE.value - :type variable_type: RoleVariableVariableTypeField, optional - """ - super().__init__(**kwargs) - self.variable_value = variable_value - self.type = type - self.variable_type = variable_type - - -class Outcome(BaseObject): - def __init__( - self, - id: str, - *, - collaborators: Optional[CollaboratorVariable] = None, - completion_rule: Optional[CompletionRuleVariable] = None, - file_collaborator_role: Optional[RoleVariable] = None, - task_collaborators: Optional[CollaboratorVariable] = None, - role: Optional[RoleVariable] = None, - **kwargs - ): - """ - :param id: ID of a specific outcome - :type id: str - """ - super().__init__(**kwargs) - self.id = id - self.collaborators = collaborators - self.completion_rule = completion_rule - self.file_collaborator_role = file_collaborator_role - self.task_collaborators = task_collaborators - self.role = role - - -class TimelineSkillCardTypeField(str, Enum): - SKILL_CARD = 'skill_card' - - -class TimelineSkillCardSkillCardTypeField(str, Enum): - TIMELINE = 'timeline' - - -class TimelineSkillCardSkillCardTitleField(BaseObject): - def __init__(self, message: str, *, code: Optional[str] = None, **kwargs): - """ - :param message: The actual title to show in the UI. - :type message: str - :param code: An optional identifier for the title., defaults to None - :type code: Optional[str], optional - """ - super().__init__(**kwargs) - self.message = message - self.code = code - - -class TimelineSkillCardSkillTypeField(str, Enum): - SERVICE = 'service' - - -class TimelineSkillCardSkillField(BaseObject): - _discriminator = 'type', {'service'} - - def __init__( - self, - id: str, - *, - type: TimelineSkillCardSkillTypeField = TimelineSkillCardSkillTypeField.SERVICE.value, - **kwargs - ): - """ - :param id: A custom identifier that represent the service that - applied this metadata. - :type id: str - :param type: `service`, defaults to TimelineSkillCardSkillTypeField.SERVICE.value - :type type: TimelineSkillCardSkillTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class TimelineSkillCardInvocationTypeField(str, Enum): - SKILL_INVOCATION = 'skill_invocation' - - -class TimelineSkillCardInvocationField(BaseObject): - _discriminator = 'type', {'skill_invocation'} - - def __init__( - self, - id: str, - *, - type: TimelineSkillCardInvocationTypeField = TimelineSkillCardInvocationTypeField.SKILL_INVOCATION.value, - **kwargs - ): - """ - :param id: A custom identifier that represent the instance of - the service that applied this metadata. For example, - if your `image-recognition-service` runs on multiple - nodes, this field can be used to identify the ID of - the node that was used to apply the metadata. - :type id: str - :param type: `skill_invocation`, defaults to TimelineSkillCardInvocationTypeField.SKILL_INVOCATION.value - :type type: TimelineSkillCardInvocationTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class TimelineSkillCardEntriesAppearsField(BaseObject): - def __init__( - self, *, start: Optional[int] = None, end: Optional[int] = None, **kwargs - ): - """ - :param start: The time in seconds when an - entry should start appearing on a timeline., defaults to None - :type start: Optional[int], optional - :param end: The time in seconds when an - entry should stop appearing on a timeline., defaults to None - :type end: Optional[int], optional - """ - super().__init__(**kwargs) - self.start = start - self.end = end - - -class TimelineSkillCardEntriesField(BaseObject): - def __init__( - self, - *, - text: Optional[str] = None, - appears: Optional[List[TimelineSkillCardEntriesAppearsField]] = None, - image_url: Optional[str] = None, - **kwargs - ): - """ - :param text: The text of the entry. This would be the display - name for an item being placed on the timeline, for example the name - of the person who was detected in a video., defaults to None - :type text: Optional[str], optional - :param appears: Defines a list of timestamps for when this item should appear on the - timeline., defaults to None - :type appears: Optional[List[TimelineSkillCardEntriesAppearsField]], optional - :param image_url: The image to show on a for an entry that appears - on a timeline. This image URL is required for every entry. - - The image will be shown in a - list of items (for example faces), and clicking - the image will show the user where that entry - appears during the duration of this entry., defaults to None - :type image_url: Optional[str], optional - """ - super().__init__(**kwargs) - self.text = text - self.appears = appears - self.image_url = image_url - - -class TimelineSkillCard(BaseObject): - _discriminator = 'skill_card_type', {'timeline'} - - def __init__( - self, - skill: TimelineSkillCardSkillField, - invocation: TimelineSkillCardInvocationField, - entries: List[TimelineSkillCardEntriesField], - *, - created_at: Optional[DateTime] = None, - type: TimelineSkillCardTypeField = TimelineSkillCardTypeField.SKILL_CARD.value, - skill_card_type: TimelineSkillCardSkillCardTypeField = TimelineSkillCardSkillCardTypeField.TIMELINE.value, - skill_card_title: Optional[TimelineSkillCardSkillCardTitleField] = None, - duration: Optional[int] = None, - **kwargs - ): - """ - :param skill: The service that applied this metadata. - :type skill: TimelineSkillCardSkillField - :param invocation: The invocation of this service, used to track - which instance of a service applied the metadata. - :type invocation: TimelineSkillCardInvocationField - :param entries: A list of entries on the timeline. - :type entries: List[TimelineSkillCardEntriesField] - :param created_at: The optional date and time this card was created at., defaults to None - :type created_at: Optional[DateTime], optional - :param type: `skill_card`, defaults to TimelineSkillCardTypeField.SKILL_CARD.value - :type type: TimelineSkillCardTypeField, optional - :param skill_card_type: `timeline`, defaults to TimelineSkillCardSkillCardTypeField.TIMELINE.value - :type skill_card_type: TimelineSkillCardSkillCardTypeField, optional - :param skill_card_title: The title of the card., defaults to None - :type skill_card_title: Optional[TimelineSkillCardSkillCardTitleField], optional - :param duration: An total duration in seconds of the timeline., defaults to None - :type duration: Optional[int], optional - """ - super().__init__(**kwargs) - self.skill = skill - self.invocation = invocation - self.entries = entries - self.created_at = created_at - self.type = type - self.skill_card_type = skill_card_type - self.skill_card_title = skill_card_title - self.duration = duration - - -class TranscriptSkillCardTypeField(str, Enum): - SKILL_CARD = 'skill_card' - - -class TranscriptSkillCardSkillCardTypeField(str, Enum): - TRANSCRIPT = 'transcript' - - -class TranscriptSkillCardSkillCardTitleField(BaseObject): - def __init__(self, message: str, *, code: Optional[str] = None, **kwargs): - """ - :param message: The actual title to show in the UI. - :type message: str - :param code: An optional identifier for the title., defaults to None - :type code: Optional[str], optional - """ - super().__init__(**kwargs) - self.message = message - self.code = code - - -class TranscriptSkillCardSkillTypeField(str, Enum): - SERVICE = 'service' - - -class TranscriptSkillCardSkillField(BaseObject): - _discriminator = 'type', {'service'} - - def __init__( - self, - id: str, - *, - type: TranscriptSkillCardSkillTypeField = TranscriptSkillCardSkillTypeField.SERVICE.value, - **kwargs - ): - """ - :param id: A custom identifier that represent the service that - applied this metadata. - :type id: str - :param type: `service`, defaults to TranscriptSkillCardSkillTypeField.SERVICE.value - :type type: TranscriptSkillCardSkillTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class TranscriptSkillCardInvocationTypeField(str, Enum): - SKILL_INVOCATION = 'skill_invocation' - - -class TranscriptSkillCardInvocationField(BaseObject): - _discriminator = 'type', {'skill_invocation'} - - def __init__( - self, - id: str, - *, - type: TranscriptSkillCardInvocationTypeField = TranscriptSkillCardInvocationTypeField.SKILL_INVOCATION.value, - **kwargs - ): - """ - :param id: A custom identifier that represent the instance of - the service that applied this metadata. For example, - if your `image-recognition-service` runs on multiple - nodes, this field can be used to identify the ID of - the node that was used to apply the metadata. - :type id: str - :param type: `skill_invocation`, defaults to TranscriptSkillCardInvocationTypeField.SKILL_INVOCATION.value - :type type: TranscriptSkillCardInvocationTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class TranscriptSkillCardEntriesAppearsField(BaseObject): - def __init__(self, *, start: Optional[int] = None, **kwargs): - """ - :param start: The time in seconds when an - entry should start appearing on a timeline., defaults to None - :type start: Optional[int], optional - """ - super().__init__(**kwargs) - self.start = start - - -class TranscriptSkillCardEntriesField(BaseObject): - def __init__( - self, - *, - text: Optional[str] = None, - appears: Optional[List[TranscriptSkillCardEntriesAppearsField]] = None, - **kwargs - ): - """ - :param text: The text of the entry. This would be the transcribed text assigned - to the entry on the timeline., defaults to None - :type text: Optional[str], optional - :param appears: Defines when a transcribed bit of text appears. This only includes a - start time and no end time., defaults to None - :type appears: Optional[List[TranscriptSkillCardEntriesAppearsField]], optional - """ - super().__init__(**kwargs) - self.text = text - self.appears = appears - - -class TranscriptSkillCard(BaseObject): - _discriminator = 'skill_card_type', {'transcript'} - - def __init__( - self, - skill: TranscriptSkillCardSkillField, - invocation: TranscriptSkillCardInvocationField, - entries: List[TranscriptSkillCardEntriesField], - *, - created_at: Optional[DateTime] = None, - type: TranscriptSkillCardTypeField = TranscriptSkillCardTypeField.SKILL_CARD.value, - skill_card_type: TranscriptSkillCardSkillCardTypeField = TranscriptSkillCardSkillCardTypeField.TRANSCRIPT.value, - skill_card_title: Optional[TranscriptSkillCardSkillCardTitleField] = None, - duration: Optional[int] = None, - **kwargs - ): - """ - :param skill: The service that applied this metadata. - :type skill: TranscriptSkillCardSkillField - :param invocation: The invocation of this service, used to track - which instance of a service applied the metadata. - :type invocation: TranscriptSkillCardInvocationField - :param entries: An list of entries for the card. This represents the individual entries of - the transcription. - :type entries: List[TranscriptSkillCardEntriesField] - :param created_at: The optional date and time this card was created at., defaults to None - :type created_at: Optional[DateTime], optional - :param type: `skill_card`, defaults to TranscriptSkillCardTypeField.SKILL_CARD.value - :type type: TranscriptSkillCardTypeField, optional - :param skill_card_type: `transcript`, defaults to TranscriptSkillCardSkillCardTypeField.TRANSCRIPT.value - :type skill_card_type: TranscriptSkillCardSkillCardTypeField, optional - :param skill_card_title: The title of the card., defaults to None - :type skill_card_title: Optional[TranscriptSkillCardSkillCardTitleField], optional - :param duration: An optional total duration in seconds. - - Used with a `skill_card_type` of `transcript` or - `timeline`., defaults to None - :type duration: Optional[int], optional - """ - super().__init__(**kwargs) - self.skill = skill - self.invocation = invocation - self.entries = entries - self.created_at = created_at - self.type = type - self.skill_card_type = skill_card_type - self.skill_card_title = skill_card_title - self.duration = duration - - -class StatusSkillCardTypeField(str, Enum): - SKILL_CARD = 'skill_card' - - -class StatusSkillCardSkillCardTypeField(str, Enum): - STATUS = 'status' - - -class StatusSkillCardSkillCardTitleField(BaseObject): - def __init__(self, message: str, *, code: Optional[str] = None, **kwargs): - """ - :param message: The actual title to show in the UI. - :type message: str - :param code: An optional identifier for the title., defaults to None - :type code: Optional[str], optional - """ - super().__init__(**kwargs) - self.message = message - self.code = code - - -class StatusSkillCardStatusCodeField(str, Enum): - INVOKED = 'invoked' - PROCESSING = 'processing' - SUCCESS = 'success' - TRANSIENT_FAILURE = 'transient_failure' - PERMANENT_FAILURE = 'permanent_failure' - - -class StatusSkillCardStatusField(BaseObject): - def __init__( - self, - code: StatusSkillCardStatusCodeField, - *, - message: Optional[str] = None, - **kwargs - ): - """ - :param code: A code for the status of this Skill invocation. By - default each of these will have their own accompanied - messages. These can be adjusted by setting the `message` - value on this object. - :type code: StatusSkillCardStatusCodeField - :param message: A custom message that can be provided with this status. - This will be shown in the web app to the end user., defaults to None - :type message: Optional[str], optional - """ - super().__init__(**kwargs) - self.code = code - self.message = message - - -class StatusSkillCardSkillTypeField(str, Enum): - SERVICE = 'service' - - -class StatusSkillCardSkillField(BaseObject): - _discriminator = 'type', {'service'} - - def __init__( - self, - id: str, - *, - type: StatusSkillCardSkillTypeField = StatusSkillCardSkillTypeField.SERVICE.value, - **kwargs - ): - """ - :param id: A custom identifier that represent the service that - applied this metadata. - :type id: str - :param type: `service`, defaults to StatusSkillCardSkillTypeField.SERVICE.value - :type type: StatusSkillCardSkillTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class StatusSkillCardInvocationTypeField(str, Enum): - SKILL_INVOCATION = 'skill_invocation' - - -class StatusSkillCardInvocationField(BaseObject): - _discriminator = 'type', {'skill_invocation'} - - def __init__( - self, - id: str, - *, - type: StatusSkillCardInvocationTypeField = StatusSkillCardInvocationTypeField.SKILL_INVOCATION.value, - **kwargs - ): - """ - :param id: A custom identifier that represent the instance of - the service that applied this metadata. For example, - if your `image-recognition-service` runs on multiple - nodes, this field can be used to identify the ID of - the node that was used to apply the metadata. - :type id: str - :param type: `skill_invocation`, defaults to StatusSkillCardInvocationTypeField.SKILL_INVOCATION.value - :type type: StatusSkillCardInvocationTypeField, optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - - -class StatusSkillCard(BaseObject): - _discriminator = 'skill_card_type', {'status'} - - def __init__( - self, - status: StatusSkillCardStatusField, - skill: StatusSkillCardSkillField, - invocation: StatusSkillCardInvocationField, - *, - created_at: Optional[DateTime] = None, - type: StatusSkillCardTypeField = StatusSkillCardTypeField.SKILL_CARD.value, - skill_card_type: StatusSkillCardSkillCardTypeField = StatusSkillCardSkillCardTypeField.STATUS.value, - skill_card_title: Optional[StatusSkillCardSkillCardTitleField] = None, - **kwargs - ): - """ - :param status: Sets the status of the skill. This can be used to show a message to the user while the Skill is processing the data, or if it was not able to process the file. - :type status: StatusSkillCardStatusField - :param skill: The service that applied this metadata. - :type skill: StatusSkillCardSkillField - :param invocation: The invocation of this service, used to track - which instance of a service applied the metadata. - :type invocation: StatusSkillCardInvocationField - :param created_at: The optional date and time this card was created at., defaults to None - :type created_at: Optional[DateTime], optional - :param type: `skill_card`, defaults to StatusSkillCardTypeField.SKILL_CARD.value - :type type: StatusSkillCardTypeField, optional - :param skill_card_type: `status`, defaults to StatusSkillCardSkillCardTypeField.STATUS.value - :type skill_card_type: StatusSkillCardSkillCardTypeField, optional - :param skill_card_title: The title of the card., defaults to None - :type skill_card_title: Optional[StatusSkillCardSkillCardTitleField], optional - """ - super().__init__(**kwargs) - self.status = status - self.skill = skill - self.invocation = invocation - self.created_at = created_at - self.type = type - self.skill_card_type = skill_card_type - self.skill_card_title = skill_card_title - - -class SkillCardsMetadata(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'can_edit': '$canEdit', - 'id': '$id', - 'parent': '$parent', - 'scope': '$scope', - 'template': '$template', - 'type': '$type', - 'type_version': '$typeVersion', - 'version': '$version', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - '$canEdit': 'can_edit', - '$id': 'id', - '$parent': 'parent', - '$scope': 'scope', - '$template': 'template', - '$type': 'type', - '$typeVersion': 'type_version', - '$version': 'version', - **BaseObject._json_to_fields_mapping, - } - - def __init__( - self, - *, - can_edit: Optional[bool] = None, - id: Optional[str] = None, - parent: Optional[str] = None, - scope: Optional[str] = None, - template: Optional[str] = None, - type: Optional[str] = None, - type_version: Optional[int] = None, - version: Optional[int] = None, - cards: Optional[ - List[ - Union[ - KeywordSkillCard, - TimelineSkillCard, - TranscriptSkillCard, - StatusSkillCard, - ] - ] - ] = None, - **kwargs - ): - """ - :param can_edit: Whether the user can edit this metadata, defaults to None - :type can_edit: Optional[bool], optional - :param id: A UUID to identify the metadata object, defaults to None - :type id: Optional[str], optional - :param parent: An ID for the parent folder, defaults to None - :type parent: Optional[str], optional - :param scope: An ID for the scope in which this template - has been applied, defaults to None - :type scope: Optional[str], optional - :param template: The name of the template, defaults to None - :type template: Optional[str], optional - :param type: A unique identifier for the "type" of this instance. This is an internal - system property and should not be used by a client application., defaults to None - :type type: Optional[str], optional - :param type_version: The last-known version of the template of the object. This is an internal - system property and should not be used by a client application., defaults to None - :type type_version: Optional[int], optional - :param version: The version of the metadata object. Starts at 0 and increases every time - a user-defined property is modified., defaults to None - :type version: Optional[int], optional - :param cards: A list of Box Skill cards that have been applied to this file., defaults to None - :type cards: Optional[List[Union[KeywordSkillCard, TimelineSkillCard, TranscriptSkillCard, StatusSkillCard]]], optional - """ - super().__init__(**kwargs) - self.can_edit = can_edit - self.id = id - self.parent = parent - self.scope = scope - self.template = template - self.type = type - self.type_version = type_version - self.version = version - self.cards = cards - - -class SignRequestCreateSignerRoleField(str, Enum): - SIGNER = 'signer' - APPROVER = 'approver' - FINAL_COPY_READER = 'final_copy_reader' - - -class SignRequestCreateSigner(BaseObject): - def __init__( - self, - *, - email: Optional[str] = None, - role: Optional[SignRequestCreateSignerRoleField] = None, - is_in_person: Optional[bool] = None, - order: Optional[int] = None, - embed_url_external_user_id: Optional[str] = None, - redirect_url: Optional[str] = None, - declined_redirect_url: Optional[str] = None, - login_required: Optional[bool] = None, - verification_phone_number: Optional[str] = None, - password: Optional[str] = None, - signer_group_id: Optional[str] = None, - **kwargs - ): - """ - :param email: Email address of the signer. - The email address of the signer is required when making signature requests, except when using templates that are configured to include emails., defaults to None - :type email: Optional[str], optional - :param role: Defines the role of the signer in the sign request. A `signer` - must sign the document and an `approver` must approve the document. A - `final_copy_reader` only receives the final signed document and signing - log., defaults to None - :type role: Optional[SignRequestCreateSignerRoleField], optional - :param is_in_person: Used in combination with an embed URL for a sender. After the - sender signs, they are redirected to the next `in_person` signer., defaults to None - :type is_in_person: Optional[bool], optional - :param order: Order of the signer, defaults to None - :type order: Optional[int], optional - :param embed_url_external_user_id: User ID for the signer in an external application responsible - for authentication when accessing the embed URL., defaults to None - :type embed_url_external_user_id: Optional[str], optional - :param redirect_url: The URL that a signer will be redirected - to after signing a document. Defining this URL - overrides default or global redirect URL - settings for a specific signer. - If no declined redirect URL is specified, - this URL will be used for decline actions as well., defaults to None - :type redirect_url: Optional[str], optional - :param declined_redirect_url: The URL that a signer will be redirect - to after declining to sign a document. - Defining this URL overrides default or global - declined redirect URL settings for a specific signer., defaults to None - :type declined_redirect_url: Optional[str], optional - :param login_required: If set to true, signer will need to login to a Box account - before signing the request. If the signer does not have - an existing account, they will have an option to create - a free Box account., defaults to None - :type login_required: Optional[bool], optional - :param verification_phone_number: If set, this phone number is be used to verify the signer - via two factor authentication before they are able to sign the document., defaults to None - :type verification_phone_number: Optional[str], optional - :param password: If set, the signer is required to enter the password before they are able - to sign a document. This field is write only., defaults to None - :type password: Optional[str], optional - :param signer_group_id: If set, signers who have the same value will be assigned to the same input and to the same signer group. - A signer group is not a Box Group. It is an entity that belongs to a Sign Request and can only be - used/accessed within this Sign Request. A signer group is expected to have more than one signer. - If the provided value is only used for one signer, this value will be ignored and request will be handled - as it was intended for an individual signer. The value provided can be any string and only used to - determine which signers belongs to same group. A successful response will provide a generated UUID value - instead for signers in the same signer group., defaults to None - :type signer_group_id: Optional[str], optional - """ - super().__init__(**kwargs) - self.email = email - self.role = role - self.is_in_person = is_in_person - self.order = order - self.embed_url_external_user_id = embed_url_external_user_id - self.redirect_url = redirect_url - self.declined_redirect_url = declined_redirect_url - self.login_required = login_required - self.verification_phone_number = verification_phone_number - self.password = password - self.signer_group_id = signer_group_id - - -class SignRequestPrefillTag(BaseObject): - def __init__( - self, - *, - document_tag_id: Optional[str] = None, - text_value: Optional[str] = None, - checkbox_value: Optional[bool] = None, - date_value: Optional[Date] = None, - **kwargs - ): - """ - :param document_tag_id: This references the ID of a specific tag contained in a file of the sign request., defaults to None - :type document_tag_id: Optional[str], optional - :param text_value: Text prefill value, defaults to None - :type text_value: Optional[str], optional - :param checkbox_value: Checkbox prefill value, defaults to None - :type checkbox_value: Optional[bool], optional - :param date_value: Date prefill value, defaults to None - :type date_value: Optional[Date], optional - """ - super().__init__(**kwargs) - self.document_tag_id = document_tag_id - self.text_value = text_value - self.checkbox_value = checkbox_value - self.date_value = date_value - - -class SignRequestSignerInputTypeField(str, Enum): - SIGNATURE = 'signature' - DATE = 'date' - TEXT = 'text' - CHECKBOX = 'checkbox' - RADIO = 'radio' - DROPDOWN = 'dropdown' - - -class SignRequestSignerInputContentTypeField(str, Enum): - SIGNATURE = 'signature' - INITIAL = 'initial' - STAMP = 'stamp' - DATE = 'date' - CHECKBOX = 'checkbox' - TEXT = 'text' - FULL_NAME = 'full_name' - FIRST_NAME = 'first_name' - LAST_NAME = 'last_name' - COMPANY = 'company' - TITLE = 'title' - EMAIL = 'email' - ATTACHMENT = 'attachment' - RADIO = 'radio' - DROPDOWN = 'dropdown' - - -class SignRequestSignerInput(SignRequestPrefillTag): - def __init__( - self, - page_index: int, - *, - type: Optional[SignRequestSignerInputTypeField] = None, - content_type: Optional[SignRequestSignerInputContentTypeField] = None, - read_only: Optional[bool] = None, - document_tag_id: Optional[str] = None, - text_value: Optional[str] = None, - checkbox_value: Optional[bool] = None, - date_value: Optional[Date] = None, - **kwargs - ): - """ - :param page_index: Index of page that the input is on - :type page_index: int - :param type: Type of input, defaults to None - :type type: Optional[SignRequestSignerInputTypeField], optional - :param content_type: Content type of input, defaults to None - :type content_type: Optional[SignRequestSignerInputContentTypeField], optional - :param read_only: Whether this input was defined as read-only(immutable by signers) or not, defaults to None - :type read_only: Optional[bool], optional - :param document_tag_id: This references the ID of a specific tag contained in a file of the sign request., defaults to None - :type document_tag_id: Optional[str], optional - :param text_value: Text prefill value, defaults to None - :type text_value: Optional[str], optional - :param checkbox_value: Checkbox prefill value, defaults to None - :type checkbox_value: Optional[bool], optional - :param date_value: Date prefill value, defaults to None - :type date_value: Optional[Date], optional - """ - super().__init__( - document_tag_id=document_tag_id, - text_value=text_value, - checkbox_value=checkbox_value, - date_value=date_value, - **kwargs - ) - self.page_index = page_index - self.type = type - self.content_type = content_type - self.read_only = read_only - - -class SignRequestSignerSignerDecisionTypeField(str, Enum): - SIGNED = 'signed' - DECLINED = 'declined' - - -class SignRequestSignerSignerDecisionField(BaseObject): - _discriminator = 'type', {'signed', 'declined'} - - def __init__( - self, - *, - type: Optional[SignRequestSignerSignerDecisionTypeField] = None, - finalized_at: Optional[DateTime] = None, - additional_info: Optional[str] = None, - **kwargs - ): - """ - :param type: Type of decision made by the signer, defaults to None - :type type: Optional[SignRequestSignerSignerDecisionTypeField], optional - :param finalized_at: Date and Time that the decision was made, defaults to None - :type finalized_at: Optional[DateTime], optional - :param additional_info: Additional info about the decision, such as the decline reason from the signer, defaults to None - :type additional_info: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.finalized_at = finalized_at - self.additional_info = additional_info - - -class SignRequestSigner(SignRequestCreateSigner): - def __init__( - self, - *, - has_viewed_document: Optional[bool] = None, - signer_decision: Optional[SignRequestSignerSignerDecisionField] = None, - inputs: Optional[List[SignRequestSignerInput]] = None, - embed_url: Optional[str] = None, - iframeable_embed_url: Optional[str] = None, - email: Optional[str] = None, - role: Optional[SignRequestCreateSignerRoleField] = None, - is_in_person: Optional[bool] = None, - order: Optional[int] = None, - embed_url_external_user_id: Optional[str] = None, - redirect_url: Optional[str] = None, - declined_redirect_url: Optional[str] = None, - login_required: Optional[bool] = None, - verification_phone_number: Optional[str] = None, - password: Optional[str] = None, - signer_group_id: Optional[str] = None, - **kwargs - ): - """ - :param has_viewed_document: Set to `true` if the signer views the document, defaults to None - :type has_viewed_document: Optional[bool], optional - :param signer_decision: Final decision made by the signer, defaults to None - :type signer_decision: Optional[SignRequestSignerSignerDecisionField], optional - :param embed_url: URL to direct a signer to for signing, defaults to None - :type embed_url: Optional[str], optional - :param iframeable_embed_url: This URL is specifically designed for - signing documents within an HTML `iframe` tag. - It will be returned in the response - only if the `embed_url_external_user_id` - parameter was passed in the - `create sign request` call., defaults to None - :type iframeable_embed_url: Optional[str], optional - :param email: Email address of the signer. - The email address of the signer is required when making signature requests, except when using templates that are configured to include emails., defaults to None - :type email: Optional[str], optional - :param role: Defines the role of the signer in the sign request. A `signer` - must sign the document and an `approver` must approve the document. A - `final_copy_reader` only receives the final signed document and signing - log., defaults to None - :type role: Optional[SignRequestCreateSignerRoleField], optional - :param is_in_person: Used in combination with an embed URL for a sender. After the - sender signs, they are redirected to the next `in_person` signer., defaults to None - :type is_in_person: Optional[bool], optional - :param order: Order of the signer, defaults to None - :type order: Optional[int], optional - :param embed_url_external_user_id: User ID for the signer in an external application responsible - for authentication when accessing the embed URL., defaults to None - :type embed_url_external_user_id: Optional[str], optional - :param redirect_url: The URL that a signer will be redirected - to after signing a document. Defining this URL - overrides default or global redirect URL - settings for a specific signer. - If no declined redirect URL is specified, - this URL will be used for decline actions as well., defaults to None - :type redirect_url: Optional[str], optional - :param declined_redirect_url: The URL that a signer will be redirect - to after declining to sign a document. - Defining this URL overrides default or global - declined redirect URL settings for a specific signer., defaults to None - :type declined_redirect_url: Optional[str], optional - :param login_required: If set to true, signer will need to login to a Box account - before signing the request. If the signer does not have - an existing account, they will have an option to create - a free Box account., defaults to None - :type login_required: Optional[bool], optional - :param verification_phone_number: If set, this phone number is be used to verify the signer - via two factor authentication before they are able to sign the document., defaults to None - :type verification_phone_number: Optional[str], optional - :param password: If set, the signer is required to enter the password before they are able - to sign a document. This field is write only., defaults to None - :type password: Optional[str], optional - :param signer_group_id: If set, signers who have the same value will be assigned to the same input and to the same signer group. - A signer group is not a Box Group. It is an entity that belongs to a Sign Request and can only be - used/accessed within this Sign Request. A signer group is expected to have more than one signer. - If the provided value is only used for one signer, this value will be ignored and request will be handled - as it was intended for an individual signer. The value provided can be any string and only used to - determine which signers belongs to same group. A successful response will provide a generated UUID value - instead for signers in the same signer group., defaults to None - :type signer_group_id: Optional[str], optional - """ - super().__init__( - email=email, - role=role, - is_in_person=is_in_person, - order=order, - embed_url_external_user_id=embed_url_external_user_id, - redirect_url=redirect_url, - declined_redirect_url=declined_redirect_url, - login_required=login_required, - verification_phone_number=verification_phone_number, - password=password, - signer_group_id=signer_group_id, - **kwargs - ) - self.has_viewed_document = has_viewed_document - self.signer_decision = signer_decision - self.inputs = inputs - self.embed_url = embed_url - self.iframeable_embed_url = iframeable_embed_url - - -class SignRequestBase(BaseObject): - def __init__( - self, - *, - is_document_preparation_needed: Optional[bool] = None, - redirect_url: Optional[str] = None, - declined_redirect_url: Optional[str] = None, - are_text_signatures_enabled: Optional[bool] = None, - email_subject: Optional[str] = None, - email_message: Optional[str] = None, - are_reminders_enabled: Optional[bool] = None, - name: Optional[str] = None, - prefill_tags: Optional[List[SignRequestPrefillTag]] = None, - days_valid: Optional[int] = None, - external_id: Optional[str] = None, - is_phone_verification_required_to_view: Optional[bool] = None, - template_id: Optional[str] = None, - **kwargs - ): - """ - :param is_document_preparation_needed: Indicates if the sender should receive a `prepare_url` in the response to complete document preparation via UI., defaults to None - :type is_document_preparation_needed: Optional[bool], optional - :param redirect_url: When specified, signature request will be redirected to this url when a document is signed., defaults to None - :type redirect_url: Optional[str], optional - :param declined_redirect_url: The uri that a signer will be redirected to after declining to sign a document., defaults to None - :type declined_redirect_url: Optional[str], optional - :param are_text_signatures_enabled: Disables the usage of signatures generated by typing (text)., defaults to None - :type are_text_signatures_enabled: Optional[bool], optional - :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None - :type email_subject: Optional[str], optional - :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None - :type email_message: Optional[str], optional - :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None - :type are_reminders_enabled: Optional[bool], optional - :param name: Name of the sign request., defaults to None - :type name: Optional[str], optional - :param prefill_tags: When a document contains sign related tags in the content, you can prefill them using this `prefill_tags` by referencing the 'id' of the tag as the `external_id` field of the prefill tag., defaults to None - :type prefill_tags: Optional[List[SignRequestPrefillTag]], optional - :param days_valid: Set the number of days after which the created signature request will automatically expire if not completed. By default, we do not apply any expiration date on signature requests, and the signature request does not expire., defaults to None - :type days_valid: Optional[int], optional - :param external_id: This can be used to reference an ID in an external system that the sign request is related to., defaults to None - :type external_id: Optional[str], optional - :param is_phone_verification_required_to_view: Forces signers to verify a text message prior to viewing the document. You must specify the phone number of signers to have this setting apply to them., defaults to None - :type is_phone_verification_required_to_view: Optional[bool], optional - :param template_id: When a signature request is created from a template this field will indicate the id of that template., defaults to None - :type template_id: Optional[str], optional - """ - super().__init__(**kwargs) - self.is_document_preparation_needed = is_document_preparation_needed - self.redirect_url = redirect_url - self.declined_redirect_url = declined_redirect_url - self.are_text_signatures_enabled = are_text_signatures_enabled - self.email_subject = email_subject - self.email_message = email_message - self.are_reminders_enabled = are_reminders_enabled - self.name = name - self.prefill_tags = prefill_tags - self.days_valid = days_valid - self.external_id = external_id - self.is_phone_verification_required_to_view = ( - is_phone_verification_required_to_view - ) - self.template_id = template_id - - -class SignRequestTypeField(str, Enum): - SIGN_REQUEST = 'sign-request' - - -class SignRequestStatusField(str, Enum): - CONVERTING = 'converting' - CREATED = 'created' - SENT = 'sent' - VIEWED = 'viewed' - SIGNED = 'signed' - CANCELLED = 'cancelled' - DECLINED = 'declined' - ERROR_CONVERTING = 'error_converting' - ERROR_SENDING = 'error_sending' - EXPIRED = 'expired' - FINALIZING = 'finalizing' - ERROR_FINALIZING = 'error_finalizing' - - -class SignRequestSignFilesField(BaseObject): - def __init__( - self, - *, - files: Optional[List[FileMini]] = None, - is_ready_for_download: Optional[bool] = None, - **kwargs - ): - """ - :param is_ready_for_download: Indicates whether the `sign_files` documents are processing - and the PDFs may be out of date. A change to any document - requires processing on all `sign_files`. We - recommended waiting until processing is finished - (and this value is true) before downloading the PDFs., defaults to None - :type is_ready_for_download: Optional[bool], optional - """ - super().__init__(**kwargs) - self.files = files - self.is_ready_for_download = is_ready_for_download - - -class SignRequest(SignRequestBase): - def __init__( - self, - *, - type: Optional[SignRequestTypeField] = None, - source_files: Optional[List[FileBase]] = None, - signers: Optional[List[SignRequestSigner]] = None, - signature_color: Optional[str] = None, - id: Optional[str] = None, - prepare_url: Optional[str] = None, - signing_log: Optional[FileMini] = None, - status: Optional[SignRequestStatusField] = None, - sign_files: Optional[SignRequestSignFilesField] = None, - auto_expire_at: Optional[DateTime] = None, - parent_folder: Optional[FolderMini] = None, - is_document_preparation_needed: Optional[bool] = None, - redirect_url: Optional[str] = None, - declined_redirect_url: Optional[str] = None, - are_text_signatures_enabled: Optional[bool] = None, - email_subject: Optional[str] = None, - email_message: Optional[str] = None, - are_reminders_enabled: Optional[bool] = None, - name: Optional[str] = None, - prefill_tags: Optional[List[SignRequestPrefillTag]] = None, - days_valid: Optional[int] = None, - external_id: Optional[str] = None, - is_phone_verification_required_to_view: Optional[bool] = None, - template_id: Optional[str] = None, - **kwargs - ): - """ - :param type: object type, defaults to None - :type type: Optional[SignRequestTypeField], optional - :param source_files: List of files to create a signing document from. This is currently limited to ten files. Only the ID and type fields are required for each file., defaults to None - :type source_files: Optional[List[FileBase]], optional - :param signers: Array of signers for the sign request, defaults to None - :type signers: Optional[List[SignRequestSigner]], optional - :param signature_color: Force a specific color for the signature (blue, black, or red)., defaults to None - :type signature_color: Optional[str], optional - :param id: Sign request ID, defaults to None - :type id: Optional[str], optional - :param prepare_url: This URL is returned if `is_document_preparation_needed` is - set to `true` in the request. It is used to prepare the sign request - via UI. The sign request is not sent until preparation is complete., defaults to None - :type prepare_url: Optional[str], optional - :param status: Describes the status of the sign request, defaults to None - :type status: Optional[SignRequestStatusField], optional - :param sign_files: List of files that will be signed, which are copies of the original - source files. A new version of these files are created as signers sign - and can be downloaded at any point in the signing process., defaults to None - :type sign_files: Optional[SignRequestSignFilesField], optional - :param auto_expire_at: Uses `days_valid` to calculate the date and time, in GMT, the sign request will expire if unsigned., defaults to None - :type auto_expire_at: Optional[DateTime], optional - :param is_document_preparation_needed: Indicates if the sender should receive a `prepare_url` in the response to complete document preparation via UI., defaults to None - :type is_document_preparation_needed: Optional[bool], optional - :param redirect_url: When specified, signature request will be redirected to this url when a document is signed., defaults to None - :type redirect_url: Optional[str], optional - :param declined_redirect_url: The uri that a signer will be redirected to after declining to sign a document., defaults to None - :type declined_redirect_url: Optional[str], optional - :param are_text_signatures_enabled: Disables the usage of signatures generated by typing (text)., defaults to None - :type are_text_signatures_enabled: Optional[bool], optional - :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None - :type email_subject: Optional[str], optional - :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None - :type email_message: Optional[str], optional - :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None - :type are_reminders_enabled: Optional[bool], optional - :param name: Name of the sign request., defaults to None - :type name: Optional[str], optional - :param prefill_tags: When a document contains sign related tags in the content, you can prefill them using this `prefill_tags` by referencing the 'id' of the tag as the `external_id` field of the prefill tag., defaults to None - :type prefill_tags: Optional[List[SignRequestPrefillTag]], optional - :param days_valid: Set the number of days after which the created signature request will automatically expire if not completed. By default, we do not apply any expiration date on signature requests, and the signature request does not expire., defaults to None - :type days_valid: Optional[int], optional - :param external_id: This can be used to reference an ID in an external system that the sign request is related to., defaults to None - :type external_id: Optional[str], optional - :param is_phone_verification_required_to_view: Forces signers to verify a text message prior to viewing the document. You must specify the phone number of signers to have this setting apply to them., defaults to None - :type is_phone_verification_required_to_view: Optional[bool], optional - :param template_id: When a signature request is created from a template this field will indicate the id of that template., defaults to None - :type template_id: Optional[str], optional - """ - super().__init__( - is_document_preparation_needed=is_document_preparation_needed, - redirect_url=redirect_url, - declined_redirect_url=declined_redirect_url, - are_text_signatures_enabled=are_text_signatures_enabled, - email_subject=email_subject, - email_message=email_message, - are_reminders_enabled=are_reminders_enabled, - name=name, - prefill_tags=prefill_tags, - days_valid=days_valid, - external_id=external_id, - is_phone_verification_required_to_view=is_phone_verification_required_to_view, - template_id=template_id, - **kwargs - ) - self.type = type - self.source_files = source_files - self.signers = signers - self.signature_color = signature_color - self.id = id - self.prepare_url = prepare_url - self.signing_log = signing_log - self.status = status - self.sign_files = sign_files - self.auto_expire_at = auto_expire_at - self.parent_folder = parent_folder - - -class SignRequests(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - entries: Optional[List[SignRequest]] = None, - **kwargs - ): - """ - :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 entries: A list of sign requests, defaults to None - :type entries: Optional[List[SignRequest]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.entries = entries - - -class SignRequestCreateRequestSignatureColorField(str, Enum): - BLUE = 'blue' - BLACK = 'black' - RED = 'red' - - -class SignRequestCreateRequest(SignRequestBase): - def __init__( - self, - signers: List[SignRequestCreateSigner], - *, - source_files: Optional[List[FileBase]] = None, - signature_color: Optional[SignRequestCreateRequestSignatureColorField] = None, - parent_folder: Optional[FolderMini] = None, - is_document_preparation_needed: Optional[bool] = None, - redirect_url: Optional[str] = None, - declined_redirect_url: Optional[str] = None, - are_text_signatures_enabled: Optional[bool] = None, - email_subject: Optional[str] = None, - email_message: Optional[str] = None, - are_reminders_enabled: Optional[bool] = None, - name: Optional[str] = None, - prefill_tags: Optional[List[SignRequestPrefillTag]] = None, - days_valid: Optional[int] = None, - external_id: Optional[str] = None, - is_phone_verification_required_to_view: Optional[bool] = None, - template_id: Optional[str] = None, - **kwargs - ): - """ - :param signers: Array of signers for the sign request. 35 is the max number of signers permitted. - :type signers: List[SignRequestCreateSigner] - :param source_files: List of files to create a signing document from. This is currently limited to ten files. Only the ID and type fields are required for each file., defaults to None - :type source_files: Optional[List[FileBase]], optional - :param signature_color: Force a specific color for the signature (blue, black, or red), defaults to None - :type signature_color: Optional[SignRequestCreateRequestSignatureColorField], optional - :param is_document_preparation_needed: Indicates if the sender should receive a `prepare_url` in the response to complete document preparation via UI., defaults to None - :type is_document_preparation_needed: Optional[bool], optional - :param redirect_url: When specified, signature request will be redirected to this url when a document is signed., defaults to None - :type redirect_url: Optional[str], optional - :param declined_redirect_url: The uri that a signer will be redirected to after declining to sign a document., defaults to None - :type declined_redirect_url: Optional[str], optional - :param are_text_signatures_enabled: Disables the usage of signatures generated by typing (text)., defaults to None - :type are_text_signatures_enabled: Optional[bool], optional - :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None - :type email_subject: Optional[str], optional - :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None - :type email_message: Optional[str], optional - :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None - :type are_reminders_enabled: Optional[bool], optional - :param name: Name of the sign request., defaults to None - :type name: Optional[str], optional - :param prefill_tags: When a document contains sign related tags in the content, you can prefill them using this `prefill_tags` by referencing the 'id' of the tag as the `external_id` field of the prefill tag., defaults to None - :type prefill_tags: Optional[List[SignRequestPrefillTag]], optional - :param days_valid: Set the number of days after which the created signature request will automatically expire if not completed. By default, we do not apply any expiration date on signature requests, and the signature request does not expire., defaults to None - :type days_valid: Optional[int], optional - :param external_id: This can be used to reference an ID in an external system that the sign request is related to., defaults to None - :type external_id: Optional[str], optional - :param is_phone_verification_required_to_view: Forces signers to verify a text message prior to viewing the document. You must specify the phone number of signers to have this setting apply to them., defaults to None - :type is_phone_verification_required_to_view: Optional[bool], optional - :param template_id: When a signature request is created from a template this field will indicate the id of that template., defaults to None - :type template_id: Optional[str], optional - """ - super().__init__( - is_document_preparation_needed=is_document_preparation_needed, - redirect_url=redirect_url, - declined_redirect_url=declined_redirect_url, - are_text_signatures_enabled=are_text_signatures_enabled, - email_subject=email_subject, - email_message=email_message, - are_reminders_enabled=are_reminders_enabled, - name=name, - prefill_tags=prefill_tags, - days_valid=days_valid, - external_id=external_id, - is_phone_verification_required_to_view=is_phone_verification_required_to_view, - template_id=template_id, - **kwargs - ) - self.signers = signers - self.source_files = source_files - self.signature_color = signature_color - self.parent_folder = parent_folder - - -class TemplateSignerInputTypeField(str, Enum): - SIGNATURE = 'signature' - DATE = 'date' - TEXT = 'text' - CHECKBOX = 'checkbox' - ATTACHMENT = 'attachment' - RADIO = 'radio' - DROPDOWN = 'dropdown' - - -class TemplateSignerInputContentTypeField(str, Enum): - SIGNATURE = 'signature' - INITIAL = 'initial' - STAMP = 'stamp' - DATE = 'date' - CHECKBOX = 'checkbox' - TEXT = 'text' - FULL_NAME = 'full_name' - FIRST_NAME = 'first_name' - LAST_NAME = 'last_name' - COMPANY = 'company' - TITLE = 'title' - EMAIL = 'email' - ATTACHMENT = 'attachment' - RADIO = 'radio' - DROPDOWN = 'dropdown' - - -class TemplateSignerInputCoordinatesField(BaseObject): - def __init__( - self, *, x: Optional[float] = None, y: Optional[float] = None, **kwargs - ): - """ - :param x: Relative x coordinate to the page the input is on, ranging from 0 to 1., defaults to None - :type x: Optional[float], optional - :param y: Relative y coordinate to the page the input is on, ranging from 0 to 1., defaults to None - :type y: Optional[float], optional - """ - super().__init__(**kwargs) - self.x = x - self.y = y - - -class TemplateSignerInputDimensionsField(BaseObject): - def __init__( - self, *, width: Optional[float] = None, height: Optional[float] = None, **kwargs - ): - """ - :param width: Relative width to the page the input is on, ranging from 0 to 1., defaults to None - :type width: Optional[float], optional - :param height: Relative height to the page the input is on, ranging from 0 to 1., defaults to None - :type height: Optional[float], optional - """ - super().__init__(**kwargs) - self.width = width - self.height = height - - -class TemplateSignerInput(SignRequestPrefillTag): - def __init__( - self, - page_index: int, - *, - type: Optional[TemplateSignerInputTypeField] = None, - content_type: Optional[TemplateSignerInputContentTypeField] = None, - is_required: Optional[bool] = None, - document_id: Optional[str] = None, - dropdown_choices: Optional[List[str]] = None, - group_id: Optional[str] = None, - coordinates: Optional[TemplateSignerInputCoordinatesField] = None, - dimensions: Optional[TemplateSignerInputDimensionsField] = None, - label: Optional[str] = None, - read_only: Optional[bool] = None, - document_tag_id: Optional[str] = None, - text_value: Optional[str] = None, - checkbox_value: Optional[bool] = None, - date_value: Optional[Date] = None, - **kwargs - ): - """ - :param page_index: Index of page that the input is on. - :type page_index: int - :param type: Type of input, defaults to None - :type type: Optional[TemplateSignerInputTypeField], optional - :param content_type: Content type of input, defaults to None - :type content_type: Optional[TemplateSignerInputContentTypeField], optional - :param is_required: Whether or not the input is required., defaults to None - :type is_required: Optional[bool], optional - :param document_id: Document identifier., defaults to None - :type document_id: Optional[str], optional - :param dropdown_choices: When the input is of the type `dropdown` this values will be filled with all the dropdown options., defaults to None - :type dropdown_choices: Optional[List[str]], optional - :param group_id: When the input is of type `radio` they can be grouped to gather with this identifier., defaults to None - :type group_id: Optional[str], optional - :param coordinates: Where the input is located on a page., defaults to None - :type coordinates: Optional[TemplateSignerInputCoordinatesField], optional - :param dimensions: The size of the input., defaults to None - :type dimensions: Optional[TemplateSignerInputDimensionsField], optional - :param label: The label field is used especially for text, attachment, radio, and checkbox type inputs., defaults to None - :type label: Optional[str], optional - :param read_only: Whether this input was defined as read-only(immutable by signers) or not, defaults to None - :type read_only: Optional[bool], optional - :param document_tag_id: This references the ID of a specific tag contained in a file of the sign request., defaults to None - :type document_tag_id: Optional[str], optional - :param text_value: Text prefill value, defaults to None - :type text_value: Optional[str], optional - :param checkbox_value: Checkbox prefill value, defaults to None - :type checkbox_value: Optional[bool], optional - :param date_value: Date prefill value, defaults to None - :type date_value: Optional[Date], optional - """ - super().__init__( - document_tag_id=document_tag_id, - text_value=text_value, - checkbox_value=checkbox_value, - date_value=date_value, - **kwargs - ) - self.page_index = page_index - self.type = type - self.content_type = content_type - self.is_required = is_required - self.document_id = document_id - self.dropdown_choices = dropdown_choices - self.group_id = group_id - self.coordinates = coordinates - self.dimensions = dimensions - self.label = label - self.read_only = read_only - - -class TemplateSignerRoleField(str, Enum): - SIGNER = 'signer' - APPROVER = 'approver' - FINAL_COPY_READER = 'final_copy_reader' - - -class TemplateSigner(BaseObject): - def __init__( - self, - *, - inputs: Optional[List[TemplateSignerInput]] = None, - email: Optional[str] = None, - role: Optional[TemplateSignerRoleField] = None, - is_in_person: Optional[bool] = None, - order: Optional[int] = None, - signer_group_id: Optional[str] = None, - **kwargs - ): - """ - :param email: Email address of the signer, defaults to None - :type email: Optional[str], optional - :param role: Defines the role of the signer in the signature request. A role of - `signer` needs to sign the document, a role `approver` - approves the document and - a `final_copy_reader` role only - receives the final signed document and signing log., defaults to None - :type role: Optional[TemplateSignerRoleField], optional - :param is_in_person: Used in combination with an embed URL for a sender. - After the sender signs, they will be - redirected to the next `in_person` signer., defaults to None - :type is_in_person: Optional[bool], optional - :param order: Order of the signer, defaults to None - :type order: Optional[int], optional - :param signer_group_id: If provided, this value points signers that are assigned the same inputs and belongs to same signer group. - A signer group is not a Box Group. It is an entity that belongs to the template itself and can only be used - within Sign Requests created from it., defaults to None - :type signer_group_id: Optional[str], optional - """ - super().__init__(**kwargs) - self.inputs = inputs - self.email = email - self.role = role - self.is_in_person = is_in_person - self.order = order - self.signer_group_id = signer_group_id - - -class SignTemplateTypeField(str, Enum): - SIGN_TEMPLATE = 'sign-template' - - -class SignTemplateAdditionalInfoNonEditableField(str, Enum): - EMAIL_SUBJECT = 'email_subject' - EMAIL_MESSAGE = 'email_message' - NAME = 'name' - DAYS_VALID = 'days_valid' - SIGNERS = 'signers' - SOURCE_FILES = 'source_files' - - -class SignTemplateAdditionalInfoRequiredSignersField(str, Enum): - EMAIL = 'email' - - -class SignTemplateAdditionalInfoRequiredField(BaseObject): - def __init__( - self, - *, - signers: Optional[ - List[List[SignTemplateAdditionalInfoRequiredSignersField]] - ] = None, - **kwargs - ): - """ - :param signers: Required signer fields., defaults to None - :type signers: Optional[List[List[SignTemplateAdditionalInfoRequiredSignersField]]], optional - """ - super().__init__(**kwargs) - self.signers = signers - - -class SignTemplateAdditionalInfoField(BaseObject): - def __init__( - self, - *, - non_editable: Optional[List[SignTemplateAdditionalInfoNonEditableField]] = None, - required: Optional[SignTemplateAdditionalInfoRequiredField] = None, - **kwargs - ): - """ - :param non_editable: Non editable fields., defaults to None - :type non_editable: Optional[List[SignTemplateAdditionalInfoNonEditableField]], optional - :param required: Required fields., defaults to None - :type required: Optional[SignTemplateAdditionalInfoRequiredField], optional - """ - super().__init__(**kwargs) - self.non_editable = non_editable - self.required = required - - -class SignTemplateReadySignLinkField(BaseObject): - def __init__( - self, - *, - url: Optional[str] = None, - name: Optional[str] = None, - instructions: Optional[str] = None, - folder_id: Optional[str] = None, - is_notification_disabled: Optional[bool] = None, - is_active: Optional[bool] = None, - **kwargs - ): - """ - :param url: The URL that can be sent to signers., defaults to None - :type url: Optional[str], optional - :param name: Request name., defaults to None - :type name: Optional[str], optional - :param instructions: Extra instructions for all signers., defaults to None - :type instructions: Optional[str], optional - :param folder_id: The destination folder to place final, - signed document and signing - log. Only `ID` and `type` fields are required. - The root folder, - folder ID `0`, cannot be used., defaults to None - :type folder_id: Optional[str], optional - :param is_notification_disabled: Whether to disable notifications when - a signer has signed., defaults to None - :type is_notification_disabled: Optional[bool], optional - :param is_active: Whether the ready sign link is enabled or not., defaults to None - :type is_active: Optional[bool], optional - """ - super().__init__(**kwargs) - self.url = url - self.name = name - self.instructions = instructions - self.folder_id = folder_id - self.is_notification_disabled = is_notification_disabled - self.is_active = is_active - - -class SignTemplateCustomBrandingField(BaseObject): - def __init__( - self, - *, - company_name: Optional[str] = None, - logo_uri: Optional[str] = None, - branding_color: Optional[str] = None, - email_footer_text: Optional[str] = None, - **kwargs - ): - """ - :param company_name: Name of the company, defaults to None - :type company_name: Optional[str], optional - :param logo_uri: Custom branding logo URI in the form of a base64 image., defaults to None - :type logo_uri: Optional[str], optional - :param branding_color: Custom branding color in hex., defaults to None - :type branding_color: Optional[str], optional - :param email_footer_text: Content of the email footer., defaults to None - :type email_footer_text: Optional[str], optional - """ - super().__init__(**kwargs) - self.company_name = company_name - self.logo_uri = logo_uri - self.branding_color = branding_color - self.email_footer_text = email_footer_text - - -class SignTemplate(BaseObject): - _discriminator = 'type', {'sign-template'} - - def __init__( - self, - *, - type: Optional[SignTemplateTypeField] = None, - id: Optional[str] = None, - name: Optional[str] = None, - email_subject: Optional[str] = None, - email_message: Optional[str] = None, - days_valid: Optional[int] = None, - parent_folder: Optional[FolderMini] = None, - source_files: Optional[List[FileMini]] = None, - are_fields_locked: Optional[bool] = None, - are_options_locked: Optional[bool] = None, - are_recipients_locked: Optional[bool] = None, - are_email_settings_locked: Optional[bool] = None, - are_files_locked: Optional[bool] = None, - signers: Optional[List[TemplateSigner]] = None, - additional_info: Optional[SignTemplateAdditionalInfoField] = None, - ready_sign_link: Optional[SignTemplateReadySignLinkField] = None, - custom_branding: Optional[SignTemplateCustomBrandingField] = None, - **kwargs - ): - """ - :param type: object type, defaults to None - :type type: Optional[SignTemplateTypeField], optional - :param id: Template identifier., defaults to None - :type id: Optional[str], optional - :param name: The name of the template., defaults to None - :type name: Optional[str], optional - :param email_subject: Subject of signature request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None - :type email_subject: Optional[str], optional - :param email_message: Message to include in signature request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None - :type email_message: Optional[str], optional - :param days_valid: Set the number of days after which the created signature request will automatically expire if not completed. By default, we do not apply any expiration date on signature requests, and the signature request does not expire., defaults to None - :type days_valid: Optional[int], optional - :param source_files: List of files to create a signing document from. Only the ID and type fields are required for each file., defaults to None - :type source_files: Optional[List[FileMini]], optional - :param are_fields_locked: Indicates if the template input fields are editable or not., defaults to None - :type are_fields_locked: Optional[bool], optional - :param are_options_locked: Indicates if the template document options are editable or not, for example renaming the document., defaults to None - :type are_options_locked: Optional[bool], optional - :param are_recipients_locked: Indicates if the template signers are editable or not., defaults to None - :type are_recipients_locked: Optional[bool], optional - :param are_email_settings_locked: Indicates if the template email settings are editable or not., defaults to None - :type are_email_settings_locked: Optional[bool], optional - :param are_files_locked: Indicates if the template files are editable or not. This includes deleting or renaming template files., defaults to None - :type are_files_locked: Optional[bool], optional - :param signers: Array of signers for the template., defaults to None - :type signers: Optional[List[TemplateSigner]], optional - :param additional_info: Additional information on which fields are required and which fields are not editable., defaults to None - :type additional_info: Optional[SignTemplateAdditionalInfoField], optional - :param ready_sign_link: Box's ready-sign link feature enables you to create a link to a signature request that you've created from a template. Use this link when you want to post a signature request on a public form — such as an email, social media post, or web page — without knowing who the signers will be. Note: The ready-sign link feature is limited to Enterprise Plus customers and not available to Box Verified Enterprises., defaults to None - :type ready_sign_link: Optional[SignTemplateReadySignLinkField], optional - :param custom_branding: Custom branding applied to notifications - and signature requests., defaults to None - :type custom_branding: Optional[SignTemplateCustomBrandingField], optional - """ - super().__init__(**kwargs) - self.type = type - self.id = id - self.name = name - self.email_subject = email_subject - self.email_message = email_message - self.days_valid = days_valid - self.parent_folder = parent_folder - self.source_files = source_files - self.are_fields_locked = are_fields_locked - self.are_options_locked = are_options_locked - self.are_recipients_locked = are_recipients_locked - self.are_email_settings_locked = are_email_settings_locked - self.are_files_locked = are_files_locked - self.signers = signers - self.additional_info = additional_info - self.ready_sign_link = ready_sign_link - self.custom_branding = custom_branding - - -class SignTemplates(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - prev_marker: Optional[str] = None, - entries: Optional[List[SignTemplate]] = None, - **kwargs - ): - """ - :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 - :param entries: A list of templates., defaults to None - :type entries: Optional[List[SignTemplate]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.prev_marker = prev_marker - self.entries = entries - - -class ShieldInformationBarrierReportDetailsDetailsField(BaseObject): - def __init__(self, *, folder_id: Optional[str] = None, **kwargs): - """ - :param folder_id: Folder ID for locating this report, defaults to None - :type folder_id: Optional[str], optional - """ - super().__init__(**kwargs) - self.folder_id = folder_id - - -class ShieldInformationBarrierReportDetails(BaseObject): - def __init__( - self, - *, - details: Optional[ShieldInformationBarrierReportDetailsDetailsField] = None, - **kwargs - ): - super().__init__(**kwargs) - self.details = details - - -class ShieldInformationBarrierReportStatusField(str, Enum): - PENDING = 'pending' - ERROR = 'error' - DONE = 'done' - CANCELLED = 'cancelled' - - -class ShieldInformationBarrierReport(ShieldInformationBarrierReportBase): - def __init__( - self, - *, - shield_information_barrier: Optional[ShieldInformationBarrierReference] = None, - status: Optional[ShieldInformationBarrierReportStatusField] = None, - details: Optional[ShieldInformationBarrierReportDetails] = None, - created_at: Optional[DateTime] = None, - created_by: Optional[UserBase] = None, - updated_at: Optional[DateTime] = None, - id: Optional[str] = None, - type: Optional[ShieldInformationBarrierReportBaseTypeField] = None, - **kwargs - ): - """ - :param status: Status of the shield information report, defaults to None - :type status: Optional[ShieldInformationBarrierReportStatusField], optional - :param created_at: ISO date time string when this - shield information barrier report object was created., defaults to None - :type created_at: Optional[DateTime], optional - :param updated_at: ISO date time string when this - shield information barrier report was updated., defaults to None - :type updated_at: Optional[DateTime], optional - :param id: The unique identifier for the shield information barrier report, defaults to None - :type id: Optional[str], optional - :param type: The type of the shield information barrier report, defaults to None - :type type: Optional[ShieldInformationBarrierReportBaseTypeField], optional - """ - super().__init__(id=id, type=type, **kwargs) - self.shield_information_barrier = shield_information_barrier - self.status = status - self.details = details - self.created_at = created_at - self.created_by = created_by - self.updated_at = updated_at - - -class ShieldInformationBarrierReports(BaseObject): - def __init__( - self, - *, - limit: Optional[int] = None, - next_marker: Optional[str] = None, - entries: Optional[List[ShieldInformationBarrierReport]] = None, - **kwargs - ): - """ - :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 entries: A list of shield information - barrier reports., defaults to None - :type entries: Optional[List[ShieldInformationBarrierReport]], optional - """ - super().__init__(**kwargs) - self.limit = limit - self.next_marker = next_marker - self.entries = entries - - -class TrackingCodeTypeField(str, Enum): - TRACKING_CODE = 'tracking_code' - - -class TrackingCode(BaseObject): - _discriminator = 'type', {'tracking_code'} - - def __init__( - self, - *, - type: Optional[TrackingCodeTypeField] = None, - name: Optional[str] = None, - value: Optional[str] = None, - **kwargs - ): - """ - :param type: `tracking_code`, defaults to None - :type type: Optional[TrackingCodeTypeField], optional - :param name: The name of the tracking code, which must be preconfigured in - the Admin Console, defaults to None - :type name: Optional[str], optional - :param value: The value of the tracking code, defaults to None - :type value: Optional[str], optional - """ - super().__init__(**kwargs) - self.type = type - self.name = name - self.value = value - - -class UserFullRoleField(str, Enum): - ADMIN = 'admin' - COADMIN = 'coadmin' - USER = 'user' - - -class UserFullEnterpriseTypeField(str, Enum): - ENTERPRISE = 'enterprise' - - -class UserFullEnterpriseField(BaseObject): - _discriminator = 'type', {'enterprise'} - - def __init__( - self, - *, - id: Optional[str] = None, - type: Optional[UserFullEnterpriseTypeField] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :param id: The unique identifier for this enterprise., defaults to None - :type id: Optional[str], optional - :param type: `enterprise`, defaults to None - :type type: Optional[UserFullEnterpriseTypeField], optional - :param name: The name of the enterprise, defaults to None - :type name: Optional[str], optional - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.name = name - - -class UserFull(User): - def __init__( - self, - id: str, - *, - role: Optional[UserFullRoleField] = None, - tracking_codes: Optional[List[TrackingCode]] = None, - can_see_managed_users: Optional[bool] = None, - is_sync_enabled: Optional[bool] = None, - is_external_collab_restricted: Optional[bool] = None, - is_exempt_from_device_limits: Optional[bool] = None, - is_exempt_from_login_verification: Optional[bool] = None, - enterprise: Optional[UserFullEnterpriseField] = None, - my_tags: Optional[List[str]] = None, - hostname: Optional[str] = None, - is_platform_access_only: Optional[bool] = None, - external_app_user_id: Optional[str] = None, - created_at: Optional[DateTime] = None, - modified_at: Optional[DateTime] = None, - language: Optional[str] = None, - timezone: Optional[str] = None, - space_amount: Optional[int] = None, - space_used: Optional[int] = None, - max_upload_size: Optional[int] = None, - status: Optional[UserStatusField] = None, - job_title: Optional[str] = None, - phone: Optional[str] = None, - address: Optional[str] = None, - avatar_url: Optional[str] = None, - notification_email: Optional[UserNotificationEmailField] = None, - name: Optional[str] = None, - login: Optional[str] = None, - type: UserBaseTypeField = UserBaseTypeField.USER.value, - **kwargs - ): - """ - :param id: The unique identifier for this user - :type id: str - :param role: The user’s enterprise role, defaults to None - :type role: Optional[UserFullRoleField], optional - :param tracking_codes: Tracking codes allow an admin to generate reports from the - admin console and assign an attribute to a specific group - of users. This setting must be enabled for an enterprise - before it can be used., defaults to None - :type tracking_codes: Optional[List[TrackingCode]], optional - :param can_see_managed_users: Whether the user can see other enterprise users in their contact list, defaults to None - :type can_see_managed_users: Optional[bool], optional - :param is_sync_enabled: Whether the user can use Box Sync, defaults to None - :type is_sync_enabled: Optional[bool], optional - :param is_external_collab_restricted: Whether the user is allowed to collaborate with users outside their - enterprise, defaults to None - :type is_external_collab_restricted: Optional[bool], optional - :param is_exempt_from_device_limits: Whether to exempt the user from Enterprise device limits, defaults to None - :type is_exempt_from_device_limits: Optional[bool], optional - :param is_exempt_from_login_verification: Whether the user must use two-factor authentication, defaults to None - :type is_exempt_from_login_verification: Optional[bool], optional - :param my_tags: Tags for all files and folders owned by the user. Values returned - will only contain tags that were set by the requester., defaults to None - :type my_tags: Optional[List[str]], optional - :param hostname: The root (protocol, subdomain, domain) of any links that need to be - generated for the user, defaults to None - :type hostname: Optional[str], optional - :param is_platform_access_only: Whether the user is an App User, defaults to None - :type is_platform_access_only: Optional[bool], optional - :param external_app_user_id: An external identifier for an app user, which can be used to look up - the user. This can be used to tie user IDs from external identity - providers to Box users., defaults to None - :type external_app_user_id: Optional[str], optional - :param created_at: When the user object was created, defaults to None - :type created_at: Optional[DateTime], optional - :param modified_at: When the user object was last modified, defaults to None - :type modified_at: Optional[DateTime], optional - :param language: The language of the user, formatted in modified version of the - [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None - :type language: Optional[str], optional - :param timezone: The user's timezone, defaults to None - :type timezone: Optional[str], optional - :param space_amount: The user’s total available space amount in bytes, defaults to None - :type space_amount: Optional[int], optional - :param space_used: The amount of space in use by the user, defaults to None - :type space_used: Optional[int], optional - :param max_upload_size: The maximum individual file size in bytes the user can have, defaults to None - :type max_upload_size: Optional[int], optional - :param status: The user's account status, defaults to None - :type status: Optional[UserStatusField], optional - :param job_title: The user’s job title, defaults to None - :type job_title: Optional[str], optional - :param phone: The user’s phone number, defaults to None - :type phone: Optional[str], optional - :param address: The user’s address, defaults to None - :type address: Optional[str], optional - :param avatar_url: URL of the user’s avatar image, defaults to None - :type avatar_url: Optional[str], optional - :param notification_email: An alternate notification email address to which email - notifications are sent. When it's confirmed, this will be - the email address to which notifications are sent instead of - to the primary email address., defaults to None - :type notification_email: Optional[UserNotificationEmailField], optional - :param name: The display name of this user, defaults to None - :type name: Optional[str], optional - :param login: The primary email address of this user, defaults to None - :type login: Optional[str], optional - :param type: `user`, defaults to UserBaseTypeField.USER.value - :type type: UserBaseTypeField, optional - """ - super().__init__( - id=id, - created_at=created_at, - modified_at=modified_at, - language=language, - timezone=timezone, - space_amount=space_amount, - space_used=space_used, - max_upload_size=max_upload_size, - status=status, - job_title=job_title, - phone=phone, - address=address, - avatar_url=avatar_url, - notification_email=notification_email, - name=name, - login=login, - type=type, - **kwargs - ) - self.role = role - self.tracking_codes = tracking_codes - self.can_see_managed_users = can_see_managed_users - self.is_sync_enabled = is_sync_enabled - self.is_external_collab_restricted = is_external_collab_restricted - self.is_exempt_from_device_limits = is_exempt_from_device_limits - self.is_exempt_from_login_verification = is_exempt_from_login_verification - self.enterprise = enterprise - self.my_tags = my_tags - self.hostname = hostname - self.is_platform_access_only = is_platform_access_only - self.external_app_user_id = external_app_user_id - - -class UsersOrderDirectionField(str, Enum): - ASC = 'ASC' - DESC = 'DESC' - - -class UsersOrderField(BaseObject): - def __init__( - self, - *, - by: Optional[str] = None, - direction: Optional[UsersOrderDirectionField] = None, - **kwargs - ): - """ - :param by: The field to order by, defaults to None - :type by: Optional[str], optional - :param direction: The direction to order by, either ascending or descending, defaults to None - :type direction: Optional[UsersOrderDirectionField], optional - """ - super().__init__(**kwargs) - self.by = by - self.direction = direction - - -class Users(BaseObject): - def __init__( - self, - *, - total_count: Optional[int] = None, - limit: Optional[int] = None, - offset: Optional[int] = None, - order: Optional[List[UsersOrderField]] = None, - entries: Optional[List[UserFull]] = None, - **kwargs - ): - """ - :param total_count: One greater than the offset of the last entry in the entire collection. - The total number of entries in the collection may be less than - `total_count`. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type total_count: Optional[int], optional - :param limit: The limit that was used for these entries. This will be the same as the - `limit` query parameter unless that value exceeded the maximum value - allowed. The maximum value varies by API., defaults to None - :type limit: Optional[int], optional - :param offset: The 0-based offset of the first entry in this set. This will be the same - as the `offset` query parameter. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type offset: Optional[int], optional - :param order: The order by which items are returned. - - This field is only returned for calls that use offset-based pagination. - For marker-based paginated APIs, this field will be omitted., defaults to None - :type order: Optional[List[UsersOrderField]], optional - :param entries: A list of users, defaults to None - :type entries: Optional[List[UserFull]], optional - """ - super().__init__(**kwargs) - self.total_count = total_count - self.limit = limit - self.offset = offset - self.order = order - self.entries = entries - - -class MetadataFieldFilterFloatRange(BaseObject): - def __init__( - self, *, lt: Optional[float] = None, gt: Optional[float] = None, **kwargs - ): - """ - :param lt: Specifies the (inclusive) upper bound for the metadata field - value. The value of a field must be lower than (`lt`) or - equal to this value for the search query to match this - template., defaults to None - :type lt: Optional[float], optional - :param gt: Specifies the (inclusive) lower bound for the metadata field - value. The value of a field must be greater than (`gt`) or - equal to this value for the search query to match this - template., defaults to None - :type gt: Optional[float], optional - """ - super().__init__(**kwargs) - self.lt = lt - self.gt = gt - - -class MetadataFieldFilterDateRange(BaseObject): - def __init__( - self, *, lt: Optional[DateTime] = None, gt: Optional[DateTime] = None, **kwargs - ): - """ - :param lt: Specifies the (inclusive) upper bound for the metadata field - value. The value of a field must be lower than (`lt`) or - equal to this value for the search query to match this - template., defaults to None - :type lt: Optional[DateTime], optional - :param gt: Specifies the (inclusive) lower bound for the metadata field - value. The value of a field must be greater than (`gt`) or - equal to this value for the search query to match this - template., defaults to None - :type gt: Optional[DateTime], optional - """ - super().__init__(**kwargs) - self.lt = lt - self.gt = gt - - -class MetadataFilterScopeField(str, Enum): - GLOBAL = 'global' - ENTERPRISE = 'enterprise' - ENTERPRISE__ENTERPRISE_ID_ = 'enterprise_{enterprise_id}' - - -class MetadataFilter(BaseObject): - _fields_to_json_mapping: Dict[str, str] = { - 'template_key': 'templateKey', - **BaseObject._fields_to_json_mapping, - } - _json_to_fields_mapping: Dict[str, str] = { - 'templateKey': 'template_key', - **BaseObject._json_to_fields_mapping, - } - - def __init__( - self, - *, - scope: Optional[MetadataFilterScopeField] = None, - template_key: Optional[str] = None, - filters: Optional[ - Dict[ - str, - Union[ - str, - float, - List[str], - MetadataFieldFilterFloatRange, - MetadataFieldFilterDateRange, - ], - ] - ] = None, - **kwargs - ): - """ - :param scope: Specifies the scope of the template to filter search results by. - - This will be `enterprise_{enterprise_id}` for templates defined - for use in this enterprise, and `global` for general templates - that are available to all enterprises using Box., defaults to None - :type scope: Optional[MetadataFilterScopeField], optional - :param template_key: The key of the template used to filter search results. - - In many cases the template key is automatically derived - of its display name, for example `Contract Template` would - become `contractTemplate`. In some cases the creator of the - template will have provided its own template key. - - Please [list the templates for an enterprise][list], or - get all instances on a [file][file] or [folder][folder] - to inspect a template's key. - - [list]: e://get-metadata-templates-enterprise - [file]: e://get-files-id-metadata - [folder]: e://get-folders-id-metadata, defaults to None - :type template_key: Optional[str], optional - :param filters: Specifies which fields on the template to filter the search - results by. When more than one field is specified, the query - performs a logical `AND` to ensure that the instance of the - template matches each of the fields specified., defaults to None - :type filters: Optional[Dict[str, Union[str, float, List[str], MetadataFieldFilterFloatRange, MetadataFieldFilterDateRange]]], optional - """ - super().__init__(**kwargs) - self.scope = scope - self.template_key = template_key - self.filters = filters diff --git a/box_sdk_gen/schemas/__init__.py b/box_sdk_gen/schemas/__init__.py new file mode 100644 index 0000000..af47d77 --- /dev/null +++ b/box_sdk_gen/schemas/__init__.py @@ -0,0 +1,401 @@ +from box_sdk_gen.schemas.ai_ask import * + +from box_sdk_gen.schemas.ai_text_gen import * + +from box_sdk_gen.schemas.post_o_auth_2_token import * + +from box_sdk_gen.schemas.post_o_auth_2_token_refresh_access_token import * + +from box_sdk_gen.schemas.post_o_auth_2_revoke import * + +from box_sdk_gen.schemas.zip_download_request import * + +from box_sdk_gen.schemas.metadata_query import * + +from box_sdk_gen.schemas.file_request_update_request import * + +from box_sdk_gen.schemas.file_request_copy_request import * + +from box_sdk_gen.schemas.client_error import * + +from box_sdk_gen.schemas.o_auth_2_error import * + +from box_sdk_gen.schemas.ai_response import * + +from box_sdk_gen.schemas.classification import * + +from box_sdk_gen.schemas.classification_template import * + +from box_sdk_gen.schemas.collaboration_allowlist_entry import * + +from box_sdk_gen.schemas.collaboration_allowlist_entries import * + +from box_sdk_gen.schemas.collection import * + +from box_sdk_gen.schemas.collections import * + +from box_sdk_gen.schemas.comment_base import * + +from box_sdk_gen.schemas.email_alias import * + +from box_sdk_gen.schemas.email_aliases import * + +from box_sdk_gen.schemas.enterprise_base import * + +from box_sdk_gen.schemas.file_base import * + +from box_sdk_gen.schemas.file_version_base import * + +from box_sdk_gen.schemas.file_version_mini import * + +from box_sdk_gen.schemas.file_mini import * + +from box_sdk_gen.schemas.files_under_retention import * + +from box_sdk_gen.schemas.file_conflict import * + +from box_sdk_gen.schemas.conflict_error import * + +from box_sdk_gen.schemas.folder_base import * + +from box_sdk_gen.schemas.folder_mini import * + +from box_sdk_gen.schemas.file_or_folder_scope import * + +from box_sdk_gen.schemas.access_token import * + +from box_sdk_gen.schemas.generic_source import * + +from box_sdk_gen.schemas.integration_mapping_base import * + +from box_sdk_gen.schemas.integration_mapping_mini import * + +from box_sdk_gen.schemas.group_base import * + +from box_sdk_gen.schemas.group_mini import * + +from box_sdk_gen.schemas.group import * + +from box_sdk_gen.schemas.group_full import * + +from box_sdk_gen.schemas.groups import * + +from box_sdk_gen.schemas.legal_hold_policy_mini import * + +from box_sdk_gen.schemas.legal_hold_policy_assignment_base import * + +from box_sdk_gen.schemas.metadata_base import * + +from box_sdk_gen.schemas.metadata import * + +from box_sdk_gen.schemas.metadatas import * + +from box_sdk_gen.schemas.metadata_full import * + +from box_sdk_gen.schemas.metadata_cascade_policy import * + +from box_sdk_gen.schemas.metadata_cascade_policies import * + +from box_sdk_gen.schemas.metadata_query_index import * + +from box_sdk_gen.schemas.metadata_template import * + +from box_sdk_gen.schemas.metadata_templates import * + +from box_sdk_gen.schemas.realtime_server import * + +from box_sdk_gen.schemas.realtime_servers import * + +from box_sdk_gen.schemas.retention_policy_base import * + +from box_sdk_gen.schemas.retention_policy_mini import * + +from box_sdk_gen.schemas.file_version_retention import * + +from box_sdk_gen.schemas.file_version_retentions import * + +from box_sdk_gen.schemas.retention_policy_assignment_base import * + +from box_sdk_gen.schemas.shield_information_barrier_base import * + +from box_sdk_gen.schemas.shield_information_barrier_reference import * + +from box_sdk_gen.schemas.shield_information_barrier_report_base import * + +from box_sdk_gen.schemas.shield_information_barrier_segment_member_base import * + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_base import * + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_mini import * + +from box_sdk_gen.schemas.session_termination_message import * + +from box_sdk_gen.schemas.storage_policy_mini import * + +from box_sdk_gen.schemas.storage_policy_assignment import * + +from box_sdk_gen.schemas.storage_policy_assignments import * + +from box_sdk_gen.schemas.storage_policy import * + +from box_sdk_gen.schemas.storage_policies import * + +from box_sdk_gen.schemas.terms_of_service_base import * + +from box_sdk_gen.schemas.terms_of_service import * + +from box_sdk_gen.schemas.terms_of_services import * + +from box_sdk_gen.schemas.upload_part_mini import * + +from box_sdk_gen.schemas.upload_part import * + +from box_sdk_gen.schemas.upload_parts import * + +from box_sdk_gen.schemas.uploaded_part import * + +from box_sdk_gen.schemas.upload_session import * + +from box_sdk_gen.schemas.upload_url import * + +from box_sdk_gen.schemas.user_avatar import * + +from box_sdk_gen.schemas.user_base import * + +from box_sdk_gen.schemas.user_integration_mappings import * + +from box_sdk_gen.schemas.user_collaborations import * + +from box_sdk_gen.schemas.user_mini import * + +from box_sdk_gen.schemas.event_source import * + +from box_sdk_gen.schemas.user import * + +from box_sdk_gen.schemas.trash_web_link_restored import * + +from box_sdk_gen.schemas.trash_folder_restored import * + +from box_sdk_gen.schemas.trash_file_restored import * + +from box_sdk_gen.schemas.trash_web_link import * + +from box_sdk_gen.schemas.trash_folder import * + +from box_sdk_gen.schemas.trash_file import * + +from box_sdk_gen.schemas.terms_of_service_user_status import * + +from box_sdk_gen.schemas.terms_of_service_user_statuses import * + +from box_sdk_gen.schemas.task_assignment import * + +from box_sdk_gen.schemas.task_assignments import * + +from box_sdk_gen.schemas.task import * + +from box_sdk_gen.schemas.tasks import * + +from box_sdk_gen.schemas.retention_policy_assignment import * + +from box_sdk_gen.schemas.retention_policy_assignments import * + +from box_sdk_gen.schemas.retention_policy import * + +from box_sdk_gen.schemas.retention_policies import * + +from box_sdk_gen.schemas.legal_hold_policy import * + +from box_sdk_gen.schemas.legal_hold_policies import * + +from box_sdk_gen.schemas.invite import * + +from box_sdk_gen.schemas.group_membership import * + +from box_sdk_gen.schemas.group_memberships import * + +from box_sdk_gen.schemas.file_version import * + +from box_sdk_gen.schemas.file_version_full import * + +from box_sdk_gen.schemas.file_versions import * + +from box_sdk_gen.schemas.file_request import * + +from box_sdk_gen.schemas.file import * + +from box_sdk_gen.schemas.file_full import * + +from box_sdk_gen.schemas.files import * + +from box_sdk_gen.schemas.device_pinner import * + +from box_sdk_gen.schemas.device_pinners import * + +from box_sdk_gen.schemas.comment import * + +from box_sdk_gen.schemas.comment_full import * + +from box_sdk_gen.schemas.comments import * + +from box_sdk_gen.schemas.collaboration_allowlist_exempt_target import * + +from box_sdk_gen.schemas.collaboration_allowlist_exempt_targets import * + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction import * + +from box_sdk_gen.schemas.shield_information_barrier_segment_restrictions import * + +from box_sdk_gen.schemas.shield_information_barrier_segment_member_mini import * + +from box_sdk_gen.schemas.shield_information_barrier_segment_member import * + +from box_sdk_gen.schemas.shield_information_barrier_segment_members import * + +from box_sdk_gen.schemas.shield_information_barrier_segment import * + +from box_sdk_gen.schemas.shield_information_barrier_segments import * + +from box_sdk_gen.schemas.shield_information_barrier import * + +from box_sdk_gen.schemas.shield_information_barriers import * + +from box_sdk_gen.schemas.folder_lock import * + +from box_sdk_gen.schemas.folder_locks import * + +from box_sdk_gen.schemas.watermark import * + +from box_sdk_gen.schemas.webhook_mini import * + +from box_sdk_gen.schemas.webhooks import * + +from box_sdk_gen.schemas.webhook import * + +from box_sdk_gen.schemas.web_link_base import * + +from box_sdk_gen.schemas.web_link_mini import * + +from box_sdk_gen.schemas.web_link import * + +from box_sdk_gen.schemas.items import * + +from box_sdk_gen.schemas.folder import * + +from box_sdk_gen.schemas.metadata_query_results import * + +from box_sdk_gen.schemas.legal_hold_policy_assignment import * + +from box_sdk_gen.schemas.legal_hold_policy_assignments import * + +from box_sdk_gen.schemas.file_version_legal_hold import * + +from box_sdk_gen.schemas.file_version_legal_holds import * + +from box_sdk_gen.schemas.folder_full import * + +from box_sdk_gen.schemas.search_result_with_shared_link import * + +from box_sdk_gen.schemas.search_results_with_shared_links import * + +from box_sdk_gen.schemas.search_results import * + +from box_sdk_gen.schemas.recent_item import * + +from box_sdk_gen.schemas.recent_items import * + +from box_sdk_gen.schemas.event import * + +from box_sdk_gen.schemas.events import * + +from box_sdk_gen.schemas.skill_invocation import * + +from box_sdk_gen.schemas.collaboration import * + +from box_sdk_gen.schemas.collaborations import * + +from box_sdk_gen.schemas.webhook_invocation import * + +from box_sdk_gen.schemas.workflow_mini import * + +from box_sdk_gen.schemas.workflow import * + +from box_sdk_gen.schemas.workflows import * + +from box_sdk_gen.schemas.workflow_full import * + +from box_sdk_gen.schemas.zip_download import * + +from box_sdk_gen.schemas.zip_download_status import * + +from box_sdk_gen.schemas.completion_rule_variable import * + +from box_sdk_gen.schemas.collaborator_variable import * + +from box_sdk_gen.schemas.keyword_skill_card import * + +from box_sdk_gen.schemas.integration_mapping_slack_options import * + +from box_sdk_gen.schemas.integration_mapping_partner_item_slack import * + +from box_sdk_gen.schemas.integration_mapping import * + +from box_sdk_gen.schemas.integration_mappings import * + +from box_sdk_gen.schemas.integration_mapping_box_item_slack import * + +from box_sdk_gen.schemas.integration_mapping_slack_create_request import * + +from box_sdk_gen.schemas.role_variable import * + +from box_sdk_gen.schemas.outcome import * + +from box_sdk_gen.schemas.timeline_skill_card import * + +from box_sdk_gen.schemas.transcript_skill_card import * + +from box_sdk_gen.schemas.status_skill_card import * + +from box_sdk_gen.schemas.skill_cards_metadata import * + +from box_sdk_gen.schemas.sign_request_create_signer import * + +from box_sdk_gen.schemas.sign_request_prefill_tag import * + +from box_sdk_gen.schemas.sign_request_signer_input import * + +from box_sdk_gen.schemas.sign_request_signer import * + +from box_sdk_gen.schemas.sign_request_base import * + +from box_sdk_gen.schemas.sign_request import * + +from box_sdk_gen.schemas.sign_requests import * + +from box_sdk_gen.schemas.sign_request_create_request import * + +from box_sdk_gen.schemas.template_signer_input import * + +from box_sdk_gen.schemas.template_signer import * + +from box_sdk_gen.schemas.sign_template import * + +from box_sdk_gen.schemas.sign_templates import * + +from box_sdk_gen.schemas.shield_information_barrier_report_details import * + +from box_sdk_gen.schemas.shield_information_barrier_report import * + +from box_sdk_gen.schemas.shield_information_barrier_reports import * + +from box_sdk_gen.schemas.tracking_code import * + +from box_sdk_gen.schemas.user_full import * + +from box_sdk_gen.schemas.users import * + +from box_sdk_gen.schemas.metadata_field_filter_float_range import * + +from box_sdk_gen.schemas.metadata_field_filter_date_range import * + +from box_sdk_gen.schemas.metadata_filter import * diff --git a/box_sdk_gen/schemas/access_token.py b/box_sdk_gen/schemas/access_token.py new file mode 100644 index 0000000..840c695 --- /dev/null +++ b/box_sdk_gen/schemas/access_token.py @@ -0,0 +1,58 @@ +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.file_or_folder_scope import FileOrFolderScope + + +class AccessTokenTokenTypeField(str, Enum): + BEARER = 'bearer' + + +class AccessTokenIssuedTokenTypeField(str, Enum): + URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN = ( + 'urn:ietf:params:oauth:token-type:access_token' + ) + + +class AccessToken(BaseObject): + def __init__( + self, + *, + access_token: Optional[str] = None, + expires_in: Optional[int] = None, + token_type: Optional[AccessTokenTokenTypeField] = None, + restricted_to: Optional[List[FileOrFolderScope]] = None, + refresh_token: Optional[str] = None, + issued_token_type: Optional[AccessTokenIssuedTokenTypeField] = None, + **kwargs + ): + """ + :param access_token: The requested access token., defaults to None + :type access_token: Optional[str], optional + :param expires_in: The time in seconds by which this token will expire., defaults to None + :type expires_in: Optional[int], optional + :param token_type: The type of access token returned., defaults to None + :type token_type: Optional[AccessTokenTokenTypeField], optional + :param restricted_to: The permissions that this access token permits, + providing a list of resources (files, folders, etc) + and the scopes permitted for each of those resources., defaults to None + :type restricted_to: Optional[List[FileOrFolderScope]], optional + :param refresh_token: The refresh token for this access token, which can be used + to request a new access token when the current one expires., defaults to None + :type refresh_token: Optional[str], optional + :param issued_token_type: The type of downscoped access token returned. This is only + returned if an access token has been downscoped., defaults to None + :type issued_token_type: Optional[AccessTokenIssuedTokenTypeField], optional + """ + super().__init__(**kwargs) + self.access_token = access_token + self.expires_in = expires_in + self.token_type = token_type + self.restricted_to = restricted_to + self.refresh_token = refresh_token + self.issued_token_type = issued_token_type diff --git a/box_sdk_gen/schemas/ai_ask.py b/box_sdk_gen/schemas/ai_ask.py new file mode 100644 index 0000000..e6d56c5 --- /dev/null +++ b/box_sdk_gen/schemas/ai_ask.py @@ -0,0 +1,59 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + + +class AiAskModeField(str, Enum): + MULTIPLE_ITEM_QA = 'multiple_item_qa' + SINGLE_ITEM_QA = 'single_item_qa' + + +class AiAskItemsTypeField(str, Enum): + FILE = 'file' + + +class AiAskItemsField(BaseObject): + _discriminator = 'type', {'file'} + + def __init__( + self, + id: str, + *, + type: AiAskItemsTypeField = AiAskItemsTypeField.FILE.value, + content: Optional[str] = None, + **kwargs + ): + """ + :param id: The id of the item + :type id: str + :param type: The type of the item, defaults to AiAskItemsTypeField.FILE.value + :type type: AiAskItemsTypeField, optional + :param content: The content of the item, often the text representation., defaults to None + :type content: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.content = content + + +class AiAsk(BaseObject): + def __init__( + self, mode: AiAskModeField, prompt: str, items: List[AiAskItemsField], **kwargs + ): + """ + :param mode: The mode specifies if this request is for a single or multiple items. + :type mode: AiAskModeField + :param prompt: The prompt provided by the client to be answered by the LLM. + :type prompt: str + :param items: The items to be processed by the LLM, often files. + :type items: List[AiAskItemsField] + """ + super().__init__(**kwargs) + self.mode = mode + self.prompt = prompt + self.items = items diff --git a/box_sdk_gen/schemas/ai_response.py b/box_sdk_gen/schemas/ai_response.py new file mode 100644 index 0000000..433d0ae --- /dev/null +++ b/box_sdk_gen/schemas/ai_response.py @@ -0,0 +1,28 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.internal.utils import DateTime + + +class AiResponse(BaseObject): + def __init__( + self, + answer: str, + created_at: DateTime, + *, + completion_reason: Optional[str] = None, + **kwargs + ): + """ + :param answer: The answer provided by the LLM. + :type answer: str + :param created_at: The ISO date formatted timestamp of when the answer to the prompt was created. + :type created_at: DateTime + :param completion_reason: The reason the response finishes., defaults to None + :type completion_reason: Optional[str], optional + """ + super().__init__(**kwargs) + self.answer = answer + self.created_at = created_at + self.completion_reason = completion_reason diff --git a/box_sdk_gen/schemas/ai_text_gen.py b/box_sdk_gen/schemas/ai_text_gen.py new file mode 100644 index 0000000..9043250 --- /dev/null +++ b/box_sdk_gen/schemas/ai_text_gen.py @@ -0,0 +1,84 @@ +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.internal.utils import DateTime + + +class AiTextGenItemsTypeField(str, Enum): + FILE = 'file' + + +class AiTextGenItemsField(BaseObject): + _discriminator = 'type', {'file'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[AiTextGenItemsTypeField] = None, + content: Optional[str] = None, + **kwargs + ): + """ + :param id: The id of the item., defaults to None + :type id: Optional[str], optional + :param type: The type of the item., defaults to None + :type type: Optional[AiTextGenItemsTypeField], optional + :param content: The content to use as context for generating new text or editing existing text., defaults to None + :type content: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.content = content + + +class AiTextGenDialogueHistoryField(BaseObject): + def __init__( + self, + *, + prompt: Optional[str] = None, + answer: Optional[str] = None, + created_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param prompt: The prompt previously provided by the client and answered by the LLM., defaults to None + :type prompt: Optional[str], optional + :param answer: The answer previously provided by the LLM., defaults to None + :type answer: Optional[str], optional + :param created_at: The ISO date formatted timestamp of when the previous answer to the prompt was created., defaults to None + :type created_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.prompt = prompt + self.answer = answer + self.created_at = created_at + + +class AiTextGen(BaseObject): + def __init__( + self, + prompt: str, + items: List[AiTextGenItemsField], + *, + dialogue_history: Optional[List[AiTextGenDialogueHistoryField]] = None, + **kwargs + ): + """ + :param prompt: The prompt provided by the client to be answered by the LLM. + :type prompt: str + :param items: The items to be processed by the LLM, often files. + :type items: List[AiTextGenItemsField] + :param dialogue_history: The history of prompts and answers previously passed to the LLM. This provides additional context to the LLM in generating the response., defaults to None + :type dialogue_history: Optional[List[AiTextGenDialogueHistoryField]], optional + """ + super().__init__(**kwargs) + self.prompt = prompt + self.items = items + self.dialogue_history = dialogue_history diff --git a/box_sdk_gen/schemas/classification.py b/box_sdk_gen/schemas/classification.py new file mode 100644 index 0000000..7fc90d7 --- /dev/null +++ b/box_sdk_gen/schemas/classification.py @@ -0,0 +1,86 @@ +from enum import Enum + +from typing import Optional + +from typing import Dict + +from box_sdk_gen.internal.base_object import BaseObject + + +class ClassificationTemplateField(str, Enum): + SECURITYCLASSIFICATION_6VMVOCHWUWO = 'securityClassification-6VMVochwUWo' + + +class Classification(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'box_security_classification_key': 'Box__Security__Classification__Key', + 'parent': '$parent', + 'template': '$template', + 'scope': '$scope', + 'version': '$version', + 'type': '$type', + 'type_version': '$typeVersion', + 'can_edit': '$canEdit', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'Box__Security__Classification__Key': 'box_security_classification_key', + '$parent': 'parent', + '$template': 'template', + '$scope': 'scope', + '$version': 'version', + '$type': 'type', + '$typeVersion': 'type_version', + '$canEdit': 'can_edit', + **BaseObject._json_to_fields_mapping, + } + + def __init__( + self, + *, + box_security_classification_key: Optional[str] = None, + parent: Optional[str] = None, + template: Optional[ClassificationTemplateField] = None, + scope: Optional[str] = None, + version: Optional[int] = None, + type: Optional[str] = None, + type_version: Optional[float] = None, + can_edit: Optional[bool] = None, + **kwargs + ): + """ + :param box_security_classification_key: The name of the classification applied to the item., defaults to None + :type box_security_classification_key: Optional[str], optional + :param parent: The identifier of the item that this metadata instance + has been attached to. This combines the `type` and the `id` + of the parent in the form `{type}_{id}`., defaults to None + :type parent: Optional[str], optional + :param template: `securityClassification-6VMVochwUWo`, defaults to None + :type template: Optional[ClassificationTemplateField], optional + :param scope: The scope of the enterprise that this classification has been + applied for. + + This will be in the format `enterprise_{enterprise_id}`., defaults to None + :type scope: Optional[str], optional + :param version: The version of the metadata instance. This version starts at 0 and + increases every time a classification is updated., defaults to None + :type version: Optional[int], optional + :param type: The unique ID of this classification instance. This will be include + the name of the classification template and a unique ID., defaults to None + :type type: Optional[str], optional + :param type_version: The version of the metadata template. This version starts at 0 and + increases every time the template is updated. This is mostly for internal + use., defaults to None + :type type_version: Optional[float], optional + :param can_edit: Whether an end user can change the classification., defaults to None + :type can_edit: Optional[bool], optional + """ + super().__init__(**kwargs) + self.box_security_classification_key = box_security_classification_key + self.parent = parent + self.template = template + self.scope = scope + self.version = version + self.type = type + self.type_version = type_version + self.can_edit = can_edit diff --git a/box_sdk_gen/schemas/classification_template.py b/box_sdk_gen/schemas/classification_template.py new file mode 100644 index 0000000..ce1f0e3 --- /dev/null +++ b/box_sdk_gen/schemas/classification_template.py @@ -0,0 +1,244 @@ +from enum import Enum + +from typing import Optional + +from typing import Dict + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + + +class ClassificationTemplateTypeField(str, Enum): + METADATA_TEMPLATE = 'metadata_template' + + +class ClassificationTemplateTemplateKeyField(str, Enum): + SECURITYCLASSIFICATION_6VMVOCHWUWO = 'securityClassification-6VMVochwUWo' + + +class ClassificationTemplateDisplayNameField(str, Enum): + CLASSIFICATION = 'Classification' + + +class ClassificationTemplateFieldsTypeField(str, Enum): + ENUM = 'enum' + + +class ClassificationTemplateFieldsKeyField(str, Enum): + BOX__SECURITY__CLASSIFICATION__KEY = 'Box__Security__Classification__Key' + + +class ClassificationTemplateFieldsDisplayNameField(str, Enum): + CLASSIFICATION = 'Classification' + + +class ClassificationTemplateFieldsOptionsStaticConfigClassificationField(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'classification_definition': 'classificationDefinition', + 'color_id': 'colorID', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'classificationDefinition': 'classification_definition', + 'colorID': 'color_id', + **BaseObject._json_to_fields_mapping, + } + + def __init__( + self, + *, + classification_definition: Optional[str] = None, + color_id: Optional[int] = None, + **kwargs + ): + """ + :param classification_definition: A longer description of the classification., defaults to None + :type classification_definition: Optional[str], optional + :param color_id: An internal Box identifier used to assign a color to + a classification label. + + Mapping between a `colorID` and a color may change + without notice. Currently, the color mappings are as + follows. + + * `0`: Yellow + * `1`: Orange + * `2`: Watermelon red + * `3`: Purple rain + * `4`: Light blue + * `5`: Dark blue + * `6`: Light green + * `7`: Gray, defaults to None + :type color_id: Optional[int], optional + """ + super().__init__(**kwargs) + self.classification_definition = classification_definition + self.color_id = color_id + + +class ClassificationTemplateFieldsOptionsStaticConfigField(BaseObject): + def __init__( + self, + *, + classification: Optional[ + ClassificationTemplateFieldsOptionsStaticConfigClassificationField + ] = None, + **kwargs + ): + """ + :param classification: Additional information about the classification. + + This is not an exclusive list of properties, and + more object fields might be returned. These fields + are used for internal Box Shield and Box Governance + purposes and no additional value must be derived from + these fields., defaults to None + :type classification: Optional[ClassificationTemplateFieldsOptionsStaticConfigClassificationField], optional + """ + super().__init__(**kwargs) + self.classification = classification + + +class ClassificationTemplateFieldsOptionsField(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'static_config': 'staticConfig', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'staticConfig': 'static_config', + **BaseObject._json_to_fields_mapping, + } + + def __init__( + self, + id: str, + key: str, + *, + static_config: Optional[ + ClassificationTemplateFieldsOptionsStaticConfigField + ] = None, + **kwargs + ): + """ + :param id: The unique ID of this classification. + :type id: str + :param key: The display name and key for this classification. + :type key: str + :param static_config: Additional information about the classification., defaults to None + :type static_config: Optional[ClassificationTemplateFieldsOptionsStaticConfigField], optional + """ + super().__init__(**kwargs) + self.id = id + self.key = key + self.static_config = static_config + + +class ClassificationTemplateFieldsField(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'display_name': 'displayName', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'displayName': 'display_name', + **BaseObject._json_to_fields_mapping, + } + _discriminator = 'type', {'enum'} + + def __init__( + self, + id: str, + options: List[ClassificationTemplateFieldsOptionsField], + *, + type: ClassificationTemplateFieldsTypeField = ClassificationTemplateFieldsTypeField.ENUM.value, + key: ClassificationTemplateFieldsKeyField = ClassificationTemplateFieldsKeyField.BOX__SECURITY__CLASSIFICATION__KEY.value, + display_name: ClassificationTemplateFieldsDisplayNameField = ClassificationTemplateFieldsDisplayNameField.CLASSIFICATION.value, + hidden: Optional[bool] = None, + **kwargs + ): + """ + :param id: The unique ID of the field. + :type id: str + :param options: A list of classifications available in this enterprise. + :type options: List[ClassificationTemplateFieldsOptionsField] + :param type: The array item type., defaults to ClassificationTemplateFieldsTypeField.ENUM.value + :type type: ClassificationTemplateFieldsTypeField, optional + :param key: Defines classifications + available in the enterprise., defaults to ClassificationTemplateFieldsKeyField.BOX__SECURITY__CLASSIFICATION__KEY.value + :type key: ClassificationTemplateFieldsKeyField, optional + :param display_name: `Classification`, defaults to ClassificationTemplateFieldsDisplayNameField.CLASSIFICATION.value + :type display_name: ClassificationTemplateFieldsDisplayNameField, optional + :param hidden: Classifications are always visible to web and mobile users., defaults to None + :type hidden: Optional[bool], optional + """ + super().__init__(**kwargs) + self.id = id + self.options = options + self.type = type + self.key = key + self.display_name = display_name + self.hidden = hidden + + +class ClassificationTemplate(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'template_key': 'templateKey', + 'display_name': 'displayName', + 'copy_instance_on_item_copy': 'copyInstanceOnItemCopy', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'templateKey': 'template_key', + 'displayName': 'display_name', + 'copyInstanceOnItemCopy': 'copy_instance_on_item_copy', + **BaseObject._json_to_fields_mapping, + } + _discriminator = 'type', {'metadata_template'} + + def __init__( + self, + id: str, + scope: str, + fields: List[ClassificationTemplateFieldsField], + *, + type: ClassificationTemplateTypeField = ClassificationTemplateTypeField.METADATA_TEMPLATE.value, + template_key: ClassificationTemplateTemplateKeyField = ClassificationTemplateTemplateKeyField.SECURITYCLASSIFICATION_6VMVOCHWUWO.value, + display_name: ClassificationTemplateDisplayNameField = ClassificationTemplateDisplayNameField.CLASSIFICATION.value, + hidden: Optional[bool] = None, + copy_instance_on_item_copy: Optional[bool] = None, + **kwargs + ): + """ + :param id: The ID of the classification template. + :type id: str + :param scope: The scope of the classification template. This is in the format + `enterprise_{id}` where the `id` is the enterprise ID. + :type scope: str + :param fields: A list of fields for this classification template. This includes + only one field, the `Box__Security__Classification__Key`, which defines + the different classifications available in this enterprise. + :type fields: List[ClassificationTemplateFieldsField] + :param type: `metadata_template`, defaults to ClassificationTemplateTypeField.METADATA_TEMPLATE.value + :type type: ClassificationTemplateTypeField, optional + :param template_key: `securityClassification-6VMVochwUWo`, defaults to ClassificationTemplateTemplateKeyField.SECURITYCLASSIFICATION_6VMVOCHWUWO.value + :type template_key: ClassificationTemplateTemplateKeyField, optional + :param display_name: The name of this template as shown in web and mobile interfaces., defaults to ClassificationTemplateDisplayNameField.CLASSIFICATION.value + :type display_name: ClassificationTemplateDisplayNameField, optional + :param hidden: Determines if the + template is always available in web and mobile interfaces., defaults to None + :type hidden: Optional[bool], optional + :param copy_instance_on_item_copy: Determines if + classifications are + copied along when the file or folder is + copied., defaults to None + :type copy_instance_on_item_copy: Optional[bool], optional + """ + super().__init__(**kwargs) + self.id = id + self.scope = scope + self.fields = fields + self.type = type + self.template_key = template_key + self.display_name = display_name + self.hidden = hidden + self.copy_instance_on_item_copy = copy_instance_on_item_copy diff --git a/box_sdk_gen/schemas/client_error.py b/box_sdk_gen/schemas/client_error.py new file mode 100644 index 0000000..f51af01 --- /dev/null +++ b/box_sdk_gen/schemas/client_error.py @@ -0,0 +1,83 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class ClientErrorTypeField(str, Enum): + ERROR = 'error' + + +class ClientErrorCodeField(str, Enum): + CREATED = 'created' + ACCEPTED = 'accepted' + NO_CONTENT = 'no_content' + REDIRECT = 'redirect' + NOT_MODIFIED = 'not_modified' + BAD_REQUEST = 'bad_request' + UNAUTHORIZED = 'unauthorized' + FORBIDDEN = 'forbidden' + NOT_FOUND = 'not_found' + METHOD_NOT_ALLOWED = 'method_not_allowed' + CONFLICT = 'conflict' + PRECONDITION_FAILED = 'precondition_failed' + TOO_MANY_REQUESTS = 'too_many_requests' + INTERNAL_SERVER_ERROR = 'internal_server_error' + UNAVAILABLE = 'unavailable' + ITEM_NAME_INVALID = 'item_name_invalid' + INSUFFICIENT_SCOPE = 'insufficient_scope' + + +class ClientErrorContextInfoField(BaseObject): + def __init__(self, *, message: Optional[str] = None, **kwargs): + """ + :param message: More details on the error., defaults to None + :type message: Optional[str], optional + """ + super().__init__(**kwargs) + self.message = message + + +class ClientError(BaseObject): + _discriminator = 'type', {'error'} + + def __init__( + self, + *, + type: Optional[ClientErrorTypeField] = None, + status: Optional[int] = None, + code: Optional[ClientErrorCodeField] = None, + message: Optional[str] = None, + context_info: Optional[ClientErrorContextInfoField] = None, + help_url: Optional[str] = None, + request_id: Optional[str] = None, + **kwargs + ): + """ + :param type: error, defaults to None + :type type: Optional[ClientErrorTypeField], optional + :param status: The HTTP status of the response., defaults to None + :type status: Optional[int], optional + :param code: A Box-specific error code, defaults to None + :type code: Optional[ClientErrorCodeField], optional + :param message: A short message describing the error., defaults to None + :type message: Optional[str], optional + :param context_info: A free-form object that contains additional context + about the error. The possible fields are defined on + a per-endpoint basis. `message` is only one example., defaults to None + :type context_info: Optional[ClientErrorContextInfoField], optional + :param help_url: A URL that links to more information about why this error occurred., defaults to None + :type help_url: Optional[str], optional + :param request_id: A unique identifier for this response, which can be used + when contacting Box support., defaults to None + :type request_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.status = status + self.code = code + self.message = message + self.context_info = context_info + self.help_url = help_url + self.request_id = request_id diff --git a/box_sdk_gen/schemas/collaboration.py b/box_sdk_gen/schemas/collaboration.py new file mode 100644 index 0000000..d221352 --- /dev/null +++ b/box_sdk_gen/schemas/collaboration.py @@ -0,0 +1,213 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Union + +from box_sdk_gen.schemas.file import File + +from box_sdk_gen.schemas.folder import Folder + +from box_sdk_gen.schemas.web_link import WebLink + +from box_sdk_gen.schemas.user_collaborations import UserCollaborations + +from box_sdk_gen.schemas.group_mini import GroupMini + +from box_sdk_gen.schemas.terms_of_service_base import TermsOfServiceBase + +from box_sdk_gen.internal.utils import DateTime + + +class CollaborationTypeField(str, Enum): + COLLABORATION = 'collaboration' + + +class CollaborationRoleField(str, Enum): + EDITOR = 'editor' + VIEWER = 'viewer' + PREVIEWER = 'previewer' + UPLOADER = 'uploader' + PREVIEWER_UPLOADER = 'previewer uploader' + VIEWER_UPLOADER = 'viewer uploader' + CO_OWNER = 'co-owner' + OWNER = 'owner' + + +class CollaborationStatusField(str, Enum): + ACCEPTED = 'accepted' + PENDING = 'pending' + REJECTED = 'rejected' + + +class CollaborationAcceptanceRequirementsStatusTermsOfServiceRequirementField( + BaseObject +): + def __init__( + self, + *, + is_accepted: Optional[bool] = None, + terms_of_service: Optional[TermsOfServiceBase] = None, + **kwargs + ): + """ + :param is_accepted: Whether or not the terms of service have been accepted. The + field is `null` when there is no terms of service required., defaults to None + :type is_accepted: Optional[bool], optional + """ + super().__init__(**kwargs) + self.is_accepted = is_accepted + self.terms_of_service = terms_of_service + + +class CollaborationAcceptanceRequirementsStatusStrongPasswordRequirementField( + BaseObject +): + def __init__( + self, + *, + enterprise_has_strong_password_required_for_external_users: Optional[ + bool + ] = None, + user_has_strong_password: Optional[bool] = None, + **kwargs + ): + """ + :param enterprise_has_strong_password_required_for_external_users: Whether or not the enterprise that owns the content requires + a strong password to collaborate on the content., defaults to None + :type enterprise_has_strong_password_required_for_external_users: Optional[bool], optional + :param user_has_strong_password: Whether or not the user has a strong password set for their + account. The field is `null` when a strong password is not + required., defaults to None + :type user_has_strong_password: Optional[bool], optional + """ + super().__init__(**kwargs) + self.enterprise_has_strong_password_required_for_external_users = ( + enterprise_has_strong_password_required_for_external_users + ) + self.user_has_strong_password = user_has_strong_password + + +class CollaborationAcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField( + BaseObject +): + def __init__( + self, + *, + enterprise_has_two_factor_auth_enabled: Optional[bool] = None, + user_has_two_factor_authentication_enabled: Optional[bool] = None, + **kwargs + ): + """ + :param enterprise_has_two_factor_auth_enabled: Whether or not the enterprise that owns the content requires + two-factor authentication to be enabled in order to + collaborate on the content., defaults to None + :type enterprise_has_two_factor_auth_enabled: Optional[bool], optional + :param user_has_two_factor_authentication_enabled: Whether or not the user has two-factor authentication + enabled. The field is `null` when two-factor + authentication is not required., defaults to None + :type user_has_two_factor_authentication_enabled: Optional[bool], optional + """ + super().__init__(**kwargs) + self.enterprise_has_two_factor_auth_enabled = ( + enterprise_has_two_factor_auth_enabled + ) + self.user_has_two_factor_authentication_enabled = ( + user_has_two_factor_authentication_enabled + ) + + +class CollaborationAcceptanceRequirementsStatusField(BaseObject): + def __init__( + self, + *, + terms_of_service_requirement: Optional[ + CollaborationAcceptanceRequirementsStatusTermsOfServiceRequirementField + ] = None, + strong_password_requirement: Optional[ + CollaborationAcceptanceRequirementsStatusStrongPasswordRequirementField + ] = None, + two_factor_authentication_requirement: Optional[ + CollaborationAcceptanceRequirementsStatusTwoFactorAuthenticationRequirementField + ] = None, + **kwargs + ): + super().__init__(**kwargs) + self.terms_of_service_requirement = terms_of_service_requirement + self.strong_password_requirement = strong_password_requirement + self.two_factor_authentication_requirement = ( + two_factor_authentication_requirement + ) + + +class Collaboration(BaseObject): + _discriminator = 'type', {'collaboration'} + + def __init__( + self, + id: str, + *, + type: CollaborationTypeField = CollaborationTypeField.COLLABORATION.value, + item: Optional[Union[File, Folder, WebLink]] = None, + accessible_by: Optional[Union[UserCollaborations, GroupMini]] = None, + invite_email: Optional[str] = None, + role: Optional[CollaborationRoleField] = None, + expires_at: Optional[DateTime] = None, + is_access_only: Optional[bool] = None, + status: Optional[CollaborationStatusField] = None, + acknowledged_at: Optional[DateTime] = None, + created_by: Optional[UserCollaborations] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + acceptance_requirements_status: Optional[ + CollaborationAcceptanceRequirementsStatusField + ] = None, + **kwargs + ): + """ + :param id: The unique identifier for this collaboration. + :type id: str + :param type: `collaboration`, defaults to CollaborationTypeField.COLLABORATION.value + :type type: CollaborationTypeField, optional + :param invite_email: The email address used to invite an unregistered collaborator, if + they are not a registered user., defaults to None + :type invite_email: Optional[str], optional + :param role: The level of access granted., defaults to None + :type role: Optional[CollaborationRoleField], optional + :param expires_at: When the collaboration will expire, or `null` if no expiration + date is set., defaults to None + :type expires_at: Optional[DateTime], optional + :param is_access_only: If set to `true`, collaborators have access to + shared items, but such items won't be visible in the + All Files list. Additionally, collaborators won't + see the the path to the root folder for the + shared item., defaults to None + :type is_access_only: Optional[bool], optional + :param status: The status of the collaboration invitation. If the status + is `pending`, `login` and `name` return an empty string., defaults to None + :type status: Optional[CollaborationStatusField], optional + :param acknowledged_at: When the `status` of the collaboration object changed to + `accepted` or `rejected`., defaults to None + :type acknowledged_at: Optional[DateTime], optional + :param created_at: When the collaboration object was created., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the collaboration object was last modified., defaults to None + :type modified_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.item = item + self.accessible_by = accessible_by + self.invite_email = invite_email + self.role = role + self.expires_at = expires_at + self.is_access_only = is_access_only + self.status = status + self.acknowledged_at = acknowledged_at + self.created_by = created_by + self.created_at = created_at + self.modified_at = modified_at + self.acceptance_requirements_status = acceptance_requirements_status diff --git a/box_sdk_gen/schemas/collaboration_allowlist_entries.py b/box_sdk_gen/schemas/collaboration_allowlist_entries.py new file mode 100644 index 0000000..9dcc07a --- /dev/null +++ b/box_sdk_gen/schemas/collaboration_allowlist_entries.py @@ -0,0 +1,38 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.collaboration_allowlist_entry import ( + CollaborationAllowlistEntry, +) + + +class CollaborationAllowlistEntries(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[CollaborationAllowlistEntry]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of allowed collaboration domains, defaults to None + :type entries: Optional[List[CollaborationAllowlistEntry]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/collaboration_allowlist_entry.py b/box_sdk_gen/schemas/collaboration_allowlist_entry.py new file mode 100644 index 0000000..72ca67c --- /dev/null +++ b/box_sdk_gen/schemas/collaboration_allowlist_entry.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.internal.utils import DateTime + + +class CollaborationAllowlistEntryTypeField(str, Enum): + COLLABORATION_WHITELIST_ENTRY = 'collaboration_whitelist_entry' + + +class CollaborationAllowlistEntryDirectionField(str, Enum): + INBOUND = 'inbound' + OUTBOUND = 'outbound' + BOTH = 'both' + + +class CollaborationAllowlistEntryEnterpriseTypeField(str, Enum): + ENTERPRISE = 'enterprise' + + +class CollaborationAllowlistEntryEnterpriseField(BaseObject): + _discriminator = 'type', {'enterprise'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[CollaborationAllowlistEntryEnterpriseTypeField] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this enterprise., defaults to None + :type id: Optional[str], optional + :param type: `enterprise`, defaults to None + :type type: Optional[CollaborationAllowlistEntryEnterpriseTypeField], optional + :param name: The name of the enterprise, defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + + +class CollaborationAllowlistEntry(BaseObject): + _discriminator = 'type', {'collaboration_whitelist_entry'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[CollaborationAllowlistEntryTypeField] = None, + domain: Optional[str] = None, + direction: Optional[CollaborationAllowlistEntryDirectionField] = None, + enterprise: Optional[CollaborationAllowlistEntryEnterpriseField] = None, + created_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param id: The unique identifier for this entry, defaults to None + :type id: Optional[str], optional + :param type: `collaboration_whitelist_entry`, defaults to None + :type type: Optional[CollaborationAllowlistEntryTypeField], optional + :param domain: The whitelisted domain, defaults to None + :type domain: Optional[str], optional + :param direction: The direction of the collaborations to allow., defaults to None + :type direction: Optional[CollaborationAllowlistEntryDirectionField], optional + :param created_at: The time the entry was created at, defaults to None + :type created_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.domain = domain + self.direction = direction + self.enterprise = enterprise + self.created_at = created_at diff --git a/box_sdk_gen/schemas/collaboration_allowlist_exempt_target.py b/box_sdk_gen/schemas/collaboration_allowlist_exempt_target.py new file mode 100644 index 0000000..230d75f --- /dev/null +++ b/box_sdk_gen/schemas/collaboration_allowlist_exempt_target.py @@ -0,0 +1,75 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class CollaborationAllowlistExemptTargetTypeField(str, Enum): + COLLABORATION_WHITELIST_EXEMPT_TARGET = 'collaboration_whitelist_exempt_target' + + +class CollaborationAllowlistExemptTargetEnterpriseTypeField(str, Enum): + ENTERPRISE = 'enterprise' + + +class CollaborationAllowlistExemptTargetEnterpriseField(BaseObject): + _discriminator = 'type', {'enterprise'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[CollaborationAllowlistExemptTargetEnterpriseTypeField] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this enterprise., defaults to None + :type id: Optional[str], optional + :param type: `enterprise`, defaults to None + :type type: Optional[CollaborationAllowlistExemptTargetEnterpriseTypeField], optional + :param name: The name of the enterprise, defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + + +class CollaborationAllowlistExemptTarget(BaseObject): + _discriminator = 'type', {'collaboration_whitelist_exempt_target'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[CollaborationAllowlistExemptTargetTypeField] = None, + enterprise: Optional[CollaborationAllowlistExemptTargetEnterpriseField] = None, + user: Optional[UserMini] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param id: The unique identifier for this exemption, defaults to None + :type id: Optional[str], optional + :param type: `collaboration_whitelist_exempt_target`, defaults to None + :type type: Optional[CollaborationAllowlistExemptTargetTypeField], optional + :param created_at: The time the entry was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The time the entry was modified, defaults to None + :type modified_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.enterprise = enterprise + self.user = user + self.created_at = created_at + self.modified_at = modified_at diff --git a/box_sdk_gen/schemas/collaboration_allowlist_exempt_targets.py b/box_sdk_gen/schemas/collaboration_allowlist_exempt_targets.py new file mode 100644 index 0000000..ea9134f --- /dev/null +++ b/box_sdk_gen/schemas/collaboration_allowlist_exempt_targets.py @@ -0,0 +1,40 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.collaboration_allowlist_exempt_target import ( + CollaborationAllowlistExemptTarget, +) + + +class CollaborationAllowlistExemptTargets(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[CollaborationAllowlistExemptTarget]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of users exempt from any of the restrictions + imposed by the list of allowed collaboration domains + for this enterprise., defaults to None + :type entries: Optional[List[CollaborationAllowlistExemptTarget]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/collaborations.py b/box_sdk_gen/schemas/collaborations.py new file mode 100644 index 0000000..d14fd5c --- /dev/null +++ b/box_sdk_gen/schemas/collaborations.py @@ -0,0 +1,78 @@ +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.collaboration import Collaboration + + +class CollaborationsOrderDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class CollaborationsOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[str] = None, + direction: Optional[CollaborationsOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field to order by, defaults to None + :type by: Optional[str], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[CollaborationsOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class Collaborations(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + order: Optional[List[CollaborationsOrderField]] = None, + entries: Optional[List[Collaboration]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type offset: Optional[int], optional + :param order: The order by which items are returned. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type order: Optional[List[CollaborationsOrderField]], optional + :param entries: A list of collaborations, defaults to None + :type entries: Optional[List[Collaboration]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.order = order + self.entries = entries diff --git a/box_sdk_gen/schemas/collaborator_variable.py b/box_sdk_gen/schemas/collaborator_variable.py new file mode 100644 index 0000000..41badda --- /dev/null +++ b/box_sdk_gen/schemas/collaborator_variable.py @@ -0,0 +1,68 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + + +class CollaboratorVariableTypeField(str, Enum): + VARIABLE = 'variable' + + +class CollaboratorVariableVariableTypeField(str, Enum): + USER_LIST = 'user_list' + + +class CollaboratorVariableVariableValueTypeField(str, Enum): + USER = 'user' + + +class CollaboratorVariableVariableValueField(BaseObject): + _discriminator = 'type', {'user'} + + def __init__( + self, + id: str, + *, + type: CollaboratorVariableVariableValueTypeField = CollaboratorVariableVariableValueTypeField.USER.value, + **kwargs + ): + """ + :param id: User's ID. + :type id: str + :param type: The object type., defaults to CollaboratorVariableVariableValueTypeField.USER.value + :type type: CollaboratorVariableVariableValueTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class CollaboratorVariable(BaseObject): + _discriminator = 'type', {'variable'} + + def __init__( + self, + variable_value: List[CollaboratorVariableVariableValueField], + *, + type: CollaboratorVariableTypeField = CollaboratorVariableTypeField.VARIABLE.value, + variable_type: CollaboratorVariableVariableTypeField = CollaboratorVariableVariableTypeField.USER_LIST.value, + **kwargs + ): + """ + :param variable_value: A list of user IDs. + :type variable_value: List[CollaboratorVariableVariableValueField] + :param type: Collaborator + object type. + , defaults to CollaboratorVariableTypeField.VARIABLE.value + :type type: CollaboratorVariableTypeField, optional + :param variable_type: Variable type + for the Collaborator + object. + , defaults to CollaboratorVariableVariableTypeField.USER_LIST.value + :type variable_type: CollaboratorVariableVariableTypeField, optional + """ + super().__init__(**kwargs) + self.variable_value = variable_value + self.type = type + self.variable_type = variable_type diff --git a/box_sdk_gen/schemas/collection.py b/box_sdk_gen/schemas/collection.py new file mode 100644 index 0000000..e65fdf3 --- /dev/null +++ b/box_sdk_gen/schemas/collection.py @@ -0,0 +1,48 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class CollectionTypeField(str, Enum): + COLLECTION = 'collection' + + +class CollectionNameField(str, Enum): + FAVORITES = 'Favorites' + + +class CollectionCollectionTypeField(str, Enum): + FAVORITES = 'favorites' + + +class Collection(BaseObject): + _discriminator = 'type', {'collection'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[CollectionTypeField] = None, + name: Optional[CollectionNameField] = None, + collection_type: Optional[CollectionCollectionTypeField] = None, + **kwargs + ): + """ + :param id: The unique identifier for this collection., defaults to None + :type id: Optional[str], optional + :param type: `collection`, defaults to None + :type type: Optional[CollectionTypeField], optional + :param name: The name of the collection., defaults to None + :type name: Optional[CollectionNameField], optional + :param collection_type: The type of the collection. This is used to + determine the proper visual treatment for + collections., defaults to None + :type collection_type: Optional[CollectionCollectionTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + self.collection_type = collection_type diff --git a/box_sdk_gen/schemas/collections.py b/box_sdk_gen/schemas/collections.py new file mode 100644 index 0000000..c037517 --- /dev/null +++ b/box_sdk_gen/schemas/collections.py @@ -0,0 +1,78 @@ +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.collection import Collection + + +class CollectionsOrderDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class CollectionsOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[str] = None, + direction: Optional[CollectionsOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field to order by, defaults to None + :type by: Optional[str], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[CollectionsOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class Collections(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + order: Optional[List[CollectionsOrderField]] = None, + entries: Optional[List[Collection]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type offset: Optional[int], optional + :param order: The order by which items are returned. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type order: Optional[List[CollectionsOrderField]], optional + :param entries: A list of collections, defaults to None + :type entries: Optional[List[Collection]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.order = order + self.entries = entries diff --git a/box_sdk_gen/schemas/comment.py b/box_sdk_gen/schemas/comment.py new file mode 100644 index 0000000..b848834 --- /dev/null +++ b/box_sdk_gen/schemas/comment.py @@ -0,0 +1,64 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.comment_base import CommentBaseTypeField + +from box_sdk_gen.schemas.comment_base import CommentBase + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class CommentItemField(BaseObject): + def __init__( + self, *, id: Optional[str] = None, type: Optional[str] = None, **kwargs + ): + """ + :param id: The unique identifier for this object, defaults to None + :type id: Optional[str], optional + :param type: The type for this object, defaults to None + :type type: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class Comment(CommentBase): + def __init__( + self, + *, + is_reply_comment: Optional[bool] = None, + message: Optional[str] = None, + created_by: Optional[UserMini] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + item: Optional[CommentItemField] = None, + id: Optional[str] = None, + type: Optional[CommentBaseTypeField] = None, + **kwargs + ): + """ + :param is_reply_comment: Whether or not this comment is a reply to another + comment, defaults to None + :type is_reply_comment: Optional[bool], optional + :param message: The text of the comment, as provided by the user, defaults to None + :type message: Optional[str], optional + :param created_at: The time this comment was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The time this comment was last modified, defaults to None + :type modified_at: Optional[DateTime], optional + :param id: The unique identifier for this comment., defaults to None + :type id: Optional[str], optional + :param type: `comment`, defaults to None + :type type: Optional[CommentBaseTypeField], optional + """ + super().__init__(id=id, type=type, **kwargs) + self.is_reply_comment = is_reply_comment + self.message = message + self.created_by = created_by + self.created_at = created_at + self.modified_at = modified_at + self.item = item diff --git a/box_sdk_gen/schemas/comment_base.py b/box_sdk_gen/schemas/comment_base.py new file mode 100644 index 0000000..8ee753d --- /dev/null +++ b/box_sdk_gen/schemas/comment_base.py @@ -0,0 +1,30 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class CommentBaseTypeField(str, Enum): + COMMENT = 'comment' + + +class CommentBase(BaseObject): + _discriminator = 'type', {'comment'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[CommentBaseTypeField] = None, + **kwargs + ): + """ + :param id: The unique identifier for this comment., defaults to None + :type id: Optional[str], optional + :param type: `comment`, defaults to None + :type type: Optional[CommentBaseTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/comment_full.py b/box_sdk_gen/schemas/comment_full.py new file mode 100644 index 0000000..1443291 --- /dev/null +++ b/box_sdk_gen/schemas/comment_full.py @@ -0,0 +1,62 @@ +from typing import Optional + +from box_sdk_gen.schemas.comment_base import CommentBaseTypeField + +from box_sdk_gen.schemas.comment_base import CommentBase + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + +from box_sdk_gen.schemas.comment import CommentItemField + +from box_sdk_gen.schemas.comment import Comment + + +class CommentFull(Comment): + def __init__( + self, + *, + tagged_message: Optional[str] = None, + is_reply_comment: Optional[bool] = None, + message: Optional[str] = None, + created_by: Optional[UserMini] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + item: Optional[CommentItemField] = None, + id: Optional[str] = None, + type: Optional[CommentBaseTypeField] = None, + **kwargs + ): + """ + :param tagged_message: The string representing the comment text with + @mentions included. @mention format is @[id:username] + where `id` is user's Box ID and `username` is + their display name., defaults to None + :type tagged_message: Optional[str], optional + :param is_reply_comment: Whether or not this comment is a reply to another + comment, defaults to None + :type is_reply_comment: Optional[bool], optional + :param message: The text of the comment, as provided by the user, defaults to None + :type message: Optional[str], optional + :param created_at: The time this comment was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The time this comment was last modified, defaults to None + :type modified_at: Optional[DateTime], optional + :param id: The unique identifier for this comment., defaults to None + :type id: Optional[str], optional + :param type: `comment`, defaults to None + :type type: Optional[CommentBaseTypeField], optional + """ + super().__init__( + is_reply_comment=is_reply_comment, + message=message, + created_by=created_by, + created_at=created_at, + modified_at=modified_at, + item=item, + id=id, + type=type, + **kwargs + ) + self.tagged_message = tagged_message diff --git a/box_sdk_gen/schemas/comments.py b/box_sdk_gen/schemas/comments.py new file mode 100644 index 0000000..b69c3f7 --- /dev/null +++ b/box_sdk_gen/schemas/comments.py @@ -0,0 +1,78 @@ +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.comment_full import CommentFull + + +class CommentsOrderDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class CommentsOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[str] = None, + direction: Optional[CommentsOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field to order by, defaults to None + :type by: Optional[str], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[CommentsOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class Comments(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + order: Optional[List[CommentsOrderField]] = None, + entries: Optional[List[CommentFull]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type offset: Optional[int], optional + :param order: The order by which items are returned. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type order: Optional[List[CommentsOrderField]], optional + :param entries: A list of comments, defaults to None + :type entries: Optional[List[CommentFull]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.order = order + self.entries = entries diff --git a/box_sdk_gen/schemas/completion_rule_variable.py b/box_sdk_gen/schemas/completion_rule_variable.py new file mode 100644 index 0000000..63a4d05 --- /dev/null +++ b/box_sdk_gen/schemas/completion_rule_variable.py @@ -0,0 +1,49 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class CompletionRuleVariableTypeField(str, Enum): + VARIABLE = 'variable' + + +class CompletionRuleVariableVariableTypeField(str, Enum): + TASK_COMPLETION_RULE = 'task_completion_rule' + + +class CompletionRuleVariableVariableValueField(str, Enum): + ALL_ASSIGNEES = 'all_assignees' + ANY_ASSIGNEES = 'any_assignees' + + +class CompletionRuleVariable(BaseObject): + _discriminator = 'type', {'variable'} + + def __init__( + self, + variable_value: CompletionRuleVariableVariableValueField, + *, + type: CompletionRuleVariableTypeField = CompletionRuleVariableTypeField.VARIABLE.value, + variable_type: CompletionRuleVariableVariableTypeField = CompletionRuleVariableVariableTypeField.TASK_COMPLETION_RULE.value, + **kwargs + ): + """ + :param variable_value: Variable + values for a completion + rule. + + :type variable_value: CompletionRuleVariableVariableValueField + :param type: Completion + Rule object type. + , defaults to CompletionRuleVariableTypeField.VARIABLE.value + :type type: CompletionRuleVariableTypeField, optional + :param variable_type: Variable type + for the Completion + Rule object. + , defaults to CompletionRuleVariableVariableTypeField.TASK_COMPLETION_RULE.value + :type variable_type: CompletionRuleVariableVariableTypeField, optional + """ + super().__init__(**kwargs) + self.variable_value = variable_value + self.type = type + self.variable_type = variable_type diff --git a/box_sdk_gen/schemas/conflict_error.py b/box_sdk_gen/schemas/conflict_error.py new file mode 100644 index 0000000..602bd05 --- /dev/null +++ b/box_sdk_gen/schemas/conflict_error.py @@ -0,0 +1,69 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.client_error import ClientErrorTypeField + +from box_sdk_gen.schemas.client_error import ClientErrorCodeField + +from box_sdk_gen.schemas.client_error import ClientErrorContextInfoField + +from box_sdk_gen.schemas.client_error import ClientError + +from box_sdk_gen.schemas.file_conflict import FileConflict + + +class ConflictErrorContextInfoField(BaseObject): + def __init__(self, *, conflicts: Optional[List[FileConflict]] = None, **kwargs): + """ + :param conflicts: A list of the file conflicts that caused this error., defaults to None + :type conflicts: Optional[List[FileConflict]], optional + """ + super().__init__(**kwargs) + self.conflicts = conflicts + + +class ConflictError(ClientError): + def __init__( + self, + *, + type: Optional[ClientErrorTypeField] = None, + status: Optional[int] = None, + code: Optional[ClientErrorCodeField] = None, + message: Optional[str] = None, + context_info: Optional[ClientErrorContextInfoField] = None, + help_url: Optional[str] = None, + request_id: Optional[str] = None, + **kwargs + ): + """ + :param type: error, defaults to None + :type type: Optional[ClientErrorTypeField], optional + :param status: The HTTP status of the response., defaults to None + :type status: Optional[int], optional + :param code: A Box-specific error code, defaults to None + :type code: Optional[ClientErrorCodeField], optional + :param message: A short message describing the error., defaults to None + :type message: Optional[str], optional + :param context_info: A free-form object that contains additional context + about the error. The possible fields are defined on + a per-endpoint basis. `message` is only one example., defaults to None + :type context_info: Optional[ClientErrorContextInfoField], optional + :param help_url: A URL that links to more information about why this error occurred., defaults to None + :type help_url: Optional[str], optional + :param request_id: A unique identifier for this response, which can be used + when contacting Box support., defaults to None + :type request_id: Optional[str], optional + """ + super().__init__( + type=type, + status=status, + code=code, + message=message, + context_info=context_info, + help_url=help_url, + request_id=request_id, + **kwargs + ) diff --git a/box_sdk_gen/schemas/device_pinner.py b/box_sdk_gen/schemas/device_pinner.py new file mode 100644 index 0000000..c2a98d2 --- /dev/null +++ b/box_sdk_gen/schemas/device_pinner.py @@ -0,0 +1,38 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.user_mini import UserMini + + +class DevicePinnerTypeField(str, Enum): + DEVICE_PINNER = 'device_pinner' + + +class DevicePinner(BaseObject): + _discriminator = 'type', {'device_pinner'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[DevicePinnerTypeField] = None, + owned_by: Optional[UserMini] = None, + product_name: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this device pin., defaults to None + :type id: Optional[str], optional + :param type: `device_pinner`, defaults to None + :type type: Optional[DevicePinnerTypeField], optional + :param product_name: The type of device being pinned, defaults to None + :type product_name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.owned_by = owned_by + self.product_name = product_name diff --git a/box_sdk_gen/schemas/device_pinners.py b/box_sdk_gen/schemas/device_pinners.py new file mode 100644 index 0000000..cea747f --- /dev/null +++ b/box_sdk_gen/schemas/device_pinners.py @@ -0,0 +1,66 @@ +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.device_pinner import DevicePinner + + +class DevicePinnersOrderByField(str, Enum): + ID = 'id' + + +class DevicePinnersOrderDirectionField(str, Enum): + ASC = 'asc' + DESC = 'desc' + + +class DevicePinnersOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[DevicePinnersOrderByField] = None, + direction: Optional[DevicePinnersOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field that is ordered by, defaults to None + :type by: Optional[DevicePinnersOrderByField], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[DevicePinnersOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class DevicePinners(BaseObject): + def __init__( + self, + *, + entries: Optional[List[DevicePinner]] = None, + limit: Optional[int] = None, + next_marker: Optional[int] = None, + order: Optional[List[DevicePinnersOrderField]] = None, + **kwargs + ): + """ + :param entries: A list of device pins, defaults to None + :type entries: Optional[List[DevicePinner]], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed., 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[int], optional + :param order: The order by which items are returned., defaults to None + :type order: Optional[List[DevicePinnersOrderField]], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker + self.order = order diff --git a/box_sdk_gen/schemas/email_alias.py b/box_sdk_gen/schemas/email_alias.py new file mode 100644 index 0000000..6c686fd --- /dev/null +++ b/box_sdk_gen/schemas/email_alias.py @@ -0,0 +1,38 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class EmailAliasTypeField(str, Enum): + EMAIL_ALIAS = 'email_alias' + + +class EmailAlias(BaseObject): + _discriminator = 'type', {'email_alias'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[EmailAliasTypeField] = None, + email: Optional[str] = None, + is_confirmed: Optional[bool] = None, + **kwargs + ): + """ + :param id: The unique identifier for this object, defaults to None + :type id: Optional[str], optional + :param type: `email_alias`, defaults to None + :type type: Optional[EmailAliasTypeField], optional + :param email: The email address, defaults to None + :type email: Optional[str], optional + :param is_confirmed: Whether the email address has been confirmed, defaults to None + :type is_confirmed: Optional[bool], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.email = email + self.is_confirmed = is_confirmed diff --git a/box_sdk_gen/schemas/email_aliases.py b/box_sdk_gen/schemas/email_aliases.py new file mode 100644 index 0000000..88afc91 --- /dev/null +++ b/box_sdk_gen/schemas/email_aliases.py @@ -0,0 +1,26 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.email_alias import EmailAlias + + +class EmailAliases(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + entries: Optional[List[EmailAlias]] = None, + **kwargs + ): + """ + :param total_count: The number of email aliases., defaults to None + :type total_count: Optional[int], optional + :param entries: A list of email aliases, defaults to None + :type entries: Optional[List[EmailAlias]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries diff --git a/box_sdk_gen/schemas/enterprise_base.py b/box_sdk_gen/schemas/enterprise_base.py new file mode 100644 index 0000000..daa8ba6 --- /dev/null +++ b/box_sdk_gen/schemas/enterprise_base.py @@ -0,0 +1,30 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class EnterpriseBaseTypeField(str, Enum): + ENTERPRISE = 'enterprise' + + +class EnterpriseBase(BaseObject): + _discriminator = 'type', {'enterprise'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[EnterpriseBaseTypeField] = None, + **kwargs + ): + """ + :param id: The unique identifier for this enterprise, defaults to None + :type id: Optional[str], optional + :param type: `enterprise`, defaults to None + :type type: Optional[EnterpriseBaseTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/event.py b/box_sdk_gen/schemas/event.py new file mode 100644 index 0000000..ad208f3 --- /dev/null +++ b/box_sdk_gen/schemas/event.py @@ -0,0 +1,227 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Optional + +from typing import Union + +from typing import Dict + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.schemas.user import User + +from box_sdk_gen.schemas.event_source import EventSource + +from box_sdk_gen.schemas.file import File + +from box_sdk_gen.schemas.folder import Folder + +from box_sdk_gen.internal.utils import DateTime + + +class EventEventTypeField(str, Enum): + ACCESS_GRANTED = 'ACCESS_GRANTED' + ACCESS_REVOKED = 'ACCESS_REVOKED' + ADD_DEVICE_ASSOCIATION = 'ADD_DEVICE_ASSOCIATION' + ADD_LOGIN_ACTIVITY_DEVICE = 'ADD_LOGIN_ACTIVITY_DEVICE' + ADMIN_LOGIN = 'ADMIN_LOGIN' + APPLICATION_CREATED = 'APPLICATION_CREATED' + APPLICATION_PUBLIC_KEY_ADDED = 'APPLICATION_PUBLIC_KEY_ADDED' + APPLICATION_PUBLIC_KEY_DELETED = 'APPLICATION_PUBLIC_KEY_DELETED' + CHANGE_ADMIN_ROLE = 'CHANGE_ADMIN_ROLE' + CHANGE_FOLDER_PERMISSION = 'CHANGE_FOLDER_PERMISSION' + COLLABORATION_ACCEPT = 'COLLABORATION_ACCEPT' + COLLABORATION_EXPIRATION = 'COLLABORATION_EXPIRATION' + COLLABORATION_INVITE = 'COLLABORATION_INVITE' + COLLABORATION_REMOVE = 'COLLABORATION_REMOVE' + COLLABORATION_ROLE_CHANGE = 'COLLABORATION_ROLE_CHANGE' + COLLAB_ADD_COLLABORATOR = 'COLLAB_ADD_COLLABORATOR' + COLLAB_INVITE_COLLABORATOR = 'COLLAB_INVITE_COLLABORATOR' + COLLAB_REMOVE_COLLABORATOR = 'COLLAB_REMOVE_COLLABORATOR' + COLLAB_ROLE_CHANGE = 'COLLAB_ROLE_CHANGE' + COMMENT_CREATE = 'COMMENT_CREATE' + COMMENT_DELETE = 'COMMENT_DELETE' + CONTENT_ACCESS = 'CONTENT_ACCESS' + CONTENT_WORKFLOW_ABNORMAL_DOWNLOAD_ACTIVITY = ( + 'CONTENT_WORKFLOW_ABNORMAL_DOWNLOAD_ACTIVITY' + ) + CONTENT_WORKFLOW_AUTOMATION_ADD = 'CONTENT_WORKFLOW_AUTOMATION_ADD' + CONTENT_WORKFLOW_AUTOMATION_DELETE = 'CONTENT_WORKFLOW_AUTOMATION_DELETE' + CONTENT_WORKFLOW_POLICY_ADD = 'CONTENT_WORKFLOW_POLICY_ADD' + CONTENT_WORKFLOW_SHARING_POLICY_VIOLATION = ( + 'CONTENT_WORKFLOW_SHARING_POLICY_VIOLATION' + ) + CONTENT_WORKFLOW_UPLOAD_POLICY_VIOLATION = ( + 'CONTENT_WORKFLOW_UPLOAD_POLICY_VIOLATION' + ) + COPY = 'COPY' + DATA_RETENTION_CREATE_RETENTION = 'DATA_RETENTION_CREATE_RETENTION' + DATA_RETENTION_REMOVE_RETENTION = 'DATA_RETENTION_REMOVE_RETENTION' + DELETE = 'DELETE' + DELETE_USER = 'DELETE_USER' + DEVICE_TRUST_CHECK_FAILED = 'DEVICE_TRUST_CHECK_FAILED' + DOWNLOAD = 'DOWNLOAD' + EDIT = 'EDIT' + EDIT_USER = 'EDIT_USER' + EMAIL_ALIAS_CONFIRM = 'EMAIL_ALIAS_CONFIRM' + EMAIL_ALIAS_REMOVE = 'EMAIL_ALIAS_REMOVE' + ENABLE_TWO_FACTOR_AUTH = 'ENABLE_TWO_FACTOR_AUTH' + ENTERPRISE_APP_AUTHORIZATION_UPDATE = 'ENTERPRISE_APP_AUTHORIZATION_UPDATE' + FAILED_LOGIN = 'FAILED_LOGIN' + FILE_MARKED_MALICIOUS = 'FILE_MARKED_MALICIOUS' + FILE_WATERMARKED_DOWNLOAD = 'FILE_WATERMARKED_DOWNLOAD' + GROUP_ADD_ITEM = 'GROUP_ADD_ITEM' + GROUP_ADD_USER = 'GROUP_ADD_USER' + GROUP_CREATION = 'GROUP_CREATION' + GROUP_DELETION = 'GROUP_DELETION' + GROUP_EDITED = 'GROUP_EDITED' + GROUP_REMOVE_ITEM = 'GROUP_REMOVE_ITEM' + GROUP_REMOVE_USER = 'GROUP_REMOVE_USER' + ITEM_COPY = 'ITEM_COPY' + ITEM_CREATE = 'ITEM_CREATE' + ITEM_DOWNLOAD = 'ITEM_DOWNLOAD' + ITEM_EMAIL_SEND = 'ITEM_EMAIL_SEND' + ITEM_MAKE_CURRENT_VERSION = 'ITEM_MAKE_CURRENT_VERSION' + ITEM_MODIFY = 'ITEM_MODIFY' + ITEM_MOVE = 'ITEM_MOVE' + ITEM_OPEN = 'ITEM_OPEN' + ITEM_PREVIEW = 'ITEM_PREVIEW' + ITEM_RENAME = 'ITEM_RENAME' + ITEM_SHARED = 'ITEM_SHARED' + ITEM_SHARED_CREATE = 'ITEM_SHARED_CREATE' + ITEM_SHARED_UNSHARE = 'ITEM_SHARED_UNSHARE' + ITEM_SHARED_UPDATE = 'ITEM_SHARED_UPDATE' + ITEM_SYNC = 'ITEM_SYNC' + ITEM_TRASH = 'ITEM_TRASH' + ITEM_UNDELETE_VIA_TRASH = 'ITEM_UNDELETE_VIA_TRASH' + ITEM_UNSYNC = 'ITEM_UNSYNC' + ITEM_UPLOAD = 'ITEM_UPLOAD' + LEGAL_HOLD_ASSIGNMENT_CREATE = 'LEGAL_HOLD_ASSIGNMENT_CREATE' + LEGAL_HOLD_ASSIGNMENT_DELETE = 'LEGAL_HOLD_ASSIGNMENT_DELETE' + LEGAL_HOLD_POLICY_CREATE = 'LEGAL_HOLD_POLICY_CREATE' + LEGAL_HOLD_POLICY_DELETE = 'LEGAL_HOLD_POLICY_DELETE' + LEGAL_HOLD_POLICY_UPDATE = 'LEGAL_HOLD_POLICY_UPDATE' + LOCK = 'LOCK' + LOCK_CREATE = 'LOCK_CREATE' + LOCK_DESTROY = 'LOCK_DESTROY' + LOGIN = 'LOGIN' + MASTER_INVITE_ACCEPT = 'MASTER_INVITE_ACCEPT' + MASTER_INVITE_REJECT = 'MASTER_INVITE_REJECT' + METADATA_INSTANCE_CREATE = 'METADATA_INSTANCE_CREATE' + METADATA_INSTANCE_DELETE = 'METADATA_INSTANCE_DELETE' + METADATA_INSTANCE_UPDATE = 'METADATA_INSTANCE_UPDATE' + METADATA_TEMPLATE_CREATE = 'METADATA_TEMPLATE_CREATE' + METADATA_TEMPLATE_DELETE = 'METADATA_TEMPLATE_DELETE' + METADATA_TEMPLATE_UPDATE = 'METADATA_TEMPLATE_UPDATE' + MOVE = 'MOVE' + NEW_USER = 'NEW_USER' + PREVIEW = 'PREVIEW' + REMOVE_DEVICE_ASSOCIATION = 'REMOVE_DEVICE_ASSOCIATION' + REMOVE_LOGIN_ACTIVITY_DEVICE = 'REMOVE_LOGIN_ACTIVITY_DEVICE' + RENAME = 'RENAME' + RETENTION_POLICY_ASSIGNMENT_ADD = 'RETENTION_POLICY_ASSIGNMENT_ADD' + SHARE = 'SHARE' + SHARED_LINK_SEND = 'SHARED_LINK_SEND' + SHARE_EXPIRATION = 'SHARE_EXPIRATION' + SHIELD_ALERT = 'SHIELD_ALERT' + SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED = 'SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED' + SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION = ( + 'SHIELD_EXTERNAL_COLLAB_ACCESS_BLOCKED_MISSING_JUSTIFICATION' + ) + 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_JUSTIFICATION_APPROVAL = 'SHIELD_JUSTIFICATION_APPROVAL' + SHIELD_SHARED_LINK_ACCESS_BLOCKED = 'SHIELD_SHARED_LINK_ACCESS_BLOCKED' + SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_CREATE = ( + 'SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_CREATE' + ) + SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_UPDATE = ( + 'SHIELD_SHARED_LINK_STATUS_RESTRICTED_ON_UPDATE' + ) + SIGN_DOCUMENT_ASSIGNED = 'SIGN_DOCUMENT_ASSIGNED' + SIGN_DOCUMENT_CANCELLED = 'SIGN_DOCUMENT_CANCELLED' + SIGN_DOCUMENT_COMPLETED = 'SIGN_DOCUMENT_COMPLETED' + SIGN_DOCUMENT_CONVERTED = 'SIGN_DOCUMENT_CONVERTED' + SIGN_DOCUMENT_CREATED = 'SIGN_DOCUMENT_CREATED' + SIGN_DOCUMENT_DECLINED = 'SIGN_DOCUMENT_DECLINED' + SIGN_DOCUMENT_EXPIRED = 'SIGN_DOCUMENT_EXPIRED' + SIGN_DOCUMENT_SIGNED = 'SIGN_DOCUMENT_SIGNED' + SIGN_DOCUMENT_VIEWED_BY_SIGNED = 'SIGN_DOCUMENT_VIEWED_BY_SIGNED' + SIGNER_DOWNLOADED = 'SIGNER_DOWNLOADED' + SIGNER_FORWARDED = 'SIGNER_FORWARDED' + STORAGE_EXPIRATION = 'STORAGE_EXPIRATION' + TAG_ITEM_CREATE = 'TAG_ITEM_CREATE' + TASK_ASSIGNMENT_CREATE = 'TASK_ASSIGNMENT_CREATE' + TASK_ASSIGNMENT_DELETE = 'TASK_ASSIGNMENT_DELETE' + TASK_ASSIGNMENT_UPDATE = 'TASK_ASSIGNMENT_UPDATE' + TASK_CREATE = 'TASK_CREATE' + TASK_UPDATE = 'TASK_UPDATE' + TERMS_OF_SERVICE_ACCEPT = 'TERMS_OF_SERVICE_ACCEPT' + TERMS_OF_SERVICE_REJECT = 'TERMS_OF_SERVICE_REJECT' + UNDELETE = 'UNDELETE' + UNLOCK = 'UNLOCK' + UNSHARE = 'UNSHARE' + UPDATE_COLLABORATION_EXPIRATION = 'UPDATE_COLLABORATION_EXPIRATION' + UPDATE_SHARE_EXPIRATION = 'UPDATE_SHARE_EXPIRATION' + UPLOAD = 'UPLOAD' + USER_AUTHENTICATE_OAUTH2_ACCESS_TOKEN_CREATE = ( + 'USER_AUTHENTICATE_OAUTH2_ACCESS_TOKEN_CREATE' + ) + WATERMARK_LABEL_CREATE = 'WATERMARK_LABEL_CREATE' + WATERMARK_LABEL_DELETE = 'WATERMARK_LABEL_DELETE' + + +class EventAdditionalDetailsField(BaseObject): + def __init__(self, **kwargs): + super().__init__(**kwargs) + + +class Event(BaseObject): + def __init__( + self, + *, + type: Optional[str] = None, + created_at: Optional[DateTime] = None, + recorded_at: Optional[DateTime] = None, + event_id: Optional[str] = None, + created_by: Optional[UserMini] = None, + event_type: Optional[EventEventTypeField] = None, + session_id: Optional[str] = None, + source: Optional[Union[User, EventSource, File, Folder, Dict]] = None, + additional_details: Optional[EventAdditionalDetailsField] = None, + **kwargs + ): + """ + :param type: `event`, defaults to None + :type type: Optional[str], optional + :param created_at: When the event object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param recorded_at: When the event object was recorded in database, defaults to None + :type recorded_at: Optional[DateTime], optional + :param event_id: The ID of the event object. You can use this to detect duplicate events, defaults to None + :type event_id: Optional[str], optional + :param session_id: The session of the user that performed the action. Not all events will + populate this attribute., defaults to None + :type session_id: Optional[str], optional + :param additional_details: This object provides additional information about the event if available. + + This can include how a user performed an event as well as additional + information to correlate an event to external KeySafe logs. Not all events + have an `additional_details` object. This object is only available in the + Enterprise Events., defaults to None + :type additional_details: Optional[EventAdditionalDetailsField], optional + """ + super().__init__(**kwargs) + self.type = type + self.created_at = created_at + self.recorded_at = recorded_at + self.event_id = event_id + self.created_by = created_by + self.event_type = event_type + self.session_id = session_id + self.source = source + self.additional_details = additional_details diff --git a/box_sdk_gen/schemas/event_source.py b/box_sdk_gen/schemas/event_source.py new file mode 100644 index 0000000..79ec05f --- /dev/null +++ b/box_sdk_gen/schemas/event_source.py @@ -0,0 +1,64 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_mini import UserMini + + +class EventSourceItemTypeField(str, Enum): + FILE = 'file' + FOLDER = 'folder' + + +class EventSourceClassificationField(BaseObject): + def __init__(self, *, name: Optional[str] = None, **kwargs): + """ + :param name: The classification's name, defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.name = name + + +class EventSource(BaseObject): + _discriminator = 'item_type', {'file', 'folder'} + + def __init__( + self, + item_type: EventSourceItemTypeField, + item_id: str, + item_name: str, + *, + classification: Optional[EventSourceClassificationField] = None, + parent: Optional[FolderMini] = None, + owned_by: Optional[UserMini] = None, + **kwargs + ): + """ + :param item_type: The type of the item that the event + represents. Can be `file` or `folder`. + + :type item_type: EventSourceItemTypeField + :param item_id: The unique identifier that represents the + item. + + :type item_id: str + :param item_name: The name of the item. + + :type item_name: str + :param classification: The object containing classification information for the item that + triggered the event. This field will not appear if the item does not + have a classification set., defaults to None + :type classification: Optional[EventSourceClassificationField], optional + """ + super().__init__(**kwargs) + self.item_type = item_type + self.item_id = item_id + self.item_name = item_name + self.classification = classification + self.parent = parent + self.owned_by = owned_by diff --git a/box_sdk_gen/schemas/events.py b/box_sdk_gen/schemas/events.py new file mode 100644 index 0000000..0417901 --- /dev/null +++ b/box_sdk_gen/schemas/events.py @@ -0,0 +1,31 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.event import Event + + +class Events(BaseObject): + def __init__( + self, + *, + chunk_size: Optional[int] = None, + next_stream_position: Optional[str] = None, + entries: Optional[List[Event]] = None, + **kwargs + ): + """ + :param chunk_size: The number of events returned in this response., defaults to None + :type chunk_size: Optional[int], optional + :param next_stream_position: The stream position of the start of the next page (chunk) + of events., defaults to None + :type next_stream_position: Optional[str], optional + :param entries: A list of events, defaults to None + :type entries: Optional[List[Event]], optional + """ + super().__init__(**kwargs) + self.chunk_size = chunk_size + self.next_stream_position = next_stream_position + self.entries = entries diff --git a/box_sdk_gen/schemas/file.py b/box_sdk_gen/schemas/file.py new file mode 100644 index 0000000..4e190d0 --- /dev/null +++ b/box_sdk_gen/schemas/file.py @@ -0,0 +1,274 @@ +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from enum import Enum + +from typing import Optional + +from box_sdk_gen.schemas.file_base import FileBaseTypeField + +from box_sdk_gen.schemas.file_base import FileBase + +from box_sdk_gen.schemas.file_version_mini import FileVersionMini + +from box_sdk_gen.schemas.file_mini import FileMini + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class FilePathCollectionField(BaseObject): + def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): + """ + :param total_count: The number of folders in this list. + :type total_count: int + :param entries: The parent folders for this item + :type entries: List[FolderMini] + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries + + +class FileSharedLinkAccessField(str, Enum): + OPEN = 'open' + COMPANY = 'company' + COLLABORATORS = 'collaborators' + + +class FileSharedLinkEffectiveAccessField(str, Enum): + OPEN = 'open' + COMPANY = 'company' + COLLABORATORS = 'collaborators' + + +class FileSharedLinkEffectivePermissionField(str, Enum): + CAN_EDIT = 'can_edit' + CAN_DOWNLOAD = 'can_download' + CAN_PREVIEW = 'can_preview' + NO_ACCESS = 'no_access' + + +class FileSharedLinkPermissionsField(BaseObject): + def __init__(self, can_download: bool, can_preview: bool, can_edit: bool, **kwargs): + """ + :param can_download: Defines if the shared link allows for the item to be downloaded. For + shared links on folders, this also applies to any items in the folder. + + This value can be set to `true` when the effective access level is + set to `open` or `company`, not `collaborators`. + :type can_download: bool + :param can_preview: Defines if the shared link allows for the item to be previewed. + + This value is always `true`. For shared links on folders this also + applies to any items in the folder. + :type can_preview: bool + :param can_edit: Defines if the shared link allows for the item to be edited. + + This value can only be `true` if `can_download` is also `true` and if + the item has a type of `file`. + :type can_edit: bool + """ + super().__init__(**kwargs) + self.can_download = can_download + self.can_preview = can_preview + self.can_edit = can_edit + + +class FileSharedLinkField(BaseObject): + def __init__( + self, + url: str, + effective_access: FileSharedLinkEffectiveAccessField, + effective_permission: FileSharedLinkEffectivePermissionField, + is_password_enabled: bool, + download_count: int, + preview_count: int, + *, + download_url: Optional[str] = None, + vanity_url: Optional[str] = None, + vanity_name: Optional[str] = None, + access: Optional[FileSharedLinkAccessField] = None, + unshared_at: Optional[DateTime] = None, + permissions: Optional[FileSharedLinkPermissionsField] = None, + **kwargs + ): + """ + :param url: The URL that can be used to access the item on Box. + + This URL will display the item in Box's preview UI where the file + can be downloaded if allowed. + + This URL will continue to work even when a custom `vanity_url` + has been set for this shared link. + :type url: str + :param effective_access: The effective access level for the shared link. This can be a more + restrictive access level than the value in the `access` field when the + enterprise settings restrict the allowed access levels. + :type effective_access: FileSharedLinkEffectiveAccessField + :param effective_permission: The effective permissions for this shared link. + These result in the more restrictive combination of + the share link permissions and the item permissions set + by the administrator, the owner, and any ancestor item + such as a folder. + :type effective_permission: FileSharedLinkEffectivePermissionField + :param is_password_enabled: Defines if the shared link requires a password to access the item. + :type is_password_enabled: bool + :param download_count: The number of times this item has been downloaded. + :type download_count: int + :param preview_count: The number of times this item has been previewed. + :type preview_count: int + :param download_url: A URL that can be used to download the file. This URL can be used in + a browser to download the file. This URL includes the file + extension so that the file will be saved with the right file type. + + This property will be `null` for folders., defaults to None + :type download_url: Optional[str], optional + :param vanity_url: The "Custom URL" that can also be used to preview the item on Box. Custom + URLs can only be created or modified in the Box Web application., defaults to None + :type vanity_url: Optional[str], optional + :param vanity_name: The custom name of a shared link, as used in the `vanity_url` field., defaults to None + :type vanity_name: Optional[str], optional + :param access: The access level for this shared link. + + * `open` - provides access to this item to anyone with this link + * `company` - only provides access to this item to people the same company + * `collaborators` - only provides access to this item to people who are + collaborators on this item + + If this field is omitted when creating the shared link, the access level + will be set to the default access level specified by the enterprise admin., defaults to None + :type access: Optional[FileSharedLinkAccessField], optional + :param unshared_at: The date and time when this link will be unshared. This field can only be + set by users with paid accounts., defaults to None + :type unshared_at: Optional[DateTime], optional + :param permissions: Defines if this link allows a user to preview, edit, and download an item. + These permissions refer to the shared link only and + do not supersede permissions applied to the item itself., defaults to None + :type permissions: Optional[FileSharedLinkPermissionsField], optional + """ + super().__init__(**kwargs) + self.url = url + self.effective_access = effective_access + self.effective_permission = effective_permission + self.is_password_enabled = is_password_enabled + self.download_count = download_count + self.preview_count = preview_count + self.download_url = download_url + self.vanity_url = vanity_url + self.vanity_name = vanity_name + self.access = access + self.unshared_at = unshared_at + self.permissions = permissions + + +class FileItemStatusField(str, Enum): + ACTIVE = 'active' + TRASHED = 'trashed' + DELETED = 'deleted' + + +class File(FileMini): + def __init__( + self, + id: str, + *, + description: Optional[str] = None, + size: Optional[int] = None, + path_collection: Optional[FilePathCollectionField] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, + created_by: Optional[UserMini] = None, + modified_by: Optional[UserMini] = None, + owned_by: Optional[UserMini] = None, + shared_link: Optional[FileSharedLinkField] = None, + parent: Optional[FolderMini] = None, + item_status: Optional[FileItemStatusField] = None, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + sha_1: Optional[str] = None, + file_version: Optional[FileVersionMini] = None, + etag: Optional[str] = None, + type: FileBaseTypeField = FileBaseTypeField.FILE.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a file. + + The ID for any file can be determined + by visiting a file in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/files/123` + the `file_id` is `123`. + :type id: str + :param description: The optional description of this file, defaults to None + :type description: Optional[str], optional + :param size: The file size in bytes. Be careful parsing this integer as it can + get very large and cause an integer overflow., defaults to None + :type size: Optional[int], optional + :param created_at: The date and time when the file was created on Box., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The date and time when the file was last updated on Box., defaults to None + :type modified_at: Optional[DateTime], optional + :param trashed_at: The time at which this file was put in the trash., defaults to None + :type trashed_at: Optional[DateTime], optional + :param purged_at: The time at which this file is expected to be purged + from the trash., defaults to None + :type purged_at: Optional[DateTime], optional + :param content_created_at: The date and time at which this file was originally + created, which might be before it was uploaded to Box., defaults to None + :type content_created_at: Optional[DateTime], optional + :param content_modified_at: The date and time at which this file was last updated, + which might be before it was uploaded to Box., defaults to None + :type content_modified_at: Optional[DateTime], optional + :param item_status: Defines if this item has been deleted or not. + + * `active` when the item has is not in the trash + * `trashed` when the item has been moved to the trash but not deleted + * `deleted` when the item has been permanently deleted., defaults to None + :type item_status: Optional[FileItemStatusField], optional + :param name: The name of the file, defaults to None + :type name: Optional[str], optional + :param sha_1: The SHA1 hash of the file. This can be used to compare the contents + of a file on Box with a local file., defaults to None + :type sha_1: Optional[str], optional + :param etag: The HTTP `etag` of this file. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the file if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `file`, defaults to FileBaseTypeField.FILE.value + :type type: FileBaseTypeField, optional + """ + super().__init__( + id=id, + sequence_id=sequence_id, + name=name, + sha_1=sha_1, + file_version=file_version, + etag=etag, + type=type, + **kwargs + ) + self.description = description + self.size = size + self.path_collection = path_collection + self.created_at = created_at + self.modified_at = modified_at + self.trashed_at = trashed_at + self.purged_at = purged_at + self.content_created_at = content_created_at + self.content_modified_at = content_modified_at + self.created_by = created_by + self.modified_by = modified_by + self.owned_by = owned_by + self.shared_link = shared_link + self.parent = parent + self.item_status = item_status diff --git a/box_sdk_gen/schemas/file_base.py b/box_sdk_gen/schemas/file_base.py new file mode 100644 index 0000000..e6dd9f4 --- /dev/null +++ b/box_sdk_gen/schemas/file_base.py @@ -0,0 +1,42 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class FileBaseTypeField(str, Enum): + FILE = 'file' + + +class FileBase(BaseObject): + _discriminator = 'type', {'file'} + + def __init__( + self, + id: str, + *, + etag: Optional[str] = None, + type: FileBaseTypeField = FileBaseTypeField.FILE.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a file. + + The ID for any file can be determined + by visiting a file in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/files/123` + the `file_id` is `123`. + :type id: str + :param etag: The HTTP `etag` of this file. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the file if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `file`, defaults to FileBaseTypeField.FILE.value + :type type: FileBaseTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.etag = etag + self.type = type diff --git a/box_sdk_gen/schemas/file_conflict.py b/box_sdk_gen/schemas/file_conflict.py new file mode 100644 index 0000000..a603d31 --- /dev/null +++ b/box_sdk_gen/schemas/file_conflict.py @@ -0,0 +1,55 @@ +from typing import Optional + +from box_sdk_gen.schemas.file_base import FileBaseTypeField + +from box_sdk_gen.schemas.file_base import FileBase + +from box_sdk_gen.schemas.file_mini import FileMini + +from box_sdk_gen.schemas.file_version_mini import FileVersionMini + + +class FileConflict(FileMini): + def __init__( + self, + id: str, + *, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + sha_1: Optional[str] = None, + file_version: Optional[FileVersionMini] = None, + etag: Optional[str] = None, + type: FileBaseTypeField = FileBaseTypeField.FILE.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a file. + + The ID for any file can be determined + by visiting a file in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/files/123` + the `file_id` is `123`. + :type id: str + :param name: The name of the file, defaults to None + :type name: Optional[str], optional + :param sha_1: The SHA1 hash of the file. This can be used to compare the contents + of a file on Box with a local file., defaults to None + :type sha_1: Optional[str], optional + :param etag: The HTTP `etag` of this file. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the file if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `file`, defaults to FileBaseTypeField.FILE.value + :type type: FileBaseTypeField, optional + """ + super().__init__( + id=id, + sequence_id=sequence_id, + name=name, + sha_1=sha_1, + file_version=file_version, + etag=etag, + type=type, + **kwargs + ) diff --git a/box_sdk_gen/schemas/file_full.py b/box_sdk_gen/schemas/file_full.py new file mode 100644 index 0000000..107c127 --- /dev/null +++ b/box_sdk_gen/schemas/file_full.py @@ -0,0 +1,567 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from enum import Enum + +from typing import List + +from box_sdk_gen.schemas.file_base import FileBaseTypeField + +from box_sdk_gen.schemas.file_base import FileBase + +from box_sdk_gen.schemas.file_version_mini import FileVersionMini + +from box_sdk_gen.schemas.file_mini import FileMini + +from box_sdk_gen.schemas.file import FilePathCollectionField + +from box_sdk_gen.schemas.file import FileSharedLinkField + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.file import FileItemStatusField + +from box_sdk_gen.schemas.file import File + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.schemas.file_or_folder_scope import FileOrFolderScope + +from box_sdk_gen.schemas.metadata import Metadata + +from box_sdk_gen.internal.utils import DateTime + + +class FileFullPermissionsField(BaseObject): + def __init__( + self, + can_delete: bool, + can_download: bool, + can_invite_collaborator: bool, + can_rename: bool, + can_set_share_access: bool, + can_share: bool, + *, + can_annotate: Optional[bool] = None, + can_comment: Optional[bool] = None, + can_preview: Optional[bool] = None, + can_upload: Optional[bool] = None, + can_view_annotations_all: Optional[bool] = None, + can_view_annotations_self: Optional[bool] = None, + **kwargs + ): + """ + :param can_delete: Specifies if the current user can delete this item. + :type can_delete: bool + :param can_download: Specifies if the current user can download this item. + :type can_download: bool + :param can_invite_collaborator: Specifies if the current user can invite new + users to collaborate on this item, and if the user can + update the role of a user already collaborated on this + item. + :type can_invite_collaborator: bool + :param can_rename: Specifies if the user can rename this item. + :type can_rename: bool + :param can_set_share_access: Specifies if the user can change the access level of an + existing shared link on this item. + :type can_set_share_access: bool + :param can_share: Specifies if the user can create a shared link for this item. + :type can_share: bool + :param can_annotate: Specifies if the user can place annotations on this file., defaults to None + :type can_annotate: Optional[bool], optional + :param can_comment: Specifies if the user can place comments on this file., defaults to None + :type can_comment: Optional[bool], optional + :param can_preview: Specifies if the user can preview this file., defaults to None + :type can_preview: Optional[bool], optional + :param can_upload: Specifies if the user can upload a new version of this file., defaults to None + :type can_upload: Optional[bool], optional + :param can_view_annotations_all: Specifies if the user view all annotations placed on this file, defaults to None + :type can_view_annotations_all: Optional[bool], optional + :param can_view_annotations_self: Specifies if the user view annotations placed by themselves + on this file, defaults to None + :type can_view_annotations_self: Optional[bool], optional + """ + super().__init__(**kwargs) + self.can_delete = can_delete + self.can_download = can_download + self.can_invite_collaborator = can_invite_collaborator + self.can_rename = can_rename + self.can_set_share_access = can_set_share_access + self.can_share = can_share + self.can_annotate = can_annotate + self.can_comment = can_comment + self.can_preview = can_preview + self.can_upload = can_upload + self.can_view_annotations_all = can_view_annotations_all + self.can_view_annotations_self = can_view_annotations_self + + +class FileFullLockTypeField(str, Enum): + LOCK = 'lock' + + +class FileFullLockAppTypeField(str, Enum): + GSUITE = 'gsuite' + OFFICE_WOPI = 'office_wopi' + OFFICE_WOPIPLUS = 'office_wopiplus' + OTHER = 'other' + + +class FileFullLockField(BaseObject): + _discriminator = 'type', {'lock'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[FileFullLockTypeField] = None, + created_by: Optional[UserMini] = None, + created_at: Optional[DateTime] = None, + expired_at: Optional[DateTime] = None, + is_download_prevented: Optional[bool] = None, + app_type: Optional[FileFullLockAppTypeField] = None, + **kwargs + ): + """ + :param id: The unique identifier for this lock, defaults to None + :type id: Optional[str], optional + :param type: `lock`, defaults to None + :type type: Optional[FileFullLockTypeField], optional + :param created_at: The time this lock was created at., defaults to None + :type created_at: Optional[DateTime], optional + :param expired_at: The time this lock is to expire at, which might be in the past., defaults to None + :type expired_at: Optional[DateTime], optional + :param is_download_prevented: Whether or not the file can be downloaded while locked., defaults to None + :type is_download_prevented: Optional[bool], optional + :param app_type: If the lock is managed by an application rather than a user, this + field identifies the type of the application that holds the lock. + This is an open enum and may be extended with additional values in + the future., defaults to None + :type app_type: Optional[FileFullLockAppTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.created_by = created_by + self.created_at = created_at + self.expired_at = expired_at + self.is_download_prevented = is_download_prevented + self.app_type = app_type + + +class FileFullExpiringEmbedLinkTokenTypeField(str, Enum): + BEARER = 'bearer' + + +class FileFullExpiringEmbedLinkField(BaseObject): + def __init__( + self, + *, + access_token: Optional[str] = None, + expires_in: Optional[int] = None, + token_type: Optional[FileFullExpiringEmbedLinkTokenTypeField] = None, + restricted_to: Optional[List[FileOrFolderScope]] = None, + url: Optional[str] = None, + **kwargs + ): + """ + :param access_token: The requested access token., defaults to None + :type access_token: Optional[str], optional + :param expires_in: The time in seconds by which this token will expire., defaults to None + :type expires_in: Optional[int], optional + :param token_type: The type of access token returned., defaults to None + :type token_type: Optional[FileFullExpiringEmbedLinkTokenTypeField], optional + :param restricted_to: The permissions that this access token permits, + providing a list of resources (files, folders, etc) + and the scopes permitted for each of those resources., defaults to None + :type restricted_to: Optional[List[FileOrFolderScope]], optional + :param url: The actual expiring embed URL for this file, constructed + from the file ID and access tokens specified in this object., defaults to None + :type url: Optional[str], optional + """ + super().__init__(**kwargs) + self.access_token = access_token + self.expires_in = expires_in + self.token_type = token_type + self.restricted_to = restricted_to + self.url = url + + +class FileFullWatermarkInfoField(BaseObject): + def __init__(self, *, is_watermarked: Optional[bool] = None, **kwargs): + """ + :param is_watermarked: Specifies if this item has a watermark applied., defaults to None + :type is_watermarked: Optional[bool], optional + """ + super().__init__(**kwargs) + self.is_watermarked = is_watermarked + + +class FileFullAllowedInviteeRolesField(str, Enum): + EDITOR = 'editor' + VIEWER = 'viewer' + PREVIEWER = 'previewer' + UPLOADER = 'uploader' + PREVIEWER_UPLOADER = 'previewer uploader' + VIEWER_UPLOADER = 'viewer uploader' + CO_OWNER = 'co-owner' + + +class FileFullMetadataField(BaseObject): + def __init__(self, **kwargs): + super().__init__(**kwargs) + self.extra_data = kwargs + + +class FileFullRepresentationsEntriesContentField(BaseObject): + def __init__(self, *, url_template: Optional[str] = None, **kwargs): + """ + :param url_template: The download URL that can be used to fetch the representation. + Make sure to make an authenticated API call to this endpoint. + + This URL is a template and will require the `{+asset_path}` to + be replaced by a path. In general, for unpaged representations + it can be replaced by an empty string. + + For paged representations, replace the `{+asset_path}` with the + page to request plus the extension for the file, for example + `1.pdf`. + + When requesting the download URL the following additional + query params can be passed along. + + * `set_content_disposition_type` - Sets the + `Content-Disposition` header in the API response with the + specified disposition type of either `inline` or `attachment`. + If not supplied, the `Content-Disposition` header is not + included in the response. + + * `set_content_disposition_filename` - Allows the application to + define the representation's file name used in the + `Content-Disposition` header. If not defined, the filename + is derived from the source file name in Box combined with the + extension of the representation., defaults to None + :type url_template: Optional[str], optional + """ + super().__init__(**kwargs) + self.url_template = url_template + + +class FileFullRepresentationsEntriesInfoField(BaseObject): + def __init__(self, *, url: Optional[str] = None, **kwargs): + """ + :param url: The API URL that can be used to get more info on this file + representation. Make sure to make an authenticated API call + to this endpoint., defaults to None + :type url: Optional[str], optional + """ + super().__init__(**kwargs) + self.url = url + + +class FileFullRepresentationsEntriesPropertiesField(BaseObject): + def __init__( + self, + *, + dimensions: Optional[str] = None, + paged: Optional[bool] = None, + thumb: Optional[bool] = None, + **kwargs + ): + """ + :param dimensions: The width by height size of this representation in pixels., defaults to None + :type dimensions: Optional[str], optional + :param paged: Indicates if the representation is build up out of multiple + pages., defaults to None + :type paged: Optional[bool], optional + :param thumb: Indicates if the representation can be used as a thumbnail of + the file., defaults to None + :type thumb: Optional[bool], optional + """ + super().__init__(**kwargs) + self.dimensions = dimensions + self.paged = paged + self.thumb = thumb + + +class FileFullRepresentationsEntriesStatusStateField(str, Enum): + SUCCESS = 'success' + VIEWABLE = 'viewable' + PENDING = 'pending' + NONE = 'none' + + +class FileFullRepresentationsEntriesStatusField(BaseObject): + def __init__( + self, + *, + state: Optional[FileFullRepresentationsEntriesStatusStateField] = None, + **kwargs + ): + """ + :param state: The status of the representation. + + * `success` defines the representation as ready to be viewed. + * `viewable` defines a video to be ready for viewing. + * `pending` defines the representation as to be generated. Retry + this endpoint to re-check the status. + * `none` defines that the representation will be created when + requested. Request the URL defined in the `info` object to + trigger this generation., defaults to None + :type state: Optional[FileFullRepresentationsEntriesStatusStateField], optional + """ + super().__init__(**kwargs) + self.state = state + + +class FileFullRepresentationsEntriesField(BaseObject): + def __init__( + self, + *, + content: Optional[FileFullRepresentationsEntriesContentField] = None, + info: Optional[FileFullRepresentationsEntriesInfoField] = None, + properties: Optional[FileFullRepresentationsEntriesPropertiesField] = None, + representation: Optional[str] = None, + status: Optional[FileFullRepresentationsEntriesStatusField] = None, + **kwargs + ): + """ + :param content: An object containing the URL that can be used to actually fetch + the representation., defaults to None + :type content: Optional[FileFullRepresentationsEntriesContentField], optional + :param info: An object containing the URL that can be used to fetch more info + on this representation., defaults to None + :type info: Optional[FileFullRepresentationsEntriesInfoField], optional + :param properties: An object containing the size and type of this presentation., defaults to None + :type properties: Optional[FileFullRepresentationsEntriesPropertiesField], optional + :param representation: Indicates the file type of the returned representation., defaults to None + :type representation: Optional[str], optional + :param status: An object containing the status of this representation., defaults to None + :type status: Optional[FileFullRepresentationsEntriesStatusField], optional + """ + super().__init__(**kwargs) + self.content = content + self.info = info + self.properties = properties + self.representation = representation + self.status = status + + +class FileFullRepresentationsField(BaseObject): + def __init__( + self, + *, + entries: Optional[List[FileFullRepresentationsEntriesField]] = None, + **kwargs + ): + """ + :param entries: A list of files, defaults to None + :type entries: Optional[List[FileFullRepresentationsEntriesField]], optional + """ + super().__init__(**kwargs) + self.entries = entries + + +class FileFullClassificationField(BaseObject): + def __init__( + self, + *, + name: Optional[str] = None, + definition: Optional[str] = None, + color: Optional[str] = None, + **kwargs + ): + """ + :param name: The name of the classification, defaults to None + :type name: Optional[str], optional + :param definition: An explanation of the meaning of this classification., defaults to None + :type definition: Optional[str], optional + :param color: The color that is used to display the + classification label in a user-interface. Colors are defined by the admin + or co-admin who created the classification in the Box web app., defaults to None + :type color: Optional[str], optional + """ + super().__init__(**kwargs) + self.name = name + self.definition = definition + self.color = color + + +class FileFullSharedLinkPermissionOptionsField(str, Enum): + CAN_PREVIEW = 'can_preview' + CAN_DOWNLOAD = 'can_download' + CAN_EDIT = 'can_edit' + + +class FileFull(File): + def __init__( + self, + id: str, + *, + version_number: Optional[str] = None, + comment_count: Optional[int] = None, + permissions: Optional[FileFullPermissionsField] = None, + tags: Optional[List[str]] = None, + lock: Optional[FileFullLockField] = None, + extension: Optional[str] = None, + is_package: Optional[bool] = None, + expiring_embed_link: Optional[FileFullExpiringEmbedLinkField] = None, + watermark_info: Optional[FileFullWatermarkInfoField] = None, + is_accessible_via_shared_link: Optional[bool] = None, + allowed_invitee_roles: Optional[List[FileFullAllowedInviteeRolesField]] = None, + is_externally_owned: Optional[bool] = None, + has_collaborations: Optional[bool] = None, + metadata: Optional[FileFullMetadataField] = None, + expires_at: Optional[DateTime] = None, + representations: Optional[FileFullRepresentationsField] = None, + classification: Optional[FileFullClassificationField] = None, + uploader_display_name: Optional[str] = None, + disposition_at: Optional[DateTime] = None, + shared_link_permission_options: Optional[ + List[FileFullSharedLinkPermissionOptionsField] + ] = None, + description: Optional[str] = None, + size: Optional[int] = None, + path_collection: Optional[FilePathCollectionField] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, + created_by: Optional[UserMini] = None, + modified_by: Optional[UserMini] = None, + owned_by: Optional[UserMini] = None, + shared_link: Optional[FileSharedLinkField] = None, + parent: Optional[FolderMini] = None, + item_status: Optional[FileItemStatusField] = None, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + sha_1: Optional[str] = None, + file_version: Optional[FileVersionMini] = None, + etag: Optional[str] = None, + type: FileBaseTypeField = FileBaseTypeField.FILE.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a file. + + The ID for any file can be determined + by visiting a file in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/files/123` + the `file_id` is `123`. + :type id: str + :param version_number: The version number of this file, defaults to None + :type version_number: Optional[str], optional + :param comment_count: The number of comments on this file, defaults to None + :type comment_count: Optional[int], optional + :param extension: Indicates the (optional) file extension for this file. By default, + this is set to an empty string., defaults to None + :type extension: Optional[str], optional + :param is_package: Indicates if the file is a package. Packages are commonly used + by Mac Applications and can include iWork files., defaults to None + :type is_package: Optional[bool], optional + :param is_accessible_via_shared_link: Specifies if the file can be accessed + via the direct shared link or a shared link + to a parent folder., defaults to None + :type is_accessible_via_shared_link: Optional[bool], optional + :param allowed_invitee_roles: A list of the types of roles that user can be invited at + when sharing this file., defaults to None + :type allowed_invitee_roles: Optional[List[FileFullAllowedInviteeRolesField]], optional + :param is_externally_owned: Specifies if this file is owned by a user outside of the + authenticated enterprise., defaults to None + :type is_externally_owned: Optional[bool], optional + :param has_collaborations: Specifies if this file has any other collaborators., defaults to None + :type has_collaborations: Optional[bool], optional + :param expires_at: When the file will automatically be deleted, defaults to None + :type expires_at: Optional[DateTime], optional + :param disposition_at: The retention expiration timestamp for the given file, defaults to None + :type disposition_at: Optional[DateTime], optional + :param shared_link_permission_options: A list of the types of roles that user can be invited at + when sharing this file., defaults to None + :type shared_link_permission_options: Optional[List[FileFullSharedLinkPermissionOptionsField]], optional + :param description: The optional description of this file, defaults to None + :type description: Optional[str], optional + :param size: The file size in bytes. Be careful parsing this integer as it can + get very large and cause an integer overflow., defaults to None + :type size: Optional[int], optional + :param created_at: The date and time when the file was created on Box., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The date and time when the file was last updated on Box., defaults to None + :type modified_at: Optional[DateTime], optional + :param trashed_at: The time at which this file was put in the trash., defaults to None + :type trashed_at: Optional[DateTime], optional + :param purged_at: The time at which this file is expected to be purged + from the trash., defaults to None + :type purged_at: Optional[DateTime], optional + :param content_created_at: The date and time at which this file was originally + created, which might be before it was uploaded to Box., defaults to None + :type content_created_at: Optional[DateTime], optional + :param content_modified_at: The date and time at which this file was last updated, + which might be before it was uploaded to Box., defaults to None + :type content_modified_at: Optional[DateTime], optional + :param item_status: Defines if this item has been deleted or not. + + * `active` when the item has is not in the trash + * `trashed` when the item has been moved to the trash but not deleted + * `deleted` when the item has been permanently deleted., defaults to None + :type item_status: Optional[FileItemStatusField], optional + :param name: The name of the file, defaults to None + :type name: Optional[str], optional + :param sha_1: The SHA1 hash of the file. This can be used to compare the contents + of a file on Box with a local file., defaults to None + :type sha_1: Optional[str], optional + :param etag: The HTTP `etag` of this file. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the file if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `file`, defaults to FileBaseTypeField.FILE.value + :type type: FileBaseTypeField, optional + """ + super().__init__( + id=id, + description=description, + size=size, + path_collection=path_collection, + created_at=created_at, + modified_at=modified_at, + trashed_at=trashed_at, + purged_at=purged_at, + content_created_at=content_created_at, + content_modified_at=content_modified_at, + created_by=created_by, + modified_by=modified_by, + owned_by=owned_by, + shared_link=shared_link, + parent=parent, + item_status=item_status, + sequence_id=sequence_id, + name=name, + sha_1=sha_1, + file_version=file_version, + etag=etag, + type=type, + **kwargs + ) + self.version_number = version_number + self.comment_count = comment_count + self.permissions = permissions + self.tags = tags + self.lock = lock + self.extension = extension + self.is_package = is_package + self.expiring_embed_link = expiring_embed_link + self.watermark_info = watermark_info + self.is_accessible_via_shared_link = is_accessible_via_shared_link + self.allowed_invitee_roles = allowed_invitee_roles + self.is_externally_owned = is_externally_owned + self.has_collaborations = has_collaborations + self.metadata = metadata + self.expires_at = expires_at + self.representations = representations + self.classification = classification + self.uploader_display_name = uploader_display_name + self.disposition_at = disposition_at + self.shared_link_permission_options = shared_link_permission_options diff --git a/box_sdk_gen/schemas/file_mini.py b/box_sdk_gen/schemas/file_mini.py new file mode 100644 index 0000000..de7b992 --- /dev/null +++ b/box_sdk_gen/schemas/file_mini.py @@ -0,0 +1,59 @@ +from typing import Optional + +from typing import Dict + +from box_sdk_gen.schemas.file_base import FileBaseTypeField + +from box_sdk_gen.schemas.file_base import FileBase + +from box_sdk_gen.schemas.file_version_mini import FileVersionMini + + +class FileMini(FileBase): + _fields_to_json_mapping: Dict[str, str] = { + 'sha_1': 'sha1', + **FileBase._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'sha1': 'sha_1', + **FileBase._json_to_fields_mapping, + } + + def __init__( + self, + id: str, + *, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + sha_1: Optional[str] = None, + file_version: Optional[FileVersionMini] = None, + etag: Optional[str] = None, + type: FileBaseTypeField = FileBaseTypeField.FILE.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a file. + + The ID for any file can be determined + by visiting a file in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/files/123` + the `file_id` is `123`. + :type id: str + :param name: The name of the file, defaults to None + :type name: Optional[str], optional + :param sha_1: The SHA1 hash of the file. This can be used to compare the contents + of a file on Box with a local file., defaults to None + :type sha_1: Optional[str], optional + :param etag: The HTTP `etag` of this file. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the file if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `file`, defaults to FileBaseTypeField.FILE.value + :type type: FileBaseTypeField, optional + """ + super().__init__(id=id, etag=etag, type=type, **kwargs) + self.sequence_id = sequence_id + self.name = name + self.sha_1 = sha_1 + self.file_version = file_version diff --git a/box_sdk_gen/schemas/file_or_folder_scope.py b/box_sdk_gen/schemas/file_or_folder_scope.py new file mode 100644 index 0000000..80b8c07 --- /dev/null +++ b/box_sdk_gen/schemas/file_or_folder_scope.py @@ -0,0 +1,43 @@ +from enum import Enum + +from typing import Optional + +from typing import Union + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.file_mini import FileMini + + +class FileOrFolderScopeScopeField(str, Enum): + ANNOTATION_EDIT = 'annotation_edit' + ANNOTATION_VIEW_ALL = 'annotation_view_all' + ANNOTATION_VIEW_SELF = 'annotation_view_self' + BASE_EXPLORER = 'base_explorer' + BASE_PICKER = 'base_picker' + BASE_PREVIEW = 'base_preview' + BASE_UPLOAD = 'base_upload' + ITEM_DELETE = 'item_delete' + ITEM_DOWNLOAD = 'item_download' + ITEM_PREVIEW = 'item_preview' + ITEM_RENAME = 'item_rename' + ITEM_SHARE = 'item_share' + + +class FileOrFolderScope(BaseObject): + def __init__( + self, + *, + scope: Optional[FileOrFolderScopeScopeField] = None, + object: Optional[Union[FolderMini, FileMini]] = None, + **kwargs + ): + """ + :param scope: The scopes for the resource access, defaults to None + :type scope: Optional[FileOrFolderScopeScopeField], optional + """ + super().__init__(**kwargs) + self.scope = scope + self.object = object diff --git a/box_sdk_gen/schemas/file_request.py b/box_sdk_gen/schemas/file_request.py new file mode 100644 index 0000000..267adef --- /dev/null +++ b/box_sdk_gen/schemas/file_request.py @@ -0,0 +1,127 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class FileRequestTypeField(str, Enum): + FILE_REQUEST = 'file_request' + + +class FileRequestStatusField(str, Enum): + ACTIVE = 'active' + INACTIVE = 'inactive' + + +class FileRequest(BaseObject): + _discriminator = 'type', {'file_request'} + + def __init__( + self, + id: str, + folder: FolderMini, + created_at: DateTime, + updated_at: DateTime, + *, + type: FileRequestTypeField = FileRequestTypeField.FILE_REQUEST.value, + title: Optional[str] = None, + description: Optional[str] = None, + status: Optional[FileRequestStatusField] = None, + is_email_required: Optional[bool] = None, + is_description_required: Optional[bool] = None, + expires_at: Optional[DateTime] = None, + url: Optional[str] = None, + etag: Optional[str] = None, + created_by: Optional[UserMini] = None, + updated_by: Optional[UserMini] = None, + **kwargs + ): + """ + :param id: The unique identifier for this file request. + :type id: str + :param created_at: The date and time when the file request was created. + :type created_at: DateTime + :param updated_at: The date and time when the file request was last updated. + :type updated_at: DateTime + :param type: `file_request`, defaults to FileRequestTypeField.FILE_REQUEST.value + :type type: FileRequestTypeField, optional + :param title: The title of file request. This is shown + in the Box UI to users uploading files. + + This defaults to title of the file request that was + copied to create this file request., defaults to None + :type title: Optional[str], optional + :param description: The optional description of this file request. This is + shown in the Box UI to users uploading files. + + This defaults to description of the file request that was + copied to create this file request., defaults to None + :type description: Optional[str], optional + :param status: The status of the file request. This defaults + to `active`. + + When the status is set to `inactive`, the file request + will no longer accept new submissions, and any visitor + to the file request URL will receive a `HTTP 404` status + code. + + This defaults to status of file request that was + copied to create this file request., defaults to None + :type status: Optional[FileRequestStatusField], optional + :param is_email_required: Whether a file request submitter is required to provide + their email address. + + When this setting is set to true, the Box UI will show + an email field on the file request form. + + This defaults to setting of file request that was + copied to create this file request., defaults to None + :type is_email_required: Optional[bool], optional + :param is_description_required: Whether a file request submitter is required to provide + a description of the files they are submitting. + + When this setting is set to true, the Box UI will show + a description field on the file request form. + + This defaults to setting of file request that was + copied to create this file request., defaults to None + :type is_description_required: Optional[bool], optional + :param expires_at: The date after which a file request will no longer accept new + submissions. + + After this date, the `status` will automatically be set to + `inactive`., defaults to None + :type expires_at: Optional[DateTime], optional + :param url: The generated URL for this file request. This URL can be shared + with users to let them upload files to the associated folder., defaults to None + :type url: Optional[str], optional + :param etag: The HTTP `etag` of this file. This can be used in combination with + the `If-Match` header when updating a file request. By providing that + header, a change will only be performed on the file request if the `etag` + on the file request still matches the `etag` provided in the `If-Match` + header., defaults to None + :type etag: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.folder = folder + self.created_at = created_at + self.updated_at = updated_at + self.type = type + self.title = title + self.description = description + self.status = status + self.is_email_required = is_email_required + self.is_description_required = is_description_required + self.expires_at = expires_at + self.url = url + self.etag = etag + self.created_by = created_by + self.updated_by = updated_by diff --git a/box_sdk_gen/schemas/file_request_copy_request.py b/box_sdk_gen/schemas/file_request_copy_request.py new file mode 100644 index 0000000..622d375 --- /dev/null +++ b/box_sdk_gen/schemas/file_request_copy_request.py @@ -0,0 +1,111 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_request_update_request import ( + FileRequestUpdateRequestStatusField, +) + +from box_sdk_gen.internal.utils import DateTime + +from box_sdk_gen.schemas.file_request_update_request import FileRequestUpdateRequest + + +class FileRequestCopyRequestFolderTypeField(str, Enum): + FOLDER = 'folder' + + +class FileRequestCopyRequestFolderField(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + id: str, + *, + type: Optional[FileRequestCopyRequestFolderTypeField] = None, + **kwargs + ): + """ + :param id: The ID of the folder to associate the new + file request to. + :type id: str + :param type: `folder`, defaults to None + :type type: Optional[FileRequestCopyRequestFolderTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class FileRequestCopyRequest(FileRequestUpdateRequest): + def __init__( + self, + folder: FileRequestCopyRequestFolderField, + *, + title: Optional[str] = None, + description: Optional[str] = None, + status: Optional[FileRequestUpdateRequestStatusField] = None, + is_email_required: Optional[bool] = None, + is_description_required: Optional[bool] = None, + expires_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param folder: The folder to associate the new file request to. + :type folder: FileRequestCopyRequestFolderField + :param title: An optional new title for the file request. This can be + used to change the title of the file request. + + This will default to the value on the existing file request., defaults to None + :type title: Optional[str], optional + :param description: An optional new description for the file request. This can be + used to change the description of the file request. + + This will default to the value on the existing file request., defaults to None + :type description: Optional[str], optional + :param status: An optional new status of the file request. + + When the status is set to `inactive`, the file request + will no longer accept new submissions, and any visitor + to the file request URL will receive a `HTTP 404` status + code. + + This will default to the value on the existing file request., defaults to None + :type status: Optional[FileRequestUpdateRequestStatusField], optional + :param is_email_required: Whether a file request submitter is required to provide + their email address. + + When this setting is set to true, the Box UI will show + an email field on the file request form. + + This will default to the value on the existing file request., defaults to None + :type is_email_required: Optional[bool], optional + :param is_description_required: Whether a file request submitter is required to provide + a description of the files they are submitting. + + When this setting is set to true, the Box UI will show + a description field on the file request form. + + This will default to the value on the existing file request., defaults to None + :type is_description_required: Optional[bool], optional + :param expires_at: The date after which a file request will no longer accept new + submissions. + + After this date, the `status` will automatically be set to + `inactive`. + + This will default to the value on the existing file request., defaults to None + :type expires_at: Optional[DateTime], optional + """ + super().__init__( + title=title, + description=description, + status=status, + is_email_required=is_email_required, + is_description_required=is_description_required, + expires_at=expires_at, + **kwargs + ) + self.folder = folder diff --git a/box_sdk_gen/schemas/file_request_update_request.py b/box_sdk_gen/schemas/file_request_update_request.py new file mode 100644 index 0000000..9aa4beb --- /dev/null +++ b/box_sdk_gen/schemas/file_request_update_request.py @@ -0,0 +1,78 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.internal.utils import DateTime + + +class FileRequestUpdateRequestStatusField(str, Enum): + ACTIVE = 'active' + INACTIVE = 'inactive' + + +class FileRequestUpdateRequest(BaseObject): + def __init__( + self, + *, + title: Optional[str] = None, + description: Optional[str] = None, + status: Optional[FileRequestUpdateRequestStatusField] = None, + is_email_required: Optional[bool] = None, + is_description_required: Optional[bool] = None, + expires_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param title: An optional new title for the file request. This can be + used to change the title of the file request. + + This will default to the value on the existing file request., defaults to None + :type title: Optional[str], optional + :param description: An optional new description for the file request. This can be + used to change the description of the file request. + + This will default to the value on the existing file request., defaults to None + :type description: Optional[str], optional + :param status: An optional new status of the file request. + + When the status is set to `inactive`, the file request + will no longer accept new submissions, and any visitor + to the file request URL will receive a `HTTP 404` status + code. + + This will default to the value on the existing file request., defaults to None + :type status: Optional[FileRequestUpdateRequestStatusField], optional + :param is_email_required: Whether a file request submitter is required to provide + their email address. + + When this setting is set to true, the Box UI will show + an email field on the file request form. + + This will default to the value on the existing file request., defaults to None + :type is_email_required: Optional[bool], optional + :param is_description_required: Whether a file request submitter is required to provide + a description of the files they are submitting. + + When this setting is set to true, the Box UI will show + a description field on the file request form. + + This will default to the value on the existing file request., defaults to None + :type is_description_required: Optional[bool], optional + :param expires_at: The date after which a file request will no longer accept new + submissions. + + After this date, the `status` will automatically be set to + `inactive`. + + This will default to the value on the existing file request., defaults to None + :type expires_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.title = title + self.description = description + self.status = status + self.is_email_required = is_email_required + self.is_description_required = is_description_required + self.expires_at = expires_at diff --git a/box_sdk_gen/schemas/file_version.py b/box_sdk_gen/schemas/file_version.py new file mode 100644 index 0000000..3b6ba0f --- /dev/null +++ b/box_sdk_gen/schemas/file_version.py @@ -0,0 +1,67 @@ +from typing import Optional + +from box_sdk_gen.schemas.file_version_base import FileVersionBaseTypeField + +from box_sdk_gen.schemas.file_version_base import FileVersionBase + +from box_sdk_gen.schemas.file_version_mini import FileVersionMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class FileVersion(FileVersionMini): + def __init__( + self, + id: str, + *, + name: Optional[str] = None, + size: Optional[int] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + modified_by: Optional[UserMini] = None, + trashed_at: Optional[DateTime] = None, + trashed_by: Optional[UserMini] = None, + restored_at: Optional[DateTime] = None, + restored_by: Optional[UserMini] = None, + purged_at: Optional[DateTime] = None, + uploader_display_name: Optional[str] = None, + sha_1: Optional[str] = None, + type: FileVersionBaseTypeField = FileVersionBaseTypeField.FILE_VERSION.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a file version. + :type id: str + :param name: The name of the file version, defaults to None + :type name: Optional[str], optional + :param size: Size of the file version in bytes, defaults to None + :type size: Optional[int], optional + :param created_at: When the file version object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the file version object was last updated, defaults to None + :type modified_at: Optional[DateTime], optional + :param trashed_at: When the file version object was trashed., defaults to None + :type trashed_at: Optional[DateTime], optional + :param restored_at: When the file version was restored from the trash., defaults to None + :type restored_at: Optional[DateTime], optional + :param purged_at: When the file version object will be permanently deleted., defaults to None + :type purged_at: Optional[DateTime], optional + :param sha_1: The SHA1 hash of this version of the file., defaults to None + :type sha_1: Optional[str], optional + :param type: `file_version`, defaults to FileVersionBaseTypeField.FILE_VERSION.value + :type type: FileVersionBaseTypeField, optional + """ + super().__init__(id=id, sha_1=sha_1, type=type, **kwargs) + self.name = name + self.size = size + self.created_at = created_at + self.modified_at = modified_at + self.modified_by = modified_by + self.trashed_at = trashed_at + self.trashed_by = trashed_by + self.restored_at = restored_at + self.restored_by = restored_by + self.purged_at = purged_at + self.uploader_display_name = uploader_display_name diff --git a/box_sdk_gen/schemas/file_version_base.py b/box_sdk_gen/schemas/file_version_base.py new file mode 100644 index 0000000..5d2b5db --- /dev/null +++ b/box_sdk_gen/schemas/file_version_base.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class FileVersionBaseTypeField(str, Enum): + FILE_VERSION = 'file_version' + + +class FileVersionBase(BaseObject): + _discriminator = 'type', {'file_version'} + + def __init__( + self, + id: str, + *, + type: FileVersionBaseTypeField = FileVersionBaseTypeField.FILE_VERSION.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a file version. + :type id: str + :param type: `file_version`, defaults to FileVersionBaseTypeField.FILE_VERSION.value + :type type: FileVersionBaseTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/file_version_full.py b/box_sdk_gen/schemas/file_version_full.py new file mode 100644 index 0000000..08a27e9 --- /dev/null +++ b/box_sdk_gen/schemas/file_version_full.py @@ -0,0 +1,78 @@ +from typing import Optional + +from box_sdk_gen.schemas.file_version_base import FileVersionBaseTypeField + +from box_sdk_gen.schemas.file_version_base import FileVersionBase + +from box_sdk_gen.schemas.file_version_mini import FileVersionMini + +from box_sdk_gen.internal.utils import DateTime + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.schemas.file_version import FileVersion + + +class FileVersionFull(FileVersion): + def __init__( + self, + id: str, + *, + version_number: Optional[str] = None, + name: Optional[str] = None, + size: Optional[int] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + modified_by: Optional[UserMini] = None, + trashed_at: Optional[DateTime] = None, + trashed_by: Optional[UserMini] = None, + restored_at: Optional[DateTime] = None, + restored_by: Optional[UserMini] = None, + purged_at: Optional[DateTime] = None, + uploader_display_name: Optional[str] = None, + sha_1: Optional[str] = None, + type: FileVersionBaseTypeField = FileVersionBaseTypeField.FILE_VERSION.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a file version. + :type id: str + :param version_number: The version number of this file version, defaults to None + :type version_number: Optional[str], optional + :param name: The name of the file version, defaults to None + :type name: Optional[str], optional + :param size: Size of the file version in bytes, defaults to None + :type size: Optional[int], optional + :param created_at: When the file version object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the file version object was last updated, defaults to None + :type modified_at: Optional[DateTime], optional + :param trashed_at: When the file version object was trashed., defaults to None + :type trashed_at: Optional[DateTime], optional + :param restored_at: When the file version was restored from the trash., defaults to None + :type restored_at: Optional[DateTime], optional + :param purged_at: When the file version object will be permanently deleted., defaults to None + :type purged_at: Optional[DateTime], optional + :param sha_1: The SHA1 hash of this version of the file., defaults to None + :type sha_1: Optional[str], optional + :param type: `file_version`, defaults to FileVersionBaseTypeField.FILE_VERSION.value + :type type: FileVersionBaseTypeField, optional + """ + super().__init__( + id=id, + name=name, + size=size, + created_at=created_at, + modified_at=modified_at, + modified_by=modified_by, + trashed_at=trashed_at, + trashed_by=trashed_by, + restored_at=restored_at, + restored_by=restored_by, + purged_at=purged_at, + uploader_display_name=uploader_display_name, + sha_1=sha_1, + type=type, + **kwargs + ) + self.version_number = version_number diff --git a/box_sdk_gen/schemas/file_version_legal_hold.py b/box_sdk_gen/schemas/file_version_legal_hold.py new file mode 100644 index 0000000..96c5734 --- /dev/null +++ b/box_sdk_gen/schemas/file_version_legal_hold.py @@ -0,0 +1,53 @@ +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.file_version_mini import FileVersionMini + +from box_sdk_gen.schemas.file_mini import FileMini + +from box_sdk_gen.schemas.legal_hold_policy_assignment import LegalHoldPolicyAssignment + +from box_sdk_gen.internal.utils import DateTime + + +class FileVersionLegalHoldTypeField(str, Enum): + FILE_VERSION_LEGAL_HOLD = 'file_version_legal_hold' + + +class FileVersionLegalHold(BaseObject): + _discriminator = 'type', {'file_version_legal_hold'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[FileVersionLegalHoldTypeField] = None, + file_version: Optional[FileVersionMini] = None, + file: Optional[FileMini] = None, + legal_hold_policy_assignments: Optional[List[LegalHoldPolicyAssignment]] = None, + deleted_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param id: The unique identifier for this file version legal hold, defaults to None + :type id: Optional[str], optional + :param type: `file_version_legal_hold`, defaults to None + :type type: Optional[FileVersionLegalHoldTypeField], optional + :param legal_hold_policy_assignments: List of assignments contributing to this Hold., defaults to None + :type legal_hold_policy_assignments: Optional[List[LegalHoldPolicyAssignment]], optional + :param deleted_at: Time that this File-Version-Legal-Hold was + deleted., defaults to None + :type deleted_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.file_version = file_version + self.file = file + self.legal_hold_policy_assignments = legal_hold_policy_assignments + self.deleted_at = deleted_at diff --git a/box_sdk_gen/schemas/file_version_legal_holds.py b/box_sdk_gen/schemas/file_version_legal_holds.py new file mode 100644 index 0000000..1d5b577 --- /dev/null +++ b/box_sdk_gen/schemas/file_version_legal_holds.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_version_legal_hold import FileVersionLegalHold + + +class FileVersionLegalHolds(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[FileVersionLegalHold]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of file version legal holds, defaults to None + :type entries: Optional[List[FileVersionLegalHold]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/file_version_mini.py b/box_sdk_gen/schemas/file_version_mini.py new file mode 100644 index 0000000..e585c9f --- /dev/null +++ b/box_sdk_gen/schemas/file_version_mini.py @@ -0,0 +1,37 @@ +from typing import Optional + +from typing import Dict + +from box_sdk_gen.schemas.file_version_base import FileVersionBaseTypeField + +from box_sdk_gen.schemas.file_version_base import FileVersionBase + + +class FileVersionMini(FileVersionBase): + _fields_to_json_mapping: Dict[str, str] = { + 'sha_1': 'sha1', + **FileVersionBase._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'sha1': 'sha_1', + **FileVersionBase._json_to_fields_mapping, + } + + def __init__( + self, + id: str, + *, + sha_1: Optional[str] = None, + type: FileVersionBaseTypeField = FileVersionBaseTypeField.FILE_VERSION.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a file version. + :type id: str + :param sha_1: The SHA1 hash of this version of the file., defaults to None + :type sha_1: Optional[str], optional + :param type: `file_version`, defaults to FileVersionBaseTypeField.FILE_VERSION.value + :type type: FileVersionBaseTypeField, optional + """ + super().__init__(id=id, type=type, **kwargs) + self.sha_1 = sha_1 diff --git a/box_sdk_gen/schemas/file_version_retention.py b/box_sdk_gen/schemas/file_version_retention.py new file mode 100644 index 0000000..8c43195 --- /dev/null +++ b/box_sdk_gen/schemas/file_version_retention.py @@ -0,0 +1,54 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_version_mini import FileVersionMini + +from box_sdk_gen.schemas.file_mini import FileMini + +from box_sdk_gen.schemas.retention_policy_mini import RetentionPolicyMini + +from box_sdk_gen.internal.utils import DateTime + + +class FileVersionRetentionTypeField(str, Enum): + FILE_VERSION_RETENTION = 'file_version_retention' + + +class FileVersionRetention(BaseObject): + _discriminator = 'type', {'file_version_retention'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[FileVersionRetentionTypeField] = None, + file_version: Optional[FileVersionMini] = None, + file: Optional[FileMini] = None, + applied_at: Optional[DateTime] = None, + disposition_at: Optional[DateTime] = None, + winning_retention_policy: Optional[RetentionPolicyMini] = None, + **kwargs + ): + """ + :param id: The unique identifier for this file version retention., defaults to None + :type id: Optional[str], optional + :param type: `file_version_retention`, defaults to None + :type type: Optional[FileVersionRetentionTypeField], optional + :param applied_at: When this file version retention object was + created, defaults to None + :type applied_at: Optional[DateTime], optional + :param disposition_at: When the retention expires on this file + version retention, defaults to None + :type disposition_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.file_version = file_version + self.file = file + self.applied_at = applied_at + self.disposition_at = disposition_at + self.winning_retention_policy = winning_retention_policy diff --git a/box_sdk_gen/schemas/file_version_retentions.py b/box_sdk_gen/schemas/file_version_retentions.py new file mode 100644 index 0000000..51512b1 --- /dev/null +++ b/box_sdk_gen/schemas/file_version_retentions.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_version_retention import FileVersionRetention + + +class FileVersionRetentions(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[FileVersionRetention]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of file version retentions, defaults to None + :type entries: Optional[List[FileVersionRetention]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/file_versions.py b/box_sdk_gen/schemas/file_versions.py new file mode 100644 index 0000000..ff10258 --- /dev/null +++ b/box_sdk_gen/schemas/file_versions.py @@ -0,0 +1,78 @@ +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.file_version_full import FileVersionFull + + +class FileVersionsOrderDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class FileVersionsOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[str] = None, + direction: Optional[FileVersionsOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field to order by, defaults to None + :type by: Optional[str], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[FileVersionsOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class FileVersions(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + order: Optional[List[FileVersionsOrderField]] = None, + entries: Optional[List[FileVersionFull]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type offset: Optional[int], optional + :param order: The order by which items are returned. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type order: Optional[List[FileVersionsOrderField]], optional + :param entries: A list of file versions, defaults to None + :type entries: Optional[List[FileVersionFull]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.order = order + self.entries = entries diff --git a/box_sdk_gen/schemas/files.py b/box_sdk_gen/schemas/files.py new file mode 100644 index 0000000..cc9965d --- /dev/null +++ b/box_sdk_gen/schemas/files.py @@ -0,0 +1,26 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_full import FileFull + + +class Files(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + entries: Optional[List[FileFull]] = None, + **kwargs + ): + """ + :param total_count: The number of files., defaults to None + :type total_count: Optional[int], optional + :param entries: A list of files, defaults to None + :type entries: Optional[List[FileFull]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries diff --git a/box_sdk_gen/schemas/files_under_retention.py b/box_sdk_gen/schemas/files_under_retention.py new file mode 100644 index 0000000..e613a26 --- /dev/null +++ b/box_sdk_gen/schemas/files_under_retention.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_mini import FileMini + + +class FilesUnderRetention(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[FileMini]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of files, defaults to None + :type entries: Optional[List[FileMini]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/folder.py b/box_sdk_gen/schemas/folder.py new file mode 100644 index 0000000..06bb79b --- /dev/null +++ b/box_sdk_gen/schemas/folder.py @@ -0,0 +1,311 @@ +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from enum import Enum + +from typing import Optional + +from box_sdk_gen.schemas.folder_base import FolderBaseTypeField + +from box_sdk_gen.schemas.folder_base import FolderBase + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.schemas.items import Items + +from box_sdk_gen.internal.utils import DateTime + + +class FolderPathCollectionField(BaseObject): + def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): + """ + :param total_count: The number of folders in this list. + :type total_count: int + :param entries: The parent folders for this item + :type entries: List[FolderMini] + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries + + +class FolderSharedLinkAccessField(str, Enum): + OPEN = 'open' + COMPANY = 'company' + COLLABORATORS = 'collaborators' + + +class FolderSharedLinkEffectiveAccessField(str, Enum): + OPEN = 'open' + COMPANY = 'company' + COLLABORATORS = 'collaborators' + + +class FolderSharedLinkEffectivePermissionField(str, Enum): + CAN_EDIT = 'can_edit' + CAN_DOWNLOAD = 'can_download' + CAN_PREVIEW = 'can_preview' + NO_ACCESS = 'no_access' + + +class FolderSharedLinkPermissionsField(BaseObject): + def __init__(self, can_download: bool, can_preview: bool, can_edit: bool, **kwargs): + """ + :param can_download: Defines if the shared link allows for the item to be downloaded. For + shared links on folders, this also applies to any items in the folder. + + This value can be set to `true` when the effective access level is + set to `open` or `company`, not `collaborators`. + :type can_download: bool + :param can_preview: Defines if the shared link allows for the item to be previewed. + + This value is always `true`. For shared links on folders this also + applies to any items in the folder. + :type can_preview: bool + :param can_edit: Defines if the shared link allows for the item to be edited. + + This value can only be `true` if `can_download` is also `true` and if + the item has a type of `file`. + :type can_edit: bool + """ + super().__init__(**kwargs) + self.can_download = can_download + self.can_preview = can_preview + self.can_edit = can_edit + + +class FolderSharedLinkField(BaseObject): + def __init__( + self, + url: str, + effective_access: FolderSharedLinkEffectiveAccessField, + effective_permission: FolderSharedLinkEffectivePermissionField, + is_password_enabled: bool, + download_count: int, + preview_count: int, + *, + download_url: Optional[str] = None, + vanity_url: Optional[str] = None, + vanity_name: Optional[str] = None, + access: Optional[FolderSharedLinkAccessField] = None, + unshared_at: Optional[DateTime] = None, + permissions: Optional[FolderSharedLinkPermissionsField] = None, + **kwargs + ): + """ + :param url: The URL that can be used to access the item on Box. + + This URL will display the item in Box's preview UI where the file + can be downloaded if allowed. + + This URL will continue to work even when a custom `vanity_url` + has been set for this shared link. + :type url: str + :param effective_access: The effective access level for the shared link. This can be a more + restrictive access level than the value in the `access` field when the + enterprise settings restrict the allowed access levels. + :type effective_access: FolderSharedLinkEffectiveAccessField + :param effective_permission: The effective permissions for this shared link. + These result in the more restrictive combination of + the share link permissions and the item permissions set + by the administrator, the owner, and any ancestor item + such as a folder. + :type effective_permission: FolderSharedLinkEffectivePermissionField + :param is_password_enabled: Defines if the shared link requires a password to access the item. + :type is_password_enabled: bool + :param download_count: The number of times this item has been downloaded. + :type download_count: int + :param preview_count: The number of times this item has been previewed. + :type preview_count: int + :param download_url: A URL that can be used to download the file. This URL can be used in + a browser to download the file. This URL includes the file + extension so that the file will be saved with the right file type. + + This property will be `null` for folders., defaults to None + :type download_url: Optional[str], optional + :param vanity_url: The "Custom URL" that can also be used to preview the item on Box. Custom + URLs can only be created or modified in the Box Web application., defaults to None + :type vanity_url: Optional[str], optional + :param vanity_name: The custom name of a shared link, as used in the `vanity_url` field., defaults to None + :type vanity_name: Optional[str], optional + :param access: The access level for this shared link. + + * `open` - provides access to this item to anyone with this link + * `company` - only provides access to this item to people the same company + * `collaborators` - only provides access to this item to people who are + collaborators on this item + + If this field is omitted when creating the shared link, the access level + will be set to the default access level specified by the enterprise admin., defaults to None + :type access: Optional[FolderSharedLinkAccessField], optional + :param unshared_at: The date and time when this link will be unshared. This field can only be + set by users with paid accounts., defaults to None + :type unshared_at: Optional[DateTime], optional + :param permissions: Defines if this link allows a user to preview, edit, and download an item. + These permissions refer to the shared link only and + do not supersede permissions applied to the item itself., defaults to None + :type permissions: Optional[FolderSharedLinkPermissionsField], optional + """ + super().__init__(**kwargs) + self.url = url + self.effective_access = effective_access + self.effective_permission = effective_permission + self.is_password_enabled = is_password_enabled + self.download_count = download_count + self.preview_count = preview_count + self.download_url = download_url + self.vanity_url = vanity_url + self.vanity_name = vanity_name + self.access = access + self.unshared_at = unshared_at + self.permissions = permissions + + +class FolderFolderUploadEmailAccessField(str, Enum): + OPEN = 'open' + COLLABORATORS = 'collaborators' + + +class FolderFolderUploadEmailField(BaseObject): + def __init__( + self, + *, + access: Optional[FolderFolderUploadEmailAccessField] = None, + email: Optional[str] = None, + **kwargs + ): + """ + :param access: When this parameter has been set, users can email files + to the email address that has been automatically + created for this folder. + + To create an email address, set this property either when + creating or updating the folder. + + When set to `collaborators`, only emails from registered email + addresses for collaborators will be accepted. This includes + any email aliases a user might have registered. + + When set to `open` it will accept emails from any email + address., defaults to None + :type access: Optional[FolderFolderUploadEmailAccessField], optional + :param email: The optional upload email address for this folder., defaults to None + :type email: Optional[str], optional + """ + super().__init__(**kwargs) + self.access = access + self.email = email + + +class FolderItemStatusField(str, Enum): + ACTIVE = 'active' + TRASHED = 'trashed' + DELETED = 'deleted' + + +class Folder(FolderMini): + def __init__( + self, + id: str, + *, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + description: Optional[str] = None, + size: Optional[int] = None, + path_collection: Optional[FolderPathCollectionField] = None, + created_by: Optional[UserMini] = None, + modified_by: Optional[UserMini] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, + owned_by: Optional[UserMini] = None, + shared_link: Optional[FolderSharedLinkField] = None, + folder_upload_email: Optional[FolderFolderUploadEmailField] = None, + parent: Optional[FolderMini] = None, + item_status: Optional[FolderItemStatusField] = None, + item_collection: Optional[Items] = None, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + etag: Optional[str] = None, + type: FolderBaseTypeField = FolderBaseTypeField.FOLDER.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a folder. + + The ID for any folder can be determined + by visiting a folder in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/folders/123` + the `folder_id` is `123`. + :type id: str + :param created_at: The date and time when the folder was created. This value may + be `null` for some folders such as the root folder or the trash + folder., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The date and time when the folder was last updated. This value may + be `null` for some folders such as the root folder or the trash + folder., defaults to None + :type modified_at: Optional[DateTime], optional + :param size: The folder size in bytes. + + Be careful parsing this integer as its + value can get very large., defaults to None + :type size: Optional[int], optional + :param trashed_at: The time at which this folder was put in the trash., defaults to None + :type trashed_at: Optional[DateTime], optional + :param purged_at: The time at which this folder is expected to be purged + from the trash., defaults to None + :type purged_at: Optional[DateTime], optional + :param content_created_at: The date and time at which this folder was originally + created., defaults to None + :type content_created_at: Optional[DateTime], optional + :param content_modified_at: The date and time at which this folder was last updated., defaults to None + :type content_modified_at: Optional[DateTime], optional + :param folder_upload_email: The `folder_upload_email` parameter is not `null` if one of the following options is **true**: + + * The **Allow uploads to this folder via email** and the **Only allow email uploads from collaborators in this folder** are [enabled for a folder in the Admin Console](https://support.box.com/hc/en-us/articles/360043697534-Upload-to-Box-Through-Email), and the user has at least **Upload** permissions granted. + + * The **Allow uploads to this folder via email** setting is enabled for a folder in the Admin Console, and the **Only allow email uploads from collaborators in this folder** setting is deactivated (unchecked). + + If the conditions are not met, the parameter will have the following value: `folder_upload_email: null`, defaults to None + :type folder_upload_email: Optional[FolderFolderUploadEmailField], optional + :param item_status: Defines if this item has been deleted or not. + + * `active` when the item has is not in the trash + * `trashed` when the item has been moved to the trash but not deleted + * `deleted` when the item has been permanently deleted., defaults to None + :type item_status: Optional[FolderItemStatusField], optional + :param name: The name of the folder., defaults to None + :type name: Optional[str], optional + :param etag: The HTTP `etag` of this folder. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the folder if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `folder`, defaults to FolderBaseTypeField.FOLDER.value + :type type: FolderBaseTypeField, optional + """ + super().__init__( + id=id, sequence_id=sequence_id, name=name, etag=etag, type=type, **kwargs + ) + self.created_at = created_at + self.modified_at = modified_at + self.description = description + self.size = size + self.path_collection = path_collection + self.created_by = created_by + self.modified_by = modified_by + self.trashed_at = trashed_at + self.purged_at = purged_at + self.content_created_at = content_created_at + self.content_modified_at = content_modified_at + self.owned_by = owned_by + self.shared_link = shared_link + self.folder_upload_email = folder_upload_email + self.parent = parent + self.item_status = item_status + self.item_collection = item_collection diff --git a/box_sdk_gen/schemas/folder_base.py b/box_sdk_gen/schemas/folder_base.py new file mode 100644 index 0000000..11e8edc --- /dev/null +++ b/box_sdk_gen/schemas/folder_base.py @@ -0,0 +1,42 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class FolderBaseTypeField(str, Enum): + FOLDER = 'folder' + + +class FolderBase(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + id: str, + *, + etag: Optional[str] = None, + type: FolderBaseTypeField = FolderBaseTypeField.FOLDER.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a folder. + + The ID for any folder can be determined + by visiting a folder in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/folders/123` + the `folder_id` is `123`. + :type id: str + :param etag: The HTTP `etag` of this folder. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the folder if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `folder`, defaults to FolderBaseTypeField.FOLDER.value + :type type: FolderBaseTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.etag = etag + self.type = type diff --git a/box_sdk_gen/schemas/folder_full.py b/box_sdk_gen/schemas/folder_full.py new file mode 100644 index 0000000..148da84 --- /dev/null +++ b/box_sdk_gen/schemas/folder_full.py @@ -0,0 +1,306 @@ +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.folder_base import FolderBaseTypeField + +from box_sdk_gen.schemas.folder_base import FolderBase + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.internal.utils import DateTime + +from box_sdk_gen.schemas.folder import FolderPathCollectionField + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.schemas.folder import FolderSharedLinkField + +from box_sdk_gen.schemas.folder import FolderFolderUploadEmailField + +from box_sdk_gen.schemas.folder import FolderItemStatusField + +from box_sdk_gen.schemas.items import Items + +from box_sdk_gen.schemas.folder import Folder + +from box_sdk_gen.schemas.metadata import Metadata + + +class FolderFullSyncStateField(str, Enum): + SYNCED = 'synced' + NOT_SYNCED = 'not_synced' + PARTIALLY_SYNCED = 'partially_synced' + + +class FolderFullPermissionsField(BaseObject): + def __init__( + self, + can_delete: bool, + can_download: bool, + can_invite_collaborator: bool, + can_rename: bool, + can_set_share_access: bool, + can_share: bool, + *, + can_upload: Optional[bool] = None, + **kwargs + ): + """ + :param can_delete: Specifies if the current user can delete this item. + :type can_delete: bool + :param can_download: Specifies if the current user can download this item. + :type can_download: bool + :param can_invite_collaborator: Specifies if the current user can invite new + users to collaborate on this item, and if the user can + update the role of a user already collaborated on this + item. + :type can_invite_collaborator: bool + :param can_rename: Specifies if the user can rename this item. + :type can_rename: bool + :param can_set_share_access: Specifies if the user can change the access level of an + existing shared link on this item. + :type can_set_share_access: bool + :param can_share: Specifies if the user can create a shared link for this item. + :type can_share: bool + :param can_upload: Specifies if the user can upload into this folder., defaults to None + :type can_upload: Optional[bool], optional + """ + super().__init__(**kwargs) + self.can_delete = can_delete + self.can_download = can_download + self.can_invite_collaborator = can_invite_collaborator + self.can_rename = can_rename + self.can_set_share_access = can_set_share_access + self.can_share = can_share + self.can_upload = can_upload + + +class FolderFullMetadataField(BaseObject): + def __init__(self, **kwargs): + super().__init__(**kwargs) + self.extra_data = kwargs + + +class FolderFullAllowedSharedLinkAccessLevelsField(str, Enum): + OPEN = 'open' + COMPANY = 'company' + COLLABORATORS = 'collaborators' + + +class FolderFullAllowedInviteeRolesField(str, Enum): + EDITOR = 'editor' + VIEWER = 'viewer' + PREVIEWER = 'previewer' + UPLOADER = 'uploader' + PREVIEWER_UPLOADER = 'previewer uploader' + VIEWER_UPLOADER = 'viewer uploader' + CO_OWNER = 'co-owner' + + +class FolderFullWatermarkInfoField(BaseObject): + def __init__(self, *, is_watermarked: Optional[bool] = None, **kwargs): + """ + :param is_watermarked: Specifies if this item has a watermark applied., defaults to None + :type is_watermarked: Optional[bool], optional + """ + super().__init__(**kwargs) + self.is_watermarked = is_watermarked + + +class FolderFullClassificationField(BaseObject): + def __init__( + self, + *, + name: Optional[str] = None, + definition: Optional[str] = None, + color: Optional[str] = None, + **kwargs + ): + """ + :param name: The name of the classification, defaults to None + :type name: Optional[str], optional + :param definition: An explanation of the meaning of this classification., defaults to None + :type definition: Optional[str], optional + :param color: The color that is used to display the + classification label in a user-interface. Colors are defined by the admin + or co-admin who created the classification in the Box web app., defaults to None + :type color: Optional[str], optional + """ + super().__init__(**kwargs) + self.name = name + self.definition = definition + self.color = color + + +class FolderFull(Folder): + def __init__( + self, + id: str, + *, + sync_state: Optional[FolderFullSyncStateField] = None, + has_collaborations: Optional[bool] = None, + permissions: Optional[FolderFullPermissionsField] = None, + tags: Optional[List[str]] = None, + can_non_owners_invite: Optional[bool] = None, + is_externally_owned: Optional[bool] = None, + metadata: Optional[FolderFullMetadataField] = None, + is_collaboration_restricted_to_enterprise: Optional[bool] = None, + allowed_shared_link_access_levels: Optional[ + List[FolderFullAllowedSharedLinkAccessLevelsField] + ] = None, + allowed_invitee_roles: Optional[ + List[FolderFullAllowedInviteeRolesField] + ] = None, + watermark_info: Optional[FolderFullWatermarkInfoField] = None, + is_accessible_via_shared_link: Optional[bool] = None, + can_non_owners_view_collaborators: Optional[bool] = None, + classification: Optional[FolderFullClassificationField] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + description: Optional[str] = None, + size: Optional[int] = None, + path_collection: Optional[FolderPathCollectionField] = None, + created_by: Optional[UserMini] = None, + modified_by: Optional[UserMini] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, + owned_by: Optional[UserMini] = None, + shared_link: Optional[FolderSharedLinkField] = None, + folder_upload_email: Optional[FolderFolderUploadEmailField] = None, + parent: Optional[FolderMini] = None, + item_status: Optional[FolderItemStatusField] = None, + item_collection: Optional[Items] = None, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + etag: Optional[str] = None, + type: FolderBaseTypeField = FolderBaseTypeField.FOLDER.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a folder. + + The ID for any folder can be determined + by visiting a folder in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/folders/123` + the `folder_id` is `123`. + :type id: str + :param has_collaborations: Specifies if this folder has any other collaborators., defaults to None + :type has_collaborations: Optional[bool], optional + :param is_externally_owned: Specifies if this folder is owned by a user outside of the + authenticated enterprise., defaults to None + :type is_externally_owned: Optional[bool], optional + :param allowed_shared_link_access_levels: A list of access levels that are available + for this folder. + + For some folders, like the root folder, this will always + be an empty list as sharing is not allowed at that level., defaults to None + :type allowed_shared_link_access_levels: Optional[List[FolderFullAllowedSharedLinkAccessLevelsField]], optional + :param allowed_invitee_roles: A list of the types of roles that user can be invited at + when sharing this folder., defaults to None + :type allowed_invitee_roles: Optional[List[FolderFullAllowedInviteeRolesField]], optional + :param is_accessible_via_shared_link: Specifies if the folder can be accessed + with the direct shared link or a shared link + to a parent folder., defaults to None + :type is_accessible_via_shared_link: Optional[bool], optional + :param can_non_owners_view_collaborators: Specifies if collaborators who are not owners + of this folder are restricted from viewing other + collaborations on this folder. + + It also restricts non-owners from inviting new + collaborators., defaults to None + :type can_non_owners_view_collaborators: Optional[bool], optional + :param created_at: The date and time when the folder was created. This value may + be `null` for some folders such as the root folder or the trash + folder., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The date and time when the folder was last updated. This value may + be `null` for some folders such as the root folder or the trash + folder., defaults to None + :type modified_at: Optional[DateTime], optional + :param size: The folder size in bytes. + + Be careful parsing this integer as its + value can get very large., defaults to None + :type size: Optional[int], optional + :param trashed_at: The time at which this folder was put in the trash., defaults to None + :type trashed_at: Optional[DateTime], optional + :param purged_at: The time at which this folder is expected to be purged + from the trash., defaults to None + :type purged_at: Optional[DateTime], optional + :param content_created_at: The date and time at which this folder was originally + created., defaults to None + :type content_created_at: Optional[DateTime], optional + :param content_modified_at: The date and time at which this folder was last updated., defaults to None + :type content_modified_at: Optional[DateTime], optional + :param folder_upload_email: The `folder_upload_email` parameter is not `null` if one of the following options is **true**: + + * The **Allow uploads to this folder via email** and the **Only allow email uploads from collaborators in this folder** are [enabled for a folder in the Admin Console](https://support.box.com/hc/en-us/articles/360043697534-Upload-to-Box-Through-Email), and the user has at least **Upload** permissions granted. + + * The **Allow uploads to this folder via email** setting is enabled for a folder in the Admin Console, and the **Only allow email uploads from collaborators in this folder** setting is deactivated (unchecked). + + If the conditions are not met, the parameter will have the following value: `folder_upload_email: null`, defaults to None + :type folder_upload_email: Optional[FolderFolderUploadEmailField], optional + :param item_status: Defines if this item has been deleted or not. + + * `active` when the item has is not in the trash + * `trashed` when the item has been moved to the trash but not deleted + * `deleted` when the item has been permanently deleted., defaults to None + :type item_status: Optional[FolderItemStatusField], optional + :param name: The name of the folder., defaults to None + :type name: Optional[str], optional + :param etag: The HTTP `etag` of this folder. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the folder if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `folder`, defaults to FolderBaseTypeField.FOLDER.value + :type type: FolderBaseTypeField, optional + """ + super().__init__( + id=id, + created_at=created_at, + modified_at=modified_at, + description=description, + size=size, + path_collection=path_collection, + created_by=created_by, + modified_by=modified_by, + trashed_at=trashed_at, + purged_at=purged_at, + content_created_at=content_created_at, + content_modified_at=content_modified_at, + owned_by=owned_by, + shared_link=shared_link, + folder_upload_email=folder_upload_email, + parent=parent, + item_status=item_status, + item_collection=item_collection, + sequence_id=sequence_id, + name=name, + etag=etag, + type=type, + **kwargs + ) + self.sync_state = sync_state + self.has_collaborations = has_collaborations + self.permissions = permissions + self.tags = tags + self.can_non_owners_invite = can_non_owners_invite + self.is_externally_owned = is_externally_owned + self.metadata = metadata + self.is_collaboration_restricted_to_enterprise = ( + is_collaboration_restricted_to_enterprise + ) + self.allowed_shared_link_access_levels = allowed_shared_link_access_levels + self.allowed_invitee_roles = allowed_invitee_roles + self.watermark_info = watermark_info + self.is_accessible_via_shared_link = is_accessible_via_shared_link + self.can_non_owners_view_collaborators = can_non_owners_view_collaborators + self.classification = classification diff --git a/box_sdk_gen/schemas/folder_lock.py b/box_sdk_gen/schemas/folder_lock.py new file mode 100644 index 0000000..47365f2 --- /dev/null +++ b/box_sdk_gen/schemas/folder_lock.py @@ -0,0 +1,60 @@ +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Optional + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.internal.utils import DateTime + + +class FolderLockLockedOperationsField(BaseObject): + def __init__(self, move: bool, delete: bool, **kwargs): + """ + :param move: Whether moving the folder is restricted. + :type move: bool + :param delete: Whether deleting the folder is restricted. + :type delete: bool + """ + super().__init__(**kwargs) + self.move = move + self.delete = delete + + +class FolderLock(BaseObject): + def __init__( + self, + *, + folder: Optional[FolderMini] = None, + id: Optional[str] = None, + type: Optional[str] = None, + created_by: Optional[UserBase] = None, + created_at: Optional[DateTime] = None, + locked_operations: Optional[FolderLockLockedOperationsField] = None, + lock_type: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this folder lock., defaults to None + :type id: Optional[str], optional + :param type: The object type, always `folder_lock`., defaults to None + :type type: Optional[str], optional + :param created_at: When the folder lock object was created., defaults to None + :type created_at: Optional[DateTime], optional + :param locked_operations: The operations that have been locked. Currently the `move` + and `delete` operations cannot be locked separately, and both need to be + set to `true`. + , defaults to None + :type locked_operations: Optional[FolderLockLockedOperationsField], optional + :param lock_type: The lock type, always `freeze`., defaults to None + :type lock_type: Optional[str], optional + """ + super().__init__(**kwargs) + self.folder = folder + self.id = id + self.type = type + self.created_by = created_by + self.created_at = created_at + self.locked_operations = locked_operations + self.lock_type = lock_type diff --git a/box_sdk_gen/schemas/folder_locks.py b/box_sdk_gen/schemas/folder_locks.py new file mode 100644 index 0000000..cae3817 --- /dev/null +++ b/box_sdk_gen/schemas/folder_locks.py @@ -0,0 +1,32 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.folder_lock import FolderLock + + +class FolderLocks(BaseObject): + def __init__( + self, + *, + entries: Optional[List[FolderLock]] = None, + limit: Optional[str] = None, + next_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of folder locks, defaults to None + :type entries: Optional[List[FolderLock]], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[str], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker diff --git a/box_sdk_gen/schemas/folder_mini.py b/box_sdk_gen/schemas/folder_mini.py new file mode 100644 index 0000000..569aef6 --- /dev/null +++ b/box_sdk_gen/schemas/folder_mini.py @@ -0,0 +1,39 @@ +from typing import Optional + +from box_sdk_gen.schemas.folder_base import FolderBaseTypeField + +from box_sdk_gen.schemas.folder_base import FolderBase + + +class FolderMini(FolderBase): + def __init__( + self, + id: str, + *, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + etag: Optional[str] = None, + type: FolderBaseTypeField = FolderBaseTypeField.FOLDER.value, + **kwargs + ): + """ + :param id: The unique identifier that represent a folder. + + The ID for any folder can be determined + by visiting a folder in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/folders/123` + the `folder_id` is `123`. + :type id: str + :param name: The name of the folder., defaults to None + :type name: Optional[str], optional + :param etag: The HTTP `etag` of this folder. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the folder if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `folder`, defaults to FolderBaseTypeField.FOLDER.value + :type type: FolderBaseTypeField, optional + """ + super().__init__(id=id, etag=etag, type=type, **kwargs) + self.sequence_id = sequence_id + self.name = name diff --git a/box_sdk_gen/schemas/generic_source.py b/box_sdk_gen/schemas/generic_source.py new file mode 100644 index 0000000..e69de29 diff --git a/box_sdk_gen/schemas/group.py b/box_sdk_gen/schemas/group.py new file mode 100644 index 0000000..52da453 --- /dev/null +++ b/box_sdk_gen/schemas/group.py @@ -0,0 +1,42 @@ +from typing import Optional + +from box_sdk_gen.schemas.group_base import GroupBaseTypeField + +from box_sdk_gen.schemas.group_base import GroupBase + +from box_sdk_gen.schemas.group_mini import GroupMiniGroupTypeField + +from box_sdk_gen.schemas.group_mini import GroupMini + +from box_sdk_gen.internal.utils import DateTime + + +class Group(GroupMini): + def __init__( + self, + id: str, + *, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + name: Optional[str] = None, + group_type: Optional[GroupMiniGroupTypeField] = None, + type: GroupBaseTypeField = GroupBaseTypeField.GROUP.value, + **kwargs + ): + """ + :param id: The unique identifier for this object + :type id: str + :param created_at: When the group object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the group object was last modified, defaults to None + :type modified_at: Optional[DateTime], optional + :param name: The name of the group, defaults to None + :type name: Optional[str], optional + :param group_type: The type of the group., defaults to None + :type group_type: Optional[GroupMiniGroupTypeField], optional + :param type: `group`, defaults to GroupBaseTypeField.GROUP.value + :type type: GroupBaseTypeField, optional + """ + super().__init__(id=id, name=name, group_type=group_type, type=type, **kwargs) + self.created_at = created_at + self.modified_at = modified_at diff --git a/box_sdk_gen/schemas/group_base.py b/box_sdk_gen/schemas/group_base.py new file mode 100644 index 0000000..f17be54 --- /dev/null +++ b/box_sdk_gen/schemas/group_base.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class GroupBaseTypeField(str, Enum): + GROUP = 'group' + + +class GroupBase(BaseObject): + _discriminator = 'type', {'group'} + + def __init__( + self, + id: str, + *, + type: GroupBaseTypeField = GroupBaseTypeField.GROUP.value, + **kwargs + ): + """ + :param id: The unique identifier for this object + :type id: str + :param type: `group`, defaults to GroupBaseTypeField.GROUP.value + :type type: GroupBaseTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/group_full.py b/box_sdk_gen/schemas/group_full.py new file mode 100644 index 0000000..4b98d25 --- /dev/null +++ b/box_sdk_gen/schemas/group_full.py @@ -0,0 +1,126 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.group_base import GroupBaseTypeField + +from box_sdk_gen.schemas.group_base import GroupBase + +from box_sdk_gen.schemas.group_mini import GroupMiniGroupTypeField + +from box_sdk_gen.schemas.group_mini import GroupMini + +from box_sdk_gen.internal.utils import DateTime + +from box_sdk_gen.schemas.group import Group + + +class GroupFullInvitabilityLevelField(str, Enum): + ADMINS_ONLY = 'admins_only' + ADMINS_AND_MEMBERS = 'admins_and_members' + ALL_MANAGED_USERS = 'all_managed_users' + + +class GroupFullMemberViewabilityLevelField(str, Enum): + ADMINS_ONLY = 'admins_only' + ADMINS_AND_MEMBERS = 'admins_and_members' + ALL_MANAGED_USERS = 'all_managed_users' + + +class GroupFullPermissionsField(BaseObject): + def __init__(self, *, can_invite_as_collaborator: Optional[bool] = None, **kwargs): + """ + :param can_invite_as_collaborator: Specifies if the user can invite the group to collaborate on any items., defaults to None + :type can_invite_as_collaborator: Optional[bool], optional + """ + super().__init__(**kwargs) + self.can_invite_as_collaborator = can_invite_as_collaborator + + +class GroupFull(Group): + def __init__( + self, + id: str, + *, + provenance: Optional[str] = None, + external_sync_identifier: Optional[str] = None, + description: Optional[str] = None, + invitability_level: Optional[GroupFullInvitabilityLevelField] = None, + member_viewability_level: Optional[GroupFullMemberViewabilityLevelField] = None, + permissions: Optional[GroupFullPermissionsField] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + name: Optional[str] = None, + group_type: Optional[GroupMiniGroupTypeField] = None, + type: GroupBaseTypeField = GroupBaseTypeField.GROUP.value, + **kwargs + ): + """ + :param id: The unique identifier for this object + :type id: str + :param provenance: Keeps track of which external source this group is + coming from (e.g. "Active Directory", "Google Groups", + "Facebook Groups"). Setting this will + also prevent Box users from editing the group name + and its members directly via the Box web application. + This is desirable for one-way syncing of groups., defaults to None + :type provenance: Optional[str], optional + :param external_sync_identifier: An arbitrary identifier that can be used by + external group sync tools to link this Box Group to + an external group. Example values of this field + could be an Active Directory Object ID or a Google + Group ID. We recommend you use of this field in + order to avoid issues when group names are updated in + either Box or external systems., defaults to None + :type external_sync_identifier: Optional[str], optional + :param description: Human readable description of the group., defaults to None + :type description: Optional[str], optional + :param invitability_level: Specifies who can invite the group to collaborate + on items. + + When set to `admins_only` the enterprise admin, co-admins, + and the group's admin can invite the group. + + When set to `admins_and_members` all the admins listed + above and group members can invite the group. + + When set to `all_managed_users` all managed users in the + enterprise can invite the group., defaults to None + :type invitability_level: Optional[GroupFullInvitabilityLevelField], optional + :param member_viewability_level: Specifies who can view the members of the group + (Get Memberships for Group). + + * `admins_only` - the enterprise admin, co-admins, group's + group admin + * `admins_and_members` - all admins and group members + * `all_managed_users` - all managed users in the + enterprise, defaults to None + :type member_viewability_level: Optional[GroupFullMemberViewabilityLevelField], optional + :param created_at: When the group object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the group object was last modified, defaults to None + :type modified_at: Optional[DateTime], optional + :param name: The name of the group, defaults to None + :type name: Optional[str], optional + :param group_type: The type of the group., defaults to None + :type group_type: Optional[GroupMiniGroupTypeField], optional + :param type: `group`, defaults to GroupBaseTypeField.GROUP.value + :type type: GroupBaseTypeField, optional + """ + super().__init__( + id=id, + created_at=created_at, + modified_at=modified_at, + name=name, + group_type=group_type, + type=type, + **kwargs + ) + self.provenance = provenance + self.external_sync_identifier = external_sync_identifier + self.description = description + self.invitability_level = invitability_level + self.member_viewability_level = member_viewability_level + self.permissions = permissions diff --git a/box_sdk_gen/schemas/group_membership.py b/box_sdk_gen/schemas/group_membership.py new file mode 100644 index 0000000..e83d138 --- /dev/null +++ b/box_sdk_gen/schemas/group_membership.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.schemas.user_mini import UserMini + +from box_sdk_gen.schemas.group_mini import GroupMini + +from box_sdk_gen.internal.utils import DateTime + + +class GroupMembershipTypeField(str, Enum): + GROUP_MEMBERSHIP = 'group_membership' + + +class GroupMembershipRoleField(str, Enum): + MEMBER = 'member' + ADMIN = 'admin' + + +class GroupMembership(BaseObject): + _discriminator = 'type', {'group_membership'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[GroupMembershipTypeField] = None, + user: Optional[UserMini] = None, + group: Optional[GroupMini] = None, + role: Optional[GroupMembershipRoleField] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param id: The unique identifier for this group membership, defaults to None + :type id: Optional[str], optional + :param type: `group_membership`, defaults to None + :type type: Optional[GroupMembershipTypeField], optional + :param role: The role of the user in the group., defaults to None + :type role: Optional[GroupMembershipRoleField], optional + :param created_at: The time this membership was created., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The time this membership was last modified., defaults to None + :type modified_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.user = user + self.group = group + self.role = role + self.created_at = created_at + self.modified_at = modified_at diff --git a/box_sdk_gen/schemas/group_memberships.py b/box_sdk_gen/schemas/group_memberships.py new file mode 100644 index 0000000..a80848d --- /dev/null +++ b/box_sdk_gen/schemas/group_memberships.py @@ -0,0 +1,78 @@ +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.group_membership import GroupMembership + + +class GroupMembershipsOrderDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class GroupMembershipsOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[str] = None, + direction: Optional[GroupMembershipsOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field to order by, defaults to None + :type by: Optional[str], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[GroupMembershipsOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class GroupMemberships(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + order: Optional[List[GroupMembershipsOrderField]] = None, + entries: Optional[List[GroupMembership]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type offset: Optional[int], optional + :param order: The order by which items are returned. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type order: Optional[List[GroupMembershipsOrderField]], optional + :param entries: A list of group memberships, defaults to None + :type entries: Optional[List[GroupMembership]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.order = order + self.entries = entries diff --git a/box_sdk_gen/schemas/group_mini.py b/box_sdk_gen/schemas/group_mini.py new file mode 100644 index 0000000..3e99c2c --- /dev/null +++ b/box_sdk_gen/schemas/group_mini.py @@ -0,0 +1,37 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.schemas.group_base import GroupBaseTypeField + +from box_sdk_gen.schemas.group_base import GroupBase + + +class GroupMiniGroupTypeField(str, Enum): + MANAGED_GROUP = 'managed_group' + ALL_USERS_GROUP = 'all_users_group' + + +class GroupMini(GroupBase): + def __init__( + self, + id: str, + *, + name: Optional[str] = None, + group_type: Optional[GroupMiniGroupTypeField] = None, + type: GroupBaseTypeField = GroupBaseTypeField.GROUP.value, + **kwargs + ): + """ + :param id: The unique identifier for this object + :type id: str + :param name: The name of the group, defaults to None + :type name: Optional[str], optional + :param group_type: The type of the group., defaults to None + :type group_type: Optional[GroupMiniGroupTypeField], optional + :param type: `group`, defaults to GroupBaseTypeField.GROUP.value + :type type: GroupBaseTypeField, optional + """ + super().__init__(id=id, type=type, **kwargs) + self.name = name + self.group_type = group_type diff --git a/box_sdk_gen/schemas/groups.py b/box_sdk_gen/schemas/groups.py new file mode 100644 index 0000000..da6ff59 --- /dev/null +++ b/box_sdk_gen/schemas/groups.py @@ -0,0 +1,78 @@ +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.group_full import GroupFull + + +class GroupsOrderDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class GroupsOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[str] = None, + direction: Optional[GroupsOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field to order by, defaults to None + :type by: Optional[str], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[GroupsOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class Groups(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + order: Optional[List[GroupsOrderField]] = None, + entries: Optional[List[GroupFull]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type offset: Optional[int], optional + :param order: The order by which items are returned. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type order: Optional[List[GroupsOrderField]], optional + :param entries: A list of groups, defaults to None + :type entries: Optional[List[GroupFull]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.order = order + self.entries = entries diff --git a/box_sdk_gen/schemas/integration_mapping.py b/box_sdk_gen/schemas/integration_mapping.py new file mode 100644 index 0000000..7f82030 --- /dev/null +++ b/box_sdk_gen/schemas/integration_mapping.py @@ -0,0 +1,92 @@ +from enum import Enum + +from typing import Union + +from typing import Optional + +from box_sdk_gen.schemas.integration_mapping_base import ( + IntegrationMappingBaseIntegrationTypeField, +) + +from box_sdk_gen.schemas.integration_mapping_base import IntegrationMappingBase + +from box_sdk_gen.schemas.integration_mapping_partner_item_slack import ( + IntegrationMappingPartnerItemSlack, +) + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.integration_mapping_slack_options import ( + IntegrationMappingSlackOptions, +) + +from box_sdk_gen.schemas.user_integration_mappings import UserIntegrationMappings + +from box_sdk_gen.internal.utils import DateTime + + +class IntegrationMappingTypeField(str, Enum): + INTEGRATION_MAPPING = 'integration_mapping' + + +class IntegrationMapping(IntegrationMappingBase): + def __init__( + self, + partner_item: Union[IntegrationMappingPartnerItemSlack], + box_item: FolderMini, + *, + type: IntegrationMappingTypeField = IntegrationMappingTypeField.INTEGRATION_MAPPING.value, + is_manually_created: Optional[bool] = None, + options: Optional[IntegrationMappingSlackOptions] = None, + created_by: Optional[UserIntegrationMappings] = None, + modified_by: Optional[UserIntegrationMappings] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + id: Optional[str] = None, + integration_type: Optional[IntegrationMappingBaseIntegrationTypeField] = None, + **kwargs + ): + """ + :param partner_item: Mapped item object for Slack + :type partner_item: Union[IntegrationMappingPartnerItemSlack] + :param box_item: The Box folder, to which the object from the + partner app domain (referenced in `partner_item_id`) is mapped + :type box_item: FolderMini + :param type: Mapping type, defaults to IntegrationMappingTypeField.INTEGRATION_MAPPING.value + :type type: IntegrationMappingTypeField, optional + :param is_manually_created: Identifies whether the mapping has + been manually set + (as opposed to being automatically created), defaults to None + :type is_manually_created: Optional[bool], optional + :param options: Integration mapping options for Slack, defaults to None + :type options: Optional[IntegrationMappingSlackOptions], optional + :param created_by: An object representing the user who + created the integration mapping, defaults to None + :type created_by: Optional[UserIntegrationMappings], optional + :param modified_by: The user who + last modified the integration mapping, defaults to None + :type modified_by: Optional[UserIntegrationMappings], optional + :param created_at: When the integration mapping object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the integration mapping object was last modified, defaults to None + :type modified_at: Optional[DateTime], optional + :param id: A unique identifier of a folder mapping + (part of a composite key together + with `integration_type`), defaults to None + :type id: Optional[str], optional + :param integration_type: Identifies the Box partner app, + with which the mapping is associated. + Currently only supports Slack. + (part of the composite key together with `id`), defaults to None + :type integration_type: Optional[IntegrationMappingBaseIntegrationTypeField], optional + """ + super().__init__(id=id, integration_type=integration_type, **kwargs) + self.partner_item = partner_item + self.box_item = box_item + self.type = type + self.is_manually_created = is_manually_created + self.options = options + self.created_by = created_by + self.modified_by = modified_by + self.created_at = created_at + self.modified_at = modified_at diff --git a/box_sdk_gen/schemas/integration_mapping_base.py b/box_sdk_gen/schemas/integration_mapping_base.py new file mode 100644 index 0000000..74a889d --- /dev/null +++ b/box_sdk_gen/schemas/integration_mapping_base.py @@ -0,0 +1,33 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class IntegrationMappingBaseIntegrationTypeField(str, Enum): + SLACK = 'slack' + + +class IntegrationMappingBase(BaseObject): + def __init__( + self, + *, + id: Optional[str] = None, + integration_type: Optional[IntegrationMappingBaseIntegrationTypeField] = None, + **kwargs + ): + """ + :param id: A unique identifier of a folder mapping + (part of a composite key together + with `integration_type`), defaults to None + :type id: Optional[str], optional + :param integration_type: Identifies the Box partner app, + with which the mapping is associated. + Currently only supports Slack. + (part of the composite key together with `id`), defaults to None + :type integration_type: Optional[IntegrationMappingBaseIntegrationTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.integration_type = integration_type diff --git a/box_sdk_gen/schemas/integration_mapping_box_item_slack.py b/box_sdk_gen/schemas/integration_mapping_box_item_slack.py new file mode 100644 index 0000000..36d0f57 --- /dev/null +++ b/box_sdk_gen/schemas/integration_mapping_box_item_slack.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class IntegrationMappingBoxItemSlackTypeField(str, Enum): + FOLDER = 'folder' + + +class IntegrationMappingBoxItemSlack(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + id: str, + *, + type: IntegrationMappingBoxItemSlackTypeField = IntegrationMappingBoxItemSlackTypeField.FOLDER.value, + **kwargs + ): + """ + :param id: ID of the mapped item (of type referenced in `type`) + :type id: str + :param type: Type of the mapped item referenced in `id`, defaults to IntegrationMappingBoxItemSlackTypeField.FOLDER.value + :type type: IntegrationMappingBoxItemSlackTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/integration_mapping_mini.py b/box_sdk_gen/schemas/integration_mapping_mini.py new file mode 100644 index 0000000..32f0ff8 --- /dev/null +++ b/box_sdk_gen/schemas/integration_mapping_mini.py @@ -0,0 +1,55 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.schemas.integration_mapping_base import ( + IntegrationMappingBaseIntegrationTypeField, +) + +from box_sdk_gen.schemas.integration_mapping_base import IntegrationMappingBase + + +class IntegrationMappingMiniPartnerItemTypeField(str, Enum): + CHANNEL = 'channel' + + +class IntegrationMappingMiniBoxItemTypeField(str, Enum): + FOLDER = 'folder' + + +class IntegrationMappingMini(IntegrationMappingBase): + def __init__( + self, + *, + partner_item_id: Optional[str] = None, + partner_item_type: Optional[IntegrationMappingMiniPartnerItemTypeField] = None, + box_item_id: Optional[str] = None, + box_item_type: Optional[IntegrationMappingMiniBoxItemTypeField] = None, + id: Optional[str] = None, + integration_type: Optional[IntegrationMappingBaseIntegrationTypeField] = None, + **kwargs + ): + """ + :param partner_item_id: ID of the mapped partner item, defaults to None + :type partner_item_id: Optional[str], optional + :param partner_item_type: Domain-specific type of the mapped partner item, defaults to None + :type partner_item_type: Optional[IntegrationMappingMiniPartnerItemTypeField], optional + :param box_item_id: ID of the Box item mapped to the object referenced in `partner_item_id`, defaults to None + :type box_item_id: Optional[str], optional + :param box_item_type: Type of the Box object referenced in `box_item_id`, defaults to None + :type box_item_type: Optional[IntegrationMappingMiniBoxItemTypeField], optional + :param id: A unique identifier of a folder mapping + (part of a composite key together + with `integration_type`), defaults to None + :type id: Optional[str], optional + :param integration_type: Identifies the Box partner app, + with which the mapping is associated. + Currently only supports Slack. + (part of the composite key together with `id`), defaults to None + :type integration_type: Optional[IntegrationMappingBaseIntegrationTypeField], optional + """ + super().__init__(id=id, integration_type=integration_type, **kwargs) + self.partner_item_id = partner_item_id + self.partner_item_type = partner_item_type + self.box_item_id = box_item_id + self.box_item_type = box_item_type diff --git a/box_sdk_gen/schemas/integration_mapping_partner_item_slack.py b/box_sdk_gen/schemas/integration_mapping_partner_item_slack.py new file mode 100644 index 0000000..68bb152 --- /dev/null +++ b/box_sdk_gen/schemas/integration_mapping_partner_item_slack.py @@ -0,0 +1,38 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class IntegrationMappingPartnerItemSlackTypeField(str, Enum): + CHANNEL = 'channel' + + +class IntegrationMappingPartnerItemSlack(BaseObject): + _discriminator = 'type', {'channel'} + + def __init__( + self, + id: str, + *, + type: IntegrationMappingPartnerItemSlackTypeField = IntegrationMappingPartnerItemSlackTypeField.CHANNEL.value, + slack_workspace_id: Optional[str] = None, + slack_org_id: Optional[str] = None, + **kwargs + ): + """ + :param id: ID of the mapped item (of type referenced in `type`) + :type id: str + :param type: Type of the mapped item referenced in `id`, defaults to IntegrationMappingPartnerItemSlackTypeField.CHANNEL.value + :type type: IntegrationMappingPartnerItemSlackTypeField, optional + :param slack_workspace_id: ID of the Slack workspace with which the item is associated. Use this parameter if Box for Slack is installed at a workspace level. Do not use `slack_org_id` at the same time., defaults to None + :type slack_workspace_id: Optional[str], optional + :param slack_org_id: ID of the Slack org with which the item is associated. Use this parameter if Box for Slack is installed at the org level. Do not use `slack_workspace_id` at the same time., defaults to None + :type slack_org_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.slack_workspace_id = slack_workspace_id + self.slack_org_id = slack_org_id diff --git a/box_sdk_gen/schemas/integration_mapping_slack_create_request.py b/box_sdk_gen/schemas/integration_mapping_slack_create_request.py new file mode 100644 index 0000000..65d234e --- /dev/null +++ b/box_sdk_gen/schemas/integration_mapping_slack_create_request.py @@ -0,0 +1,30 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.integration_mapping_partner_item_slack import ( + IntegrationMappingPartnerItemSlack, +) + +from box_sdk_gen.schemas.integration_mapping_box_item_slack import ( + IntegrationMappingBoxItemSlack, +) + +from box_sdk_gen.schemas.integration_mapping_slack_options import ( + IntegrationMappingSlackOptions, +) + + +class IntegrationMappingSlackCreateRequest(BaseObject): + def __init__( + self, + partner_item: IntegrationMappingPartnerItemSlack, + box_item: IntegrationMappingBoxItemSlack, + *, + options: Optional[IntegrationMappingSlackOptions] = None, + **kwargs + ): + super().__init__(**kwargs) + self.partner_item = partner_item + self.box_item = box_item + self.options = options diff --git a/box_sdk_gen/schemas/integration_mapping_slack_options.py b/box_sdk_gen/schemas/integration_mapping_slack_options.py new file mode 100644 index 0000000..c6a03e4 --- /dev/null +++ b/box_sdk_gen/schemas/integration_mapping_slack_options.py @@ -0,0 +1,19 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class IntegrationMappingSlackOptions(BaseObject): + def __init__( + self, *, is_access_management_disabled: Optional[bool] = None, **kwargs + ): + """ + :param is_access_management_disabled: Indicates whether or not channel member + access to the underlying box item + should be automatically managed. + Depending on type of channel, access is managed + through creating collaborations or shared links., defaults to None + :type is_access_management_disabled: Optional[bool], optional + """ + super().__init__(**kwargs) + self.is_access_management_disabled = is_access_management_disabled diff --git a/box_sdk_gen/schemas/integration_mappings.py b/box_sdk_gen/schemas/integration_mappings.py new file mode 100644 index 0000000..08c2f16 --- /dev/null +++ b/box_sdk_gen/schemas/integration_mappings.py @@ -0,0 +1,32 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.integration_mapping import IntegrationMapping + + +class IntegrationMappings(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + entries: Optional[List[IntegrationMapping]] = None, + **kwargs + ): + """ + :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 entries: A list of integration mappings, defaults to None + :type entries: Optional[List[IntegrationMapping]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/invite.py b/box_sdk_gen/schemas/invite.py new file mode 100644 index 0000000..ddd2227 --- /dev/null +++ b/box_sdk_gen/schemas/invite.py @@ -0,0 +1,83 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class InviteTypeField(str, Enum): + INVITE = 'invite' + + +class InviteInvitedToTypeField(str, Enum): + ENTERPRISE = 'enterprise' + + +class InviteInvitedToField(BaseObject): + _discriminator = 'type', {'enterprise'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[InviteInvitedToTypeField] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this enterprise., defaults to None + :type id: Optional[str], optional + :param type: `enterprise`, defaults to None + :type type: Optional[InviteInvitedToTypeField], optional + :param name: The name of the enterprise, defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + + +class Invite(BaseObject): + _discriminator = 'type', {'invite'} + + def __init__( + self, + id: str, + *, + type: InviteTypeField = InviteTypeField.INVITE.value, + invited_to: Optional[InviteInvitedToField] = None, + actionable_by: Optional[UserMini] = None, + invited_by: Optional[UserMini] = None, + status: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param id: The unique identifier for this invite + :type id: str + :param type: `invite`, defaults to InviteTypeField.INVITE.value + :type type: InviteTypeField, optional + :param invited_to: A representation of a Box enterprise, defaults to None + :type invited_to: Optional[InviteInvitedToField], optional + :param status: The status of the invite, defaults to None + :type status: Optional[str], optional + :param created_at: When the invite was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the invite was modified., defaults to None + :type modified_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.invited_to = invited_to + self.actionable_by = actionable_by + self.invited_by = invited_by + self.status = status + self.created_at = created_at + self.modified_at = modified_at diff --git a/box_sdk_gen/schemas/items.py b/box_sdk_gen/schemas/items.py new file mode 100644 index 0000000..09348db --- /dev/null +++ b/box_sdk_gen/schemas/items.py @@ -0,0 +1,84 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + +from typing import Union + +from box_sdk_gen.schemas.file_full import FileFull + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.web_link import WebLink + + +class ItemsOrderDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class ItemsOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[str] = None, + direction: Optional[ItemsOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field to order by, defaults to None + :type by: Optional[str], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[ItemsOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class Items(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + order: Optional[List[ItemsOrderField]] = None, + entries: Optional[List[Union[FileFull, FolderMini, WebLink]]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type offset: Optional[int], optional + :param order: The order by which items are returned. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type order: Optional[List[ItemsOrderField]], optional + :param entries: The items in this collection., defaults to None + :type entries: Optional[List[Union[FileFull, FolderMini, WebLink]]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.order = order + self.entries = entries diff --git a/box_sdk_gen/schemas/keyword_skill_card.py b/box_sdk_gen/schemas/keyword_skill_card.py new file mode 100644 index 0000000..e15cc7a --- /dev/null +++ b/box_sdk_gen/schemas/keyword_skill_card.py @@ -0,0 +1,137 @@ +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.internal.utils import DateTime + + +class KeywordSkillCardTypeField(str, Enum): + SKILL_CARD = 'skill_card' + + +class KeywordSkillCardSkillCardTypeField(str, Enum): + KEYWORD = 'keyword' + + +class KeywordSkillCardSkillCardTitleField(BaseObject): + def __init__(self, message: str, *, code: Optional[str] = None, **kwargs): + """ + :param message: The actual title to show in the UI. + :type message: str + :param code: An optional identifier for the title., defaults to None + :type code: Optional[str], optional + """ + super().__init__(**kwargs) + self.message = message + self.code = code + + +class KeywordSkillCardSkillTypeField(str, Enum): + SERVICE = 'service' + + +class KeywordSkillCardSkillField(BaseObject): + _discriminator = 'type', {'service'} + + def __init__( + self, + id: str, + *, + type: KeywordSkillCardSkillTypeField = KeywordSkillCardSkillTypeField.SERVICE.value, + **kwargs + ): + """ + :param id: A custom identifier that represent the service that + applied this metadata. + :type id: str + :param type: `service`, defaults to KeywordSkillCardSkillTypeField.SERVICE.value + :type type: KeywordSkillCardSkillTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class KeywordSkillCardInvocationTypeField(str, Enum): + SKILL_INVOCATION = 'skill_invocation' + + +class KeywordSkillCardInvocationField(BaseObject): + _discriminator = 'type', {'skill_invocation'} + + def __init__( + self, + id: str, + *, + type: KeywordSkillCardInvocationTypeField = KeywordSkillCardInvocationTypeField.SKILL_INVOCATION.value, + **kwargs + ): + """ + :param id: A custom identifier that represent the instance of + the service that applied this metadata. For example, + if your `image-recognition-service` runs on multiple + nodes, this field can be used to identify the ID of + the node that was used to apply the metadata. + :type id: str + :param type: `skill_invocation`, defaults to KeywordSkillCardInvocationTypeField.SKILL_INVOCATION.value + :type type: KeywordSkillCardInvocationTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class KeywordSkillCardEntriesField(BaseObject): + def __init__(self, *, text: Optional[str] = None, **kwargs): + """ + :param text: The text of the keyword., defaults to None + :type text: Optional[str], optional + """ + super().__init__(**kwargs) + self.text = text + + +class KeywordSkillCard(BaseObject): + _discriminator = 'skill_card_type', {'keyword'} + + def __init__( + self, + skill: KeywordSkillCardSkillField, + invocation: KeywordSkillCardInvocationField, + entries: List[KeywordSkillCardEntriesField], + *, + created_at: Optional[DateTime] = None, + type: KeywordSkillCardTypeField = KeywordSkillCardTypeField.SKILL_CARD.value, + skill_card_type: KeywordSkillCardSkillCardTypeField = KeywordSkillCardSkillCardTypeField.KEYWORD.value, + skill_card_title: Optional[KeywordSkillCardSkillCardTitleField] = None, + **kwargs + ): + """ + :param skill: The service that applied this metadata. + :type skill: KeywordSkillCardSkillField + :param invocation: The invocation of this service, used to track + which instance of a service applied the metadata. + :type invocation: KeywordSkillCardInvocationField + :param entries: An list of entries in the metadata card. + :type entries: List[KeywordSkillCardEntriesField] + :param created_at: The optional date and time this card was created at., defaults to None + :type created_at: Optional[DateTime], optional + :param type: `skill_card`, defaults to KeywordSkillCardTypeField.SKILL_CARD.value + :type type: KeywordSkillCardTypeField, optional + :param skill_card_type: `keyword`, defaults to KeywordSkillCardSkillCardTypeField.KEYWORD.value + :type skill_card_type: KeywordSkillCardSkillCardTypeField, optional + :param skill_card_title: The title of the card., defaults to None + :type skill_card_title: Optional[KeywordSkillCardSkillCardTitleField], optional + """ + super().__init__(**kwargs) + self.skill = skill + self.invocation = invocation + self.entries = entries + self.created_at = created_at + self.type = type + self.skill_card_type = skill_card_type + self.skill_card_title = skill_card_title diff --git a/box_sdk_gen/schemas/legal_hold_policies.py b/box_sdk_gen/schemas/legal_hold_policies.py new file mode 100644 index 0000000..7f726a8 --- /dev/null +++ b/box_sdk_gen/schemas/legal_hold_policies.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.legal_hold_policy import LegalHoldPolicy + + +class LegalHoldPolicies(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[LegalHoldPolicy]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of legal hold policies, defaults to None + :type entries: Optional[List[LegalHoldPolicy]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/legal_hold_policy.py b/box_sdk_gen/schemas/legal_hold_policy.py new file mode 100644 index 0000000..7b60624 --- /dev/null +++ b/box_sdk_gen/schemas/legal_hold_policy.py @@ -0,0 +1,119 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.legal_hold_policy_mini import LegalHoldPolicyMiniTypeField + +from box_sdk_gen.schemas.legal_hold_policy_mini import LegalHoldPolicyMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class LegalHoldPolicyStatusField(str, Enum): + ACTIVE = 'active' + APPLYING = 'applying' + RELEASING = 'releasing' + RELEASED = 'released' + + +class LegalHoldPolicyAssignmentCountsField(BaseObject): + def __init__( + self, + *, + user: Optional[int] = None, + folder: Optional[int] = None, + file: Optional[int] = None, + file_version: Optional[int] = None, + **kwargs + ): + """ + :param user: The number of users this policy is applied to, defaults to None + :type user: Optional[int], optional + :param folder: The number of folders this policy is applied to, defaults to None + :type folder: Optional[int], optional + :param file: The number of files this policy is applied to, defaults to None + :type file: Optional[int], optional + :param file_version: The number of file versions this policy is applied to, defaults to None + :type file_version: Optional[int], optional + """ + super().__init__(**kwargs) + self.user = user + self.folder = folder + self.file = file + self.file_version = file_version + + +class LegalHoldPolicy(LegalHoldPolicyMini): + def __init__( + self, + id: str, + *, + policy_name: Optional[str] = None, + description: Optional[str] = None, + status: Optional[LegalHoldPolicyStatusField] = None, + assignment_counts: Optional[LegalHoldPolicyAssignmentCountsField] = None, + created_by: Optional[UserMini] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + deleted_at: Optional[DateTime] = None, + filter_started_at: Optional[DateTime] = None, + filter_ended_at: Optional[DateTime] = None, + release_notes: Optional[str] = None, + type: LegalHoldPolicyMiniTypeField = LegalHoldPolicyMiniTypeField.LEGAL_HOLD_POLICY.value, + **kwargs + ): + """ + :param id: The unique identifier for this legal hold policy + :type id: str + :param policy_name: Name of the legal hold policy., defaults to None + :type policy_name: Optional[str], optional + :param description: Description of the legal hold policy. Optional + property with a 500 character limit., defaults to None + :type description: Optional[str], optional + :param status: * 'active' - the policy is not in a transition state + * 'applying' - that the policy is in the process of + being applied + * 'releasing' - that the process is in the process + of being released + * 'released' - the policy is no longer active, defaults to None + :type status: Optional[LegalHoldPolicyStatusField], optional + :param assignment_counts: Counts of assignments within this a legal hold policy by item type, defaults to None + :type assignment_counts: Optional[LegalHoldPolicyAssignmentCountsField], optional + :param created_at: When the legal hold policy object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the legal hold policy object was modified. + Does not update when assignments are added or removed., defaults to None + :type modified_at: Optional[DateTime], optional + :param deleted_at: When the policy release request was sent. (Because + it can take time for a policy to fully delete, this + isn't quite the same time that the policy is fully deleted). + + If `null`, the policy was not deleted., defaults to None + :type deleted_at: Optional[DateTime], optional + :param filter_started_at: User-specified, optional date filter applies to + Custodian assignments only, defaults to None + :type filter_started_at: Optional[DateTime], optional + :param filter_ended_at: User-specified, optional date filter applies to + Custodian assignments only, defaults to None + :type filter_ended_at: Optional[DateTime], optional + :param release_notes: Optional notes about why the policy was created., defaults to None + :type release_notes: Optional[str], optional + :param type: `legal_hold_policy`, defaults to LegalHoldPolicyMiniTypeField.LEGAL_HOLD_POLICY.value + :type type: LegalHoldPolicyMiniTypeField, optional + """ + super().__init__(id=id, type=type, **kwargs) + self.policy_name = policy_name + self.description = description + self.status = status + self.assignment_counts = assignment_counts + self.created_by = created_by + self.created_at = created_at + self.modified_at = modified_at + self.deleted_at = deleted_at + self.filter_started_at = filter_started_at + self.filter_ended_at = filter_ended_at + self.release_notes = release_notes diff --git a/box_sdk_gen/schemas/legal_hold_policy_assignment.py b/box_sdk_gen/schemas/legal_hold_policy_assignment.py new file mode 100644 index 0000000..135a87c --- /dev/null +++ b/box_sdk_gen/schemas/legal_hold_policy_assignment.py @@ -0,0 +1,59 @@ +from typing import Optional + +from typing import Union + +from box_sdk_gen.schemas.legal_hold_policy_assignment_base import ( + LegalHoldPolicyAssignmentBaseTypeField, +) + +from box_sdk_gen.schemas.legal_hold_policy_assignment_base import ( + LegalHoldPolicyAssignmentBase, +) + +from box_sdk_gen.schemas.legal_hold_policy_mini import LegalHoldPolicyMini + +from box_sdk_gen.schemas.file import File + +from box_sdk_gen.schemas.folder import Folder + +from box_sdk_gen.schemas.web_link import WebLink + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class LegalHoldPolicyAssignment(LegalHoldPolicyAssignmentBase): + def __init__( + self, + *, + legal_hold_policy: Optional[LegalHoldPolicyMini] = None, + assigned_to: Optional[Union[File, Folder, WebLink]] = None, + assigned_by: Optional[UserMini] = None, + assigned_at: Optional[DateTime] = None, + deleted_at: Optional[DateTime] = None, + id: Optional[str] = None, + type: Optional[LegalHoldPolicyAssignmentBaseTypeField] = None, + **kwargs + ): + """ + :param assigned_at: When the legal hold policy assignment object was + created, defaults to None + :type assigned_at: Optional[DateTime], optional + :param deleted_at: When the assignment release request was sent. + (Because it can take time for an assignment to fully + delete, this isn't quite the same time that the + assignment is fully deleted). If null, Assignment + was not deleted., defaults to None + :type deleted_at: Optional[DateTime], optional + :param id: The unique identifier for this legal hold assignment, defaults to None + :type id: Optional[str], optional + :param type: `legal_hold_policy_assignment`, defaults to None + :type type: Optional[LegalHoldPolicyAssignmentBaseTypeField], optional + """ + super().__init__(id=id, type=type, **kwargs) + self.legal_hold_policy = legal_hold_policy + self.assigned_to = assigned_to + self.assigned_by = assigned_by + self.assigned_at = assigned_at + self.deleted_at = deleted_at diff --git a/box_sdk_gen/schemas/legal_hold_policy_assignment_base.py b/box_sdk_gen/schemas/legal_hold_policy_assignment_base.py new file mode 100644 index 0000000..5f145f7 --- /dev/null +++ b/box_sdk_gen/schemas/legal_hold_policy_assignment_base.py @@ -0,0 +1,30 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class LegalHoldPolicyAssignmentBaseTypeField(str, Enum): + LEGAL_HOLD_POLICY_ASSIGNMENT = 'legal_hold_policy_assignment' + + +class LegalHoldPolicyAssignmentBase(BaseObject): + _discriminator = 'type', {'legal_hold_policy_assignment'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[LegalHoldPolicyAssignmentBaseTypeField] = None, + **kwargs + ): + """ + :param id: The unique identifier for this legal hold assignment, defaults to None + :type id: Optional[str], optional + :param type: `legal_hold_policy_assignment`, defaults to None + :type type: Optional[LegalHoldPolicyAssignmentBaseTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/legal_hold_policy_assignments.py b/box_sdk_gen/schemas/legal_hold_policy_assignments.py new file mode 100644 index 0000000..065c676 --- /dev/null +++ b/box_sdk_gen/schemas/legal_hold_policy_assignments.py @@ -0,0 +1,37 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.legal_hold_policy_assignment import LegalHoldPolicyAssignment + + +class LegalHoldPolicyAssignments(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[LegalHoldPolicyAssignment]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of legal hold + policy assignments, defaults to None + :type entries: Optional[List[LegalHoldPolicyAssignment]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/legal_hold_policy_mini.py b/box_sdk_gen/schemas/legal_hold_policy_mini.py new file mode 100644 index 0000000..f0bbc7d --- /dev/null +++ b/box_sdk_gen/schemas/legal_hold_policy_mini.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class LegalHoldPolicyMiniTypeField(str, Enum): + LEGAL_HOLD_POLICY = 'legal_hold_policy' + + +class LegalHoldPolicyMini(BaseObject): + _discriminator = 'type', {'legal_hold_policy'} + + def __init__( + self, + id: str, + *, + type: LegalHoldPolicyMiniTypeField = LegalHoldPolicyMiniTypeField.LEGAL_HOLD_POLICY.value, + **kwargs + ): + """ + :param id: The unique identifier for this legal hold policy + :type id: str + :param type: `legal_hold_policy`, defaults to LegalHoldPolicyMiniTypeField.LEGAL_HOLD_POLICY.value + :type type: LegalHoldPolicyMiniTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/metadata.py b/box_sdk_gen/schemas/metadata.py new file mode 100644 index 0000000..abb950c --- /dev/null +++ b/box_sdk_gen/schemas/metadata.py @@ -0,0 +1,34 @@ +from typing import Optional + +from box_sdk_gen.schemas.metadata_base import MetadataBase + + +class Metadata(MetadataBase): + def __init__( + self, + *, + parent: Optional[str] = None, + template: Optional[str] = None, + scope: Optional[str] = None, + version: Optional[int] = None, + **kwargs + ): + """ + :param parent: The identifier of the item that this metadata instance + has been attached to. This combines the `type` and the `id` + of the parent in the form `{type}_{id}`., defaults to None + :type parent: Optional[str], optional + :param template: The name of the template, defaults to None + :type template: Optional[str], optional + :param scope: An ID for the scope in which this template + has been applied. This will be `enterprise_{enterprise_id}` for templates + defined for use in this enterprise, and `global` for general templates + that are available to all enterprises using Box., defaults to None + :type scope: Optional[str], optional + :param version: The version of the metadata instance. This version starts at 0 and + increases every time a user-defined property is modified., defaults to None + :type version: Optional[int], optional + """ + super().__init__( + parent=parent, template=template, scope=scope, version=version, **kwargs + ) diff --git a/box_sdk_gen/schemas/metadata_base.py b/box_sdk_gen/schemas/metadata_base.py new file mode 100644 index 0000000..3d28716 --- /dev/null +++ b/box_sdk_gen/schemas/metadata_base.py @@ -0,0 +1,53 @@ +from typing import Optional + +from typing import Dict + +from box_sdk_gen.internal.base_object import BaseObject + + +class MetadataBase(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'parent': '$parent', + 'template': '$template', + 'scope': '$scope', + 'version': '$version', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + '$parent': 'parent', + '$template': 'template', + '$scope': 'scope', + '$version': 'version', + **BaseObject._json_to_fields_mapping, + } + + def __init__( + self, + *, + parent: Optional[str] = None, + template: Optional[str] = None, + scope: Optional[str] = None, + version: Optional[int] = None, + **kwargs + ): + """ + :param parent: The identifier of the item that this metadata instance + has been attached to. This combines the `type` and the `id` + of the parent in the form `{type}_{id}`., defaults to None + :type parent: Optional[str], optional + :param template: The name of the template, defaults to None + :type template: Optional[str], optional + :param scope: An ID for the scope in which this template + has been applied. This will be `enterprise_{enterprise_id}` for templates + defined for use in this enterprise, and `global` for general templates + that are available to all enterprises using Box., defaults to None + :type scope: Optional[str], optional + :param version: The version of the metadata instance. This version starts at 0 and + increases every time a user-defined property is modified., defaults to None + :type version: Optional[int], optional + """ + super().__init__(**kwargs) + self.parent = parent + self.template = template + self.scope = scope + self.version = version diff --git a/box_sdk_gen/schemas/metadata_cascade_policies.py b/box_sdk_gen/schemas/metadata_cascade_policies.py new file mode 100644 index 0000000..561021a --- /dev/null +++ b/box_sdk_gen/schemas/metadata_cascade_policies.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.metadata_cascade_policy import MetadataCascadePolicy + + +class MetadataCascadePolicies(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[MetadataCascadePolicy]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of metadata cascade policies, defaults to None + :type entries: Optional[List[MetadataCascadePolicy]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/metadata_cascade_policy.py b/box_sdk_gen/schemas/metadata_cascade_policy.py new file mode 100644 index 0000000..194aa46 --- /dev/null +++ b/box_sdk_gen/schemas/metadata_cascade_policy.py @@ -0,0 +1,124 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Dict + + +class MetadataCascadePolicyTypeField(str, Enum): + METADATA_CASCADE_POLICY = 'metadata_cascade_policy' + + +class MetadataCascadePolicyOwnerEnterpriseTypeField(str, Enum): + ENTERPRISE = 'enterprise' + + +class MetadataCascadePolicyOwnerEnterpriseField(BaseObject): + _discriminator = 'type', {'enterprise'} + + def __init__( + self, + *, + type: Optional[MetadataCascadePolicyOwnerEnterpriseTypeField] = None, + id: Optional[str] = None, + **kwargs + ): + """ + :param type: `enterprise`, defaults to None + :type type: Optional[MetadataCascadePolicyOwnerEnterpriseTypeField], optional + :param id: The ID of the enterprise that owns the policy., defaults to None + :type id: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + + +class MetadataCascadePolicyParentTypeField(str, Enum): + FOLDER = 'folder' + + +class MetadataCascadePolicyParentField(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + *, + type: Optional[MetadataCascadePolicyParentTypeField] = None, + id: Optional[str] = None, + **kwargs + ): + """ + :param type: `folder`, defaults to None + :type type: Optional[MetadataCascadePolicyParentTypeField], optional + :param id: The ID of the folder the policy is applied to., defaults to None + :type id: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + + +class MetadataCascadePolicy(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'template_key': 'templateKey', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'templateKey': 'template_key', + **BaseObject._json_to_fields_mapping, + } + _discriminator = 'type', {'metadata_cascade_policy'} + + def __init__( + self, + id: str, + *, + type: MetadataCascadePolicyTypeField = MetadataCascadePolicyTypeField.METADATA_CASCADE_POLICY.value, + owner_enterprise: Optional[MetadataCascadePolicyOwnerEnterpriseField] = None, + parent: Optional[MetadataCascadePolicyParentField] = None, + scope: Optional[str] = None, + template_key: Optional[str] = None, + **kwargs + ): + """ + :param id: The ID of the metadata cascade policy object + :type id: str + :param type: `metadata_cascade_policy`, defaults to MetadataCascadePolicyTypeField.METADATA_CASCADE_POLICY.value + :type type: MetadataCascadePolicyTypeField, optional + :param owner_enterprise: The enterprise that owns this policy., defaults to None + :type owner_enterprise: Optional[MetadataCascadePolicyOwnerEnterpriseField], optional + :param parent: Represent the folder the policy is applied to., defaults to None + :type parent: Optional[MetadataCascadePolicyParentField], optional + :param scope: The scope of the metadata cascade policy can either be `global` or + `enterprise_*`. The `global` scope is used for policies that are + available to any Box enterprise. The `enterprise_*` scope represents + policies that have been created within a specific enterprise, where `*` + will be the ID of that enterprise., defaults to None + :type scope: Optional[str], optional + :param template_key: The key of the template that is cascaded down to the folder's + children. + + In many cases the template key is automatically derived + of its display name, for example `Contract Template` would + become `contractTemplate`. In some cases the creator of the + template will have provided its own template key. + + Please [list the templates for an enterprise][list], or + get all instances on a [file][file] or [folder][folder] + to inspect a template's key. + + [list]: e://get-metadata-templates-enterprise + [file]: e://get-files-id-metadata + [folder]: e://get-folders-id-metadata, defaults to None + :type template_key: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.owner_enterprise = owner_enterprise + self.parent = parent + self.scope = scope + self.template_key = template_key diff --git a/box_sdk_gen/schemas/metadata_field_filter_date_range.py b/box_sdk_gen/schemas/metadata_field_filter_date_range.py new file mode 100644 index 0000000..f2753a0 --- /dev/null +++ b/box_sdk_gen/schemas/metadata_field_filter_date_range.py @@ -0,0 +1,26 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.internal.utils import DateTime + + +class MetadataFieldFilterDateRange(BaseObject): + def __init__( + self, *, lt: Optional[DateTime] = None, gt: Optional[DateTime] = None, **kwargs + ): + """ + :param lt: Specifies the (inclusive) upper bound for the metadata field + value. The value of a field must be lower than (`lt`) or + equal to this value for the search query to match this + template., defaults to None + :type lt: Optional[DateTime], optional + :param gt: Specifies the (inclusive) lower bound for the metadata field + value. The value of a field must be greater than (`gt`) or + equal to this value for the search query to match this + template., defaults to None + :type gt: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.lt = lt + self.gt = gt diff --git a/box_sdk_gen/schemas/metadata_field_filter_float_range.py b/box_sdk_gen/schemas/metadata_field_filter_float_range.py new file mode 100644 index 0000000..4de1c2a --- /dev/null +++ b/box_sdk_gen/schemas/metadata_field_filter_float_range.py @@ -0,0 +1,24 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class MetadataFieldFilterFloatRange(BaseObject): + def __init__( + self, *, lt: Optional[float] = None, gt: Optional[float] = None, **kwargs + ): + """ + :param lt: Specifies the (inclusive) upper bound for the metadata field + value. The value of a field must be lower than (`lt`) or + equal to this value for the search query to match this + template., defaults to None + :type lt: Optional[float], optional + :param gt: Specifies the (inclusive) lower bound for the metadata field + value. The value of a field must be greater than (`gt`) or + equal to this value for the search query to match this + template., defaults to None + :type gt: Optional[float], optional + """ + super().__init__(**kwargs) + self.lt = lt + self.gt = gt diff --git a/box_sdk_gen/schemas/metadata_filter.py b/box_sdk_gen/schemas/metadata_filter.py new file mode 100644 index 0000000..8ec4f8b --- /dev/null +++ b/box_sdk_gen/schemas/metadata_filter.py @@ -0,0 +1,88 @@ +from enum import Enum + +from typing import Optional + +from typing import Dict + +from typing import Union + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.metadata_field_filter_float_range import ( + MetadataFieldFilterFloatRange, +) + +from box_sdk_gen.schemas.metadata_field_filter_date_range import ( + MetadataFieldFilterDateRange, +) + + +class MetadataFilterScopeField(str, Enum): + GLOBAL = 'global' + ENTERPRISE = 'enterprise' + ENTERPRISE__ENTERPRISE_ID_ = 'enterprise_{enterprise_id}' + + +class MetadataFilter(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'template_key': 'templateKey', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'templateKey': 'template_key', + **BaseObject._json_to_fields_mapping, + } + + def __init__( + self, + *, + scope: Optional[MetadataFilterScopeField] = None, + template_key: Optional[str] = None, + filters: Optional[ + Dict[ + str, + Union[ + str, + float, + List[str], + MetadataFieldFilterFloatRange, + MetadataFieldFilterDateRange, + ], + ] + ] = None, + **kwargs + ): + """ + :param scope: Specifies the scope of the template to filter search results by. + + This will be `enterprise_{enterprise_id}` for templates defined + for use in this enterprise, and `global` for general templates + that are available to all enterprises using Box., defaults to None + :type scope: Optional[MetadataFilterScopeField], optional + :param template_key: The key of the template used to filter search results. + + In many cases the template key is automatically derived + of its display name, for example `Contract Template` would + become `contractTemplate`. In some cases the creator of the + template will have provided its own template key. + + Please [list the templates for an enterprise][list], or + get all instances on a [file][file] or [folder][folder] + to inspect a template's key. + + [list]: e://get-metadata-templates-enterprise + [file]: e://get-files-id-metadata + [folder]: e://get-folders-id-metadata, defaults to None + :type template_key: Optional[str], optional + :param filters: Specifies which fields on the template to filter the search + results by. When more than one field is specified, the query + performs a logical `AND` to ensure that the instance of the + template matches each of the fields specified., defaults to None + :type filters: Optional[Dict[str, Union[str, float, List[str], MetadataFieldFilterFloatRange, MetadataFieldFilterDateRange]]], optional + """ + super().__init__(**kwargs) + self.scope = scope + self.template_key = template_key + self.filters = filters diff --git a/box_sdk_gen/schemas/metadata_full.py b/box_sdk_gen/schemas/metadata_full.py new file mode 100644 index 0000000..0add125 --- /dev/null +++ b/box_sdk_gen/schemas/metadata_full.py @@ -0,0 +1,74 @@ +from typing import Optional + +from typing import Dict + +from box_sdk_gen.schemas.metadata_base import MetadataBase + +from box_sdk_gen.schemas.metadata import Metadata + + +class MetadataFull(Metadata): + _fields_to_json_mapping: Dict[str, str] = { + 'can_edit': '$canEdit', + 'id': '$id', + 'type': '$type', + 'type_version': '$typeVersion', + **Metadata._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + '$canEdit': 'can_edit', + '$id': 'id', + '$type': 'type', + '$typeVersion': 'type_version', + **Metadata._json_to_fields_mapping, + } + + def __init__( + self, + *, + can_edit: Optional[bool] = None, + id: Optional[str] = None, + type: Optional[str] = None, + type_version: Optional[int] = None, + parent: Optional[str] = None, + template: Optional[str] = None, + scope: Optional[str] = None, + version: Optional[int] = None, + **kwargs + ): + """ + :param can_edit: Whether the user can edit this metadata instance., defaults to None + :type can_edit: Optional[bool], optional + :param id: A UUID to identify the metadata instance., defaults to None + :type id: Optional[str], optional + :param type: A unique identifier for the "type" of this instance. This is an + internal system property and should not be used by a client + application., defaults to None + :type type: Optional[str], optional + :param type_version: The last-known version of the template of the object. This is an + internal system property and should not be used by a client + application., defaults to None + :type type_version: Optional[int], optional + :param parent: The identifier of the item that this metadata instance + has been attached to. This combines the `type` and the `id` + of the parent in the form `{type}_{id}`., defaults to None + :type parent: Optional[str], optional + :param template: The name of the template, defaults to None + :type template: Optional[str], optional + :param scope: An ID for the scope in which this template + has been applied. This will be `enterprise_{enterprise_id}` for templates + defined for use in this enterprise, and `global` for general templates + that are available to all enterprises using Box., defaults to None + :type scope: Optional[str], optional + :param version: The version of the metadata instance. This version starts at 0 and + increases every time a user-defined property is modified., defaults to None + :type version: Optional[int], optional + """ + super().__init__( + parent=parent, template=template, scope=scope, version=version, **kwargs + ) + self.can_edit = can_edit + self.id = id + self.type = type + self.type_version = type_version + self.extra_data = kwargs diff --git a/box_sdk_gen/schemas/metadata_query.py b/box_sdk_gen/schemas/metadata_query.py new file mode 100644 index 0000000..d6e4bb0 --- /dev/null +++ b/box_sdk_gen/schemas/metadata_query.py @@ -0,0 +1,127 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Dict + +from typing import List + + +class MetadataQueryOrderByDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class MetadataQueryOrderByField(BaseObject): + def __init__( + self, + *, + field_key: Optional[str] = None, + direction: Optional[MetadataQueryOrderByDirectionField] = None, + **kwargs + ): + """ + :param field_key: The metadata template field to order by. + + The `field_key` represents the `key` value of a field from the + metadata template being searched for., defaults to None + :type field_key: Optional[str], optional + :param direction: The direction to order by, either ascending or descending. + + The `ordering` direction must be the same for each item in the + array., defaults to None + :type direction: Optional[MetadataQueryOrderByDirectionField], optional + """ + super().__init__(**kwargs) + self.field_key = field_key + self.direction = direction + + +class MetadataQuery(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'from_': 'from', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'from': 'from_', + **BaseObject._json_to_fields_mapping, + } + + def __init__( + self, + from_: str, + ancestor_folder_id: str, + *, + query: Optional[str] = None, + query_params: Optional[Dict[str, str]] = None, + order_by: Optional[List[MetadataQueryOrderByField]] = None, + limit: Optional[int] = None, + marker: Optional[str] = None, + fields: Optional[List[str]] = None, + **kwargs + ): + """ + :param from_: Specifies the template used in the query. Must be in the form + `scope.templateKey`. Not all templates can be used in this field, + most notably the built-in, Box-provided classification templates + can not be used in a query. + :type from_: str + :param ancestor_folder_id: The ID of the folder that you are restricting the query to. A + value of zero will return results from all folders you have access + to. A non-zero value will only return results found in the folder + corresponding to the ID or in any of its subfolders. + :type ancestor_folder_id: str + :param query: The query to perform. A query is a logical expression that is very similar + to a SQL `SELECT` statement. Values in the search query can be turned into + parameters specified in the `query_param` arguments list to prevent having + to manually insert search values into the query string. + + For example, a value of `:amount` would represent the `amount` value in + `query_params` object., defaults to None + :type query: Optional[str], optional + :param query_params: Set of arguments corresponding to the parameters specified in the + `query`. The type of each parameter used in the `query_params` must match + the type of the corresponding metadata template field., defaults to None + :type query_params: Optional[Dict[str, str]], optional + :param order_by: A list of template fields and directions to sort the metadata query + results by. + + The ordering `direction` must be the same for each item in the array., defaults to None + :type order_by: Optional[List[MetadataQueryOrderByField]], optional + :param limit: A value between 0 and 100 that indicates the maximum number of results + to return for a single request. This only specifies a maximum + boundary and will not guarantee the minimum number of results + returned., defaults to None + :type limit: Optional[int], optional + :param marker: Marker to use for requesting the next page., defaults to None + :type marker: Optional[str], optional + :param fields: By default, this endpoint returns only the most basic info about the items for + which the query matches. This attribute can be used to specify a list of + additional attributes to return for any item, including its metadata. + + This attribute takes a list of item fields, metadata template identifiers, + or metadata template field identifiers. + + For example: + + * `created_by` will add the details of the user who created the item to + the response. + * `metadata..` will return the mini-representation + of the metadata instance identified by the `scope` and `templateKey`. + * `metadata...` will return all the mini-representation + of the metadata instance identified by the `scope` and `templateKey` plus + the field specified by the `field` name. Multiple fields for the same + `scope` and `templateKey` can be defined., defaults to None + :type fields: Optional[List[str]], optional + """ + super().__init__(**kwargs) + self.from_ = from_ + self.ancestor_folder_id = ancestor_folder_id + self.query = query + self.query_params = query_params + self.order_by = order_by + self.limit = limit + self.marker = marker + self.fields = fields diff --git a/box_sdk_gen/schemas/metadata_query_index.py b/box_sdk_gen/schemas/metadata_query_index.py new file mode 100644 index 0000000..636c231 --- /dev/null +++ b/box_sdk_gen/schemas/metadata_query_index.py @@ -0,0 +1,64 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + + +class MetadataQueryIndexStatusField(str, Enum): + BUILDING = 'building' + ACTIVE = 'active' + DISABLED = 'disabled' + + +class MetadataQueryIndexFieldsSortDirectionField(str, Enum): + ASC = 'asc' + DESC = 'desc' + + +class MetadataQueryIndexFieldsField(BaseObject): + def __init__( + self, + *, + key: Optional[str] = None, + sort_direction: Optional[MetadataQueryIndexFieldsSortDirectionField] = None, + **kwargs + ): + """ + :param key: The metadata template field key., defaults to None + :type key: Optional[str], optional + :param sort_direction: The sort direction of the field., defaults to None + :type sort_direction: Optional[MetadataQueryIndexFieldsSortDirectionField], optional + """ + super().__init__(**kwargs) + self.key = key + self.sort_direction = sort_direction + + +class MetadataQueryIndex(BaseObject): + def __init__( + self, + type: str, + status: MetadataQueryIndexStatusField, + *, + id: Optional[str] = None, + fields: Optional[List[MetadataQueryIndexFieldsField]] = None, + **kwargs + ): + """ + :param type: Value is always `metadata_query_index` + :type type: str + :param status: The status of the metadata query index + :type status: MetadataQueryIndexStatusField + :param id: The ID of the metadata query index., defaults to None + :type id: Optional[str], optional + :param fields: A list of template fields which make up the index., defaults to None + :type fields: Optional[List[MetadataQueryIndexFieldsField]], optional + """ + super().__init__(**kwargs) + self.type = type + self.status = status + self.id = id + self.fields = fields diff --git a/box_sdk_gen/schemas/metadata_query_results.py b/box_sdk_gen/schemas/metadata_query_results.py new file mode 100644 index 0000000..1979040 --- /dev/null +++ b/box_sdk_gen/schemas/metadata_query_results.py @@ -0,0 +1,41 @@ +from typing import Optional + +from typing import List + +from typing import Union + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file import File + +from box_sdk_gen.schemas.folder import Folder + + +class MetadataQueryResults(BaseObject): + def __init__( + self, + *, + entries: Optional[List[Union[File, Folder]]] = None, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: The mini representation of the files and folders that match the search + terms. + + By default, this endpoint returns only the most basic info about the + items. To get additional fields for each item, including any of the + metadata, use the `fields` attribute in the query., defaults to None + :type entries: Optional[List[Union[File, Folder]]], optional + :param limit: The limit that was used for this search. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker diff --git a/box_sdk_gen/schemas/metadata_template.py b/box_sdk_gen/schemas/metadata_template.py new file mode 100644 index 0000000..e2e063d --- /dev/null +++ b/box_sdk_gen/schemas/metadata_template.py @@ -0,0 +1,173 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + +from typing import Dict + + +class MetadataTemplateTypeField(str, Enum): + METADATA_TEMPLATE = 'metadata_template' + + +class MetadataTemplateFieldsTypeField(str, Enum): + STRING = 'string' + FLOAT = 'float' + DATE = 'date' + ENUM = 'enum' + MULTISELECT = 'multiSelect' + INTEGER = 'integer' + + +class MetadataTemplateFieldsOptionsField(BaseObject): + def __init__(self, key: str, *, id: Optional[str] = None, **kwargs): + """ + :param key: The text value of the option. This represents both the display name of the + option and the internal key used when updating templates. + :type key: str + :param id: The internal unique identifier of the the option., defaults to None + :type id: Optional[str], optional + """ + super().__init__(**kwargs) + self.key = key + self.id = id + + +class MetadataTemplateFieldsField(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'display_name': 'displayName', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'displayName': 'display_name', + **BaseObject._json_to_fields_mapping, + } + _discriminator = 'type', { + 'string', + 'float', + 'date', + 'enum', + 'multiSelect', + 'integer', + } + + def __init__( + self, + type: MetadataTemplateFieldsTypeField, + key: str, + display_name: str, + *, + description: Optional[str] = None, + hidden: Optional[bool] = None, + options: Optional[List[MetadataTemplateFieldsOptionsField]] = None, + id: Optional[str] = None, + **kwargs + ): + """ + :param type: The type of field. The basic fields are a `string` field for text, a + `float` field for numbers, and a `date` fields to present the user with a + date-time picker. + + Additionally, metadata templates support an `enum` field for a basic list + of items, and ` multiSelect` field for a similar list of items where the + user can select more than one value. + + **Note**: The `integer` value is deprecated. + It is still present in the response, + but cannot be used in the POST request. + :type type: MetadataTemplateFieldsTypeField + :param key: A unique identifier for the field. The identifier must + be unique within the template to which it belongs. + :type key: str + :param display_name: The display name of the field as it is shown to the user in the web and + mobile apps. + :type display_name: str + :param description: A description of the field. This is not shown to the user., defaults to None + :type description: Optional[str], optional + :param hidden: Whether this field is hidden in the UI for the user and can only be set + through the API instead., defaults to None + :type hidden: Optional[bool], optional + :param options: A list of options for this field. This is used in combination + with the `enum` and `multiSelect` field types., defaults to None + :type options: Optional[List[MetadataTemplateFieldsOptionsField]], optional + :param id: The unique ID of the metadata template field., defaults to None + :type id: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.key = key + self.display_name = display_name + self.description = description + self.hidden = hidden + self.options = options + self.id = id + + +class MetadataTemplate(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'template_key': 'templateKey', + 'display_name': 'displayName', + 'copy_instance_on_item_copy': 'copyInstanceOnItemCopy', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'templateKey': 'template_key', + 'displayName': 'display_name', + 'copyInstanceOnItemCopy': 'copy_instance_on_item_copy', + **BaseObject._json_to_fields_mapping, + } + _discriminator = 'type', {'metadata_template'} + + def __init__( + self, + id: str, + *, + type: MetadataTemplateTypeField = MetadataTemplateTypeField.METADATA_TEMPLATE.value, + scope: Optional[str] = None, + template_key: Optional[str] = None, + display_name: Optional[str] = None, + hidden: Optional[bool] = None, + fields: Optional[List[MetadataTemplateFieldsField]] = None, + copy_instance_on_item_copy: Optional[bool] = None, + **kwargs + ): + """ + :param id: The ID of the metadata template. + :type id: str + :param type: `metadata_template`, defaults to MetadataTemplateTypeField.METADATA_TEMPLATE.value + :type type: MetadataTemplateTypeField, optional + :param scope: The scope of the metadata template can either be `global` or + `enterprise_*`. The `global` scope is used for templates that are + available to any Box enterprise. The `enterprise_*` scope represents + templates that have been created within a specific enterprise, where `*` + will be the ID of that enterprise., defaults to None + :type scope: Optional[str], optional + :param template_key: A unique identifier for the template. This identifier is unique across + the `scope` of the enterprise to which the metadata template is being + applied, yet is not necessarily unique across different enterprises., defaults to None + :type template_key: Optional[str], optional + :param display_name: The display name of the template. This can be seen in the Box web app + and mobile apps., defaults to None + :type display_name: Optional[str], optional + :param hidden: Defines if this template is visible in the Box web app UI, or if + it is purely intended for usage through the API., defaults to None + :type hidden: Optional[bool], optional + :param fields: An ordered list of template fields which are part of the template. Each + field can be a regular text field, date field, number field, as well as a + single or multi-select list., defaults to None + :type fields: Optional[List[MetadataTemplateFieldsField]], optional + :param copy_instance_on_item_copy: Whether or not to include the metadata when a file or folder is copied., defaults to None + :type copy_instance_on_item_copy: Optional[bool], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.scope = scope + self.template_key = template_key + self.display_name = display_name + self.hidden = hidden + self.fields = fields + self.copy_instance_on_item_copy = copy_instance_on_item_copy diff --git a/box_sdk_gen/schemas/metadata_templates.py b/box_sdk_gen/schemas/metadata_templates.py new file mode 100644 index 0000000..607ee60 --- /dev/null +++ b/box_sdk_gen/schemas/metadata_templates.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.metadata_template import MetadataTemplate + + +class MetadataTemplates(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[MetadataTemplate]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of metadata templates, defaults to None + :type entries: Optional[List[MetadataTemplate]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/metadatas.py b/box_sdk_gen/schemas/metadatas.py new file mode 100644 index 0000000..ca9e04d --- /dev/null +++ b/box_sdk_gen/schemas/metadatas.py @@ -0,0 +1,26 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.metadata import Metadata + + +class Metadatas(BaseObject): + def __init__( + self, + *, + entries: Optional[List[Metadata]] = None, + limit: Optional[int] = None, + **kwargs + ): + """ + :param entries: A list of metadata instances, as applied to this file or folder., defaults to None + :type entries: Optional[List[Metadata]], optional + :param limit: The limit that was used for this page of results., defaults to None + :type limit: Optional[int], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit diff --git a/box_sdk_gen/schemas/o_auth_2_error.py b/box_sdk_gen/schemas/o_auth_2_error.py new file mode 100644 index 0000000..3fcf778 --- /dev/null +++ b/box_sdk_gen/schemas/o_auth_2_error.py @@ -0,0 +1,22 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class OAuth2Error(BaseObject): + def __init__( + self, + *, + error: Optional[str] = None, + error_description: Optional[str] = None, + **kwargs + ): + """ + :param error: The type of the error returned., defaults to None + :type error: Optional[str], optional + :param error_description: The type of the error returned., defaults to None + :type error_description: Optional[str], optional + """ + super().__init__(**kwargs) + self.error = error + self.error_description = error_description diff --git a/box_sdk_gen/schemas/outcome.py b/box_sdk_gen/schemas/outcome.py new file mode 100644 index 0000000..2194f1f --- /dev/null +++ b/box_sdk_gen/schemas/outcome.py @@ -0,0 +1,34 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.collaborator_variable import CollaboratorVariable + +from box_sdk_gen.schemas.completion_rule_variable import CompletionRuleVariable + +from box_sdk_gen.schemas.role_variable import RoleVariable + + +class Outcome(BaseObject): + def __init__( + self, + id: str, + *, + collaborators: Optional[CollaboratorVariable] = None, + completion_rule: Optional[CompletionRuleVariable] = None, + file_collaborator_role: Optional[RoleVariable] = None, + task_collaborators: Optional[CollaboratorVariable] = None, + role: Optional[RoleVariable] = None, + **kwargs + ): + """ + :param id: ID of a specific outcome + :type id: str + """ + super().__init__(**kwargs) + self.id = id + self.collaborators = collaborators + self.completion_rule = completion_rule + self.file_collaborator_role = file_collaborator_role + self.task_collaborators = task_collaborators + self.role = role diff --git a/box_sdk_gen/schemas/post_o_auth_2_revoke.py b/box_sdk_gen/schemas/post_o_auth_2_revoke.py new file mode 100644 index 0000000..ae0be50 --- /dev/null +++ b/box_sdk_gen/schemas/post_o_auth_2_revoke.py @@ -0,0 +1,28 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class PostOAuth2Revoke(BaseObject): + def __init__( + self, + *, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + token: Optional[str] = None, + **kwargs + ): + """ + :param client_id: The Client ID of the application requesting to revoke the + access token., defaults to None + :type client_id: Optional[str], optional + :param client_secret: The client secret of the application requesting to revoke + an access token., defaults to None + :type client_secret: Optional[str], optional + :param token: The access token to revoke., defaults to None + :type token: Optional[str], optional + """ + super().__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret + self.token = token diff --git a/box_sdk_gen/schemas/post_o_auth_2_token.py b/box_sdk_gen/schemas/post_o_auth_2_token.py new file mode 100644 index 0000000..f82d85d --- /dev/null +++ b/box_sdk_gen/schemas/post_o_auth_2_token.py @@ -0,0 +1,144 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class PostOAuth2TokenGrantTypeField(str, Enum): + AUTHORIZATION_CODE = 'authorization_code' + REFRESH_TOKEN = 'refresh_token' + CLIENT_CREDENTIALS = 'client_credentials' + URN_IETF_PARAMS_OAUTH_GRANT_TYPE_JWT_BEARER = ( + 'urn:ietf:params:oauth:grant-type:jwt-bearer' + ) + URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE = ( + 'urn:ietf:params:oauth:grant-type:token-exchange' + ) + + +class PostOAuth2TokenSubjectTokenTypeField(str, Enum): + URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN = ( + 'urn:ietf:params:oauth:token-type:access_token' + ) + + +class PostOAuth2TokenActorTokenTypeField(str, Enum): + URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ID_TOKEN = ( + 'urn:ietf:params:oauth:token-type:id_token' + ) + + +class PostOAuth2TokenBoxSubjectTypeField(str, Enum): + ENTERPRISE = 'enterprise' + USER = 'user' + + +class PostOAuth2Token(BaseObject): + def __init__( + self, + grant_type: PostOAuth2TokenGrantTypeField, + *, + client_id: Optional[str] = None, + client_secret: Optional[str] = None, + code: Optional[str] = None, + refresh_token: Optional[str] = None, + assertion: Optional[str] = None, + subject_token: Optional[str] = None, + subject_token_type: Optional[PostOAuth2TokenSubjectTokenTypeField] = None, + actor_token: Optional[str] = None, + actor_token_type: Optional[PostOAuth2TokenActorTokenTypeField] = None, + scope: Optional[str] = None, + resource: Optional[str] = None, + box_subject_type: Optional[PostOAuth2TokenBoxSubjectTypeField] = None, + box_subject_id: Optional[str] = None, + box_shared_link: Optional[str] = None, + **kwargs + ): + """ + :param grant_type: The type of request being made, either using a client-side obtained + authorization code, a refresh token, a JWT assertion, client credentials + grant or another access token for the purpose of downscoping a token. + :type grant_type: PostOAuth2TokenGrantTypeField + :param client_id: The Client ID of the application requesting an access token. + + Used in combination with `authorization_code`, `client_credentials`, or + `urn:ietf:params:oauth:grant-type:jwt-bearer` as the `grant_type`., defaults to None + :type client_id: Optional[str], optional + :param client_secret: The client secret of the application requesting an access token. + + Used in combination with `authorization_code`, `client_credentials`, or + `urn:ietf:params:oauth:grant-type:jwt-bearer` as the `grant_type`., defaults to None + :type client_secret: Optional[str], optional + :param code: The client-side authorization code passed to your application by + Box in the browser redirect after the user has successfully + granted your application permission to make API calls on their + behalf. + + Used in combination with `authorization_code` as the `grant_type`., defaults to None + :type code: Optional[str], optional + :param refresh_token: A refresh token used to get a new access token with. + + Used in combination with `refresh_token` as the `grant_type`., defaults to None + :type refresh_token: Optional[str], optional + :param assertion: A JWT assertion for which to request a new access token. + + Used in combination with `urn:ietf:params:oauth:grant-type:jwt-bearer` + as the `grant_type`., defaults to None + :type assertion: Optional[str], optional + :param subject_token: The token to exchange for a downscoped token. This can be a regular + access token, a JWT assertion, or an app token. + + Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` + as the `grant_type`., defaults to None + :type subject_token: Optional[str], optional + :param subject_token_type: The type of `subject_token` passed in. + + Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` + as the `grant_type`., defaults to None + :type subject_token_type: Optional[PostOAuth2TokenSubjectTokenTypeField], optional + :param actor_token: The token used to create an annotator token. + This is a JWT assertion. + + Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` + as the `grant_type`., defaults to None + :type actor_token: Optional[str], optional + :param actor_token_type: The type of `actor_token` passed in. + + Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` + as the `grant_type`., defaults to None + :type actor_token_type: Optional[PostOAuth2TokenActorTokenTypeField], optional + :param scope: The space-delimited list of scopes that you want apply to the + new access token. + + The `subject_token` will need to have all of these scopes or + the call will error with **401 Unauthorized**., defaults to None + :type scope: Optional[str], optional + :param resource: Full URL for the file that the token should be generated for., defaults to None + :type resource: Optional[str], optional + :param box_subject_type: Used in combination with `client_credentials` as the `grant_type`., defaults to None + :type box_subject_type: Optional[PostOAuth2TokenBoxSubjectTypeField], optional + :param box_subject_id: Used in combination with `client_credentials` as the `grant_type`. + Value is determined by `box_subject_type`. If `user` use user ID and if + `enterprise` use enterprise ID., defaults to None + :type box_subject_id: Optional[str], optional + :param box_shared_link: Full URL of the shared link on the file or folder + that the token should be generated for., defaults to None + :type box_shared_link: Optional[str], optional + """ + super().__init__(**kwargs) + self.grant_type = grant_type + self.client_id = client_id + self.client_secret = client_secret + self.code = code + self.refresh_token = refresh_token + self.assertion = assertion + self.subject_token = subject_token + self.subject_token_type = subject_token_type + self.actor_token = actor_token + self.actor_token_type = actor_token_type + self.scope = scope + self.resource = resource + self.box_subject_type = box_subject_type + self.box_subject_id = box_subject_id + self.box_shared_link = box_shared_link diff --git a/box_sdk_gen/schemas/post_o_auth_2_token_refresh_access_token.py b/box_sdk_gen/schemas/post_o_auth_2_token_refresh_access_token.py new file mode 100644 index 0000000..38edd12 --- /dev/null +++ b/box_sdk_gen/schemas/post_o_auth_2_token_refresh_access_token.py @@ -0,0 +1,34 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class PostOAuth2TokenRefreshAccessTokenGrantTypeField(str, Enum): + REFRESH_TOKEN = 'refresh_token' + + +class PostOAuth2TokenRefreshAccessToken(BaseObject): + def __init__( + self, + client_id: str, + client_secret: str, + refresh_token: str, + *, + grant_type: PostOAuth2TokenRefreshAccessTokenGrantTypeField = PostOAuth2TokenRefreshAccessTokenGrantTypeField.REFRESH_TOKEN.value, + **kwargs + ): + """ + :param client_id: The client ID of the application requesting to refresh the token. + :type client_id: str + :param client_secret: The client secret of the application requesting to refresh the token. + :type client_secret: str + :param refresh_token: The refresh token to refresh. + :type refresh_token: str + :param grant_type: The type of request being made, in this case a refresh request., defaults to PostOAuth2TokenRefreshAccessTokenGrantTypeField.REFRESH_TOKEN.value + :type grant_type: PostOAuth2TokenRefreshAccessTokenGrantTypeField, optional + """ + super().__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret + self.refresh_token = refresh_token + self.grant_type = grant_type diff --git a/box_sdk_gen/schemas/realtime_server.py b/box_sdk_gen/schemas/realtime_server.py new file mode 100644 index 0000000..3638a77 --- /dev/null +++ b/box_sdk_gen/schemas/realtime_server.py @@ -0,0 +1,41 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class RealtimeServer(BaseObject): + def __init__( + self, + *, + type: Optional[str] = None, + url: Optional[str] = None, + ttl: Optional[int] = None, + max_retries: Optional[int] = None, + retry_timeout: Optional[int] = None, + **kwargs + ): + """ + :param type: `realtime_server`, defaults to None + :type type: Optional[str], optional + :param url: The URL for the server., defaults to None + :type url: Optional[str], optional + :param ttl: The time in minutes for which this server is available, defaults to None + :type ttl: Optional[int], optional + :param max_retries: The maximum number of retries this server will + allow before a new long poll should be started by + getting a [new list of server](#options-events)., defaults to None + :type max_retries: Optional[int], optional + :param retry_timeout: The maximum number of seconds without a response + after which you should retry the long poll connection. + + This helps to overcome network issues where the long + poll looks to be working but no packages are coming + through., defaults to None + :type retry_timeout: Optional[int], optional + """ + super().__init__(**kwargs) + self.type = type + self.url = url + self.ttl = ttl + self.max_retries = max_retries + self.retry_timeout = retry_timeout diff --git a/box_sdk_gen/schemas/realtime_servers.py b/box_sdk_gen/schemas/realtime_servers.py new file mode 100644 index 0000000..ad745a2 --- /dev/null +++ b/box_sdk_gen/schemas/realtime_servers.py @@ -0,0 +1,26 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.realtime_server import RealtimeServer + + +class RealtimeServers(BaseObject): + def __init__( + self, + *, + chunk_size: Optional[int] = None, + entries: Optional[List[RealtimeServer]] = None, + **kwargs + ): + """ + :param chunk_size: The number of items in this response., defaults to None + :type chunk_size: Optional[int], optional + :param entries: A list of real-time servers, defaults to None + :type entries: Optional[List[RealtimeServer]], optional + """ + super().__init__(**kwargs) + self.chunk_size = chunk_size + self.entries = entries diff --git a/box_sdk_gen/schemas/recent_item.py b/box_sdk_gen/schemas/recent_item.py new file mode 100644 index 0000000..e705037 --- /dev/null +++ b/box_sdk_gen/schemas/recent_item.py @@ -0,0 +1,54 @@ +from enum import Enum + +from typing import Optional + +from typing import Union + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_full import FileFull + +from box_sdk_gen.schemas.folder_full import FolderFull + +from box_sdk_gen.schemas.web_link import WebLink + +from box_sdk_gen.internal.utils import DateTime + + +class RecentItemInteractionTypeField(str, Enum): + ITEM_PREVIEW = 'item_preview' + ITEM_UPLOAD = 'item_upload' + ITEM_COMMENT = 'item_comment' + ITEM_OPEN = 'item_open' + ITEM_MODIFY = 'item_modify' + + +class RecentItem(BaseObject): + def __init__( + self, + *, + type: Optional[str] = None, + item: Optional[Union[FileFull, FolderFull, WebLink]] = None, + interaction_type: Optional[RecentItemInteractionTypeField] = None, + interacted_at: Optional[DateTime] = None, + interaction_shared_link: Optional[str] = None, + **kwargs + ): + """ + :param type: `recent_item`, defaults to None + :type type: Optional[str], optional + :param interaction_type: The most recent type of access the user performed on + the item., defaults to None + :type interaction_type: Optional[RecentItemInteractionTypeField], optional + :param interacted_at: The time of the most recent interaction., defaults to None + :type interacted_at: Optional[DateTime], optional + :param interaction_shared_link: If the item was accessed through a shared link it will appear here, + otherwise this will be null., defaults to None + :type interaction_shared_link: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.item = item + self.interaction_type = interaction_type + self.interacted_at = interacted_at + self.interaction_shared_link = interaction_shared_link diff --git a/box_sdk_gen/schemas/recent_items.py b/box_sdk_gen/schemas/recent_items.py new file mode 100644 index 0000000..5880627 --- /dev/null +++ b/box_sdk_gen/schemas/recent_items.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.recent_item import RecentItem + + +class RecentItems(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[RecentItem]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of recent items, defaults to None + :type entries: Optional[List[RecentItem]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/retention_policies.py b/box_sdk_gen/schemas/retention_policies.py new file mode 100644 index 0000000..da905c0 --- /dev/null +++ b/box_sdk_gen/schemas/retention_policies.py @@ -0,0 +1,32 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.retention_policy import RetentionPolicy + + +class RetentionPolicies(BaseObject): + def __init__( + self, + *, + entries: Optional[List[RetentionPolicy]] = None, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list in which each entry represents a retention policy object., defaults to None + :type entries: Optional[List[RetentionPolicy]], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker diff --git a/box_sdk_gen/schemas/retention_policy.py b/box_sdk_gen/schemas/retention_policy.py new file mode 100644 index 0000000..b387930 --- /dev/null +++ b/box_sdk_gen/schemas/retention_policy.py @@ -0,0 +1,171 @@ +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.retention_policy_base import RetentionPolicyBaseTypeField + +from box_sdk_gen.schemas.retention_policy_base import RetentionPolicyBase + +from box_sdk_gen.schemas.retention_policy_mini import ( + RetentionPolicyMiniDispositionActionField, +) + +from box_sdk_gen.schemas.retention_policy_mini import RetentionPolicyMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class RetentionPolicyPolicyTypeField(str, Enum): + FINITE = 'finite' + INDEFINITE = 'indefinite' + + +class RetentionPolicyRetentionTypeField(str, Enum): + MODIFIABLE = 'modifiable' + NON_MODIFIABLE = 'non_modifiable' + + +class RetentionPolicyStatusField(str, Enum): + ACTIVE = 'active' + RETIRED = 'retired' + + +class RetentionPolicyAssignmentCountsField(BaseObject): + def __init__( + self, + *, + enterprise: Optional[int] = None, + folder: Optional[int] = None, + metadata_template: Optional[int] = None, + **kwargs + ): + """ + :param enterprise: The number of enterprise assignments this policy has. The maximum value is 1., defaults to None + :type enterprise: Optional[int], optional + :param folder: The number of folder assignments this policy has., defaults to None + :type folder: Optional[int], optional + :param metadata_template: The number of metadata template assignments this policy has., defaults to None + :type metadata_template: Optional[int], optional + """ + super().__init__(**kwargs) + self.enterprise = enterprise + self.folder = folder + self.metadata_template = metadata_template + + +class RetentionPolicy(RetentionPolicyMini): + def __init__( + self, + id: str, + *, + description: Optional[str] = None, + policy_type: Optional[RetentionPolicyPolicyTypeField] = None, + retention_type: Optional[RetentionPolicyRetentionTypeField] = None, + status: Optional[RetentionPolicyStatusField] = None, + created_by: Optional[UserMini] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + can_owner_extend_retention: Optional[bool] = None, + are_owners_notified: Optional[bool] = None, + custom_notification_recipients: Optional[List[UserMini]] = None, + assignment_counts: Optional[RetentionPolicyAssignmentCountsField] = None, + policy_name: Optional[str] = None, + retention_length: Optional[str] = None, + disposition_action: Optional[RetentionPolicyMiniDispositionActionField] = None, + type: RetentionPolicyBaseTypeField = RetentionPolicyBaseTypeField.RETENTION_POLICY.value, + **kwargs + ): + """ + :param id: The unique identifier that represents a retention policy. + :type id: str + :param description: The additional text description of the retention policy., defaults to None + :type description: Optional[str], optional + :param policy_type: The type of the retention policy. A retention + policy type can either be `finite`, where a + specific amount of time to retain the content is known + upfront, or `indefinite`, where the amount of time + to retain the content is still unknown., defaults to None + :type policy_type: Optional[RetentionPolicyPolicyTypeField], optional + :param retention_type: Specifies the retention type: + + * `modifiable`: You can modify the retention policy. For example, + you can add or remove folders, shorten or lengthen + the policy duration, or delete the assignment. + Use this type if your retention policy + is not related to any regulatory purposes. + + * `non-modifiable`: You can modify the retention policy + only in a limited way: add a folder, lengthen the duration, + retire the policy, change the disposition action + or notification settings. You cannot perform other actions, + such as deleting the assignment or shortening the + policy duration. Use this type to ensure + compliance with regulatory retention policies., defaults to None + :type retention_type: Optional[RetentionPolicyRetentionTypeField], optional + :param status: The status of the retention policy. The status of + a policy will be `active`, unless explicitly retired by an + administrator, in which case the status will be `retired`. + Once a policy has been retired, it cannot become + active again., defaults to None + :type status: Optional[RetentionPolicyStatusField], optional + :param created_at: When the retention policy object was created., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the retention policy object was last modified., defaults to None + :type modified_at: Optional[DateTime], optional + :param can_owner_extend_retention: Determines if the owner of items under the policy + can extend the retention when the original + retention duration is about to end., defaults to None + :type can_owner_extend_retention: Optional[bool], optional + :param are_owners_notified: Determines if owners and co-owners of items + under the policy are notified when + the retention duration is about to end., defaults to None + :type are_owners_notified: Optional[bool], optional + :param custom_notification_recipients: A list of users notified when the retention policy duration is about to end., defaults to None + :type custom_notification_recipients: Optional[List[UserMini]], optional + :param assignment_counts: Counts the retention policy assignments for each item type., defaults to None + :type assignment_counts: Optional[RetentionPolicyAssignmentCountsField], optional + :param policy_name: The name given to the retention policy., defaults to None + :type policy_name: Optional[str], optional + :param retention_length: The length of the retention policy. This value + specifies the duration in days that the retention + policy will be active for after being assigned to + content. If the policy has a `policy_type` of + `indefinite`, the `retention_length` will also be + `indefinite`., defaults to None + :type retention_length: Optional[str], optional + :param disposition_action: The disposition action of the retention policy. + This action can be `permanently_delete`, which + will cause the content retained by the policy + to be permanently deleted, or `remove_retention`, + which will lift the retention policy from the content, + allowing it to be deleted by users, + once the retention policy has expired., defaults to None + :type disposition_action: Optional[RetentionPolicyMiniDispositionActionField], optional + :param type: `retention_policy`, defaults to RetentionPolicyBaseTypeField.RETENTION_POLICY.value + :type type: RetentionPolicyBaseTypeField, optional + """ + super().__init__( + id=id, + policy_name=policy_name, + retention_length=retention_length, + disposition_action=disposition_action, + type=type, + **kwargs + ) + self.description = description + self.policy_type = policy_type + self.retention_type = retention_type + self.status = status + self.created_by = created_by + self.created_at = created_at + self.modified_at = modified_at + self.can_owner_extend_retention = can_owner_extend_retention + self.are_owners_notified = are_owners_notified + self.custom_notification_recipients = custom_notification_recipients + self.assignment_counts = assignment_counts diff --git a/box_sdk_gen/schemas/retention_policy_assignment.py b/box_sdk_gen/schemas/retention_policy_assignment.py new file mode 100644 index 0000000..b2c23e3 --- /dev/null +++ b/box_sdk_gen/schemas/retention_policy_assignment.py @@ -0,0 +1,111 @@ +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.retention_policy_mini import RetentionPolicyMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class RetentionPolicyAssignmentTypeField(str, Enum): + RETENTION_POLICY_ASSIGNMENT = 'retention_policy_assignment' + + +class RetentionPolicyAssignmentAssignedToTypeField(str, Enum): + FOLDER = 'folder' + ENTERPRISE = 'enterprise' + METADATA_TEMPLATE = 'metadata_template' + + +class RetentionPolicyAssignmentAssignedToField(BaseObject): + _discriminator = 'type', {'folder', 'enterprise', 'metadata_template'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[RetentionPolicyAssignmentAssignedToTypeField] = None, + **kwargs + ): + """ + :param id: The ID of the folder, enterprise, or metadata template + the policy is assigned to. + Set to null or omit when type is set to enterprise., defaults to None + :type id: Optional[str], optional + :param type: The type of resource the policy is assigned to., defaults to None + :type type: Optional[RetentionPolicyAssignmentAssignedToTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class RetentionPolicyAssignmentFilterFieldsField(BaseObject): + def __init__( + self, *, field: Optional[str] = None, value: Optional[str] = None, **kwargs + ): + """ + :param field: The metadata attribute key id., defaults to None + :type field: Optional[str], optional + :param value: The metadata attribute field id. For value, only + enum and multiselect types are supported., defaults to None + :type value: Optional[str], optional + """ + super().__init__(**kwargs) + self.field = field + self.value = value + + +class RetentionPolicyAssignment(BaseObject): + _discriminator = 'type', {'retention_policy_assignment'} + + def __init__( + self, + id: str, + *, + type: RetentionPolicyAssignmentTypeField = RetentionPolicyAssignmentTypeField.RETENTION_POLICY_ASSIGNMENT.value, + retention_policy: Optional[RetentionPolicyMini] = None, + assigned_to: Optional[RetentionPolicyAssignmentAssignedToField] = None, + filter_fields: Optional[ + List[RetentionPolicyAssignmentFilterFieldsField] + ] = None, + assigned_by: Optional[UserMini] = None, + assigned_at: Optional[DateTime] = None, + start_date_field: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for a retention policy assignment. + :type id: str + :param type: `retention_policy_assignment`, defaults to RetentionPolicyAssignmentTypeField.RETENTION_POLICY_ASSIGNMENT.value + :type type: RetentionPolicyAssignmentTypeField, optional + :param assigned_to: The `type` and `id` of the content that is under + retention. The `type` can either be `folder` + `enterprise`, or `metadata_template`., defaults to None + :type assigned_to: Optional[RetentionPolicyAssignmentAssignedToField], optional + :param filter_fields: An array of field objects. Values are only returned if the `assigned_to` + type is `metadata_template`. Otherwise, the array is blank., defaults to None + :type filter_fields: Optional[List[RetentionPolicyAssignmentFilterFieldsField]], optional + :param assigned_at: When the retention policy assignment object was + created., defaults to None + :type assigned_at: Optional[DateTime], optional + :param start_date_field: The date the retention policy assignment begins. + If the `assigned_to` type is `metadata_template`, + this field can be a date field's metadata attribute key id., defaults to None + :type start_date_field: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.retention_policy = retention_policy + self.assigned_to = assigned_to + self.filter_fields = filter_fields + self.assigned_by = assigned_by + self.assigned_at = assigned_at + self.start_date_field = start_date_field diff --git a/box_sdk_gen/schemas/retention_policy_assignment_base.py b/box_sdk_gen/schemas/retention_policy_assignment_base.py new file mode 100644 index 0000000..40055a2 --- /dev/null +++ b/box_sdk_gen/schemas/retention_policy_assignment_base.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class RetentionPolicyAssignmentBaseTypeField(str, Enum): + RETENTION_POLICY_ASSIGNMENT = 'retention_policy_assignment' + + +class RetentionPolicyAssignmentBase(BaseObject): + _discriminator = 'type', {'retention_policy_assignment'} + + def __init__( + self, + id: str, + *, + type: RetentionPolicyAssignmentBaseTypeField = RetentionPolicyAssignmentBaseTypeField.RETENTION_POLICY_ASSIGNMENT.value, + **kwargs + ): + """ + :param id: The unique identifier that represents a file version. + :type id: str + :param type: `retention_policy_assignment`, defaults to RetentionPolicyAssignmentBaseTypeField.RETENTION_POLICY_ASSIGNMENT.value + :type type: RetentionPolicyAssignmentBaseTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/retention_policy_assignments.py b/box_sdk_gen/schemas/retention_policy_assignments.py new file mode 100644 index 0000000..392bff4 --- /dev/null +++ b/box_sdk_gen/schemas/retention_policy_assignments.py @@ -0,0 +1,32 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.retention_policy_assignment import RetentionPolicyAssignment + + +class RetentionPolicyAssignments(BaseObject): + def __init__( + self, + *, + entries: Optional[List[RetentionPolicyAssignment]] = None, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + **kwargs + ): + """ + :param entries: A list of retention policy assignments, defaults to None + :type entries: Optional[List[RetentionPolicyAssignment]], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param next_marker: The marker for the start of the next page of results., defaults to None + :type next_marker: Optional[str], optional + """ + super().__init__(**kwargs) + self.entries = entries + self.limit = limit + self.next_marker = next_marker diff --git a/box_sdk_gen/schemas/retention_policy_base.py b/box_sdk_gen/schemas/retention_policy_base.py new file mode 100644 index 0000000..3524082 --- /dev/null +++ b/box_sdk_gen/schemas/retention_policy_base.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class RetentionPolicyBaseTypeField(str, Enum): + RETENTION_POLICY = 'retention_policy' + + +class RetentionPolicyBase(BaseObject): + _discriminator = 'type', {'retention_policy'} + + def __init__( + self, + id: str, + *, + type: RetentionPolicyBaseTypeField = RetentionPolicyBaseTypeField.RETENTION_POLICY.value, + **kwargs + ): + """ + :param id: The unique identifier that represents a retention policy. + :type id: str + :param type: `retention_policy`, defaults to RetentionPolicyBaseTypeField.RETENTION_POLICY.value + :type type: RetentionPolicyBaseTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/retention_policy_mini.py b/box_sdk_gen/schemas/retention_policy_mini.py new file mode 100644 index 0000000..c44ba78 --- /dev/null +++ b/box_sdk_gen/schemas/retention_policy_mini.py @@ -0,0 +1,52 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.schemas.retention_policy_base import RetentionPolicyBaseTypeField + +from box_sdk_gen.schemas.retention_policy_base import RetentionPolicyBase + + +class RetentionPolicyMiniDispositionActionField(str, Enum): + PERMANENTLY_DELETE = 'permanently_delete' + REMOVE_RETENTION = 'remove_retention' + + +class RetentionPolicyMini(RetentionPolicyBase): + def __init__( + self, + id: str, + *, + policy_name: Optional[str] = None, + retention_length: Optional[str] = None, + disposition_action: Optional[RetentionPolicyMiniDispositionActionField] = None, + type: RetentionPolicyBaseTypeField = RetentionPolicyBaseTypeField.RETENTION_POLICY.value, + **kwargs + ): + """ + :param id: The unique identifier that represents a retention policy. + :type id: str + :param policy_name: The name given to the retention policy., defaults to None + :type policy_name: Optional[str], optional + :param retention_length: The length of the retention policy. This value + specifies the duration in days that the retention + policy will be active for after being assigned to + content. If the policy has a `policy_type` of + `indefinite`, the `retention_length` will also be + `indefinite`., defaults to None + :type retention_length: Optional[str], optional + :param disposition_action: The disposition action of the retention policy. + This action can be `permanently_delete`, which + will cause the content retained by the policy + to be permanently deleted, or `remove_retention`, + which will lift the retention policy from the content, + allowing it to be deleted by users, + once the retention policy has expired., defaults to None + :type disposition_action: Optional[RetentionPolicyMiniDispositionActionField], optional + :param type: `retention_policy`, defaults to RetentionPolicyBaseTypeField.RETENTION_POLICY.value + :type type: RetentionPolicyBaseTypeField, optional + """ + super().__init__(id=id, type=type, **kwargs) + self.policy_name = policy_name + self.retention_length = retention_length + self.disposition_action = disposition_action diff --git a/box_sdk_gen/schemas/role_variable.py b/box_sdk_gen/schemas/role_variable.py new file mode 100644 index 0000000..182b688 --- /dev/null +++ b/box_sdk_gen/schemas/role_variable.py @@ -0,0 +1,47 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class RoleVariableTypeField(str, Enum): + VARIABLE = 'variable' + + +class RoleVariableVariableTypeField(str, Enum): + COLLABORATOR_ROLE = 'collaborator_role' + + +class RoleVariableVariableValueField(str, Enum): + EDITOR = 'editor' + VIEWER = 'viewer' + PREVIEWER = 'previewer' + UPLOADER = 'uploader' + PREVIEWER_UPLOADER = 'previewer uploader' + VIEWER_UPLOADER = 'viewer uploader' + CO_OWNER = 'co-owner' + + +class RoleVariable(BaseObject): + _discriminator = 'type', {'variable'} + + def __init__( + self, + variable_value: RoleVariableVariableValueField, + *, + type: RoleVariableTypeField = RoleVariableTypeField.VARIABLE.value, + variable_type: RoleVariableVariableTypeField = RoleVariableVariableTypeField.COLLABORATOR_ROLE.value, + **kwargs + ): + """ + :param type: Role object type. + , defaults to RoleVariableTypeField.VARIABLE.value + :type type: RoleVariableTypeField, optional + :param variable_type: The variable type used + by the object. + , defaults to RoleVariableVariableTypeField.COLLABORATOR_ROLE.value + :type variable_type: RoleVariableVariableTypeField, optional + """ + super().__init__(**kwargs) + self.variable_value = variable_value + self.type = type + self.variable_type = variable_type diff --git a/box_sdk_gen/schemas/search_result_with_shared_link.py b/box_sdk_gen/schemas/search_result_with_shared_link.py new file mode 100644 index 0000000..3830702 --- /dev/null +++ b/box_sdk_gen/schemas/search_result_with_shared_link.py @@ -0,0 +1,35 @@ +from typing import Optional + +from typing import Union + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_full import FileFull + +from box_sdk_gen.schemas.folder_full import FolderFull + +from box_sdk_gen.schemas.web_link import WebLink + + +class SearchResultWithSharedLink(BaseObject): + def __init__( + self, + *, + accessible_via_shared_link: Optional[str] = None, + item: Optional[Union[FileFull, FolderFull, WebLink]] = None, + type: Optional[str] = None, + **kwargs + ): + """ + :param accessible_via_shared_link: The optional shared link through which the user has access to this + item. This value is only returned for items for which the user has + recently accessed the file through a shared link. For all other + items this value will return `null`., defaults to None + :type accessible_via_shared_link: Optional[str], optional + :param type: The result type. The value is always `search_result`., defaults to None + :type type: Optional[str], optional + """ + super().__init__(**kwargs) + self.accessible_via_shared_link = accessible_via_shared_link + self.item = item + self.type = type diff --git a/box_sdk_gen/schemas/search_results.py b/box_sdk_gen/schemas/search_results.py new file mode 100644 index 0000000..a601152 --- /dev/null +++ b/box_sdk_gen/schemas/search_results.py @@ -0,0 +1,57 @@ +from enum import Enum + +from typing import Optional + +from typing import List + +from typing import Union + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_full import FileFull + +from box_sdk_gen.schemas.folder_full import FolderFull + +from box_sdk_gen.schemas.web_link import WebLink + + +class SearchResultsTypeField(str, Enum): + SEARCH_RESULTS_ITEMS = 'search_results_items' + + +class SearchResults(BaseObject): + _discriminator = 'type', {'search_results_items'} + + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + type: SearchResultsTypeField = SearchResultsTypeField.SEARCH_RESULTS_ITEMS.value, + entries: Optional[List[Union[FileFull, FolderFull, WebLink]]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the search results. + The total number of entries in the collection may be less than + `total_count`., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for this search. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter used., defaults to None + :type offset: Optional[int], optional + :param type: Specifies the response as search result items without shared links, defaults to SearchResultsTypeField.SEARCH_RESULTS_ITEMS.value + :type type: SearchResultsTypeField, optional + :param entries: The search results for the query provided., defaults to None + :type entries: Optional[List[Union[FileFull, FolderFull, WebLink]]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.type = type + self.entries = entries diff --git a/box_sdk_gen/schemas/search_results_with_shared_links.py b/box_sdk_gen/schemas/search_results_with_shared_links.py new file mode 100644 index 0000000..cf94b2d --- /dev/null +++ b/box_sdk_gen/schemas/search_results_with_shared_links.py @@ -0,0 +1,55 @@ +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.search_result_with_shared_link import ( + SearchResultWithSharedLink, +) + + +class SearchResultsWithSharedLinksTypeField(str, Enum): + SEARCH_RESULTS_WITH_SHARED_LINKS = 'search_results_with_shared_links' + + +class SearchResultsWithSharedLinks(BaseObject): + _discriminator = 'type', {'search_results_with_shared_links'} + + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + type: SearchResultsWithSharedLinksTypeField = SearchResultsWithSharedLinksTypeField.SEARCH_RESULTS_WITH_SHARED_LINKS.value, + entries: Optional[List[SearchResultWithSharedLink]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the search results. + The total number of entries in the collection may be less than + `total_count`., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for this search. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter used., defaults to None + :type offset: Optional[int], optional + :param type: Specifies the response as search result items with shared links, defaults to SearchResultsWithSharedLinksTypeField.SEARCH_RESULTS_WITH_SHARED_LINKS.value + :type type: SearchResultsWithSharedLinksTypeField, optional + :param entries: The search results for the query provided, including the + additional information about any shared links through + which the item has been shared with the user., defaults to None + :type entries: Optional[List[SearchResultWithSharedLink]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.type = type + self.entries = entries diff --git a/box_sdk_gen/schemas/session_termination_message.py b/box_sdk_gen/schemas/session_termination_message.py new file mode 100644 index 0000000..0ac8842 --- /dev/null +++ b/box_sdk_gen/schemas/session_termination_message.py @@ -0,0 +1,13 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class SessionTerminationMessage(BaseObject): + def __init__(self, *, message: Optional[str] = None, **kwargs): + """ + :param message: The unique identifier for the termination job status, defaults to None + :type message: Optional[str], optional + """ + super().__init__(**kwargs) + self.message = message diff --git a/box_sdk_gen/schemas/shield_information_barrier.py b/box_sdk_gen/schemas/shield_information_barrier.py new file mode 100644 index 0000000..8f9efd2 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier.py @@ -0,0 +1,75 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.enterprise_base import EnterpriseBase + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.internal.utils import DateTime + + +class ShieldInformationBarrierTypeField(str, Enum): + SHIELD_INFORMATION_BARRIER = 'shield_information_barrier' + + +class ShieldInformationBarrierStatusField(str, Enum): + DRAFT = 'draft' + PENDING = 'pending' + DISABLED = 'disabled' + ENABLED = 'enabled' + INVALID = 'invalid' + + +class ShieldInformationBarrier(BaseObject): + _discriminator = 'type', {'shield_information_barrier'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[ShieldInformationBarrierTypeField] = None, + enterprise: Optional[EnterpriseBase] = None, + status: Optional[ShieldInformationBarrierStatusField] = None, + created_at: Optional[DateTime] = None, + created_by: Optional[UserBase] = None, + updated_at: Optional[DateTime] = None, + updated_by: Optional[UserBase] = None, + enabled_at: Optional[DateTime] = None, + enabled_by: Optional[UserBase] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shield information barrier, defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier, defaults to None + :type type: Optional[ShieldInformationBarrierTypeField], optional + :param enterprise: The `type` and `id` of enterprise this barrier is under., defaults to None + :type enterprise: Optional[EnterpriseBase], optional + :param status: Status of the shield information barrier, defaults to None + :type status: Optional[ShieldInformationBarrierStatusField], optional + :param created_at: ISO date time string when this + shield information barrier object was created., defaults to None + :type created_at: Optional[DateTime], optional + :param created_by: The user who created this shield information barrier., defaults to None + :type created_by: Optional[UserBase], optional + :param updated_at: ISO date time string when this shield information barrier was updated., defaults to None + :type updated_at: Optional[DateTime], optional + :param updated_by: The user that updated this shield information barrier., defaults to None + :type updated_by: Optional[UserBase], optional + :param enabled_at: ISO date time string when this shield information barrier was enabled., defaults to None + :type enabled_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.enterprise = enterprise + self.status = status + self.created_at = created_at + self.created_by = created_by + self.updated_at = updated_at + self.updated_by = updated_by + self.enabled_at = enabled_at + self.enabled_by = enabled_by diff --git a/box_sdk_gen/schemas/shield_information_barrier_base.py b/box_sdk_gen/schemas/shield_information_barrier_base.py new file mode 100644 index 0000000..837816a --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_base.py @@ -0,0 +1,30 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class ShieldInformationBarrierBaseTypeField(str, Enum): + SHIELD_INFORMATION_BARRIER = 'shield_information_barrier' + + +class ShieldInformationBarrierBase(BaseObject): + _discriminator = 'type', {'shield_information_barrier'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[ShieldInformationBarrierBaseTypeField] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shield information barrier, defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier, defaults to None + :type type: Optional[ShieldInformationBarrierBaseTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/shield_information_barrier_reference.py b/box_sdk_gen/schemas/shield_information_barrier_reference.py new file mode 100644 index 0000000..4ccf617 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_reference.py @@ -0,0 +1,18 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) + + +class ShieldInformationBarrierReference(BaseObject): + def __init__( + self, + *, + shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, + **kwargs + ): + super().__init__(**kwargs) + self.shield_information_barrier = shield_information_barrier diff --git a/box_sdk_gen/schemas/shield_information_barrier_report.py b/box_sdk_gen/schemas/shield_information_barrier_report.py new file mode 100644 index 0000000..ec0ec9d --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_report.py @@ -0,0 +1,67 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.schemas.shield_information_barrier_report_base import ( + ShieldInformationBarrierReportBaseTypeField, +) + +from box_sdk_gen.schemas.shield_information_barrier_report_base import ( + ShieldInformationBarrierReportBase, +) + +from box_sdk_gen.schemas.shield_information_barrier_reference import ( + ShieldInformationBarrierReference, +) + +from box_sdk_gen.schemas.shield_information_barrier_report_details import ( + ShieldInformationBarrierReportDetails, +) + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.internal.utils import DateTime + + +class ShieldInformationBarrierReportStatusField(str, Enum): + PENDING = 'pending' + ERROR = 'error' + DONE = 'done' + CANCELLED = 'cancelled' + + +class ShieldInformationBarrierReport(ShieldInformationBarrierReportBase): + def __init__( + self, + *, + shield_information_barrier: Optional[ShieldInformationBarrierReference] = None, + status: Optional[ShieldInformationBarrierReportStatusField] = None, + details: Optional[ShieldInformationBarrierReportDetails] = None, + created_at: Optional[DateTime] = None, + created_by: Optional[UserBase] = None, + updated_at: Optional[DateTime] = None, + id: Optional[str] = None, + type: Optional[ShieldInformationBarrierReportBaseTypeField] = None, + **kwargs + ): + """ + :param status: Status of the shield information report, defaults to None + :type status: Optional[ShieldInformationBarrierReportStatusField], optional + :param created_at: ISO date time string when this + shield information barrier report object was created., defaults to None + :type created_at: Optional[DateTime], optional + :param updated_at: ISO date time string when this + shield information barrier report was updated., defaults to None + :type updated_at: Optional[DateTime], optional + :param id: The unique identifier for the shield information barrier report, defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier report, defaults to None + :type type: Optional[ShieldInformationBarrierReportBaseTypeField], optional + """ + super().__init__(id=id, type=type, **kwargs) + self.shield_information_barrier = shield_information_barrier + self.status = status + self.details = details + self.created_at = created_at + self.created_by = created_by + self.updated_at = updated_at diff --git a/box_sdk_gen/schemas/shield_information_barrier_report_base.py b/box_sdk_gen/schemas/shield_information_barrier_report_base.py new file mode 100644 index 0000000..c27865a --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_report_base.py @@ -0,0 +1,30 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class ShieldInformationBarrierReportBaseTypeField(str, Enum): + SHIELD_INFORMATION_BARRIER_REPORT = 'shield_information_barrier_report' + + +class ShieldInformationBarrierReportBase(BaseObject): + _discriminator = 'type', {'shield_information_barrier_report'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[ShieldInformationBarrierReportBaseTypeField] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shield information barrier report, defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier report, defaults to None + :type type: Optional[ShieldInformationBarrierReportBaseTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/shield_information_barrier_report_details.py b/box_sdk_gen/schemas/shield_information_barrier_report_details.py new file mode 100644 index 0000000..fbad0b3 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_report_details.py @@ -0,0 +1,24 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class ShieldInformationBarrierReportDetailsDetailsField(BaseObject): + def __init__(self, *, folder_id: Optional[str] = None, **kwargs): + """ + :param folder_id: Folder ID for locating this report, defaults to None + :type folder_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.folder_id = folder_id + + +class ShieldInformationBarrierReportDetails(BaseObject): + def __init__( + self, + *, + details: Optional[ShieldInformationBarrierReportDetailsDetailsField] = None, + **kwargs + ): + super().__init__(**kwargs) + self.details = details diff --git a/box_sdk_gen/schemas/shield_information_barrier_reports.py b/box_sdk_gen/schemas/shield_information_barrier_reports.py new file mode 100644 index 0000000..847c512 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_reports.py @@ -0,0 +1,35 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shield_information_barrier_report import ( + ShieldInformationBarrierReport, +) + + +class ShieldInformationBarrierReports(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + entries: Optional[List[ShieldInformationBarrierReport]] = None, + **kwargs + ): + """ + :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 entries: A list of shield information + barrier reports., defaults to None + :type entries: Optional[List[ShieldInformationBarrierReport]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment.py b/box_sdk_gen/schemas/shield_information_barrier_segment.py new file mode 100644 index 0000000..a756134 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segment.py @@ -0,0 +1,62 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.internal.utils import DateTime + + +class ShieldInformationBarrierSegmentTypeField(str, Enum): + SHIELD_INFORMATION_BARRIER_SEGMENT = 'shield_information_barrier_segment' + + +class ShieldInformationBarrierSegment(BaseObject): + _discriminator = 'type', {'shield_information_barrier_segment'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[ShieldInformationBarrierSegmentTypeField] = None, + shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, + name: Optional[str] = None, + description: Optional[str] = None, + created_at: Optional[DateTime] = None, + created_by: Optional[UserBase] = None, + updated_at: Optional[DateTime] = None, + updated_by: Optional[UserBase] = None, + **kwargs + ): + """ + :param id: The unique identifier for the shield information barrier segment, defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier segment, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentTypeField], optional + :param name: Name of the shield information barrier segment, defaults to None + :type name: Optional[str], optional + :param description: Description of the shield information barrier segment, defaults to None + :type description: Optional[str], optional + :param created_at: ISO date time string when this shield information + barrier object was created., defaults to None + :type created_at: Optional[DateTime], optional + :param updated_at: ISO date time string when this + shield information barrier segment was updated., defaults to None + :type updated_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.shield_information_barrier = shield_information_barrier + self.name = name + self.description = description + self.created_at = created_at + self.created_by = created_by + self.updated_at = updated_at + self.updated_by = updated_by diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_member.py b/box_sdk_gen/schemas/shield_information_barrier_segment_member.py new file mode 100644 index 0000000..2c0ecab --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_member.py @@ -0,0 +1,99 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shield_information_barrier_segment_member_base import ( + ShieldInformationBarrierSegmentMemberBaseTypeField, +) + +from box_sdk_gen.schemas.shield_information_barrier_segment_member_base import ( + ShieldInformationBarrierSegmentMemberBase, +) + +from box_sdk_gen.schemas.shield_information_barrier_segment_member_mini import ( + ShieldInformationBarrierSegmentMemberMini, +) + +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.internal.utils import DateTime + + +class ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField( + str, Enum +): + SHIELD_INFORMATION_BARRIER_SEGMENT = 'shield_information_barrier_segment' + + +class ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField( + BaseObject +): + _discriminator = 'type', {'shield_information_barrier_segment'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[ + ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField + ] = None, + **kwargs + ): + """ + :param id: The ID reference of the requesting + shield information barrier segment., defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier segment, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class ShieldInformationBarrierSegmentMember(ShieldInformationBarrierSegmentMemberMini): + def __init__( + self, + *, + shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, + shield_information_barrier_segment: Optional[ + ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField + ] = None, + created_at: Optional[DateTime] = None, + created_by: Optional[UserBase] = None, + updated_at: Optional[DateTime] = None, + updated_by: Optional[UserBase] = None, + user: Optional[UserBase] = None, + id: Optional[str] = None, + type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField] = None, + **kwargs + ): + """ + :param shield_information_barrier_segment: The `type` and `id` of the requested + shield information barrier segment., defaults to None + :type shield_information_barrier_segment: Optional[ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField], optional + :param created_at: ISO date time string when this shield + information barrier object was created., defaults to None + :type created_at: Optional[DateTime], optional + :param updated_at: ISO date time string when this + shield information barrier segment Member was updated., defaults to None + :type updated_at: Optional[DateTime], optional + :param id: The unique identifier for the + shield information barrier segment member, defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier segment member, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField], optional + """ + super().__init__(user=user, id=id, type=type, **kwargs) + self.shield_information_barrier = shield_information_barrier + self.shield_information_barrier_segment = shield_information_barrier_segment + self.created_at = created_at + self.created_by = created_by + self.updated_at = updated_at + self.updated_by = updated_by diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_member_base.py b/box_sdk_gen/schemas/shield_information_barrier_segment_member_base.py new file mode 100644 index 0000000..480d9a9 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_member_base.py @@ -0,0 +1,33 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class ShieldInformationBarrierSegmentMemberBaseTypeField(str, Enum): + SHIELD_INFORMATION_BARRIER_SEGMENT_MEMBER = ( + 'shield_information_barrier_segment_member' + ) + + +class ShieldInformationBarrierSegmentMemberBase(BaseObject): + _discriminator = 'type', {'shield_information_barrier_segment_member'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField] = None, + **kwargs + ): + """ + :param id: The unique identifier for the + shield information barrier segment member, defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier segment member, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_member_mini.py b/box_sdk_gen/schemas/shield_information_barrier_segment_member_mini.py new file mode 100644 index 0000000..e4a5e30 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_member_mini.py @@ -0,0 +1,33 @@ +from typing import Optional + +from box_sdk_gen.schemas.shield_information_barrier_segment_member_base import ( + ShieldInformationBarrierSegmentMemberBaseTypeField, +) + +from box_sdk_gen.schemas.shield_information_barrier_segment_member_base import ( + ShieldInformationBarrierSegmentMemberBase, +) + +from box_sdk_gen.schemas.user_base import UserBase + + +class ShieldInformationBarrierSegmentMemberMini( + ShieldInformationBarrierSegmentMemberBase +): + def __init__( + self, + *, + user: Optional[UserBase] = None, + id: Optional[str] = None, + type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField] = None, + **kwargs + ): + """ + :param id: The unique identifier for the + shield information barrier segment member, defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier segment member, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentMemberBaseTypeField], optional + """ + super().__init__(id=id, type=type, **kwargs) + self.user = user diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_members.py b/box_sdk_gen/schemas/shield_information_barrier_segment_members.py new file mode 100644 index 0000000..9193779 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_members.py @@ -0,0 +1,35 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shield_information_barrier_segment_member import ( + ShieldInformationBarrierSegmentMember, +) + + +class ShieldInformationBarrierSegmentMembers(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + entries: Optional[List[ShieldInformationBarrierSegmentMember]] = None, + **kwargs + ): + """ + :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 entries: A list of shield information + barrier segment members, defaults to None + :type entries: Optional[List[ShieldInformationBarrierSegmentMember]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_restriction.py b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction.py new file mode 100644 index 0000000..3d09faf --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction.py @@ -0,0 +1,81 @@ +from typing import Optional + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_base import ( + ShieldInformationBarrierSegmentRestrictionBaseTypeField, +) + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_base import ( + ShieldInformationBarrierSegmentRestrictionBase, +) + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_mini import ( + ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField, +) + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_mini import ( + ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField, +) + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_mini import ( + ShieldInformationBarrierSegmentRestrictionMini, +) + +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.internal.utils import DateTime + + +class ShieldInformationBarrierSegmentRestriction( + ShieldInformationBarrierSegmentRestrictionMini +): + def __init__( + self, + shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField, + restricted_segment: ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField, + *, + shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, + created_at: Optional[DateTime] = None, + created_by: Optional[UserBase] = None, + updated_at: Optional[DateTime] = None, + updated_by: Optional[UserBase] = None, + type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField] = None, + id: Optional[str] = None, + **kwargs + ): + """ + :param shield_information_barrier_segment: The `type` and `id` of the + requested shield information barrier segment. + :type shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField + :param restricted_segment: The `type` and `id` of the + restricted shield information barrier segment. + :type restricted_segment: ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField + :param created_at: ISO date time string when this + shield information barrier + Segment Restriction object was created., defaults to None + :type created_at: Optional[DateTime], optional + :param updated_at: ISO date time string when this + shield information barrier segment + Restriction was updated., defaults to None + :type updated_at: Optional[DateTime], optional + :param type: Shield information barrier segment restriction, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField], optional + :param id: The unique identifier for the + shield information barrier segment restriction., defaults to None + :type id: Optional[str], optional + """ + super().__init__( + shield_information_barrier_segment=shield_information_barrier_segment, + restricted_segment=restricted_segment, + type=type, + id=id, + **kwargs + ) + self.shield_information_barrier = shield_information_barrier + self.created_at = created_at + self.created_by = created_by + self.updated_at = updated_at + self.updated_by = updated_by diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_base.py b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_base.py new file mode 100644 index 0000000..2a7ee34 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_base.py @@ -0,0 +1,33 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class ShieldInformationBarrierSegmentRestrictionBaseTypeField(str, Enum): + SHIELD_INFORMATION_BARRIER_SEGMENT_RESTRICTION = ( + 'shield_information_barrier_segment_restriction' + ) + + +class ShieldInformationBarrierSegmentRestrictionBase(BaseObject): + _discriminator = 'type', {'shield_information_barrier_segment_restriction'} + + def __init__( + self, + *, + type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField] = None, + id: Optional[str] = None, + **kwargs + ): + """ + :param type: Shield information barrier segment restriction, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField], optional + :param id: The unique identifier for the + shield information barrier segment restriction., defaults to None + :type id: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_mini.py b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_mini.py new file mode 100644 index 0000000..8b7b660 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_restriction_mini.py @@ -0,0 +1,105 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_base import ( + ShieldInformationBarrierSegmentRestrictionBaseTypeField, +) + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction_base import ( + ShieldInformationBarrierSegmentRestrictionBase, +) + + +class ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentTypeField( + str, Enum +): + SHIELD_INFORMATION_BARRIER_SEGMENT = 'shield_information_barrier_segment' + + +class ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField( + BaseObject +): + _discriminator = 'type', {'shield_information_barrier_segment'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[ + ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentTypeField + ] = None, + **kwargs + ): + """ + :param id: The ID reference of the + requesting shield information barrier segment., defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information barrier segment, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentTypeField( + str, Enum +): + SHIELD_INFORMATION_BARRIER_SEGMENT = 'shield_information_barrier_segment' + + +class ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField(BaseObject): + _discriminator = 'type', {'shield_information_barrier_segment'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[ + ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentTypeField + ] = None, + **kwargs + ): + """ + :param id: The ID reference of the + restricted shield information barrier segment., defaults to None + :type id: Optional[str], optional + :param type: The type of the shield information segment, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class ShieldInformationBarrierSegmentRestrictionMini( + ShieldInformationBarrierSegmentRestrictionBase +): + def __init__( + self, + shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField, + restricted_segment: ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField, + *, + type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField] = None, + id: Optional[str] = None, + **kwargs + ): + """ + :param shield_information_barrier_segment: The `type` and `id` of the + requested shield information barrier segment. + :type shield_information_barrier_segment: ShieldInformationBarrierSegmentRestrictionMiniShieldInformationBarrierSegmentField + :param restricted_segment: The `type` and `id` of the + restricted shield information barrier segment. + :type restricted_segment: ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField + :param type: Shield information barrier segment restriction, defaults to None + :type type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField], optional + :param id: The unique identifier for the + shield information barrier segment restriction., defaults to None + :type id: Optional[str], optional + """ + super().__init__(type=type, id=id, **kwargs) + self.shield_information_barrier_segment = shield_information_barrier_segment + self.restricted_segment = restricted_segment diff --git a/box_sdk_gen/schemas/shield_information_barrier_segment_restrictions.py b/box_sdk_gen/schemas/shield_information_barrier_segment_restrictions.py new file mode 100644 index 0000000..057a252 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segment_restrictions.py @@ -0,0 +1,35 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction import ( + ShieldInformationBarrierSegmentRestriction, +) + + +class ShieldInformationBarrierSegmentRestrictions(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + entries: Optional[List[ShieldInformationBarrierSegmentRestriction]] = None, + **kwargs + ): + """ + :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 entries: A list of shield information barrier + segment restriction objects, defaults to None + :type entries: Optional[List[ShieldInformationBarrierSegmentRestriction]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/shield_information_barrier_segments.py b/box_sdk_gen/schemas/shield_information_barrier_segments.py new file mode 100644 index 0000000..f9f2e13 --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barrier_segments.py @@ -0,0 +1,35 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shield_information_barrier_segment import ( + ShieldInformationBarrierSegment, +) + + +class ShieldInformationBarrierSegments(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + entries: Optional[List[ShieldInformationBarrierSegment]] = None, + **kwargs + ): + """ + :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 entries: A list of shield information barrier + segments, defaults to None + :type entries: Optional[List[ShieldInformationBarrierSegment]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/shield_information_barriers.py b/box_sdk_gen/schemas/shield_information_barriers.py new file mode 100644 index 0000000..9b002cf --- /dev/null +++ b/box_sdk_gen/schemas/shield_information_barriers.py @@ -0,0 +1,32 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.shield_information_barrier import ShieldInformationBarrier + + +class ShieldInformationBarriers(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + entries: Optional[List[ShieldInformationBarrier]] = None, + **kwargs + ): + """ + :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 entries: A list of shield information barrier objects, defaults to None + :type entries: Optional[List[ShieldInformationBarrier]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/sign_request.py b/box_sdk_gen/schemas/sign_request.py new file mode 100644 index 0000000..1b592dd --- /dev/null +++ b/box_sdk_gen/schemas/sign_request.py @@ -0,0 +1,170 @@ +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.sign_request_prefill_tag import SignRequestPrefillTag + +from box_sdk_gen.schemas.sign_request_base import SignRequestBase + +from box_sdk_gen.schemas.file_base import FileBase + +from box_sdk_gen.schemas.sign_request_signer import SignRequestSigner + +from box_sdk_gen.schemas.file_mini import FileMini + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.internal.utils import DateTime + + +class SignRequestTypeField(str, Enum): + SIGN_REQUEST = 'sign-request' + + +class SignRequestStatusField(str, Enum): + CONVERTING = 'converting' + CREATED = 'created' + SENT = 'sent' + VIEWED = 'viewed' + SIGNED = 'signed' + CANCELLED = 'cancelled' + DECLINED = 'declined' + ERROR_CONVERTING = 'error_converting' + ERROR_SENDING = 'error_sending' + EXPIRED = 'expired' + FINALIZING = 'finalizing' + ERROR_FINALIZING = 'error_finalizing' + + +class SignRequestSignFilesField(BaseObject): + def __init__( + self, + *, + files: Optional[List[FileMini]] = None, + is_ready_for_download: Optional[bool] = None, + **kwargs + ): + """ + :param is_ready_for_download: Indicates whether the `sign_files` documents are processing + and the PDFs may be out of date. A change to any document + requires processing on all `sign_files`. We + recommended waiting until processing is finished + (and this value is true) before downloading the PDFs., defaults to None + :type is_ready_for_download: Optional[bool], optional + """ + super().__init__(**kwargs) + self.files = files + self.is_ready_for_download = is_ready_for_download + + +class SignRequest(SignRequestBase): + def __init__( + self, + *, + type: Optional[SignRequestTypeField] = None, + source_files: Optional[List[FileBase]] = None, + signers: Optional[List[SignRequestSigner]] = None, + signature_color: Optional[str] = None, + id: Optional[str] = None, + prepare_url: Optional[str] = None, + signing_log: Optional[FileMini] = None, + status: Optional[SignRequestStatusField] = None, + sign_files: Optional[SignRequestSignFilesField] = None, + auto_expire_at: Optional[DateTime] = None, + parent_folder: Optional[FolderMini] = None, + is_document_preparation_needed: Optional[bool] = None, + redirect_url: Optional[str] = None, + declined_redirect_url: Optional[str] = None, + are_text_signatures_enabled: Optional[bool] = None, + email_subject: Optional[str] = None, + email_message: Optional[str] = None, + are_reminders_enabled: Optional[bool] = None, + name: Optional[str] = None, + prefill_tags: Optional[List[SignRequestPrefillTag]] = None, + days_valid: Optional[int] = None, + external_id: Optional[str] = None, + is_phone_verification_required_to_view: Optional[bool] = None, + template_id: Optional[str] = None, + **kwargs + ): + """ + :param type: object type, defaults to None + :type type: Optional[SignRequestTypeField], optional + :param source_files: List of files to create a signing document from. This is currently limited to ten files. Only the ID and type fields are required for each file., defaults to None + :type source_files: Optional[List[FileBase]], optional + :param signers: Array of signers for the sign request, defaults to None + :type signers: Optional[List[SignRequestSigner]], optional + :param signature_color: Force a specific color for the signature (blue, black, or red)., defaults to None + :type signature_color: Optional[str], optional + :param id: Sign request ID, defaults to None + :type id: Optional[str], optional + :param prepare_url: This URL is returned if `is_document_preparation_needed` is + set to `true` in the request. It is used to prepare the sign request + via UI. The sign request is not sent until preparation is complete., defaults to None + :type prepare_url: Optional[str], optional + :param status: Describes the status of the sign request, defaults to None + :type status: Optional[SignRequestStatusField], optional + :param sign_files: List of files that will be signed, which are copies of the original + source files. A new version of these files are created as signers sign + and can be downloaded at any point in the signing process., defaults to None + :type sign_files: Optional[SignRequestSignFilesField], optional + :param auto_expire_at: Uses `days_valid` to calculate the date and time, in GMT, the sign request will expire if unsigned., defaults to None + :type auto_expire_at: Optional[DateTime], optional + :param is_document_preparation_needed: Indicates if the sender should receive a `prepare_url` in the response to complete document preparation via UI., defaults to None + :type is_document_preparation_needed: Optional[bool], optional + :param redirect_url: When specified, signature request will be redirected to this url when a document is signed., defaults to None + :type redirect_url: Optional[str], optional + :param declined_redirect_url: The uri that a signer will be redirected to after declining to sign a document., defaults to None + :type declined_redirect_url: Optional[str], optional + :param are_text_signatures_enabled: Disables the usage of signatures generated by typing (text)., defaults to None + :type are_text_signatures_enabled: Optional[bool], optional + :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None + :type email_subject: Optional[str], optional + :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None + :type email_message: Optional[str], optional + :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None + :type are_reminders_enabled: Optional[bool], optional + :param name: Name of the sign request., defaults to None + :type name: Optional[str], optional + :param prefill_tags: When a document contains sign related tags in the content, you can prefill them using this `prefill_tags` by referencing the 'id' of the tag as the `external_id` field of the prefill tag., defaults to None + :type prefill_tags: Optional[List[SignRequestPrefillTag]], optional + :param days_valid: Set the number of days after which the created signature request will automatically expire if not completed. By default, we do not apply any expiration date on signature requests, and the signature request does not expire., defaults to None + :type days_valid: Optional[int], optional + :param external_id: This can be used to reference an ID in an external system that the sign request is related to., defaults to None + :type external_id: Optional[str], optional + :param is_phone_verification_required_to_view: Forces signers to verify a text message prior to viewing the document. You must specify the phone number of signers to have this setting apply to them., defaults to None + :type is_phone_verification_required_to_view: Optional[bool], optional + :param template_id: When a signature request is created from a template this field will indicate the id of that template., defaults to None + :type template_id: Optional[str], optional + """ + super().__init__( + is_document_preparation_needed=is_document_preparation_needed, + redirect_url=redirect_url, + declined_redirect_url=declined_redirect_url, + are_text_signatures_enabled=are_text_signatures_enabled, + email_subject=email_subject, + email_message=email_message, + are_reminders_enabled=are_reminders_enabled, + name=name, + prefill_tags=prefill_tags, + days_valid=days_valid, + external_id=external_id, + is_phone_verification_required_to_view=is_phone_verification_required_to_view, + template_id=template_id, + **kwargs + ) + self.type = type + self.source_files = source_files + self.signers = signers + self.signature_color = signature_color + self.id = id + self.prepare_url = prepare_url + self.signing_log = signing_log + self.status = status + self.sign_files = sign_files + self.auto_expire_at = auto_expire_at + self.parent_folder = parent_folder diff --git a/box_sdk_gen/schemas/sign_request_base.py b/box_sdk_gen/schemas/sign_request_base.py new file mode 100644 index 0000000..a571eaf --- /dev/null +++ b/box_sdk_gen/schemas/sign_request_base.py @@ -0,0 +1,72 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.sign_request_prefill_tag import SignRequestPrefillTag + + +class SignRequestBase(BaseObject): + def __init__( + self, + *, + is_document_preparation_needed: Optional[bool] = None, + redirect_url: Optional[str] = None, + declined_redirect_url: Optional[str] = None, + are_text_signatures_enabled: Optional[bool] = None, + email_subject: Optional[str] = None, + email_message: Optional[str] = None, + are_reminders_enabled: Optional[bool] = None, + name: Optional[str] = None, + prefill_tags: Optional[List[SignRequestPrefillTag]] = None, + days_valid: Optional[int] = None, + external_id: Optional[str] = None, + is_phone_verification_required_to_view: Optional[bool] = None, + template_id: Optional[str] = None, + **kwargs + ): + """ + :param is_document_preparation_needed: Indicates if the sender should receive a `prepare_url` in the response to complete document preparation via UI., defaults to None + :type is_document_preparation_needed: Optional[bool], optional + :param redirect_url: When specified, signature request will be redirected to this url when a document is signed., defaults to None + :type redirect_url: Optional[str], optional + :param declined_redirect_url: The uri that a signer will be redirected to after declining to sign a document., defaults to None + :type declined_redirect_url: Optional[str], optional + :param are_text_signatures_enabled: Disables the usage of signatures generated by typing (text)., defaults to None + :type are_text_signatures_enabled: Optional[bool], optional + :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None + :type email_subject: Optional[str], optional + :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None + :type email_message: Optional[str], optional + :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None + :type are_reminders_enabled: Optional[bool], optional + :param name: Name of the sign request., defaults to None + :type name: Optional[str], optional + :param prefill_tags: When a document contains sign related tags in the content, you can prefill them using this `prefill_tags` by referencing the 'id' of the tag as the `external_id` field of the prefill tag., defaults to None + :type prefill_tags: Optional[List[SignRequestPrefillTag]], optional + :param days_valid: Set the number of days after which the created signature request will automatically expire if not completed. By default, we do not apply any expiration date on signature requests, and the signature request does not expire., defaults to None + :type days_valid: Optional[int], optional + :param external_id: This can be used to reference an ID in an external system that the sign request is related to., defaults to None + :type external_id: Optional[str], optional + :param is_phone_verification_required_to_view: Forces signers to verify a text message prior to viewing the document. You must specify the phone number of signers to have this setting apply to them., defaults to None + :type is_phone_verification_required_to_view: Optional[bool], optional + :param template_id: When a signature request is created from a template this field will indicate the id of that template., defaults to None + :type template_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.is_document_preparation_needed = is_document_preparation_needed + self.redirect_url = redirect_url + self.declined_redirect_url = declined_redirect_url + self.are_text_signatures_enabled = are_text_signatures_enabled + self.email_subject = email_subject + self.email_message = email_message + self.are_reminders_enabled = are_reminders_enabled + self.name = name + self.prefill_tags = prefill_tags + self.days_valid = days_valid + self.external_id = external_id + self.is_phone_verification_required_to_view = ( + is_phone_verification_required_to_view + ) + self.template_id = template_id diff --git a/box_sdk_gen/schemas/sign_request_create_request.py b/box_sdk_gen/schemas/sign_request_create_request.py new file mode 100644 index 0000000..eeccb15 --- /dev/null +++ b/box_sdk_gen/schemas/sign_request_create_request.py @@ -0,0 +1,100 @@ +from enum import Enum + +from typing import Optional + +from typing import List + +from box_sdk_gen.schemas.sign_request_prefill_tag import SignRequestPrefillTag + +from box_sdk_gen.schemas.sign_request_base import SignRequestBase + +from box_sdk_gen.schemas.file_base import FileBase + +from box_sdk_gen.schemas.sign_request_create_signer import SignRequestCreateSigner + +from box_sdk_gen.schemas.folder_mini import FolderMini + + +class SignRequestCreateRequestSignatureColorField(str, Enum): + BLUE = 'blue' + BLACK = 'black' + RED = 'red' + + +class SignRequestCreateRequest(SignRequestBase): + def __init__( + self, + signers: List[SignRequestCreateSigner], + *, + source_files: Optional[List[FileBase]] = None, + signature_color: Optional[SignRequestCreateRequestSignatureColorField] = None, + parent_folder: Optional[FolderMini] = None, + is_document_preparation_needed: Optional[bool] = None, + redirect_url: Optional[str] = None, + declined_redirect_url: Optional[str] = None, + are_text_signatures_enabled: Optional[bool] = None, + email_subject: Optional[str] = None, + email_message: Optional[str] = None, + are_reminders_enabled: Optional[bool] = None, + name: Optional[str] = None, + prefill_tags: Optional[List[SignRequestPrefillTag]] = None, + days_valid: Optional[int] = None, + external_id: Optional[str] = None, + is_phone_verification_required_to_view: Optional[bool] = None, + template_id: Optional[str] = None, + **kwargs + ): + """ + :param signers: Array of signers for the sign request. 35 is the max number of signers permitted. + :type signers: List[SignRequestCreateSigner] + :param source_files: List of files to create a signing document from. This is currently limited to ten files. Only the ID and type fields are required for each file., defaults to None + :type source_files: Optional[List[FileBase]], optional + :param signature_color: Force a specific color for the signature (blue, black, or red), defaults to None + :type signature_color: Optional[SignRequestCreateRequestSignatureColorField], optional + :param is_document_preparation_needed: Indicates if the sender should receive a `prepare_url` in the response to complete document preparation via UI., defaults to None + :type is_document_preparation_needed: Optional[bool], optional + :param redirect_url: When specified, signature request will be redirected to this url when a document is signed., defaults to None + :type redirect_url: Optional[str], optional + :param declined_redirect_url: The uri that a signer will be redirected to after declining to sign a document., defaults to None + :type declined_redirect_url: Optional[str], optional + :param are_text_signatures_enabled: Disables the usage of signatures generated by typing (text)., defaults to None + :type are_text_signatures_enabled: Optional[bool], optional + :param email_subject: Subject of sign request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None + :type email_subject: Optional[str], optional + :param email_message: Message to include in sign request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None + :type email_message: Optional[str], optional + :param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None + :type are_reminders_enabled: Optional[bool], optional + :param name: Name of the sign request., defaults to None + :type name: Optional[str], optional + :param prefill_tags: When a document contains sign related tags in the content, you can prefill them using this `prefill_tags` by referencing the 'id' of the tag as the `external_id` field of the prefill tag., defaults to None + :type prefill_tags: Optional[List[SignRequestPrefillTag]], optional + :param days_valid: Set the number of days after which the created signature request will automatically expire if not completed. By default, we do not apply any expiration date on signature requests, and the signature request does not expire., defaults to None + :type days_valid: Optional[int], optional + :param external_id: This can be used to reference an ID in an external system that the sign request is related to., defaults to None + :type external_id: Optional[str], optional + :param is_phone_verification_required_to_view: Forces signers to verify a text message prior to viewing the document. You must specify the phone number of signers to have this setting apply to them., defaults to None + :type is_phone_verification_required_to_view: Optional[bool], optional + :param template_id: When a signature request is created from a template this field will indicate the id of that template., defaults to None + :type template_id: Optional[str], optional + """ + super().__init__( + is_document_preparation_needed=is_document_preparation_needed, + redirect_url=redirect_url, + declined_redirect_url=declined_redirect_url, + are_text_signatures_enabled=are_text_signatures_enabled, + email_subject=email_subject, + email_message=email_message, + are_reminders_enabled=are_reminders_enabled, + name=name, + prefill_tags=prefill_tags, + days_valid=days_valid, + external_id=external_id, + is_phone_verification_required_to_view=is_phone_verification_required_to_view, + template_id=template_id, + **kwargs + ) + self.signers = signers + self.source_files = source_files + self.signature_color = signature_color + self.parent_folder = parent_folder diff --git a/box_sdk_gen/schemas/sign_request_create_signer.py b/box_sdk_gen/schemas/sign_request_create_signer.py new file mode 100644 index 0000000..179ef55 --- /dev/null +++ b/box_sdk_gen/schemas/sign_request_create_signer.py @@ -0,0 +1,91 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class SignRequestCreateSignerRoleField(str, Enum): + SIGNER = 'signer' + APPROVER = 'approver' + FINAL_COPY_READER = 'final_copy_reader' + + +class SignRequestCreateSigner(BaseObject): + def __init__( + self, + *, + email: Optional[str] = None, + role: Optional[SignRequestCreateSignerRoleField] = None, + is_in_person: Optional[bool] = None, + order: Optional[int] = None, + embed_url_external_user_id: Optional[str] = None, + redirect_url: Optional[str] = None, + declined_redirect_url: Optional[str] = None, + login_required: Optional[bool] = None, + verification_phone_number: Optional[str] = None, + password: Optional[str] = None, + signer_group_id: Optional[str] = None, + **kwargs + ): + """ + :param email: Email address of the signer. + The email address of the signer is required when making signature requests, except when using templates that are configured to include emails., defaults to None + :type email: Optional[str], optional + :param role: Defines the role of the signer in the sign request. A `signer` + must sign the document and an `approver` must approve the document. A + `final_copy_reader` only receives the final signed document and signing + log., defaults to None + :type role: Optional[SignRequestCreateSignerRoleField], optional + :param is_in_person: Used in combination with an embed URL for a sender. After the + sender signs, they are redirected to the next `in_person` signer., defaults to None + :type is_in_person: Optional[bool], optional + :param order: Order of the signer, defaults to None + :type order: Optional[int], optional + :param embed_url_external_user_id: User ID for the signer in an external application responsible + for authentication when accessing the embed URL., defaults to None + :type embed_url_external_user_id: Optional[str], optional + :param redirect_url: The URL that a signer will be redirected + to after signing a document. Defining this URL + overrides default or global redirect URL + settings for a specific signer. + If no declined redirect URL is specified, + this URL will be used for decline actions as well., defaults to None + :type redirect_url: Optional[str], optional + :param declined_redirect_url: The URL that a signer will be redirect + to after declining to sign a document. + Defining this URL overrides default or global + declined redirect URL settings for a specific signer., defaults to None + :type declined_redirect_url: Optional[str], optional + :param login_required: If set to true, signer will need to login to a Box account + before signing the request. If the signer does not have + an existing account, they will have an option to create + a free Box account., defaults to None + :type login_required: Optional[bool], optional + :param verification_phone_number: If set, this phone number is be used to verify the signer + via two factor authentication before they are able to sign the document., defaults to None + :type verification_phone_number: Optional[str], optional + :param password: If set, the signer is required to enter the password before they are able + to sign a document. This field is write only., defaults to None + :type password: Optional[str], optional + :param signer_group_id: If set, signers who have the same value will be assigned to the same input and to the same signer group. + A signer group is not a Box Group. It is an entity that belongs to a Sign Request and can only be + used/accessed within this Sign Request. A signer group is expected to have more than one signer. + If the provided value is only used for one signer, this value will be ignored and request will be handled + as it was intended for an individual signer. The value provided can be any string and only used to + determine which signers belongs to same group. A successful response will provide a generated UUID value + instead for signers in the same signer group., defaults to None + :type signer_group_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.email = email + self.role = role + self.is_in_person = is_in_person + self.order = order + self.embed_url_external_user_id = embed_url_external_user_id + self.redirect_url = redirect_url + self.declined_redirect_url = declined_redirect_url + self.login_required = login_required + self.verification_phone_number = verification_phone_number + self.password = password + self.signer_group_id = signer_group_id diff --git a/box_sdk_gen/schemas/sign_request_prefill_tag.py b/box_sdk_gen/schemas/sign_request_prefill_tag.py new file mode 100644 index 0000000..3fa07be --- /dev/null +++ b/box_sdk_gen/schemas/sign_request_prefill_tag.py @@ -0,0 +1,32 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.internal.utils import Date + + +class SignRequestPrefillTag(BaseObject): + def __init__( + self, + *, + document_tag_id: Optional[str] = None, + text_value: Optional[str] = None, + checkbox_value: Optional[bool] = None, + date_value: Optional[Date] = None, + **kwargs + ): + """ + :param document_tag_id: This references the ID of a specific tag contained in a file of the sign request., defaults to None + :type document_tag_id: Optional[str], optional + :param text_value: Text prefill value, defaults to None + :type text_value: Optional[str], optional + :param checkbox_value: Checkbox prefill value, defaults to None + :type checkbox_value: Optional[bool], optional + :param date_value: Date prefill value, defaults to None + :type date_value: Optional[Date], optional + """ + super().__init__(**kwargs) + self.document_tag_id = document_tag_id + self.text_value = text_value + self.checkbox_value = checkbox_value + self.date_value = date_value diff --git a/box_sdk_gen/schemas/sign_request_signer.py b/box_sdk_gen/schemas/sign_request_signer.py new file mode 100644 index 0000000..bb0c8fb --- /dev/null +++ b/box_sdk_gen/schemas/sign_request_signer.py @@ -0,0 +1,152 @@ +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.sign_request_create_signer import ( + SignRequestCreateSignerRoleField, +) + +from box_sdk_gen.schemas.sign_request_create_signer import SignRequestCreateSigner + +from box_sdk_gen.schemas.sign_request_signer_input import SignRequestSignerInput + +from box_sdk_gen.internal.utils import DateTime + + +class SignRequestSignerSignerDecisionTypeField(str, Enum): + SIGNED = 'signed' + DECLINED = 'declined' + + +class SignRequestSignerSignerDecisionField(BaseObject): + _discriminator = 'type', {'signed', 'declined'} + + def __init__( + self, + *, + type: Optional[SignRequestSignerSignerDecisionTypeField] = None, + finalized_at: Optional[DateTime] = None, + additional_info: Optional[str] = None, + **kwargs + ): + """ + :param type: Type of decision made by the signer, defaults to None + :type type: Optional[SignRequestSignerSignerDecisionTypeField], optional + :param finalized_at: Date and Time that the decision was made, defaults to None + :type finalized_at: Optional[DateTime], optional + :param additional_info: Additional info about the decision, such as the decline reason from the signer, defaults to None + :type additional_info: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.finalized_at = finalized_at + self.additional_info = additional_info + + +class SignRequestSigner(SignRequestCreateSigner): + def __init__( + self, + *, + has_viewed_document: Optional[bool] = None, + signer_decision: Optional[SignRequestSignerSignerDecisionField] = None, + inputs: Optional[List[SignRequestSignerInput]] = None, + embed_url: Optional[str] = None, + iframeable_embed_url: Optional[str] = None, + email: Optional[str] = None, + role: Optional[SignRequestCreateSignerRoleField] = None, + is_in_person: Optional[bool] = None, + order: Optional[int] = None, + embed_url_external_user_id: Optional[str] = None, + redirect_url: Optional[str] = None, + declined_redirect_url: Optional[str] = None, + login_required: Optional[bool] = None, + verification_phone_number: Optional[str] = None, + password: Optional[str] = None, + signer_group_id: Optional[str] = None, + **kwargs + ): + """ + :param has_viewed_document: Set to `true` if the signer views the document, defaults to None + :type has_viewed_document: Optional[bool], optional + :param signer_decision: Final decision made by the signer, defaults to None + :type signer_decision: Optional[SignRequestSignerSignerDecisionField], optional + :param embed_url: URL to direct a signer to for signing, defaults to None + :type embed_url: Optional[str], optional + :param iframeable_embed_url: This URL is specifically designed for + signing documents within an HTML `iframe` tag. + It will be returned in the response + only if the `embed_url_external_user_id` + parameter was passed in the + `create sign request` call., defaults to None + :type iframeable_embed_url: Optional[str], optional + :param email: Email address of the signer. + The email address of the signer is required when making signature requests, except when using templates that are configured to include emails., defaults to None + :type email: Optional[str], optional + :param role: Defines the role of the signer in the sign request. A `signer` + must sign the document and an `approver` must approve the document. A + `final_copy_reader` only receives the final signed document and signing + log., defaults to None + :type role: Optional[SignRequestCreateSignerRoleField], optional + :param is_in_person: Used in combination with an embed URL for a sender. After the + sender signs, they are redirected to the next `in_person` signer., defaults to None + :type is_in_person: Optional[bool], optional + :param order: Order of the signer, defaults to None + :type order: Optional[int], optional + :param embed_url_external_user_id: User ID for the signer in an external application responsible + for authentication when accessing the embed URL., defaults to None + :type embed_url_external_user_id: Optional[str], optional + :param redirect_url: The URL that a signer will be redirected + to after signing a document. Defining this URL + overrides default or global redirect URL + settings for a specific signer. + If no declined redirect URL is specified, + this URL will be used for decline actions as well., defaults to None + :type redirect_url: Optional[str], optional + :param declined_redirect_url: The URL that a signer will be redirect + to after declining to sign a document. + Defining this URL overrides default or global + declined redirect URL settings for a specific signer., defaults to None + :type declined_redirect_url: Optional[str], optional + :param login_required: If set to true, signer will need to login to a Box account + before signing the request. If the signer does not have + an existing account, they will have an option to create + a free Box account., defaults to None + :type login_required: Optional[bool], optional + :param verification_phone_number: If set, this phone number is be used to verify the signer + via two factor authentication before they are able to sign the document., defaults to None + :type verification_phone_number: Optional[str], optional + :param password: If set, the signer is required to enter the password before they are able + to sign a document. This field is write only., defaults to None + :type password: Optional[str], optional + :param signer_group_id: If set, signers who have the same value will be assigned to the same input and to the same signer group. + A signer group is not a Box Group. It is an entity that belongs to a Sign Request and can only be + used/accessed within this Sign Request. A signer group is expected to have more than one signer. + If the provided value is only used for one signer, this value will be ignored and request will be handled + as it was intended for an individual signer. The value provided can be any string and only used to + determine which signers belongs to same group. A successful response will provide a generated UUID value + instead for signers in the same signer group., defaults to None + :type signer_group_id: Optional[str], optional + """ + super().__init__( + email=email, + role=role, + is_in_person=is_in_person, + order=order, + embed_url_external_user_id=embed_url_external_user_id, + redirect_url=redirect_url, + declined_redirect_url=declined_redirect_url, + login_required=login_required, + verification_phone_number=verification_phone_number, + password=password, + signer_group_id=signer_group_id, + **kwargs + ) + self.has_viewed_document = has_viewed_document + self.signer_decision = signer_decision + self.inputs = inputs + self.embed_url = embed_url + self.iframeable_embed_url = iframeable_embed_url diff --git a/box_sdk_gen/schemas/sign_request_signer_input.py b/box_sdk_gen/schemas/sign_request_signer_input.py new file mode 100644 index 0000000..edfa6e1 --- /dev/null +++ b/box_sdk_gen/schemas/sign_request_signer_input.py @@ -0,0 +1,79 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.utils import Date + +from box_sdk_gen.schemas.sign_request_prefill_tag import SignRequestPrefillTag + + +class SignRequestSignerInputTypeField(str, Enum): + SIGNATURE = 'signature' + DATE = 'date' + TEXT = 'text' + CHECKBOX = 'checkbox' + RADIO = 'radio' + DROPDOWN = 'dropdown' + + +class SignRequestSignerInputContentTypeField(str, Enum): + SIGNATURE = 'signature' + INITIAL = 'initial' + STAMP = 'stamp' + DATE = 'date' + CHECKBOX = 'checkbox' + TEXT = 'text' + FULL_NAME = 'full_name' + FIRST_NAME = 'first_name' + LAST_NAME = 'last_name' + COMPANY = 'company' + TITLE = 'title' + EMAIL = 'email' + ATTACHMENT = 'attachment' + RADIO = 'radio' + DROPDOWN = 'dropdown' + + +class SignRequestSignerInput(SignRequestPrefillTag): + def __init__( + self, + page_index: int, + *, + type: Optional[SignRequestSignerInputTypeField] = None, + content_type: Optional[SignRequestSignerInputContentTypeField] = None, + read_only: Optional[bool] = None, + document_tag_id: Optional[str] = None, + text_value: Optional[str] = None, + checkbox_value: Optional[bool] = None, + date_value: Optional[Date] = None, + **kwargs + ): + """ + :param page_index: Index of page that the input is on + :type page_index: int + :param type: Type of input, defaults to None + :type type: Optional[SignRequestSignerInputTypeField], optional + :param content_type: Content type of input, defaults to None + :type content_type: Optional[SignRequestSignerInputContentTypeField], optional + :param read_only: Whether this input was defined as read-only(immutable by signers) or not, defaults to None + :type read_only: Optional[bool], optional + :param document_tag_id: This references the ID of a specific tag contained in a file of the sign request., defaults to None + :type document_tag_id: Optional[str], optional + :param text_value: Text prefill value, defaults to None + :type text_value: Optional[str], optional + :param checkbox_value: Checkbox prefill value, defaults to None + :type checkbox_value: Optional[bool], optional + :param date_value: Date prefill value, defaults to None + :type date_value: Optional[Date], optional + """ + super().__init__( + document_tag_id=document_tag_id, + text_value=text_value, + checkbox_value=checkbox_value, + date_value=date_value, + **kwargs + ) + self.page_index = page_index + self.type = type + self.content_type = content_type + self.read_only = read_only diff --git a/box_sdk_gen/schemas/sign_requests.py b/box_sdk_gen/schemas/sign_requests.py new file mode 100644 index 0000000..dd72a58 --- /dev/null +++ b/box_sdk_gen/schemas/sign_requests.py @@ -0,0 +1,32 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.sign_request import SignRequest + + +class SignRequests(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + entries: Optional[List[SignRequest]] = None, + **kwargs + ): + """ + :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 entries: A list of sign requests, defaults to None + :type entries: Optional[List[SignRequest]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/sign_template.py b/box_sdk_gen/schemas/sign_template.py new file mode 100644 index 0000000..8d3fffd --- /dev/null +++ b/box_sdk_gen/schemas/sign_template.py @@ -0,0 +1,213 @@ +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.folder_mini import FolderMini + +from box_sdk_gen.schemas.file_mini import FileMini + +from box_sdk_gen.schemas.template_signer import TemplateSigner + + +class SignTemplateTypeField(str, Enum): + SIGN_TEMPLATE = 'sign-template' + + +class SignTemplateAdditionalInfoNonEditableField(str, Enum): + EMAIL_SUBJECT = 'email_subject' + EMAIL_MESSAGE = 'email_message' + NAME = 'name' + DAYS_VALID = 'days_valid' + SIGNERS = 'signers' + SOURCE_FILES = 'source_files' + + +class SignTemplateAdditionalInfoRequiredSignersField(str, Enum): + EMAIL = 'email' + + +class SignTemplateAdditionalInfoRequiredField(BaseObject): + def __init__( + self, + *, + signers: Optional[ + List[List[SignTemplateAdditionalInfoRequiredSignersField]] + ] = None, + **kwargs + ): + """ + :param signers: Required signer fields., defaults to None + :type signers: Optional[List[List[SignTemplateAdditionalInfoRequiredSignersField]]], optional + """ + super().__init__(**kwargs) + self.signers = signers + + +class SignTemplateAdditionalInfoField(BaseObject): + def __init__( + self, + *, + non_editable: Optional[List[SignTemplateAdditionalInfoNonEditableField]] = None, + required: Optional[SignTemplateAdditionalInfoRequiredField] = None, + **kwargs + ): + """ + :param non_editable: Non editable fields., defaults to None + :type non_editable: Optional[List[SignTemplateAdditionalInfoNonEditableField]], optional + :param required: Required fields., defaults to None + :type required: Optional[SignTemplateAdditionalInfoRequiredField], optional + """ + super().__init__(**kwargs) + self.non_editable = non_editable + self.required = required + + +class SignTemplateReadySignLinkField(BaseObject): + def __init__( + self, + *, + url: Optional[str] = None, + name: Optional[str] = None, + instructions: Optional[str] = None, + folder_id: Optional[str] = None, + is_notification_disabled: Optional[bool] = None, + is_active: Optional[bool] = None, + **kwargs + ): + """ + :param url: The URL that can be sent to signers., defaults to None + :type url: Optional[str], optional + :param name: Request name., defaults to None + :type name: Optional[str], optional + :param instructions: Extra instructions for all signers., defaults to None + :type instructions: Optional[str], optional + :param folder_id: The destination folder to place final, + signed document and signing + log. Only `ID` and `type` fields are required. + The root folder, + folder ID `0`, cannot be used., defaults to None + :type folder_id: Optional[str], optional + :param is_notification_disabled: Whether to disable notifications when + a signer has signed., defaults to None + :type is_notification_disabled: Optional[bool], optional + :param is_active: Whether the ready sign link is enabled or not., defaults to None + :type is_active: Optional[bool], optional + """ + super().__init__(**kwargs) + self.url = url + self.name = name + self.instructions = instructions + self.folder_id = folder_id + self.is_notification_disabled = is_notification_disabled + self.is_active = is_active + + +class SignTemplateCustomBrandingField(BaseObject): + def __init__( + self, + *, + company_name: Optional[str] = None, + logo_uri: Optional[str] = None, + branding_color: Optional[str] = None, + email_footer_text: Optional[str] = None, + **kwargs + ): + """ + :param company_name: Name of the company, defaults to None + :type company_name: Optional[str], optional + :param logo_uri: Custom branding logo URI in the form of a base64 image., defaults to None + :type logo_uri: Optional[str], optional + :param branding_color: Custom branding color in hex., defaults to None + :type branding_color: Optional[str], optional + :param email_footer_text: Content of the email footer., defaults to None + :type email_footer_text: Optional[str], optional + """ + super().__init__(**kwargs) + self.company_name = company_name + self.logo_uri = logo_uri + self.branding_color = branding_color + self.email_footer_text = email_footer_text + + +class SignTemplate(BaseObject): + _discriminator = 'type', {'sign-template'} + + def __init__( + self, + *, + type: Optional[SignTemplateTypeField] = None, + id: Optional[str] = None, + name: Optional[str] = None, + email_subject: Optional[str] = None, + email_message: Optional[str] = None, + days_valid: Optional[int] = None, + parent_folder: Optional[FolderMini] = None, + source_files: Optional[List[FileMini]] = None, + are_fields_locked: Optional[bool] = None, + are_options_locked: Optional[bool] = None, + are_recipients_locked: Optional[bool] = None, + are_email_settings_locked: Optional[bool] = None, + are_files_locked: Optional[bool] = None, + signers: Optional[List[TemplateSigner]] = None, + additional_info: Optional[SignTemplateAdditionalInfoField] = None, + ready_sign_link: Optional[SignTemplateReadySignLinkField] = None, + custom_branding: Optional[SignTemplateCustomBrandingField] = None, + **kwargs + ): + """ + :param type: object type, defaults to None + :type type: Optional[SignTemplateTypeField], optional + :param id: Template identifier., defaults to None + :type id: Optional[str], optional + :param name: The name of the template., defaults to None + :type name: Optional[str], optional + :param email_subject: Subject of signature request email. This is cleaned by sign request. If this field is not passed, a default subject will be used., defaults to None + :type email_subject: Optional[str], optional + :param email_message: Message to include in signature request email. The field is cleaned through sanitization of specific characters. However, some html tags are allowed. Links included in the message are also converted to hyperlinks in the email. The message may contain the following html tags including `a`, `abbr`, `acronym`, `b`, `blockquote`, `code`, `em`, `i`, `ul`, `li`, `ol`, and `strong`. Be aware that when the text to html ratio is too high, the email may end up in spam filters. Custom styles on these tags are not allowed. If this field is not passed, a default message will be used., defaults to None + :type email_message: Optional[str], optional + :param days_valid: Set the number of days after which the created signature request will automatically expire if not completed. By default, we do not apply any expiration date on signature requests, and the signature request does not expire., defaults to None + :type days_valid: Optional[int], optional + :param source_files: List of files to create a signing document from. Only the ID and type fields are required for each file., defaults to None + :type source_files: Optional[List[FileMini]], optional + :param are_fields_locked: Indicates if the template input fields are editable or not., defaults to None + :type are_fields_locked: Optional[bool], optional + :param are_options_locked: Indicates if the template document options are editable or not, for example renaming the document., defaults to None + :type are_options_locked: Optional[bool], optional + :param are_recipients_locked: Indicates if the template signers are editable or not., defaults to None + :type are_recipients_locked: Optional[bool], optional + :param are_email_settings_locked: Indicates if the template email settings are editable or not., defaults to None + :type are_email_settings_locked: Optional[bool], optional + :param are_files_locked: Indicates if the template files are editable or not. This includes deleting or renaming template files., defaults to None + :type are_files_locked: Optional[bool], optional + :param signers: Array of signers for the template., defaults to None + :type signers: Optional[List[TemplateSigner]], optional + :param additional_info: Additional information on which fields are required and which fields are not editable., defaults to None + :type additional_info: Optional[SignTemplateAdditionalInfoField], optional + :param ready_sign_link: Box's ready-sign link feature enables you to create a link to a signature request that you've created from a template. Use this link when you want to post a signature request on a public form — such as an email, social media post, or web page — without knowing who the signers will be. Note: The ready-sign link feature is limited to Enterprise Plus customers and not available to Box Verified Enterprises., defaults to None + :type ready_sign_link: Optional[SignTemplateReadySignLinkField], optional + :param custom_branding: Custom branding applied to notifications + and signature requests., defaults to None + :type custom_branding: Optional[SignTemplateCustomBrandingField], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + self.name = name + self.email_subject = email_subject + self.email_message = email_message + self.days_valid = days_valid + self.parent_folder = parent_folder + self.source_files = source_files + self.are_fields_locked = are_fields_locked + self.are_options_locked = are_options_locked + self.are_recipients_locked = are_recipients_locked + self.are_email_settings_locked = are_email_settings_locked + self.are_files_locked = are_files_locked + self.signers = signers + self.additional_info = additional_info + self.ready_sign_link = ready_sign_link + self.custom_branding = custom_branding diff --git a/box_sdk_gen/schemas/sign_templates.py b/box_sdk_gen/schemas/sign_templates.py new file mode 100644 index 0000000..ed4a6ab --- /dev/null +++ b/box_sdk_gen/schemas/sign_templates.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.sign_template import SignTemplate + + +class SignTemplates(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[SignTemplate]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of templates., defaults to None + :type entries: Optional[List[SignTemplate]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/skill_cards_metadata.py b/box_sdk_gen/schemas/skill_cards_metadata.py new file mode 100644 index 0000000..9313104 --- /dev/null +++ b/box_sdk_gen/schemas/skill_cards_metadata.py @@ -0,0 +1,100 @@ +from typing import Optional + +from typing import List + +from typing import Union + +from typing import Dict + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCard + +from box_sdk_gen.schemas.timeline_skill_card import TimelineSkillCard + +from box_sdk_gen.schemas.transcript_skill_card import TranscriptSkillCard + +from box_sdk_gen.schemas.status_skill_card import StatusSkillCard + + +class SkillCardsMetadata(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'can_edit': '$canEdit', + 'id': '$id', + 'parent': '$parent', + 'scope': '$scope', + 'template': '$template', + 'type': '$type', + 'type_version': '$typeVersion', + 'version': '$version', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + '$canEdit': 'can_edit', + '$id': 'id', + '$parent': 'parent', + '$scope': 'scope', + '$template': 'template', + '$type': 'type', + '$typeVersion': 'type_version', + '$version': 'version', + **BaseObject._json_to_fields_mapping, + } + + def __init__( + self, + *, + can_edit: Optional[bool] = None, + id: Optional[str] = None, + parent: Optional[str] = None, + scope: Optional[str] = None, + template: Optional[str] = None, + type: Optional[str] = None, + type_version: Optional[int] = None, + version: Optional[int] = None, + cards: Optional[ + List[ + Union[ + KeywordSkillCard, + TimelineSkillCard, + TranscriptSkillCard, + StatusSkillCard, + ] + ] + ] = None, + **kwargs + ): + """ + :param can_edit: Whether the user can edit this metadata, defaults to None + :type can_edit: Optional[bool], optional + :param id: A UUID to identify the metadata object, defaults to None + :type id: Optional[str], optional + :param parent: An ID for the parent folder, defaults to None + :type parent: Optional[str], optional + :param scope: An ID for the scope in which this template + has been applied, defaults to None + :type scope: Optional[str], optional + :param template: The name of the template, defaults to None + :type template: Optional[str], optional + :param type: A unique identifier for the "type" of this instance. This is an internal + system property and should not be used by a client application., defaults to None + :type type: Optional[str], optional + :param type_version: The last-known version of the template of the object. This is an internal + system property and should not be used by a client application., defaults to None + :type type_version: Optional[int], optional + :param version: The version of the metadata object. Starts at 0 and increases every time + a user-defined property is modified., defaults to None + :type version: Optional[int], optional + :param cards: A list of Box Skill cards that have been applied to this file., defaults to None + :type cards: Optional[List[Union[KeywordSkillCard, TimelineSkillCard, TranscriptSkillCard, StatusSkillCard]]], optional + """ + super().__init__(**kwargs) + self.can_edit = can_edit + self.id = id + self.parent = parent + self.scope = scope + self.template = template + self.type = type + self.type_version = type_version + self.version = version + self.cards = cards diff --git a/box_sdk_gen/schemas/skill_invocation.py b/box_sdk_gen/schemas/skill_invocation.py new file mode 100644 index 0000000..fa475cb --- /dev/null +++ b/box_sdk_gen/schemas/skill_invocation.py @@ -0,0 +1,255 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Union + +from box_sdk_gen.schemas.file import File + +from box_sdk_gen.schemas.folder import Folder + +from box_sdk_gen.schemas.event import Event + +from box_sdk_gen.internal.utils import DateTime + + +class SkillInvocationTypeField(str, Enum): + SKILL_INVOCATION = 'skill_invocation' + + +class SkillInvocationSkillTypeField(str, Enum): + SKILL = 'skill' + + +class SkillInvocationSkillField(BaseObject): + _discriminator = 'type', {'skill'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[SkillInvocationSkillTypeField] = None, + name: Optional[str] = None, + api_key: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this skill, defaults to None + :type id: Optional[str], optional + :param type: `skill`, defaults to None + :type type: Optional[SkillInvocationSkillTypeField], optional + :param name: The name of the skill, defaults to None + :type name: Optional[str], optional + :param api_key: The client ID of the application, defaults to None + :type api_key: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + self.api_key = api_key + + +class SkillInvocationTokenReadTokenTypeField(str, Enum): + BEARER = 'bearer' + + +class SkillInvocationTokenReadField(BaseObject): + def __init__( + self, + *, + access_token: Optional[str] = None, + expires_in: Optional[int] = None, + token_type: Optional[SkillInvocationTokenReadTokenTypeField] = None, + restricted_to: Optional[str] = None, + **kwargs + ): + """ + :param access_token: The requested access token., defaults to None + :type access_token: Optional[str], optional + :param expires_in: The time in seconds by which this token will expire., defaults to None + :type expires_in: Optional[int], optional + :param token_type: The type of access token returned., defaults to None + :type token_type: Optional[SkillInvocationTokenReadTokenTypeField], optional + :param restricted_to: The permissions that this access token permits, + providing a list of resources (files, folders, etc) + and the scopes permitted for each of those resources., defaults to None + :type restricted_to: Optional[str], optional + """ + super().__init__(**kwargs) + self.access_token = access_token + self.expires_in = expires_in + self.token_type = token_type + self.restricted_to = restricted_to + + +class SkillInvocationTokenWriteTokenTypeField(str, Enum): + BEARER = 'bearer' + + +class SkillInvocationTokenWriteField(BaseObject): + def __init__( + self, + *, + access_token: Optional[str] = None, + expires_in: Optional[int] = None, + token_type: Optional[SkillInvocationTokenWriteTokenTypeField] = None, + restricted_to: Optional[str] = None, + **kwargs + ): + """ + :param access_token: The requested access token., defaults to None + :type access_token: Optional[str], optional + :param expires_in: The time in seconds by which this token will expire., defaults to None + :type expires_in: Optional[int], optional + :param token_type: The type of access token returned., defaults to None + :type token_type: Optional[SkillInvocationTokenWriteTokenTypeField], optional + :param restricted_to: The permissions that this access token permits, + providing a list of resources (files, folders, etc) + and the scopes permitted for each of those resources., defaults to None + :type restricted_to: Optional[str], optional + """ + super().__init__(**kwargs) + self.access_token = access_token + self.expires_in = expires_in + self.token_type = token_type + self.restricted_to = restricted_to + + +class SkillInvocationTokenField(BaseObject): + def __init__( + self, + *, + read: Optional[SkillInvocationTokenReadField] = None, + write: Optional[SkillInvocationTokenWriteField] = None, + **kwargs + ): + """ + :param read: The basics of an access token, defaults to None + :type read: Optional[SkillInvocationTokenReadField], optional + :param write: The basics of an access token, defaults to None + :type write: Optional[SkillInvocationTokenWriteField], optional + """ + super().__init__(**kwargs) + self.read = read + self.write = write + + +class SkillInvocationStatusStateField(str, Enum): + INVOKED = 'invoked' + PROCESSING = 'processing' + SUCCESS = 'success' + TRANSIENT_FAILURE = 'transient_failure' + PERMANENT_FAILURE = 'permanent_failure' + + +class SkillInvocationStatusField(BaseObject): + def __init__( + self, + *, + state: Optional[SkillInvocationStatusStateField] = None, + message: Optional[str] = None, + error_code: Optional[str] = None, + additional_info: Optional[str] = None, + **kwargs + ): + """ + :param state: The state of this event. + + * `invoked` - Triggered the skill with event details to start + applying skill on the file. + * `processing` - Currently processing. + * `success` - Completed processing with a success. + * `transient_failure` - Encountered an issue which can be + retried. + * `permanent_failure` - Encountered a permanent issue and + retry would not help., defaults to None + :type state: Optional[SkillInvocationStatusStateField], optional + :param message: Status information, defaults to None + :type message: Optional[str], optional + :param error_code: Error code information, if error occurred., defaults to None + :type error_code: Optional[str], optional + :param additional_info: Additional status information., defaults to None + :type additional_info: Optional[str], optional + """ + super().__init__(**kwargs) + self.state = state + self.message = message + self.error_code = error_code + self.additional_info = additional_info + + +class SkillInvocationEnterpriseTypeField(str, Enum): + ENTERPRISE = 'enterprise' + + +class SkillInvocationEnterpriseField(BaseObject): + _discriminator = 'type', {'enterprise'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[SkillInvocationEnterpriseTypeField] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this enterprise., defaults to None + :type id: Optional[str], optional + :param type: `enterprise`, defaults to None + :type type: Optional[SkillInvocationEnterpriseTypeField], optional + :param name: The name of the enterprise, defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + + +class SkillInvocation(BaseObject): + _discriminator = 'type', {'skill_invocation'} + + def __init__( + self, + *, + type: Optional[SkillInvocationTypeField] = None, + id: Optional[str] = None, + skill: Optional[SkillInvocationSkillField] = None, + token: Optional[SkillInvocationTokenField] = None, + status: Optional[SkillInvocationStatusField] = None, + created_at: Optional[DateTime] = None, + trigger: Optional[str] = None, + enterprise: Optional[SkillInvocationEnterpriseField] = None, + source: Optional[Union[File, Folder]] = None, + event: Optional[Event] = None, + **kwargs + ): + """ + :param type: `skill_invocation`, defaults to None + :type type: Optional[SkillInvocationTypeField], optional + :param id: Unique identifier for the invocation request., defaults to None + :type id: Optional[str], optional + :param token: The read-only and read-write access tokens for this item, defaults to None + :type token: Optional[SkillInvocationTokenField], optional + :param status: The details status of this event., defaults to None + :type status: Optional[SkillInvocationStatusField], optional + :param created_at: The time this invocation was created., defaults to None + :type created_at: Optional[DateTime], optional + :param trigger: Action that triggered the invocation, defaults to None + :type trigger: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + self.skill = skill + self.token = token + self.status = status + self.created_at = created_at + self.trigger = trigger + self.enterprise = enterprise + self.source = source + self.event = event diff --git a/box_sdk_gen/schemas/status_skill_card.py b/box_sdk_gen/schemas/status_skill_card.py new file mode 100644 index 0000000..d7a4d92 --- /dev/null +++ b/box_sdk_gen/schemas/status_skill_card.py @@ -0,0 +1,156 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.internal.utils import DateTime + + +class StatusSkillCardTypeField(str, Enum): + SKILL_CARD = 'skill_card' + + +class StatusSkillCardSkillCardTypeField(str, Enum): + STATUS = 'status' + + +class StatusSkillCardSkillCardTitleField(BaseObject): + def __init__(self, message: str, *, code: Optional[str] = None, **kwargs): + """ + :param message: The actual title to show in the UI. + :type message: str + :param code: An optional identifier for the title., defaults to None + :type code: Optional[str], optional + """ + super().__init__(**kwargs) + self.message = message + self.code = code + + +class StatusSkillCardStatusCodeField(str, Enum): + INVOKED = 'invoked' + PROCESSING = 'processing' + SUCCESS = 'success' + TRANSIENT_FAILURE = 'transient_failure' + PERMANENT_FAILURE = 'permanent_failure' + + +class StatusSkillCardStatusField(BaseObject): + def __init__( + self, + code: StatusSkillCardStatusCodeField, + *, + message: Optional[str] = None, + **kwargs + ): + """ + :param code: A code for the status of this Skill invocation. By + default each of these will have their own accompanied + messages. These can be adjusted by setting the `message` + value on this object. + :type code: StatusSkillCardStatusCodeField + :param message: A custom message that can be provided with this status. + This will be shown in the web app to the end user., defaults to None + :type message: Optional[str], optional + """ + super().__init__(**kwargs) + self.code = code + self.message = message + + +class StatusSkillCardSkillTypeField(str, Enum): + SERVICE = 'service' + + +class StatusSkillCardSkillField(BaseObject): + _discriminator = 'type', {'service'} + + def __init__( + self, + id: str, + *, + type: StatusSkillCardSkillTypeField = StatusSkillCardSkillTypeField.SERVICE.value, + **kwargs + ): + """ + :param id: A custom identifier that represent the service that + applied this metadata. + :type id: str + :param type: `service`, defaults to StatusSkillCardSkillTypeField.SERVICE.value + :type type: StatusSkillCardSkillTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class StatusSkillCardInvocationTypeField(str, Enum): + SKILL_INVOCATION = 'skill_invocation' + + +class StatusSkillCardInvocationField(BaseObject): + _discriminator = 'type', {'skill_invocation'} + + def __init__( + self, + id: str, + *, + type: StatusSkillCardInvocationTypeField = StatusSkillCardInvocationTypeField.SKILL_INVOCATION.value, + **kwargs + ): + """ + :param id: A custom identifier that represent the instance of + the service that applied this metadata. For example, + if your `image-recognition-service` runs on multiple + nodes, this field can be used to identify the ID of + the node that was used to apply the metadata. + :type id: str + :param type: `skill_invocation`, defaults to StatusSkillCardInvocationTypeField.SKILL_INVOCATION.value + :type type: StatusSkillCardInvocationTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class StatusSkillCard(BaseObject): + _discriminator = 'skill_card_type', {'status'} + + def __init__( + self, + status: StatusSkillCardStatusField, + skill: StatusSkillCardSkillField, + invocation: StatusSkillCardInvocationField, + *, + created_at: Optional[DateTime] = None, + type: StatusSkillCardTypeField = StatusSkillCardTypeField.SKILL_CARD.value, + skill_card_type: StatusSkillCardSkillCardTypeField = StatusSkillCardSkillCardTypeField.STATUS.value, + skill_card_title: Optional[StatusSkillCardSkillCardTitleField] = None, + **kwargs + ): + """ + :param status: Sets the status of the skill. This can be used to show a message to the user while the Skill is processing the data, or if it was not able to process the file. + :type status: StatusSkillCardStatusField + :param skill: The service that applied this metadata. + :type skill: StatusSkillCardSkillField + :param invocation: The invocation of this service, used to track + which instance of a service applied the metadata. + :type invocation: StatusSkillCardInvocationField + :param created_at: The optional date and time this card was created at., defaults to None + :type created_at: Optional[DateTime], optional + :param type: `skill_card`, defaults to StatusSkillCardTypeField.SKILL_CARD.value + :type type: StatusSkillCardTypeField, optional + :param skill_card_type: `status`, defaults to StatusSkillCardSkillCardTypeField.STATUS.value + :type skill_card_type: StatusSkillCardSkillCardTypeField, optional + :param skill_card_title: The title of the card., defaults to None + :type skill_card_title: Optional[StatusSkillCardSkillCardTitleField], optional + """ + super().__init__(**kwargs) + self.status = status + self.skill = skill + self.invocation = invocation + self.created_at = created_at + self.type = type + self.skill_card_type = skill_card_type + self.skill_card_title = skill_card_title diff --git a/box_sdk_gen/schemas/storage_policies.py b/box_sdk_gen/schemas/storage_policies.py new file mode 100644 index 0000000..ace49ab --- /dev/null +++ b/box_sdk_gen/schemas/storage_policies.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.storage_policy import StoragePolicy + + +class StoragePolicies(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[StoragePolicy]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of storage policies, defaults to None + :type entries: Optional[List[StoragePolicy]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/storage_policy.py b/box_sdk_gen/schemas/storage_policy.py new file mode 100644 index 0000000..ad87298 --- /dev/null +++ b/box_sdk_gen/schemas/storage_policy.py @@ -0,0 +1,26 @@ +from typing import Optional + +from box_sdk_gen.schemas.storage_policy_mini import StoragePolicyMiniTypeField + +from box_sdk_gen.schemas.storage_policy_mini import StoragePolicyMini + + +class StoragePolicy(StoragePolicyMini): + def __init__( + self, + id: str, + *, + name: Optional[str] = None, + type: StoragePolicyMiniTypeField = StoragePolicyMiniTypeField.STORAGE_POLICY.value, + **kwargs + ): + """ + :param id: The unique identifier for this storage policy + :type id: str + :param name: A descriptive name of the region, defaults to None + :type name: Optional[str], optional + :param type: `storage_policy`, defaults to StoragePolicyMiniTypeField.STORAGE_POLICY.value + :type type: StoragePolicyMiniTypeField, optional + """ + super().__init__(id=id, type=type, **kwargs) + self.name = name diff --git a/box_sdk_gen/schemas/storage_policy_assignment.py b/box_sdk_gen/schemas/storage_policy_assignment.py new file mode 100644 index 0000000..becace5 --- /dev/null +++ b/box_sdk_gen/schemas/storage_policy_assignment.py @@ -0,0 +1,51 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.storage_policy_mini import StoragePolicyMini + + +class StoragePolicyAssignmentTypeField(str, Enum): + STORAGE_POLICY_ASSIGNMENT = 'storage_policy_assignment' + + +class StoragePolicyAssignmentAssignedToField(BaseObject): + def __init__( + self, *, id: Optional[str] = None, type: Optional[str] = None, **kwargs + ): + """ + :param id: The unique identifier for this object, defaults to None + :type id: Optional[str], optional + :param type: The type for this object, defaults to None + :type type: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class StoragePolicyAssignment(BaseObject): + _discriminator = 'type', {'storage_policy_assignment'} + + def __init__( + self, + id: str, + *, + type: StoragePolicyAssignmentTypeField = StoragePolicyAssignmentTypeField.STORAGE_POLICY_ASSIGNMENT.value, + storage_policy: Optional[StoragePolicyMini] = None, + assigned_to: Optional[StoragePolicyAssignmentAssignedToField] = None, + **kwargs + ): + """ + :param id: The unique identifier for a storage policy assignment. + :type id: str + :param type: `storage_policy_assignment`, defaults to StoragePolicyAssignmentTypeField.STORAGE_POLICY_ASSIGNMENT.value + :type type: StoragePolicyAssignmentTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.storage_policy = storage_policy + self.assigned_to = assigned_to diff --git a/box_sdk_gen/schemas/storage_policy_assignments.py b/box_sdk_gen/schemas/storage_policy_assignments.py new file mode 100644 index 0000000..fdf9f04 --- /dev/null +++ b/box_sdk_gen/schemas/storage_policy_assignments.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.storage_policy_assignment import StoragePolicyAssignment + + +class StoragePolicyAssignments(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[StoragePolicyAssignment]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of storage policy assignments, defaults to None + :type entries: Optional[List[StoragePolicyAssignment]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/storage_policy_mini.py b/box_sdk_gen/schemas/storage_policy_mini.py new file mode 100644 index 0000000..1daa960 --- /dev/null +++ b/box_sdk_gen/schemas/storage_policy_mini.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class StoragePolicyMiniTypeField(str, Enum): + STORAGE_POLICY = 'storage_policy' + + +class StoragePolicyMini(BaseObject): + _discriminator = 'type', {'storage_policy'} + + def __init__( + self, + id: str, + *, + type: StoragePolicyMiniTypeField = StoragePolicyMiniTypeField.STORAGE_POLICY.value, + **kwargs + ): + """ + :param id: The unique identifier for this storage policy + :type id: str + :param type: `storage_policy`, defaults to StoragePolicyMiniTypeField.STORAGE_POLICY.value + :type type: StoragePolicyMiniTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/task.py b/box_sdk_gen/schemas/task.py new file mode 100644 index 0000000..a7656e8 --- /dev/null +++ b/box_sdk_gen/schemas/task.py @@ -0,0 +1,85 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_mini import FileMini + +from box_sdk_gen.schemas.task_assignments import TaskAssignments + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class TaskTypeField(str, Enum): + TASK = 'task' + + +class TaskActionField(str, Enum): + REVIEW = 'review' + COMPLETE = 'complete' + + +class TaskCompletionRuleField(str, Enum): + ALL_ASSIGNEES = 'all_assignees' + ANY_ASSIGNEE = 'any_assignee' + + +class Task(BaseObject): + _discriminator = 'type', {'task'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[TaskTypeField] = None, + item: Optional[FileMini] = None, + due_at: Optional[DateTime] = None, + action: Optional[TaskActionField] = None, + message: Optional[str] = None, + task_assignment_collection: Optional[TaskAssignments] = None, + is_completed: Optional[bool] = None, + created_by: Optional[UserMini] = None, + created_at: Optional[DateTime] = None, + completion_rule: Optional[TaskCompletionRuleField] = None, + **kwargs + ): + """ + :param id: The unique identifier for this task, defaults to None + :type id: Optional[str], optional + :param type: `task`, defaults to None + :type type: Optional[TaskTypeField], optional + :param due_at: When the task is due, defaults to None + :type due_at: Optional[DateTime], optional + :param action: The type of task the task assignee will be prompted to + perform., defaults to None + :type action: Optional[TaskActionField], optional + :param message: A message that will be included with the task, defaults to None + :type message: Optional[str], optional + :param is_completed: Whether the task has been completed, defaults to None + :type is_completed: Optional[bool], optional + :param created_at: When the task object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param completion_rule: Defines which assignees need to complete this task before the task + is considered completed. + + * `all_assignees` requires all assignees to review or + approve the the task in order for it to be considered completed. + * `any_assignee` accepts any one assignee to review or + approve the the task in order for it to be considered completed., defaults to None + :type completion_rule: Optional[TaskCompletionRuleField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.item = item + self.due_at = due_at + self.action = action + self.message = message + self.task_assignment_collection = task_assignment_collection + self.is_completed = is_completed + self.created_by = created_by + self.created_at = created_at + self.completion_rule = completion_rule diff --git a/box_sdk_gen/schemas/task_assignment.py b/box_sdk_gen/schemas/task_assignment.py new file mode 100644 index 0000000..3823254 --- /dev/null +++ b/box_sdk_gen/schemas/task_assignment.py @@ -0,0 +1,74 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.file_mini import FileMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class TaskAssignmentTypeField(str, Enum): + TASK_ASSIGNMENT = 'task_assignment' + + +class TaskAssignmentResolutionStateField(str, Enum): + COMPLETED = 'completed' + INCOMPLETE = 'incomplete' + APPROVED = 'approved' + REJECTED = 'rejected' + + +class TaskAssignment(BaseObject): + _discriminator = 'type', {'task_assignment'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[TaskAssignmentTypeField] = None, + item: Optional[FileMini] = None, + assigned_to: Optional[UserMini] = None, + message: Optional[str] = None, + completed_at: Optional[DateTime] = None, + assigned_at: Optional[DateTime] = None, + reminded_at: Optional[DateTime] = None, + resolution_state: Optional[TaskAssignmentResolutionStateField] = None, + assigned_by: Optional[UserMini] = None, + **kwargs + ): + """ + :param id: The unique identifier for this task assignment, defaults to None + :type id: Optional[str], optional + :param type: `task_assignment`, defaults to None + :type type: Optional[TaskAssignmentTypeField], optional + :param message: A message that will is included with the task + assignment. This is visible to the assigned user in the web and mobile + UI., defaults to None + :type message: Optional[str], optional + :param completed_at: The date at which this task assignment was + completed. This will be `null` if the task is not completed yet., defaults to None + :type completed_at: Optional[DateTime], optional + :param assigned_at: The date at which this task was assigned to the user., defaults to None + :type assigned_at: Optional[DateTime], optional + :param reminded_at: The date at which the assigned user was reminded of this task + assignment., defaults to None + :type reminded_at: Optional[DateTime], optional + :param resolution_state: The current state of the assignment. The available states depend on + the `action` value of the task object., defaults to None + :type resolution_state: Optional[TaskAssignmentResolutionStateField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.item = item + self.assigned_to = assigned_to + self.message = message + self.completed_at = completed_at + self.assigned_at = assigned_at + self.reminded_at = reminded_at + self.resolution_state = resolution_state + self.assigned_by = assigned_by diff --git a/box_sdk_gen/schemas/task_assignments.py b/box_sdk_gen/schemas/task_assignments.py new file mode 100644 index 0000000..35fb5cc --- /dev/null +++ b/box_sdk_gen/schemas/task_assignments.py @@ -0,0 +1,26 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.task_assignment import TaskAssignment + + +class TaskAssignments(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + entries: Optional[List[TaskAssignment]] = None, + **kwargs + ): + """ + :param total_count: The total number of items in this collection., defaults to None + :type total_count: Optional[int], optional + :param entries: A list of task assignments, defaults to None + :type entries: Optional[List[TaskAssignment]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries diff --git a/box_sdk_gen/schemas/tasks.py b/box_sdk_gen/schemas/tasks.py new file mode 100644 index 0000000..3a07021 --- /dev/null +++ b/box_sdk_gen/schemas/tasks.py @@ -0,0 +1,28 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.task import Task + + +class Tasks(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + entries: Optional[List[Task]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`., defaults to None + :type total_count: Optional[int], optional + :param entries: A list of tasks, defaults to None + :type entries: Optional[List[Task]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries diff --git a/box_sdk_gen/schemas/template_signer.py b/box_sdk_gen/schemas/template_signer.py new file mode 100644 index 0000000..5a5c84c --- /dev/null +++ b/box_sdk_gen/schemas/template_signer.py @@ -0,0 +1,56 @@ +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.template_signer_input import TemplateSignerInput + + +class TemplateSignerRoleField(str, Enum): + SIGNER = 'signer' + APPROVER = 'approver' + FINAL_COPY_READER = 'final_copy_reader' + + +class TemplateSigner(BaseObject): + def __init__( + self, + *, + inputs: Optional[List[TemplateSignerInput]] = None, + email: Optional[str] = None, + role: Optional[TemplateSignerRoleField] = None, + is_in_person: Optional[bool] = None, + order: Optional[int] = None, + signer_group_id: Optional[str] = None, + **kwargs + ): + """ + :param email: Email address of the signer, defaults to None + :type email: Optional[str], optional + :param role: Defines the role of the signer in the signature request. A role of + `signer` needs to sign the document, a role `approver` + approves the document and + a `final_copy_reader` role only + receives the final signed document and signing log., defaults to None + :type role: Optional[TemplateSignerRoleField], optional + :param is_in_person: Used in combination with an embed URL for a sender. + After the sender signs, they will be + redirected to the next `in_person` signer., defaults to None + :type is_in_person: Optional[bool], optional + :param order: Order of the signer, defaults to None + :type order: Optional[int], optional + :param signer_group_id: If provided, this value points signers that are assigned the same inputs and belongs to same signer group. + A signer group is not a Box Group. It is an entity that belongs to the template itself and can only be used + within Sign Requests created from it., defaults to None + :type signer_group_id: Optional[str], optional + """ + super().__init__(**kwargs) + self.inputs = inputs + self.email = email + self.role = role + self.is_in_person = is_in_person + self.order = order + self.signer_group_id = signer_group_id diff --git a/box_sdk_gen/schemas/template_signer_input.py b/box_sdk_gen/schemas/template_signer_input.py new file mode 100644 index 0000000..5450fcc --- /dev/null +++ b/box_sdk_gen/schemas/template_signer_input.py @@ -0,0 +1,142 @@ +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.internal.utils import Date + +from box_sdk_gen.schemas.sign_request_prefill_tag import SignRequestPrefillTag + + +class TemplateSignerInputTypeField(str, Enum): + SIGNATURE = 'signature' + DATE = 'date' + TEXT = 'text' + CHECKBOX = 'checkbox' + ATTACHMENT = 'attachment' + RADIO = 'radio' + DROPDOWN = 'dropdown' + + +class TemplateSignerInputContentTypeField(str, Enum): + SIGNATURE = 'signature' + INITIAL = 'initial' + STAMP = 'stamp' + DATE = 'date' + CHECKBOX = 'checkbox' + TEXT = 'text' + FULL_NAME = 'full_name' + FIRST_NAME = 'first_name' + LAST_NAME = 'last_name' + COMPANY = 'company' + TITLE = 'title' + EMAIL = 'email' + ATTACHMENT = 'attachment' + RADIO = 'radio' + DROPDOWN = 'dropdown' + + +class TemplateSignerInputCoordinatesField(BaseObject): + def __init__( + self, *, x: Optional[float] = None, y: Optional[float] = None, **kwargs + ): + """ + :param x: Relative x coordinate to the page the input is on, ranging from 0 to 1., defaults to None + :type x: Optional[float], optional + :param y: Relative y coordinate to the page the input is on, ranging from 0 to 1., defaults to None + :type y: Optional[float], optional + """ + super().__init__(**kwargs) + self.x = x + self.y = y + + +class TemplateSignerInputDimensionsField(BaseObject): + def __init__( + self, *, width: Optional[float] = None, height: Optional[float] = None, **kwargs + ): + """ + :param width: Relative width to the page the input is on, ranging from 0 to 1., defaults to None + :type width: Optional[float], optional + :param height: Relative height to the page the input is on, ranging from 0 to 1., defaults to None + :type height: Optional[float], optional + """ + super().__init__(**kwargs) + self.width = width + self.height = height + + +class TemplateSignerInput(SignRequestPrefillTag): + def __init__( + self, + page_index: int, + *, + type: Optional[TemplateSignerInputTypeField] = None, + content_type: Optional[TemplateSignerInputContentTypeField] = None, + is_required: Optional[bool] = None, + document_id: Optional[str] = None, + dropdown_choices: Optional[List[str]] = None, + group_id: Optional[str] = None, + coordinates: Optional[TemplateSignerInputCoordinatesField] = None, + dimensions: Optional[TemplateSignerInputDimensionsField] = None, + label: Optional[str] = None, + read_only: Optional[bool] = None, + document_tag_id: Optional[str] = None, + text_value: Optional[str] = None, + checkbox_value: Optional[bool] = None, + date_value: Optional[Date] = None, + **kwargs + ): + """ + :param page_index: Index of page that the input is on. + :type page_index: int + :param type: Type of input, defaults to None + :type type: Optional[TemplateSignerInputTypeField], optional + :param content_type: Content type of input, defaults to None + :type content_type: Optional[TemplateSignerInputContentTypeField], optional + :param is_required: Whether or not the input is required., defaults to None + :type is_required: Optional[bool], optional + :param document_id: Document identifier., defaults to None + :type document_id: Optional[str], optional + :param dropdown_choices: When the input is of the type `dropdown` this values will be filled with all the dropdown options., defaults to None + :type dropdown_choices: Optional[List[str]], optional + :param group_id: When the input is of type `radio` they can be grouped to gather with this identifier., defaults to None + :type group_id: Optional[str], optional + :param coordinates: Where the input is located on a page., defaults to None + :type coordinates: Optional[TemplateSignerInputCoordinatesField], optional + :param dimensions: The size of the input., defaults to None + :type dimensions: Optional[TemplateSignerInputDimensionsField], optional + :param label: The label field is used especially for text, attachment, radio, and checkbox type inputs., defaults to None + :type label: Optional[str], optional + :param read_only: Whether this input was defined as read-only(immutable by signers) or not, defaults to None + :type read_only: Optional[bool], optional + :param document_tag_id: This references the ID of a specific tag contained in a file of the sign request., defaults to None + :type document_tag_id: Optional[str], optional + :param text_value: Text prefill value, defaults to None + :type text_value: Optional[str], optional + :param checkbox_value: Checkbox prefill value, defaults to None + :type checkbox_value: Optional[bool], optional + :param date_value: Date prefill value, defaults to None + :type date_value: Optional[Date], optional + """ + super().__init__( + document_tag_id=document_tag_id, + text_value=text_value, + checkbox_value=checkbox_value, + date_value=date_value, + **kwargs + ) + self.page_index = page_index + self.type = type + self.content_type = content_type + self.is_required = is_required + self.document_id = document_id + self.dropdown_choices = dropdown_choices + self.group_id = group_id + self.coordinates = coordinates + self.dimensions = dimensions + self.label = label + self.read_only = read_only diff --git a/box_sdk_gen/schemas/terms_of_service.py b/box_sdk_gen/schemas/terms_of_service.py new file mode 100644 index 0000000..e02b8c9 --- /dev/null +++ b/box_sdk_gen/schemas/terms_of_service.py @@ -0,0 +1,90 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.terms_of_service_base import TermsOfServiceBaseTypeField + +from box_sdk_gen.schemas.terms_of_service_base import TermsOfServiceBase + +from box_sdk_gen.internal.utils import DateTime + + +class TermsOfServiceStatusField(str, Enum): + ENABLED = 'enabled' + DISABLED = 'disabled' + + +class TermsOfServiceEnterpriseTypeField(str, Enum): + ENTERPRISE = 'enterprise' + + +class TermsOfServiceEnterpriseField(BaseObject): + _discriminator = 'type', {'enterprise'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[TermsOfServiceEnterpriseTypeField] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this enterprise., defaults to None + :type id: Optional[str], optional + :param type: `enterprise`, defaults to None + :type type: Optional[TermsOfServiceEnterpriseTypeField], optional + :param name: The name of the enterprise, defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + + +class TermsOfServiceTosTypeField(str, Enum): + MANAGED = 'managed' + EXTERNAL = 'external' + + +class TermsOfService(TermsOfServiceBase): + def __init__( + self, + id: str, + *, + status: Optional[TermsOfServiceStatusField] = None, + enterprise: Optional[TermsOfServiceEnterpriseField] = None, + tos_type: Optional[TermsOfServiceTosTypeField] = None, + text: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + type: TermsOfServiceBaseTypeField = TermsOfServiceBaseTypeField.TERMS_OF_SERVICE.value, + **kwargs + ): + """ + :param id: The unique identifier for this terms of service. + :type id: str + :param status: Whether these terms are enabled or not, defaults to None + :type status: Optional[TermsOfServiceStatusField], optional + :param tos_type: Whether to apply these terms to managed users or external users, defaults to None + :type tos_type: Optional[TermsOfServiceTosTypeField], optional + :param text: The text for your terms and conditions. This text could be + empty if the `status` is set to `disabled`., defaults to None + :type text: Optional[str], optional + :param created_at: When the legal item was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the legal item was modified., defaults to None + :type modified_at: Optional[DateTime], optional + :param type: `terms_of_service`, defaults to TermsOfServiceBaseTypeField.TERMS_OF_SERVICE.value + :type type: TermsOfServiceBaseTypeField, optional + """ + super().__init__(id=id, type=type, **kwargs) + self.status = status + self.enterprise = enterprise + self.tos_type = tos_type + self.text = text + self.created_at = created_at + self.modified_at = modified_at diff --git a/box_sdk_gen/schemas/terms_of_service_base.py b/box_sdk_gen/schemas/terms_of_service_base.py new file mode 100644 index 0000000..f5f2f34 --- /dev/null +++ b/box_sdk_gen/schemas/terms_of_service_base.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class TermsOfServiceBaseTypeField(str, Enum): + TERMS_OF_SERVICE = 'terms_of_service' + + +class TermsOfServiceBase(BaseObject): + _discriminator = 'type', {'terms_of_service'} + + def __init__( + self, + id: str, + *, + type: TermsOfServiceBaseTypeField = TermsOfServiceBaseTypeField.TERMS_OF_SERVICE.value, + **kwargs + ): + """ + :param id: The unique identifier for this terms of service. + :type id: str + :param type: `terms_of_service`, defaults to TermsOfServiceBaseTypeField.TERMS_OF_SERVICE.value + :type type: TermsOfServiceBaseTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/terms_of_service_user_status.py b/box_sdk_gen/schemas/terms_of_service_user_status.py new file mode 100644 index 0000000..28f9e2f --- /dev/null +++ b/box_sdk_gen/schemas/terms_of_service_user_status.py @@ -0,0 +1,52 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.terms_of_service_base import TermsOfServiceBase + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class TermsOfServiceUserStatusTypeField(str, Enum): + TERMS_OF_SERVICE_USER_STATUS = 'terms_of_service_user_status' + + +class TermsOfServiceUserStatus(BaseObject): + _discriminator = 'type', {'terms_of_service_user_status'} + + def __init__( + self, + id: str, + *, + type: TermsOfServiceUserStatusTypeField = TermsOfServiceUserStatusTypeField.TERMS_OF_SERVICE_USER_STATUS.value, + tos: Optional[TermsOfServiceBase] = None, + user: Optional[UserMini] = None, + is_accepted: Optional[bool] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param id: The unique identifier for this terms of service user status + :type id: str + :param type: `terms_of_service_user_status`, defaults to TermsOfServiceUserStatusTypeField.TERMS_OF_SERVICE_USER_STATUS.value + :type type: TermsOfServiceUserStatusTypeField, optional + :param is_accepted: If the user has accepted the terms of services, defaults to None + :type is_accepted: Optional[bool], optional + :param created_at: When the legal item was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the legal item was modified., defaults to None + :type modified_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.tos = tos + self.user = user + self.is_accepted = is_accepted + self.created_at = created_at + self.modified_at = modified_at diff --git a/box_sdk_gen/schemas/terms_of_service_user_statuses.py b/box_sdk_gen/schemas/terms_of_service_user_statuses.py new file mode 100644 index 0000000..626ce6d --- /dev/null +++ b/box_sdk_gen/schemas/terms_of_service_user_statuses.py @@ -0,0 +1,26 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.terms_of_service_user_status import TermsOfServiceUserStatus + + +class TermsOfServiceUserStatuses(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + entries: Optional[List[TermsOfServiceUserStatus]] = None, + **kwargs + ): + """ + :param total_count: The total number of objects., defaults to None + :type total_count: Optional[int], optional + :param entries: A list of terms of service user statuses, defaults to None + :type entries: Optional[List[TermsOfServiceUserStatus]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries diff --git a/box_sdk_gen/schemas/terms_of_services.py b/box_sdk_gen/schemas/terms_of_services.py new file mode 100644 index 0000000..25f29d9 --- /dev/null +++ b/box_sdk_gen/schemas/terms_of_services.py @@ -0,0 +1,26 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.terms_of_service import TermsOfService + + +class TermsOfServices(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + entries: Optional[List[TermsOfService]] = None, + **kwargs + ): + """ + :param total_count: The total number of objects., defaults to None + :type total_count: Optional[int], optional + :param entries: A list of terms of service objects, defaults to None + :type entries: Optional[List[TermsOfService]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries diff --git a/box_sdk_gen/schemas/timeline_skill_card.py b/box_sdk_gen/schemas/timeline_skill_card.py new file mode 100644 index 0000000..4ef2ecb --- /dev/null +++ b/box_sdk_gen/schemas/timeline_skill_card.py @@ -0,0 +1,180 @@ +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.internal.utils import DateTime + + +class TimelineSkillCardTypeField(str, Enum): + SKILL_CARD = 'skill_card' + + +class TimelineSkillCardSkillCardTypeField(str, Enum): + TIMELINE = 'timeline' + + +class TimelineSkillCardSkillCardTitleField(BaseObject): + def __init__(self, message: str, *, code: Optional[str] = None, **kwargs): + """ + :param message: The actual title to show in the UI. + :type message: str + :param code: An optional identifier for the title., defaults to None + :type code: Optional[str], optional + """ + super().__init__(**kwargs) + self.message = message + self.code = code + + +class TimelineSkillCardSkillTypeField(str, Enum): + SERVICE = 'service' + + +class TimelineSkillCardSkillField(BaseObject): + _discriminator = 'type', {'service'} + + def __init__( + self, + id: str, + *, + type: TimelineSkillCardSkillTypeField = TimelineSkillCardSkillTypeField.SERVICE.value, + **kwargs + ): + """ + :param id: A custom identifier that represent the service that + applied this metadata. + :type id: str + :param type: `service`, defaults to TimelineSkillCardSkillTypeField.SERVICE.value + :type type: TimelineSkillCardSkillTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class TimelineSkillCardInvocationTypeField(str, Enum): + SKILL_INVOCATION = 'skill_invocation' + + +class TimelineSkillCardInvocationField(BaseObject): + _discriminator = 'type', {'skill_invocation'} + + def __init__( + self, + id: str, + *, + type: TimelineSkillCardInvocationTypeField = TimelineSkillCardInvocationTypeField.SKILL_INVOCATION.value, + **kwargs + ): + """ + :param id: A custom identifier that represent the instance of + the service that applied this metadata. For example, + if your `image-recognition-service` runs on multiple + nodes, this field can be used to identify the ID of + the node that was used to apply the metadata. + :type id: str + :param type: `skill_invocation`, defaults to TimelineSkillCardInvocationTypeField.SKILL_INVOCATION.value + :type type: TimelineSkillCardInvocationTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class TimelineSkillCardEntriesAppearsField(BaseObject): + def __init__( + self, *, start: Optional[int] = None, end: Optional[int] = None, **kwargs + ): + """ + :param start: The time in seconds when an + entry should start appearing on a timeline., defaults to None + :type start: Optional[int], optional + :param end: The time in seconds when an + entry should stop appearing on a timeline., defaults to None + :type end: Optional[int], optional + """ + super().__init__(**kwargs) + self.start = start + self.end = end + + +class TimelineSkillCardEntriesField(BaseObject): + def __init__( + self, + *, + text: Optional[str] = None, + appears: Optional[List[TimelineSkillCardEntriesAppearsField]] = None, + image_url: Optional[str] = None, + **kwargs + ): + """ + :param text: The text of the entry. This would be the display + name for an item being placed on the timeline, for example the name + of the person who was detected in a video., defaults to None + :type text: Optional[str], optional + :param appears: Defines a list of timestamps for when this item should appear on the + timeline., defaults to None + :type appears: Optional[List[TimelineSkillCardEntriesAppearsField]], optional + :param image_url: The image to show on a for an entry that appears + on a timeline. This image URL is required for every entry. + + The image will be shown in a + list of items (for example faces), and clicking + the image will show the user where that entry + appears during the duration of this entry., defaults to None + :type image_url: Optional[str], optional + """ + super().__init__(**kwargs) + self.text = text + self.appears = appears + self.image_url = image_url + + +class TimelineSkillCard(BaseObject): + _discriminator = 'skill_card_type', {'timeline'} + + def __init__( + self, + skill: TimelineSkillCardSkillField, + invocation: TimelineSkillCardInvocationField, + entries: List[TimelineSkillCardEntriesField], + *, + created_at: Optional[DateTime] = None, + type: TimelineSkillCardTypeField = TimelineSkillCardTypeField.SKILL_CARD.value, + skill_card_type: TimelineSkillCardSkillCardTypeField = TimelineSkillCardSkillCardTypeField.TIMELINE.value, + skill_card_title: Optional[TimelineSkillCardSkillCardTitleField] = None, + duration: Optional[int] = None, + **kwargs + ): + """ + :param skill: The service that applied this metadata. + :type skill: TimelineSkillCardSkillField + :param invocation: The invocation of this service, used to track + which instance of a service applied the metadata. + :type invocation: TimelineSkillCardInvocationField + :param entries: A list of entries on the timeline. + :type entries: List[TimelineSkillCardEntriesField] + :param created_at: The optional date and time this card was created at., defaults to None + :type created_at: Optional[DateTime], optional + :param type: `skill_card`, defaults to TimelineSkillCardTypeField.SKILL_CARD.value + :type type: TimelineSkillCardTypeField, optional + :param skill_card_type: `timeline`, defaults to TimelineSkillCardSkillCardTypeField.TIMELINE.value + :type skill_card_type: TimelineSkillCardSkillCardTypeField, optional + :param skill_card_title: The title of the card., defaults to None + :type skill_card_title: Optional[TimelineSkillCardSkillCardTitleField], optional + :param duration: An total duration in seconds of the timeline., defaults to None + :type duration: Optional[int], optional + """ + super().__init__(**kwargs) + self.skill = skill + self.invocation = invocation + self.entries = entries + self.created_at = created_at + self.type = type + self.skill_card_type = skill_card_type + self.skill_card_title = skill_card_title + self.duration = duration diff --git a/box_sdk_gen/schemas/tracking_code.py b/box_sdk_gen/schemas/tracking_code.py new file mode 100644 index 0000000..5629769 --- /dev/null +++ b/box_sdk_gen/schemas/tracking_code.py @@ -0,0 +1,35 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class TrackingCodeTypeField(str, Enum): + TRACKING_CODE = 'tracking_code' + + +class TrackingCode(BaseObject): + _discriminator = 'type', {'tracking_code'} + + def __init__( + self, + *, + type: Optional[TrackingCodeTypeField] = None, + name: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + """ + :param type: `tracking_code`, defaults to None + :type type: Optional[TrackingCodeTypeField], optional + :param name: The name of the tracking code, which must be preconfigured in + the Admin Console, defaults to None + :type name: Optional[str], optional + :param value: The value of the tracking code, defaults to None + :type value: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.name = name + self.value = value diff --git a/box_sdk_gen/schemas/transcript_skill_card.py b/box_sdk_gen/schemas/transcript_skill_card.py new file mode 100644 index 0000000..ed34ff3 --- /dev/null +++ b/box_sdk_gen/schemas/transcript_skill_card.py @@ -0,0 +1,167 @@ +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.internal.utils import DateTime + + +class TranscriptSkillCardTypeField(str, Enum): + SKILL_CARD = 'skill_card' + + +class TranscriptSkillCardSkillCardTypeField(str, Enum): + TRANSCRIPT = 'transcript' + + +class TranscriptSkillCardSkillCardTitleField(BaseObject): + def __init__(self, message: str, *, code: Optional[str] = None, **kwargs): + """ + :param message: The actual title to show in the UI. + :type message: str + :param code: An optional identifier for the title., defaults to None + :type code: Optional[str], optional + """ + super().__init__(**kwargs) + self.message = message + self.code = code + + +class TranscriptSkillCardSkillTypeField(str, Enum): + SERVICE = 'service' + + +class TranscriptSkillCardSkillField(BaseObject): + _discriminator = 'type', {'service'} + + def __init__( + self, + id: str, + *, + type: TranscriptSkillCardSkillTypeField = TranscriptSkillCardSkillTypeField.SERVICE.value, + **kwargs + ): + """ + :param id: A custom identifier that represent the service that + applied this metadata. + :type id: str + :param type: `service`, defaults to TranscriptSkillCardSkillTypeField.SERVICE.value + :type type: TranscriptSkillCardSkillTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class TranscriptSkillCardInvocationTypeField(str, Enum): + SKILL_INVOCATION = 'skill_invocation' + + +class TranscriptSkillCardInvocationField(BaseObject): + _discriminator = 'type', {'skill_invocation'} + + def __init__( + self, + id: str, + *, + type: TranscriptSkillCardInvocationTypeField = TranscriptSkillCardInvocationTypeField.SKILL_INVOCATION.value, + **kwargs + ): + """ + :param id: A custom identifier that represent the instance of + the service that applied this metadata. For example, + if your `image-recognition-service` runs on multiple + nodes, this field can be used to identify the ID of + the node that was used to apply the metadata. + :type id: str + :param type: `skill_invocation`, defaults to TranscriptSkillCardInvocationTypeField.SKILL_INVOCATION.value + :type type: TranscriptSkillCardInvocationTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class TranscriptSkillCardEntriesAppearsField(BaseObject): + def __init__(self, *, start: Optional[int] = None, **kwargs): + """ + :param start: The time in seconds when an + entry should start appearing on a timeline., defaults to None + :type start: Optional[int], optional + """ + super().__init__(**kwargs) + self.start = start + + +class TranscriptSkillCardEntriesField(BaseObject): + def __init__( + self, + *, + text: Optional[str] = None, + appears: Optional[List[TranscriptSkillCardEntriesAppearsField]] = None, + **kwargs + ): + """ + :param text: The text of the entry. This would be the transcribed text assigned + to the entry on the timeline., defaults to None + :type text: Optional[str], optional + :param appears: Defines when a transcribed bit of text appears. This only includes a + start time and no end time., defaults to None + :type appears: Optional[List[TranscriptSkillCardEntriesAppearsField]], optional + """ + super().__init__(**kwargs) + self.text = text + self.appears = appears + + +class TranscriptSkillCard(BaseObject): + _discriminator = 'skill_card_type', {'transcript'} + + def __init__( + self, + skill: TranscriptSkillCardSkillField, + invocation: TranscriptSkillCardInvocationField, + entries: List[TranscriptSkillCardEntriesField], + *, + created_at: Optional[DateTime] = None, + type: TranscriptSkillCardTypeField = TranscriptSkillCardTypeField.SKILL_CARD.value, + skill_card_type: TranscriptSkillCardSkillCardTypeField = TranscriptSkillCardSkillCardTypeField.TRANSCRIPT.value, + skill_card_title: Optional[TranscriptSkillCardSkillCardTitleField] = None, + duration: Optional[int] = None, + **kwargs + ): + """ + :param skill: The service that applied this metadata. + :type skill: TranscriptSkillCardSkillField + :param invocation: The invocation of this service, used to track + which instance of a service applied the metadata. + :type invocation: TranscriptSkillCardInvocationField + :param entries: An list of entries for the card. This represents the individual entries of + the transcription. + :type entries: List[TranscriptSkillCardEntriesField] + :param created_at: The optional date and time this card was created at., defaults to None + :type created_at: Optional[DateTime], optional + :param type: `skill_card`, defaults to TranscriptSkillCardTypeField.SKILL_CARD.value + :type type: TranscriptSkillCardTypeField, optional + :param skill_card_type: `transcript`, defaults to TranscriptSkillCardSkillCardTypeField.TRANSCRIPT.value + :type skill_card_type: TranscriptSkillCardSkillCardTypeField, optional + :param skill_card_title: The title of the card., defaults to None + :type skill_card_title: Optional[TranscriptSkillCardSkillCardTitleField], optional + :param duration: An optional total duration in seconds. + + Used with a `skill_card_type` of `transcript` or + `timeline`., defaults to None + :type duration: Optional[int], optional + """ + super().__init__(**kwargs) + self.skill = skill + self.invocation = invocation + self.entries = entries + self.created_at = created_at + self.type = type + self.skill_card_type = skill_card_type + self.skill_card_title = skill_card_title + self.duration = duration diff --git a/box_sdk_gen/schemas/trash_file.py b/box_sdk_gen/schemas/trash_file.py new file mode 100644 index 0000000..24a3472 --- /dev/null +++ b/box_sdk_gen/schemas/trash_file.py @@ -0,0 +1,196 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + +from typing import Dict + +from box_sdk_gen.schemas.file_version_mini import FileVersionMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.internal.utils import DateTime + + +class TrashFileTypeField(str, Enum): + FILE = 'file' + + +class TrashFilePathCollectionEntriesTypeField(str, Enum): + FOLDER = 'folder' + + +class TrashFilePathCollectionEntriesField(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + *, + type: Optional[TrashFilePathCollectionEntriesTypeField] = None, + id: Optional[str] = None, + sequence_id: Optional[str] = None, + etag: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param type: `folder`, defaults to None + :type type: Optional[TrashFilePathCollectionEntriesTypeField], optional + :param id: The unique identifier that represent a folder., defaults to None + :type id: Optional[str], optional + :param sequence_id: This field is null for the Trash folder, defaults to None + :type sequence_id: Optional[str], optional + :param etag: This field is null for the Trash folder, defaults to None + :type etag: Optional[str], optional + :param name: The name of the Trash folder., defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + self.sequence_id = sequence_id + self.etag = etag + self.name = name + + +class TrashFilePathCollectionField(BaseObject): + def __init__( + self, + total_count: int, + entries: List[TrashFilePathCollectionEntriesField], + **kwargs + ): + """ + :param total_count: The number of folders in this list. + :type total_count: int + :param entries: Array of folders for this item's path collection + :type entries: List[TrashFilePathCollectionEntriesField] + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries + + +class TrashFileItemStatusField(str, Enum): + ACTIVE = 'active' + TRASHED = 'trashed' + DELETED = 'deleted' + + +class TrashFile(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'sha_1': 'sha1', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'sha1': 'sha_1', + **BaseObject._json_to_fields_mapping, + } + _discriminator = 'type', {'file'} + + def __init__( + self, + id: str, + sequence_id: str, + sha_1: str, + description: str, + size: int, + path_collection: TrashFilePathCollectionField, + created_at: DateTime, + modified_at: DateTime, + modified_by: UserMini, + owned_by: UserMini, + item_status: TrashFileItemStatusField, + *, + etag: Optional[str] = None, + type: TrashFileTypeField = TrashFileTypeField.FILE.value, + name: Optional[str] = None, + file_version: Optional[FileVersionMini] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, + created_by: Optional[UserMini] = None, + shared_link: Optional[str] = None, + parent: Optional[FolderMini] = None, + **kwargs + ): + """ + :param id: The unique identifier that represent a file. + + The ID for any file can be determined + by visiting a file in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/files/123` + the `file_id` is `123`. + :type id: str + :param sha_1: The SHA1 hash of the file. This can be used to compare the contents + of a file on Box with a local file. + :type sha_1: str + :param description: The optional description of this file + :type description: str + :param size: The file size in bytes. Be careful parsing this integer as it can + get very large and cause an integer overflow. + :type size: int + :param created_at: The date and time when the file was created on Box. + :type created_at: DateTime + :param modified_at: The date and time when the file was last updated on Box. + :type modified_at: DateTime + :param item_status: Defines if this item has been deleted or not. + + * `active` when the item has is not in the trash + * `trashed` when the item has been moved to the trash but not deleted + * `deleted` when the item has been permanently deleted. + :type item_status: TrashFileItemStatusField + :param etag: The HTTP `etag` of this file. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the file if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `file`, defaults to TrashFileTypeField.FILE.value + :type type: TrashFileTypeField, optional + :param name: The name of the file, defaults to None + :type name: Optional[str], optional + :param trashed_at: The time at which this file was put in the trash., defaults to None + :type trashed_at: Optional[DateTime], optional + :param purged_at: The time at which this file is expected to be purged + from the trash., defaults to None + :type purged_at: Optional[DateTime], optional + :param content_created_at: The date and time at which this file was originally + created, which might be before it was uploaded to Box., defaults to None + :type content_created_at: Optional[DateTime], optional + :param content_modified_at: The date and time at which this file was last updated, + which might be before it was uploaded to Box., defaults to None + :type content_modified_at: Optional[DateTime], optional + :param shared_link: The shared link for this file. This will + be `null` if a file has been trashed, since the link will no longer + be active., defaults to None + :type shared_link: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.sequence_id = sequence_id + self.sha_1 = sha_1 + self.description = description + self.size = size + self.path_collection = path_collection + self.created_at = created_at + self.modified_at = modified_at + self.modified_by = modified_by + self.owned_by = owned_by + self.item_status = item_status + self.etag = etag + self.type = type + self.name = name + self.file_version = file_version + self.trashed_at = trashed_at + self.purged_at = purged_at + self.content_created_at = content_created_at + self.content_modified_at = content_modified_at + self.created_by = created_by + self.shared_link = shared_link + self.parent = parent diff --git a/box_sdk_gen/schemas/trash_file_restored.py b/box_sdk_gen/schemas/trash_file_restored.py new file mode 100644 index 0000000..0568950 --- /dev/null +++ b/box_sdk_gen/schemas/trash_file_restored.py @@ -0,0 +1,155 @@ +from enum import Enum + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Optional + +from typing import Dict + +from box_sdk_gen.schemas.file_version_mini import FileVersionMini + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class TrashFileRestoredTypeField(str, Enum): + FILE = 'file' + + +class TrashFileRestoredPathCollectionField(BaseObject): + def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): + """ + :param total_count: The number of folders in this list. + :type total_count: int + :param entries: The parent folders for this item + :type entries: List[FolderMini] + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries + + +class TrashFileRestoredItemStatusField(str, Enum): + ACTIVE = 'active' + TRASHED = 'trashed' + DELETED = 'deleted' + + +class TrashFileRestored(BaseObject): + _fields_to_json_mapping: Dict[str, str] = { + 'sha_1': 'sha1', + **BaseObject._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'sha1': 'sha_1', + **BaseObject._json_to_fields_mapping, + } + _discriminator = 'type', {'file'} + + def __init__( + self, + id: str, + sequence_id: str, + sha_1: str, + description: str, + size: int, + path_collection: TrashFileRestoredPathCollectionField, + created_at: DateTime, + modified_at: DateTime, + modified_by: UserMini, + owned_by: UserMini, + item_status: TrashFileRestoredItemStatusField, + *, + etag: Optional[str] = None, + type: TrashFileRestoredTypeField = TrashFileRestoredTypeField.FILE.value, + name: Optional[str] = None, + file_version: Optional[FileVersionMini] = None, + trashed_at: Optional[str] = None, + purged_at: Optional[str] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, + created_by: Optional[UserMini] = None, + shared_link: Optional[str] = None, + parent: Optional[FolderMini] = None, + **kwargs + ): + """ + :param id: The unique identifier that represent a file. + + The ID for any file can be determined + by visiting a file in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/files/123` + the `file_id` is `123`. + :type id: str + :param sha_1: The SHA1 hash of the file. This can be used to compare the contents + of a file on Box with a local file. + :type sha_1: str + :param description: The optional description of this file + :type description: str + :param size: The file size in bytes. Be careful parsing this integer as it can + get very large and cause an integer overflow. + :type size: int + :param created_at: The date and time when the file was created on Box. + :type created_at: DateTime + :param modified_at: The date and time when the file was last updated on Box. + :type modified_at: DateTime + :param item_status: Defines if this item has been deleted or not. + + * `active` when the item has is not in the trash + * `trashed` when the item has been moved to the trash but not deleted + * `deleted` when the item has been permanently deleted. + :type item_status: TrashFileRestoredItemStatusField + :param etag: The HTTP `etag` of this file. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the file if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `file`, defaults to TrashFileRestoredTypeField.FILE.value + :type type: TrashFileRestoredTypeField, optional + :param name: The name of the file, defaults to None + :type name: Optional[str], optional + :param trashed_at: The time at which this file was put in the + trash - becomes `null` after restore., defaults to None + :type trashed_at: Optional[str], optional + :param purged_at: The time at which this file is expected to be purged + from the trash - becomes `null` after restore., defaults to None + :type purged_at: Optional[str], optional + :param content_created_at: The date and time at which this file was originally + created, which might be before it was uploaded to Box., defaults to None + :type content_created_at: Optional[DateTime], optional + :param content_modified_at: The date and time at which this file was last updated, + which might be before it was uploaded to Box., defaults to None + :type content_modified_at: Optional[DateTime], optional + :param shared_link: The shared link for this file. This will + be `null` if a file had been trashed, even though the original shared + link does become active again., defaults to None + :type shared_link: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.sequence_id = sequence_id + self.sha_1 = sha_1 + self.description = description + self.size = size + self.path_collection = path_collection + self.created_at = created_at + self.modified_at = modified_at + self.modified_by = modified_by + self.owned_by = owned_by + self.item_status = item_status + self.etag = etag + self.type = type + self.name = name + self.file_version = file_version + self.trashed_at = trashed_at + self.purged_at = purged_at + self.content_created_at = content_created_at + self.content_modified_at = content_modified_at + self.created_by = created_by + self.shared_link = shared_link + self.parent = parent diff --git a/box_sdk_gen/schemas/trash_folder.py b/box_sdk_gen/schemas/trash_folder.py new file mode 100644 index 0000000..4d6e25e --- /dev/null +++ b/box_sdk_gen/schemas/trash_folder.py @@ -0,0 +1,186 @@ +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.user_mini import UserMini + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.internal.utils import DateTime + + +class TrashFolderTypeField(str, Enum): + FOLDER = 'folder' + + +class TrashFolderPathCollectionEntriesTypeField(str, Enum): + FOLDER = 'folder' + + +class TrashFolderPathCollectionEntriesField(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + *, + type: Optional[TrashFolderPathCollectionEntriesTypeField] = None, + id: Optional[str] = None, + sequence_id: Optional[str] = None, + etag: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param type: `folder`, defaults to None + :type type: Optional[TrashFolderPathCollectionEntriesTypeField], optional + :param id: The unique identifier that represent a folder., defaults to None + :type id: Optional[str], optional + :param sequence_id: This field is null for the Trash folder, defaults to None + :type sequence_id: Optional[str], optional + :param etag: This field is null for the Trash folder, defaults to None + :type etag: Optional[str], optional + :param name: The name of the Trash folder., defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + self.sequence_id = sequence_id + self.etag = etag + self.name = name + + +class TrashFolderPathCollectionField(BaseObject): + def __init__( + self, + total_count: int, + entries: List[TrashFolderPathCollectionEntriesField], + **kwargs + ): + """ + :param total_count: The number of folders in this list. + :type total_count: int + :param entries: Array of folders for this item's path collection + :type entries: List[TrashFolderPathCollectionEntriesField] + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries + + +class TrashFolderItemStatusField(str, Enum): + ACTIVE = 'active' + TRASHED = 'trashed' + DELETED = 'deleted' + + +class TrashFolder(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + id: str, + name: str, + description: str, + size: int, + path_collection: TrashFolderPathCollectionField, + created_by: UserMini, + modified_by: UserMini, + owned_by: UserMini, + item_status: TrashFolderItemStatusField, + *, + etag: Optional[str] = None, + type: TrashFolderTypeField = TrashFolderTypeField.FOLDER.value, + sequence_id: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, + shared_link: Optional[str] = None, + folder_upload_email: Optional[str] = None, + parent: Optional[FolderMini] = None, + **kwargs + ): + """ + :param id: The unique identifier that represent a folder. + + The ID for any folder can be determined + by visiting a folder in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/folders/123` + the `folder_id` is `123`. + :type id: str + :param name: The name of the folder. + :type name: str + :param size: The folder size in bytes. + + Be careful parsing this integer as its + value can get very large. + :type size: int + :param item_status: Defines if this item has been deleted or not. + + * `active` when the item has is not in the trash + * `trashed` when the item has been moved to the trash but not deleted + * `deleted` when the item has been permanently deleted. + :type item_status: TrashFolderItemStatusField + :param etag: The HTTP `etag` of this folder. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the folder if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `folder`, defaults to TrashFolderTypeField.FOLDER.value + :type type: TrashFolderTypeField, optional + :param created_at: The date and time when the folder was created. This value may + be `null` for some folders such as the root folder or the trash + folder., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The date and time when the folder was last updated. This value may + be `null` for some folders such as the root folder or the trash + folder., defaults to None + :type modified_at: Optional[DateTime], optional + :param trashed_at: The time at which this folder was put in the trash., defaults to None + :type trashed_at: Optional[DateTime], optional + :param purged_at: The time at which this folder is expected to be purged + from the trash., defaults to None + :type purged_at: Optional[DateTime], optional + :param content_created_at: The date and time at which this folder was originally + created., defaults to None + :type content_created_at: Optional[DateTime], optional + :param content_modified_at: The date and time at which this folder was last updated., defaults to None + :type content_modified_at: Optional[DateTime], optional + :param shared_link: The shared link for this folder. This will + be `null` if a folder has been trashed, since the link will no longer + be active., defaults to None + :type shared_link: Optional[str], optional + :param folder_upload_email: The folder upload email for this folder. This will + be `null` if a folder has been trashed, since the upload will no longer + work., defaults to None + :type folder_upload_email: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.name = name + self.description = description + self.size = size + self.path_collection = path_collection + self.created_by = created_by + self.modified_by = modified_by + self.owned_by = owned_by + self.item_status = item_status + self.etag = etag + self.type = type + self.sequence_id = sequence_id + self.created_at = created_at + self.modified_at = modified_at + self.trashed_at = trashed_at + self.purged_at = purged_at + self.content_created_at = content_created_at + self.content_modified_at = content_modified_at + self.shared_link = shared_link + self.folder_upload_email = folder_upload_email + self.parent = parent diff --git a/box_sdk_gen/schemas/trash_folder_restored.py b/box_sdk_gen/schemas/trash_folder_restored.py new file mode 100644 index 0000000..ef9450c --- /dev/null +++ b/box_sdk_gen/schemas/trash_folder_restored.py @@ -0,0 +1,145 @@ +from enum import Enum + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Optional + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class TrashFolderRestoredTypeField(str, Enum): + FOLDER = 'folder' + + +class TrashFolderRestoredPathCollectionField(BaseObject): + def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): + """ + :param total_count: The number of folders in this list. + :type total_count: int + :param entries: The parent folders for this item + :type entries: List[FolderMini] + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries + + +class TrashFolderRestoredItemStatusField(str, Enum): + ACTIVE = 'active' + TRASHED = 'trashed' + DELETED = 'deleted' + + +class TrashFolderRestored(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + *, + id: Optional[str] = None, + etag: Optional[str] = None, + type: Optional[TrashFolderRestoredTypeField] = None, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + description: Optional[str] = None, + size: Optional[int] = None, + path_collection: Optional[TrashFolderRestoredPathCollectionField] = None, + created_by: Optional[UserMini] = None, + modified_by: Optional[UserMini] = None, + trashed_at: Optional[str] = None, + purged_at: Optional[str] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, + owned_by: Optional[UserMini] = None, + shared_link: Optional[str] = None, + folder_upload_email: Optional[str] = None, + parent: Optional[FolderMini] = None, + item_status: Optional[TrashFolderRestoredItemStatusField] = None, + **kwargs + ): + """ + :param id: The unique identifier that represent a folder. + + The ID for any folder can be determined + by visiting a folder in the web application + and copying the ID from the URL. For example, + for the URL `https://*.app.box.com/folders/123` + the `folder_id` is `123`., defaults to None + :type id: Optional[str], optional + :param etag: The HTTP `etag` of this folder. This can be used within some API + endpoints in the `If-Match` and `If-None-Match` headers to only + perform changes on the folder if (no) changes have happened., defaults to None + :type etag: Optional[str], optional + :param type: `folder`, defaults to None + :type type: Optional[TrashFolderRestoredTypeField], optional + :param name: The name of the folder., defaults to None + :type name: Optional[str], optional + :param created_at: The date and time when the folder was created. This value may + be `null` for some folders such as the root folder or the trash + folder., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The date and time when the folder was last updated. This value may + be `null` for some folders such as the root folder or the trash + folder., defaults to None + :type modified_at: Optional[DateTime], optional + :param size: The folder size in bytes. + + Be careful parsing this integer as its + value can get very large., defaults to None + :type size: Optional[int], optional + :param trashed_at: The time at which this folder was put in the + trash - becomes `null` after restore., defaults to None + :type trashed_at: Optional[str], optional + :param purged_at: The time at which this folder is expected to be purged + from the trash - becomes `null` after restore., defaults to None + :type purged_at: Optional[str], optional + :param content_created_at: The date and time at which this folder was originally + created., defaults to None + :type content_created_at: Optional[DateTime], optional + :param content_modified_at: The date and time at which this folder was last updated., defaults to None + :type content_modified_at: Optional[DateTime], optional + :param shared_link: The shared link for this file. This will + be `null` if a folder had been trashed, even though the original shared + link does become active again., defaults to None + :type shared_link: Optional[str], optional + :param folder_upload_email: The folder upload email for this folder. This will + be `null` if a folder has been trashed, even though the original upload + email does become active again., defaults to None + :type folder_upload_email: Optional[str], optional + :param item_status: Defines if this item has been deleted or not. + + * `active` when the item has is not in the trash + * `trashed` when the item has been moved to the trash but not deleted + * `deleted` when the item has been permanently deleted., defaults to None + :type item_status: Optional[TrashFolderRestoredItemStatusField], optional + """ + super().__init__(**kwargs) + self.id = id + self.etag = etag + self.type = type + self.sequence_id = sequence_id + self.name = name + self.created_at = created_at + self.modified_at = modified_at + self.description = description + self.size = size + self.path_collection = path_collection + self.created_by = created_by + self.modified_by = modified_by + self.trashed_at = trashed_at + self.purged_at = purged_at + self.content_created_at = content_created_at + self.content_modified_at = content_modified_at + self.owned_by = owned_by + self.shared_link = shared_link + self.folder_upload_email = folder_upload_email + self.parent = parent + self.item_status = item_status diff --git a/box_sdk_gen/schemas/trash_web_link.py b/box_sdk_gen/schemas/trash_web_link.py new file mode 100644 index 0000000..df5a52a --- /dev/null +++ b/box_sdk_gen/schemas/trash_web_link.py @@ -0,0 +1,158 @@ +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.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class TrashWebLinkTypeField(str, Enum): + WEB_LINK = 'web_link' + + +class TrashWebLinkPathCollectionEntriesTypeField(str, Enum): + FOLDER = 'folder' + + +class TrashWebLinkPathCollectionEntriesField(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + *, + type: Optional[TrashWebLinkPathCollectionEntriesTypeField] = None, + id: Optional[str] = None, + sequence_id: Optional[str] = None, + etag: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param type: `folder`, defaults to None + :type type: Optional[TrashWebLinkPathCollectionEntriesTypeField], optional + :param id: The unique identifier that represent a folder., defaults to None + :type id: Optional[str], optional + :param sequence_id: This field is null for the Trash folder, defaults to None + :type sequence_id: Optional[str], optional + :param etag: This field is null for the Trash folder, defaults to None + :type etag: Optional[str], optional + :param name: The name of the Trash folder., defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + self.sequence_id = sequence_id + self.etag = etag + self.name = name + + +class TrashWebLinkPathCollectionField(BaseObject): + def __init__( + self, + total_count: int, + entries: List[TrashWebLinkPathCollectionEntriesField], + **kwargs + ): + """ + :param total_count: The number of folders in this list. + :type total_count: int + :param entries: Array of folders for this item's path collection + :type entries: List[TrashWebLinkPathCollectionEntriesField] + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries + + +class TrashWebLinkItemStatusField(str, Enum): + ACTIVE = 'active' + TRASHED = 'trashed' + DELETED = 'deleted' + + +class TrashWebLink(BaseObject): + _discriminator = 'type', {'web_link'} + + def __init__( + self, + *, + type: Optional[TrashWebLinkTypeField] = None, + id: Optional[str] = None, + sequence_id: Optional[str] = None, + etag: Optional[str] = None, + name: Optional[str] = None, + url: Optional[str] = None, + parent: Optional[FolderMini] = None, + description: Optional[str] = None, + path_collection: Optional[TrashWebLinkPathCollectionField] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + created_by: Optional[UserMini] = None, + modified_by: Optional[UserMini] = None, + owned_by: Optional[UserMini] = None, + shared_link: Optional[str] = None, + item_status: Optional[TrashWebLinkItemStatusField] = None, + **kwargs + ): + """ + :param type: `web_link`, defaults to None + :type type: Optional[TrashWebLinkTypeField], optional + :param id: The unique identifier for this web link, defaults to None + :type id: Optional[str], optional + :param etag: The entity tag of this web link. Used with `If-Match` + headers., defaults to None + :type etag: Optional[str], optional + :param name: The name of the web link, defaults to None + :type name: Optional[str], optional + :param url: The URL this web link points to, defaults to None + :type url: Optional[str], optional + :param description: The description accompanying the web link. This is + visible within the Box web application., defaults to None + :type description: Optional[str], optional + :param created_at: When this file was created on Box’s servers., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When this file was last updated on the Box + servers., defaults to None + :type modified_at: Optional[DateTime], optional + :param trashed_at: When this file was last moved to the trash., defaults to None + :type trashed_at: Optional[DateTime], optional + :param purged_at: When this file will be permanently deleted., defaults to None + :type purged_at: Optional[DateTime], optional + :param shared_link: The shared link for this bookmark. This will + be `null` if a bookmark has been trashed, since the link will no longer + be active., defaults to None + :type shared_link: Optional[str], optional + :param item_status: Whether this item is deleted or not. Values include `active`, + `trashed` if the file has been moved to the trash, and `deleted` if + the file has been permanently deleted, defaults to None + :type item_status: Optional[TrashWebLinkItemStatusField], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + self.sequence_id = sequence_id + self.etag = etag + self.name = name + self.url = url + self.parent = parent + self.description = description + self.path_collection = path_collection + self.created_at = created_at + self.modified_at = modified_at + self.trashed_at = trashed_at + self.purged_at = purged_at + self.created_by = created_by + self.modified_by = modified_by + self.owned_by = owned_by + self.shared_link = shared_link + self.item_status = item_status diff --git a/box_sdk_gen/schemas/trash_web_link_restored.py b/box_sdk_gen/schemas/trash_web_link_restored.py new file mode 100644 index 0000000..9561eb8 --- /dev/null +++ b/box_sdk_gen/schemas/trash_web_link_restored.py @@ -0,0 +1,118 @@ +from enum import Enum + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import Optional + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class TrashWebLinkRestoredTypeField(str, Enum): + WEB_LINK = 'web_link' + + +class TrashWebLinkRestoredPathCollectionField(BaseObject): + def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): + """ + :param total_count: The number of folders in this list. + :type total_count: int + :param entries: The parent folders for this item + :type entries: List[FolderMini] + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries + + +class TrashWebLinkRestoredItemStatusField(str, Enum): + ACTIVE = 'active' + TRASHED = 'trashed' + DELETED = 'deleted' + + +class TrashWebLinkRestored(BaseObject): + _discriminator = 'type', {'web_link'} + + def __init__( + self, + sequence_id: str, + path_collection: TrashWebLinkRestoredPathCollectionField, + *, + type: Optional[TrashWebLinkRestoredTypeField] = None, + id: Optional[str] = None, + etag: Optional[str] = None, + name: Optional[str] = None, + url: Optional[str] = None, + parent: Optional[FolderMini] = None, + description: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[str] = None, + purged_at: Optional[str] = None, + created_by: Optional[UserMini] = None, + modified_by: Optional[UserMini] = None, + owned_by: Optional[UserMini] = None, + shared_link: Optional[str] = None, + item_status: Optional[TrashWebLinkRestoredItemStatusField] = None, + **kwargs + ): + """ + :param type: `web_link`, defaults to None + :type type: Optional[TrashWebLinkRestoredTypeField], optional + :param id: The unique identifier for this web link, defaults to None + :type id: Optional[str], optional + :param etag: The entity tag of this web link. Used with `If-Match` + headers., defaults to None + :type etag: Optional[str], optional + :param name: The name of the web link, defaults to None + :type name: Optional[str], optional + :param url: The URL this web link points to, defaults to None + :type url: Optional[str], optional + :param description: The description accompanying the web link. This is + visible within the Box web application., defaults to None + :type description: Optional[str], optional + :param created_at: When this file was created on Box’s servers., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When this file was last updated on the Box + servers., defaults to None + :type modified_at: Optional[DateTime], optional + :param trashed_at: The time at which this bookmark was put in the + trash - becomes `null` after restore., defaults to None + :type trashed_at: Optional[str], optional + :param purged_at: The time at which this bookmark will be permanently + deleted - becomes `null` after restore., defaults to None + :type purged_at: Optional[str], optional + :param shared_link: The shared link for this bookmark. This will + be `null` if a bookmark had been trashed, even though the original shared + link does become active again., defaults to None + :type shared_link: Optional[str], optional + :param item_status: Whether this item is deleted or not. Values include `active`, + `trashed` if the file has been moved to the trash, and `deleted` if + the file has been permanently deleted, defaults to None + :type item_status: Optional[TrashWebLinkRestoredItemStatusField], optional + """ + super().__init__(**kwargs) + self.sequence_id = sequence_id + self.path_collection = path_collection + self.type = type + self.id = id + self.etag = etag + self.name = name + self.url = url + self.parent = parent + self.description = description + self.created_at = created_at + self.modified_at = modified_at + self.trashed_at = trashed_at + self.purged_at = purged_at + self.created_by = created_by + self.modified_by = modified_by + self.owned_by = owned_by + self.shared_link = shared_link + self.item_status = item_status diff --git a/box_sdk_gen/schemas/upload_part.py b/box_sdk_gen/schemas/upload_part.py new file mode 100644 index 0000000..3614b93 --- /dev/null +++ b/box_sdk_gen/schemas/upload_part.py @@ -0,0 +1,40 @@ +from typing import Optional + +from typing import Dict + +from box_sdk_gen.schemas.upload_part_mini import UploadPartMini + + +class UploadPart(UploadPartMini): + _fields_to_json_mapping: Dict[str, str] = { + 'sha_1': 'sha1', + **UploadPartMini._fields_to_json_mapping, + } + _json_to_fields_mapping: Dict[str, str] = { + 'sha1': 'sha_1', + **UploadPartMini._json_to_fields_mapping, + } + + def __init__( + self, + *, + sha_1: Optional[str] = None, + part_id: Optional[str] = None, + offset: Optional[int] = None, + size: Optional[int] = None, + **kwargs + ): + """ + :param sha_1: The SHA1 hash of the chunk., defaults to None + :type sha_1: Optional[str], optional + :param part_id: The unique ID of the chunk., defaults to None + :type part_id: Optional[str], optional + :param offset: The offset of the chunk within the file + in bytes. The lower bound of the position + of the chunk within the file., defaults to None + :type offset: Optional[int], optional + :param size: The size of the chunk in bytes., defaults to None + :type size: Optional[int], optional + """ + super().__init__(part_id=part_id, offset=offset, size=size, **kwargs) + self.sha_1 = sha_1 diff --git a/box_sdk_gen/schemas/upload_part_mini.py b/box_sdk_gen/schemas/upload_part_mini.py new file mode 100644 index 0000000..889fdc8 --- /dev/null +++ b/box_sdk_gen/schemas/upload_part_mini.py @@ -0,0 +1,28 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class UploadPartMini(BaseObject): + def __init__( + self, + *, + part_id: Optional[str] = None, + offset: Optional[int] = None, + size: Optional[int] = None, + **kwargs + ): + """ + :param part_id: The unique ID of the chunk., defaults to None + :type part_id: Optional[str], optional + :param offset: The offset of the chunk within the file + in bytes. The lower bound of the position + of the chunk within the file., defaults to None + :type offset: Optional[int], optional + :param size: The size of the chunk in bytes., defaults to None + :type size: Optional[int], optional + """ + super().__init__(**kwargs) + self.part_id = part_id + self.offset = offset + self.size = size diff --git a/box_sdk_gen/schemas/upload_parts.py b/box_sdk_gen/schemas/upload_parts.py new file mode 100644 index 0000000..bc07d30 --- /dev/null +++ b/box_sdk_gen/schemas/upload_parts.py @@ -0,0 +1,79 @@ +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.upload_part import UploadPart + + +class UploadPartsOrderDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class UploadPartsOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[str] = None, + direction: Optional[UploadPartsOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field to order by, defaults to None + :type by: Optional[str], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[UploadPartsOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class UploadParts(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + order: Optional[List[UploadPartsOrderField]] = None, + entries: Optional[List[UploadPart]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type offset: Optional[int], optional + :param order: The order by which items are returned. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type order: Optional[List[UploadPartsOrderField]], optional + :param entries: A list of uploaded chunks for an upload + session, defaults to None + :type entries: Optional[List[UploadPart]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.order = order + self.entries = entries diff --git a/box_sdk_gen/schemas/upload_session.py b/box_sdk_gen/schemas/upload_session.py new file mode 100644 index 0000000..f063dca --- /dev/null +++ b/box_sdk_gen/schemas/upload_session.py @@ -0,0 +1,93 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.internal.utils import DateTime + + +class UploadSessionTypeField(str, Enum): + UPLOAD_SESSION = 'upload_session' + + +class UploadSessionSessionEndpointsField(BaseObject): + def __init__( + self, + *, + upload_part: Optional[str] = None, + commit: Optional[str] = None, + abort: Optional[str] = None, + list_parts: Optional[str] = None, + status: Optional[str] = None, + log_event: Optional[str] = None, + **kwargs + ): + """ + :param upload_part: The URL to upload parts to, defaults to None + :type upload_part: Optional[str], optional + :param commit: The URL used to commit the file, defaults to None + :type commit: Optional[str], optional + :param abort: The URL for used to abort the session., defaults to None + :type abort: Optional[str], optional + :param list_parts: The URL users to list all parts., defaults to None + :type list_parts: Optional[str], optional + :param status: The URL used to get the status of the upload., defaults to None + :type status: Optional[str], optional + :param log_event: The URL used to get the upload log from., defaults to None + :type log_event: Optional[str], optional + """ + super().__init__(**kwargs) + self.upload_part = upload_part + self.commit = commit + self.abort = abort + self.list_parts = list_parts + self.status = status + self.log_event = log_event + + +class UploadSession(BaseObject): + _discriminator = 'type', {'upload_session'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[UploadSessionTypeField] = None, + session_expires_at: Optional[DateTime] = None, + part_size: Optional[int] = None, + total_parts: Optional[int] = None, + num_parts_processed: Optional[int] = None, + session_endpoints: Optional[UploadSessionSessionEndpointsField] = None, + **kwargs + ): + """ + :param id: The unique identifier for this session, defaults to None + :type id: Optional[str], optional + :param type: `upload_session`, defaults to None + :type type: Optional[UploadSessionTypeField], optional + :param session_expires_at: The date and time when this session expires., defaults to None + :type session_expires_at: Optional[DateTime], optional + :param part_size: The size in bytes that must be used for all parts of of the + upload. + + Only the last part is allowed to be of a smaller size., defaults to None + :type part_size: Optional[int], optional + :param total_parts: The total number of parts expected in this upload session, + as determined by the file size and part size., defaults to None + :type total_parts: Optional[int], optional + :param num_parts_processed: The number of parts that have been uploaded and processed + by the server. This starts at `0`. + + When committing a file files, inspecting this property can + provide insight if all parts have been uploaded correctly., defaults to None + :type num_parts_processed: Optional[int], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.session_expires_at = session_expires_at + self.part_size = part_size + self.total_parts = total_parts + self.num_parts_processed = num_parts_processed + self.session_endpoints = session_endpoints diff --git a/box_sdk_gen/schemas/upload_url.py b/box_sdk_gen/schemas/upload_url.py new file mode 100644 index 0000000..5291f9c --- /dev/null +++ b/box_sdk_gen/schemas/upload_url.py @@ -0,0 +1,23 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class UploadUrl(BaseObject): + def __init__( + self, + *, + upload_url: Optional[str] = None, + upload_token: Optional[str] = None, + **kwargs + ): + """ + :param upload_url: A URL for an upload session that can be used to upload + the file., defaults to None + :type upload_url: Optional[str], optional + :param upload_token: An optional access token to use to upload the file, defaults to None + :type upload_token: Optional[str], optional + """ + super().__init__(**kwargs) + self.upload_url = upload_url + self.upload_token = upload_token diff --git a/box_sdk_gen/schemas/uploaded_part.py b/box_sdk_gen/schemas/uploaded_part.py new file mode 100644 index 0000000..69e3f3e --- /dev/null +++ b/box_sdk_gen/schemas/uploaded_part.py @@ -0,0 +1,11 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.upload_part import UploadPart + + +class UploadedPart(BaseObject): + def __init__(self, *, part: Optional[UploadPart] = None, **kwargs): + super().__init__(**kwargs) + self.part = part diff --git a/box_sdk_gen/schemas/user.py b/box_sdk_gen/schemas/user.py new file mode 100644 index 0000000..227b7e3 --- /dev/null +++ b/box_sdk_gen/schemas/user.py @@ -0,0 +1,118 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.user_base import UserBaseTypeField + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class UserStatusField(str, Enum): + ACTIVE = 'active' + INACTIVE = 'inactive' + CANNOT_DELETE_EDIT = 'cannot_delete_edit' + CANNOT_DELETE_EDIT_UPLOAD = 'cannot_delete_edit_upload' + + +class UserNotificationEmailField(BaseObject): + def __init__( + self, + *, + email: Optional[str] = None, + is_confirmed: Optional[bool] = None, + **kwargs + ): + """ + :param email: The email address to send the notifications to., defaults to None + :type email: Optional[str], optional + :param is_confirmed: Specifies if this email address has been confirmed., defaults to None + :type is_confirmed: Optional[bool], optional + """ + super().__init__(**kwargs) + self.email = email + self.is_confirmed = is_confirmed + + +class User(UserMini): + def __init__( + self, + id: str, + *, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + language: Optional[str] = None, + timezone: Optional[str] = None, + space_amount: Optional[int] = None, + space_used: Optional[int] = None, + max_upload_size: Optional[int] = None, + status: Optional[UserStatusField] = None, + job_title: Optional[str] = None, + phone: Optional[str] = None, + address: Optional[str] = None, + avatar_url: Optional[str] = None, + notification_email: Optional[UserNotificationEmailField] = None, + name: Optional[str] = None, + login: Optional[str] = None, + type: UserBaseTypeField = UserBaseTypeField.USER.value, + **kwargs + ): + """ + :param id: The unique identifier for this user + :type id: str + :param created_at: When the user object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the user object was last modified, defaults to None + :type modified_at: Optional[DateTime], optional + :param language: The language of the user, formatted in modified version of the + [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None + :type language: Optional[str], optional + :param timezone: The user's timezone, defaults to None + :type timezone: Optional[str], optional + :param space_amount: The user’s total available space amount in bytes, defaults to None + :type space_amount: Optional[int], optional + :param space_used: The amount of space in use by the user, defaults to None + :type space_used: Optional[int], optional + :param max_upload_size: The maximum individual file size in bytes the user can have, defaults to None + :type max_upload_size: Optional[int], optional + :param status: The user's account status, defaults to None + :type status: Optional[UserStatusField], optional + :param job_title: The user’s job title, defaults to None + :type job_title: Optional[str], optional + :param phone: The user’s phone number, defaults to None + :type phone: Optional[str], optional + :param address: The user’s address, defaults to None + :type address: Optional[str], optional + :param avatar_url: URL of the user’s avatar image, defaults to None + :type avatar_url: Optional[str], optional + :param notification_email: An alternate notification email address to which email + notifications are sent. When it's confirmed, this will be + the email address to which notifications are sent instead of + to the primary email address., defaults to None + :type notification_email: Optional[UserNotificationEmailField], optional + :param name: The display name of this user, defaults to None + :type name: Optional[str], optional + :param login: The primary email address of this user, defaults to None + :type login: Optional[str], optional + :param type: `user`, defaults to UserBaseTypeField.USER.value + :type type: UserBaseTypeField, optional + """ + super().__init__(id=id, name=name, login=login, type=type, **kwargs) + self.created_at = created_at + self.modified_at = modified_at + self.language = language + self.timezone = timezone + self.space_amount = space_amount + self.space_used = space_used + self.max_upload_size = max_upload_size + self.status = status + self.job_title = job_title + self.phone = phone + self.address = address + self.avatar_url = avatar_url + self.notification_email = notification_email diff --git a/box_sdk_gen/schemas/user_avatar.py b/box_sdk_gen/schemas/user_avatar.py new file mode 100644 index 0000000..b26e48d --- /dev/null +++ b/box_sdk_gen/schemas/user_avatar.py @@ -0,0 +1,36 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class UserAvatarPicUrlsField(BaseObject): + def __init__( + self, + *, + small: Optional[str] = None, + large: Optional[str] = None, + preview: Optional[str] = None, + **kwargs + ): + """ + :param small: The location of a small-sized avatar., defaults to None + :type small: Optional[str], optional + :param large: The location of a large-sized avatar., defaults to None + :type large: Optional[str], optional + :param preview: The location of the avatar preview., defaults to None + :type preview: Optional[str], optional + """ + super().__init__(**kwargs) + self.small = small + self.large = large + self.preview = preview + + +class UserAvatar(BaseObject): + def __init__(self, *, pic_urls: Optional[UserAvatarPicUrlsField] = None, **kwargs): + """ + :param pic_urls: Represents an object with user avatar URLs., defaults to None + :type pic_urls: Optional[UserAvatarPicUrlsField], optional + """ + super().__init__(**kwargs) + self.pic_urls = pic_urls diff --git a/box_sdk_gen/schemas/user_base.py b/box_sdk_gen/schemas/user_base.py new file mode 100644 index 0000000..83ed4cf --- /dev/null +++ b/box_sdk_gen/schemas/user_base.py @@ -0,0 +1,28 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + + +class UserBaseTypeField(str, Enum): + USER = 'user' + + +class UserBase(BaseObject): + _discriminator = 'type', {'user'} + + def __init__( + self, + id: str, + *, + type: UserBaseTypeField = UserBaseTypeField.USER.value, + **kwargs + ): + """ + :param id: The unique identifier for this user + :type id: str + :param type: `user`, defaults to UserBaseTypeField.USER.value + :type type: UserBaseTypeField, optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type diff --git a/box_sdk_gen/schemas/user_collaborations.py b/box_sdk_gen/schemas/user_collaborations.py new file mode 100644 index 0000000..bcd46fb --- /dev/null +++ b/box_sdk_gen/schemas/user_collaborations.py @@ -0,0 +1,30 @@ +from typing import Optional + +from box_sdk_gen.schemas.user_base import UserBaseTypeField + +from box_sdk_gen.schemas.user_base import UserBase + + +class UserCollaborations(UserBase): + def __init__( + self, + id: str, + *, + name: Optional[str] = None, + login: Optional[str] = None, + type: UserBaseTypeField = UserBaseTypeField.USER.value, + **kwargs + ): + """ + :param id: The unique identifier for this user + :type id: str + :param name: The display name of this user. If the collaboration status is `pending`, an empty string is returned., defaults to None + :type name: Optional[str], optional + :param login: The primary email address of this user. If the collaboration status is `pending`, an empty string is returned., defaults to None + :type login: Optional[str], optional + :param type: `user`, defaults to UserBaseTypeField.USER.value + :type type: UserBaseTypeField, optional + """ + super().__init__(id=id, type=type, **kwargs) + self.name = name + self.login = login diff --git a/box_sdk_gen/schemas/user_full.py b/box_sdk_gen/schemas/user_full.py new file mode 100644 index 0000000..39996ad --- /dev/null +++ b/box_sdk_gen/schemas/user_full.py @@ -0,0 +1,197 @@ +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.user_base import UserBaseTypeField + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + +from box_sdk_gen.schemas.user import UserStatusField + +from box_sdk_gen.schemas.user import UserNotificationEmailField + +from box_sdk_gen.schemas.user import User + +from box_sdk_gen.schemas.tracking_code import TrackingCode + + +class UserFullRoleField(str, Enum): + ADMIN = 'admin' + COADMIN = 'coadmin' + USER = 'user' + + +class UserFullEnterpriseTypeField(str, Enum): + ENTERPRISE = 'enterprise' + + +class UserFullEnterpriseField(BaseObject): + _discriminator = 'type', {'enterprise'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[UserFullEnterpriseTypeField] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this enterprise., defaults to None + :type id: Optional[str], optional + :param type: `enterprise`, defaults to None + :type type: Optional[UserFullEnterpriseTypeField], optional + :param name: The name of the enterprise, defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + + +class UserFull(User): + def __init__( + self, + id: str, + *, + role: Optional[UserFullRoleField] = None, + tracking_codes: Optional[List[TrackingCode]] = None, + can_see_managed_users: Optional[bool] = None, + is_sync_enabled: Optional[bool] = None, + is_external_collab_restricted: Optional[bool] = None, + is_exempt_from_device_limits: Optional[bool] = None, + is_exempt_from_login_verification: Optional[bool] = None, + enterprise: Optional[UserFullEnterpriseField] = None, + my_tags: Optional[List[str]] = None, + hostname: Optional[str] = None, + is_platform_access_only: Optional[bool] = None, + external_app_user_id: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + language: Optional[str] = None, + timezone: Optional[str] = None, + space_amount: Optional[int] = None, + space_used: Optional[int] = None, + max_upload_size: Optional[int] = None, + status: Optional[UserStatusField] = None, + job_title: Optional[str] = None, + phone: Optional[str] = None, + address: Optional[str] = None, + avatar_url: Optional[str] = None, + notification_email: Optional[UserNotificationEmailField] = None, + name: Optional[str] = None, + login: Optional[str] = None, + type: UserBaseTypeField = UserBaseTypeField.USER.value, + **kwargs + ): + """ + :param id: The unique identifier for this user + :type id: str + :param role: The user’s enterprise role, defaults to None + :type role: Optional[UserFullRoleField], optional + :param tracking_codes: Tracking codes allow an admin to generate reports from the + admin console and assign an attribute to a specific group + of users. This setting must be enabled for an enterprise + before it can be used., defaults to None + :type tracking_codes: Optional[List[TrackingCode]], optional + :param can_see_managed_users: Whether the user can see other enterprise users in their contact list, defaults to None + :type can_see_managed_users: Optional[bool], optional + :param is_sync_enabled: Whether the user can use Box Sync, defaults to None + :type is_sync_enabled: Optional[bool], optional + :param is_external_collab_restricted: Whether the user is allowed to collaborate with users outside their + enterprise, defaults to None + :type is_external_collab_restricted: Optional[bool], optional + :param is_exempt_from_device_limits: Whether to exempt the user from Enterprise device limits, defaults to None + :type is_exempt_from_device_limits: Optional[bool], optional + :param is_exempt_from_login_verification: Whether the user must use two-factor authentication, defaults to None + :type is_exempt_from_login_verification: Optional[bool], optional + :param my_tags: Tags for all files and folders owned by the user. Values returned + will only contain tags that were set by the requester., defaults to None + :type my_tags: Optional[List[str]], optional + :param hostname: The root (protocol, subdomain, domain) of any links that need to be + generated for the user, defaults to None + :type hostname: Optional[str], optional + :param is_platform_access_only: Whether the user is an App User, defaults to None + :type is_platform_access_only: Optional[bool], optional + :param external_app_user_id: An external identifier for an app user, which can be used to look up + the user. This can be used to tie user IDs from external identity + providers to Box users., defaults to None + :type external_app_user_id: Optional[str], optional + :param created_at: When the user object was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When the user object was last modified, defaults to None + :type modified_at: Optional[DateTime], optional + :param language: The language of the user, formatted in modified version of the + [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None + :type language: Optional[str], optional + :param timezone: The user's timezone, defaults to None + :type timezone: Optional[str], optional + :param space_amount: The user’s total available space amount in bytes, defaults to None + :type space_amount: Optional[int], optional + :param space_used: The amount of space in use by the user, defaults to None + :type space_used: Optional[int], optional + :param max_upload_size: The maximum individual file size in bytes the user can have, defaults to None + :type max_upload_size: Optional[int], optional + :param status: The user's account status, defaults to None + :type status: Optional[UserStatusField], optional + :param job_title: The user’s job title, defaults to None + :type job_title: Optional[str], optional + :param phone: The user’s phone number, defaults to None + :type phone: Optional[str], optional + :param address: The user’s address, defaults to None + :type address: Optional[str], optional + :param avatar_url: URL of the user’s avatar image, defaults to None + :type avatar_url: Optional[str], optional + :param notification_email: An alternate notification email address to which email + notifications are sent. When it's confirmed, this will be + the email address to which notifications are sent instead of + to the primary email address., defaults to None + :type notification_email: Optional[UserNotificationEmailField], optional + :param name: The display name of this user, defaults to None + :type name: Optional[str], optional + :param login: The primary email address of this user, defaults to None + :type login: Optional[str], optional + :param type: `user`, defaults to UserBaseTypeField.USER.value + :type type: UserBaseTypeField, optional + """ + super().__init__( + id=id, + created_at=created_at, + modified_at=modified_at, + language=language, + timezone=timezone, + space_amount=space_amount, + space_used=space_used, + max_upload_size=max_upload_size, + status=status, + job_title=job_title, + phone=phone, + address=address, + avatar_url=avatar_url, + notification_email=notification_email, + name=name, + login=login, + type=type, + **kwargs + ) + self.role = role + self.tracking_codes = tracking_codes + self.can_see_managed_users = can_see_managed_users + self.is_sync_enabled = is_sync_enabled + self.is_external_collab_restricted = is_external_collab_restricted + self.is_exempt_from_device_limits = is_exempt_from_device_limits + self.is_exempt_from_login_verification = is_exempt_from_login_verification + self.enterprise = enterprise + self.my_tags = my_tags + self.hostname = hostname + self.is_platform_access_only = is_platform_access_only + self.external_app_user_id = external_app_user_id diff --git a/box_sdk_gen/schemas/user_integration_mappings.py b/box_sdk_gen/schemas/user_integration_mappings.py new file mode 100644 index 0000000..d587469 --- /dev/null +++ b/box_sdk_gen/schemas/user_integration_mappings.py @@ -0,0 +1,30 @@ +from typing import Optional + +from box_sdk_gen.schemas.user_base import UserBaseTypeField + +from box_sdk_gen.schemas.user_base import UserBase + + +class UserIntegrationMappings(UserBase): + def __init__( + self, + id: str, + *, + name: Optional[str] = None, + login: Optional[str] = None, + type: UserBaseTypeField = UserBaseTypeField.USER.value, + **kwargs + ): + """ + :param id: The unique identifier for this user + :type id: str + :param name: The display name of this user, defaults to None + :type name: Optional[str], optional + :param login: The primary email address of this user, defaults to None + :type login: Optional[str], optional + :param type: `user`, defaults to UserBaseTypeField.USER.value + :type type: UserBaseTypeField, optional + """ + super().__init__(id=id, type=type, **kwargs) + self.name = name + self.login = login diff --git a/box_sdk_gen/schemas/user_mini.py b/box_sdk_gen/schemas/user_mini.py new file mode 100644 index 0000000..f2cc1f4 --- /dev/null +++ b/box_sdk_gen/schemas/user_mini.py @@ -0,0 +1,30 @@ +from typing import Optional + +from box_sdk_gen.schemas.user_base import UserBaseTypeField + +from box_sdk_gen.schemas.user_base import UserBase + + +class UserMini(UserBase): + def __init__( + self, + id: str, + *, + name: Optional[str] = None, + login: Optional[str] = None, + type: UserBaseTypeField = UserBaseTypeField.USER.value, + **kwargs + ): + """ + :param id: The unique identifier for this user + :type id: str + :param name: The display name of this user, defaults to None + :type name: Optional[str], optional + :param login: The primary email address of this user, defaults to None + :type login: Optional[str], optional + :param type: `user`, defaults to UserBaseTypeField.USER.value + :type type: UserBaseTypeField, optional + """ + super().__init__(id=id, type=type, **kwargs) + self.name = name + self.login = login diff --git a/box_sdk_gen/schemas/users.py b/box_sdk_gen/schemas/users.py new file mode 100644 index 0000000..457bc2c --- /dev/null +++ b/box_sdk_gen/schemas/users.py @@ -0,0 +1,78 @@ +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.user_full import UserFull + + +class UsersOrderDirectionField(str, Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class UsersOrderField(BaseObject): + def __init__( + self, + *, + by: Optional[str] = None, + direction: Optional[UsersOrderDirectionField] = None, + **kwargs + ): + """ + :param by: The field to order by, defaults to None + :type by: Optional[str], optional + :param direction: The direction to order by, either ascending or descending, defaults to None + :type direction: Optional[UsersOrderDirectionField], optional + """ + super().__init__(**kwargs) + self.by = by + self.direction = direction + + +class Users(BaseObject): + def __init__( + self, + *, + total_count: Optional[int] = None, + limit: Optional[int] = None, + offset: Optional[int] = None, + order: Optional[List[UsersOrderField]] = None, + entries: Optional[List[UserFull]] = None, + **kwargs + ): + """ + :param total_count: One greater than the offset of the last entry in the entire collection. + The total number of entries in the collection may be less than + `total_count`. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type total_count: Optional[int], optional + :param limit: The limit that was used for these entries. This will be the same as the + `limit` query parameter unless that value exceeded the maximum value + allowed. The maximum value varies by API., defaults to None + :type limit: Optional[int], optional + :param offset: The 0-based offset of the first entry in this set. This will be the same + as the `offset` query parameter. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type offset: Optional[int], optional + :param order: The order by which items are returned. + + This field is only returned for calls that use offset-based pagination. + For marker-based paginated APIs, this field will be omitted., defaults to None + :type order: Optional[List[UsersOrderField]], optional + :param entries: A list of users, defaults to None + :type entries: Optional[List[UserFull]], optional + """ + super().__init__(**kwargs) + self.total_count = total_count + self.limit = limit + self.offset = offset + self.order = order + self.entries = entries diff --git a/box_sdk_gen/schemas/watermark.py b/box_sdk_gen/schemas/watermark.py new file mode 100644 index 0000000..bea7fa9 --- /dev/null +++ b/box_sdk_gen/schemas/watermark.py @@ -0,0 +1,32 @@ +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.internal.utils import DateTime + + +class WatermarkWatermarkField(BaseObject): + def __init__( + self, + *, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + **kwargs + ): + """ + :param created_at: When this watermark was created, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When this task was modified, defaults to None + :type modified_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.created_at = created_at + self.modified_at = modified_at + + +class Watermark(BaseObject): + def __init__( + self, *, watermark: Optional[WatermarkWatermarkField] = None, **kwargs + ): + super().__init__(**kwargs) + self.watermark = watermark diff --git a/box_sdk_gen/schemas/web_link.py b/box_sdk_gen/schemas/web_link.py new file mode 100644 index 0000000..be6cbab --- /dev/null +++ b/box_sdk_gen/schemas/web_link.py @@ -0,0 +1,246 @@ +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from enum import Enum + +from typing import Optional + +from box_sdk_gen.schemas.web_link_base import WebLinkBaseTypeField + +from box_sdk_gen.schemas.web_link_base import WebLinkBase + +from box_sdk_gen.schemas.web_link_mini import WebLinkMini + +from box_sdk_gen.schemas.folder_mini import FolderMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class WebLinkPathCollectionField(BaseObject): + def __init__(self, total_count: int, entries: List[FolderMini], **kwargs): + """ + :param total_count: The number of folders in this list. + :type total_count: int + :param entries: The parent folders for this item + :type entries: List[FolderMini] + """ + super().__init__(**kwargs) + self.total_count = total_count + self.entries = entries + + +class WebLinkSharedLinkAccessField(str, Enum): + OPEN = 'open' + COMPANY = 'company' + COLLABORATORS = 'collaborators' + + +class WebLinkSharedLinkEffectiveAccessField(str, Enum): + OPEN = 'open' + COMPANY = 'company' + COLLABORATORS = 'collaborators' + + +class WebLinkSharedLinkEffectivePermissionField(str, Enum): + CAN_EDIT = 'can_edit' + CAN_DOWNLOAD = 'can_download' + CAN_PREVIEW = 'can_preview' + NO_ACCESS = 'no_access' + + +class WebLinkSharedLinkPermissionsField(BaseObject): + def __init__(self, can_download: bool, can_preview: bool, can_edit: bool, **kwargs): + """ + :param can_download: Defines if the shared link allows for the item to be downloaded. For + shared links on folders, this also applies to any items in the folder. + + This value can be set to `true` when the effective access level is + set to `open` or `company`, not `collaborators`. + :type can_download: bool + :param can_preview: Defines if the shared link allows for the item to be previewed. + + This value is always `true`. For shared links on folders this also + applies to any items in the folder. + :type can_preview: bool + :param can_edit: Defines if the shared link allows for the item to be edited. + + This value can only be `true` if `can_download` is also `true` and if + the item has a type of `file`. + :type can_edit: bool + """ + super().__init__(**kwargs) + self.can_download = can_download + self.can_preview = can_preview + self.can_edit = can_edit + + +class WebLinkSharedLinkField(BaseObject): + def __init__( + self, + url: str, + effective_access: WebLinkSharedLinkEffectiveAccessField, + effective_permission: WebLinkSharedLinkEffectivePermissionField, + is_password_enabled: bool, + download_count: int, + preview_count: int, + *, + download_url: Optional[str] = None, + vanity_url: Optional[str] = None, + vanity_name: Optional[str] = None, + access: Optional[WebLinkSharedLinkAccessField] = None, + unshared_at: Optional[DateTime] = None, + permissions: Optional[WebLinkSharedLinkPermissionsField] = None, + **kwargs + ): + """ + :param url: The URL that can be used to access the item on Box. + + This URL will display the item in Box's preview UI where the file + can be downloaded if allowed. + + This URL will continue to work even when a custom `vanity_url` + has been set for this shared link. + :type url: str + :param effective_access: The effective access level for the shared link. This can be a more + restrictive access level than the value in the `access` field when the + enterprise settings restrict the allowed access levels. + :type effective_access: WebLinkSharedLinkEffectiveAccessField + :param effective_permission: The effective permissions for this shared link. + These result in the more restrictive combination of + the share link permissions and the item permissions set + by the administrator, the owner, and any ancestor item + such as a folder. + :type effective_permission: WebLinkSharedLinkEffectivePermissionField + :param is_password_enabled: Defines if the shared link requires a password to access the item. + :type is_password_enabled: bool + :param download_count: The number of times this item has been downloaded. + :type download_count: int + :param preview_count: The number of times this item has been previewed. + :type preview_count: int + :param download_url: A URL that can be used to download the file. This URL can be used in + a browser to download the file. This URL includes the file + extension so that the file will be saved with the right file type. + + This property will be `null` for folders., defaults to None + :type download_url: Optional[str], optional + :param vanity_url: The "Custom URL" that can also be used to preview the item on Box. Custom + URLs can only be created or modified in the Box Web application., defaults to None + :type vanity_url: Optional[str], optional + :param vanity_name: The custom name of a shared link, as used in the `vanity_url` field., defaults to None + :type vanity_name: Optional[str], optional + :param access: The access level for this shared link. + + * `open` - provides access to this item to anyone with this link + * `company` - only provides access to this item to people the same company + * `collaborators` - only provides access to this item to people who are + collaborators on this item + + If this field is omitted when creating the shared link, the access level + will be set to the default access level specified by the enterprise admin., defaults to None + :type access: Optional[WebLinkSharedLinkAccessField], optional + :param unshared_at: The date and time when this link will be unshared. This field can only be + set by users with paid accounts., defaults to None + :type unshared_at: Optional[DateTime], optional + :param permissions: Defines if this link allows a user to preview, edit, and download an item. + These permissions refer to the shared link only and + do not supersede permissions applied to the item itself., defaults to None + :type permissions: Optional[WebLinkSharedLinkPermissionsField], optional + """ + super().__init__(**kwargs) + self.url = url + self.effective_access = effective_access + self.effective_permission = effective_permission + self.is_password_enabled = is_password_enabled + self.download_count = download_count + self.preview_count = preview_count + self.download_url = download_url + self.vanity_url = vanity_url + self.vanity_name = vanity_name + self.access = access + self.unshared_at = unshared_at + self.permissions = permissions + + +class WebLinkItemStatusField(str, Enum): + ACTIVE = 'active' + TRASHED = 'trashed' + DELETED = 'deleted' + + +class WebLink(WebLinkMini): + def __init__( + self, + id: str, + *, + parent: Optional[FolderMini] = None, + description: Optional[str] = None, + path_collection: Optional[WebLinkPathCollectionField] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + created_by: Optional[UserMini] = None, + modified_by: Optional[UserMini] = None, + owned_by: Optional[UserMini] = None, + shared_link: Optional[WebLinkSharedLinkField] = None, + item_status: Optional[WebLinkItemStatusField] = None, + url: Optional[str] = None, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + type: WebLinkBaseTypeField = WebLinkBaseTypeField.WEB_LINK.value, + etag: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this web link + :type id: str + :param description: The description accompanying the web link. This is + visible within the Box web application., defaults to None + :type description: Optional[str], optional + :param created_at: When this file was created on Box’s servers., defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: When this file was last updated on the Box + servers., defaults to None + :type modified_at: Optional[DateTime], optional + :param trashed_at: When this file was moved to the trash., defaults to None + :type trashed_at: Optional[DateTime], optional + :param purged_at: When this file will be permanently deleted., defaults to None + :type purged_at: Optional[DateTime], optional + :param item_status: Whether this item is deleted or not. Values include `active`, + `trashed` if the file has been moved to the trash, and `deleted` if + the file has been permanently deleted, defaults to None + :type item_status: Optional[WebLinkItemStatusField], optional + :param url: The URL this web link points to, defaults to None + :type url: Optional[str], optional + :param name: The name of the web link, defaults to None + :type name: Optional[str], optional + :param type: `web_link`, defaults to WebLinkBaseTypeField.WEB_LINK.value + :type type: WebLinkBaseTypeField, optional + :param etag: The entity tag of this web link. Used with `If-Match` + headers., defaults to None + :type etag: Optional[str], optional + """ + super().__init__( + id=id, + url=url, + sequence_id=sequence_id, + name=name, + type=type, + etag=etag, + **kwargs + ) + self.parent = parent + self.description = description + self.path_collection = path_collection + self.created_at = created_at + self.modified_at = modified_at + self.trashed_at = trashed_at + self.purged_at = purged_at + self.created_by = created_by + self.modified_by = modified_by + self.owned_by = owned_by + self.shared_link = shared_link + self.item_status = item_status diff --git a/box_sdk_gen/schemas/web_link_base.py b/box_sdk_gen/schemas/web_link_base.py new file mode 100644 index 0000000..4fbd7c2 --- /dev/null +++ b/box_sdk_gen/schemas/web_link_base.py @@ -0,0 +1,35 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class WebLinkBaseTypeField(str, Enum): + WEB_LINK = 'web_link' + + +class WebLinkBase(BaseObject): + _discriminator = 'type', {'web_link'} + + def __init__( + self, + id: str, + *, + type: WebLinkBaseTypeField = WebLinkBaseTypeField.WEB_LINK.value, + etag: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this web link + :type id: str + :param type: `web_link`, defaults to WebLinkBaseTypeField.WEB_LINK.value + :type type: WebLinkBaseTypeField, optional + :param etag: The entity tag of this web link. Used with `If-Match` + headers., defaults to None + :type etag: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.etag = etag diff --git a/box_sdk_gen/schemas/web_link_mini.py b/box_sdk_gen/schemas/web_link_mini.py new file mode 100644 index 0000000..0ad23d0 --- /dev/null +++ b/box_sdk_gen/schemas/web_link_mini.py @@ -0,0 +1,36 @@ +from typing import Optional + +from box_sdk_gen.schemas.web_link_base import WebLinkBaseTypeField + +from box_sdk_gen.schemas.web_link_base import WebLinkBase + + +class WebLinkMini(WebLinkBase): + def __init__( + self, + id: str, + *, + url: Optional[str] = None, + sequence_id: Optional[str] = None, + name: Optional[str] = None, + type: WebLinkBaseTypeField = WebLinkBaseTypeField.WEB_LINK.value, + etag: Optional[str] = None, + **kwargs + ): + """ + :param id: The unique identifier for this web link + :type id: str + :param url: The URL this web link points to, defaults to None + :type url: Optional[str], optional + :param name: The name of the web link, defaults to None + :type name: Optional[str], optional + :param type: `web_link`, defaults to WebLinkBaseTypeField.WEB_LINK.value + :type type: WebLinkBaseTypeField, optional + :param etag: The entity tag of this web link. Used with `If-Match` + headers., defaults to None + :type etag: Optional[str], optional + """ + super().__init__(id=id, type=type, etag=etag, **kwargs) + self.url = url + self.sequence_id = sequence_id + self.name = name diff --git a/box_sdk_gen/schemas/webhook.py b/box_sdk_gen/schemas/webhook.py new file mode 100644 index 0000000..168a6be --- /dev/null +++ b/box_sdk_gen/schemas/webhook.py @@ -0,0 +1,94 @@ +from enum import Enum + +from typing import Optional + +from typing import List + +from box_sdk_gen.schemas.webhook_mini import WebhookMiniTypeField + +from box_sdk_gen.schemas.webhook_mini import WebhookMiniTargetField + +from box_sdk_gen.schemas.webhook_mini import WebhookMini + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.internal.utils import DateTime + + +class WebhookTriggersField(str, Enum): + FILE_UPLOADED = 'FILE.UPLOADED' + FILE_PREVIEWED = 'FILE.PREVIEWED' + FILE_DOWNLOADED = 'FILE.DOWNLOADED' + FILE_TRASHED = 'FILE.TRASHED' + FILE_DELETED = 'FILE.DELETED' + FILE_RESTORED = 'FILE.RESTORED' + FILE_COPIED = 'FILE.COPIED' + FILE_MOVED = 'FILE.MOVED' + FILE_LOCKED = 'FILE.LOCKED' + FILE_UNLOCKED = 'FILE.UNLOCKED' + FILE_RENAMED = 'FILE.RENAMED' + COMMENT_CREATED = 'COMMENT.CREATED' + COMMENT_UPDATED = 'COMMENT.UPDATED' + COMMENT_DELETED = 'COMMENT.DELETED' + TASK_ASSIGNMENT_CREATED = 'TASK_ASSIGNMENT.CREATED' + TASK_ASSIGNMENT_UPDATED = 'TASK_ASSIGNMENT.UPDATED' + METADATA_INSTANCE_CREATED = 'METADATA_INSTANCE.CREATED' + METADATA_INSTANCE_UPDATED = 'METADATA_INSTANCE.UPDATED' + METADATA_INSTANCE_DELETED = 'METADATA_INSTANCE.DELETED' + FOLDER_CREATED = 'FOLDER.CREATED' + FOLDER_RENAMED = 'FOLDER.RENAMED' + FOLDER_DOWNLOADED = 'FOLDER.DOWNLOADED' + FOLDER_RESTORED = 'FOLDER.RESTORED' + FOLDER_DELETED = 'FOLDER.DELETED' + FOLDER_COPIED = 'FOLDER.COPIED' + FOLDER_MOVED = 'FOLDER.MOVED' + FOLDER_TRASHED = 'FOLDER.TRASHED' + WEBHOOK_DELETED = 'WEBHOOK.DELETED' + COLLABORATION_CREATED = 'COLLABORATION.CREATED' + COLLABORATION_ACCEPTED = 'COLLABORATION.ACCEPTED' + COLLABORATION_REJECTED = 'COLLABORATION.REJECTED' + COLLABORATION_REMOVED = 'COLLABORATION.REMOVED' + COLLABORATION_UPDATED = 'COLLABORATION.UPDATED' + SHARED_LINK_DELETED = 'SHARED_LINK.DELETED' + SHARED_LINK_CREATED = 'SHARED_LINK.CREATED' + SHARED_LINK_UPDATED = 'SHARED_LINK.UPDATED' + SIGN_REQUEST_COMPLETED = 'SIGN_REQUEST.COMPLETED' + SIGN_REQUEST_DECLINED = 'SIGN_REQUEST.DECLINED' + SIGN_REQUEST_EXPIRED = 'SIGN_REQUEST.EXPIRED' + SIGN_REQUEST_SIGNER_EMAIL_BOUNCED = 'SIGN_REQUEST.SIGNER_EMAIL_BOUNCED' + + +class Webhook(WebhookMini): + def __init__( + self, + *, + created_by: Optional[UserMini] = None, + created_at: Optional[DateTime] = None, + address: Optional[str] = None, + triggers: Optional[List[WebhookTriggersField]] = None, + id: Optional[str] = None, + type: Optional[WebhookMiniTypeField] = None, + target: Optional[WebhookMiniTargetField] = None, + **kwargs + ): + """ + :param created_at: A timestamp identifying the time that + the webhook was created., defaults to None + :type created_at: Optional[DateTime], optional + :param address: The URL that is notified by this webhook, defaults to None + :type address: Optional[str], optional + :param triggers: An array of event names that this webhook is + to be triggered for, defaults to None + :type triggers: Optional[List[WebhookTriggersField]], optional + :param id: The unique identifier for this webhook., defaults to None + :type id: Optional[str], optional + :param type: `webhook`, defaults to None + :type type: Optional[WebhookMiniTypeField], optional + :param target: The item that will trigger the webhook, defaults to None + :type target: Optional[WebhookMiniTargetField], optional + """ + super().__init__(id=id, type=type, target=target, **kwargs) + self.created_by = created_by + self.created_at = created_at + self.address = address + self.triggers = triggers diff --git a/box_sdk_gen/schemas/webhook_invocation.py b/box_sdk_gen/schemas/webhook_invocation.py new file mode 100644 index 0000000..59842ca --- /dev/null +++ b/box_sdk_gen/schemas/webhook_invocation.py @@ -0,0 +1,98 @@ +from enum import Enum + +from typing import Optional + +from typing import Union + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.webhook import Webhook + +from box_sdk_gen.schemas.user_mini import UserMini + +from box_sdk_gen.schemas.file import File + +from box_sdk_gen.schemas.folder import Folder + +from box_sdk_gen.internal.utils import DateTime + + +class WebhookInvocationTypeField(str, Enum): + WEBHOOK_EVENT = 'webhook_event' + + +class WebhookInvocationTriggerField(str, Enum): + FILE_UPLOADED = 'FILE.UPLOADED' + FILE_PREVIEWED = 'FILE.PREVIEWED' + FILE_DOWNLOADED = 'FILE.DOWNLOADED' + FILE_TRASHED = 'FILE.TRASHED' + FILE_DELETED = 'FILE.DELETED' + FILE_RESTORED = 'FILE.RESTORED' + FILE_COPIED = 'FILE.COPIED' + FILE_MOVED = 'FILE.MOVED' + FILE_LOCKED = 'FILE.LOCKED' + FILE_UNLOCKED = 'FILE.UNLOCKED' + FILE_RENAMED = 'FILE.RENAMED' + COMMENT_CREATED = 'COMMENT.CREATED' + COMMENT_UPDATED = 'COMMENT.UPDATED' + COMMENT_DELETED = 'COMMENT.DELETED' + TASK_ASSIGNMENT_CREATED = 'TASK_ASSIGNMENT.CREATED' + TASK_ASSIGNMENT_UPDATED = 'TASK_ASSIGNMENT.UPDATED' + METADATA_INSTANCE_CREATED = 'METADATA_INSTANCE.CREATED' + METADATA_INSTANCE_UPDATED = 'METADATA_INSTANCE.UPDATED' + METADATA_INSTANCE_DELETED = 'METADATA_INSTANCE.DELETED' + FOLDER_CREATED = 'FOLDER.CREATED' + FOLDER_RENAMED = 'FOLDER.RENAMED' + FOLDER_DOWNLOADED = 'FOLDER.DOWNLOADED' + FOLDER_RESTORED = 'FOLDER.RESTORED' + FOLDER_DELETED = 'FOLDER.DELETED' + FOLDER_COPIED = 'FOLDER.COPIED' + FOLDER_MOVED = 'FOLDER.MOVED' + FOLDER_TRASHED = 'FOLDER.TRASHED' + WEBHOOK_DELETED = 'WEBHOOK.DELETED' + COLLABORATION_CREATED = 'COLLABORATION.CREATED' + COLLABORATION_ACCEPTED = 'COLLABORATION.ACCEPTED' + COLLABORATION_REJECTED = 'COLLABORATION.REJECTED' + COLLABORATION_REMOVED = 'COLLABORATION.REMOVED' + COLLABORATION_UPDATED = 'COLLABORATION.UPDATED' + SHARED_LINK_DELETED = 'SHARED_LINK.DELETED' + SHARED_LINK_CREATED = 'SHARED_LINK.CREATED' + SHARED_LINK_UPDATED = 'SHARED_LINK.UPDATED' + SIGN_REQUEST_COMPLETED = 'SIGN_REQUEST.COMPLETED' + SIGN_REQUEST_DECLINED = 'SIGN_REQUEST.DECLINED' + SIGN_REQUEST_EXPIRED = 'SIGN_REQUEST.EXPIRED' + SIGN_REQUEST_SIGNER_EMAIL_BOUNCED = 'SIGN_REQUEST.SIGNER_EMAIL_BOUNCED' + + +class WebhookInvocation(BaseObject): + _discriminator = 'type', {'webhook_event'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[WebhookInvocationTypeField] = None, + webhook: Optional[Webhook] = None, + created_by: Optional[UserMini] = None, + created_at: Optional[DateTime] = None, + trigger: Optional[WebhookInvocationTriggerField] = None, + source: Optional[Union[File, Folder]] = None, + **kwargs + ): + """ + :param id: The unique identifier for this webhook invocation, defaults to None + :type id: Optional[str], optional + :param type: `webhook_event`, defaults to None + :type type: Optional[WebhookInvocationTypeField], optional + :param created_at: A timestamp identifying the time that + the webhook event was triggered., defaults to None + :type created_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.webhook = webhook + self.created_by = created_by + self.created_at = created_at + self.trigger = trigger + self.source = source diff --git a/box_sdk_gen/schemas/webhook_mini.py b/box_sdk_gen/schemas/webhook_mini.py new file mode 100644 index 0000000..4e283bb --- /dev/null +++ b/box_sdk_gen/schemas/webhook_mini.py @@ -0,0 +1,60 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class WebhookMiniTypeField(str, Enum): + WEBHOOK = 'webhook' + + +class WebhookMiniTargetTypeField(str, Enum): + FILE = 'file' + FOLDER = 'folder' + + +class WebhookMiniTargetField(BaseObject): + _discriminator = 'type', {'file', 'folder'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[WebhookMiniTargetTypeField] = None, + **kwargs + ): + """ + :param id: The ID of the item to trigger a webhook, defaults to None + :type id: Optional[str], optional + :param type: The type of item to trigger a webhook, defaults to None + :type type: Optional[WebhookMiniTargetTypeField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + + +class WebhookMini(BaseObject): + _discriminator = 'type', {'webhook'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[WebhookMiniTypeField] = None, + target: Optional[WebhookMiniTargetField] = None, + **kwargs + ): + """ + :param id: The unique identifier for this webhook., defaults to None + :type id: Optional[str], optional + :param type: `webhook`, defaults to None + :type type: Optional[WebhookMiniTypeField], optional + :param target: The item that will trigger the webhook, defaults to None + :type target: Optional[WebhookMiniTargetField], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.target = target diff --git a/box_sdk_gen/schemas/webhooks.py b/box_sdk_gen/schemas/webhooks.py new file mode 100644 index 0000000..673111c --- /dev/null +++ b/box_sdk_gen/schemas/webhooks.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.webhook_mini import WebhookMini + + +class Webhooks(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[WebhookMini]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of webhooks, defaults to None + :type entries: Optional[List[WebhookMini]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/workflow.py b/box_sdk_gen/schemas/workflow.py new file mode 100644 index 0000000..a28175f --- /dev/null +++ b/box_sdk_gen/schemas/workflow.py @@ -0,0 +1,293 @@ +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.workflow_mini import WorkflowMiniTypeField + +from box_sdk_gen.schemas.workflow_mini import WorkflowMini + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.internal.utils import DateTime + + +class WorkflowFlowsTypeField(str, Enum): + FLOW = 'flow' + + +class WorkflowFlowsTriggerTypeField(str, Enum): + TRIGGER = 'trigger' + + +class WorkflowFlowsTriggerTriggerTypeField(str, Enum): + WORKFLOW_MANUAL_START = 'WORKFLOW_MANUAL_START' + + +class WorkflowFlowsTriggerScopeTypeField(str, Enum): + TRIGGER_SCOPE = 'trigger_scope' + + +class WorkflowFlowsTriggerScopeObjectTypeField(str, Enum): + FOLDER = 'folder' + + +class WorkflowFlowsTriggerScopeObjectField(BaseObject): + _discriminator = 'type', {'folder'} + + def __init__( + self, + *, + type: Optional[WorkflowFlowsTriggerScopeObjectTypeField] = None, + id: Optional[str] = None, + **kwargs + ): + """ + :param type: The type of the object, defaults to None + :type type: Optional[WorkflowFlowsTriggerScopeObjectTypeField], optional + :param id: The id of the object, defaults to None + :type id: Optional[str], optional + """ + super().__init__(**kwargs) + self.type = type + self.id = id + + +class WorkflowFlowsTriggerScopeField(BaseObject): + _discriminator = 'type', {'trigger_scope'} + + def __init__( + self, + *, + type: Optional[WorkflowFlowsTriggerScopeTypeField] = None, + ref: Optional[str] = None, + object: Optional[WorkflowFlowsTriggerScopeObjectField] = None, + **kwargs + ): + """ + :param type: The trigger scope's resource type, defaults to None + :type type: Optional[WorkflowFlowsTriggerScopeTypeField], optional + :param ref: Indicates the path of the condition value to check, defaults to None + :type ref: Optional[str], optional + :param object: The object the `ref` points to, defaults to None + :type object: Optional[WorkflowFlowsTriggerScopeObjectField], optional + """ + super().__init__(**kwargs) + self.type = type + self.ref = ref + self.object = object + + +class WorkflowFlowsTriggerField(BaseObject): + _discriminator = 'type', {'trigger'} + + def __init__( + self, + *, + type: Optional[WorkflowFlowsTriggerTypeField] = None, + trigger_type: Optional[WorkflowFlowsTriggerTriggerTypeField] = None, + scope: Optional[List[WorkflowFlowsTriggerScopeField]] = None, + **kwargs + ): + """ + :param type: The trigger's resource type, defaults to None + :type type: Optional[WorkflowFlowsTriggerTypeField], optional + :param trigger_type: The type of trigger selected for this flow, defaults to None + :type trigger_type: Optional[WorkflowFlowsTriggerTriggerTypeField], optional + :param scope: List of trigger scopes, defaults to None + :type scope: Optional[List[WorkflowFlowsTriggerScopeField]], optional + """ + super().__init__(**kwargs) + self.type = type + self.trigger_type = trigger_type + self.scope = scope + + +class WorkflowFlowsOutcomesTypeField(str, Enum): + OUTCOME = 'outcome' + + +class WorkflowFlowsOutcomesActionTypeField(str, Enum): + ADD_METADATA = 'add_metadata' + ASSIGN_TASK = 'assign_task' + COPY_FILE = 'copy_file' + COPY_FOLDER = 'copy_folder' + CREATE_FOLDER = 'create_folder' + DELETE_FILE = 'delete_file' + DELETE_FOLDER = 'delete_folder' + LOCK_FILE = 'lock_file' + MOVE_FILE = 'move_file' + MOVE_FOLDER = 'move_folder' + REMOVE_WATERMARK_FILE = 'remove_watermark_file' + RENAME_FOLDER = 'rename_folder' + RESTORE_FOLDER = 'restore_folder' + SHARE_FILE = 'share_file' + SHARE_FOLDER = 'share_folder' + UNLOCK_FILE = 'unlock_file' + UPLOAD_FILE = 'upload_file' + WAIT_FOR_TASK = 'wait_for_task' + WATERMARK_FILE = 'watermark_file' + GO_BACK_TO_STEP = 'go_back_to_step' + APPLY_FILE_CLASSIFICATION = 'apply_file_classification' + APPLY_FOLDER_CLASSIFICATION = 'apply_folder_classification' + SEND_NOTIFICATION = 'send_notification' + + +class WorkflowFlowsOutcomesIfRejectedTypeField(str, Enum): + OUTCOME = 'outcome' + + +class WorkflowFlowsOutcomesIfRejectedActionTypeField(str, Enum): + ADD_METADATA = 'add_metadata' + ASSIGN_TASK = 'assign_task' + COPY_FILE = 'copy_file' + COPY_FOLDER = 'copy_folder' + CREATE_FOLDER = 'create_folder' + DELETE_FILE = 'delete_file' + DELETE_FOLDER = 'delete_folder' + LOCK_FILE = 'lock_file' + MOVE_FILE = 'move_file' + MOVE_FOLDER = 'move_folder' + REMOVE_WATERMARK_FILE = 'remove_watermark_file' + RENAME_FOLDER = 'rename_folder' + RESTORE_FOLDER = 'restore_folder' + SHARE_FILE = 'share_file' + SHARE_FOLDER = 'share_folder' + UNLOCK_FILE = 'unlock_file' + UPLOAD_FILE = 'upload_file' + WAIT_FOR_TASK = 'wait_for_task' + WATERMARK_FILE = 'watermark_file' + GO_BACK_TO_STEP = 'go_back_to_step' + APPLY_FILE_CLASSIFICATION = 'apply_file_classification' + APPLY_FOLDER_CLASSIFICATION = 'apply_folder_classification' + SEND_NOTIFICATION = 'send_notification' + + +class WorkflowFlowsOutcomesIfRejectedField(BaseObject): + _discriminator = 'type', {'outcome'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[WorkflowFlowsOutcomesIfRejectedTypeField] = None, + name: Optional[str] = None, + action_type: Optional[WorkflowFlowsOutcomesIfRejectedActionTypeField] = None, + **kwargs + ): + """ + :param id: The identifier of the outcome, defaults to None + :type id: Optional[str], optional + :param type: The outcomes resource type, defaults to None + :type type: Optional[WorkflowFlowsOutcomesIfRejectedTypeField], optional + :param name: The name of the outcome, defaults to None + :type name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + self.action_type = action_type + + +class WorkflowFlowsOutcomesField(BaseObject): + _discriminator = 'type', {'outcome'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[WorkflowFlowsOutcomesTypeField] = None, + name: Optional[str] = None, + action_type: Optional[WorkflowFlowsOutcomesActionTypeField] = None, + if_rejected: Optional[List[WorkflowFlowsOutcomesIfRejectedField]] = None, + **kwargs + ): + """ + :param id: The identifier of the outcome, defaults to None + :type id: Optional[str], optional + :param type: The outcomes resource type, defaults to None + :type type: Optional[WorkflowFlowsOutcomesTypeField], optional + :param name: The name of the outcome, defaults to None + :type name: Optional[str], optional + :param if_rejected: If `action_type` is `assign_task` and the task is rejected, returns a + list of outcomes to complete, defaults to None + :type if_rejected: Optional[List[WorkflowFlowsOutcomesIfRejectedField]], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + self.action_type = action_type + self.if_rejected = if_rejected + + +class WorkflowFlowsField(BaseObject): + _discriminator = 'type', {'flow'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[WorkflowFlowsTypeField] = None, + trigger: Optional[WorkflowFlowsTriggerField] = None, + outcomes: Optional[List[WorkflowFlowsOutcomesField]] = None, + created_at: Optional[DateTime] = None, + created_by: Optional[UserBase] = None, + **kwargs + ): + """ + :param id: The identifier of the flow, defaults to None + :type id: Optional[str], optional + :param type: The flow's resource type, defaults to None + :type type: Optional[WorkflowFlowsTypeField], optional + :param created_at: When this flow was created, defaults to None + :type created_at: Optional[DateTime], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.trigger = trigger + self.outcomes = outcomes + self.created_at = created_at + self.created_by = created_by + + +class Workflow(WorkflowMini): + def __init__( + self, + *, + flows: Optional[List[WorkflowFlowsField]] = None, + id: Optional[str] = None, + type: Optional[WorkflowMiniTypeField] = None, + name: Optional[str] = None, + description: Optional[str] = None, + is_enabled: Optional[bool] = None, + **kwargs + ): + """ + :param flows: A list of flows assigned to a workflow., defaults to None + :type flows: Optional[List[WorkflowFlowsField]], optional + :param id: The unique identifier for the workflow, defaults to None + :type id: Optional[str], optional + :param type: `workflow`, defaults to None + :type type: Optional[WorkflowMiniTypeField], optional + :param name: The name of the workflow, defaults to None + :type name: Optional[str], optional + :param description: The description for a workflow., defaults to None + :type description: Optional[str], optional + :param is_enabled: Specifies if this workflow is enabled, defaults to None + :type is_enabled: Optional[bool], optional + """ + super().__init__( + id=id, + type=type, + name=name, + description=description, + is_enabled=is_enabled, + **kwargs + ) + self.flows = flows diff --git a/box_sdk_gen/schemas/workflow_full.py b/box_sdk_gen/schemas/workflow_full.py new file mode 100644 index 0000000..930b338 --- /dev/null +++ b/box_sdk_gen/schemas/workflow_full.py @@ -0,0 +1,64 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.schemas.workflow_mini import WorkflowMiniTypeField + +from box_sdk_gen.schemas.workflow_mini import WorkflowMini + +from box_sdk_gen.schemas.workflow import WorkflowFlowsField + +from box_sdk_gen.schemas.workflow import Workflow + +from box_sdk_gen.schemas.user_base import UserBase + +from box_sdk_gen.internal.utils import DateTime + + +class WorkflowFull(Workflow): + def __init__( + self, + *, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + created_by: Optional[UserBase] = None, + modified_by: Optional[UserBase] = None, + flows: Optional[List[WorkflowFlowsField]] = None, + id: Optional[str] = None, + type: Optional[WorkflowMiniTypeField] = None, + name: Optional[str] = None, + description: Optional[str] = None, + is_enabled: Optional[bool] = None, + **kwargs + ): + """ + :param created_at: The date and time when the workflow was created on Box, defaults to None + :type created_at: Optional[DateTime], optional + :param modified_at: The date and time when the workflow was last updated on Box, defaults to None + :type modified_at: Optional[DateTime], optional + :param flows: A list of flows assigned to a workflow., defaults to None + :type flows: Optional[List[WorkflowFlowsField]], optional + :param id: The unique identifier for the workflow, defaults to None + :type id: Optional[str], optional + :param type: `workflow`, defaults to None + :type type: Optional[WorkflowMiniTypeField], optional + :param name: The name of the workflow, defaults to None + :type name: Optional[str], optional + :param description: The description for a workflow., defaults to None + :type description: Optional[str], optional + :param is_enabled: Specifies if this workflow is enabled, defaults to None + :type is_enabled: Optional[bool], optional + """ + super().__init__( + flows=flows, + id=id, + type=type, + name=name, + description=description, + is_enabled=is_enabled, + **kwargs + ) + self.created_at = created_at + self.modified_at = modified_at + self.created_by = created_by + self.modified_by = modified_by diff --git a/box_sdk_gen/schemas/workflow_mini.py b/box_sdk_gen/schemas/workflow_mini.py new file mode 100644 index 0000000..080832c --- /dev/null +++ b/box_sdk_gen/schemas/workflow_mini.py @@ -0,0 +1,42 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class WorkflowMiniTypeField(str, Enum): + WORKFLOW = 'workflow' + + +class WorkflowMini(BaseObject): + _discriminator = 'type', {'workflow'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[WorkflowMiniTypeField] = None, + name: Optional[str] = None, + description: Optional[str] = None, + is_enabled: Optional[bool] = None, + **kwargs + ): + """ + :param id: The unique identifier for the workflow, defaults to None + :type id: Optional[str], optional + :param type: `workflow`, defaults to None + :type type: Optional[WorkflowMiniTypeField], optional + :param name: The name of the workflow, defaults to None + :type name: Optional[str], optional + :param description: The description for a workflow., defaults to None + :type description: Optional[str], optional + :param is_enabled: Specifies if this workflow is enabled, defaults to None + :type is_enabled: Optional[bool], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.name = name + self.description = description + self.is_enabled = is_enabled diff --git a/box_sdk_gen/schemas/workflows.py b/box_sdk_gen/schemas/workflows.py new file mode 100644 index 0000000..67c77ff --- /dev/null +++ b/box_sdk_gen/schemas/workflows.py @@ -0,0 +1,36 @@ +from typing import Optional + +from typing import List + +from box_sdk_gen.internal.base_object import BaseObject + +from box_sdk_gen.schemas.workflow import Workflow + + +class Workflows(BaseObject): + def __init__( + self, + *, + limit: Optional[int] = None, + next_marker: Optional[str] = None, + prev_marker: Optional[str] = None, + entries: Optional[List[Workflow]] = None, + **kwargs + ): + """ + :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 + :param entries: A list of workflows, defaults to None + :type entries: Optional[List[Workflow]], optional + """ + super().__init__(**kwargs) + self.limit = limit + self.next_marker = next_marker + self.prev_marker = prev_marker + self.entries = entries diff --git a/box_sdk_gen/schemas/zip_download.py b/box_sdk_gen/schemas/zip_download.py new file mode 100644 index 0000000..db08c6d --- /dev/null +++ b/box_sdk_gen/schemas/zip_download.py @@ -0,0 +1,101 @@ +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.internal.utils import DateTime + + +class ZipDownloadNameConflictsTypeField(str, Enum): + FILE = 'file' + FOLDER = 'folder' + + +class ZipDownloadNameConflictsField(BaseObject): + _discriminator = 'type', {'file', 'folder'} + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[ZipDownloadNameConflictsTypeField] = None, + original_name: Optional[str] = None, + download_name: Optional[str] = None, + **kwargs + ): + """ + :param id: The identifier of the item, defaults to None + :type id: Optional[str], optional + :param type: The type of this item, defaults to None + :type type: Optional[ZipDownloadNameConflictsTypeField], optional + :param original_name: The original name of this item, defaults to None + :type original_name: Optional[str], optional + :param download_name: The new name of this item as it will appear in the + downloaded `zip` archive., defaults to None + :type download_name: Optional[str], optional + """ + super().__init__(**kwargs) + self.id = id + self.type = type + self.original_name = original_name + self.download_name = download_name + + +class ZipDownload(BaseObject): + def __init__( + self, + *, + download_url: Optional[str] = None, + status_url: Optional[str] = None, + expires_at: Optional[DateTime] = None, + name_conflicts: Optional[List[List[ZipDownloadNameConflictsField]]] = None, + **kwargs + ): + """ + :param download_url: The URL that can be used to download the `zip` archive. A `Get` request to + this URL will start streaming the items requested. By default, this URL + is only valid for a few seconds, until the `expires_at` time, unless a + download is started after which it is valid for the duration of the + download. + + It is important to note that the domain and path of this URL might change + between API calls, and therefore it's important to use this URL as-is., defaults to None + :type download_url: Optional[str], optional + :param status_url: The URL that can be used to get the status of the `zip` archive being + downloaded. A `Get` request to this URL will return the number of files + in the archive as well as the number of items already downloaded or + skipped. By default, this URL is only valid for a few seconds, until the + `expires_at` time, unless a download is started after which the URL is + valid for 12 hours from the start of the download. + + It is important to note that the domain and path of this URL might change + between API calls, and therefore it's important to use this URL as-is., defaults to None + :type status_url: Optional[str], optional + :param expires_at: The time and date when this archive will expire. After this time the + `status_url` and `download_url` will return an error. + + By default, these URLs are only valid for a few seconds, unless a download + is started after which the `download_url` is valid for the duration of the + download, and the `status_url` is valid for 12 hours from the start of the + download., defaults to None + :type expires_at: Optional[DateTime], optional + :param name_conflicts: A list of conflicts that occurred when trying to create the archive. This + would occur when multiple items have been requested with the + same name. + + To solve these conflicts, the API will automatically rename an item + and return a mapping between the original item's name and its new + name. + + For every conflict, both files will be renamed and therefore this list + will always be a multiple of 2., defaults to None + :type name_conflicts: Optional[List[List[ZipDownloadNameConflictsField]]], optional + """ + super().__init__(**kwargs) + self.download_url = download_url + self.status_url = status_url + self.expires_at = expires_at + self.name_conflicts = name_conflicts diff --git a/box_sdk_gen/schemas/zip_download_request.py b/box_sdk_gen/schemas/zip_download_request.py new file mode 100644 index 0000000..1c975f4 --- /dev/null +++ b/box_sdk_gen/schemas/zip_download_request.py @@ -0,0 +1,49 @@ +from enum import Enum + +from box_sdk_gen.internal.base_object import BaseObject + +from typing import List + +from typing import Optional + + +class ZipDownloadRequestItemsTypeField(str, Enum): + FILE = 'file' + FOLDER = 'folder' + + +class ZipDownloadRequestItemsField(BaseObject): + _discriminator = 'type', {'file', 'folder'} + + def __init__(self, type: ZipDownloadRequestItemsTypeField, id: str, **kwargs): + """ + :param type: The type of the item to add to the archive. + :type type: ZipDownloadRequestItemsTypeField + :param id: The identifier of the item to add to the archive. When this item is + a folder then this can not be the root folder with ID `0`. + :type id: str + """ + super().__init__(**kwargs) + self.type = type + self.id = id + + +class ZipDownloadRequest(BaseObject): + def __init__( + self, + items: List[ZipDownloadRequestItemsField], + *, + download_file_name: Optional[str] = None, + **kwargs + ): + """ + :param items: A list of items to add to the `zip` archive. These can + be folders or files. + :type items: List[ZipDownloadRequestItemsField] + :param download_file_name: The optional name of the `zip` archive. This name will be appended by the + `.zip` file extension, for example `January Financials.zip`., defaults to None + :type download_file_name: Optional[str], optional + """ + super().__init__(**kwargs) + self.items = items + self.download_file_name = download_file_name diff --git a/box_sdk_gen/schemas/zip_download_status.py b/box_sdk_gen/schemas/zip_download_status.py new file mode 100644 index 0000000..8568c00 --- /dev/null +++ b/box_sdk_gen/schemas/zip_download_status.py @@ -0,0 +1,48 @@ +from enum import Enum + +from typing import Optional + +from box_sdk_gen.internal.base_object import BaseObject + + +class ZipDownloadStatusStateField(str, Enum): + IN_PROGRESS = 'in_progress' + FAILED = 'failed' + SUCCEEDED = 'succeeded' + + +class ZipDownloadStatus(BaseObject): + def __init__( + self, + *, + total_file_count: Optional[int] = None, + downloaded_file_count: Optional[int] = None, + skipped_file_count: Optional[int] = None, + skipped_folder_count: Optional[int] = None, + state: Optional[ZipDownloadStatusStateField] = None, + **kwargs + ): + """ + :param total_file_count: The total number of files in the archive., defaults to None + :type total_file_count: Optional[int], optional + :param downloaded_file_count: The number of files that have already been downloaded., defaults to None + :type downloaded_file_count: Optional[int], optional + :param skipped_file_count: The number of files that have been skipped as they could not be + downloaded. In many cases this is due to permission issues that have + surfaced between the creation of the request for the archive and the + archive being downloaded., defaults to None + :type skipped_file_count: Optional[int], optional + :param skipped_folder_count: The number of folders that have been skipped as they could not be + downloaded. In many cases this is due to permission issues that have + surfaced between the creation of the request for the archive and the + archive being downloaded., defaults to None + :type skipped_folder_count: Optional[int], optional + :param state: The state of the archive being downloaded., defaults to None + :type state: Optional[ZipDownloadStatusStateField], optional + """ + super().__init__(**kwargs) + self.total_file_count = total_file_count + self.downloaded_file_count = downloaded_file_count + self.skipped_file_count = skipped_file_count + self.skipped_folder_count = skipped_folder_count + self.state = state diff --git a/docs/file_metadata.md b/docs/file_metadata.md index 8d3b2b4..5b68dbe 100644 --- a/docs/file_metadata.md +++ b/docs/file_metadata.md @@ -88,7 +88,7 @@ See the endpoint docs at ```python -client.file_metadata.create_file_metadata_by_id(file.id, CreateFileMetadataByIdScope.ENTERPRISE.value, template_key, {'floatField': 10, 'stringField': 'stringValue', 'dateField': '2035-01-02T00:00:00Z', 'enumField': 'enumValue2', 'multiSelectField': ['multiSelectValue1', 'multiSelectValue2']}) +client.file_metadata.create_file_metadata_by_id(file.id, CreateFileMetadataByIdScope.ENTERPRISE.value, template_key, {'name': 'John', 'age': 23, 'birthDate': '2001-01-03T02:20:50.520Z', 'countryCode': 'US', 'sports': ['basketball', 'tennis']}) ``` ### Arguments diff --git a/docs/files.md b/docs/files.md index b25c5f1..871e0c3 100644 --- a/docs/files.md +++ b/docs/files.md @@ -59,7 +59,7 @@ See the endpoint docs at ```python -client.files.update_file_by_id(file_to_update.id, name=updated_name, description='Updated description') +downscoped_client.files.update_file_by_id(file.id, name=get_uuid()) ``` ### Arguments @@ -117,7 +117,7 @@ See the endpoint docs at ```python -client.files.delete_file_by_id(file_2.id) +parent_client.files.delete_file_by_id(file.id) ``` ### Arguments diff --git a/docs/folder_metadata.md b/docs/folder_metadata.md index e275572..670ee75 100644 --- a/docs/folder_metadata.md +++ b/docs/folder_metadata.md @@ -93,7 +93,7 @@ See the endpoint docs at ```python -client.folder_metadata.create_folder_metadata_by_id(folder.id, CreateFolderMetadataByIdScope.ENTERPRISE.value, template_key, data) +client.folder_metadata.create_folder_metadata_by_id(folder.id, CreateFolderMetadataByIdScope.ENTERPRISE.value, template_key, {'name': 'John', 'age': 23, 'birthDate': '2001-01-03T02:20:50.520Z', 'countryCode': 'US', 'sports': ['basketball', 'tennis']}) ``` ### Arguments diff --git a/docs/folders.md b/docs/folders.md index 7e63a91..c1a7531 100644 --- a/docs/folders.md +++ b/docs/folders.md @@ -28,7 +28,7 @@ See the endpoint docs at ```python -client.folders.get_folder_by_id('0') +client.folders.get_folder_by_id(new_folder.id) ``` ### Arguments @@ -81,7 +81,7 @@ See the endpoint docs at ```python -client.folders.update_folder_by_id(copied_folder.id, name=moved_folder_name, parent=UpdateFolderByIdParent(id=folder_origin.id)) +downscoped_client.folders.update_folder_by_id(folder.id, name=get_uuid()) ``` ### Arguments @@ -145,7 +145,7 @@ See the endpoint docs at ```python -client.folders.delete_folder_by_id(folder_1.id) +parent_client.folders.delete_folder_by_id(folder.id) ``` ### Arguments @@ -226,7 +226,7 @@ See the endpoint docs at ```python -client.folders.create_folder(get_uuid(), CreateFolderParent(id='0')) +parent_client.folders.create_folder(get_uuid(), CreateFolderParent(id='0')) ``` ### Arguments diff --git a/docs/groups.md b/docs/groups.md index 8674091..5e71a08 100644 --- a/docs/groups.md +++ b/docs/groups.md @@ -55,7 +55,7 @@ See the endpoint docs at ```python -client.groups.create_group(group_name) +client.groups.create_group(group_name, description=group_description) ``` ### Arguments diff --git a/docs/legal_hold_policies.md b/docs/legal_hold_policies.md index 89e143d..3fa12e5 100644 --- a/docs/legal_hold_policies.md +++ b/docs/legal_hold_policies.md @@ -53,7 +53,7 @@ See the endpoint docs at ```python -client.legal_hold_policies.create_legal_hold_policy(legal_hold_policy_name, description=legal_hold_description, is_ongoing=True) +client.legal_hold_policies.create_legal_hold_policy(legal_hold_policy_name, description=legal_hold_description, filter_started_at=filter_started_at, filter_ended_at=filter_ended_at, is_ongoing=False) ``` ### Arguments @@ -154,7 +154,7 @@ See the endpoint docs at ```python -client.legal_hold_policies.delete_legal_hold_policy_by_id(legal_hold_policy_id) +client.legal_hold_policies.delete_legal_hold_policy_by_id(legal_hold_policy.id) ``` ### Arguments diff --git a/docs/metadata_templates.md b/docs/metadata_templates.md index 6c22220..a26ba92 100644 --- a/docs/metadata_templates.md +++ b/docs/metadata_templates.md @@ -125,7 +125,7 @@ See the endpoint docs at ```python -client.metadata_templates.delete_metadata_template(DeleteMetadataTemplateScope.ENTERPRISE.value, template.template_key) +client.metadata_templates.delete_metadata_template(DeleteMetadataTemplateScope.ENTERPRISE.value, template_key) ``` ### Arguments @@ -249,7 +249,7 @@ See the endpoint docs at ```python -client.metadata_templates.create_metadata_template('enterprise', template_key, template_key=template_key, fields=[CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.FLOAT.value, key='floatField', display_name='floatField'), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.STRING.value, key='stringField', display_name='stringField'), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.DATE.value, key='dateField', display_name='dateField'), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.ENUM.value, key='enumField', display_name='enumField', options=[CreateMetadataTemplateFieldsOptionsField(key='enumValue1'), CreateMetadataTemplateFieldsOptionsField(key='enumValue2')]), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.MULTISELECT.value, key='multiSelectField', display_name='multiSelectField', options=[CreateMetadataTemplateFieldsOptionsField(key='multiSelectValue1'), CreateMetadataTemplateFieldsOptionsField(key='multiSelectValue2')])]) +client.metadata_templates.create_metadata_template('enterprise', template_key, template_key=template_key, fields=[CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.STRING.value, key='name', display_name='name'), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.FLOAT.value, key='age', display_name='age'), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.DATE.value, key='birthDate', display_name='birthDate'), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.ENUM.value, key='countryCode', display_name='countryCode', options=[CreateMetadataTemplateFieldsOptionsField(key='US'), CreateMetadataTemplateFieldsOptionsField(key='CA')]), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.MULTISELECT.value, key='sports', display_name='sports', options=[CreateMetadataTemplateFieldsOptionsField(key='basketball'), CreateMetadataTemplateFieldsOptionsField(key='football'), CreateMetadataTemplateFieldsOptionsField(key='tennis')])]) ``` ### Arguments diff --git a/docs/retention_policies.md b/docs/retention_policies.md index 88074aa..4adfea6 100644 --- a/docs/retention_policies.md +++ b/docs/retention_policies.md @@ -56,7 +56,7 @@ See the endpoint docs at ```python -client.retention_policies.create_retention_policy(retention_policy_name, CreateRetentionPolicyPolicyType.FINITE.value, CreateRetentionPolicyDispositionAction.REMOVE_RETENTION.value, description=retention_description, retention_length='1', retention_type=CreateRetentionPolicyRetentionType.MODIFIABLE.value, can_owner_extend_retention=True, are_owners_notified=True) +client.retention_policies.create_retention_policy(get_uuid(), CreateRetentionPolicyPolicyType.FINITE.value, CreateRetentionPolicyDispositionAction.REMOVE_RETENTION.value, description=description, retention_length='1', retention_type=CreateRetentionPolicyRetentionType.MODIFIABLE.value, can_owner_extend_retention=False) ``` ### Arguments diff --git a/docs/retention_policy_assignments.md b/docs/retention_policy_assignments.md index 464c905..fa9b121 100644 --- a/docs/retention_policy_assignments.md +++ b/docs/retention_policy_assignments.md @@ -57,7 +57,7 @@ See the endpoint docs at ```python -client.retention_policy_assignments.create_retention_policy_assignment(retention_policy.id, CreateRetentionPolicyAssignmentAssignTo(type=CreateRetentionPolicyAssignmentAssignToTypeField.FOLDER.value, id=folder.id)) +client.retention_policy_assignments.create_retention_policy_assignment(retention_policy.id, CreateRetentionPolicyAssignmentAssignTo(id=folder.id, type=CreateRetentionPolicyAssignmentAssignToTypeField.FOLDER.value)) ``` ### Arguments diff --git a/docs/shield_information_barrier_segments.md b/docs/shield_information_barrier_segments.md index ecb00be..a5d8217 100644 --- a/docs/shield_information_barrier_segments.md +++ b/docs/shield_information_barrier_segments.md @@ -79,7 +79,7 @@ See the endpoint docs at ```python -client.shield_information_barrier_segments.delete_shield_information_barrier_segment_by_id(segment_id) +client.shield_information_barrier_segments.delete_shield_information_barrier_segment_by_id(segment.id) ``` ### Arguments @@ -140,7 +140,7 @@ See the endpoint docs at ```python -client.shield_information_barrier_segments.create_shield_information_barrier_segment(ShieldInformationBarrierBase(id=barrier_id, type=ShieldInformationBarrierBaseTypeField.SHIELD_INFORMATION_BARRIER.value), segment_name, description=segment_description) +client.shield_information_barrier_segments.create_shield_information_barrier_segment(ShieldInformationBarrierBase(id=barrier_id, type=ShieldInformationBarrierBaseTypeField.SHIELD_INFORMATION_BARRIER.value), segment_name) ``` ### Arguments diff --git a/docs/tasks.md b/docs/tasks.md index 34499f6..11d7a5d 100644 --- a/docs/tasks.md +++ b/docs/tasks.md @@ -51,7 +51,7 @@ See the endpoint docs at ```python -client.tasks.create_task(CreateTaskItem(type=CreateTaskItemTypeField.FILE.value, id=file.id), action=CreateTaskAction.REVIEW.value, message='test message', due_at=date_time, completion_rule=CreateTaskCompletionRule.ALL_ASSIGNEES.value) +client.tasks.create_task(CreateTaskItem(type=CreateTaskItemTypeField.FILE.value, id=file.id), action=CreateTaskAction.REVIEW.value, message='test message', due_at=date, completion_rule=CreateTaskCompletionRule.ALL_ASSIGNEES.value) ``` ### Arguments diff --git a/docs/trashed_files.md b/docs/trashed_files.md index 05c845a..27a11c3 100644 --- a/docs/trashed_files.md +++ b/docs/trashed_files.md @@ -63,7 +63,7 @@ See the endpoint docs at ```python -client.trashed_files.get_trashed_file_by_id(file.id) +client.trashed_files.get_trashed_file_by_id(uploaded_file.id) ``` ### Arguments diff --git a/docs/user_collaborations.md b/docs/user_collaborations.md index dc7950f..8cff210 100644 --- a/docs/user_collaborations.md +++ b/docs/user_collaborations.md @@ -87,7 +87,7 @@ See the endpoint docs at ```python -client.user_collaborations.delete_collaboration_by_id(collaboration_id) +client.user_collaborations.delete_collaboration_by_id(group_collaboration.id) ``` ### Arguments @@ -130,7 +130,7 @@ See the endpoint docs at ```python -client.user_collaborations.create_collaboration(CreateCollaborationItem(type=CreateCollaborationItemTypeField.FOLDER.value, id=folder.id), CreateCollaborationAccessibleBy(type=CreateCollaborationAccessibleByTypeField.USER.value, login=user_login), CreateCollaborationRole.EDITOR.value) +client.user_collaborations.create_collaboration(CreateCollaborationItem(type=CreateCollaborationItemTypeField.FILE.value, id=file.id), CreateCollaborationAccessibleBy(type=CreateCollaborationAccessibleByTypeField.USER.value, id=get_env_var('USER_ID')), CreateCollaborationRole.EDITOR.value) ``` ### Arguments diff --git a/docs/users.md b/docs/users.md index 1594450..9871da7 100644 --- a/docs/users.md +++ b/docs/users.md @@ -68,7 +68,7 @@ See the endpoint docs at ```python -client.users.create_user(user_name, login=user_login, is_platform_access_only=True) +client.users.create_user(user_name, is_platform_access_only=True) ``` ### Arguments @@ -291,7 +291,7 @@ See the endpoint docs at ```python -client.users.delete_user_by_id(user.id) +client.users.delete_user_by_id(created_user.id) ``` ### Arguments diff --git a/docs/web_links.md b/docs/web_links.md index cecd51c..5334027 100644 --- a/docs/web_links.md +++ b/docs/web_links.md @@ -17,7 +17,7 @@ See the endpoint docs at ```python -client.web_links.create_web_link(url, CreateWebLinkParent(id=parent.id), name=name, description=description) +client.web_links.create_web_link('https://www.box.com', CreateWebLinkParent(id=parent.id), name=get_uuid(), description='Weblink description') ``` ### Arguments @@ -119,7 +119,7 @@ See the endpoint docs at ```python -client.web_links.delete_web_link_by_id(weblink.id) +client.web_links.delete_web_link_by_id(web_link_id) ``` ### Arguments diff --git a/test/ai.py b/test/ai.py index e6d2543..a82c0e5 100644 --- a/test/ai.py +++ b/test/ai.py @@ -1,8 +1,8 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import AiResponse +from box_sdk_gen.schemas.ai_response import AiResponse from box_sdk_gen.managers.ai import CreateAiAskMode diff --git a/test/auth.py b/test/auth.py index 4c40a7e..48910c1 100644 --- a/test/auth.py +++ b/test/auth.py @@ -2,17 +2,19 @@ from typing import Optional -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.user_full import UserFull + +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import AccessToken +from box_sdk_gen.schemas.access_token import AccessToken -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent @@ -46,8 +48,6 @@ from box_sdk_gen.box.oauth import OAuthConfig -from box_sdk_gen.schemas import UserFull - from box_sdk_gen.box.jwt_auth import BoxJWTAuth from box_sdk_gen.box.jwt_auth import JWTConfig diff --git a/test/avatars.py b/test/avatars.py index 2f8e09b..021959a 100644 --- a/test/avatars.py +++ b/test/avatars.py @@ -2,9 +2,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import UserAvatar +from box_sdk_gen.schemas.user_avatar import UserAvatar from box_sdk_gen.internal.utils import ByteStream diff --git a/test/chunked_uploads.py b/test/chunked_uploads.py index 9c17406..ad46074 100644 --- a/test/chunked_uploads.py +++ b/test/chunked_uploads.py @@ -8,7 +8,7 @@ from test.commons import get_default_client -from box_sdk_gen.schemas import File +from box_sdk_gen.schemas.file import File client: BoxClient = get_default_client() diff --git a/test/classifications.py b/test/classifications.py index 0f2aeec..36b7677 100644 --- a/test/classifications.py +++ b/test/classifications.py @@ -2,7 +2,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import ClassificationTemplateFieldsOptionsField +from box_sdk_gen.schemas.classification_template import ( + ClassificationTemplateFieldsOptionsField, +) from box_sdk_gen.managers.classifications import UpdateClassificationRequestBody @@ -26,7 +28,7 @@ from test.commons import get_or_create_classification -from box_sdk_gen.schemas import ClassificationTemplate +from box_sdk_gen.schemas.classification_template import ClassificationTemplate client: BoxClient = get_default_client() diff --git a/test/client.py b/test/client.py index 4a35c67..2dfb528 100644 --- a/test/client.py +++ b/test/client.py @@ -4,7 +4,7 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull from box_sdk_gen.internal.utils import get_uuid diff --git a/test/collaboration_allowlist_entries.py b/test/collaboration_allowlist_entries.py index 270bf82..6d58f22 100644 --- a/test/collaboration_allowlist_entries.py +++ b/test/collaboration_allowlist_entries.py @@ -4,9 +4,13 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import CollaborationAllowlistEntries +from box_sdk_gen.schemas.collaboration_allowlist_entries import ( + CollaborationAllowlistEntries, +) -from box_sdk_gen.schemas import CollaborationAllowlistEntry +from box_sdk_gen.schemas.collaboration_allowlist_entry import ( + CollaborationAllowlistEntry, +) from box_sdk_gen.managers.collaboration_allowlist_entries import ( CreateCollaborationWhitelistEntryDirection, @@ -17,7 +21,7 @@ client: BoxClient = get_default_client() -def collaborationAllowlistEntries(): +def testCollaborationAllowlistEntries(): allowlist: CollaborationAllowlistEntries = ( client.collaboration_allowlist_entries.get_collaboration_whitelist_entries() ) diff --git a/test/collaboration_allowlist_exempt_targets.py b/test/collaboration_allowlist_exempt_targets.py index 2cbd6c8..ef5e062 100644 --- a/test/collaboration_allowlist_exempt_targets.py +++ b/test/collaboration_allowlist_exempt_targets.py @@ -4,11 +4,15 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import CollaborationAllowlistExemptTargets +from box_sdk_gen.schemas.collaboration_allowlist_exempt_targets import ( + CollaborationAllowlistExemptTargets, +) -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import CollaborationAllowlistExemptTarget +from box_sdk_gen.schemas.collaboration_allowlist_exempt_target import ( + CollaborationAllowlistExemptTarget, +) from box_sdk_gen.managers.collaboration_allowlist_exempt_targets import ( CreateCollaborationWhitelistExemptTargetUser, @@ -21,7 +25,7 @@ client: BoxClient = get_default_client() -def collaborationAllowlistExemptTargets(): +def testCollaborationAllowlistExemptTargets(): exempt_targets: CollaborationAllowlistExemptTargets = ( client.collaboration_allowlist_exempt_targets.get_collaboration_whitelist_exempt_targets() ) diff --git a/test/collections.py b/test/collections.py index de428b3..9e9dbc1 100644 --- a/test/collections.py +++ b/test/collections.py @@ -1,12 +1,12 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import Collections +from box_sdk_gen.schemas.collections import Collections -from box_sdk_gen.schemas import Collection +from box_sdk_gen.schemas.collection import Collection -from box_sdk_gen.schemas import Items +from box_sdk_gen.schemas.items import Items -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent diff --git a/test/comments.py b/test/comments.py index a1ccc5e..4afc35e 100644 --- a/test/comments.py +++ b/test/comments.py @@ -4,15 +4,15 @@ from box_sdk_gen.internal.utils import ByteStream -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import Comments +from box_sdk_gen.schemas.comments import Comments -from box_sdk_gen.schemas import CommentFull +from box_sdk_gen.schemas.comment_full import CommentFull from box_sdk_gen.managers.comments import CreateCommentItem @@ -27,7 +27,7 @@ client: BoxClient = get_default_client() -def comments(): +def testComments(): file_size: int = 256 file_name: str = get_uuid() file_byte_stream: ByteStream = generate_byte_stream(file_size) diff --git a/test/commons.py b/test/commons.py index a2931e2..36c958b 100644 --- a/test/commons.py +++ b/test/commons.py @@ -2,27 +2,29 @@ from typing import List -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.internal.utils import ByteStream -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import TermsOfServices +from box_sdk_gen.schemas.terms_of_services import TermsOfServices from box_sdk_gen.managers.terms_of_services import CreateTermsOfServiceStatus from box_sdk_gen.managers.terms_of_services import CreateTermsOfServiceTosType -from box_sdk_gen.schemas import ClassificationTemplateFieldsOptionsField +from box_sdk_gen.schemas.classification_template import ( + ClassificationTemplateFieldsOptionsField, +) from box_sdk_gen.managers.classifications import AddClassificationRequestBody @@ -38,11 +40,11 @@ from box_sdk_gen.managers.classifications import CreateClassificationTemplateFields -from box_sdk_gen.schemas import ShieldInformationBarrier +from box_sdk_gen.schemas.shield_information_barrier import ShieldInformationBarrier -from box_sdk_gen.schemas import ShieldInformationBarriers +from box_sdk_gen.schemas.shield_information_barriers import ShieldInformationBarriers -from box_sdk_gen.schemas import EnterpriseBase +from box_sdk_gen.schemas.enterprise_base import EnterpriseBase from box_sdk_gen.internal.utils import decode_base_64 @@ -54,9 +56,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import ClassificationTemplate +from box_sdk_gen.schemas.classification_template import ClassificationTemplate -from box_sdk_gen.schemas import TermsOfService +from box_sdk_gen.schemas.terms_of_service import TermsOfService from box_sdk_gen.box.jwt_auth import BoxJWTAuth diff --git a/test/device_pinners.py b/test/device_pinners.py index c48432f..05580ae 100644 --- a/test/device_pinners.py +++ b/test/device_pinners.py @@ -2,7 +2,7 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import DevicePinners +from box_sdk_gen.schemas.device_pinners import DevicePinners from box_sdk_gen.managers.device_pinners import GetEnterpriseDevicePinnersDirection diff --git a/test/downloads.py b/test/downloads.py index 2d30b7a..7b85395 100644 --- a/test/downloads.py +++ b/test/downloads.py @@ -4,13 +4,13 @@ from box_sdk_gen.internal.utils import ByteStream -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.internal.utils import get_uuid diff --git a/test/email_aliases.py b/test/email_aliases.py index 3f407ca..81e6d02 100644 --- a/test/email_aliases.py +++ b/test/email_aliases.py @@ -1,10 +1,10 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import EmailAliases +from box_sdk_gen.schemas.email_aliases import EmailAliases -from box_sdk_gen.schemas import EmailAlias +from box_sdk_gen.schemas.email_alias import EmailAlias from box_sdk_gen.internal.utils import get_uuid diff --git a/test/events.py b/test/events.py index db12a17..482ff38 100644 --- a/test/events.py +++ b/test/events.py @@ -2,27 +2,27 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import Events +from box_sdk_gen.schemas.events import Events -from box_sdk_gen.schemas import Event +from box_sdk_gen.schemas.event import Event from box_sdk_gen.managers.events import GetEventsStreamType from box_sdk_gen.managers.events import GetEventsEventType -from box_sdk_gen.schemas import RealtimeServers +from box_sdk_gen.schemas.realtime_servers import RealtimeServers -from box_sdk_gen.schemas import RealtimeServer +from box_sdk_gen.schemas.realtime_server import RealtimeServer from test.commons import get_default_client -from box_sdk_gen.schemas import EventSource +from box_sdk_gen.schemas.event_source import EventSource -from box_sdk_gen.schemas import File +from box_sdk_gen.schemas.file import File -from box_sdk_gen.schemas import Folder +from box_sdk_gen.schemas.folder import Folder -from box_sdk_gen.schemas import User +from box_sdk_gen.schemas.user import User client: BoxClient = get_default_client() diff --git a/test/file_classifications.py b/test/file_classifications.py index e13b532..7fcd578 100644 --- a/test/file_classifications.py +++ b/test/file_classifications.py @@ -4,7 +4,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import ClassificationTemplateFieldsOptionsField +from box_sdk_gen.schemas.classification_template import ( + ClassificationTemplateFieldsOptionsField, +) from box_sdk_gen.managers.classifications import AddClassificationRequestBody @@ -18,9 +20,9 @@ AddClassificationRequestBodyDataStaticConfigClassificationField, ) -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import Classification +from box_sdk_gen.schemas.classification import Classification from box_sdk_gen.managers.file_classifications import ( UpdateClassificationOnFileRequestBody, @@ -36,7 +38,7 @@ from test.commons import get_or_create_classification -from box_sdk_gen.schemas import ClassificationTemplate +from box_sdk_gen.schemas.classification_template import ClassificationTemplate client: BoxClient = get_default_client() diff --git a/test/file_metadata.py b/test/file_metadata.py index 9cf0e40..e657917 100644 --- a/test/file_metadata.py +++ b/test/file_metadata.py @@ -6,11 +6,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import Metadatas +from box_sdk_gen.schemas.metadatas import Metadatas -from box_sdk_gen.schemas import MetadataFull +from box_sdk_gen.schemas.metadata_full import MetadataFull from box_sdk_gen.managers.file_metadata import CreateFileMetadataByIdScope diff --git a/test/file_requests.py b/test/file_requests.py index ebe4d1d..2beef15 100644 --- a/test/file_requests.py +++ b/test/file_requests.py @@ -4,7 +4,7 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FileRequest +from box_sdk_gen.schemas.file_request import FileRequest from box_sdk_gen.managers.file_requests import CreateFileRequestCopyFolder diff --git a/test/file_version_legal_holds.py b/test/file_version_legal_holds.py index 4d8c86c..06cdbb8 100644 --- a/test/file_version_legal_holds.py +++ b/test/file_version_legal_holds.py @@ -1,6 +1,6 @@ import pytest -from box_sdk_gen.schemas import FileVersionLegalHolds +from box_sdk_gen.schemas.file_version_legal_holds import FileVersionLegalHolds from box_sdk_gen.internal.utils import generate_byte_stream @@ -13,7 +13,7 @@ client: BoxClient = get_default_client() -def getFileVersionLegalHolds(): +def testGetFileVersionLegalHolds(): policy_id: str = '1234567890' file_version_legal_holds: FileVersionLegalHolds = ( client.file_version_legal_holds.get_file_version_legal_holds(policy_id) @@ -22,7 +22,7 @@ def getFileVersionLegalHolds(): assert file_version_legal_holds_count >= 0 -def getFileVersionLegalHoldById(): +def testGetFileVersionLegalHoldById(): file_version_legal_hold_id: str = '987654321' with pytest.raises(Exception): client.file_version_legal_holds.get_file_version_legal_hold_by_id( diff --git a/test/file_version_retentions.py b/test/file_version_retentions.py index d39962c..d3c9392 100644 --- a/test/file_version_retentions.py +++ b/test/file_version_retentions.py @@ -1,6 +1,6 @@ from box_sdk_gen.internal.utils import to_string -from box_sdk_gen.schemas import RetentionPolicy +from box_sdk_gen.schemas.retention_policy import RetentionPolicy from box_sdk_gen.managers.retention_policies import CreateRetentionPolicyPolicyType @@ -10,9 +10,9 @@ from box_sdk_gen.managers.retention_policies import CreateRetentionPolicyRetentionType -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import RetentionPolicyAssignment +from box_sdk_gen.schemas.retention_policy_assignment import RetentionPolicyAssignment from box_sdk_gen.managers.retention_policy_assignments import ( CreateRetentionPolicyAssignmentAssignTo, @@ -22,19 +22,19 @@ CreateRetentionPolicyAssignmentAssignToTypeField, ) -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.managers.uploads import UploadFileVersionAttributes -from box_sdk_gen.schemas import FileVersionRetentions +from box_sdk_gen.schemas.file_version_retentions import FileVersionRetentions -from box_sdk_gen.schemas import FileVersionRetention +from box_sdk_gen.schemas.file_version_retention import FileVersionRetention from box_sdk_gen.internal.utils import generate_byte_stream diff --git a/test/file_versions.py b/test/file_versions.py index 90dde65..b0ba826 100644 --- a/test/file_versions.py +++ b/test/file_versions.py @@ -1,18 +1,18 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.managers.uploads import UploadFileVersionAttributes -from box_sdk_gen.schemas import FileVersions +from box_sdk_gen.schemas.file_versions import FileVersions -from box_sdk_gen.schemas import FileVersionFull +from box_sdk_gen.schemas.file_version_full import FileVersionFull from box_sdk_gen.managers.file_versions import PromoteFileVersionType diff --git a/test/file_watermarks.py b/test/file_watermarks.py index b712e8b..b15a3bb 100644 --- a/test/file_watermarks.py +++ b/test/file_watermarks.py @@ -2,15 +2,15 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import Watermark +from box_sdk_gen.schemas.watermark import Watermark from box_sdk_gen.managers.file_watermarks import UpdateFileWatermarkWatermark diff --git a/test/files.py b/test/files.py index f7965a7..916191d 100644 --- a/test/files.py +++ b/test/files.py @@ -2,9 +2,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes @@ -12,7 +12,7 @@ from box_sdk_gen.managers.files import GetFileThumbnailByIdExtension -from box_sdk_gen.schemas import TrashFile +from box_sdk_gen.schemas.trash_file import TrashFile from box_sdk_gen.managers.files import CopyFileParent diff --git a/test/folder_classifications.py b/test/folder_classifications.py index 26e0560..5e66e3c 100644 --- a/test/folder_classifications.py +++ b/test/folder_classifications.py @@ -4,7 +4,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import ClassificationTemplateFieldsOptionsField +from box_sdk_gen.schemas.classification_template import ( + ClassificationTemplateFieldsOptionsField, +) from box_sdk_gen.managers.classifications import AddClassificationRequestBody @@ -18,9 +20,9 @@ AddClassificationRequestBodyDataStaticConfigClassificationField, ) -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import Classification +from box_sdk_gen.schemas.classification import Classification from box_sdk_gen.managers.folder_classifications import ( UpdateClassificationOnFolderRequestBody, @@ -36,7 +38,7 @@ from test.commons import get_or_create_classification -from box_sdk_gen.schemas import ClassificationTemplate +from box_sdk_gen.schemas.classification_template import ClassificationTemplate client: BoxClient = get_default_client() diff --git a/test/folder_locks.py b/test/folder_locks.py index e16f3f2..965c4a7 100644 --- a/test/folder_locks.py +++ b/test/folder_locks.py @@ -2,11 +2,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import FolderLocks +from box_sdk_gen.schemas.folder_locks import FolderLocks -from box_sdk_gen.schemas import FolderLock +from box_sdk_gen.schemas.folder_lock import FolderLock from box_sdk_gen.managers.folder_locks import CreateFolderLockLockedOperations diff --git a/test/folder_metadata.py b/test/folder_metadata.py index a34f66c..34f55e2 100644 --- a/test/folder_metadata.py +++ b/test/folder_metadata.py @@ -6,11 +6,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import Metadatas +from box_sdk_gen.schemas.metadatas import Metadatas -from box_sdk_gen.schemas import MetadataFull +from box_sdk_gen.schemas.metadata_full import MetadataFull from box_sdk_gen.managers.folder_metadata import CreateFolderMetadataByIdScope @@ -26,7 +26,7 @@ from box_sdk_gen.managers.folder_metadata import DeleteFolderMetadataByIdScope -from box_sdk_gen.schemas import MetadataTemplate +from box_sdk_gen.schemas.metadata_template import MetadataTemplate from box_sdk_gen.managers.metadata_templates import CreateMetadataTemplateFields diff --git a/test/folder_watermarks.py b/test/folder_watermarks.py index d8055b4..b20dc40 100644 --- a/test/folder_watermarks.py +++ b/test/folder_watermarks.py @@ -2,11 +2,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent -from box_sdk_gen.schemas import Watermark +from box_sdk_gen.schemas.watermark import Watermark from box_sdk_gen.managers.folder_watermarks import UpdateFolderWatermarkWatermark diff --git a/test/folders.py b/test/folders.py index 01e4086..d973ca1 100644 --- a/test/folders.py +++ b/test/folders.py @@ -2,7 +2,7 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent @@ -10,7 +10,7 @@ from box_sdk_gen.managers.folders import UpdateFolderByIdParent -from box_sdk_gen.schemas import Items +from box_sdk_gen.schemas.items import Items from box_sdk_gen.internal.utils import get_uuid diff --git a/test/groups.py b/test/groups.py index 3e5b41d..2a068ad 100644 --- a/test/groups.py +++ b/test/groups.py @@ -2,9 +2,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import Groups +from box_sdk_gen.schemas.groups import Groups -from box_sdk_gen.schemas import GroupFull +from box_sdk_gen.schemas.group_full import GroupFull from box_sdk_gen.internal.utils import get_uuid diff --git a/test/integration_mappings.py b/test/integration_mappings.py index 4e0249b..672b488 100644 --- a/test/integration_mappings.py +++ b/test/integration_mappings.py @@ -2,15 +2,19 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent -from box_sdk_gen.schemas import IntegrationMappingPartnerItemSlack +from box_sdk_gen.schemas.integration_mapping_partner_item_slack import ( + IntegrationMappingPartnerItemSlack, +) -from box_sdk_gen.schemas import IntegrationMappingBoxItemSlack +from box_sdk_gen.schemas.integration_mapping_box_item_slack import ( + IntegrationMappingBoxItemSlack, +) -from box_sdk_gen.schemas import IntegrationMappings +from box_sdk_gen.schemas.integration_mappings import IntegrationMappings from box_sdk_gen.internal.utils import generate_byte_stream diff --git a/test/invites.py b/test/invites.py index 56701aa..6368952 100644 --- a/test/invites.py +++ b/test/invites.py @@ -2,9 +2,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import Invite +from box_sdk_gen.schemas.invite import Invite from box_sdk_gen.managers.invites import CreateInviteEnterprise diff --git a/test/legal_hold_policies.py b/test/legal_hold_policies.py index cfb62ff..20aa230 100644 --- a/test/legal_hold_policies.py +++ b/test/legal_hold_policies.py @@ -1,6 +1,6 @@ -from box_sdk_gen.schemas import LegalHoldPolicy +from box_sdk_gen.schemas.legal_hold_policy import LegalHoldPolicy -from box_sdk_gen.schemas import LegalHoldPolicies +from box_sdk_gen.schemas.legal_hold_policies import LegalHoldPolicies from box_sdk_gen.internal.utils import DateTime diff --git a/test/legal_hold_policy_assignments.py b/test/legal_hold_policy_assignments.py index 61c2c78..f0f29da 100644 --- a/test/legal_hold_policy_assignments.py +++ b/test/legal_hold_policy_assignments.py @@ -4,11 +4,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import LegalHoldPolicy +from box_sdk_gen.schemas.legal_hold_policy import LegalHoldPolicy -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import LegalHoldPolicyAssignment +from box_sdk_gen.schemas.legal_hold_policy_assignment import LegalHoldPolicyAssignment from box_sdk_gen.managers.legal_hold_policy_assignments import ( CreateLegalHoldPolicyAssignmentAssignTo, @@ -18,7 +18,7 @@ CreateLegalHoldPolicyAssignmentAssignToTypeField, ) -from box_sdk_gen.schemas import LegalHoldPolicyAssignments +from box_sdk_gen.schemas.legal_hold_policy_assignments import LegalHoldPolicyAssignments from box_sdk_gen.internal.utils import get_uuid diff --git a/test/list_collaborations.py b/test/list_collaborations.py index 5f09b09..ba39e90 100644 --- a/test/list_collaborations.py +++ b/test/list_collaborations.py @@ -2,13 +2,13 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import GroupFull +from box_sdk_gen.schemas.group_full import GroupFull -from box_sdk_gen.schemas import Collaboration +from box_sdk_gen.schemas.collaboration import Collaboration from box_sdk_gen.managers.user_collaborations import CreateCollaborationItem @@ -22,7 +22,7 @@ from box_sdk_gen.managers.user_collaborations import CreateCollaborationRole -from box_sdk_gen.schemas import Collaborations +from box_sdk_gen.schemas.collaborations import Collaborations from box_sdk_gen.managers.list_collaborations import GetCollaborationsStatus diff --git a/test/memberships.py b/test/memberships.py index b51e453..98104a8 100644 --- a/test/memberships.py +++ b/test/memberships.py @@ -4,13 +4,13 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import GroupMemberships +from box_sdk_gen.schemas.group_memberships import GroupMemberships -from box_sdk_gen.schemas import GroupFull +from box_sdk_gen.schemas.group_full import GroupFull -from box_sdk_gen.schemas import GroupMembership +from box_sdk_gen.schemas.group_membership import GroupMembership from box_sdk_gen.managers.memberships import CreateGroupMembershipUser diff --git a/test/metadata_cascade_policies.py b/test/metadata_cascade_policies.py index 87645c6..881a504 100644 --- a/test/metadata_cascade_policies.py +++ b/test/metadata_cascade_policies.py @@ -12,15 +12,15 @@ CreateMetadataTemplateFieldsTypeField, ) -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import MetadataCascadePolicy +from box_sdk_gen.schemas.metadata_cascade_policy import MetadataCascadePolicy from box_sdk_gen.managers.metadata_cascade_policies import ( CreateMetadataCascadePolicyScope, ) -from box_sdk_gen.schemas import MetadataCascadePolicies +from box_sdk_gen.schemas.metadata_cascade_policies import MetadataCascadePolicies from box_sdk_gen.managers.metadata_cascade_policies import ( ApplyMetadataCascadePolicyConflictResolution, diff --git a/test/metadata_templates.py b/test/metadata_templates.py index 5170fbb..20b5673 100644 --- a/test/metadata_templates.py +++ b/test/metadata_templates.py @@ -2,7 +2,7 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import MetadataTemplate +from box_sdk_gen.schemas.metadata_template import MetadataTemplate from box_sdk_gen.managers.metadata_templates import CreateMetadataTemplateFields @@ -20,13 +20,13 @@ from box_sdk_gen.managers.metadata_templates import GetMetadataTemplateScope -from box_sdk_gen.schemas import MetadataTemplates +from box_sdk_gen.schemas.metadata_templates import MetadataTemplates from box_sdk_gen.managers.metadata_templates import DeleteMetadataTemplateScope -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import MetadataFull +from box_sdk_gen.schemas.metadata_full import MetadataFull from box_sdk_gen.managers.file_metadata import CreateFileMetadataByIdScope diff --git a/test/recent_items.py b/test/recent_items.py index 293c404..2e171f1 100644 --- a/test/recent_items.py +++ b/test/recent_items.py @@ -1,6 +1,6 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import RecentItems +from box_sdk_gen.schemas.recent_items import RecentItems from box_sdk_gen.internal.utils import decode_base_64 diff --git a/test/retention_policies.py b/test/retention_policies.py index 576fd2d..9bc19e2 100644 --- a/test/retention_policies.py +++ b/test/retention_policies.py @@ -1,4 +1,4 @@ -from box_sdk_gen.schemas import RetentionPolicy +from box_sdk_gen.schemas.retention_policy import RetentionPolicy from box_sdk_gen.managers.retention_policies import CreateRetentionPolicyPolicyType @@ -8,7 +8,7 @@ from box_sdk_gen.managers.retention_policies import CreateRetentionPolicyRetentionType -from box_sdk_gen.schemas import RetentionPolicies +from box_sdk_gen.schemas.retention_policies import RetentionPolicies from box_sdk_gen.internal.utils import get_uuid diff --git a/test/retention_policy_assignments.py b/test/retention_policy_assignments.py index d8ab78f..cf9d39b 100644 --- a/test/retention_policy_assignments.py +++ b/test/retention_policy_assignments.py @@ -1,6 +1,6 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import RetentionPolicy +from box_sdk_gen.schemas.retention_policy import RetentionPolicy from box_sdk_gen.managers.retention_policies import CreateRetentionPolicyPolicyType @@ -10,21 +10,21 @@ from box_sdk_gen.managers.retention_policies import CreateRetentionPolicyRetentionType -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.managers.uploads import UploadFileVersionAttributes -from box_sdk_gen.schemas import RetentionPolicyAssignment +from box_sdk_gen.schemas.retention_policy_assignment import RetentionPolicyAssignment from box_sdk_gen.managers.retention_policy_assignments import ( CreateRetentionPolicyAssignmentAssignTo, @@ -34,9 +34,9 @@ CreateRetentionPolicyAssignmentAssignToTypeField, ) -from box_sdk_gen.schemas import RetentionPolicyAssignments +from box_sdk_gen.schemas.retention_policy_assignments import RetentionPolicyAssignments -from box_sdk_gen.schemas import FilesUnderRetention +from box_sdk_gen.schemas.files_under_retention import FilesUnderRetention from box_sdk_gen.internal.utils import decode_base_64 diff --git a/test/search.py b/test/search.py index 8512c20..ff388ef 100644 --- a/test/search.py +++ b/test/search.py @@ -4,7 +4,7 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import MetadataTemplate +from box_sdk_gen.schemas.metadata_template import MetadataTemplate from box_sdk_gen.managers.metadata_templates import CreateMetadataTemplateFields @@ -12,25 +12,27 @@ CreateMetadataTemplateFieldsTypeField, ) -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import MetadataFull +from box_sdk_gen.schemas.metadata_full import MetadataFull from box_sdk_gen.managers.file_metadata import CreateFileMetadataByIdScope -from box_sdk_gen.schemas import MetadataQueryResults +from box_sdk_gen.schemas.metadata_query_results import MetadataQueryResults from box_sdk_gen.managers.metadata_templates import DeleteMetadataTemplateScope -from box_sdk_gen.schemas import SearchResults +from box_sdk_gen.schemas.search_results import SearchResults -from box_sdk_gen.schemas import SearchResultsWithSharedLinks +from box_sdk_gen.schemas.search_results_with_shared_links import ( + SearchResultsWithSharedLinks, +) from box_sdk_gen.managers.search import SearchForContentTrashContent @@ -38,9 +40,9 @@ CreateMetadataTemplateFieldsOptionsField, ) -from box_sdk_gen.schemas import MetadataFilter +from box_sdk_gen.schemas.metadata_filter import MetadataFilter -from box_sdk_gen.schemas import MetadataFilterScopeField +from box_sdk_gen.schemas.metadata_filter import MetadataFilterScopeField from box_sdk_gen.internal.utils import get_uuid @@ -50,9 +52,13 @@ from test.commons import get_default_client -from box_sdk_gen.schemas import MetadataFieldFilterDateRange +from box_sdk_gen.schemas.metadata_field_filter_date_range import ( + MetadataFieldFilterDateRange, +) -from box_sdk_gen.schemas import MetadataFieldFilterFloatRange +from box_sdk_gen.schemas.metadata_field_filter_float_range import ( + MetadataFieldFilterFloatRange, +) client: BoxClient = get_default_client() diff --git a/test/session_termination.py b/test/session_termination.py index 0ccd3c2..92fb129 100644 --- a/test/session_termination.py +++ b/test/session_termination.py @@ -1,10 +1,10 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import SessionTerminationMessage +from box_sdk_gen.schemas.session_termination_message import SessionTerminationMessage -from box_sdk_gen.schemas import GroupFull +from box_sdk_gen.schemas.group_full import GroupFull from box_sdk_gen.internal.utils import get_uuid diff --git a/test/shared_links_files.py b/test/shared_links_files.py index 1a13c9e..be4ec25 100644 --- a/test/shared_links_files.py +++ b/test/shared_links_files.py @@ -4,7 +4,7 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes @@ -16,7 +16,7 @@ AddShareLinkToFileSharedLinkAccessField, ) -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.managers.shared_links_files import UpdateSharedLinkOnFileSharedLink diff --git a/test/shared_links_folders.py b/test/shared_links_folders.py index 1ae8889..fd38abf 100644 --- a/test/shared_links_folders.py +++ b/test/shared_links_folders.py @@ -4,7 +4,7 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent diff --git a/test/shared_links_web_links.py b/test/shared_links_web_links.py index 26cce19..ef7848f 100644 --- a/test/shared_links_web_links.py +++ b/test/shared_links_web_links.py @@ -4,9 +4,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import WebLink +from box_sdk_gen.schemas.web_link import WebLink from box_sdk_gen.managers.web_links import CreateWebLinkParent diff --git a/test/shield_information_barrier_reports.py b/test/shield_information_barrier_reports.py index 2874be4..5616cb2 100644 --- a/test/shield_information_barrier_reports.py +++ b/test/shield_information_barrier_reports.py @@ -1,12 +1,22 @@ from box_sdk_gen.internal.utils import to_string -from box_sdk_gen.schemas import ShieldInformationBarrierReports +from box_sdk_gen.schemas.shield_information_barrier import ShieldInformationBarrier -from box_sdk_gen.schemas import ShieldInformationBarrierReport +from box_sdk_gen.schemas.shield_information_barrier_reports import ( + ShieldInformationBarrierReports, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBase +from box_sdk_gen.schemas.shield_information_barrier_report import ( + ShieldInformationBarrierReport, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBaseTypeField +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) + +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBaseTypeField, +) from box_sdk_gen.internal.utils import get_env_var @@ -14,8 +24,6 @@ from test.commons import get_or_create_shield_information_barrier -from box_sdk_gen.schemas import ShieldInformationBarrier - from box_sdk_gen.client import BoxClient diff --git a/test/shield_information_barrier_segment_members.py b/test/shield_information_barrier_segment_members.py index 5f85bde..76fdab5 100644 --- a/test/shield_information_barrier_segment_members.py +++ b/test/shield_information_barrier_segment_members.py @@ -2,15 +2,23 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import ShieldInformationBarrier +from box_sdk_gen.schemas.shield_information_barrier import ShieldInformationBarrier -from box_sdk_gen.schemas import ShieldInformationBarrierSegment +from box_sdk_gen.schemas.shield_information_barrier_segment import ( + ShieldInformationBarrierSegment, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBase +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBaseTypeField +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBaseTypeField, +) -from box_sdk_gen.schemas import ShieldInformationBarrierSegmentMember +from box_sdk_gen.schemas.shield_information_barrier_segment_member import ( + ShieldInformationBarrierSegmentMember, +) from box_sdk_gen.managers.shield_information_barrier_segment_members import ( CreateShieldInformationBarrierSegmentMemberShieldInformationBarrierSegment, @@ -20,9 +28,11 @@ CreateShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentTypeField, ) -from box_sdk_gen.schemas import UserBase +from box_sdk_gen.schemas.user_base import UserBase -from box_sdk_gen.schemas import ShieldInformationBarrierSegmentMembers +from box_sdk_gen.schemas.shield_information_barrier_segment_members import ( + ShieldInformationBarrierSegmentMembers, +) from box_sdk_gen.internal.utils import get_env_var diff --git a/test/shield_information_barrier_segment_restrictions.py b/test/shield_information_barrier_segment_restrictions.py index f9be284..0cae888 100644 --- a/test/shield_information_barrier_segment_restrictions.py +++ b/test/shield_information_barrier_segment_restrictions.py @@ -2,15 +2,23 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import ShieldInformationBarrier +from box_sdk_gen.schemas.shield_information_barrier import ShieldInformationBarrier -from box_sdk_gen.schemas import ShieldInformationBarrierSegment +from box_sdk_gen.schemas.shield_information_barrier_segment import ( + ShieldInformationBarrierSegment, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBase +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBaseTypeField +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBaseTypeField, +) -from box_sdk_gen.schemas import ShieldInformationBarrierSegmentRestriction +from box_sdk_gen.schemas.shield_information_barrier_segment_restriction import ( + ShieldInformationBarrierSegmentRestriction, +) from box_sdk_gen.managers.shield_information_barrier_segment_restrictions import ( CreateShieldInformationBarrierSegmentRestrictionType, @@ -32,7 +40,9 @@ CreateShieldInformationBarrierSegmentRestrictionRestrictedSegmentTypeField, ) -from box_sdk_gen.schemas import ShieldInformationBarrierSegmentRestrictions +from box_sdk_gen.schemas.shield_information_barrier_segment_restrictions import ( + ShieldInformationBarrierSegmentRestrictions, +) from box_sdk_gen.internal.utils import get_env_var diff --git a/test/shield_information_barrier_segments.py b/test/shield_information_barrier_segments.py index fd34e7e..5422ce8 100644 --- a/test/shield_information_barrier_segments.py +++ b/test/shield_information_barrier_segments.py @@ -4,15 +4,23 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import ShieldInformationBarrier +from box_sdk_gen.schemas.shield_information_barrier import ShieldInformationBarrier -from box_sdk_gen.schemas import ShieldInformationBarrierSegment +from box_sdk_gen.schemas.shield_information_barrier_segment import ( + ShieldInformationBarrierSegment, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBase +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBase, +) -from box_sdk_gen.schemas import ShieldInformationBarrierBaseTypeField +from box_sdk_gen.schemas.shield_information_barrier_base import ( + ShieldInformationBarrierBaseTypeField, +) -from box_sdk_gen.schemas import ShieldInformationBarrierSegments +from box_sdk_gen.schemas.shield_information_barrier_segments import ( + ShieldInformationBarrierSegments, +) from box_sdk_gen.internal.utils import get_env_var diff --git a/test/shield_information_barriers.py b/test/shield_information_barriers.py index 9f7acbb..d6e6e0f 100644 --- a/test/shield_information_barriers.py +++ b/test/shield_information_barriers.py @@ -4,9 +4,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import ShieldInformationBarrier +from box_sdk_gen.schemas.shield_information_barrier import ShieldInformationBarrier -from box_sdk_gen.schemas import ShieldInformationBarriers +from box_sdk_gen.schemas.shield_information_barriers import ShieldInformationBarriers from box_sdk_gen.managers.shield_information_barriers import ( UpdateShieldInformationBarrierStatusStatus, diff --git a/test/sign_requests.py b/test/sign_requests.py index 34d5f85..e9ec9a4 100644 --- a/test/sign_requests.py +++ b/test/sign_requests.py @@ -2,21 +2,21 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import SignRequest +from box_sdk_gen.schemas.sign_request import SignRequest -from box_sdk_gen.schemas import FileBase +from box_sdk_gen.schemas.file_base import FileBase -from box_sdk_gen.schemas import SignRequestCreateSigner +from box_sdk_gen.schemas.sign_request_create_signer import SignRequestCreateSigner -from box_sdk_gen.schemas import FolderMini +from box_sdk_gen.schemas.folder_mini import FolderMini -from box_sdk_gen.schemas import SignRequestPrefillTag +from box_sdk_gen.schemas.sign_request_prefill_tag import SignRequestPrefillTag -from box_sdk_gen.schemas import SignRequests +from box_sdk_gen.schemas.sign_requests import SignRequests from box_sdk_gen.internal.utils import get_uuid diff --git a/test/sign_templates.py b/test/sign_templates.py index 512efea..7009c73 100644 --- a/test/sign_templates.py +++ b/test/sign_templates.py @@ -1,8 +1,8 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import SignTemplates +from box_sdk_gen.schemas.sign_templates import SignTemplates -from box_sdk_gen.schemas import SignTemplate +from box_sdk_gen.schemas.sign_template import SignTemplate from box_sdk_gen.internal.utils import decode_base_64 diff --git a/test/skills.py b/test/skills.py index a2ce619..9c9b29e 100644 --- a/test/skills.py +++ b/test/skills.py @@ -1,24 +1,24 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import SkillCardsMetadata +from box_sdk_gen.schemas.skill_cards_metadata import SkillCardsMetadata -from box_sdk_gen.schemas import KeywordSkillCardTypeField +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCardTypeField -from box_sdk_gen.schemas import KeywordSkillCardSkillCardTypeField +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCardSkillCardTypeField -from box_sdk_gen.schemas import KeywordSkillCardSkillCardTitleField +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCardSkillCardTitleField -from box_sdk_gen.schemas import KeywordSkillCardSkillField +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCardSkillField -from box_sdk_gen.schemas import KeywordSkillCardSkillTypeField +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCardSkillTypeField -from box_sdk_gen.schemas import KeywordSkillCardInvocationField +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCardInvocationField -from box_sdk_gen.schemas import KeywordSkillCardInvocationTypeField +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCardInvocationTypeField -from box_sdk_gen.schemas import KeywordSkillCardEntriesField +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCardEntriesField from box_sdk_gen.managers.skills import UpdateBoxSkillCardsOnFileRequestBody @@ -30,7 +30,7 @@ from test.commons import upload_new_file -from box_sdk_gen.schemas import KeywordSkillCard +from box_sdk_gen.schemas.keyword_skill_card import KeywordSkillCard client: BoxClient = get_default_client() diff --git a/test/storage_policicy_assignments.py b/test/storage_policicy_assignments.py index 8316797..0cc004e 100644 --- a/test/storage_policicy_assignments.py +++ b/test/storage_policicy_assignments.py @@ -1,8 +1,8 @@ from box_sdk_gen.internal.utils import to_string -from box_sdk_gen.schemas import StoragePolicyAssignment +from box_sdk_gen.schemas.storage_policy_assignment import StoragePolicyAssignment -from box_sdk_gen.schemas import StoragePolicyAssignments +from box_sdk_gen.schemas.storage_policy_assignments import StoragePolicyAssignments from box_sdk_gen.managers.storage_policy_assignments import ( GetStoragePolicyAssignmentsResolvedForType, @@ -20,11 +20,11 @@ CreateStoragePolicyAssignmentAssignedToTypeField, ) -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import StoragePolicies +from box_sdk_gen.schemas.storage_policies import StoragePolicies -from box_sdk_gen.schemas import StoragePolicy +from box_sdk_gen.schemas.storage_policy import StoragePolicy from box_sdk_gen.managers.storage_policy_assignments import ( UpdateStoragePolicyAssignmentByIdStoragePolicy, diff --git a/test/storage_policies.py b/test/storage_policies.py index 45ff6db..aef0edc 100644 --- a/test/storage_policies.py +++ b/test/storage_policies.py @@ -2,9 +2,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import StoragePolicies +from box_sdk_gen.schemas.storage_policies import StoragePolicies -from box_sdk_gen.schemas import StoragePolicy +from box_sdk_gen.schemas.storage_policy import StoragePolicy from box_sdk_gen.internal.utils import get_env_var diff --git a/test/task_assignments.py b/test/task_assignments.py index 2bc088e..61e67e5 100644 --- a/test/task_assignments.py +++ b/test/task_assignments.py @@ -4,11 +4,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.internal.utils import DateTime -from box_sdk_gen.schemas import Task +from box_sdk_gen.schemas.task import Task from box_sdk_gen.managers.tasks import CreateTaskItem @@ -18,9 +18,9 @@ from box_sdk_gen.managers.tasks import CreateTaskCompletionRule -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import TaskAssignment +from box_sdk_gen.schemas.task_assignment import TaskAssignment from box_sdk_gen.managers.task_assignments import CreateTaskAssignmentTask @@ -28,7 +28,7 @@ from box_sdk_gen.managers.task_assignments import CreateTaskAssignmentAssignTo -from box_sdk_gen.schemas import TaskAssignments +from box_sdk_gen.schemas.task_assignments import TaskAssignments from box_sdk_gen.managers.task_assignments import ( UpdateTaskAssignmentByIdResolutionState, diff --git a/test/tasks.py b/test/tasks.py index f3e53fd..1a5b625 100644 --- a/test/tasks.py +++ b/test/tasks.py @@ -1,16 +1,16 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.internal.utils import DateTime -from box_sdk_gen.schemas import Task +from box_sdk_gen.schemas.task import Task from box_sdk_gen.managers.tasks import CreateTaskItem @@ -20,7 +20,7 @@ from box_sdk_gen.managers.tasks import CreateTaskCompletionRule -from box_sdk_gen.schemas import Tasks +from box_sdk_gen.schemas.tasks import Tasks from box_sdk_gen.internal.utils import get_uuid diff --git a/test/terms_of_service_user_statuses.py b/test/terms_of_service_user_statuses.py index d6b4127..a9be3ca 100644 --- a/test/terms_of_service_user_statuses.py +++ b/test/terms_of_service_user_statuses.py @@ -2,11 +2,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import TermsOfService +from box_sdk_gen.schemas.terms_of_service import TermsOfService -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import TermsOfServiceUserStatus +from box_sdk_gen.schemas.terms_of_service_user_status import TermsOfServiceUserStatus from box_sdk_gen.managers.terms_of_service_user_statuses import ( CreateTermsOfServiceStatusForUserTos, @@ -16,7 +16,9 @@ CreateTermsOfServiceStatusForUserUser, ) -from box_sdk_gen.schemas import TermsOfServiceUserStatuses +from box_sdk_gen.schemas.terms_of_service_user_statuses import ( + TermsOfServiceUserStatuses, +) from test.commons import get_default_client_with_user_subject diff --git a/test/terms_of_services.py b/test/terms_of_services.py index 083faa0..83f0227 100644 --- a/test/terms_of_services.py +++ b/test/terms_of_services.py @@ -2,11 +2,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import TermsOfService +from box_sdk_gen.schemas.terms_of_service import TermsOfService from box_sdk_gen.managers.terms_of_services import UpdateTermsOfServiceByIdStatus -from box_sdk_gen.schemas import TermsOfServices +from box_sdk_gen.schemas.terms_of_services import TermsOfServices from test.commons import get_default_client diff --git a/test/transfer.py b/test/transfer.py index 4a3a7e4..4ce2e26 100644 --- a/test/transfer.py +++ b/test/transfer.py @@ -1,8 +1,8 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.transfer import TransferOwnedFolderOwnedBy diff --git a/test/trashed_files.py b/test/trashed_files.py index de77483..cc8bbcd 100644 --- a/test/trashed_files.py +++ b/test/trashed_files.py @@ -6,17 +6,17 @@ from box_sdk_gen.internal.utils import ByteStream -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import TrashFile +from box_sdk_gen.schemas.trash_file import TrashFile -from box_sdk_gen.schemas import TrashFileRestored +from box_sdk_gen.schemas.trash_file_restored import TrashFileRestored from box_sdk_gen.internal.utils import get_uuid diff --git a/test/trashed_folders.py b/test/trashed_folders.py index 5a77de5..c03e65f 100644 --- a/test/trashed_folders.py +++ b/test/trashed_folders.py @@ -2,13 +2,13 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent -from box_sdk_gen.schemas import TrashFolder +from box_sdk_gen.schemas.trash_folder import TrashFolder -from box_sdk_gen.schemas import TrashFolderRestored +from box_sdk_gen.schemas.trash_folder_restored import TrashFolderRestored from box_sdk_gen.internal.utils import get_uuid diff --git a/test/trashed_items.py b/test/trashed_items.py index 945095a..feffdbc 100644 --- a/test/trashed_items.py +++ b/test/trashed_items.py @@ -1,8 +1,8 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import Items +from box_sdk_gen.schemas.items import Items from test.commons import get_default_client diff --git a/test/trashed_web_links.py b/test/trashed_web_links.py index 99ec035..9ebcfb5 100644 --- a/test/trashed_web_links.py +++ b/test/trashed_web_links.py @@ -4,15 +4,15 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import WebLink +from box_sdk_gen.schemas.web_link import WebLink from box_sdk_gen.managers.web_links import CreateWebLinkParent -from box_sdk_gen.schemas import TrashWebLink +from box_sdk_gen.schemas.trash_web_link import TrashWebLink -from box_sdk_gen.schemas import TrashWebLinkRestored +from box_sdk_gen.schemas.trash_web_link_restored import TrashWebLinkRestored from box_sdk_gen.internal.utils import get_uuid diff --git a/test/uploads.py b/test/uploads.py index 4c4e90c..43f9e67 100644 --- a/test/uploads.py +++ b/test/uploads.py @@ -1,12 +1,12 @@ from box_sdk_gen.internal.utils import ByteStream -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull from box_sdk_gen.managers.uploads import UploadFileVersionAttributes diff --git a/test/user_collaborations.py b/test/user_collaborations.py index 5eea220..2137899 100644 --- a/test/user_collaborations.py +++ b/test/user_collaborations.py @@ -4,11 +4,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import Collaboration +from box_sdk_gen.schemas.collaboration import Collaboration from box_sdk_gen.managers.user_collaborations import CreateCollaborationItem diff --git a/test/users.py b/test/users.py index 0c5a5e1..28cf384 100644 --- a/test/users.py +++ b/test/users.py @@ -2,9 +2,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import Users +from box_sdk_gen.schemas.users import Users -from box_sdk_gen.schemas import UserFull +from box_sdk_gen.schemas.user_full import UserFull from box_sdk_gen.internal.utils import get_uuid diff --git a/test/webhooks.py b/test/webhooks.py index faa8ea2..d76b0b3 100644 --- a/test/webhooks.py +++ b/test/webhooks.py @@ -4,11 +4,11 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.managers.folders import CreateFolderParent -from box_sdk_gen.schemas import Webhook +from box_sdk_gen.schemas.webhook import Webhook from box_sdk_gen.managers.webhooks import CreateWebhookTarget @@ -16,7 +16,7 @@ from box_sdk_gen.managers.webhooks import CreateWebhookTriggers -from box_sdk_gen.schemas import Webhooks +from box_sdk_gen.schemas.webhooks import Webhooks from box_sdk_gen.internal.utils import get_uuid diff --git a/test/weblinks.py b/test/weblinks.py index 31c17f8..ff053b0 100644 --- a/test/weblinks.py +++ b/test/weblinks.py @@ -2,9 +2,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull -from box_sdk_gen.schemas import WebLink +from box_sdk_gen.schemas.web_link import WebLink from box_sdk_gen.managers.web_links import CreateWebLinkParent diff --git a/test/workflows.py b/test/workflows.py index 9e3a25f..764888e 100644 --- a/test/workflows.py +++ b/test/workflows.py @@ -2,17 +2,17 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import Files +from box_sdk_gen.schemas.files import Files from box_sdk_gen.managers.uploads import UploadFileAttributes from box_sdk_gen.managers.uploads import UploadFileAttributesParentField -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import Workflows +from box_sdk_gen.schemas.workflows import Workflows -from box_sdk_gen.schemas import Workflow +from box_sdk_gen.schemas.workflow import Workflow from box_sdk_gen.managers.workflows import StartWorkflowType diff --git a/test/zip_downloads.py b/test/zip_downloads.py index 6d6deae..59a0880 100644 --- a/test/zip_downloads.py +++ b/test/zip_downloads.py @@ -2,9 +2,9 @@ from box_sdk_gen.client import BoxClient -from box_sdk_gen.schemas import FileFull +from box_sdk_gen.schemas.file_full import FileFull -from box_sdk_gen.schemas import FolderFull +from box_sdk_gen.schemas.folder_full import FolderFull from box_sdk_gen.internal.utils import ByteStream @@ -12,11 +12,11 @@ from box_sdk_gen.managers.zip_downloads import DownloadZipItemsTypeField -from box_sdk_gen.schemas import ZipDownload +from box_sdk_gen.schemas.zip_download import ZipDownload from box_sdk_gen.managers.zip_downloads import CreateZipDownloadItems -from box_sdk_gen.schemas import ZipDownloadStatus +from box_sdk_gen.schemas.zip_download_status import ZipDownloadStatus from test.commons import get_default_client