files-com 1.6.208__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of files-com might be problematic. Click here for more details.

Files changed (126) hide show
  1. README.md +758 -0
  2. _VERSION +1 -0
  3. files_com-1.6.208.dist-info/METADATA +770 -0
  4. files_com-1.6.208.dist-info/RECORD +126 -0
  5. files_com-1.6.208.dist-info/WHEEL +5 -0
  6. files_com-1.6.208.dist-info/licenses/LICENSE +21 -0
  7. files_com-1.6.208.dist-info/top_level.txt +1 -0
  8. files_sdk/__init__.py +309 -0
  9. files_sdk/api.py +63 -0
  10. files_sdk/api_client.py +336 -0
  11. files_sdk/error.py +2981 -0
  12. files_sdk/list_obj.py +42 -0
  13. files_sdk/models/__init__.py +119 -0
  14. files_sdk/models/account_line_item.py +51 -0
  15. files_sdk/models/action.py +49 -0
  16. files_sdk/models/action_notification_export.py +153 -0
  17. files_sdk/models/action_notification_export_result.py +88 -0
  18. files_sdk/models/agent_push_update.py +44 -0
  19. files_sdk/models/api_key.py +318 -0
  20. files_sdk/models/api_request_log.py +105 -0
  21. files_sdk/models/app.py +89 -0
  22. files_sdk/models/as2_incoming_message.py +117 -0
  23. files_sdk/models/as2_outgoing_message.py +113 -0
  24. files_sdk/models/as2_partner.py +415 -0
  25. files_sdk/models/as2_station.py +282 -0
  26. files_sdk/models/auto.py +36 -0
  27. files_sdk/models/automation.py +823 -0
  28. files_sdk/models/automation_log.py +94 -0
  29. files_sdk/models/automation_run.py +112 -0
  30. files_sdk/models/bandwidth_snapshot.py +91 -0
  31. files_sdk/models/behavior.py +340 -0
  32. files_sdk/models/bundle.py +686 -0
  33. files_sdk/models/bundle_action.py +93 -0
  34. files_sdk/models/bundle_download.py +94 -0
  35. files_sdk/models/bundle_notification.py +252 -0
  36. files_sdk/models/bundle_path.py +37 -0
  37. files_sdk/models/bundle_recipient.py +133 -0
  38. files_sdk/models/bundle_registration.py +82 -0
  39. files_sdk/models/child_site_management_policy.py +278 -0
  40. files_sdk/models/clickwrap.py +268 -0
  41. files_sdk/models/dns_record.py +59 -0
  42. files_sdk/models/email_incoming_message.py +102 -0
  43. files_sdk/models/email_log.py +84 -0
  44. files_sdk/models/errors.py +37 -0
  45. files_sdk/models/exavault_api_request_log.py +102 -0
  46. files_sdk/models/external_event.py +148 -0
  47. files_sdk/models/file.py +851 -0
  48. files_sdk/models/file_action.py +39 -0
  49. files_sdk/models/file_comment.py +191 -0
  50. files_sdk/models/file_comment_reaction.py +125 -0
  51. files_sdk/models/file_migration.py +69 -0
  52. files_sdk/models/file_migration_log.py +88 -0
  53. files_sdk/models/file_upload_part.py +54 -0
  54. files_sdk/models/folder.py +186 -0
  55. files_sdk/models/form_field.py +43 -0
  56. files_sdk/models/form_field_set.py +265 -0
  57. files_sdk/models/ftp_action_log.py +104 -0
  58. files_sdk/models/gpg_key.py +333 -0
  59. files_sdk/models/group.py +338 -0
  60. files_sdk/models/group_user.py +235 -0
  61. files_sdk/models/history.py +236 -0
  62. files_sdk/models/history_export.py +238 -0
  63. files_sdk/models/history_export_result.py +98 -0
  64. files_sdk/models/holiday_region.py +58 -0
  65. files_sdk/models/image.py +37 -0
  66. files_sdk/models/inbound_s3_log.py +95 -0
  67. files_sdk/models/inbox_recipient.py +124 -0
  68. files_sdk/models/inbox_registration.py +79 -0
  69. files_sdk/models/inbox_upload.py +80 -0
  70. files_sdk/models/invoice.py +91 -0
  71. files_sdk/models/invoice_line_item.py +51 -0
  72. files_sdk/models/ip_address.py +119 -0
  73. files_sdk/models/key_lifecycle_rule.py +243 -0
  74. files_sdk/models/lock.py +174 -0
  75. files_sdk/models/message.py +244 -0
  76. files_sdk/models/message_comment.py +223 -0
  77. files_sdk/models/message_comment_reaction.py +181 -0
  78. files_sdk/models/message_reaction.py +170 -0
  79. files_sdk/models/notification.py +451 -0
  80. files_sdk/models/outbound_connection_log.py +105 -0
  81. files_sdk/models/partner.py +307 -0
  82. files_sdk/models/payment.py +91 -0
  83. files_sdk/models/payment_line_item.py +42 -0
  84. files_sdk/models/permission.py +190 -0
  85. files_sdk/models/preview.py +40 -0
  86. files_sdk/models/priority.py +63 -0
  87. files_sdk/models/project.py +205 -0
  88. files_sdk/models/public_hosting_request_log.py +101 -0
  89. files_sdk/models/public_ip_address.py +42 -0
  90. files_sdk/models/public_key.py +269 -0
  91. files_sdk/models/remote_bandwidth_snapshot.py +91 -0
  92. files_sdk/models/remote_mount_backend.py +438 -0
  93. files_sdk/models/remote_server.py +1854 -0
  94. files_sdk/models/remote_server_configuration_file.py +73 -0
  95. files_sdk/models/remote_server_credential.py +855 -0
  96. files_sdk/models/request.py +184 -0
  97. files_sdk/models/restore.py +142 -0
  98. files_sdk/models/scim_log.py +88 -0
  99. files_sdk/models/session.py +100 -0
  100. files_sdk/models/settings_change.py +71 -0
  101. files_sdk/models/sftp_action_log.py +108 -0
  102. files_sdk/models/sftp_host_key.py +215 -0
  103. files_sdk/models/share_group.py +228 -0
  104. files_sdk/models/share_group_member.py +41 -0
  105. files_sdk/models/siem_http_destination.py +1074 -0
  106. files_sdk/models/site.py +1289 -0
  107. files_sdk/models/snapshot.py +255 -0
  108. files_sdk/models/sso_strategy.py +168 -0
  109. files_sdk/models/status.py +42 -0
  110. files_sdk/models/style.py +152 -0
  111. files_sdk/models/sync.py +588 -0
  112. files_sdk/models/sync_log.py +86 -0
  113. files_sdk/models/sync_run.py +124 -0
  114. files_sdk/models/usage_by_top_level_dir.py +41 -0
  115. files_sdk/models/usage_daily_snapshot.py +93 -0
  116. files_sdk/models/usage_snapshot.py +73 -0
  117. files_sdk/models/user.py +1232 -0
  118. files_sdk/models/user_cipher_use.py +91 -0
  119. files_sdk/models/user_lifecycle_rule.py +355 -0
  120. files_sdk/models/user_request.py +166 -0
  121. files_sdk/models/user_sftp_client_use.py +68 -0
  122. files_sdk/models/web_dav_action_log.py +104 -0
  123. files_sdk/models/webhook_test.py +116 -0
  124. files_sdk/models/workspace.py +202 -0
  125. files_sdk/path_util.py +42 -0
  126. files_sdk/util.py +34 -0
@@ -0,0 +1,1289 @@
1
+ import builtins # noqa: F401
2
+ from files_sdk.models.usage_snapshot import UsageSnapshot
3
+ from files_sdk.api import Api # noqa: F401
4
+ from files_sdk.error import ( # noqa: F401
5
+ InvalidParameterError,
6
+ MissingParameterError,
7
+ NotImplementedError,
8
+ )
9
+
10
+
11
+ class Site:
12
+ default_attributes = {
13
+ "id": None, # int64 - Site Id
14
+ "name": None, # string - Site name
15
+ "additional_text_file_types": None, # array(string) - Additional extensions that are considered text files
16
+ "allowed_2fa_method_sms": None, # boolean - Is SMS two factor authentication allowed?
17
+ "allowed_2fa_method_totp": None, # boolean - Is TOTP two factor authentication allowed?
18
+ "allowed_2fa_method_webauthn": None, # boolean - Is WebAuthn two factor authentication allowed?
19
+ "allowed_2fa_method_yubi": None, # boolean - Is yubikey two factor authentication allowed?
20
+ "allowed_2fa_method_email": None, # boolean - Is OTP via email two factor authentication allowed?
21
+ "allowed_2fa_method_static": None, # boolean - Is OTP via static codes for two factor authentication allowed?
22
+ "allowed_2fa_method_bypass_for_ftp_sftp_dav": None, # boolean - Are users allowed to configure their two factor authentication to be bypassed for FTP/SFTP/WebDAV?
23
+ "admin_user_id": None, # int64 - User ID for the main site administrator
24
+ "admins_bypass_locked_subfolders": None, # boolean - Allow admins to bypass the locked subfolders setting.
25
+ "allow_bundle_names": None, # boolean - Are manual Bundle names allowed?
26
+ "allowed_countries": None, # string - Comma separated list of allowed Country codes
27
+ "allowed_ips": None, # string - List of allowed IP addresses
28
+ "always_mkdir_parents": None, # boolean - Create parent directories if they do not exist during uploads? This is primarily used to work around broken upload clients that assume servers will perform this step.
29
+ "as2_message_retention_days": None, # int64 - Number of days to retain AS2 messages (incoming and outgoing).
30
+ "ask_about_overwrites": None, # boolean - If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
31
+ "bundle_activity_notifications": None, # string - Do Bundle owners receive activity notifications?
32
+ "bundle_expiration": None, # int64 - Site-wide Bundle expiration in days
33
+ "bundle_not_found_message": None, # string - Custom error message to show when bundle is not found.
34
+ "bundle_password_required": None, # boolean - Do Bundles require password protection?
35
+ "bundle_recipient_blacklist_domains": None, # array(string) - List of email domains to disallow when entering a Bundle/Inbox recipients
36
+ "bundle_recipient_blacklist_free_email_domains": None, # boolean - Disallow free email domains for Bundle/Inbox recipients?
37
+ "bundle_registration_notifications": None, # string - Do Bundle owners receive registration notification?
38
+ "bundle_require_registration": None, # boolean - Do Bundles require registration?
39
+ "bundle_require_share_recipient": None, # boolean - Do Bundles require recipients for sharing?
40
+ "bundle_require_note": None, # boolean - Do Bundles require internal notes?
41
+ "bundle_send_shared_receipts": None, # boolean - Do Bundle creators receive receipts of invitations?
42
+ "bundle_upload_receipt_notifications": None, # string - Do Bundle uploaders receive upload confirmation notifications?
43
+ "bundle_watermark_attachment": None, # Image - Preview watermark image applied to all bundle items.
44
+ "bundle_watermark_value": None, # object - Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
45
+ "calculate_file_checksums_crc32": None, # boolean - Calculate CRC32 checksums for files?
46
+ "calculate_file_checksums_md5": None, # boolean - Calculate MD5 checksums for files?
47
+ "calculate_file_checksums_sha1": None, # boolean - Calculate SHA1 checksums for files?
48
+ "calculate_file_checksums_sha256": None, # boolean - Calculate SHA256 checksums for files?
49
+ "uploads_via_email_authentication": None, # boolean - Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
50
+ "color2_left": None, # string - Page link and button color
51
+ "color2_link": None, # string - Top bar link color
52
+ "color2_text": None, # string - Page link and button color
53
+ "color2_top": None, # string - Top bar background color
54
+ "color2_top_text": None, # string - Top bar text color
55
+ "contact_name": None, # string - Site main contact name
56
+ "created_at": None, # date-time - Time this site was created
57
+ "currency": None, # string - Preferred currency
58
+ "custom_namespace": None, # boolean - Is this site using a custom namespace for users?
59
+ "dav_enabled": None, # boolean - Is WebDAV enabled?
60
+ "dav_user_root_enabled": None, # boolean - Use user FTP roots also for WebDAV?
61
+ "days_to_retain_backups": None, # int64 - Number of days to keep deleted files
62
+ "document_edits_in_bundle_allowed": None, # boolean - If true, allow public viewers of Bundles with full permissions to use document editing integrations.
63
+ "default_time_zone": None, # string - Site default time zone
64
+ "desktop_app": None, # boolean - Is the desktop app enabled?
65
+ "desktop_app_session_ip_pinning": None, # boolean - Is desktop app session IP pinning enabled?
66
+ "desktop_app_session_lifetime": None, # int64 - Desktop app session lifetime (in hours)
67
+ "legacy_checksums_mode": None, # boolean - Use legacy checksums mode?
68
+ "migrate_remote_server_sync_to_sync": None, # boolean - If true, we will migrate all remote server syncs to the new Sync model.
69
+ "mobile_app": None, # boolean - Is the mobile app enabled?
70
+ "mobile_app_session_ip_pinning": None, # boolean - Is mobile app session IP pinning enabled?
71
+ "mobile_app_session_lifetime": None, # int64 - Mobile app session lifetime (in hours)
72
+ "disallowed_countries": None, # string - Comma separated list of disallowed Country codes
73
+ "disable_files_certificate_generation": None, # boolean - If set, Files.com will not set the CAA records required to generate future SSL certificates for this domain.
74
+ "disable_notifications": None, # boolean - Are notifications disabled?
75
+ "disable_password_reset": None, # boolean - Is password reset disabled?
76
+ "domain": None, # string - Custom domain
77
+ "domain_hsts_header": None, # boolean - Send HSTS (HTTP Strict Transport Security) header when visitors access the site via a custom domain?
78
+ "domain_letsencrypt_chain": None, # string - Letsencrypt chain to use when registering SSL Certificate for domain.
79
+ "email": None, # email - Main email for this site
80
+ "ftp_enabled": None, # boolean - Is FTP enabled?
81
+ "reply_to_email": None, # email - Reply-to email for this site
82
+ "non_sso_groups_allowed": None, # boolean - If true, groups can be manually created / modified / deleted by Site Admins. Otherwise, groups can only be managed via your SSO provider.
83
+ "non_sso_users_allowed": None, # boolean - If true, users can be manually created / modified / deleted by Site Admins. Otherwise, users can only be managed via your SSO provider.
84
+ "folder_permissions_groups_only": None, # boolean - If true, permissions for this site must be bound to a group (not a user).
85
+ "hipaa": None, # boolean - Is there a signed HIPAA BAA between Files.com and this site?
86
+ "icon128": None, # Image - Branded icon 128x128
87
+ "icon16": None, # Image - Branded icon 16x16
88
+ "icon32": None, # Image - Branded icon 32x32
89
+ "icon48": None, # Image - Branded icon 48x48
90
+ "immutable_files_set_at": None, # date-time - Can files be modified?
91
+ "include_password_in_welcome_email": None, # boolean - Include password in emails to new users?
92
+ "language": None, # string - Site default language
93
+ "ldap_base_dn": None, # string - Base DN for looking up users in LDAP server
94
+ "ldap_domain": None, # string - Domain name that will be appended to usernames
95
+ "ldap_enabled": None, # boolean - Main LDAP setting: is LDAP enabled?
96
+ "ldap_group_action": None, # string - Should we sync groups from LDAP server?
97
+ "ldap_group_exclusion": None, # string - Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
98
+ "ldap_group_inclusion": None, # string - Comma or newline separated list of group names (with optional wildcards) to include when syncing.
99
+ "ldap_host": None, # string - LDAP host
100
+ "ldap_host_2": None, # string - LDAP backup host
101
+ "ldap_host_3": None, # string - LDAP backup host
102
+ "ldap_port": None, # int64 - LDAP port
103
+ "ldap_secure": None, # boolean - Use secure LDAP?
104
+ "ldap_type": None, # string - LDAP type
105
+ "ldap_user_action": None, # string - Should we sync users from LDAP server?
106
+ "ldap_user_include_groups": None, # string - Comma or newline separated list of group names (with optional wildcards) - if provided, only users in these groups will be added or synced.
107
+ "ldap_username": None, # string - Username for signing in to LDAP server.
108
+ "ldap_username_field": None, # string - LDAP username field
109
+ "login_help_text": None, # string - Login help text
110
+ "logo": None, # Image - Branded logo
111
+ "login_page_background_image": None, # Image - Branded login page background
112
+ "max_prior_passwords": None, # int64 - Number of prior passwords to disallow
113
+ "managed_site_settings": None, # object - List of site settings managed by the parent site
114
+ "motd_text": None, # string - A message to show users when they connect via FTP or SFTP.
115
+ "motd_use_for_ftp": None, # boolean - Show message to users connecting via FTP
116
+ "motd_use_for_sftp": None, # boolean - Show message to users connecting via SFTP
117
+ "next_billing_amount": None, # double - Next billing amount
118
+ "next_billing_date": None, # string - Next billing date
119
+ "office_integration_available": None, # boolean - If true, allows users to use a document editing integration.
120
+ "office_integration_type": None, # string - Which document editing integration to support. Files.com Editor or Microsoft Office for the Web.
121
+ "oncehub_link": None, # string - Link to scheduling a meeting with our Sales team
122
+ "opt_out_global": None, # boolean - Use servers in the USA only?
123
+ "overdue": None, # boolean - Is this site's billing overdue?
124
+ "password_min_length": None, # int64 - Shortest password length for users
125
+ "password_require_letter": None, # boolean - Require a letter in passwords?
126
+ "password_require_mixed": None, # boolean - Require lower and upper case letters in passwords?
127
+ "password_require_number": None, # boolean - Require a number in passwords?
128
+ "password_require_special": None, # boolean - Require special characters in password?
129
+ "password_require_unbreached": None, # boolean - Require passwords that have not been previously breached? (see https://haveibeenpwned.com/)
130
+ "password_requirements_apply_to_bundles": None, # boolean - Require bundles' passwords, and passwords for other items (inboxes, public shares, etc.) to conform to the same requirements as users' passwords?
131
+ "password_validity_days": None, # int64 - Number of days password is valid
132
+ "phone": None, # string - Site phone number
133
+ "pin_all_remote_servers_to_site_region": None, # boolean - If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
134
+ "prevent_root_permissions_for_non_site_admins": None, # boolean - If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
135
+ "protocol_access_groups_only": None, # boolean - If true, protocol access permissions on users will be ignored, and only protocol access permissions set on Groups will be honored. Make sure that your current user is a member of a group with API permission when changing this value to avoid locking yourself out of your site.
136
+ "require_2fa": None, # boolean - Require two-factor authentication for all users?
137
+ "require_2fa_stop_time": None, # date-time - If set, requirement for two-factor authentication has been scheduled to end on this date-time.
138
+ "revoke_bundle_access_on_disable_or_delete": None, # boolean - Auto-removes bundles for disabled/deleted users and enforces bundle expiry within user access period.
139
+ "require_2fa_user_type": None, # string - What type of user is required to use two-factor authentication (when require_2fa is set to `true` for this site)?
140
+ "require_logout_from_bundles_and_inboxes": None, # boolean - If true, we will hide the 'Remember Me' box on Inbox and Bundle registration pages, requiring that the user logout and log back in every time they visit the page.
141
+ "session": None, # Session - Current session
142
+ "sftp_enabled": None, # boolean - Is SFTP enabled?
143
+ "sftp_host_key_type": None, # string - Sftp Host Key Type
144
+ "active_sftp_host_key_id": None, # int64 - Id of the currently selected custom SFTP Host Key
145
+ "sftp_insecure_ciphers": None, # boolean - If true, we will allow weak and known insecure ciphers to be used for SFTP connections. Enabling this setting severely weakens the security of your site and it is not recommend, except as a last resort for compatibility.
146
+ "sftp_insecure_diffie_hellman": None, # boolean - If true, we will allow weak Diffie Hellman parameters to be used within ciphers for SFTP that are otherwise on our secure list. This has the effect of making the cipher weaker than our normal threshold for security, but is required to support certain legacy or broken SSH and MFT clients. Enabling this weakens security, but not nearly as much as enabling the full `sftp_insecure_ciphers` option.
147
+ "sftp_user_root_enabled": None, # boolean - Use user FTP roots also for SFTP?
148
+ "sharing_enabled": None, # boolean - Allow bundle creation
149
+ "show_user_notifications_log_in_link": None, # boolean - Show log in link in user notifications?
150
+ "show_request_access_link": None, # boolean - Show request access link for users without access? Currently unused.
151
+ "site_footer": None, # string - Custom site footer text for authenticated pages
152
+ "site_header": None, # string - Custom site header text for authenticated pages
153
+ "site_public_footer": None, # string - Custom site footer text for public pages
154
+ "site_public_header": None, # string - Custom site header text for public pages
155
+ "smtp_address": None, # string - SMTP server hostname or IP
156
+ "smtp_authentication": None, # string - SMTP server authentication type
157
+ "smtp_from": None, # string - From address to use when mailing through custom SMTP
158
+ "smtp_port": None, # int64 - SMTP server port
159
+ "smtp_username": None, # string - SMTP server username
160
+ "session_expiry_minutes": None, # int64 - Session expiry in minutes
161
+ "snapshot_sharing_enabled": None, # boolean - Allow snapshot share links creation
162
+ "ssl_required": None, # boolean - Is SSL required? Disabling this is insecure.
163
+ "subdomain": None, # string - Site subdomain
164
+ "switch_to_plan_date": None, # date-time - If switching plans, when does the new plan take effect?
165
+ "trial_days_left": None, # int64 - Number of days left in trial
166
+ "trial_until": None, # date-time - When does this Site trial expire?
167
+ "use_dedicated_ips_for_smtp": None, # boolean - If using custom SMTP, should we use dedicated IPs to deliver emails?
168
+ "use_provided_modified_at": None, # boolean - Allow uploaders to set `provided_modified_at` for uploaded files?
169
+ "user": None, # User - User of current session
170
+ "user_lockout": None, # boolean - Will users be locked out after incorrect login attempts?
171
+ "user_lockout_lock_period": None, # int64 - How many hours to lock user out for failed password?
172
+ "user_lockout_tries": None, # int64 - Number of login tries within `user_lockout_within` hours before users are locked out
173
+ "user_lockout_within": None, # int64 - Number of hours for user lockout window
174
+ "user_requests_enabled": None, # boolean - Enable User Requests feature
175
+ "user_requests_notify_admins": None, # boolean - Send email to site admins when a user request is received?
176
+ "users_can_create_api_keys": None, # boolean - Allow users to create their own API keys?
177
+ "users_can_create_ssh_keys": None, # boolean - Allow users to create their own SSH keys?
178
+ "welcome_custom_text": None, # string - Custom text send in user welcome email
179
+ "email_footer_custom_text": None, # string - Custom footer text for system-generated emails. Supports standard strftime date/time patterns like %Y (4-digit year), %m (month), %d (day).
180
+ "welcome_email_cc": None, # email - Include this email in welcome emails if enabled
181
+ "welcome_email_subject": None, # string - Include this email subject in welcome emails if enabled
182
+ "welcome_email_enabled": None, # boolean - Will the welcome email be sent to new users?
183
+ "welcome_screen": None, # string - Does the welcome screen appear?
184
+ "windows_mode_ftp": None, # boolean - Does FTP user Windows emulation mode?
185
+ "group_admins_can_set_user_password": None, # boolean - Allow group admins set password authentication method
186
+ }
187
+
188
+ def __init__(self, attributes=None, options=None):
189
+ if not isinstance(attributes, dict):
190
+ attributes = {}
191
+ if not isinstance(options, dict):
192
+ options = {}
193
+ self.set_attributes(attributes)
194
+ self.options = options
195
+
196
+ def set_attributes(self, attributes):
197
+ for attribute, default_value in Site.default_attributes.items():
198
+ setattr(self, attribute, attributes.get(attribute, default_value))
199
+
200
+ def get_attributes(self):
201
+ return {
202
+ k: getattr(self, k, None)
203
+ for k in Site.default_attributes
204
+ if getattr(self, k, None) is not None
205
+ }
206
+
207
+
208
+ def get(params=None, options=None):
209
+ if not isinstance(params, dict):
210
+ params = {}
211
+ if not isinstance(options, dict):
212
+ options = {}
213
+ response, options = Api.send_request("GET", "/site", params, options)
214
+ return Site(response.data, options)
215
+
216
+
217
+ def get_usage(params=None, options=None):
218
+ if not isinstance(params, dict):
219
+ params = {}
220
+ if not isinstance(options, dict):
221
+ options = {}
222
+ response, options = Api.send_request("GET", "/site/usage", params, options)
223
+ return UsageSnapshot(response.data, options)
224
+
225
+
226
+ # Parameters:
227
+ # name - string - Site name
228
+ # subdomain - string - Site subdomain
229
+ # domain - string - Custom domain
230
+ # domain_hsts_header - boolean - Send HSTS (HTTP Strict Transport Security) header when visitors access the site via a custom domain?
231
+ # domain_letsencrypt_chain - string - Letsencrypt chain to use when registering SSL Certificate for domain.
232
+ # email - string - Main email for this site
233
+ # reply_to_email - string - Reply-to email for this site
234
+ # allow_bundle_names - boolean - Are manual Bundle names allowed?
235
+ # bundle_expiration - int64 - Site-wide Bundle expiration in days
236
+ # welcome_email_enabled - boolean - Will the welcome email be sent to new users?
237
+ # ask_about_overwrites - boolean - If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
238
+ # show_request_access_link - boolean - Show request access link for users without access? Currently unused.
239
+ # always_mkdir_parents - boolean - Create parent directories if they do not exist during uploads? This is primarily used to work around broken upload clients that assume servers will perform this step.
240
+ # welcome_email_cc - string - Include this email in welcome emails if enabled
241
+ # welcome_email_subject - string - Include this email subject in welcome emails if enabled
242
+ # welcome_custom_text - string - Custom text send in user welcome email
243
+ # language - string - Site default language
244
+ # windows_mode_ftp - boolean - Does FTP user Windows emulation mode?
245
+ # default_time_zone - string - Site default time zone
246
+ # desktop_app - boolean - Is the desktop app enabled?
247
+ # desktop_app_session_ip_pinning - boolean - Is desktop app session IP pinning enabled?
248
+ # desktop_app_session_lifetime - int64 - Desktop app session lifetime (in hours)
249
+ # mobile_app - boolean - Is the mobile app enabled?
250
+ # mobile_app_session_ip_pinning - boolean - Is mobile app session IP pinning enabled?
251
+ # mobile_app_session_lifetime - int64 - Mobile app session lifetime (in hours)
252
+ # folder_permissions_groups_only - boolean - If true, permissions for this site must be bound to a group (not a user).
253
+ # welcome_screen - string - Does the welcome screen appear?
254
+ # office_integration_available - boolean - If true, allows users to use a document editing integration.
255
+ # office_integration_type - string - Which document editing integration to support. Files.com Editor or Microsoft Office for the Web.
256
+ # pin_all_remote_servers_to_site_region - boolean - If true, we will ensure that all internal communications with any remote server are made through the primary region of the site. This setting overrides individual remote server settings.
257
+ # motd_text - string - A message to show users when they connect via FTP or SFTP.
258
+ # motd_use_for_ftp - boolean - Show message to users connecting via FTP
259
+ # motd_use_for_sftp - boolean - Show message to users connecting via SFTP
260
+ # left_navigation_visibility - object - Visibility settings for account navigation
261
+ # additional_text_file_types - array(string) - Additional extensions that are considered text files
262
+ # bundle_require_note - boolean - Do Bundles require internal notes?
263
+ # bundle_send_shared_receipts - boolean - Do Bundle creators receive receipts of invitations?
264
+ # calculate_file_checksums_crc32 - boolean - Calculate CRC32 checksums for files?
265
+ # calculate_file_checksums_md5 - boolean - Calculate MD5 checksums for files?
266
+ # calculate_file_checksums_sha1 - boolean - Calculate SHA1 checksums for files?
267
+ # calculate_file_checksums_sha256 - boolean - Calculate SHA256 checksums for files?
268
+ # legacy_checksums_mode - boolean - Use legacy checksums mode?
269
+ # migrate_remote_server_sync_to_sync - boolean - If true, we will migrate all remote server syncs to the new Sync model.
270
+ # as2_message_retention_days - int64 - Number of days to retain AS2 messages (incoming and outgoing).
271
+ # session_expiry_minutes - int64 - Session expiry in minutes
272
+ # ssl_required - boolean - Is SSL required? Disabling this is insecure.
273
+ # sftp_insecure_ciphers - boolean - If true, we will allow weak and known insecure ciphers to be used for SFTP connections. Enabling this setting severely weakens the security of your site and it is not recommend, except as a last resort for compatibility.
274
+ # sftp_insecure_diffie_hellman - boolean - If true, we will allow weak Diffie Hellman parameters to be used within ciphers for SFTP that are otherwise on our secure list. This has the effect of making the cipher weaker than our normal threshold for security, but is required to support certain legacy or broken SSH and MFT clients. Enabling this weakens security, but not nearly as much as enabling the full `sftp_insecure_ciphers` option.
275
+ # disable_files_certificate_generation - boolean - If set, Files.com will not set the CAA records required to generate future SSL certificates for this domain.
276
+ # user_lockout - boolean - Will users be locked out after incorrect login attempts?
277
+ # user_lockout_tries - int64 - Number of login tries within `user_lockout_within` hours before users are locked out
278
+ # user_lockout_within - int64 - Number of hours for user lockout window
279
+ # user_lockout_lock_period - int64 - How many hours to lock user out for failed password?
280
+ # include_password_in_welcome_email - boolean - Include password in emails to new users?
281
+ # allowed_countries - string - Comma separated list of allowed Country codes
282
+ # allowed_ips - string - List of allowed IP addresses
283
+ # disallowed_countries - string - Comma separated list of disallowed Country codes
284
+ # days_to_retain_backups - int64 - Number of days to keep deleted files
285
+ # max_prior_passwords - int64 - Number of prior passwords to disallow
286
+ # password_validity_days - int64 - Number of days password is valid
287
+ # password_min_length - int64 - Shortest password length for users
288
+ # password_require_letter - boolean - Require a letter in passwords?
289
+ # password_require_mixed - boolean - Require lower and upper case letters in passwords?
290
+ # password_require_special - boolean - Require special characters in password?
291
+ # password_require_number - boolean - Require a number in passwords?
292
+ # password_require_unbreached - boolean - Require passwords that have not been previously breached? (see https://haveibeenpwned.com/)
293
+ # require_logout_from_bundles_and_inboxes - boolean - If true, we will hide the 'Remember Me' box on Inbox and Bundle registration pages, requiring that the user logout and log back in every time they visit the page.
294
+ # dav_user_root_enabled - boolean - Use user FTP roots also for WebDAV?
295
+ # sftp_user_root_enabled - boolean - Use user FTP roots also for SFTP?
296
+ # disable_password_reset - boolean - Is password reset disabled?
297
+ # immutable_files - boolean - Are files protected from modification?
298
+ # bundle_not_found_message - string - Custom error message to show when bundle is not found.
299
+ # bundle_password_required - boolean - Do Bundles require password protection?
300
+ # bundle_require_registration - boolean - Do Bundles require registration?
301
+ # bundle_require_share_recipient - boolean - Do Bundles require recipients for sharing?
302
+ # bundle_registration_notifications - string - Do Bundle owners receive registration notification?
303
+ # bundle_activity_notifications - string - Do Bundle owners receive activity notifications?
304
+ # bundle_upload_receipt_notifications - string - Do Bundle uploaders receive upload confirmation notifications?
305
+ # document_edits_in_bundle_allowed - boolean - If true, allow public viewers of Bundles with full permissions to use document editing integrations.
306
+ # password_requirements_apply_to_bundles - boolean - Require bundles' passwords, and passwords for other items (inboxes, public shares, etc.) to conform to the same requirements as users' passwords?
307
+ # prevent_root_permissions_for_non_site_admins - boolean - If true, we will prevent non-administrators from receiving any permissions directly on the root folder. This is commonly used to prevent the accidental application of permissions.
308
+ # opt_out_global - boolean - Use servers in the USA only?
309
+ # use_provided_modified_at - boolean - Allow uploaders to set `provided_modified_at` for uploaded files?
310
+ # custom_namespace - boolean - Is this site using a custom namespace for users?
311
+ # non_sso_groups_allowed - boolean - If true, groups can be manually created / modified / deleted by Site Admins. Otherwise, groups can only be managed via your SSO provider.
312
+ # non_sso_users_allowed - boolean - If true, users can be manually created / modified / deleted by Site Admins. Otherwise, users can only be managed via your SSO provider.
313
+ # sharing_enabled - boolean - Allow bundle creation
314
+ # snapshot_sharing_enabled - boolean - Allow snapshot share links creation
315
+ # user_requests_enabled - boolean - Enable User Requests feature
316
+ # user_requests_notify_admins - boolean - Send email to site admins when a user request is received?
317
+ # dav_enabled - boolean - Is WebDAV enabled?
318
+ # ftp_enabled - boolean - Is FTP enabled?
319
+ # sftp_enabled - boolean - Is SFTP enabled?
320
+ # users_can_create_api_keys - boolean - Allow users to create their own API keys?
321
+ # users_can_create_ssh_keys - boolean - Allow users to create their own SSH keys?
322
+ # show_user_notifications_log_in_link - boolean - Show log in link in user notifications?
323
+ # sftp_host_key_type - string - Sftp Host Key Type
324
+ # active_sftp_host_key_id - int64 - Id of the currently selected custom SFTP Host Key
325
+ # protocol_access_groups_only - boolean - If true, protocol access permissions on users will be ignored, and only protocol access permissions set on Groups will be honored. Make sure that your current user is a member of a group with API permission when changing this value to avoid locking yourself out of your site.
326
+ # revoke_bundle_access_on_disable_or_delete - boolean - Auto-removes bundles for disabled/deleted users and enforces bundle expiry within user access period.
327
+ # bundle_watermark_value - object - Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
328
+ # group_admins_can_set_user_password - boolean - Allow group admins set password authentication method
329
+ # bundle_recipient_blacklist_free_email_domains - boolean - Disallow free email domains for Bundle/Inbox recipients?
330
+ # bundle_recipient_blacklist_domains - array(string) - List of email domains to disallow when entering a Bundle/Inbox recipients
331
+ # admins_bypass_locked_subfolders - boolean - Allow admins to bypass the locked subfolders setting.
332
+ # allowed_2fa_method_sms - boolean - Is SMS two factor authentication allowed?
333
+ # allowed_2fa_method_totp - boolean - Is TOTP two factor authentication allowed?
334
+ # allowed_2fa_method_webauthn - boolean - Is WebAuthn two factor authentication allowed?
335
+ # allowed_2fa_method_yubi - boolean - Is yubikey two factor authentication allowed?
336
+ # allowed_2fa_method_email - boolean - Is OTP via email two factor authentication allowed?
337
+ # allowed_2fa_method_static - boolean - Is OTP via static codes for two factor authentication allowed?
338
+ # allowed_2fa_method_bypass_for_ftp_sftp_dav - boolean - Are users allowed to configure their two factor authentication to be bypassed for FTP/SFTP/WebDAV?
339
+ # require_2fa - boolean - Require two-factor authentication for all users?
340
+ # require_2fa_user_type - string - What type of user is required to use two-factor authentication (when require_2fa is set to `true` for this site)?
341
+ # color2_top - string - Top bar background color
342
+ # color2_left - string - Page link and button color
343
+ # color2_link - string - Top bar link color
344
+ # color2_text - string - Page link and button color
345
+ # color2_top_text - string - Top bar text color
346
+ # site_header - string - Custom site header text for authenticated pages
347
+ # site_footer - string - Custom site footer text for authenticated pages
348
+ # site_public_header - string - Custom site header text for public pages
349
+ # site_public_footer - string - Custom site footer text for public pages
350
+ # login_help_text - string - Login help text
351
+ # use_dedicated_ips_for_smtp - boolean - If using custom SMTP, should we use dedicated IPs to deliver emails?
352
+ # email_footer_custom_text - string - Custom footer text for system-generated emails. Supports standard strftime date/time patterns like %Y (4-digit year), %m (month), %d (day).
353
+ # smtp_address - string - SMTP server hostname or IP
354
+ # smtp_authentication - string - SMTP server authentication type
355
+ # smtp_from - string - From address to use when mailing through custom SMTP
356
+ # smtp_username - string - SMTP server username
357
+ # smtp_port - int64 - SMTP server port
358
+ # ldap_enabled - boolean - Main LDAP setting: is LDAP enabled?
359
+ # ldap_type - string - LDAP type
360
+ # ldap_host - string - LDAP host
361
+ # ldap_host_2 - string - LDAP backup host
362
+ # ldap_host_3 - string - LDAP backup host
363
+ # ldap_port - int64 - LDAP port
364
+ # ldap_secure - boolean - Use secure LDAP?
365
+ # ldap_username - string - Username for signing in to LDAP server.
366
+ # ldap_username_field - string - LDAP username field
367
+ # ldap_domain - string - Domain name that will be appended to usernames
368
+ # ldap_user_action - string - Should we sync users from LDAP server?
369
+ # ldap_group_action - string - Should we sync groups from LDAP server?
370
+ # ldap_user_include_groups - string - Comma or newline separated list of group names (with optional wildcards) - if provided, only users in these groups will be added or synced.
371
+ # ldap_group_exclusion - string - Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
372
+ # ldap_group_inclusion - string - Comma or newline separated list of group names (with optional wildcards) to include when syncing.
373
+ # ldap_base_dn - string - Base DN for looking up users in LDAP server
374
+ # uploads_via_email_authentication - boolean - Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
375
+ # icon16_file - file
376
+ # icon16_delete - boolean - If true, will delete the file stored in icon16
377
+ # icon32_file - file
378
+ # icon32_delete - boolean - If true, will delete the file stored in icon32
379
+ # icon48_file - file
380
+ # icon48_delete - boolean - If true, will delete the file stored in icon48
381
+ # icon128_file - file
382
+ # icon128_delete - boolean - If true, will delete the file stored in icon128
383
+ # logo_file - file
384
+ # logo_delete - boolean - If true, will delete the file stored in logo
385
+ # bundle_watermark_attachment_file - file
386
+ # bundle_watermark_attachment_delete - boolean - If true, will delete the file stored in bundle_watermark_attachment
387
+ # login_page_background_image_file - file
388
+ # login_page_background_image_delete - boolean - If true, will delete the file stored in login_page_background_image
389
+ # disable_2fa_with_delay - boolean - If set to true, we will begin the process of disabling 2FA on this site.
390
+ # ldap_password_change - string - New LDAP password.
391
+ # ldap_password_change_confirmation - string - Confirm new LDAP password.
392
+ # smtp_password - string - Password for SMTP server.
393
+ def update(params=None, options=None):
394
+ if not isinstance(params, dict):
395
+ params = {}
396
+ if not isinstance(options, dict):
397
+ options = {}
398
+ if "name" in params and not isinstance(params["name"], str):
399
+ raise InvalidParameterError("Bad parameter: name must be an str")
400
+ if "subdomain" in params and not isinstance(params["subdomain"], str):
401
+ raise InvalidParameterError("Bad parameter: subdomain must be an str")
402
+ if "domain" in params and not isinstance(params["domain"], str):
403
+ raise InvalidParameterError("Bad parameter: domain must be an str")
404
+ if "domain_hsts_header" in params and not isinstance(
405
+ params["domain_hsts_header"], bool
406
+ ):
407
+ raise InvalidParameterError(
408
+ "Bad parameter: domain_hsts_header must be an bool"
409
+ )
410
+ if "domain_letsencrypt_chain" in params and not isinstance(
411
+ params["domain_letsencrypt_chain"], str
412
+ ):
413
+ raise InvalidParameterError(
414
+ "Bad parameter: domain_letsencrypt_chain must be an str"
415
+ )
416
+ if "email" in params and not isinstance(params["email"], str):
417
+ raise InvalidParameterError("Bad parameter: email must be an str")
418
+ if "reply_to_email" in params and not isinstance(
419
+ params["reply_to_email"], str
420
+ ):
421
+ raise InvalidParameterError(
422
+ "Bad parameter: reply_to_email must be an str"
423
+ )
424
+ if "allow_bundle_names" in params and not isinstance(
425
+ params["allow_bundle_names"], bool
426
+ ):
427
+ raise InvalidParameterError(
428
+ "Bad parameter: allow_bundle_names must be an bool"
429
+ )
430
+ if "bundle_expiration" in params and not isinstance(
431
+ params["bundle_expiration"], int
432
+ ):
433
+ raise InvalidParameterError(
434
+ "Bad parameter: bundle_expiration must be an int"
435
+ )
436
+ if "welcome_email_enabled" in params and not isinstance(
437
+ params["welcome_email_enabled"], bool
438
+ ):
439
+ raise InvalidParameterError(
440
+ "Bad parameter: welcome_email_enabled must be an bool"
441
+ )
442
+ if "ask_about_overwrites" in params and not isinstance(
443
+ params["ask_about_overwrites"], bool
444
+ ):
445
+ raise InvalidParameterError(
446
+ "Bad parameter: ask_about_overwrites must be an bool"
447
+ )
448
+ if "show_request_access_link" in params and not isinstance(
449
+ params["show_request_access_link"], bool
450
+ ):
451
+ raise InvalidParameterError(
452
+ "Bad parameter: show_request_access_link must be an bool"
453
+ )
454
+ if "always_mkdir_parents" in params and not isinstance(
455
+ params["always_mkdir_parents"], bool
456
+ ):
457
+ raise InvalidParameterError(
458
+ "Bad parameter: always_mkdir_parents must be an bool"
459
+ )
460
+ if "welcome_email_cc" in params and not isinstance(
461
+ params["welcome_email_cc"], str
462
+ ):
463
+ raise InvalidParameterError(
464
+ "Bad parameter: welcome_email_cc must be an str"
465
+ )
466
+ if "welcome_email_subject" in params and not isinstance(
467
+ params["welcome_email_subject"], str
468
+ ):
469
+ raise InvalidParameterError(
470
+ "Bad parameter: welcome_email_subject must be an str"
471
+ )
472
+ if "welcome_custom_text" in params and not isinstance(
473
+ params["welcome_custom_text"], str
474
+ ):
475
+ raise InvalidParameterError(
476
+ "Bad parameter: welcome_custom_text must be an str"
477
+ )
478
+ if "language" in params and not isinstance(params["language"], str):
479
+ raise InvalidParameterError("Bad parameter: language must be an str")
480
+ if "windows_mode_ftp" in params and not isinstance(
481
+ params["windows_mode_ftp"], bool
482
+ ):
483
+ raise InvalidParameterError(
484
+ "Bad parameter: windows_mode_ftp must be an bool"
485
+ )
486
+ if "default_time_zone" in params and not isinstance(
487
+ params["default_time_zone"], str
488
+ ):
489
+ raise InvalidParameterError(
490
+ "Bad parameter: default_time_zone must be an str"
491
+ )
492
+ if "desktop_app" in params and not isinstance(params["desktop_app"], bool):
493
+ raise InvalidParameterError(
494
+ "Bad parameter: desktop_app must be an bool"
495
+ )
496
+ if "desktop_app_session_ip_pinning" in params and not isinstance(
497
+ params["desktop_app_session_ip_pinning"], bool
498
+ ):
499
+ raise InvalidParameterError(
500
+ "Bad parameter: desktop_app_session_ip_pinning must be an bool"
501
+ )
502
+ if "desktop_app_session_lifetime" in params and not isinstance(
503
+ params["desktop_app_session_lifetime"], int
504
+ ):
505
+ raise InvalidParameterError(
506
+ "Bad parameter: desktop_app_session_lifetime must be an int"
507
+ )
508
+ if "mobile_app" in params and not isinstance(params["mobile_app"], bool):
509
+ raise InvalidParameterError(
510
+ "Bad parameter: mobile_app must be an bool"
511
+ )
512
+ if "mobile_app_session_ip_pinning" in params and not isinstance(
513
+ params["mobile_app_session_ip_pinning"], bool
514
+ ):
515
+ raise InvalidParameterError(
516
+ "Bad parameter: mobile_app_session_ip_pinning must be an bool"
517
+ )
518
+ if "mobile_app_session_lifetime" in params and not isinstance(
519
+ params["mobile_app_session_lifetime"], int
520
+ ):
521
+ raise InvalidParameterError(
522
+ "Bad parameter: mobile_app_session_lifetime must be an int"
523
+ )
524
+ if "folder_permissions_groups_only" in params and not isinstance(
525
+ params["folder_permissions_groups_only"], bool
526
+ ):
527
+ raise InvalidParameterError(
528
+ "Bad parameter: folder_permissions_groups_only must be an bool"
529
+ )
530
+ if "welcome_screen" in params and not isinstance(
531
+ params["welcome_screen"], str
532
+ ):
533
+ raise InvalidParameterError(
534
+ "Bad parameter: welcome_screen must be an str"
535
+ )
536
+ if "office_integration_available" in params and not isinstance(
537
+ params["office_integration_available"], bool
538
+ ):
539
+ raise InvalidParameterError(
540
+ "Bad parameter: office_integration_available must be an bool"
541
+ )
542
+ if "office_integration_type" in params and not isinstance(
543
+ params["office_integration_type"], str
544
+ ):
545
+ raise InvalidParameterError(
546
+ "Bad parameter: office_integration_type must be an str"
547
+ )
548
+ if "pin_all_remote_servers_to_site_region" in params and not isinstance(
549
+ params["pin_all_remote_servers_to_site_region"], bool
550
+ ):
551
+ raise InvalidParameterError(
552
+ "Bad parameter: pin_all_remote_servers_to_site_region must be an bool"
553
+ )
554
+ if "motd_text" in params and not isinstance(params["motd_text"], str):
555
+ raise InvalidParameterError("Bad parameter: motd_text must be an str")
556
+ if "motd_use_for_ftp" in params and not isinstance(
557
+ params["motd_use_for_ftp"], bool
558
+ ):
559
+ raise InvalidParameterError(
560
+ "Bad parameter: motd_use_for_ftp must be an bool"
561
+ )
562
+ if "motd_use_for_sftp" in params and not isinstance(
563
+ params["motd_use_for_sftp"], bool
564
+ ):
565
+ raise InvalidParameterError(
566
+ "Bad parameter: motd_use_for_sftp must be an bool"
567
+ )
568
+ if "left_navigation_visibility" in params and not isinstance(
569
+ params["left_navigation_visibility"], dict
570
+ ):
571
+ raise InvalidParameterError(
572
+ "Bad parameter: left_navigation_visibility must be an dict"
573
+ )
574
+ if "additional_text_file_types" in params and not isinstance(
575
+ params["additional_text_file_types"], builtins.list
576
+ ):
577
+ raise InvalidParameterError(
578
+ "Bad parameter: additional_text_file_types must be an list"
579
+ )
580
+ if "bundle_require_note" in params and not isinstance(
581
+ params["bundle_require_note"], bool
582
+ ):
583
+ raise InvalidParameterError(
584
+ "Bad parameter: bundle_require_note must be an bool"
585
+ )
586
+ if "bundle_send_shared_receipts" in params and not isinstance(
587
+ params["bundle_send_shared_receipts"], bool
588
+ ):
589
+ raise InvalidParameterError(
590
+ "Bad parameter: bundle_send_shared_receipts must be an bool"
591
+ )
592
+ if "calculate_file_checksums_crc32" in params and not isinstance(
593
+ params["calculate_file_checksums_crc32"], bool
594
+ ):
595
+ raise InvalidParameterError(
596
+ "Bad parameter: calculate_file_checksums_crc32 must be an bool"
597
+ )
598
+ if "calculate_file_checksums_md5" in params and not isinstance(
599
+ params["calculate_file_checksums_md5"], bool
600
+ ):
601
+ raise InvalidParameterError(
602
+ "Bad parameter: calculate_file_checksums_md5 must be an bool"
603
+ )
604
+ if "calculate_file_checksums_sha1" in params and not isinstance(
605
+ params["calculate_file_checksums_sha1"], bool
606
+ ):
607
+ raise InvalidParameterError(
608
+ "Bad parameter: calculate_file_checksums_sha1 must be an bool"
609
+ )
610
+ if "calculate_file_checksums_sha256" in params and not isinstance(
611
+ params["calculate_file_checksums_sha256"], bool
612
+ ):
613
+ raise InvalidParameterError(
614
+ "Bad parameter: calculate_file_checksums_sha256 must be an bool"
615
+ )
616
+ if "legacy_checksums_mode" in params and not isinstance(
617
+ params["legacy_checksums_mode"], bool
618
+ ):
619
+ raise InvalidParameterError(
620
+ "Bad parameter: legacy_checksums_mode must be an bool"
621
+ )
622
+ if "migrate_remote_server_sync_to_sync" in params and not isinstance(
623
+ params["migrate_remote_server_sync_to_sync"], bool
624
+ ):
625
+ raise InvalidParameterError(
626
+ "Bad parameter: migrate_remote_server_sync_to_sync must be an bool"
627
+ )
628
+ if "as2_message_retention_days" in params and not isinstance(
629
+ params["as2_message_retention_days"], int
630
+ ):
631
+ raise InvalidParameterError(
632
+ "Bad parameter: as2_message_retention_days must be an int"
633
+ )
634
+ if "session_expiry_minutes" in params and not isinstance(
635
+ params["session_expiry_minutes"], int
636
+ ):
637
+ raise InvalidParameterError(
638
+ "Bad parameter: session_expiry_minutes must be an int"
639
+ )
640
+ if "ssl_required" in params and not isinstance(
641
+ params["ssl_required"], bool
642
+ ):
643
+ raise InvalidParameterError(
644
+ "Bad parameter: ssl_required must be an bool"
645
+ )
646
+ if "sftp_insecure_ciphers" in params and not isinstance(
647
+ params["sftp_insecure_ciphers"], bool
648
+ ):
649
+ raise InvalidParameterError(
650
+ "Bad parameter: sftp_insecure_ciphers must be an bool"
651
+ )
652
+ if "sftp_insecure_diffie_hellman" in params and not isinstance(
653
+ params["sftp_insecure_diffie_hellman"], bool
654
+ ):
655
+ raise InvalidParameterError(
656
+ "Bad parameter: sftp_insecure_diffie_hellman must be an bool"
657
+ )
658
+ if "disable_files_certificate_generation" in params and not isinstance(
659
+ params["disable_files_certificate_generation"], bool
660
+ ):
661
+ raise InvalidParameterError(
662
+ "Bad parameter: disable_files_certificate_generation must be an bool"
663
+ )
664
+ if "user_lockout" in params and not isinstance(
665
+ params["user_lockout"], bool
666
+ ):
667
+ raise InvalidParameterError(
668
+ "Bad parameter: user_lockout must be an bool"
669
+ )
670
+ if "user_lockout_tries" in params and not isinstance(
671
+ params["user_lockout_tries"], int
672
+ ):
673
+ raise InvalidParameterError(
674
+ "Bad parameter: user_lockout_tries must be an int"
675
+ )
676
+ if "user_lockout_within" in params and not isinstance(
677
+ params["user_lockout_within"], int
678
+ ):
679
+ raise InvalidParameterError(
680
+ "Bad parameter: user_lockout_within must be an int"
681
+ )
682
+ if "user_lockout_lock_period" in params and not isinstance(
683
+ params["user_lockout_lock_period"], int
684
+ ):
685
+ raise InvalidParameterError(
686
+ "Bad parameter: user_lockout_lock_period must be an int"
687
+ )
688
+ if "include_password_in_welcome_email" in params and not isinstance(
689
+ params["include_password_in_welcome_email"], bool
690
+ ):
691
+ raise InvalidParameterError(
692
+ "Bad parameter: include_password_in_welcome_email must be an bool"
693
+ )
694
+ if "allowed_countries" in params and not isinstance(
695
+ params["allowed_countries"], str
696
+ ):
697
+ raise InvalidParameterError(
698
+ "Bad parameter: allowed_countries must be an str"
699
+ )
700
+ if "allowed_ips" in params and not isinstance(params["allowed_ips"], str):
701
+ raise InvalidParameterError(
702
+ "Bad parameter: allowed_ips must be an str"
703
+ )
704
+ if "disallowed_countries" in params and not isinstance(
705
+ params["disallowed_countries"], str
706
+ ):
707
+ raise InvalidParameterError(
708
+ "Bad parameter: disallowed_countries must be an str"
709
+ )
710
+ if "days_to_retain_backups" in params and not isinstance(
711
+ params["days_to_retain_backups"], int
712
+ ):
713
+ raise InvalidParameterError(
714
+ "Bad parameter: days_to_retain_backups must be an int"
715
+ )
716
+ if "max_prior_passwords" in params and not isinstance(
717
+ params["max_prior_passwords"], int
718
+ ):
719
+ raise InvalidParameterError(
720
+ "Bad parameter: max_prior_passwords must be an int"
721
+ )
722
+ if "password_validity_days" in params and not isinstance(
723
+ params["password_validity_days"], int
724
+ ):
725
+ raise InvalidParameterError(
726
+ "Bad parameter: password_validity_days must be an int"
727
+ )
728
+ if "password_min_length" in params and not isinstance(
729
+ params["password_min_length"], int
730
+ ):
731
+ raise InvalidParameterError(
732
+ "Bad parameter: password_min_length must be an int"
733
+ )
734
+ if "password_require_letter" in params and not isinstance(
735
+ params["password_require_letter"], bool
736
+ ):
737
+ raise InvalidParameterError(
738
+ "Bad parameter: password_require_letter must be an bool"
739
+ )
740
+ if "password_require_mixed" in params and not isinstance(
741
+ params["password_require_mixed"], bool
742
+ ):
743
+ raise InvalidParameterError(
744
+ "Bad parameter: password_require_mixed must be an bool"
745
+ )
746
+ if "password_require_special" in params and not isinstance(
747
+ params["password_require_special"], bool
748
+ ):
749
+ raise InvalidParameterError(
750
+ "Bad parameter: password_require_special must be an bool"
751
+ )
752
+ if "password_require_number" in params and not isinstance(
753
+ params["password_require_number"], bool
754
+ ):
755
+ raise InvalidParameterError(
756
+ "Bad parameter: password_require_number must be an bool"
757
+ )
758
+ if "password_require_unbreached" in params and not isinstance(
759
+ params["password_require_unbreached"], bool
760
+ ):
761
+ raise InvalidParameterError(
762
+ "Bad parameter: password_require_unbreached must be an bool"
763
+ )
764
+ if "require_logout_from_bundles_and_inboxes" in params and not isinstance(
765
+ params["require_logout_from_bundles_and_inboxes"], bool
766
+ ):
767
+ raise InvalidParameterError(
768
+ "Bad parameter: require_logout_from_bundles_and_inboxes must be an bool"
769
+ )
770
+ if "dav_user_root_enabled" in params and not isinstance(
771
+ params["dav_user_root_enabled"], bool
772
+ ):
773
+ raise InvalidParameterError(
774
+ "Bad parameter: dav_user_root_enabled must be an bool"
775
+ )
776
+ if "sftp_user_root_enabled" in params and not isinstance(
777
+ params["sftp_user_root_enabled"], bool
778
+ ):
779
+ raise InvalidParameterError(
780
+ "Bad parameter: sftp_user_root_enabled must be an bool"
781
+ )
782
+ if "disable_password_reset" in params and not isinstance(
783
+ params["disable_password_reset"], bool
784
+ ):
785
+ raise InvalidParameterError(
786
+ "Bad parameter: disable_password_reset must be an bool"
787
+ )
788
+ if "immutable_files" in params and not isinstance(
789
+ params["immutable_files"], bool
790
+ ):
791
+ raise InvalidParameterError(
792
+ "Bad parameter: immutable_files must be an bool"
793
+ )
794
+ if "bundle_not_found_message" in params and not isinstance(
795
+ params["bundle_not_found_message"], str
796
+ ):
797
+ raise InvalidParameterError(
798
+ "Bad parameter: bundle_not_found_message must be an str"
799
+ )
800
+ if "bundle_password_required" in params and not isinstance(
801
+ params["bundle_password_required"], bool
802
+ ):
803
+ raise InvalidParameterError(
804
+ "Bad parameter: bundle_password_required must be an bool"
805
+ )
806
+ if "bundle_require_registration" in params and not isinstance(
807
+ params["bundle_require_registration"], bool
808
+ ):
809
+ raise InvalidParameterError(
810
+ "Bad parameter: bundle_require_registration must be an bool"
811
+ )
812
+ if "bundle_require_share_recipient" in params and not isinstance(
813
+ params["bundle_require_share_recipient"], bool
814
+ ):
815
+ raise InvalidParameterError(
816
+ "Bad parameter: bundle_require_share_recipient must be an bool"
817
+ )
818
+ if "bundle_registration_notifications" in params and not isinstance(
819
+ params["bundle_registration_notifications"], str
820
+ ):
821
+ raise InvalidParameterError(
822
+ "Bad parameter: bundle_registration_notifications must be an str"
823
+ )
824
+ if "bundle_activity_notifications" in params and not isinstance(
825
+ params["bundle_activity_notifications"], str
826
+ ):
827
+ raise InvalidParameterError(
828
+ "Bad parameter: bundle_activity_notifications must be an str"
829
+ )
830
+ if "bundle_upload_receipt_notifications" in params and not isinstance(
831
+ params["bundle_upload_receipt_notifications"], str
832
+ ):
833
+ raise InvalidParameterError(
834
+ "Bad parameter: bundle_upload_receipt_notifications must be an str"
835
+ )
836
+ if "document_edits_in_bundle_allowed" in params and not isinstance(
837
+ params["document_edits_in_bundle_allowed"], bool
838
+ ):
839
+ raise InvalidParameterError(
840
+ "Bad parameter: document_edits_in_bundle_allowed must be an bool"
841
+ )
842
+ if "password_requirements_apply_to_bundles" in params and not isinstance(
843
+ params["password_requirements_apply_to_bundles"], bool
844
+ ):
845
+ raise InvalidParameterError(
846
+ "Bad parameter: password_requirements_apply_to_bundles must be an bool"
847
+ )
848
+ if (
849
+ "prevent_root_permissions_for_non_site_admins" in params
850
+ and not isinstance(
851
+ params["prevent_root_permissions_for_non_site_admins"], bool
852
+ )
853
+ ):
854
+ raise InvalidParameterError(
855
+ "Bad parameter: prevent_root_permissions_for_non_site_admins must be an bool"
856
+ )
857
+ if "opt_out_global" in params and not isinstance(
858
+ params["opt_out_global"], bool
859
+ ):
860
+ raise InvalidParameterError(
861
+ "Bad parameter: opt_out_global must be an bool"
862
+ )
863
+ if "use_provided_modified_at" in params and not isinstance(
864
+ params["use_provided_modified_at"], bool
865
+ ):
866
+ raise InvalidParameterError(
867
+ "Bad parameter: use_provided_modified_at must be an bool"
868
+ )
869
+ if "custom_namespace" in params and not isinstance(
870
+ params["custom_namespace"], bool
871
+ ):
872
+ raise InvalidParameterError(
873
+ "Bad parameter: custom_namespace must be an bool"
874
+ )
875
+ if "non_sso_groups_allowed" in params and not isinstance(
876
+ params["non_sso_groups_allowed"], bool
877
+ ):
878
+ raise InvalidParameterError(
879
+ "Bad parameter: non_sso_groups_allowed must be an bool"
880
+ )
881
+ if "non_sso_users_allowed" in params and not isinstance(
882
+ params["non_sso_users_allowed"], bool
883
+ ):
884
+ raise InvalidParameterError(
885
+ "Bad parameter: non_sso_users_allowed must be an bool"
886
+ )
887
+ if "sharing_enabled" in params and not isinstance(
888
+ params["sharing_enabled"], bool
889
+ ):
890
+ raise InvalidParameterError(
891
+ "Bad parameter: sharing_enabled must be an bool"
892
+ )
893
+ if "snapshot_sharing_enabled" in params and not isinstance(
894
+ params["snapshot_sharing_enabled"], bool
895
+ ):
896
+ raise InvalidParameterError(
897
+ "Bad parameter: snapshot_sharing_enabled must be an bool"
898
+ )
899
+ if "user_requests_enabled" in params and not isinstance(
900
+ params["user_requests_enabled"], bool
901
+ ):
902
+ raise InvalidParameterError(
903
+ "Bad parameter: user_requests_enabled must be an bool"
904
+ )
905
+ if "user_requests_notify_admins" in params and not isinstance(
906
+ params["user_requests_notify_admins"], bool
907
+ ):
908
+ raise InvalidParameterError(
909
+ "Bad parameter: user_requests_notify_admins must be an bool"
910
+ )
911
+ if "dav_enabled" in params and not isinstance(params["dav_enabled"], bool):
912
+ raise InvalidParameterError(
913
+ "Bad parameter: dav_enabled must be an bool"
914
+ )
915
+ if "ftp_enabled" in params and not isinstance(params["ftp_enabled"], bool):
916
+ raise InvalidParameterError(
917
+ "Bad parameter: ftp_enabled must be an bool"
918
+ )
919
+ if "sftp_enabled" in params and not isinstance(
920
+ params["sftp_enabled"], bool
921
+ ):
922
+ raise InvalidParameterError(
923
+ "Bad parameter: sftp_enabled must be an bool"
924
+ )
925
+ if "users_can_create_api_keys" in params and not isinstance(
926
+ params["users_can_create_api_keys"], bool
927
+ ):
928
+ raise InvalidParameterError(
929
+ "Bad parameter: users_can_create_api_keys must be an bool"
930
+ )
931
+ if "users_can_create_ssh_keys" in params and not isinstance(
932
+ params["users_can_create_ssh_keys"], bool
933
+ ):
934
+ raise InvalidParameterError(
935
+ "Bad parameter: users_can_create_ssh_keys must be an bool"
936
+ )
937
+ if "show_user_notifications_log_in_link" in params and not isinstance(
938
+ params["show_user_notifications_log_in_link"], bool
939
+ ):
940
+ raise InvalidParameterError(
941
+ "Bad parameter: show_user_notifications_log_in_link must be an bool"
942
+ )
943
+ if "sftp_host_key_type" in params and not isinstance(
944
+ params["sftp_host_key_type"], str
945
+ ):
946
+ raise InvalidParameterError(
947
+ "Bad parameter: sftp_host_key_type must be an str"
948
+ )
949
+ if "active_sftp_host_key_id" in params and not isinstance(
950
+ params["active_sftp_host_key_id"], int
951
+ ):
952
+ raise InvalidParameterError(
953
+ "Bad parameter: active_sftp_host_key_id must be an int"
954
+ )
955
+ if "protocol_access_groups_only" in params and not isinstance(
956
+ params["protocol_access_groups_only"], bool
957
+ ):
958
+ raise InvalidParameterError(
959
+ "Bad parameter: protocol_access_groups_only must be an bool"
960
+ )
961
+ if (
962
+ "revoke_bundle_access_on_disable_or_delete" in params
963
+ and not isinstance(
964
+ params["revoke_bundle_access_on_disable_or_delete"], bool
965
+ )
966
+ ):
967
+ raise InvalidParameterError(
968
+ "Bad parameter: revoke_bundle_access_on_disable_or_delete must be an bool"
969
+ )
970
+ if "bundle_watermark_value" in params and not isinstance(
971
+ params["bundle_watermark_value"], dict
972
+ ):
973
+ raise InvalidParameterError(
974
+ "Bad parameter: bundle_watermark_value must be an dict"
975
+ )
976
+ if "group_admins_can_set_user_password" in params and not isinstance(
977
+ params["group_admins_can_set_user_password"], bool
978
+ ):
979
+ raise InvalidParameterError(
980
+ "Bad parameter: group_admins_can_set_user_password must be an bool"
981
+ )
982
+ if (
983
+ "bundle_recipient_blacklist_free_email_domains" in params
984
+ and not isinstance(
985
+ params["bundle_recipient_blacklist_free_email_domains"], bool
986
+ )
987
+ ):
988
+ raise InvalidParameterError(
989
+ "Bad parameter: bundle_recipient_blacklist_free_email_domains must be an bool"
990
+ )
991
+ if "bundle_recipient_blacklist_domains" in params and not isinstance(
992
+ params["bundle_recipient_blacklist_domains"], builtins.list
993
+ ):
994
+ raise InvalidParameterError(
995
+ "Bad parameter: bundle_recipient_blacklist_domains must be an list"
996
+ )
997
+ if "admins_bypass_locked_subfolders" in params and not isinstance(
998
+ params["admins_bypass_locked_subfolders"], bool
999
+ ):
1000
+ raise InvalidParameterError(
1001
+ "Bad parameter: admins_bypass_locked_subfolders must be an bool"
1002
+ )
1003
+ if "allowed_2fa_method_sms" in params and not isinstance(
1004
+ params["allowed_2fa_method_sms"], bool
1005
+ ):
1006
+ raise InvalidParameterError(
1007
+ "Bad parameter: allowed_2fa_method_sms must be an bool"
1008
+ )
1009
+ if "allowed_2fa_method_totp" in params and not isinstance(
1010
+ params["allowed_2fa_method_totp"], bool
1011
+ ):
1012
+ raise InvalidParameterError(
1013
+ "Bad parameter: allowed_2fa_method_totp must be an bool"
1014
+ )
1015
+ if "allowed_2fa_method_webauthn" in params and not isinstance(
1016
+ params["allowed_2fa_method_webauthn"], bool
1017
+ ):
1018
+ raise InvalidParameterError(
1019
+ "Bad parameter: allowed_2fa_method_webauthn must be an bool"
1020
+ )
1021
+ if "allowed_2fa_method_yubi" in params and not isinstance(
1022
+ params["allowed_2fa_method_yubi"], bool
1023
+ ):
1024
+ raise InvalidParameterError(
1025
+ "Bad parameter: allowed_2fa_method_yubi must be an bool"
1026
+ )
1027
+ if "allowed_2fa_method_email" in params and not isinstance(
1028
+ params["allowed_2fa_method_email"], bool
1029
+ ):
1030
+ raise InvalidParameterError(
1031
+ "Bad parameter: allowed_2fa_method_email must be an bool"
1032
+ )
1033
+ if "allowed_2fa_method_static" in params and not isinstance(
1034
+ params["allowed_2fa_method_static"], bool
1035
+ ):
1036
+ raise InvalidParameterError(
1037
+ "Bad parameter: allowed_2fa_method_static must be an bool"
1038
+ )
1039
+ if (
1040
+ "allowed_2fa_method_bypass_for_ftp_sftp_dav" in params
1041
+ and not isinstance(
1042
+ params["allowed_2fa_method_bypass_for_ftp_sftp_dav"], bool
1043
+ )
1044
+ ):
1045
+ raise InvalidParameterError(
1046
+ "Bad parameter: allowed_2fa_method_bypass_for_ftp_sftp_dav must be an bool"
1047
+ )
1048
+ if "require_2fa" in params and not isinstance(params["require_2fa"], bool):
1049
+ raise InvalidParameterError(
1050
+ "Bad parameter: require_2fa must be an bool"
1051
+ )
1052
+ if "require_2fa_user_type" in params and not isinstance(
1053
+ params["require_2fa_user_type"], str
1054
+ ):
1055
+ raise InvalidParameterError(
1056
+ "Bad parameter: require_2fa_user_type must be an str"
1057
+ )
1058
+ if "color2_top" in params and not isinstance(params["color2_top"], str):
1059
+ raise InvalidParameterError("Bad parameter: color2_top must be an str")
1060
+ if "color2_left" in params and not isinstance(params["color2_left"], str):
1061
+ raise InvalidParameterError(
1062
+ "Bad parameter: color2_left must be an str"
1063
+ )
1064
+ if "color2_link" in params and not isinstance(params["color2_link"], str):
1065
+ raise InvalidParameterError(
1066
+ "Bad parameter: color2_link must be an str"
1067
+ )
1068
+ if "color2_text" in params and not isinstance(params["color2_text"], str):
1069
+ raise InvalidParameterError(
1070
+ "Bad parameter: color2_text must be an str"
1071
+ )
1072
+ if "color2_top_text" in params and not isinstance(
1073
+ params["color2_top_text"], str
1074
+ ):
1075
+ raise InvalidParameterError(
1076
+ "Bad parameter: color2_top_text must be an str"
1077
+ )
1078
+ if "site_header" in params and not isinstance(params["site_header"], str):
1079
+ raise InvalidParameterError(
1080
+ "Bad parameter: site_header must be an str"
1081
+ )
1082
+ if "site_footer" in params and not isinstance(params["site_footer"], str):
1083
+ raise InvalidParameterError(
1084
+ "Bad parameter: site_footer must be an str"
1085
+ )
1086
+ if "site_public_header" in params and not isinstance(
1087
+ params["site_public_header"], str
1088
+ ):
1089
+ raise InvalidParameterError(
1090
+ "Bad parameter: site_public_header must be an str"
1091
+ )
1092
+ if "site_public_footer" in params and not isinstance(
1093
+ params["site_public_footer"], str
1094
+ ):
1095
+ raise InvalidParameterError(
1096
+ "Bad parameter: site_public_footer must be an str"
1097
+ )
1098
+ if "login_help_text" in params and not isinstance(
1099
+ params["login_help_text"], str
1100
+ ):
1101
+ raise InvalidParameterError(
1102
+ "Bad parameter: login_help_text must be an str"
1103
+ )
1104
+ if "use_dedicated_ips_for_smtp" in params and not isinstance(
1105
+ params["use_dedicated_ips_for_smtp"], bool
1106
+ ):
1107
+ raise InvalidParameterError(
1108
+ "Bad parameter: use_dedicated_ips_for_smtp must be an bool"
1109
+ )
1110
+ if "email_footer_custom_text" in params and not isinstance(
1111
+ params["email_footer_custom_text"], str
1112
+ ):
1113
+ raise InvalidParameterError(
1114
+ "Bad parameter: email_footer_custom_text must be an str"
1115
+ )
1116
+ if "smtp_address" in params and not isinstance(
1117
+ params["smtp_address"], str
1118
+ ):
1119
+ raise InvalidParameterError(
1120
+ "Bad parameter: smtp_address must be an str"
1121
+ )
1122
+ if "smtp_authentication" in params and not isinstance(
1123
+ params["smtp_authentication"], str
1124
+ ):
1125
+ raise InvalidParameterError(
1126
+ "Bad parameter: smtp_authentication must be an str"
1127
+ )
1128
+ if "smtp_from" in params and not isinstance(params["smtp_from"], str):
1129
+ raise InvalidParameterError("Bad parameter: smtp_from must be an str")
1130
+ if "smtp_username" in params and not isinstance(
1131
+ params["smtp_username"], str
1132
+ ):
1133
+ raise InvalidParameterError(
1134
+ "Bad parameter: smtp_username must be an str"
1135
+ )
1136
+ if "smtp_port" in params and not isinstance(params["smtp_port"], int):
1137
+ raise InvalidParameterError("Bad parameter: smtp_port must be an int")
1138
+ if "ldap_enabled" in params and not isinstance(
1139
+ params["ldap_enabled"], bool
1140
+ ):
1141
+ raise InvalidParameterError(
1142
+ "Bad parameter: ldap_enabled must be an bool"
1143
+ )
1144
+ if "ldap_type" in params and not isinstance(params["ldap_type"], str):
1145
+ raise InvalidParameterError("Bad parameter: ldap_type must be an str")
1146
+ if "ldap_host" in params and not isinstance(params["ldap_host"], str):
1147
+ raise InvalidParameterError("Bad parameter: ldap_host must be an str")
1148
+ if "ldap_host_2" in params and not isinstance(params["ldap_host_2"], str):
1149
+ raise InvalidParameterError(
1150
+ "Bad parameter: ldap_host_2 must be an str"
1151
+ )
1152
+ if "ldap_host_3" in params and not isinstance(params["ldap_host_3"], str):
1153
+ raise InvalidParameterError(
1154
+ "Bad parameter: ldap_host_3 must be an str"
1155
+ )
1156
+ if "ldap_port" in params and not isinstance(params["ldap_port"], int):
1157
+ raise InvalidParameterError("Bad parameter: ldap_port must be an int")
1158
+ if "ldap_secure" in params and not isinstance(params["ldap_secure"], bool):
1159
+ raise InvalidParameterError(
1160
+ "Bad parameter: ldap_secure must be an bool"
1161
+ )
1162
+ if "ldap_username" in params and not isinstance(
1163
+ params["ldap_username"], str
1164
+ ):
1165
+ raise InvalidParameterError(
1166
+ "Bad parameter: ldap_username must be an str"
1167
+ )
1168
+ if "ldap_username_field" in params and not isinstance(
1169
+ params["ldap_username_field"], str
1170
+ ):
1171
+ raise InvalidParameterError(
1172
+ "Bad parameter: ldap_username_field must be an str"
1173
+ )
1174
+ if "ldap_domain" in params and not isinstance(params["ldap_domain"], str):
1175
+ raise InvalidParameterError(
1176
+ "Bad parameter: ldap_domain must be an str"
1177
+ )
1178
+ if "ldap_user_action" in params and not isinstance(
1179
+ params["ldap_user_action"], str
1180
+ ):
1181
+ raise InvalidParameterError(
1182
+ "Bad parameter: ldap_user_action must be an str"
1183
+ )
1184
+ if "ldap_group_action" in params and not isinstance(
1185
+ params["ldap_group_action"], str
1186
+ ):
1187
+ raise InvalidParameterError(
1188
+ "Bad parameter: ldap_group_action must be an str"
1189
+ )
1190
+ if "ldap_user_include_groups" in params and not isinstance(
1191
+ params["ldap_user_include_groups"], str
1192
+ ):
1193
+ raise InvalidParameterError(
1194
+ "Bad parameter: ldap_user_include_groups must be an str"
1195
+ )
1196
+ if "ldap_group_exclusion" in params and not isinstance(
1197
+ params["ldap_group_exclusion"], str
1198
+ ):
1199
+ raise InvalidParameterError(
1200
+ "Bad parameter: ldap_group_exclusion must be an str"
1201
+ )
1202
+ if "ldap_group_inclusion" in params and not isinstance(
1203
+ params["ldap_group_inclusion"], str
1204
+ ):
1205
+ raise InvalidParameterError(
1206
+ "Bad parameter: ldap_group_inclusion must be an str"
1207
+ )
1208
+ if "ldap_base_dn" in params and not isinstance(
1209
+ params["ldap_base_dn"], str
1210
+ ):
1211
+ raise InvalidParameterError(
1212
+ "Bad parameter: ldap_base_dn must be an str"
1213
+ )
1214
+ if "uploads_via_email_authentication" in params and not isinstance(
1215
+ params["uploads_via_email_authentication"], bool
1216
+ ):
1217
+ raise InvalidParameterError(
1218
+ "Bad parameter: uploads_via_email_authentication must be an bool"
1219
+ )
1220
+ if "icon16_delete" in params and not isinstance(
1221
+ params["icon16_delete"], bool
1222
+ ):
1223
+ raise InvalidParameterError(
1224
+ "Bad parameter: icon16_delete must be an bool"
1225
+ )
1226
+ if "icon32_delete" in params and not isinstance(
1227
+ params["icon32_delete"], bool
1228
+ ):
1229
+ raise InvalidParameterError(
1230
+ "Bad parameter: icon32_delete must be an bool"
1231
+ )
1232
+ if "icon48_delete" in params and not isinstance(
1233
+ params["icon48_delete"], bool
1234
+ ):
1235
+ raise InvalidParameterError(
1236
+ "Bad parameter: icon48_delete must be an bool"
1237
+ )
1238
+ if "icon128_delete" in params and not isinstance(
1239
+ params["icon128_delete"], bool
1240
+ ):
1241
+ raise InvalidParameterError(
1242
+ "Bad parameter: icon128_delete must be an bool"
1243
+ )
1244
+ if "logo_delete" in params and not isinstance(params["logo_delete"], bool):
1245
+ raise InvalidParameterError(
1246
+ "Bad parameter: logo_delete must be an bool"
1247
+ )
1248
+ if "bundle_watermark_attachment_delete" in params and not isinstance(
1249
+ params["bundle_watermark_attachment_delete"], bool
1250
+ ):
1251
+ raise InvalidParameterError(
1252
+ "Bad parameter: bundle_watermark_attachment_delete must be an bool"
1253
+ )
1254
+ if "login_page_background_image_delete" in params and not isinstance(
1255
+ params["login_page_background_image_delete"], bool
1256
+ ):
1257
+ raise InvalidParameterError(
1258
+ "Bad parameter: login_page_background_image_delete must be an bool"
1259
+ )
1260
+ if "disable_2fa_with_delay" in params and not isinstance(
1261
+ params["disable_2fa_with_delay"], bool
1262
+ ):
1263
+ raise InvalidParameterError(
1264
+ "Bad parameter: disable_2fa_with_delay must be an bool"
1265
+ )
1266
+ if "ldap_password_change" in params and not isinstance(
1267
+ params["ldap_password_change"], str
1268
+ ):
1269
+ raise InvalidParameterError(
1270
+ "Bad parameter: ldap_password_change must be an str"
1271
+ )
1272
+ if "ldap_password_change_confirmation" in params and not isinstance(
1273
+ params["ldap_password_change_confirmation"], str
1274
+ ):
1275
+ raise InvalidParameterError(
1276
+ "Bad parameter: ldap_password_change_confirmation must be an str"
1277
+ )
1278
+ if "smtp_password" in params and not isinstance(
1279
+ params["smtp_password"], str
1280
+ ):
1281
+ raise InvalidParameterError(
1282
+ "Bad parameter: smtp_password must be an str"
1283
+ )
1284
+ response, options = Api.send_request("PATCH", "/site", params, options)
1285
+ return Site(response.data, options)
1286
+
1287
+
1288
+ def new(*args, **kwargs):
1289
+ return Site(*args, **kwargs)