files-com 1.5.0__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 (113) hide show
  1. README.md +682 -0
  2. _VERSION +1 -0
  3. files_com-1.5.0.dist-info/METADATA +694 -0
  4. files_com-1.5.0.dist-info/RECORD +113 -0
  5. files_com-1.5.0.dist-info/WHEEL +5 -0
  6. files_com-1.5.0.dist-info/licenses/LICENSE +21 -0
  7. files_com-1.5.0.dist-info/top_level.txt +1 -0
  8. files_sdk/__init__.py +270 -0
  9. files_sdk/api.py +57 -0
  10. files_sdk/api_client.py +327 -0
  11. files_sdk/error.py +2891 -0
  12. files_sdk/list_obj.py +42 -0
  13. files_sdk/models/__init__.py +104 -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 +147 -0
  17. files_sdk/models/action_notification_export_result.py +88 -0
  18. files_sdk/models/api_key.py +322 -0
  19. files_sdk/models/api_request_log.py +87 -0
  20. files_sdk/models/app.py +89 -0
  21. files_sdk/models/as2_incoming_message.py +123 -0
  22. files_sdk/models/as2_outgoing_message.py +119 -0
  23. files_sdk/models/as2_partner.py +374 -0
  24. files_sdk/models/as2_station.py +271 -0
  25. files_sdk/models/auto.py +36 -0
  26. files_sdk/models/automation.py +691 -0
  27. files_sdk/models/automation_log.py +77 -0
  28. files_sdk/models/automation_run.py +108 -0
  29. files_sdk/models/bandwidth_snapshot.py +91 -0
  30. files_sdk/models/behavior.py +334 -0
  31. files_sdk/models/bundle.py +550 -0
  32. files_sdk/models/bundle_action.py +86 -0
  33. files_sdk/models/bundle_download.py +94 -0
  34. files_sdk/models/bundle_notification.py +217 -0
  35. files_sdk/models/bundle_path.py +37 -0
  36. files_sdk/models/bundle_recipient.py +120 -0
  37. files_sdk/models/bundle_registration.py +79 -0
  38. files_sdk/models/clickwrap.py +268 -0
  39. files_sdk/models/dns_record.py +59 -0
  40. files_sdk/models/email_incoming_message.py +102 -0
  41. files_sdk/models/email_log.py +74 -0
  42. files_sdk/models/errors.py +37 -0
  43. files_sdk/models/exavault_api_request_log.py +85 -0
  44. files_sdk/models/external_event.py +148 -0
  45. files_sdk/models/file.py +791 -0
  46. files_sdk/models/file_action.py +39 -0
  47. files_sdk/models/file_comment.py +191 -0
  48. files_sdk/models/file_comment_reaction.py +125 -0
  49. files_sdk/models/file_migration.py +69 -0
  50. files_sdk/models/file_migration_log.py +78 -0
  51. files_sdk/models/file_upload_part.py +54 -0
  52. files_sdk/models/folder.py +154 -0
  53. files_sdk/models/form_field.py +43 -0
  54. files_sdk/models/form_field_set.py +240 -0
  55. files_sdk/models/ftp_action_log.py +87 -0
  56. files_sdk/models/gpg_key.py +254 -0
  57. files_sdk/models/group.py +276 -0
  58. files_sdk/models/group_user.py +231 -0
  59. files_sdk/models/history.py +236 -0
  60. files_sdk/models/history_export.py +238 -0
  61. files_sdk/models/history_export_result.py +98 -0
  62. files_sdk/models/image.py +37 -0
  63. files_sdk/models/inbox_recipient.py +118 -0
  64. files_sdk/models/inbox_registration.py +79 -0
  65. files_sdk/models/inbox_upload.py +80 -0
  66. files_sdk/models/invoice.py +91 -0
  67. files_sdk/models/invoice_line_item.py +46 -0
  68. files_sdk/models/ip_address.py +119 -0
  69. files_sdk/models/lock.py +158 -0
  70. files_sdk/models/message.py +244 -0
  71. files_sdk/models/message_comment.py +223 -0
  72. files_sdk/models/message_comment_reaction.py +181 -0
  73. files_sdk/models/message_reaction.py +170 -0
  74. files_sdk/models/notification.py +357 -0
  75. files_sdk/models/outbound_connection_log.py +88 -0
  76. files_sdk/models/payment.py +91 -0
  77. files_sdk/models/payment_line_item.py +42 -0
  78. files_sdk/models/permission.py +174 -0
  79. files_sdk/models/preview.py +40 -0
  80. files_sdk/models/priority.py +63 -0
  81. files_sdk/models/project.py +205 -0
  82. files_sdk/models/public_hosting_request_log.py +82 -0
  83. files_sdk/models/public_ip_address.py +42 -0
  84. files_sdk/models/public_key.py +212 -0
  85. files_sdk/models/remote_bandwidth_snapshot.py +91 -0
  86. files_sdk/models/remote_server.py +1677 -0
  87. files_sdk/models/remote_server_configuration_file.py +72 -0
  88. files_sdk/models/request.py +180 -0
  89. files_sdk/models/restore.py +104 -0
  90. files_sdk/models/session.py +100 -0
  91. files_sdk/models/settings_change.py +71 -0
  92. files_sdk/models/sftp_action_log.py +91 -0
  93. files_sdk/models/sftp_host_key.py +215 -0
  94. files_sdk/models/share_group.py +228 -0
  95. files_sdk/models/share_group_member.py +41 -0
  96. files_sdk/models/siem_http_destination.py +773 -0
  97. files_sdk/models/site.py +767 -0
  98. files_sdk/models/snapshot.py +255 -0
  99. files_sdk/models/sso_strategy.py +167 -0
  100. files_sdk/models/status.py +42 -0
  101. files_sdk/models/style.py +152 -0
  102. files_sdk/models/sync_log.py +75 -0
  103. files_sdk/models/usage_by_top_level_dir.py +41 -0
  104. files_sdk/models/usage_daily_snapshot.py +93 -0
  105. files_sdk/models/usage_snapshot.py +73 -0
  106. files_sdk/models/user.py +893 -0
  107. files_sdk/models/user_cipher_use.py +68 -0
  108. files_sdk/models/user_request.py +166 -0
  109. files_sdk/models/user_sftp_client_use.py +68 -0
  110. files_sdk/models/web_dav_action_log.py +87 -0
  111. files_sdk/models/webhook_test.py +104 -0
  112. files_sdk/path_util.py +42 -0
  113. files_sdk/util.py +34 -0
@@ -0,0 +1,212 @@
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 PublicKey:
12
+ default_attributes = {
13
+ "id": None, # int64 - Public key ID
14
+ "title": None, # string - Public key title
15
+ "created_at": None, # date-time - Public key created at date/time
16
+ "fingerprint": None, # string - Public key fingerprint (MD5)
17
+ "fingerprint_sha256": None, # string - Public key fingerprint (SHA256)
18
+ "username": None, # string - Username of the user this public key is associated with
19
+ "user_id": None, # int64 - User ID this public key is associated with
20
+ "public_key": None, # string - Actual contents of SSH key.
21
+ }
22
+
23
+ def __init__(self, attributes=None, options=None):
24
+ if not isinstance(attributes, dict):
25
+ attributes = {}
26
+ if not isinstance(options, dict):
27
+ options = {}
28
+ self.set_attributes(attributes)
29
+ self.options = options
30
+
31
+ def set_attributes(self, attributes):
32
+ for attribute, default_value in PublicKey.default_attributes.items():
33
+ setattr(self, attribute, attributes.get(attribute, default_value))
34
+
35
+ def get_attributes(self):
36
+ return {
37
+ k: getattr(self, k, None)
38
+ for k in PublicKey.default_attributes
39
+ if getattr(self, k, None) is not None
40
+ }
41
+
42
+ # Parameters:
43
+ # title (required) - string - Internal reference for key.
44
+ def update(self, params=None):
45
+ if not isinstance(params, dict):
46
+ params = {}
47
+
48
+ if hasattr(self, "id") and self.id:
49
+ params["id"] = self.id
50
+ else:
51
+ raise MissingParameterError("Current object doesn't have a id")
52
+ if "id" not in params:
53
+ raise MissingParameterError("Parameter missing: id")
54
+ if "title" not in params:
55
+ raise MissingParameterError("Parameter missing: title")
56
+ if "id" in params and not isinstance(params["id"], int):
57
+ raise InvalidParameterError("Bad parameter: id must be an int")
58
+ if "title" in params and not isinstance(params["title"], str):
59
+ raise InvalidParameterError("Bad parameter: title must be an str")
60
+ response, _options = Api.send_request(
61
+ "PATCH",
62
+ "/public_keys/{id}".format(id=params["id"]),
63
+ params,
64
+ self.options,
65
+ )
66
+ return response.data
67
+
68
+ def delete(self, params=None):
69
+ if not isinstance(params, dict):
70
+ params = {}
71
+
72
+ if hasattr(self, "id") and self.id:
73
+ params["id"] = self.id
74
+ else:
75
+ raise MissingParameterError("Current object doesn't have a id")
76
+ if "id" not in params:
77
+ raise MissingParameterError("Parameter missing: id")
78
+ if "id" in params and not isinstance(params["id"], int):
79
+ raise InvalidParameterError("Bad parameter: id must be an int")
80
+ Api.send_request(
81
+ "DELETE",
82
+ "/public_keys/{id}".format(id=params["id"]),
83
+ params,
84
+ self.options,
85
+ )
86
+
87
+ def destroy(self, params=None):
88
+ self.delete(params)
89
+
90
+ def save(self):
91
+ if hasattr(self, "id") and self.id:
92
+ new_obj = self.update(self.get_attributes())
93
+ self.set_attributes(new_obj.get_attributes())
94
+ return True
95
+ else:
96
+ new_obj = create(self.get_attributes(), self.options)
97
+ self.set_attributes(new_obj.get_attributes())
98
+ return True
99
+
100
+
101
+ # Parameters:
102
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
103
+ # 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.
104
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
105
+ def list(params=None, options=None):
106
+ if not isinstance(params, dict):
107
+ params = {}
108
+ if not isinstance(options, dict):
109
+ options = {}
110
+ if "user_id" in params and not isinstance(params["user_id"], int):
111
+ raise InvalidParameterError("Bad parameter: user_id must be an int")
112
+ if "cursor" in params and not isinstance(params["cursor"], str):
113
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
114
+ if "per_page" in params and not isinstance(params["per_page"], int):
115
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
116
+ return ListObj(PublicKey, "GET", "/public_keys", params, options)
117
+
118
+
119
+ def all(params=None, options=None):
120
+ list(params, options)
121
+
122
+
123
+ # Parameters:
124
+ # id (required) - int64 - Public Key ID.
125
+ def find(id, params=None, options=None):
126
+ if not isinstance(params, dict):
127
+ params = {}
128
+ if not isinstance(options, dict):
129
+ options = {}
130
+ params["id"] = id
131
+ if "id" in params and not isinstance(params["id"], int):
132
+ raise InvalidParameterError("Bad parameter: id must be an int")
133
+ if "id" not in params:
134
+ raise MissingParameterError("Parameter missing: id")
135
+ response, options = Api.send_request(
136
+ "GET", "/public_keys/{id}".format(id=params["id"]), params, options
137
+ )
138
+ return PublicKey(response.data, options)
139
+
140
+
141
+ def get(id, params=None, options=None):
142
+ find(id, params, options)
143
+
144
+
145
+ # Parameters:
146
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
147
+ # title (required) - string - Internal reference for key.
148
+ # public_key (required) - string - Actual contents of SSH key.
149
+ def create(params=None, options=None):
150
+ if not isinstance(params, dict):
151
+ params = {}
152
+ if not isinstance(options, dict):
153
+ options = {}
154
+ if "user_id" in params and not isinstance(params["user_id"], int):
155
+ raise InvalidParameterError("Bad parameter: user_id must be an int")
156
+ if "title" in params and not isinstance(params["title"], str):
157
+ raise InvalidParameterError("Bad parameter: title must be an str")
158
+ if "public_key" in params and not isinstance(params["public_key"], str):
159
+ raise InvalidParameterError("Bad parameter: public_key must be an str")
160
+ if "title" not in params:
161
+ raise MissingParameterError("Parameter missing: title")
162
+ if "public_key" not in params:
163
+ raise MissingParameterError("Parameter missing: public_key")
164
+ response, options = Api.send_request(
165
+ "POST", "/public_keys", params, options
166
+ )
167
+ return PublicKey(response.data, options)
168
+
169
+
170
+ # Parameters:
171
+ # title (required) - string - Internal reference for key.
172
+ def update(id, params=None, options=None):
173
+ if not isinstance(params, dict):
174
+ params = {}
175
+ if not isinstance(options, dict):
176
+ options = {}
177
+ params["id"] = id
178
+ if "id" in params and not isinstance(params["id"], int):
179
+ raise InvalidParameterError("Bad parameter: id must be an int")
180
+ if "title" in params and not isinstance(params["title"], str):
181
+ raise InvalidParameterError("Bad parameter: title must be an str")
182
+ if "id" not in params:
183
+ raise MissingParameterError("Parameter missing: id")
184
+ if "title" not in params:
185
+ raise MissingParameterError("Parameter missing: title")
186
+ response, options = Api.send_request(
187
+ "PATCH", "/public_keys/{id}".format(id=params["id"]), params, options
188
+ )
189
+ return PublicKey(response.data, options)
190
+
191
+
192
+ def delete(id, params=None, options=None):
193
+ if not isinstance(params, dict):
194
+ params = {}
195
+ if not isinstance(options, dict):
196
+ options = {}
197
+ params["id"] = id
198
+ if "id" in params and not isinstance(params["id"], int):
199
+ raise InvalidParameterError("Bad parameter: id must be an int")
200
+ if "id" not in params:
201
+ raise MissingParameterError("Parameter missing: id")
202
+ Api.send_request(
203
+ "DELETE", "/public_keys/{id}".format(id=params["id"]), params, options
204
+ )
205
+
206
+
207
+ def destroy(id, params=None, options=None):
208
+ delete(id, params, options)
209
+
210
+
211
+ def new(*args, **kwargs):
212
+ return PublicKey(*args, **kwargs)
@@ -0,0 +1,91 @@
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 RemoteBandwidthSnapshot:
12
+ default_attributes = {
13
+ "id": None, # int64 - Site bandwidth ID
14
+ "sync_bytes_received": None, # double - Site sync bandwidth report bytes received
15
+ "sync_bytes_sent": None, # double - Site sync bandwidth report bytes sent
16
+ "logged_at": None, # date-time - Time the site bandwidth report was logged
17
+ "remote_server_id": None, # int64 - ID of related Remote Server
18
+ }
19
+
20
+ def __init__(self, attributes=None, options=None):
21
+ if not isinstance(attributes, dict):
22
+ attributes = {}
23
+ if not isinstance(options, dict):
24
+ options = {}
25
+ self.set_attributes(attributes)
26
+ self.options = options
27
+
28
+ def set_attributes(self, attributes):
29
+ for (
30
+ attribute,
31
+ default_value,
32
+ ) in RemoteBandwidthSnapshot.default_attributes.items():
33
+ setattr(self, attribute, attributes.get(attribute, default_value))
34
+
35
+ def get_attributes(self):
36
+ return {
37
+ k: getattr(self, k, None)
38
+ for k in RemoteBandwidthSnapshot.default_attributes
39
+ if getattr(self, k, None) is not None
40
+ }
41
+
42
+
43
+ # Parameters:
44
+ # 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.
45
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
46
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `logged_at`.
47
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `logged_at`.
48
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `logged_at`.
49
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `logged_at`.
50
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `logged_at`.
51
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `logged_at`.
52
+ def list(params=None, options=None):
53
+ if not isinstance(params, dict):
54
+ params = {}
55
+ if not isinstance(options, dict):
56
+ options = {}
57
+ if "cursor" in params and not isinstance(params["cursor"], str):
58
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
59
+ if "per_page" in params and not isinstance(params["per_page"], int):
60
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
61
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
62
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
63
+ if "filter" in params and not isinstance(params["filter"], dict):
64
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
65
+ if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
66
+ raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
67
+ if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
68
+ raise InvalidParameterError(
69
+ "Bad parameter: filter_gteq must be an dict"
70
+ )
71
+ if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
72
+ raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
73
+ if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
74
+ raise InvalidParameterError(
75
+ "Bad parameter: filter_lteq must be an dict"
76
+ )
77
+ return ListObj(
78
+ RemoteBandwidthSnapshot,
79
+ "GET",
80
+ "/remote_bandwidth_snapshots",
81
+ params,
82
+ options,
83
+ )
84
+
85
+
86
+ def all(params=None, options=None):
87
+ list(params, options)
88
+
89
+
90
+ def new(*args, **kwargs):
91
+ return RemoteBandwidthSnapshot(*args, **kwargs)