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,282 @@
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 As2Station:
12
+ default_attributes = {
13
+ "id": None, # int64 - Id of the AS2 Station.
14
+ "workspace_id": None, # int64 - ID of the Workspace associated with this AS2 Station.
15
+ "name": None, # string - The station's formal AS2 name.
16
+ "uri": None, # string - Public URI for sending AS2 message to.
17
+ "domain": None, # string - The station's AS2 domain name.
18
+ "hex_public_certificate_serial": None, # string - Serial of public certificate used for message security in hex format.
19
+ "public_certificate_md5": None, # string - MD5 hash of public certificate used for message security.
20
+ "public_certificate": None, # string - Public certificate used for message security.
21
+ "private_key_md5": None, # string - MD5 hash of private key used for message security.
22
+ "public_certificate_subject": None, # string - Subject of public certificate used for message security.
23
+ "public_certificate_issuer": None, # string - Issuer of public certificate used for message security.
24
+ "public_certificate_serial": None, # string - Serial of public certificate used for message security.
25
+ "public_certificate_not_before": None, # string - Not before value of public certificate used for message security.
26
+ "public_certificate_not_after": None, # string - Not after value of public certificate used for message security.
27
+ "private_key_password_md5": None, # string - MD5 hash of private key password used for message security.
28
+ "private_key": None, # string
29
+ "private_key_password": None, # string
30
+ }
31
+
32
+ def __init__(self, attributes=None, options=None):
33
+ if not isinstance(attributes, dict):
34
+ attributes = {}
35
+ if not isinstance(options, dict):
36
+ options = {}
37
+ self.set_attributes(attributes)
38
+ self.options = options
39
+
40
+ def set_attributes(self, attributes):
41
+ for attribute, default_value in As2Station.default_attributes.items():
42
+ setattr(self, attribute, attributes.get(attribute, default_value))
43
+
44
+ def get_attributes(self):
45
+ return {
46
+ k: getattr(self, k, None)
47
+ for k in As2Station.default_attributes
48
+ if getattr(self, k, None) is not None
49
+ }
50
+
51
+ # Parameters:
52
+ # name - string - The station's formal AS2 name.
53
+ # public_certificate - string
54
+ # private_key - string
55
+ # private_key_password - string
56
+ def update(self, params=None):
57
+ if not isinstance(params, dict):
58
+ params = {}
59
+
60
+ if hasattr(self, "id") and self.id:
61
+ params["id"] = self.id
62
+ else:
63
+ raise MissingParameterError("Current object doesn't have a id")
64
+ if "id" not in params:
65
+ raise MissingParameterError("Parameter missing: id")
66
+ if "id" in params and not isinstance(params["id"], int):
67
+ raise InvalidParameterError("Bad parameter: id must be an int")
68
+ if "name" in params and not isinstance(params["name"], str):
69
+ raise InvalidParameterError("Bad parameter: name must be an str")
70
+ if "public_certificate" in params and not isinstance(
71
+ params["public_certificate"], str
72
+ ):
73
+ raise InvalidParameterError(
74
+ "Bad parameter: public_certificate must be an str"
75
+ )
76
+ if "private_key" in params and not isinstance(
77
+ params["private_key"], str
78
+ ):
79
+ raise InvalidParameterError(
80
+ "Bad parameter: private_key must be an str"
81
+ )
82
+ if "private_key_password" in params and not isinstance(
83
+ params["private_key_password"], str
84
+ ):
85
+ raise InvalidParameterError(
86
+ "Bad parameter: private_key_password must be an str"
87
+ )
88
+ response, _options = Api.send_request(
89
+ "PATCH",
90
+ "/as2_stations/{id}".format(id=params["id"]),
91
+ params,
92
+ self.options,
93
+ )
94
+ return response.data
95
+
96
+ def delete(self, params=None):
97
+ if not isinstance(params, dict):
98
+ params = {}
99
+
100
+ if hasattr(self, "id") and self.id:
101
+ params["id"] = self.id
102
+ else:
103
+ raise MissingParameterError("Current object doesn't have a id")
104
+ if "id" not in params:
105
+ raise MissingParameterError("Parameter missing: id")
106
+ if "id" in params and not isinstance(params["id"], int):
107
+ raise InvalidParameterError("Bad parameter: id must be an int")
108
+ Api.send_request(
109
+ "DELETE",
110
+ "/as2_stations/{id}".format(id=params["id"]),
111
+ params,
112
+ self.options,
113
+ )
114
+
115
+ def destroy(self, params=None):
116
+ self.delete(params)
117
+
118
+ def save(self):
119
+ if hasattr(self, "id") and self.id:
120
+ new_obj = self.update(self.get_attributes())
121
+ self.set_attributes(new_obj.get_attributes())
122
+ return True
123
+ else:
124
+ new_obj = create(self.get_attributes(), self.options)
125
+ self.set_attributes(new_obj.get_attributes())
126
+ return True
127
+
128
+
129
+ # Parameters:
130
+ # 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.
131
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
132
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `name`.
133
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id`.
134
+ def list(params=None, options=None):
135
+ if not isinstance(params, dict):
136
+ params = {}
137
+ if not isinstance(options, dict):
138
+ options = {}
139
+ if "cursor" in params and not isinstance(params["cursor"], str):
140
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
141
+ if "per_page" in params and not isinstance(params["per_page"], int):
142
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
143
+ if "sort_by" in params and not isinstance(params["sort_by"], dict):
144
+ raise InvalidParameterError("Bad parameter: sort_by must be an dict")
145
+ if "filter" in params and not isinstance(params["filter"], dict):
146
+ raise InvalidParameterError("Bad parameter: filter must be an dict")
147
+ return ListObj(As2Station, "GET", "/as2_stations", params, options)
148
+
149
+
150
+ def all(params=None, options=None):
151
+ list(params, options)
152
+
153
+
154
+ # Parameters:
155
+ # id (required) - int64 - As2 Station ID.
156
+ def find(id, params=None, options=None):
157
+ if not isinstance(params, dict):
158
+ params = {}
159
+ if not isinstance(options, dict):
160
+ options = {}
161
+ params["id"] = id
162
+ if "id" in params and not isinstance(params["id"], int):
163
+ raise InvalidParameterError("Bad parameter: id must be an int")
164
+ if "id" not in params:
165
+ raise MissingParameterError("Parameter missing: id")
166
+ response, options = Api.send_request(
167
+ "GET", "/as2_stations/{id}".format(id=params["id"]), params, options
168
+ )
169
+ return As2Station(response.data, options)
170
+
171
+
172
+ def get(id, params=None, options=None):
173
+ find(id, params, options)
174
+
175
+
176
+ # Parameters:
177
+ # name (required) - string - The station's formal AS2 name.
178
+ # workspace_id - int64 - ID of the Workspace associated with this AS2 Station.
179
+ # public_certificate (required) - string
180
+ # private_key (required) - string
181
+ # private_key_password - string
182
+ def create(params=None, options=None):
183
+ if not isinstance(params, dict):
184
+ params = {}
185
+ if not isinstance(options, dict):
186
+ options = {}
187
+ if "name" in params and not isinstance(params["name"], str):
188
+ raise InvalidParameterError("Bad parameter: name must be an str")
189
+ if "workspace_id" in params and not isinstance(
190
+ params["workspace_id"], int
191
+ ):
192
+ raise InvalidParameterError(
193
+ "Bad parameter: workspace_id must be an int"
194
+ )
195
+ if "public_certificate" in params and not isinstance(
196
+ params["public_certificate"], str
197
+ ):
198
+ raise InvalidParameterError(
199
+ "Bad parameter: public_certificate must be an str"
200
+ )
201
+ if "private_key" in params and not isinstance(params["private_key"], str):
202
+ raise InvalidParameterError(
203
+ "Bad parameter: private_key must be an str"
204
+ )
205
+ if "private_key_password" in params and not isinstance(
206
+ params["private_key_password"], str
207
+ ):
208
+ raise InvalidParameterError(
209
+ "Bad parameter: private_key_password must be an str"
210
+ )
211
+ if "name" not in params:
212
+ raise MissingParameterError("Parameter missing: name")
213
+ if "public_certificate" not in params:
214
+ raise MissingParameterError("Parameter missing: public_certificate")
215
+ if "private_key" not in params:
216
+ raise MissingParameterError("Parameter missing: private_key")
217
+ response, options = Api.send_request(
218
+ "POST", "/as2_stations", params, options
219
+ )
220
+ return As2Station(response.data, options)
221
+
222
+
223
+ # Parameters:
224
+ # name - string - The station's formal AS2 name.
225
+ # public_certificate - string
226
+ # private_key - string
227
+ # private_key_password - string
228
+ def update(id, params=None, options=None):
229
+ if not isinstance(params, dict):
230
+ params = {}
231
+ if not isinstance(options, dict):
232
+ options = {}
233
+ params["id"] = id
234
+ if "id" in params and not isinstance(params["id"], int):
235
+ raise InvalidParameterError("Bad parameter: id must be an int")
236
+ if "name" in params and not isinstance(params["name"], str):
237
+ raise InvalidParameterError("Bad parameter: name must be an str")
238
+ if "public_certificate" in params and not isinstance(
239
+ params["public_certificate"], str
240
+ ):
241
+ raise InvalidParameterError(
242
+ "Bad parameter: public_certificate must be an str"
243
+ )
244
+ if "private_key" in params and not isinstance(params["private_key"], str):
245
+ raise InvalidParameterError(
246
+ "Bad parameter: private_key must be an str"
247
+ )
248
+ if "private_key_password" in params and not isinstance(
249
+ params["private_key_password"], str
250
+ ):
251
+ raise InvalidParameterError(
252
+ "Bad parameter: private_key_password must be an str"
253
+ )
254
+ if "id" not in params:
255
+ raise MissingParameterError("Parameter missing: id")
256
+ response, options = Api.send_request(
257
+ "PATCH", "/as2_stations/{id}".format(id=params["id"]), params, options
258
+ )
259
+ return As2Station(response.data, options)
260
+
261
+
262
+ def delete(id, params=None, options=None):
263
+ if not isinstance(params, dict):
264
+ params = {}
265
+ if not isinstance(options, dict):
266
+ options = {}
267
+ params["id"] = id
268
+ if "id" in params and not isinstance(params["id"], int):
269
+ raise InvalidParameterError("Bad parameter: id must be an int")
270
+ if "id" not in params:
271
+ raise MissingParameterError("Parameter missing: id")
272
+ Api.send_request(
273
+ "DELETE", "/as2_stations/{id}".format(id=params["id"]), params, options
274
+ )
275
+
276
+
277
+ def destroy(id, params=None, options=None):
278
+ delete(id, params, options)
279
+
280
+
281
+ def new(*args, **kwargs):
282
+ return As2Station(*args, **kwargs)
@@ -0,0 +1,36 @@
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 Auto:
11
+ default_attributes = {
12
+ "dynamic": None, # object
13
+ }
14
+
15
+ def __init__(self, attributes=None, options=None):
16
+ if not isinstance(attributes, dict):
17
+ attributes = {}
18
+ if not isinstance(options, dict):
19
+ options = {}
20
+ self.set_attributes(attributes)
21
+ self.options = options
22
+
23
+ def set_attributes(self, attributes):
24
+ for attribute, default_value in Auto.default_attributes.items():
25
+ setattr(self, attribute, attributes.get(attribute, default_value))
26
+
27
+ def get_attributes(self):
28
+ return {
29
+ k: getattr(self, k, None)
30
+ for k in Auto.default_attributes
31
+ if getattr(self, k, None) is not None
32
+ }
33
+
34
+
35
+ def new(*args, **kwargs):
36
+ return Auto(*args, **kwargs)