files.com 1.1.768 → 1.1.770
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +47 -7
- data/_VERSION +1 -1
- data/docs/file.md +37 -0
- data/lib/files.com/api.rb +9 -4
- data/lib/files.com/api_client.rb +181 -55
- data/lib/files.com/list.rb +98 -66
- data/lib/files.com/models/action_log.rb +7 -2
- data/lib/files.com/models/action_notification_export.rb +13 -3
- data/lib/files.com/models/action_notification_export_result.rb +7 -2
- data/lib/files.com/models/ai_assistant_personality.rb +34 -8
- data/lib/files.com/models/ai_task.rb +39 -8
- data/lib/files.com/models/api_key.rb +49 -10
- data/lib/files.com/models/api_request_log.rb +7 -2
- data/lib/files.com/models/app.rb +7 -2
- data/lib/files.com/models/as2_incoming_message.rb +7 -2
- data/lib/files.com/models/as2_outgoing_message.rb +7 -2
- data/lib/files.com/models/as2_partner.rb +34 -8
- data/lib/files.com/models/as2_station.rb +34 -8
- data/lib/files.com/models/automation.rb +50 -10
- data/lib/files.com/models/automation_log.rb +7 -2
- data/lib/files.com/models/automation_run.rb +31 -6
- data/lib/files.com/models/bandwidth_snapshot.rb +7 -2
- data/lib/files.com/models/behavior.rb +46 -10
- data/lib/files.com/models/bundle.rb +39 -8
- data/lib/files.com/models/bundle_action.rb +7 -2
- data/lib/files.com/models/bundle_download.rb +7 -2
- data/lib/files.com/models/bundle_notification.rb +34 -8
- data/lib/files.com/models/bundle_recipient.rb +14 -4
- data/lib/files.com/models/bundle_registration.rb +7 -2
- data/lib/files.com/models/chat_session.rb +13 -3
- data/lib/files.com/models/child_site_management_policy.rb +34 -8
- data/lib/files.com/models/clickwrap.rb +34 -8
- data/lib/files.com/models/custom_domain.rb +40 -9
- data/lib/files.com/models/desktop_configuration_profile.rb +34 -8
- data/lib/files.com/models/dns_record.rb +7 -2
- data/lib/files.com/models/email_incoming_message.rb +7 -2
- data/lib/files.com/models/email_log.rb +7 -2
- data/lib/files.com/models/event_channel.rb +34 -8
- data/lib/files.com/models/event_delivery_attempt.rb +13 -3
- data/lib/files.com/models/event_record.rb +13 -3
- data/lib/files.com/models/event_subscription.rb +34 -8
- data/lib/files.com/models/event_target.rb +34 -8
- data/lib/files.com/models/exavault_api_request_log.rb +7 -2
- data/lib/files.com/models/expectation.rb +40 -9
- data/lib/files.com/models/expectation_evaluation.rb +13 -3
- data/lib/files.com/models/expectation_incident.rb +31 -6
- data/lib/files.com/models/external_event.rb +20 -5
- data/lib/files.com/models/file.rb +93 -15
- data/lib/files.com/models/file_comment.rb +28 -7
- data/lib/files.com/models/file_comment_reaction.rb +11 -2
- data/lib/files.com/models/file_migration.rb +6 -1
- data/lib/files.com/models/file_migration_log.rb +7 -2
- data/lib/files.com/models/folder.rb +13 -3
- data/lib/files.com/models/form_field_set.rb +34 -8
- data/lib/files.com/models/ftp_action_log.rb +7 -2
- data/lib/files.com/models/gpg_key.rb +34 -8
- data/lib/files.com/models/group.rb +34 -8
- data/lib/files.com/models/group_user.rb +29 -7
- data/lib/files.com/models/history.rb +35 -10
- data/lib/files.com/models/history_export.rb +13 -3
- data/lib/files.com/models/history_export_result.rb +7 -2
- data/lib/files.com/models/holiday_calendar.rb +34 -8
- data/lib/files.com/models/holiday_region.rb +7 -2
- data/lib/files.com/models/inbound_s3_log.rb +7 -2
- data/lib/files.com/models/inbox_recipient.rb +14 -4
- data/lib/files.com/models/inbox_registration.rb +7 -2
- data/lib/files.com/models/inbox_upload.rb +7 -2
- data/lib/files.com/models/integration_centric_profile.rb +34 -8
- data/lib/files.com/models/invoice.rb +13 -3
- data/lib/files.com/models/ip_address.rb +28 -8
- data/lib/files.com/models/key_lifecycle_rule.rb +34 -8
- data/lib/files.com/models/lock.rb +18 -3
- data/lib/files.com/models/metadata_category.rb +41 -10
- data/lib/files.com/models/notification.rb +34 -8
- data/lib/files.com/models/outbound_connection_log.rb +7 -2
- data/lib/files.com/models/partner.rb +34 -8
- data/lib/files.com/models/partner_channel.rb +34 -8
- data/lib/files.com/models/partner_channel_template.rb +34 -8
- data/lib/files.com/models/partner_site.rb +4 -0
- data/lib/files.com/models/partner_site_request.rb +33 -4
- data/lib/files.com/models/payment.rb +13 -3
- data/lib/files.com/models/pending_work_event.rb +13 -3
- data/lib/files.com/models/permission.rb +18 -4
- data/lib/files.com/models/public_hosting_request_log.rb +7 -2
- data/lib/files.com/models/public_key.rb +34 -8
- data/lib/files.com/models/remote_bandwidth_snapshot.rb +7 -2
- data/lib/files.com/models/remote_mount_backend.rb +39 -8
- data/lib/files.com/models/remote_server.rb +52 -11
- data/lib/files.com/models/remote_server_credential.rb +34 -8
- data/lib/files.com/models/request.rb +25 -6
- data/lib/files.com/models/restore.rb +14 -4
- data/lib/files.com/models/schedule.rb +34 -8
- data/lib/files.com/models/scheduled_export.rb +34 -8
- data/lib/files.com/models/scim_log.rb +13 -3
- data/lib/files.com/models/secret.rb +34 -8
- data/lib/files.com/models/session.rb +11 -2
- data/lib/files.com/models/settings_change.rb +7 -2
- data/lib/files.com/models/sftp_action_log.rb +7 -2
- data/lib/files.com/models/sftp_host_key.rb +34 -8
- data/lib/files.com/models/share_group.rb +34 -8
- data/lib/files.com/models/siem_http_destination.rb +39 -8
- data/lib/files.com/models/siem_http_destination_event.rb +13 -3
- data/lib/files.com/models/site.rb +16 -3
- data/lib/files.com/models/site_subdomain_redirect.rb +17 -3
- data/lib/files.com/models/snapshot.rb +39 -8
- data/lib/files.com/models/sso_event.rb +13 -3
- data/lib/files.com/models/sso_strategy.rb +18 -3
- data/lib/files.com/models/style.rb +20 -5
- data/lib/files.com/models/sync.rb +44 -8
- data/lib/files.com/models/sync_log.rb +7 -2
- data/lib/files.com/models/sync_run.rb +13 -3
- data/lib/files.com/models/usage_daily_snapshot.rb +7 -2
- data/lib/files.com/models/usage_snapshot.rb +7 -2
- data/lib/files.com/models/user.rb +50 -8
- data/lib/files.com/models/user_additional_email_recipient.rb +34 -8
- data/lib/files.com/models/user_cipher_use.rb +7 -2
- data/lib/files.com/models/user_lifecycle_rule.rb +34 -8
- data/lib/files.com/models/user_request.rb +24 -5
- data/lib/files.com/models/user_security_event.rb +13 -3
- data/lib/files.com/models/user_sftp_client_use.rb +7 -2
- data/lib/files.com/models/web_dav_action_log.rb +7 -2
- data/lib/files.com/models/webhook_test.rb +7 -2
- data/lib/files.com/models/workspace.rb +34 -8
- data/lib/files.com/response.rb +24 -0
- data/lib/files.com/sizable_io.rb +65 -4
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +23 -1
- data/spec/language_spec.rb +20 -10
- data/spec/lib/api_client_spec.rb +173 -18
- data/spec/list_spec.rb +203 -187
- data/spec/models/file_transfer_spec.rb +346 -0
- data/spec/models/persistence_spec.rb +167 -0
- data/spec/spec_helper.rb +122 -6
- data/spec/support/stubbed_api.rb +14 -0
- data/spec/support/transfer_server.rb +60 -0
- metadata +6 -2
|
@@ -89,7 +89,9 @@ module Files
|
|
|
89
89
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
|
90
90
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
91
91
|
|
|
92
|
-
Api.send_request("/event_channels/#{@attributes[:id]}", :patch, params, @options)
|
|
92
|
+
response, options = Api.send_request("/event_channels/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("EventChannel") }
|
|
93
|
+
@attributes = response.data
|
|
94
|
+
[ response, options ]
|
|
93
95
|
end
|
|
94
96
|
|
|
95
97
|
def delete(params = {})
|
|
@@ -109,12 +111,12 @@ module Files
|
|
|
109
111
|
|
|
110
112
|
def save
|
|
111
113
|
if @attributes[:id]
|
|
112
|
-
|
|
114
|
+
update(@attributes)
|
|
113
115
|
else
|
|
114
116
|
new_obj = EventChannel.create(@attributes, @options)
|
|
117
|
+
@attributes = new_obj.attributes
|
|
115
118
|
end
|
|
116
119
|
|
|
117
|
-
@attributes = new_obj.attributes
|
|
118
120
|
true
|
|
119
121
|
end
|
|
120
122
|
|
|
@@ -123,14 +125,19 @@ module Files
|
|
|
123
125
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
124
126
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `enabled`, `default_channel` or `workspace_id`.
|
|
125
127
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `enabled`, `default_channel` or `workspace_id`. Valid field combinations are `[ workspace_id, enabled ]` and `[ workspace_id, default_channel ]`.
|
|
128
|
+
#
|
|
129
|
+
# params:: Hash of API operation parameter values.
|
|
130
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
131
|
+
#
|
|
132
|
+
# Returns a Files::List of Files::EventChannel objects.
|
|
126
133
|
def self.list(params = {}, options = {})
|
|
127
134
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
128
135
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
129
136
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
130
137
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
131
138
|
|
|
132
|
-
List.new(EventChannel, params) do
|
|
133
|
-
Api.send_request("/event_channels", :get,
|
|
139
|
+
List.new(EventChannel, params) do |page_params, &check_page|
|
|
140
|
+
Api.send_request("/event_channels", :get, page_params, options, &check_page)
|
|
134
141
|
end
|
|
135
142
|
end
|
|
136
143
|
|
|
@@ -140,13 +147,18 @@ module Files
|
|
|
140
147
|
|
|
141
148
|
# Parameters:
|
|
142
149
|
# id (required) - int64 - Event Channel ID.
|
|
150
|
+
#
|
|
151
|
+
# params:: Hash of API operation parameter values.
|
|
152
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
153
|
+
#
|
|
154
|
+
# Returns a Files::EventChannel.
|
|
143
155
|
def self.find(id, params = {}, options = {})
|
|
144
156
|
params ||= {}
|
|
145
157
|
params[:id] = id
|
|
146
158
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
147
159
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
148
160
|
|
|
149
|
-
response, options = Api.send_request("/event_channels/#{params[:id]}", :get, params, options)
|
|
161
|
+
response, options = Api.send_request("/event_channels/#{params[:id]}", :get, params, options) { |reply| reply.require_object("EventChannel") }
|
|
150
162
|
EventChannel.new(response.data, options)
|
|
151
163
|
end
|
|
152
164
|
|
|
@@ -160,13 +172,18 @@ module Files
|
|
|
160
172
|
# description - string - Event Channel description.
|
|
161
173
|
# enabled - boolean - Whether this Event Channel can dispatch events.
|
|
162
174
|
# default_channel - boolean - Whether this Event Channel is the default destination for newly published events.
|
|
175
|
+
#
|
|
176
|
+
# params:: Hash of API operation parameter values.
|
|
177
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
178
|
+
#
|
|
179
|
+
# Returns a Files::EventChannel.
|
|
163
180
|
def self.create(params = {}, options = {})
|
|
164
181
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
165
182
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
166
183
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
|
167
184
|
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
|
168
185
|
|
|
169
|
-
response, options = Api.send_request("/event_channels", :post, params, options)
|
|
186
|
+
response, options = Api.send_request("/event_channels", :post, params, options) { |reply| reply.require_object("EventChannel") }
|
|
170
187
|
EventChannel.new(response.data, options)
|
|
171
188
|
end
|
|
172
189
|
|
|
@@ -176,6 +193,11 @@ module Files
|
|
|
176
193
|
# description - string - Event Channel description.
|
|
177
194
|
# enabled - boolean - Whether this Event Channel can dispatch events.
|
|
178
195
|
# default_channel - boolean - Whether this Event Channel is the default destination for newly published events.
|
|
196
|
+
#
|
|
197
|
+
# params:: Hash of API operation parameter values.
|
|
198
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
199
|
+
#
|
|
200
|
+
# Returns a Files::EventChannel.
|
|
179
201
|
def self.update(id, params = {}, options = {})
|
|
180
202
|
params ||= {}
|
|
181
203
|
params[:id] = id
|
|
@@ -185,10 +207,14 @@ module Files
|
|
|
185
207
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
|
186
208
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
187
209
|
|
|
188
|
-
response, options = Api.send_request("/event_channels/#{params[:id]}", :patch, params, options)
|
|
210
|
+
response, options = Api.send_request("/event_channels/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("EventChannel") }
|
|
189
211
|
EventChannel.new(response.data, options)
|
|
190
212
|
end
|
|
191
213
|
|
|
214
|
+
# params:: Hash of API operation parameter values.
|
|
215
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
216
|
+
#
|
|
217
|
+
# Returns nil.
|
|
192
218
|
def self.delete(id, params = {}, options = {})
|
|
193
219
|
params ||= {}
|
|
194
220
|
params[:id] = id
|
|
@@ -89,14 +89,19 @@ module Files
|
|
|
89
89
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
90
90
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`, `status`, `event_record_id`, `event_target_id` or `workspace_id`.
|
|
91
91
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id`, `event_record_id` or `event_target_id`. Valid field combinations are `[ workspace_id, status ]`, `[ workspace_id, event_record_id ]` or `[ workspace_id, event_target_id ]`.
|
|
92
|
+
#
|
|
93
|
+
# params:: Hash of API operation parameter values.
|
|
94
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
95
|
+
#
|
|
96
|
+
# Returns a Files::List of Files::EventDeliveryAttempt objects.
|
|
92
97
|
def self.list(params = {}, options = {})
|
|
93
98
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
94
99
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
95
100
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
96
101
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
97
102
|
|
|
98
|
-
List.new(EventDeliveryAttempt, params) do
|
|
99
|
-
Api.send_request("/event_delivery_attempts", :get,
|
|
103
|
+
List.new(EventDeliveryAttempt, params) do |page_params, &check_page|
|
|
104
|
+
Api.send_request("/event_delivery_attempts", :get, page_params, options, &check_page)
|
|
100
105
|
end
|
|
101
106
|
end
|
|
102
107
|
|
|
@@ -106,13 +111,18 @@ module Files
|
|
|
106
111
|
|
|
107
112
|
# Parameters:
|
|
108
113
|
# id (required) - int64 - Event Delivery Attempt ID.
|
|
114
|
+
#
|
|
115
|
+
# params:: Hash of API operation parameter values.
|
|
116
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
117
|
+
#
|
|
118
|
+
# Returns a Files::EventDeliveryAttempt.
|
|
109
119
|
def self.find(id, params = {}, options = {})
|
|
110
120
|
params ||= {}
|
|
111
121
|
params[:id] = id
|
|
112
122
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
113
123
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
114
124
|
|
|
115
|
-
response, options = Api.send_request("/event_delivery_attempts/#{params[:id]}", :get, params, options)
|
|
125
|
+
response, options = Api.send_request("/event_delivery_attempts/#{params[:id]}", :get, params, options) { |reply| reply.require_object("EventDeliveryAttempt") }
|
|
116
126
|
EventDeliveryAttempt.new(response.data, options)
|
|
117
127
|
end
|
|
118
128
|
|
|
@@ -94,6 +94,11 @@ module Files
|
|
|
94
94
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `event_type`.
|
|
95
95
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
96
96
|
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
97
|
+
#
|
|
98
|
+
# params:: Hash of API operation parameter values.
|
|
99
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
100
|
+
#
|
|
101
|
+
# Returns a Files::List of Files::EventRecord objects.
|
|
97
102
|
def self.list(params = {}, options = {})
|
|
98
103
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
99
104
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
@@ -105,8 +110,8 @@ module Files
|
|
|
105
110
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
106
111
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
107
112
|
|
|
108
|
-
List.new(EventRecord, params) do
|
|
109
|
-
Api.send_request("/event_records", :get,
|
|
113
|
+
List.new(EventRecord, params) do |page_params, &check_page|
|
|
114
|
+
Api.send_request("/event_records", :get, page_params, options, &check_page)
|
|
110
115
|
end
|
|
111
116
|
end
|
|
112
117
|
|
|
@@ -116,13 +121,18 @@ module Files
|
|
|
116
121
|
|
|
117
122
|
# Parameters:
|
|
118
123
|
# id (required) - int64 - Event Record ID.
|
|
124
|
+
#
|
|
125
|
+
# params:: Hash of API operation parameter values.
|
|
126
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
127
|
+
#
|
|
128
|
+
# Returns a Files::EventRecord.
|
|
119
129
|
def self.find(id, params = {}, options = {})
|
|
120
130
|
params ||= {}
|
|
121
131
|
params[:id] = id
|
|
122
132
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
123
133
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
124
134
|
|
|
125
|
-
response, options = Api.send_request("/event_records/#{params[:id]}", :get, params, options)
|
|
135
|
+
response, options = Api.send_request("/event_records/#{params[:id]}", :get, params, options) { |reply| reply.require_object("EventRecord") }
|
|
126
136
|
EventRecord.new(response.data, options)
|
|
127
137
|
end
|
|
128
138
|
|
|
@@ -163,7 +163,9 @@ module Files
|
|
|
163
163
|
raise InvalidParameterError.new("Bad parameter: event_target_ids must be an Array") if params[:event_target_ids] and !params[:event_target_ids].is_a?(Array)
|
|
164
164
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
165
165
|
|
|
166
|
-
Api.send_request("/event_subscriptions/#{@attributes[:id]}", :patch, params, @options)
|
|
166
|
+
response, options = Api.send_request("/event_subscriptions/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("EventSubscription") }
|
|
167
|
+
@attributes = response.data
|
|
168
|
+
[ response, options ]
|
|
167
169
|
end
|
|
168
170
|
|
|
169
171
|
def delete(params = {})
|
|
@@ -183,12 +185,12 @@ module Files
|
|
|
183
185
|
|
|
184
186
|
def save
|
|
185
187
|
if @attributes[:id]
|
|
186
|
-
|
|
188
|
+
update(@attributes)
|
|
187
189
|
else
|
|
188
190
|
new_obj = EventSubscription.create(@attributes, @options)
|
|
191
|
+
@attributes = new_obj.attributes
|
|
189
192
|
end
|
|
190
193
|
|
|
191
|
-
@attributes = new_obj.attributes
|
|
192
194
|
true
|
|
193
195
|
end
|
|
194
196
|
|
|
@@ -197,14 +199,19 @@ module Files
|
|
|
197
199
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
198
200
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `enabled`, `event_channel_id` or `workspace_id`.
|
|
199
201
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `enabled`, `event_channel_id` or `workspace_id`. Valid field combinations are `[ enabled, event_channel_id ]`, `[ workspace_id, enabled ]` or `[ workspace_id, enabled, event_channel_id ]`.
|
|
202
|
+
#
|
|
203
|
+
# params:: Hash of API operation parameter values.
|
|
204
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
205
|
+
#
|
|
206
|
+
# Returns a Files::List of Files::EventSubscription objects.
|
|
200
207
|
def self.list(params = {}, options = {})
|
|
201
208
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
202
209
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
203
210
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
204
211
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
205
212
|
|
|
206
|
-
List.new(EventSubscription, params) do
|
|
207
|
-
Api.send_request("/event_subscriptions", :get,
|
|
213
|
+
List.new(EventSubscription, params) do |page_params, &check_page|
|
|
214
|
+
Api.send_request("/event_subscriptions", :get, page_params, options, &check_page)
|
|
208
215
|
end
|
|
209
216
|
end
|
|
210
217
|
|
|
@@ -214,13 +221,18 @@ module Files
|
|
|
214
221
|
|
|
215
222
|
# Parameters:
|
|
216
223
|
# id (required) - int64 - Event Subscription ID.
|
|
224
|
+
#
|
|
225
|
+
# params:: Hash of API operation parameter values.
|
|
226
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
227
|
+
#
|
|
228
|
+
# Returns a Files::EventSubscription.
|
|
217
229
|
def self.find(id, params = {}, options = {})
|
|
218
230
|
params ||= {}
|
|
219
231
|
params[:id] = id
|
|
220
232
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
221
233
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
222
234
|
|
|
223
|
-
response, options = Api.send_request("/event_subscriptions/#{params[:id]}", :get, params, options)
|
|
235
|
+
response, options = Api.send_request("/event_subscriptions/#{params[:id]}", :get, params, options) { |reply| reply.require_object("EventSubscription") }
|
|
224
236
|
EventSubscription.new(response.data, options)
|
|
225
237
|
end
|
|
226
238
|
|
|
@@ -241,6 +253,11 @@ module Files
|
|
|
241
253
|
# filter - object - Structured event payload filter.
|
|
242
254
|
# delivery_policy - object - Event Subscription delivery policy.
|
|
243
255
|
# event_target_ids - array(int64) - Event Target IDs this subscription sends to.
|
|
256
|
+
#
|
|
257
|
+
# params:: Hash of API operation parameter values.
|
|
258
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
259
|
+
#
|
|
260
|
+
# Returns a Files::EventSubscription.
|
|
244
261
|
def self.create(params = {}, options = {})
|
|
245
262
|
raise InvalidParameterError.new("Bad parameter: event_channel_id must be an Integer") if params[:event_channel_id] and !params[:event_channel_id].is_a?(Integer)
|
|
246
263
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
@@ -253,7 +270,7 @@ module Files
|
|
|
253
270
|
raise InvalidParameterError.new("Bad parameter: event_target_ids must be an Array") if params[:event_target_ids] and !params[:event_target_ids].is_a?(Array)
|
|
254
271
|
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
|
255
272
|
|
|
256
|
-
response, options = Api.send_request("/event_subscriptions", :post, params, options)
|
|
273
|
+
response, options = Api.send_request("/event_subscriptions", :post, params, options) { |reply| reply.require_object("EventSubscription") }
|
|
257
274
|
EventSubscription.new(response.data, options)
|
|
258
275
|
end
|
|
259
276
|
|
|
@@ -270,6 +287,11 @@ module Files
|
|
|
270
287
|
# filter - object - Structured event payload filter.
|
|
271
288
|
# delivery_policy - object - Event Subscription delivery policy.
|
|
272
289
|
# event_target_ids - array(int64) - Event Target IDs this subscription sends to.
|
|
290
|
+
#
|
|
291
|
+
# params:: Hash of API operation parameter values.
|
|
292
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
293
|
+
#
|
|
294
|
+
# Returns a Files::EventSubscription.
|
|
273
295
|
def self.update(id, params = {}, options = {})
|
|
274
296
|
params ||= {}
|
|
275
297
|
params[:id] = id
|
|
@@ -285,10 +307,14 @@ module Files
|
|
|
285
307
|
raise InvalidParameterError.new("Bad parameter: event_target_ids must be an Array") if params[:event_target_ids] and !params[:event_target_ids].is_a?(Array)
|
|
286
308
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
287
309
|
|
|
288
|
-
response, options = Api.send_request("/event_subscriptions/#{params[:id]}", :patch, params, options)
|
|
310
|
+
response, options = Api.send_request("/event_subscriptions/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("EventSubscription") }
|
|
289
311
|
EventSubscription.new(response.data, options)
|
|
290
312
|
end
|
|
291
313
|
|
|
314
|
+
# params:: Hash of API operation parameter values.
|
|
315
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
316
|
+
#
|
|
317
|
+
# Returns nil.
|
|
292
318
|
def self.delete(id, params = {}, options = {})
|
|
293
319
|
params ||= {}
|
|
294
320
|
params[:id] = id
|
|
@@ -107,7 +107,9 @@ module Files
|
|
|
107
107
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
108
108
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
109
109
|
|
|
110
|
-
Api.send_request("/event_targets/#{@attributes[:id]}", :patch, params, @options)
|
|
110
|
+
response, options = Api.send_request("/event_targets/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("EventTarget") }
|
|
111
|
+
@attributes = response.data
|
|
112
|
+
[ response, options ]
|
|
111
113
|
end
|
|
112
114
|
|
|
113
115
|
def delete(params = {})
|
|
@@ -127,12 +129,12 @@ module Files
|
|
|
127
129
|
|
|
128
130
|
def save
|
|
129
131
|
if @attributes[:id]
|
|
130
|
-
|
|
132
|
+
update(@attributes)
|
|
131
133
|
else
|
|
132
134
|
new_obj = EventTarget.create(@attributes, @options)
|
|
135
|
+
@attributes = new_obj.attributes
|
|
133
136
|
end
|
|
134
137
|
|
|
135
|
-
@attributes = new_obj.attributes
|
|
136
138
|
true
|
|
137
139
|
end
|
|
138
140
|
|
|
@@ -141,14 +143,19 @@ module Files
|
|
|
141
143
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
142
144
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `enabled` or `workspace_id`.
|
|
143
145
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `enabled`, `target_type` or `workspace_id`. Valid field combinations are `[ enabled, target_type ]`, `[ workspace_id, enabled ]` or `[ workspace_id, enabled, target_type ]`.
|
|
146
|
+
#
|
|
147
|
+
# params:: Hash of API operation parameter values.
|
|
148
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
149
|
+
#
|
|
150
|
+
# Returns a Files::List of Files::EventTarget objects.
|
|
144
151
|
def self.list(params = {}, options = {})
|
|
145
152
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
146
153
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
147
154
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
148
155
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
149
156
|
|
|
150
|
-
List.new(EventTarget, params) do
|
|
151
|
-
Api.send_request("/event_targets", :get,
|
|
157
|
+
List.new(EventTarget, params) do |page_params, &check_page|
|
|
158
|
+
Api.send_request("/event_targets", :get, page_params, options, &check_page)
|
|
152
159
|
end
|
|
153
160
|
end
|
|
154
161
|
|
|
@@ -158,13 +165,18 @@ module Files
|
|
|
158
165
|
|
|
159
166
|
# Parameters:
|
|
160
167
|
# id (required) - int64 - Event Target ID.
|
|
168
|
+
#
|
|
169
|
+
# params:: Hash of API operation parameter values.
|
|
170
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
171
|
+
#
|
|
172
|
+
# Returns a Files::EventTarget.
|
|
161
173
|
def self.find(id, params = {}, options = {})
|
|
162
174
|
params ||= {}
|
|
163
175
|
params[:id] = id
|
|
164
176
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
165
177
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
166
178
|
|
|
167
|
-
response, options = Api.send_request("/event_targets/#{params[:id]}", :get, params, options)
|
|
179
|
+
response, options = Api.send_request("/event_targets/#{params[:id]}", :get, params, options) { |reply| reply.require_object("EventTarget") }
|
|
168
180
|
EventTarget.new(response.data, options)
|
|
169
181
|
end
|
|
170
182
|
|
|
@@ -180,6 +192,11 @@ module Files
|
|
|
180
192
|
# config (required) - object - Event Target configuration. Folder targets accept path and format (json or csv).
|
|
181
193
|
# delivery_policy - object - Event Target delivery policy. Email and folder targets support batch_interval in seconds, between 600 and 86400.
|
|
182
194
|
# target_type (required) - string - Event Target type.
|
|
195
|
+
#
|
|
196
|
+
# params:: Hash of API operation parameter values.
|
|
197
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
198
|
+
#
|
|
199
|
+
# Returns a Files::EventTarget.
|
|
183
200
|
def self.create(params = {}, options = {})
|
|
184
201
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
185
202
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
@@ -190,7 +207,7 @@ module Files
|
|
|
190
207
|
raise MissingParameterError.new("Parameter missing: config") unless params[:config]
|
|
191
208
|
raise MissingParameterError.new("Parameter missing: target_type") unless params[:target_type]
|
|
192
209
|
|
|
193
|
-
response, options = Api.send_request("/event_targets", :post, params, options)
|
|
210
|
+
response, options = Api.send_request("/event_targets", :post, params, options) { |reply| reply.require_object("EventTarget") }
|
|
194
211
|
EventTarget.new(response.data, options)
|
|
195
212
|
end
|
|
196
213
|
|
|
@@ -201,6 +218,11 @@ module Files
|
|
|
201
218
|
# enabled - boolean - Whether this Event Target can receive events.
|
|
202
219
|
# config - object - Event Target configuration. Folder targets accept path and format (json or csv).
|
|
203
220
|
# delivery_policy - object - Event Target delivery policy. Email and folder targets support batch_interval in seconds, between 600 and 86400.
|
|
221
|
+
#
|
|
222
|
+
# params:: Hash of API operation parameter values.
|
|
223
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
224
|
+
#
|
|
225
|
+
# Returns a Files::EventTarget.
|
|
204
226
|
def self.update(id, params = {}, options = {})
|
|
205
227
|
params ||= {}
|
|
206
228
|
params[:id] = id
|
|
@@ -211,10 +233,14 @@ module Files
|
|
|
211
233
|
raise InvalidParameterError.new("Bad parameter: delivery_policy must be an Hash") if params[:delivery_policy] and !params[:delivery_policy].is_a?(Hash)
|
|
212
234
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
213
235
|
|
|
214
|
-
response, options = Api.send_request("/event_targets/#{params[:id]}", :patch, params, options)
|
|
236
|
+
response, options = Api.send_request("/event_targets/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("EventTarget") }
|
|
215
237
|
EventTarget.new(response.data, options)
|
|
216
238
|
end
|
|
217
239
|
|
|
240
|
+
# params:: Hash of API operation parameter values.
|
|
241
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
242
|
+
#
|
|
243
|
+
# Returns nil.
|
|
218
244
|
def self.delete(id, params = {}, options = {})
|
|
219
245
|
params ||= {}
|
|
220
246
|
params[:id] = id
|
|
@@ -78,6 +78,11 @@ module Files
|
|
|
78
78
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `request_ip` and `request_method`. Valid field combinations are `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ created_at ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_ip, created_at ]`, `[ request_method, success ]`, `[ request_method, created_at ]`, `[ success, created_at ]`, `[ request_ip, request_method, success ]`, `[ request_ip, request_method, created_at ]`, `[ request_ip, success, created_at ]`, `[ request_method, success, created_at ]` or `[ request_ip, request_method, success, created_at ]`.
|
|
79
79
|
# 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 `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ created_at ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_ip, created_at ]`, `[ request_method, success ]`, `[ request_method, created_at ]`, `[ success, created_at ]`, `[ request_ip, request_method, success ]`, `[ request_ip, request_method, created_at ]`, `[ request_ip, success, created_at ]`, `[ request_method, success, created_at ]` or `[ request_ip, request_method, success, created_at ]`.
|
|
80
80
|
# 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 `[ request_ip ]`, `[ request_method ]`, `[ success ]`, `[ created_at ]`, `[ request_ip, request_method ]`, `[ request_ip, success ]`, `[ request_ip, created_at ]`, `[ request_method, success ]`, `[ request_method, created_at ]`, `[ success, created_at ]`, `[ request_ip, request_method, success ]`, `[ request_ip, request_method, created_at ]`, `[ request_ip, success, created_at ]`, `[ request_method, success, created_at ]` or `[ request_ip, request_method, success, created_at ]`.
|
|
81
|
+
#
|
|
82
|
+
# params:: Hash of API operation parameter values.
|
|
83
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
84
|
+
#
|
|
85
|
+
# Returns a Files::List of Files::ExavaultApiRequestLog objects.
|
|
81
86
|
def self.list(params = {}, options = {})
|
|
82
87
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
83
88
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
@@ -88,8 +93,8 @@ module Files
|
|
|
88
93
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
89
94
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
90
95
|
|
|
91
|
-
List.new(ExavaultApiRequestLog, params) do
|
|
92
|
-
Api.send_request("/exavault_api_request_logs", :get,
|
|
96
|
+
List.new(ExavaultApiRequestLog, params) do |page_params, &check_page|
|
|
97
|
+
Api.send_request("/exavault_api_request_logs", :get, page_params, options, &check_page)
|
|
93
98
|
end
|
|
94
99
|
end
|
|
95
100
|
|
|
@@ -321,7 +321,9 @@ module Files
|
|
|
321
321
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
322
322
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
323
323
|
|
|
324
|
-
Api.send_request("/expectations/#{@attributes[:id]}", :patch, params, @options)
|
|
324
|
+
response, options = Api.send_request("/expectations/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Expectation") }
|
|
325
|
+
@attributes = response.data
|
|
326
|
+
[ response, options ]
|
|
325
327
|
end
|
|
326
328
|
|
|
327
329
|
def delete(params = {})
|
|
@@ -341,12 +343,12 @@ module Files
|
|
|
341
343
|
|
|
342
344
|
def save
|
|
343
345
|
if @attributes[:id]
|
|
344
|
-
|
|
346
|
+
update(@attributes)
|
|
345
347
|
else
|
|
346
348
|
new_obj = Expectation.create(@attributes, @options)
|
|
349
|
+
@attributes = new_obj.attributes
|
|
347
350
|
end
|
|
348
351
|
|
|
349
|
-
@attributes = new_obj.attributes
|
|
350
352
|
true
|
|
351
353
|
end
|
|
352
354
|
|
|
@@ -355,14 +357,19 @@ module Files
|
|
|
355
357
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
356
358
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `name` or `disabled`.
|
|
357
359
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled` and `workspace_id`. Valid field combinations are `[ workspace_id, disabled ]`.
|
|
360
|
+
#
|
|
361
|
+
# params:: Hash of API operation parameter values.
|
|
362
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
363
|
+
#
|
|
364
|
+
# Returns a Files::List of Files::Expectation objects.
|
|
358
365
|
def self.list(params = {}, options = {})
|
|
359
366
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
360
367
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
361
368
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
362
369
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
363
370
|
|
|
364
|
-
List.new(Expectation, params) do
|
|
365
|
-
Api.send_request("/expectations", :get,
|
|
371
|
+
List.new(Expectation, params) do |page_params, &check_page|
|
|
372
|
+
Api.send_request("/expectations", :get, page_params, options, &check_page)
|
|
366
373
|
end
|
|
367
374
|
end
|
|
368
375
|
|
|
@@ -372,13 +379,18 @@ module Files
|
|
|
372
379
|
|
|
373
380
|
# Parameters:
|
|
374
381
|
# id (required) - int64 - Expectation ID.
|
|
382
|
+
#
|
|
383
|
+
# params:: Hash of API operation parameter values.
|
|
384
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
385
|
+
#
|
|
386
|
+
# Returns a Files::Expectation.
|
|
375
387
|
def self.find(id, params = {}, options = {})
|
|
376
388
|
params ||= {}
|
|
377
389
|
params[:id] = id
|
|
378
390
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
379
391
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
380
392
|
|
|
381
|
-
response, options = Api.send_request("/expectations/#{params[:id]}", :get, params, options)
|
|
393
|
+
response, options = Api.send_request("/expectations/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Expectation") }
|
|
382
394
|
Expectation.new(response.data, options)
|
|
383
395
|
end
|
|
384
396
|
|
|
@@ -408,6 +420,11 @@ module Files
|
|
|
408
420
|
# max_open_interval - int64 - Hard-stop duration in seconds for unscheduled expectations.
|
|
409
421
|
# criteria - object - Versioned success criteria definition for the expectation, including optional Files Transform Script content validation in criteria v2.
|
|
410
422
|
# workspace_id - int64 - Workspace ID. `0` means the default workspace.
|
|
423
|
+
#
|
|
424
|
+
# params:: Hash of API operation parameter values.
|
|
425
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
426
|
+
#
|
|
427
|
+
# Returns a Files::Expectation.
|
|
411
428
|
def self.create(params = {}, options = {})
|
|
412
429
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
413
430
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
|
@@ -430,18 +447,23 @@ module Files
|
|
|
430
447
|
raise InvalidParameterError.new("Bad parameter: criteria must be an Hash") if params[:criteria] and !params[:criteria].is_a?(Hash)
|
|
431
448
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
432
449
|
|
|
433
|
-
response, options = Api.send_request("/expectations", :post, params, options)
|
|
450
|
+
response, options = Api.send_request("/expectations", :post, params, options) { |reply| reply.require_object("Expectation") }
|
|
434
451
|
Expectation.new(response.data, options)
|
|
435
452
|
end
|
|
436
453
|
|
|
437
454
|
# Manually open an Expectation window
|
|
455
|
+
#
|
|
456
|
+
# params:: Hash of API operation parameter values.
|
|
457
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
458
|
+
#
|
|
459
|
+
# Returns a Files::ExpectationEvaluation.
|
|
438
460
|
def self.trigger_evaluation(id, params = {}, options = {})
|
|
439
461
|
params ||= {}
|
|
440
462
|
params[:id] = id
|
|
441
463
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
442
464
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
443
465
|
|
|
444
|
-
response, options = Api.send_request("/expectations/#{params[:id]}/trigger_evaluation", :post, params, options)
|
|
466
|
+
response, options = Api.send_request("/expectations/#{params[:id]}/trigger_evaluation", :post, params, options) { |reply| reply.require_object("ExpectationEvaluation") }
|
|
445
467
|
ExpectationEvaluation.new(response.data, options)
|
|
446
468
|
end
|
|
447
469
|
|
|
@@ -467,6 +489,11 @@ module Files
|
|
|
467
489
|
# max_open_interval - int64 - Hard-stop duration in seconds for unscheduled expectations.
|
|
468
490
|
# criteria - object - Versioned success criteria definition for the expectation, including optional Files Transform Script content validation in criteria v2.
|
|
469
491
|
# workspace_id - int64 - Workspace ID. `0` means the default workspace.
|
|
492
|
+
#
|
|
493
|
+
# params:: Hash of API operation parameter values.
|
|
494
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
495
|
+
#
|
|
496
|
+
# Returns a Files::Expectation.
|
|
470
497
|
def self.update(id, params = {}, options = {})
|
|
471
498
|
params ||= {}
|
|
472
499
|
params[:id] = id
|
|
@@ -493,10 +520,14 @@ module Files
|
|
|
493
520
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
494
521
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
495
522
|
|
|
496
|
-
response, options = Api.send_request("/expectations/#{params[:id]}", :patch, params, options)
|
|
523
|
+
response, options = Api.send_request("/expectations/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Expectation") }
|
|
497
524
|
Expectation.new(response.data, options)
|
|
498
525
|
end
|
|
499
526
|
|
|
527
|
+
# params:: Hash of API operation parameter values.
|
|
528
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
529
|
+
#
|
|
530
|
+
# Returns nil.
|
|
500
531
|
def self.delete(id, params = {}, options = {})
|
|
501
532
|
params ||= {}
|
|
502
533
|
params[:id] = id
|
|
@@ -104,14 +104,19 @@ module Files
|
|
|
104
104
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
105
105
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `created_at` or `expectation_id`.
|
|
106
106
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `expectation_id` and `workspace_id`. Valid field combinations are `[ workspace_id, expectation_id ]`.
|
|
107
|
+
#
|
|
108
|
+
# params:: Hash of API operation parameter values.
|
|
109
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
110
|
+
#
|
|
111
|
+
# Returns a Files::List of Files::ExpectationEvaluation objects.
|
|
107
112
|
def self.list(params = {}, options = {})
|
|
108
113
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
109
114
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
110
115
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
111
116
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
112
117
|
|
|
113
|
-
List.new(ExpectationEvaluation, params) do
|
|
114
|
-
Api.send_request("/expectation_evaluations", :get,
|
|
118
|
+
List.new(ExpectationEvaluation, params) do |page_params, &check_page|
|
|
119
|
+
Api.send_request("/expectation_evaluations", :get, page_params, options, &check_page)
|
|
115
120
|
end
|
|
116
121
|
end
|
|
117
122
|
|
|
@@ -121,13 +126,18 @@ module Files
|
|
|
121
126
|
|
|
122
127
|
# Parameters:
|
|
123
128
|
# id (required) - int64 - Expectation Evaluation ID.
|
|
129
|
+
#
|
|
130
|
+
# params:: Hash of API operation parameter values.
|
|
131
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
132
|
+
#
|
|
133
|
+
# Returns a Files::ExpectationEvaluation.
|
|
124
134
|
def self.find(id, params = {}, options = {})
|
|
125
135
|
params ||= {}
|
|
126
136
|
params[:id] = id
|
|
127
137
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
128
138
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
129
139
|
|
|
130
|
-
response, options = Api.send_request("/expectation_evaluations/#{params[:id]}", :get, params, options)
|
|
140
|
+
response, options = Api.send_request("/expectation_evaluations/#{params[:id]}", :get, params, options) { |reply| reply.require_object("ExpectationEvaluation") }
|
|
131
141
|
ExpectationEvaluation.new(response.data, options)
|
|
132
142
|
end
|
|
133
143
|
|