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
files_sdk/list_obj.py ADDED
@@ -0,0 +1,42 @@
1
+ from files_sdk.api import Api
2
+
3
+
4
+ class ListObj:
5
+ def __init__(self, klass, path, method, params, options):
6
+ self.klass = klass
7
+ self.path = path
8
+ self.method = method
9
+ self.params = params
10
+ self.options = options
11
+ self.data = []
12
+ self.cursor = None
13
+
14
+ self.load_next_page()
15
+
16
+ def load_next_page(self):
17
+ if self.cursor is not None:
18
+ self.params["cursor"] = self.cursor
19
+ response, _options = Api.send_request(
20
+ self.path, self.method, self.params, self.options
21
+ )
22
+ self.data = [self.klass(d, self.options) for d in response.data]
23
+ self.cursor = response.headers.get("X-Files-Cursor", None)
24
+ return self
25
+
26
+ def __iter__(self):
27
+ return self.data.__iter__()
28
+
29
+ def __len__(self):
30
+ return self.data.__len__()
31
+
32
+ def auto_paging_iter(self):
33
+ while True:
34
+ for item in self.data:
35
+ yield item
36
+ if not self.has_next_page:
37
+ break
38
+ self.load_next_page()
39
+
40
+ @property
41
+ def has_next_page(self):
42
+ return True if self.cursor is not None else False
@@ -0,0 +1,104 @@
1
+ from files_sdk.models.account_line_item import AccountLineItem
2
+ from files_sdk.models.action import Action
3
+ from files_sdk.models.action_notification_export import (
4
+ ActionNotificationExport,
5
+ )
6
+ from files_sdk.models.action_notification_export_result import (
7
+ ActionNotificationExportResult,
8
+ )
9
+ from files_sdk.models.api_key import ApiKey
10
+ from files_sdk.models.api_request_log import ApiRequestLog
11
+ from files_sdk.models.app import App
12
+ from files_sdk.models.as2_incoming_message import As2IncomingMessage
13
+ from files_sdk.models.as2_outgoing_message import As2OutgoingMessage
14
+ from files_sdk.models.as2_partner import As2Partner
15
+ from files_sdk.models.as2_station import As2Station
16
+ from files_sdk.models.auto import Auto
17
+ from files_sdk.models.automation import Automation
18
+ from files_sdk.models.automation_log import AutomationLog
19
+ from files_sdk.models.automation_run import AutomationRun
20
+ from files_sdk.models.bandwidth_snapshot import BandwidthSnapshot
21
+ from files_sdk.models.behavior import Behavior
22
+ from files_sdk.models.bundle import Bundle
23
+ from files_sdk.models.bundle_action import BundleAction
24
+ from files_sdk.models.bundle_download import BundleDownload
25
+ from files_sdk.models.bundle_notification import BundleNotification
26
+ from files_sdk.models.bundle_path import BundlePath
27
+ from files_sdk.models.bundle_recipient import BundleRecipient
28
+ from files_sdk.models.bundle_registration import BundleRegistration
29
+ from files_sdk.models.clickwrap import Clickwrap
30
+ from files_sdk.models.dns_record import DnsRecord
31
+ from files_sdk.models.email_incoming_message import EmailIncomingMessage
32
+ from files_sdk.models.email_log import EmailLog
33
+ from files_sdk.models.errors import Errors
34
+ from files_sdk.models.exavault_api_request_log import ExavaultApiRequestLog
35
+ from files_sdk.models.external_event import ExternalEvent
36
+ from files_sdk.models.file import File
37
+ from files_sdk.models.file_action import FileAction
38
+ from files_sdk.models.file_comment import FileComment
39
+ from files_sdk.models.file_comment_reaction import FileCommentReaction
40
+ from files_sdk.models.file_migration import FileMigration
41
+ from files_sdk.models.file_migration_log import FileMigrationLog
42
+ from files_sdk.models.file_upload_part import FileUploadPart
43
+ from files_sdk.models.folder import Folder
44
+ from files_sdk.models.form_field import FormField
45
+ from files_sdk.models.form_field_set import FormFieldSet
46
+ from files_sdk.models.ftp_action_log import FtpActionLog
47
+ from files_sdk.models.gpg_key import GpgKey
48
+ from files_sdk.models.group import Group
49
+ from files_sdk.models.group_user import GroupUser
50
+ from files_sdk.models.history import History
51
+ from files_sdk.models.history_export import HistoryExport
52
+ from files_sdk.models.history_export_result import HistoryExportResult
53
+ from files_sdk.models.image import Image
54
+ from files_sdk.models.inbox_recipient import InboxRecipient
55
+ from files_sdk.models.inbox_registration import InboxRegistration
56
+ from files_sdk.models.inbox_upload import InboxUpload
57
+ from files_sdk.models.invoice import Invoice
58
+ from files_sdk.models.invoice_line_item import InvoiceLineItem
59
+ from files_sdk.models.ip_address import IpAddress
60
+ from files_sdk.models.lock import Lock
61
+ from files_sdk.models.message import Message
62
+ from files_sdk.models.message_comment import MessageComment
63
+ from files_sdk.models.message_comment_reaction import MessageCommentReaction
64
+ from files_sdk.models.message_reaction import MessageReaction
65
+ from files_sdk.models.notification import Notification
66
+ from files_sdk.models.outbound_connection_log import OutboundConnectionLog
67
+ from files_sdk.models.payment import Payment
68
+ from files_sdk.models.payment_line_item import PaymentLineItem
69
+ from files_sdk.models.permission import Permission
70
+ from files_sdk.models.preview import Preview
71
+ from files_sdk.models.priority import Priority
72
+ from files_sdk.models.project import Project
73
+ from files_sdk.models.public_hosting_request_log import PublicHostingRequestLog
74
+ from files_sdk.models.public_ip_address import PublicIpAddress
75
+ from files_sdk.models.public_key import PublicKey
76
+ from files_sdk.models.remote_bandwidth_snapshot import RemoteBandwidthSnapshot
77
+ from files_sdk.models.remote_server import RemoteServer
78
+ from files_sdk.models.remote_server_configuration_file import (
79
+ RemoteServerConfigurationFile,
80
+ )
81
+ from files_sdk.models.request import Request
82
+ from files_sdk.models.restore import Restore
83
+ from files_sdk.models.session import Session
84
+ from files_sdk.models.settings_change import SettingsChange
85
+ from files_sdk.models.sftp_action_log import SftpActionLog
86
+ from files_sdk.models.sftp_host_key import SftpHostKey
87
+ from files_sdk.models.share_group import ShareGroup
88
+ from files_sdk.models.share_group_member import ShareGroupMember
89
+ from files_sdk.models.siem_http_destination import SiemHttpDestination
90
+ from files_sdk.models.site import Site
91
+ from files_sdk.models.snapshot import Snapshot
92
+ from files_sdk.models.sso_strategy import SsoStrategy
93
+ from files_sdk.models.status import Status
94
+ from files_sdk.models.style import Style
95
+ from files_sdk.models.sync_log import SyncLog
96
+ from files_sdk.models.usage_by_top_level_dir import UsageByTopLevelDir
97
+ from files_sdk.models.usage_daily_snapshot import UsageDailySnapshot
98
+ from files_sdk.models.usage_snapshot import UsageSnapshot
99
+ from files_sdk.models.user import User
100
+ from files_sdk.models.user_cipher_use import UserCipherUse
101
+ from files_sdk.models.user_request import UserRequest
102
+ from files_sdk.models.user_sftp_client_use import UserSftpClientUse
103
+ from files_sdk.models.web_dav_action_log import WebDavActionLog
104
+ from files_sdk.models.webhook_test import WebhookTest
@@ -0,0 +1,51 @@
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 AccountLineItem:
11
+ default_attributes = {
12
+ "id": None, # int64 - Line item Id
13
+ "amount": None, # double - Line item amount
14
+ "balance": None, # double - Line item balance
15
+ "created_at": None, # date-time - Line item created at
16
+ "currency": None, # string - Line item currency
17
+ "download_uri": None, # string - Line item download uri
18
+ "invoice_line_items": None, # array(object) - Associated invoice line items
19
+ "method": None, # string - Line item payment method
20
+ "payment_line_items": None, # array(object) - Associated payment line items
21
+ "payment_reversed_at": None, # date-time - Date/time payment was reversed if applicable
22
+ "payment_type": None, # string - Type of payment if applicable
23
+ "site_name": None, # string - Site name this line item is for
24
+ "type": None, # string - Type of line item, either payment or invoice
25
+ }
26
+
27
+ def __init__(self, attributes=None, options=None):
28
+ if not isinstance(attributes, dict):
29
+ attributes = {}
30
+ if not isinstance(options, dict):
31
+ options = {}
32
+ self.set_attributes(attributes)
33
+ self.options = options
34
+
35
+ def set_attributes(self, attributes):
36
+ for (
37
+ attribute,
38
+ default_value,
39
+ ) in AccountLineItem.default_attributes.items():
40
+ setattr(self, attribute, attributes.get(attribute, default_value))
41
+
42
+ def get_attributes(self):
43
+ return {
44
+ k: getattr(self, k, None)
45
+ for k in AccountLineItem.default_attributes
46
+ if getattr(self, k, None) is not None
47
+ }
48
+
49
+
50
+ def new(*args, **kwargs):
51
+ return AccountLineItem(*args, **kwargs)
@@ -0,0 +1,49 @@
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 Action:
11
+ default_attributes = {
12
+ "id": None, # int64 - Action ID
13
+ "path": None, # string - Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
14
+ "when": None, # date-time - Action occurrence date/time
15
+ "destination": None, # string - The destination path for this action, if applicable
16
+ "display": None, # string - Friendly displayed output
17
+ "ip": None, # string - IP Address that performed this action
18
+ "source": None, # string - The source path for this action, if applicable
19
+ "targets": None, # object - Targets
20
+ "user_id": None, # int64 - User ID
21
+ "username": None, # string - Username
22
+ "user_is_from_parent_site": None, # boolean - true if this change was performed by a user on a parent site.
23
+ "action": None, # string - Type of action
24
+ "failure_type": None, # string - Failure type. If action was a user login or session failure, why did it fail?
25
+ "interface": None, # string - Interface on which this action occurred.
26
+ }
27
+
28
+ def __init__(self, attributes=None, options=None):
29
+ if not isinstance(attributes, dict):
30
+ attributes = {}
31
+ if not isinstance(options, dict):
32
+ options = {}
33
+ self.set_attributes(attributes)
34
+ self.options = options
35
+
36
+ def set_attributes(self, attributes):
37
+ for attribute, default_value in Action.default_attributes.items():
38
+ setattr(self, attribute, attributes.get(attribute, default_value))
39
+
40
+ def get_attributes(self):
41
+ return {
42
+ k: getattr(self, k, None)
43
+ for k in Action.default_attributes
44
+ if getattr(self, k, None) is not None
45
+ }
46
+
47
+
48
+ def new(*args, **kwargs):
49
+ return Action(*args, **kwargs)
@@ -0,0 +1,147 @@
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 ActionNotificationExport:
11
+ default_attributes = {
12
+ "id": None, # int64 - History Export ID
13
+ "export_version": None, # string - Version of the underlying records for the export.
14
+ "start_at": None, # date-time - Start date/time of export range.
15
+ "end_at": None, # date-time - End date/time of export range.
16
+ "status": None, # string - Status of export. Valid values: `building`, `ready`, or `failed`
17
+ "query_path": None, # string - Return notifications that were triggered by actions on this specific path.
18
+ "query_folder": None, # string - Return notifications that were triggered by actions in this folder.
19
+ "query_message": None, # string - Error message associated with the request, if any.
20
+ "query_request_method": None, # string - The HTTP request method used by the webhook.
21
+ "query_request_url": None, # string - The target webhook URL.
22
+ "query_status": None, # string - The HTTP status returned from the server in response to the webhook request.
23
+ "query_success": None, # boolean - true if the webhook request succeeded (i.e. returned a 200 or 204 response status). false otherwise.
24
+ "results_url": None, # string - If `status` is `ready`, this will be a URL where all the results can be downloaded at once as a CSV.
25
+ "user_id": None, # int64 - User ID. Provide a value of `0` to operate the current session's user.
26
+ }
27
+
28
+ def __init__(self, attributes=None, options=None):
29
+ if not isinstance(attributes, dict):
30
+ attributes = {}
31
+ if not isinstance(options, dict):
32
+ options = {}
33
+ self.set_attributes(attributes)
34
+ self.options = options
35
+
36
+ def set_attributes(self, attributes):
37
+ for (
38
+ attribute,
39
+ default_value,
40
+ ) in ActionNotificationExport.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 ActionNotificationExport.default_attributes
47
+ if getattr(self, k, None) is not None
48
+ }
49
+
50
+ def save(self):
51
+ if hasattr(self, "id") and self.id:
52
+ raise NotImplementedError(
53
+ "The ActionNotificationExport object doesn't support updates."
54
+ )
55
+ else:
56
+ new_obj = create(self.get_attributes(), self.options)
57
+ self.set_attributes(new_obj.get_attributes())
58
+ return True
59
+
60
+
61
+ # Parameters:
62
+ # id (required) - int64 - Action Notification Export ID.
63
+ def find(id, params=None, options=None):
64
+ if not isinstance(params, dict):
65
+ params = {}
66
+ if not isinstance(options, dict):
67
+ options = {}
68
+ params["id"] = id
69
+ if "id" in params and not isinstance(params["id"], int):
70
+ raise InvalidParameterError("Bad parameter: id must be an int")
71
+ if "id" not in params:
72
+ raise MissingParameterError("Parameter missing: id")
73
+ response, options = Api.send_request(
74
+ "GET",
75
+ "/action_notification_exports/{id}".format(id=params["id"]),
76
+ params,
77
+ options,
78
+ )
79
+ return ActionNotificationExport(response.data, options)
80
+
81
+
82
+ def get(id, params=None, options=None):
83
+ find(id, params, options)
84
+
85
+
86
+ # Parameters:
87
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
88
+ # start_at - string - Start date/time of export range.
89
+ # end_at - string - End date/time of export range.
90
+ # query_message - string - Error message associated with the request, if any.
91
+ # query_request_method - string - The HTTP request method used by the webhook.
92
+ # query_request_url - string - The target webhook URL.
93
+ # query_status - string - The HTTP status returned from the server in response to the webhook request.
94
+ # query_success - boolean - true if the webhook request succeeded (i.e. returned a 200 or 204 response status). false otherwise.
95
+ # query_path - string - Return notifications that were triggered by actions on this specific path.
96
+ # query_folder - string - Return notifications that were triggered by actions in this folder.
97
+ def create(params=None, options=None):
98
+ if not isinstance(params, dict):
99
+ params = {}
100
+ if not isinstance(options, dict):
101
+ options = {}
102
+ if "user_id" in params and not isinstance(params["user_id"], int):
103
+ raise InvalidParameterError("Bad parameter: user_id must be an int")
104
+ if "start_at" in params and not isinstance(params["start_at"], str):
105
+ raise InvalidParameterError("Bad parameter: start_at must be an str")
106
+ if "end_at" in params and not isinstance(params["end_at"], str):
107
+ raise InvalidParameterError("Bad parameter: end_at must be an str")
108
+ if "query_message" in params and not isinstance(
109
+ params["query_message"], str
110
+ ):
111
+ raise InvalidParameterError(
112
+ "Bad parameter: query_message must be an str"
113
+ )
114
+ if "query_request_method" in params and not isinstance(
115
+ params["query_request_method"], str
116
+ ):
117
+ raise InvalidParameterError(
118
+ "Bad parameter: query_request_method must be an str"
119
+ )
120
+ if "query_request_url" in params and not isinstance(
121
+ params["query_request_url"], str
122
+ ):
123
+ raise InvalidParameterError(
124
+ "Bad parameter: query_request_url must be an str"
125
+ )
126
+ if "query_status" in params and not isinstance(
127
+ params["query_status"], str
128
+ ):
129
+ raise InvalidParameterError(
130
+ "Bad parameter: query_status must be an str"
131
+ )
132
+ if "query_path" in params and not isinstance(params["query_path"], str):
133
+ raise InvalidParameterError("Bad parameter: query_path must be an str")
134
+ if "query_folder" in params and not isinstance(
135
+ params["query_folder"], str
136
+ ):
137
+ raise InvalidParameterError(
138
+ "Bad parameter: query_folder must be an str"
139
+ )
140
+ response, options = Api.send_request(
141
+ "POST", "/action_notification_exports", params, options
142
+ )
143
+ return ActionNotificationExport(response.data, options)
144
+
145
+
146
+ def new(*args, **kwargs):
147
+ return ActionNotificationExport(*args, **kwargs)
@@ -0,0 +1,88 @@
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 ActionNotificationExportResult:
12
+ default_attributes = {
13
+ "id": None, # int64 - Notification ID
14
+ "created_at": None, # int64 - When the notification was sent.
15
+ "status": None, # int64 - HTTP status code returned in the webhook response.
16
+ "message": None, # string - A message indicating the overall status of the webhook notification.
17
+ "success": None, # boolean - `true` if the webhook succeeded by receiving a 200 or 204 response.
18
+ "request_headers": None, # string - A JSON-encoded string with headers that were sent with the webhook.
19
+ "request_method": None, # string - The HTTP verb used to perform the webhook.
20
+ "request_url": None, # string - The webhook request URL.
21
+ "path": None, # string - The path to the actual file that triggered this notification. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
22
+ "folder": None, # string - The folder associated with the triggering action for this notification.
23
+ }
24
+
25
+ def __init__(self, attributes=None, options=None):
26
+ if not isinstance(attributes, dict):
27
+ attributes = {}
28
+ if not isinstance(options, dict):
29
+ options = {}
30
+ self.set_attributes(attributes)
31
+ self.options = options
32
+
33
+ def set_attributes(self, attributes):
34
+ for (
35
+ attribute,
36
+ default_value,
37
+ ) in ActionNotificationExportResult.default_attributes.items():
38
+ setattr(self, attribute, attributes.get(attribute, default_value))
39
+
40
+ def get_attributes(self):
41
+ return {
42
+ k: getattr(self, k, None)
43
+ for k in ActionNotificationExportResult.default_attributes
44
+ if getattr(self, k, None) is not None
45
+ }
46
+
47
+
48
+ # Parameters:
49
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
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
+ # action_notification_export_id (required) - int64 - ID of the associated action notification export.
53
+ def list(params=None, options=None):
54
+ if not isinstance(params, dict):
55
+ params = {}
56
+ if not isinstance(options, dict):
57
+ options = {}
58
+ if "user_id" in params and not isinstance(params["user_id"], int):
59
+ raise InvalidParameterError("Bad parameter: user_id must be an int")
60
+ if "cursor" in params and not isinstance(params["cursor"], str):
61
+ raise InvalidParameterError("Bad parameter: cursor must be an str")
62
+ if "per_page" in params and not isinstance(params["per_page"], int):
63
+ raise InvalidParameterError("Bad parameter: per_page must be an int")
64
+ if "action_notification_export_id" in params and not isinstance(
65
+ params["action_notification_export_id"], int
66
+ ):
67
+ raise InvalidParameterError(
68
+ "Bad parameter: action_notification_export_id must be an int"
69
+ )
70
+ if "action_notification_export_id" not in params:
71
+ raise MissingParameterError(
72
+ "Parameter missing: action_notification_export_id"
73
+ )
74
+ return ListObj(
75
+ ActionNotificationExportResult,
76
+ "GET",
77
+ "/action_notification_export_results",
78
+ params,
79
+ options,
80
+ )
81
+
82
+
83
+ def all(params=None, options=None):
84
+ list(params, options)
85
+
86
+
87
+ def new(*args, **kwargs):
88
+ return ActionNotificationExportResult(*args, **kwargs)