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.
- README.md +758 -0
- _VERSION +1 -0
- files_com-1.6.208.dist-info/METADATA +770 -0
- files_com-1.6.208.dist-info/RECORD +126 -0
- files_com-1.6.208.dist-info/WHEEL +5 -0
- files_com-1.6.208.dist-info/licenses/LICENSE +21 -0
- files_com-1.6.208.dist-info/top_level.txt +1 -0
- files_sdk/__init__.py +309 -0
- files_sdk/api.py +63 -0
- files_sdk/api_client.py +336 -0
- files_sdk/error.py +2981 -0
- files_sdk/list_obj.py +42 -0
- files_sdk/models/__init__.py +119 -0
- files_sdk/models/account_line_item.py +51 -0
- files_sdk/models/action.py +49 -0
- files_sdk/models/action_notification_export.py +153 -0
- files_sdk/models/action_notification_export_result.py +88 -0
- files_sdk/models/agent_push_update.py +44 -0
- files_sdk/models/api_key.py +318 -0
- files_sdk/models/api_request_log.py +105 -0
- files_sdk/models/app.py +89 -0
- files_sdk/models/as2_incoming_message.py +117 -0
- files_sdk/models/as2_outgoing_message.py +113 -0
- files_sdk/models/as2_partner.py +415 -0
- files_sdk/models/as2_station.py +282 -0
- files_sdk/models/auto.py +36 -0
- files_sdk/models/automation.py +823 -0
- files_sdk/models/automation_log.py +94 -0
- files_sdk/models/automation_run.py +112 -0
- files_sdk/models/bandwidth_snapshot.py +91 -0
- files_sdk/models/behavior.py +340 -0
- files_sdk/models/bundle.py +686 -0
- files_sdk/models/bundle_action.py +93 -0
- files_sdk/models/bundle_download.py +94 -0
- files_sdk/models/bundle_notification.py +252 -0
- files_sdk/models/bundle_path.py +37 -0
- files_sdk/models/bundle_recipient.py +133 -0
- files_sdk/models/bundle_registration.py +82 -0
- files_sdk/models/child_site_management_policy.py +278 -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 +84 -0
- files_sdk/models/errors.py +37 -0
- files_sdk/models/exavault_api_request_log.py +102 -0
- files_sdk/models/external_event.py +148 -0
- files_sdk/models/file.py +851 -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 +88 -0
- files_sdk/models/file_upload_part.py +54 -0
- files_sdk/models/folder.py +186 -0
- files_sdk/models/form_field.py +43 -0
- files_sdk/models/form_field_set.py +265 -0
- files_sdk/models/ftp_action_log.py +104 -0
- files_sdk/models/gpg_key.py +333 -0
- files_sdk/models/group.py +338 -0
- files_sdk/models/group_user.py +235 -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/holiday_region.py +58 -0
- files_sdk/models/image.py +37 -0
- files_sdk/models/inbound_s3_log.py +95 -0
- files_sdk/models/inbox_recipient.py +124 -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 +51 -0
- files_sdk/models/ip_address.py +119 -0
- files_sdk/models/key_lifecycle_rule.py +243 -0
- files_sdk/models/lock.py +174 -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 +451 -0
- files_sdk/models/outbound_connection_log.py +105 -0
- files_sdk/models/partner.py +307 -0
- files_sdk/models/payment.py +91 -0
- files_sdk/models/payment_line_item.py +42 -0
- files_sdk/models/permission.py +190 -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 +101 -0
- files_sdk/models/public_ip_address.py +42 -0
- files_sdk/models/public_key.py +269 -0
- files_sdk/models/remote_bandwidth_snapshot.py +91 -0
- files_sdk/models/remote_mount_backend.py +438 -0
- files_sdk/models/remote_server.py +1854 -0
- files_sdk/models/remote_server_configuration_file.py +73 -0
- files_sdk/models/remote_server_credential.py +855 -0
- files_sdk/models/request.py +184 -0
- files_sdk/models/restore.py +142 -0
- files_sdk/models/scim_log.py +88 -0
- files_sdk/models/session.py +100 -0
- files_sdk/models/settings_change.py +71 -0
- files_sdk/models/sftp_action_log.py +108 -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 +1074 -0
- files_sdk/models/site.py +1289 -0
- files_sdk/models/snapshot.py +255 -0
- files_sdk/models/sso_strategy.py +168 -0
- files_sdk/models/status.py +42 -0
- files_sdk/models/style.py +152 -0
- files_sdk/models/sync.py +588 -0
- files_sdk/models/sync_log.py +86 -0
- files_sdk/models/sync_run.py +124 -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 +1232 -0
- files_sdk/models/user_cipher_use.py +91 -0
- files_sdk/models/user_lifecycle_rule.py +355 -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 +104 -0
- files_sdk/models/webhook_test.py +116 -0
- files_sdk/models/workspace.py +202 -0
- files_sdk/path_util.py +42 -0
- files_sdk/util.py +34 -0
|
@@ -0,0 +1,63 @@
|
|
|
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 Priority:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"path": None, # string - The path corresponding to the priority color. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
|
14
|
+
"color": None, # string - The priority color
|
|
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 attribute, default_value in Priority.default_attributes.items():
|
|
27
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
28
|
+
|
|
29
|
+
def get_attributes(self):
|
|
30
|
+
return {
|
|
31
|
+
k: getattr(self, k, None)
|
|
32
|
+
for k in Priority.default_attributes
|
|
33
|
+
if getattr(self, k, None) is not None
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# Parameters:
|
|
38
|
+
# 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.
|
|
39
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
40
|
+
# path (required) - string - The path to query for priorities
|
|
41
|
+
def list(path, params=None, options=None):
|
|
42
|
+
if not isinstance(params, dict):
|
|
43
|
+
params = {}
|
|
44
|
+
if not isinstance(options, dict):
|
|
45
|
+
options = {}
|
|
46
|
+
params["path"] = path
|
|
47
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
48
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
49
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
50
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
51
|
+
if "path" in params and not isinstance(params["path"], str):
|
|
52
|
+
raise InvalidParameterError("Bad parameter: path must be an str")
|
|
53
|
+
if "path" not in params:
|
|
54
|
+
raise MissingParameterError("Parameter missing: path")
|
|
55
|
+
return ListObj(Priority, "GET", "/priorities", params, options)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def all(path, params=None, options=None):
|
|
59
|
+
list(path, params, options)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def new(*args, **kwargs):
|
|
63
|
+
return Priority(*args, **kwargs)
|
|
@@ -0,0 +1,205 @@
|
|
|
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 Project:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - Project ID
|
|
14
|
+
"global_access": None, # string - Global access settings
|
|
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 attribute, default_value in Project.default_attributes.items():
|
|
27
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
28
|
+
|
|
29
|
+
def get_attributes(self):
|
|
30
|
+
return {
|
|
31
|
+
k: getattr(self, k, None)
|
|
32
|
+
for k in Project.default_attributes
|
|
33
|
+
if getattr(self, k, None) is not None
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
# Parameters:
|
|
37
|
+
# global_access (required) - string - Global permissions. Can be: `none`, `anyone_with_read`, `anyone_with_full`.
|
|
38
|
+
def update(self, params=None):
|
|
39
|
+
if not isinstance(params, dict):
|
|
40
|
+
params = {}
|
|
41
|
+
|
|
42
|
+
if hasattr(self, "id") and self.id:
|
|
43
|
+
params["id"] = self.id
|
|
44
|
+
else:
|
|
45
|
+
raise MissingParameterError("Current object doesn't have a id")
|
|
46
|
+
if "id" not in params:
|
|
47
|
+
raise MissingParameterError("Parameter missing: id")
|
|
48
|
+
if "global_access" not in params:
|
|
49
|
+
raise MissingParameterError("Parameter missing: global_access")
|
|
50
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
51
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
52
|
+
if "global_access" in params and not isinstance(
|
|
53
|
+
params["global_access"], str
|
|
54
|
+
):
|
|
55
|
+
raise InvalidParameterError(
|
|
56
|
+
"Bad parameter: global_access must be an str"
|
|
57
|
+
)
|
|
58
|
+
response, _options = Api.send_request(
|
|
59
|
+
"PATCH",
|
|
60
|
+
"/projects/{id}".format(id=params["id"]),
|
|
61
|
+
params,
|
|
62
|
+
self.options,
|
|
63
|
+
)
|
|
64
|
+
return response.data
|
|
65
|
+
|
|
66
|
+
def delete(self, params=None):
|
|
67
|
+
if not isinstance(params, dict):
|
|
68
|
+
params = {}
|
|
69
|
+
|
|
70
|
+
if hasattr(self, "id") and self.id:
|
|
71
|
+
params["id"] = self.id
|
|
72
|
+
else:
|
|
73
|
+
raise MissingParameterError("Current object doesn't have a id")
|
|
74
|
+
if "id" not in params:
|
|
75
|
+
raise MissingParameterError("Parameter missing: id")
|
|
76
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
77
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
78
|
+
Api.send_request(
|
|
79
|
+
"DELETE",
|
|
80
|
+
"/projects/{id}".format(id=params["id"]),
|
|
81
|
+
params,
|
|
82
|
+
self.options,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
def destroy(self, params=None):
|
|
86
|
+
self.delete(params)
|
|
87
|
+
|
|
88
|
+
def save(self):
|
|
89
|
+
if hasattr(self, "id") and self.id:
|
|
90
|
+
new_obj = self.update(self.get_attributes())
|
|
91
|
+
self.set_attributes(new_obj.get_attributes())
|
|
92
|
+
return True
|
|
93
|
+
else:
|
|
94
|
+
new_obj = create(self.get_attributes(), self.options)
|
|
95
|
+
self.set_attributes(new_obj.get_attributes())
|
|
96
|
+
return True
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# Parameters:
|
|
100
|
+
# 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.
|
|
101
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
102
|
+
def list(params=None, options=None):
|
|
103
|
+
if not isinstance(params, dict):
|
|
104
|
+
params = {}
|
|
105
|
+
if not isinstance(options, dict):
|
|
106
|
+
options = {}
|
|
107
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
108
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
109
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
110
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
111
|
+
return ListObj(Project, "GET", "/projects", params, options)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def all(params=None, options=None):
|
|
115
|
+
list(params, options)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
# Parameters:
|
|
119
|
+
# id (required) - int64 - Project ID.
|
|
120
|
+
def find(id, params=None, options=None):
|
|
121
|
+
if not isinstance(params, dict):
|
|
122
|
+
params = {}
|
|
123
|
+
if not isinstance(options, dict):
|
|
124
|
+
options = {}
|
|
125
|
+
params["id"] = id
|
|
126
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
127
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
128
|
+
if "id" not in params:
|
|
129
|
+
raise MissingParameterError("Parameter missing: id")
|
|
130
|
+
response, options = Api.send_request(
|
|
131
|
+
"GET", "/projects/{id}".format(id=params["id"]), params, options
|
|
132
|
+
)
|
|
133
|
+
return Project(response.data, options)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def get(id, params=None, options=None):
|
|
137
|
+
find(id, params, options)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
# Parameters:
|
|
141
|
+
# global_access (required) - string - Global permissions. Can be: `none`, `anyone_with_read`, `anyone_with_full`.
|
|
142
|
+
def create(params=None, options=None):
|
|
143
|
+
if not isinstance(params, dict):
|
|
144
|
+
params = {}
|
|
145
|
+
if not isinstance(options, dict):
|
|
146
|
+
options = {}
|
|
147
|
+
if "global_access" in params and not isinstance(
|
|
148
|
+
params["global_access"], str
|
|
149
|
+
):
|
|
150
|
+
raise InvalidParameterError(
|
|
151
|
+
"Bad parameter: global_access must be an str"
|
|
152
|
+
)
|
|
153
|
+
if "global_access" not in params:
|
|
154
|
+
raise MissingParameterError("Parameter missing: global_access")
|
|
155
|
+
response, options = Api.send_request("POST", "/projects", params, options)
|
|
156
|
+
return Project(response.data, options)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
# Parameters:
|
|
160
|
+
# global_access (required) - string - Global permissions. Can be: `none`, `anyone_with_read`, `anyone_with_full`.
|
|
161
|
+
def update(id, params=None, options=None):
|
|
162
|
+
if not isinstance(params, dict):
|
|
163
|
+
params = {}
|
|
164
|
+
if not isinstance(options, dict):
|
|
165
|
+
options = {}
|
|
166
|
+
params["id"] = id
|
|
167
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
168
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
169
|
+
if "global_access" in params and not isinstance(
|
|
170
|
+
params["global_access"], str
|
|
171
|
+
):
|
|
172
|
+
raise InvalidParameterError(
|
|
173
|
+
"Bad parameter: global_access must be an str"
|
|
174
|
+
)
|
|
175
|
+
if "id" not in params:
|
|
176
|
+
raise MissingParameterError("Parameter missing: id")
|
|
177
|
+
if "global_access" not in params:
|
|
178
|
+
raise MissingParameterError("Parameter missing: global_access")
|
|
179
|
+
response, options = Api.send_request(
|
|
180
|
+
"PATCH", "/projects/{id}".format(id=params["id"]), params, options
|
|
181
|
+
)
|
|
182
|
+
return Project(response.data, options)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def delete(id, params=None, options=None):
|
|
186
|
+
if not isinstance(params, dict):
|
|
187
|
+
params = {}
|
|
188
|
+
if not isinstance(options, dict):
|
|
189
|
+
options = {}
|
|
190
|
+
params["id"] = id
|
|
191
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
192
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
193
|
+
if "id" not in params:
|
|
194
|
+
raise MissingParameterError("Parameter missing: id")
|
|
195
|
+
Api.send_request(
|
|
196
|
+
"DELETE", "/projects/{id}".format(id=params["id"]), params, options
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def destroy(id, params=None, options=None):
|
|
201
|
+
delete(id, params, options)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def new(*args, **kwargs):
|
|
205
|
+
return Project(*args, **kwargs)
|
|
@@ -0,0 +1,101 @@
|
|
|
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 PublicHostingRequestLog:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"timestamp": None, # date-time - Start Time of Action. Deprecrated: Use created_at.
|
|
14
|
+
"remote_ip": None, # string - IP Address of Public Hosting Client.
|
|
15
|
+
"server_ip": None, # string - IP Address of Public Hosting Server.
|
|
16
|
+
"hostname": None, # string - HTTP Request Hostname.
|
|
17
|
+
"path": None, # string - HTTP Request Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
|
18
|
+
"responseCode": None, # int64 - HTTP Response Code.
|
|
19
|
+
"success": None, # boolean - Whether SFTP Action was successful.
|
|
20
|
+
"duration_ms": None, # int64 - Duration (in milliseconds).
|
|
21
|
+
"created_at": None, # date-time - Start Time of Action.
|
|
22
|
+
"bytes_transferred": None, # int64 - The number of bytes transferred for file downloads.
|
|
23
|
+
"http_method": None, # string - Method of the HTTP call.
|
|
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 PublicHostingRequestLog.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 PublicHostingRequestLog.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
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `remote_ip`, `success` or `created_at`. Valid field combinations are `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
|
|
53
|
+
# 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 `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
|
|
54
|
+
# 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 `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
|
|
55
|
+
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`. Valid field combinations are `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
|
|
56
|
+
# 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 `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
|
|
57
|
+
# 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 `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
|
|
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 "filter" in params and not isinstance(params["filter"], dict):
|
|
68
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
69
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
70
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
71
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
72
|
+
raise InvalidParameterError(
|
|
73
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
74
|
+
)
|
|
75
|
+
if "filter_prefix" in params and not isinstance(
|
|
76
|
+
params["filter_prefix"], dict
|
|
77
|
+
):
|
|
78
|
+
raise InvalidParameterError(
|
|
79
|
+
"Bad parameter: filter_prefix must be an dict"
|
|
80
|
+
)
|
|
81
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
82
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
83
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
84
|
+
raise InvalidParameterError(
|
|
85
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
86
|
+
)
|
|
87
|
+
return ListObj(
|
|
88
|
+
PublicHostingRequestLog,
|
|
89
|
+
"GET",
|
|
90
|
+
"/public_hosting_request_logs",
|
|
91
|
+
params,
|
|
92
|
+
options,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def all(params=None, options=None):
|
|
97
|
+
list(params, options)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def new(*args, **kwargs):
|
|
101
|
+
return PublicHostingRequestLog(*args, **kwargs)
|
|
@@ -0,0 +1,42 @@
|
|
|
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 PublicIpAddress:
|
|
11
|
+
default_attributes = {
|
|
12
|
+
"ip_address": None, # string - The public IP address.
|
|
13
|
+
"server_name": None, # string - The name of the frontend server.
|
|
14
|
+
"ftp_enabled": None, # boolean
|
|
15
|
+
"sftp_enabled": None, # boolean
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
def __init__(self, attributes=None, options=None):
|
|
19
|
+
if not isinstance(attributes, dict):
|
|
20
|
+
attributes = {}
|
|
21
|
+
if not isinstance(options, dict):
|
|
22
|
+
options = {}
|
|
23
|
+
self.set_attributes(attributes)
|
|
24
|
+
self.options = options
|
|
25
|
+
|
|
26
|
+
def set_attributes(self, attributes):
|
|
27
|
+
for (
|
|
28
|
+
attribute,
|
|
29
|
+
default_value,
|
|
30
|
+
) in PublicIpAddress.default_attributes.items():
|
|
31
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
32
|
+
|
|
33
|
+
def get_attributes(self):
|
|
34
|
+
return {
|
|
35
|
+
k: getattr(self, k, None)
|
|
36
|
+
for k in PublicIpAddress.default_attributes
|
|
37
|
+
if getattr(self, k, None) is not None
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def new(*args, **kwargs):
|
|
42
|
+
return PublicIpAddress(*args, **kwargs)
|