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,86 @@
1
+ import builtins # noqa: F401
2
+ from files_sdk.api import Api # noqa: F401
3
+ from files_sdk.list_obj import ListObj
4
+ from files_sdk.error import ( # noqa: F401
5
+ InvalidParameterError,
6
+ MissingParameterError,
7
+ NotImplementedError,
8
+ )
9
+
10
+
11
+ class SyncLog:
12
+ default_attributes = {
13
+ "timestamp": None, # date-time - Start Time of Action. Deprecrated: Use created_at.
14
+ "sync_id": None, # int64 - Sync ID
15
+ "external_event_id": None, # int64 - External Event ID used by legacy syncs
16
+ "sync_run_id": None, # int64 - Sync Run ID
17
+ "error_type": None, # string - Error type, if applicable
18
+ "message": None, # string - Message
19
+ "operation": None, # string - Operation type
20
+ "path": None, # string - File path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
21
+ "size": None, # int64 - File size
22
+ "file_type": None, # string - File type
23
+ "status": None, # string - Status
24
+ "created_at": None, # date-time - Start Time of Action
25
+ }
26
+
27
+ def __init__(self, attributes=None, options=None):
28
+ if not isinstance(attributes, dict):
29
+ attributes = {}
30
+ if not isinstance(options, dict):
31
+ options = {}
32
+ self.set_attributes(attributes)
33
+ self.options = options
34
+
35
+ def set_attributes(self, attributes):
36
+ for attribute, default_value in SyncLog.default_attributes.items():
37
+ setattr(self, attribute, attributes.get(attribute, default_value))
38
+
39
+ def get_attributes(self):
40
+ return {
41
+ k: getattr(self, k, None)
42
+ for k in SyncLog.default_attributes
43
+ if getattr(self, k, None) is not None
44
+ }
45
+
46
+
47
+ # Parameters:
48
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
49
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
50
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `external_event_id`, `operation`, `status`, `sync_id`, `created_at` or `sync_run_id`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
51
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
52
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
53
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
54
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
55
+ def list(params=None, options=None):
56
+ if not isinstance(params, dict):
57
+ params = {}
58
+ if not isinstance(options, dict):
59
+ options = {}
60
+ if "cursor" in params and not isinstance(params["cursor"], str):
61
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
62
+ if "per_page" in params and not isinstance(params["per_page"], int):
63
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
64
+ if "filter" in params and not isinstance(params["filter"], dict):
65
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
66
+ if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
67
+ raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
68
+ if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
69
+ raise InvalidParameterError(
70
+ "Bad parameter: filter_gteq must be an dict"
71
+ )
72
+ if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
73
+ raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
74
+ if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
75
+ raise InvalidParameterError(
76
+ "Bad parameter: filter_lteq must be an dict"
77
+ )
78
+ return ListObj(SyncLog, "GET", "/sync_logs", params, options)
79
+
80
+
81
+ def all(params=None, options=None):
82
+ list(params, options)
83
+
84
+
85
+ def new(*args, **kwargs):
86
+ return SyncLog(*args, **kwargs)
@@ -0,0 +1,124 @@
1
+ import builtins # noqa: F401
2
+ from files_sdk.api import Api # noqa: F401
3
+ from files_sdk.list_obj import ListObj
4
+ from files_sdk.error import ( # noqa: F401
5
+ InvalidParameterError,
6
+ MissingParameterError,
7
+ NotImplementedError,
8
+ )
9
+
10
+
11
+ class SyncRun:
12
+ default_attributes = {
13
+ "id": None, # int64 - SyncRun ID
14
+ "body": None, # string - Log or summary body for this run
15
+ "bytes_synced": None, # int64 - Total bytes synced in this run
16
+ "compared_files": None, # int64 - Number of files compared
17
+ "compared_folders": None, # int64 - Number of folders compared
18
+ "completed_at": None, # date-time - When this run was completed
19
+ "created_at": None, # date-time - When this run was created
20
+ "dest_remote_server_type": None, # string - Destination remote server type, if any
21
+ "dry_run": None, # boolean - Whether this run was a dry run (no actual changes made)
22
+ "errored_files": None, # int64 - Number of files that errored
23
+ "estimated_bytes_count": None, # int64 - Estimated bytes count for this run
24
+ "event_errors": None, # array(string) - Array of errors encountered during the run
25
+ "log_url": None, # string - Link to external log file.
26
+ "runtime": None, # double - Total runtime in seconds
27
+ "site_id": None, # int64 - Site ID
28
+ "workspace_id": None, # int64 - Workspace ID
29
+ "src_remote_server_type": None, # string - Source remote server type, if any
30
+ "status": None, # string - Status of the sync run (success, failure, partial_failure, in_progress, skipped)
31
+ "successful_files": None, # int64 - Number of files successfully synced
32
+ "sync_id": None, # int64 - ID of the Sync this run belongs to
33
+ "sync_name": None, # string - Name of the Sync this run belongs to
34
+ "updated_at": None, # date-time - When this run was last updated
35
+ }
36
+
37
+ def __init__(self, attributes=None, options=None):
38
+ if not isinstance(attributes, dict):
39
+ attributes = {}
40
+ if not isinstance(options, dict):
41
+ options = {}
42
+ self.set_attributes(attributes)
43
+ self.options = options
44
+
45
+ def set_attributes(self, attributes):
46
+ for attribute, default_value in SyncRun.default_attributes.items():
47
+ setattr(self, attribute, attributes.get(attribute, default_value))
48
+
49
+ def get_attributes(self):
50
+ return {
51
+ k: getattr(self, k, None)
52
+ for k in SyncRun.default_attributes
53
+ if getattr(self, k, None) is not None
54
+ }
55
+
56
+
57
+ # Parameters:
58
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
59
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
60
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
61
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `workspace_id`, `sync_id`, `created_at` or `status`.
62
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `status`, `dry_run`, `workspace_id`, `src_remote_server_type`, `dest_remote_server_type` or `sync_id`. Valid field combinations are `[ status, created_at ]`, `[ workspace_id, created_at ]`, `[ src_remote_server_type, created_at ]`, `[ dest_remote_server_type, created_at ]`, `[ sync_id, created_at ]`, `[ workspace_id, status ]`, `[ src_remote_server_type, status ]`, `[ dest_remote_server_type, status ]`, `[ sync_id, status ]`, `[ workspace_id, src_remote_server_type ]`, `[ workspace_id, dest_remote_server_type ]`, `[ workspace_id, sync_id ]`, `[ workspace_id, status, created_at ]`, `[ src_remote_server_type, status, created_at ]`, `[ dest_remote_server_type, status, created_at ]`, `[ sync_id, status, created_at ]`, `[ workspace_id, src_remote_server_type, created_at ]`, `[ workspace_id, dest_remote_server_type, created_at ]`, `[ workspace_id, sync_id, created_at ]`, `[ workspace_id, src_remote_server_type, status ]`, `[ workspace_id, dest_remote_server_type, status ]`, `[ workspace_id, sync_id, status ]`, `[ workspace_id, src_remote_server_type, status, created_at ]`, `[ workspace_id, dest_remote_server_type, status, created_at ]` or `[ workspace_id, sync_id, status, created_at ]`.
63
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
64
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
65
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
66
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
67
+ def list(params=None, options=None):
68
+ if not isinstance(params, dict):
69
+ params = {}
70
+ if not isinstance(options, dict):
71
+ options = {}
72
+ if "user_id" in params and not isinstance(params["user_id"], int):
73
+ raise InvalidParameterError("Bad parameter: user_id must be an int")
74
+ if "cursor" in params and not isinstance(params["cursor"], str):
75
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
76
+ if "per_page" in params and not isinstance(params["per_page"], int):
77
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
78
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
79
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
80
+ if "filter" in params and not isinstance(params["filter"], dict):
81
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
82
+ if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
83
+ raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
84
+ if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
85
+ raise InvalidParameterError(
86
+ "Bad parameter: filter_gteq must be an dict"
87
+ )
88
+ if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
89
+ raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
90
+ if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
91
+ raise InvalidParameterError(
92
+ "Bad parameter: filter_lteq must be an dict"
93
+ )
94
+ return ListObj(SyncRun, "GET", "/sync_runs", params, options)
95
+
96
+
97
+ def all(params=None, options=None):
98
+ list(params, options)
99
+
100
+
101
+ # Parameters:
102
+ # id (required) - int64 - Sync Run ID.
103
+ def find(id, params=None, options=None):
104
+ if not isinstance(params, dict):
105
+ params = {}
106
+ if not isinstance(options, dict):
107
+ options = {}
108
+ params["id"] = id
109
+ if "id" in params and not isinstance(params["id"], int):
110
+ raise InvalidParameterError("Bad parameter: id must be an int")
111
+ if "id" not in params:
112
+ raise MissingParameterError("Parameter missing: id")
113
+ response, options = Api.send_request(
114
+ "GET", "/sync_runs/{id}".format(id=params["id"]), params, options
115
+ )
116
+ return SyncRun(response.data, options)
117
+
118
+
119
+ def get(id, params=None, options=None):
120
+ find(id, params, options)
121
+
122
+
123
+ def new(*args, **kwargs):
124
+ return SyncRun(*args, **kwargs)
@@ -0,0 +1,41 @@
1
+ import builtins # noqa: F401
2
+ from files_sdk.api import Api # noqa: F401
3
+ from files_sdk.error import ( # noqa: F401
4
+ InvalidParameterError,
5
+ MissingParameterError,
6
+ NotImplementedError,
7
+ )
8
+
9
+
10
+ class UsageByTopLevelDir:
11
+ default_attributes = {
12
+ "dir": None, # string - Directory name
13
+ "size": None, # int64 - Usage
14
+ "count": None, # int64 - File count
15
+ }
16
+
17
+ def __init__(self, attributes=None, options=None):
18
+ if not isinstance(attributes, dict):
19
+ attributes = {}
20
+ if not isinstance(options, dict):
21
+ options = {}
22
+ self.set_attributes(attributes)
23
+ self.options = options
24
+
25
+ def set_attributes(self, attributes):
26
+ for (
27
+ attribute,
28
+ default_value,
29
+ ) in UsageByTopLevelDir.default_attributes.items():
30
+ setattr(self, attribute, attributes.get(attribute, default_value))
31
+
32
+ def get_attributes(self):
33
+ return {
34
+ k: getattr(self, k, None)
35
+ for k in UsageByTopLevelDir.default_attributes
36
+ if getattr(self, k, None) is not None
37
+ }
38
+
39
+
40
+ def new(*args, **kwargs):
41
+ return UsageByTopLevelDir(*args, **kwargs)
@@ -0,0 +1,93 @@
1
+ import builtins # noqa: F401
2
+ from files_sdk.api import Api # noqa: F401
3
+ from files_sdk.list_obj import ListObj
4
+ from files_sdk.error import ( # noqa: F401
5
+ InvalidParameterError,
6
+ MissingParameterError,
7
+ NotImplementedError,
8
+ )
9
+
10
+
11
+ class UsageDailySnapshot:
12
+ default_attributes = {
13
+ "id": None, # int64 - ID of the usage record
14
+ "date": None, # date - The date of this usage record
15
+ "api_usage_available": None, # boolean - True if the API usage fields `read_api_usage` and `write_api_usage` can be relied upon. If this is false, we suggest hiding that value from any UI.
16
+ "read_api_usage": None, # int64 - Read API Calls used on this day. Note: only updated for days before the current day.
17
+ "write_api_usage": None, # int64 - Write API Calls used on this day. Note: only updated for days before the current day.
18
+ "user_count": None, # int64 - Number of billable users as of this day.
19
+ "current_storage": None, # double - GB of Files Native Storage used on this day.
20
+ "deleted_files_storage": None, # double - GB of Files Native Storage used on this day for files that have been deleted and are stored as backups.
21
+ "deleted_files_counted_in_minimum": None, # double - GB of Files Native Storage used on this day for files that have been permanently deleted but were uploaded less than 30 days ago, and are still billable.
22
+ "root_storage": None, # double - GB of Files Native Storage used for the root folder. Included here because this value will not be part of `usage_by_top_level_dir`
23
+ "usage_by_top_level_dir": None, # array(object) - Usage broken down by each top-level folder
24
+ }
25
+
26
+ def __init__(self, attributes=None, options=None):
27
+ if not isinstance(attributes, dict):
28
+ attributes = {}
29
+ if not isinstance(options, dict):
30
+ options = {}
31
+ self.set_attributes(attributes)
32
+ self.options = options
33
+
34
+ def set_attributes(self, attributes):
35
+ for (
36
+ attribute,
37
+ default_value,
38
+ ) in UsageDailySnapshot.default_attributes.items():
39
+ setattr(self, attribute, attributes.get(attribute, default_value))
40
+
41
+ def get_attributes(self):
42
+ return {
43
+ k: getattr(self, k, None)
44
+ for k in UsageDailySnapshot.default_attributes
45
+ if getattr(self, k, None) is not None
46
+ }
47
+
48
+
49
+ # Parameters:
50
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
51
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
52
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `date`.
53
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
54
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `date`.
55
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `date`.
56
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `date`.
57
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `date`.
58
+ def list(params=None, options=None):
59
+ if not isinstance(params, dict):
60
+ params = {}
61
+ if not isinstance(options, dict):
62
+ options = {}
63
+ if "cursor" in params and not isinstance(params["cursor"], str):
64
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
65
+ if "per_page" in params and not isinstance(params["per_page"], int):
66
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
67
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
68
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
69
+ if "filter" in params and not isinstance(params["filter"], dict):
70
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
71
+ if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
72
+ raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
73
+ if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
74
+ raise InvalidParameterError(
75
+ "Bad parameter: filter_gteq must be an dict"
76
+ )
77
+ if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
78
+ raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
79
+ if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
80
+ raise InvalidParameterError(
81
+ "Bad parameter: filter_lteq must be an dict"
82
+ )
83
+ return ListObj(
84
+ UsageDailySnapshot, "GET", "/usage_daily_snapshots", params, options
85
+ )
86
+
87
+
88
+ def all(params=None, options=None):
89
+ list(params, options)
90
+
91
+
92
+ def new(*args, **kwargs):
93
+ return UsageDailySnapshot(*args, **kwargs)
@@ -0,0 +1,73 @@
1
+ import builtins # noqa: F401
2
+ from files_sdk.api import Api # noqa: F401
3
+ from files_sdk.list_obj import ListObj
4
+ from files_sdk.error import ( # noqa: F401
5
+ InvalidParameterError,
6
+ MissingParameterError,
7
+ NotImplementedError,
8
+ )
9
+
10
+
11
+ class UsageSnapshot:
12
+ default_attributes = {
13
+ "id": None, # int64 - Usage snapshot ID
14
+ "start_at": None, # date-time - Usage snapshot start date/time
15
+ "end_at": None, # date-time - Usage snapshot end date/time
16
+ "high_water_user_count": None, # int64 - Highest user count number in time period
17
+ "current_storage": None, # double - Current total Storage Usage GB as of end date (not necessarily high water mark, which is used for billing)
18
+ "high_water_storage": None, # double - Highest Storage Usage GB recorded in time period (used for billing)
19
+ "root_storage": None, # double - Storage Usage for root folder as of end date (not necessarily high water mark, which is used for billing)
20
+ "deleted_files_counted_in_minimum": None, # double - Storage Usage for files that are deleted but uploaded within last 30 days as of end date (not necessarily high water mark, which is used for billing)
21
+ "deleted_files_storage": None, # double - Storage Usage for files that are deleted but retained as backups as of end date (not necessarily high water mark, which is used for billing)
22
+ "total_billable_usage": None, # double - Storage + Transfer Usage - Total Billable amount
23
+ "total_billable_transfer_usage": None, # double - Transfer usage for period - Total Billable amount
24
+ "bytes_sent": None, # double - Transfer Usage for period - Outbound GB from Files Native Storage
25
+ "sync_bytes_received": None, # double - Transfer Usage for period - Inbound GB to Remote Servers (Sync/Mount)
26
+ "sync_bytes_sent": None, # double - Transfer Usage for period - Outbound GB from Remote Servers (Sync/Mount)
27
+ "usage_by_top_level_dir": None, # array(object) - Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)
28
+ }
29
+
30
+ def __init__(self, attributes=None, options=None):
31
+ if not isinstance(attributes, dict):
32
+ attributes = {}
33
+ if not isinstance(options, dict):
34
+ options = {}
35
+ self.set_attributes(attributes)
36
+ self.options = options
37
+
38
+ def set_attributes(self, attributes):
39
+ for (
40
+ attribute,
41
+ default_value,
42
+ ) in UsageSnapshot.default_attributes.items():
43
+ setattr(self, attribute, attributes.get(attribute, default_value))
44
+
45
+ def get_attributes(self):
46
+ return {
47
+ k: getattr(self, k, None)
48
+ for k in UsageSnapshot.default_attributes
49
+ if getattr(self, k, None) is not None
50
+ }
51
+
52
+
53
+ # Parameters:
54
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
55
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
56
+ def list(params=None, options=None):
57
+ if not isinstance(params, dict):
58
+ params = {}
59
+ if not isinstance(options, dict):
60
+ options = {}
61
+ if "cursor" in params and not isinstance(params["cursor"], str):
62
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
63
+ if "per_page" in params and not isinstance(params["per_page"], int):
64
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
65
+ return ListObj(UsageSnapshot, "GET", "/usage_snapshots", params, options)
66
+
67
+
68
+ def all(params=None, options=None):
69
+ list(params, options)
70
+
71
+
72
+ def new(*args, **kwargs):
73
+ return UsageSnapshot(*args, **kwargs)