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