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.
- README.md +682 -0
- _VERSION +1 -0
- files_com-1.5.0.dist-info/METADATA +694 -0
- files_com-1.5.0.dist-info/RECORD +113 -0
- files_com-1.5.0.dist-info/WHEEL +5 -0
- files_com-1.5.0.dist-info/licenses/LICENSE +21 -0
- files_com-1.5.0.dist-info/top_level.txt +1 -0
- files_sdk/__init__.py +270 -0
- files_sdk/api.py +57 -0
- files_sdk/api_client.py +327 -0
- files_sdk/error.py +2891 -0
- files_sdk/list_obj.py +42 -0
- files_sdk/models/__init__.py +104 -0
- files_sdk/models/account_line_item.py +51 -0
- files_sdk/models/action.py +49 -0
- files_sdk/models/action_notification_export.py +147 -0
- files_sdk/models/action_notification_export_result.py +88 -0
- files_sdk/models/api_key.py +322 -0
- files_sdk/models/api_request_log.py +87 -0
- files_sdk/models/app.py +89 -0
- files_sdk/models/as2_incoming_message.py +123 -0
- files_sdk/models/as2_outgoing_message.py +119 -0
- files_sdk/models/as2_partner.py +374 -0
- files_sdk/models/as2_station.py +271 -0
- files_sdk/models/auto.py +36 -0
- files_sdk/models/automation.py +691 -0
- files_sdk/models/automation_log.py +77 -0
- files_sdk/models/automation_run.py +108 -0
- files_sdk/models/bandwidth_snapshot.py +91 -0
- files_sdk/models/behavior.py +334 -0
- files_sdk/models/bundle.py +550 -0
- files_sdk/models/bundle_action.py +86 -0
- files_sdk/models/bundle_download.py +94 -0
- files_sdk/models/bundle_notification.py +217 -0
- files_sdk/models/bundle_path.py +37 -0
- files_sdk/models/bundle_recipient.py +120 -0
- files_sdk/models/bundle_registration.py +79 -0
- files_sdk/models/clickwrap.py +268 -0
- files_sdk/models/dns_record.py +59 -0
- files_sdk/models/email_incoming_message.py +102 -0
- files_sdk/models/email_log.py +74 -0
- files_sdk/models/errors.py +37 -0
- files_sdk/models/exavault_api_request_log.py +85 -0
- files_sdk/models/external_event.py +148 -0
- files_sdk/models/file.py +791 -0
- files_sdk/models/file_action.py +39 -0
- files_sdk/models/file_comment.py +191 -0
- files_sdk/models/file_comment_reaction.py +125 -0
- files_sdk/models/file_migration.py +69 -0
- files_sdk/models/file_migration_log.py +78 -0
- files_sdk/models/file_upload_part.py +54 -0
- files_sdk/models/folder.py +154 -0
- files_sdk/models/form_field.py +43 -0
- files_sdk/models/form_field_set.py +240 -0
- files_sdk/models/ftp_action_log.py +87 -0
- files_sdk/models/gpg_key.py +254 -0
- files_sdk/models/group.py +276 -0
- files_sdk/models/group_user.py +231 -0
- files_sdk/models/history.py +236 -0
- files_sdk/models/history_export.py +238 -0
- files_sdk/models/history_export_result.py +98 -0
- files_sdk/models/image.py +37 -0
- files_sdk/models/inbox_recipient.py +118 -0
- files_sdk/models/inbox_registration.py +79 -0
- files_sdk/models/inbox_upload.py +80 -0
- files_sdk/models/invoice.py +91 -0
- files_sdk/models/invoice_line_item.py +46 -0
- files_sdk/models/ip_address.py +119 -0
- files_sdk/models/lock.py +158 -0
- files_sdk/models/message.py +244 -0
- files_sdk/models/message_comment.py +223 -0
- files_sdk/models/message_comment_reaction.py +181 -0
- files_sdk/models/message_reaction.py +170 -0
- files_sdk/models/notification.py +357 -0
- files_sdk/models/outbound_connection_log.py +88 -0
- files_sdk/models/payment.py +91 -0
- files_sdk/models/payment_line_item.py +42 -0
- files_sdk/models/permission.py +174 -0
- files_sdk/models/preview.py +40 -0
- files_sdk/models/priority.py +63 -0
- files_sdk/models/project.py +205 -0
- files_sdk/models/public_hosting_request_log.py +82 -0
- files_sdk/models/public_ip_address.py +42 -0
- files_sdk/models/public_key.py +212 -0
- files_sdk/models/remote_bandwidth_snapshot.py +91 -0
- files_sdk/models/remote_server.py +1677 -0
- files_sdk/models/remote_server_configuration_file.py +72 -0
- files_sdk/models/request.py +180 -0
- files_sdk/models/restore.py +104 -0
- files_sdk/models/session.py +100 -0
- files_sdk/models/settings_change.py +71 -0
- files_sdk/models/sftp_action_log.py +91 -0
- files_sdk/models/sftp_host_key.py +215 -0
- files_sdk/models/share_group.py +228 -0
- files_sdk/models/share_group_member.py +41 -0
- files_sdk/models/siem_http_destination.py +773 -0
- files_sdk/models/site.py +767 -0
- files_sdk/models/snapshot.py +255 -0
- files_sdk/models/sso_strategy.py +167 -0
- files_sdk/models/status.py +42 -0
- files_sdk/models/style.py +152 -0
- files_sdk/models/sync_log.py +75 -0
- files_sdk/models/usage_by_top_level_dir.py +41 -0
- files_sdk/models/usage_daily_snapshot.py +93 -0
- files_sdk/models/usage_snapshot.py +73 -0
- files_sdk/models/user.py +893 -0
- files_sdk/models/user_cipher_use.py +68 -0
- files_sdk/models/user_request.py +166 -0
- files_sdk/models/user_sftp_client_use.py +68 -0
- files_sdk/models/web_dav_action_log.py +87 -0
- files_sdk/models/webhook_test.py +104 -0
- files_sdk/path_util.py +42 -0
- files_sdk/util.py +34 -0
|
@@ -0,0 +1,148 @@
|
|
|
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 ExternalEvent:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - Event ID
|
|
14
|
+
"event_type": None, # string - Type of event being recorded.
|
|
15
|
+
"status": None, # string - Status of event.
|
|
16
|
+
"body": None, # string - Event body
|
|
17
|
+
"created_at": None, # date-time - External event create date/time
|
|
18
|
+
"body_url": None, # string - Link to log file.
|
|
19
|
+
"folder_behavior_id": None, # int64 - Folder Behavior ID
|
|
20
|
+
"siem_http_destination_id": None, # int64 - SIEM HTTP Destination ID.
|
|
21
|
+
"successful_files": None, # int64 - For sync events, the number of files handled successfully.
|
|
22
|
+
"errored_files": None, # int64 - For sync events, the number of files that encountered errors.
|
|
23
|
+
"bytes_synced": None, # int64 - For sync events, the total number of bytes synced.
|
|
24
|
+
"compared_files": None, # int64 - For sync events, the number of files considered for the sync.
|
|
25
|
+
"compared_folders": None, # int64 - For sync events, the number of folders listed and considered for the sync.
|
|
26
|
+
"remote_server_type": None, # string - Associated Remote Server type, if any
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, attributes=None, options=None):
|
|
30
|
+
if not isinstance(attributes, dict):
|
|
31
|
+
attributes = {}
|
|
32
|
+
if not isinstance(options, dict):
|
|
33
|
+
options = {}
|
|
34
|
+
self.set_attributes(attributes)
|
|
35
|
+
self.options = options
|
|
36
|
+
|
|
37
|
+
def set_attributes(self, attributes):
|
|
38
|
+
for (
|
|
39
|
+
attribute,
|
|
40
|
+
default_value,
|
|
41
|
+
) in ExternalEvent.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 ExternalEvent.default_attributes
|
|
48
|
+
if getattr(self, k, None) is not None
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def save(self):
|
|
52
|
+
if hasattr(self, "id") and self.id:
|
|
53
|
+
raise NotImplementedError(
|
|
54
|
+
"The ExternalEvent object doesn't support updates."
|
|
55
|
+
)
|
|
56
|
+
else:
|
|
57
|
+
new_obj = create(self.get_attributes(), self.options)
|
|
58
|
+
self.set_attributes(new_obj.get_attributes())
|
|
59
|
+
return True
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# Parameters:
|
|
63
|
+
# 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.
|
|
64
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
65
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `siem_http_destination_id`, `created_at`, `event_type`, `status` or `folder_behavior_id`.
|
|
66
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status`, `folder_behavior_id` or `siem_http_destination_id`. Valid field combinations are `[ event_type, created_at ]`, `[ remote_server_type, created_at ]`, `[ status, created_at ]`, `[ folder_behavior_id, created_at ]`, `[ event_type, status ]`, `[ remote_server_type, status ]`, `[ folder_behavior_id, status ]`, `[ event_type, status, created_at ]`, `[ remote_server_type, status, created_at ]` or `[ folder_behavior_id, status, created_at ]`.
|
|
67
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
68
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
69
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
70
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
71
|
+
def list(params=None, options=None):
|
|
72
|
+
if not isinstance(params, dict):
|
|
73
|
+
params = {}
|
|
74
|
+
if not isinstance(options, dict):
|
|
75
|
+
options = {}
|
|
76
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
77
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
78
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
79
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
80
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
81
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
82
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
83
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
84
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
85
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
86
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
87
|
+
raise InvalidParameterError(
|
|
88
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
89
|
+
)
|
|
90
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
91
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
92
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
93
|
+
raise InvalidParameterError(
|
|
94
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
95
|
+
)
|
|
96
|
+
return ListObj(ExternalEvent, "GET", "/external_events", params, options)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def all(params=None, options=None):
|
|
100
|
+
list(params, options)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# Parameters:
|
|
104
|
+
# id (required) - int64 - External Event ID.
|
|
105
|
+
def find(id, params=None, options=None):
|
|
106
|
+
if not isinstance(params, dict):
|
|
107
|
+
params = {}
|
|
108
|
+
if not isinstance(options, dict):
|
|
109
|
+
options = {}
|
|
110
|
+
params["id"] = id
|
|
111
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
112
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
113
|
+
if "id" not in params:
|
|
114
|
+
raise MissingParameterError("Parameter missing: id")
|
|
115
|
+
response, options = Api.send_request(
|
|
116
|
+
"GET", "/external_events/{id}".format(id=params["id"]), params, options
|
|
117
|
+
)
|
|
118
|
+
return ExternalEvent(response.data, options)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def get(id, params=None, options=None):
|
|
122
|
+
find(id, params, options)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
# Parameters:
|
|
126
|
+
# status (required) - string - Status of event.
|
|
127
|
+
# body (required) - string - Event body
|
|
128
|
+
def create(params=None, options=None):
|
|
129
|
+
if not isinstance(params, dict):
|
|
130
|
+
params = {}
|
|
131
|
+
if not isinstance(options, dict):
|
|
132
|
+
options = {}
|
|
133
|
+
if "status" in params and not isinstance(params["status"], str):
|
|
134
|
+
raise InvalidParameterError("Bad parameter: status must be an str")
|
|
135
|
+
if "body" in params and not isinstance(params["body"], str):
|
|
136
|
+
raise InvalidParameterError("Bad parameter: body must be an str")
|
|
137
|
+
if "status" not in params:
|
|
138
|
+
raise MissingParameterError("Parameter missing: status")
|
|
139
|
+
if "body" not in params:
|
|
140
|
+
raise MissingParameterError("Parameter missing: body")
|
|
141
|
+
response, options = Api.send_request(
|
|
142
|
+
"POST", "/external_events", params, options
|
|
143
|
+
)
|
|
144
|
+
return ExternalEvent(response.data, options)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def new(*args, **kwargs):
|
|
148
|
+
return ExternalEvent(*args, **kwargs)
|