files.com 1.1.785 → 1.1.787
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/README.md +2 -2
- data/_VERSION +1 -1
- data/lib/files.com/api.rb +20 -5
- data/lib/files.com/api_client.rb +196 -17
- data/lib/files.com/list.rb +4 -2
- data/lib/files.com/models/action_log.rb +4 -1
- data/lib/files.com/models/action_notification_export.rb +3 -1
- data/lib/files.com/models/action_notification_export_result.rb +4 -1
- data/lib/files.com/models/ai_assistant_personality.rb +20 -7
- data/lib/files.com/models/ai_task.rb +22 -10
- data/lib/files.com/models/api_key.rb +15 -7
- data/lib/files.com/models/api_request_log.rb +4 -1
- data/lib/files.com/models/app.rb +4 -1
- data/lib/files.com/models/as2_incoming_message.rb +4 -1
- data/lib/files.com/models/as2_outgoing_message.rb +4 -1
- data/lib/files.com/models/as2_partner.rb +18 -7
- data/lib/files.com/models/as2_station.rb +14 -7
- data/lib/files.com/models/automation.rb +47 -13
- data/lib/files.com/models/automation_log.rb +4 -1
- data/lib/files.com/models/automation_run.rb +16 -9
- data/lib/files.com/models/bandwidth_snapshot.rb +4 -1
- data/lib/files.com/models/behavior.rb +27 -9
- data/lib/files.com/models/bundle.rb +57 -10
- data/lib/files.com/models/bundle_action.rb +4 -1
- data/lib/files.com/models/bundle_download.rb +4 -1
- data/lib/files.com/models/bundle_notification.rb +20 -7
- data/lib/files.com/models/bundle_recipient.rb +6 -1
- data/lib/files.com/models/bundle_registration.rb +4 -1
- data/lib/files.com/models/chat_session.rb +5 -2
- data/lib/files.com/models/child_site_management_policy.rb +18 -7
- data/lib/files.com/models/clickwrap.rb +14 -7
- data/lib/files.com/models/custom_domain.rb +18 -8
- data/lib/files.com/models/desktop_configuration_profile.rb +21 -7
- data/lib/files.com/models/dns_record.rb +4 -1
- data/lib/files.com/models/email_incoming_message.rb +4 -1
- data/lib/files.com/models/email_log.rb +4 -1
- data/lib/files.com/models/event_channel.rb +20 -7
- data/lib/files.com/models/event_delivery_attempt.rb +5 -2
- data/lib/files.com/models/event_record.rb +5 -2
- data/lib/files.com/models/event_subscription.rb +25 -7
- data/lib/files.com/models/event_target.rb +22 -7
- data/lib/files.com/models/exavault_api_request_log.rb +4 -1
- data/lib/files.com/models/expectation.rb +23 -10
- data/lib/files.com/models/expectation_evaluation.rb +5 -2
- data/lib/files.com/models/expectation_incident.rb +20 -11
- data/lib/files.com/models/external_event.rb +6 -2
- data/lib/files.com/models/file.rb +110 -37
- data/lib/files.com/models/file_comment.rb +14 -7
- data/lib/files.com/models/file_comment_reaction.rb +6 -3
- data/lib/files.com/models/file_migration.rb +1 -1
- data/lib/files.com/models/file_migration_log.rb +4 -1
- data/lib/files.com/models/folder.rb +11 -3
- data/lib/files.com/models/form_field_set.rb +26 -7
- data/lib/files.com/models/ftp_action_log.rb +4 -1
- data/lib/files.com/models/gpg_key.rb +15 -7
- data/lib/files.com/models/group.rb +30 -7
- data/lib/files.com/models/group_user.rb +16 -6
- data/lib/files.com/models/history.rb +23 -8
- data/lib/files.com/models/history_export.rb +2 -1
- data/lib/files.com/models/history_export_result.rb +4 -1
- data/lib/files.com/models/holiday_calendar.rb +15 -7
- data/lib/files.com/models/holiday_region.rb +4 -1
- data/lib/files.com/models/inbound_s3_log.rb +4 -1
- data/lib/files.com/models/inbox_recipient.rb +6 -1
- data/lib/files.com/models/inbox_registration.rb +4 -1
- data/lib/files.com/models/inbox_upload.rb +4 -1
- data/lib/files.com/models/integration_centric_profile.rb +17 -7
- data/lib/files.com/models/invoice.rb +5 -2
- data/lib/files.com/models/ip_address.rb +16 -4
- data/lib/files.com/models/key_lifecycle_rule.rb +17 -7
- data/lib/files.com/models/lock.rb +16 -6
- data/lib/files.com/models/metadata_category.rb +19 -9
- data/lib/files.com/models/notification.rb +39 -7
- data/lib/files.com/models/outbound_connection_log.rb +4 -1
- data/lib/files.com/models/partner.rb +32 -7
- data/lib/files.com/models/partner_channel.rb +17 -7
- data/lib/files.com/models/partner_channel_template.rb +17 -7
- data/lib/files.com/models/partner_site.rb +5 -3
- data/lib/files.com/models/partner_site_request.rb +10 -4
- data/lib/files.com/models/payment.rb +5 -2
- data/lib/files.com/models/pending_work_event.rb +5 -2
- data/lib/files.com/models/permission.rb +12 -4
- data/lib/files.com/models/public_hosting_request_log.rb +4 -1
- data/lib/files.com/models/public_key.rb +15 -7
- data/lib/files.com/models/remote_bandwidth_snapshot.rb +4 -1
- data/lib/files.com/models/remote_mount_backend.rb +25 -10
- data/lib/files.com/models/remote_server.rb +46 -14
- data/lib/files.com/models/remote_server_credential.rb +14 -7
- data/lib/files.com/models/request.rb +17 -6
- data/lib/files.com/models/restore.rb +8 -1
- data/lib/files.com/models/schedule.rb +14 -7
- data/lib/files.com/models/scheduled_export.rb +18 -7
- data/lib/files.com/models/scim_log.rb +5 -2
- data/lib/files.com/models/secret.rb +15 -7
- data/lib/files.com/models/session.rb +1 -0
- data/lib/files.com/models/settings_change.rb +4 -1
- data/lib/files.com/models/sftp_action_log.rb +4 -1
- data/lib/files.com/models/sftp_host_key.rb +17 -7
- data/lib/files.com/models/share_group.rb +14 -7
- data/lib/files.com/models/siem_http_destination.rb +67 -7
- data/lib/files.com/models/siem_http_destination_event.rb +5 -2
- data/lib/files.com/models/site.rb +109 -0
- data/lib/files.com/models/site_subdomain_redirect.rb +10 -5
- data/lib/files.com/models/snapshot.rb +19 -10
- data/lib/files.com/models/sso_event.rb +5 -2
- data/lib/files.com/models/sso_strategy.rb +10 -5
- data/lib/files.com/models/style.rb +9 -6
- data/lib/files.com/models/sync.rb +36 -13
- data/lib/files.com/models/sync_log.rb +4 -1
- data/lib/files.com/models/sync_run.rb +5 -2
- data/lib/files.com/models/usage_daily_snapshot.rb +4 -1
- data/lib/files.com/models/usage_snapshot.rb +4 -1
- data/lib/files.com/models/user.rb +124 -16
- data/lib/files.com/models/user_additional_email_recipient.rb +14 -7
- data/lib/files.com/models/user_cipher_use.rb +4 -1
- data/lib/files.com/models/user_lifecycle_rule.rb +26 -7
- data/lib/files.com/models/user_request.rb +11 -5
- data/lib/files.com/models/user_security_event.rb +5 -2
- data/lib/files.com/models/user_sftp_client_use.rb +4 -1
- data/lib/files.com/models/web_dav_action_log.rb +4 -1
- data/lib/files.com/models/webhook_test.rb +3 -0
- data/lib/files.com/models/workspace.rb +14 -7
- data/lib/files.com/util.rb +32 -1
- data/lib/files.com/version.rb +3 -1
- data/lib/files.com.rb +54 -1
- data/spec/lib/api_client_spec.rb +492 -0
- data/spec/list_spec.rb +31 -2
- data/spec/models/persistence_spec.rb +1 -1
- data/spec/models/user_spec.rb +20 -0
- metadata +2 -1
|
@@ -418,13 +418,15 @@ module Files
|
|
|
418
418
|
|
|
419
419
|
# Upgrade a legacy Automation to Automation v2
|
|
420
420
|
def upgrade(params = {})
|
|
421
|
-
params
|
|
421
|
+
params = (params || {}).dup
|
|
422
422
|
params[:id] = @attributes[:id]
|
|
423
423
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
424
424
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
425
425
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
426
426
|
|
|
427
|
-
Api.send_request("/automations/#{@attributes[:id]}/upgrade", :post, params, @options)
|
|
427
|
+
response, options = Api.send_request("/automations/#{@attributes[:id]}/upgrade", :post, params, @options)
|
|
428
|
+
@options = @options.merge(options)
|
|
429
|
+
[ response, options ]
|
|
428
430
|
end
|
|
429
431
|
|
|
430
432
|
# Manually Run Automation
|
|
@@ -434,14 +436,16 @@ module Files
|
|
|
434
436
|
#
|
|
435
437
|
# Returns the [response, options] pair from Files::Api.send_request.
|
|
436
438
|
def manual_run(params = {})
|
|
437
|
-
params
|
|
439
|
+
params = (params || {}).dup
|
|
438
440
|
params[:id] = @attributes[:id]
|
|
439
441
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
440
442
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
441
443
|
raise InvalidParameterError.new("Bad parameter: items must be an Array") if !params[:items].nil? and !params[:items].is_a?(Array)
|
|
442
444
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
443
445
|
|
|
444
|
-
Api.send_request("/automations/#{@attributes[:id]}/manual_run", :post, params, @options)
|
|
446
|
+
response, options = Api.send_request("/automations/#{@attributes[:id]}/manual_run", :post, params, @options)
|
|
447
|
+
@options = @options.merge(options)
|
|
448
|
+
[ response, options ]
|
|
445
449
|
end
|
|
446
450
|
|
|
447
451
|
# Parameters:
|
|
@@ -481,7 +485,7 @@ module Files
|
|
|
481
485
|
# recurring_days - array(int64) - If trigger type is `daily`, this specifies one or more day numbers to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
|
|
482
486
|
# automation - string - Automation type
|
|
483
487
|
def update(params = {})
|
|
484
|
-
params
|
|
488
|
+
params = (params || {}).dup
|
|
485
489
|
params[:id] = @attributes[:id]
|
|
486
490
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
487
491
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
@@ -499,15 +503,24 @@ module Files
|
|
|
499
503
|
raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if !params[:schedule_times_of_day].nil? and !params[:schedule_times_of_day].is_a?(Array)
|
|
500
504
|
raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if !params[:schedule_time_zone].nil? and !params[:schedule_time_zone].is_a?(String)
|
|
501
505
|
raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if !params[:holiday_region].nil? and !params[:holiday_region].is_a?(String)
|
|
506
|
+
raise InvalidParameterError.new("Bad parameter: always_overwrite_size_matching_files must be a single value, not #{params[:always_overwrite_size_matching_files].class}") if [ Array, Hash ].any? { |klass| params[:always_overwrite_size_matching_files].is_a?(klass) }
|
|
507
|
+
raise InvalidParameterError.new("Bad parameter: always_serialize_jobs must be a single value, not #{params[:always_serialize_jobs].class}") if [ Array, Hash ].any? { |klass| params[:always_serialize_jobs].is_a?(klass) }
|
|
502
508
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
509
|
+
raise InvalidParameterError.new("Bad parameter: definition must be an Hash") if !params[:definition].nil? and !params[:definition].is_a?(Hash)
|
|
510
|
+
raise InvalidParameterError.new("Bad parameter: disabled must be a single value, not #{params[:disabled].class}") if [ Array, Hash ].any? { |klass| params[:disabled].is_a?(klass) }
|
|
503
511
|
raise InvalidParameterError.new("Bad parameter: exclude_pattern must be an String") if !params[:exclude_pattern].nil? and !params[:exclude_pattern].is_a?(String)
|
|
504
512
|
raise InvalidParameterError.new("Bad parameter: import_urls must be an Array") if !params[:import_urls].nil? and !params[:import_urls].is_a?(Array)
|
|
513
|
+
raise InvalidParameterError.new("Bad parameter: flatten_destination_structure must be a single value, not #{params[:flatten_destination_structure].class}") if [ Array, Hash ].any? { |klass| params[:flatten_destination_structure].is_a?(klass) }
|
|
514
|
+
raise InvalidParameterError.new("Bad parameter: ignore_locked_folders must be a single value, not #{params[:ignore_locked_folders].class}") if [ Array, Hash ].any? { |klass| params[:ignore_locked_folders].is_a?(klass) }
|
|
515
|
+
raise InvalidParameterError.new("Bad parameter: legacy_folder_matching must be a single value, not #{params[:legacy_folder_matching].class}") if [ Array, Hash ].any? { |klass| params[:legacy_folder_matching].is_a?(klass) }
|
|
505
516
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
517
|
+
raise InvalidParameterError.new("Bad parameter: overwrite_files must be a single value, not #{params[:overwrite_files].class}") if [ Array, Hash ].any? { |klass| params[:overwrite_files].is_a?(klass) }
|
|
506
518
|
raise InvalidParameterError.new("Bad parameter: path_time_zone must be an String") if !params[:path_time_zone].nil? and !params[:path_time_zone].is_a?(String)
|
|
507
519
|
raise InvalidParameterError.new("Bad parameter: retry_on_failure_interval_in_minutes must be an Integer") if !params[:retry_on_failure_interval_in_minutes].nil? and !params[:retry_on_failure_interval_in_minutes].is_a?(Integer)
|
|
508
520
|
raise InvalidParameterError.new("Bad parameter: retry_on_failure_number_of_attempts must be an Integer") if !params[:retry_on_failure_number_of_attempts].nil? and !params[:retry_on_failure_number_of_attempts].is_a?(Integer)
|
|
509
521
|
raise InvalidParameterError.new("Bad parameter: trigger must be an String") if !params[:trigger].nil? and !params[:trigger].is_a?(String)
|
|
510
522
|
raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if !params[:trigger_actions].nil? and !params[:trigger_actions].is_a?(Array)
|
|
523
|
+
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if !params[:value].nil? and !params[:value].is_a?(Hash)
|
|
511
524
|
raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if !params[:recurring_day].nil? and !params[:recurring_day].is_a?(Integer)
|
|
512
525
|
raise InvalidParameterError.new("Bad parameter: recurring_days must be an Array") if !params[:recurring_days].nil? and !params[:recurring_days].is_a?(Array)
|
|
513
526
|
raise InvalidParameterError.new("Bad parameter: automation must be an String") if !params[:automation].nil? and !params[:automation].is_a?(String)
|
|
@@ -515,18 +528,21 @@ module Files
|
|
|
515
528
|
|
|
516
529
|
response, options = Api.send_request("/automations/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Automation") }
|
|
517
530
|
@attributes = response.data
|
|
531
|
+
@options = @options.merge(options)
|
|
518
532
|
[ response, options ]
|
|
519
533
|
end
|
|
520
534
|
|
|
521
535
|
# Returns the [response, options] pair from Files::Api.send_request.
|
|
522
536
|
def delete(params = {})
|
|
523
|
-
params
|
|
537
|
+
params = (params || {}).dup
|
|
524
538
|
params[:id] = @attributes[:id]
|
|
525
539
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
526
540
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
527
541
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
528
542
|
|
|
529
|
-
Api.send_request("/automations/#{@attributes[:id]}", :delete, params, @options)
|
|
543
|
+
response, options = Api.send_request("/automations/#{@attributes[:id]}", :delete, params, @options)
|
|
544
|
+
@options = @options.merge(options)
|
|
545
|
+
[ response, options ]
|
|
530
546
|
end
|
|
531
547
|
|
|
532
548
|
# Alias for #delete. Returns nil.
|
|
@@ -541,6 +557,7 @@ module Files
|
|
|
541
557
|
else
|
|
542
558
|
new_obj = Automation.create(@attributes, @options)
|
|
543
559
|
@attributes = new_obj.attributes
|
|
560
|
+
@options = @options.merge(new_obj.options)
|
|
544
561
|
end
|
|
545
562
|
|
|
546
563
|
true
|
|
@@ -570,8 +587,11 @@ module Files
|
|
|
570
587
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if !params[:filter_lt].nil? and !params[:filter_lt].is_a?(Hash)
|
|
571
588
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if !params[:filter_lteq].nil? and !params[:filter_lteq].is_a?(Hash)
|
|
572
589
|
|
|
590
|
+
list_options = options.dup
|
|
573
591
|
List.new(Automation, params) do |page_params, &check_page|
|
|
574
|
-
Api.send_request("/automations", :get, page_params,
|
|
592
|
+
response, page_options = Api.send_request("/automations", :get, page_params, list_options, &check_page)
|
|
593
|
+
list_options = list_options.merge(page_options)
|
|
594
|
+
[ response, page_options ]
|
|
575
595
|
end
|
|
576
596
|
end
|
|
577
597
|
|
|
@@ -587,7 +607,7 @@ module Files
|
|
|
587
607
|
#
|
|
588
608
|
# Returns a Files::Automation.
|
|
589
609
|
def self.find(id, params = {}, options = {})
|
|
590
|
-
params
|
|
610
|
+
params = (params || {}).dup
|
|
591
611
|
params[:id] = id
|
|
592
612
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
593
613
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -666,11 +686,18 @@ module Files
|
|
|
666
686
|
raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if !params[:schedule_times_of_day].nil? and !params[:schedule_times_of_day].is_a?(Array)
|
|
667
687
|
raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if !params[:schedule_time_zone].nil? and !params[:schedule_time_zone].is_a?(String)
|
|
668
688
|
raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if !params[:holiday_region].nil? and !params[:holiday_region].is_a?(String)
|
|
689
|
+
raise InvalidParameterError.new("Bad parameter: always_overwrite_size_matching_files must be a single value, not #{params[:always_overwrite_size_matching_files].class}") if [ Array, Hash ].any? { |klass| params[:always_overwrite_size_matching_files].is_a?(klass) }
|
|
690
|
+
raise InvalidParameterError.new("Bad parameter: always_serialize_jobs must be a single value, not #{params[:always_serialize_jobs].class}") if [ Array, Hash ].any? { |klass| params[:always_serialize_jobs].is_a?(klass) }
|
|
669
691
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
670
692
|
raise InvalidParameterError.new("Bad parameter: definition must be an Hash") if !params[:definition].nil? and !params[:definition].is_a?(Hash)
|
|
693
|
+
raise InvalidParameterError.new("Bad parameter: disabled must be a single value, not #{params[:disabled].class}") if [ Array, Hash ].any? { |klass| params[:disabled].is_a?(klass) }
|
|
671
694
|
raise InvalidParameterError.new("Bad parameter: exclude_pattern must be an String") if !params[:exclude_pattern].nil? and !params[:exclude_pattern].is_a?(String)
|
|
672
695
|
raise InvalidParameterError.new("Bad parameter: import_urls must be an Array") if !params[:import_urls].nil? and !params[:import_urls].is_a?(Array)
|
|
696
|
+
raise InvalidParameterError.new("Bad parameter: flatten_destination_structure must be a single value, not #{params[:flatten_destination_structure].class}") if [ Array, Hash ].any? { |klass| params[:flatten_destination_structure].is_a?(klass) }
|
|
697
|
+
raise InvalidParameterError.new("Bad parameter: ignore_locked_folders must be a single value, not #{params[:ignore_locked_folders].class}") if [ Array, Hash ].any? { |klass| params[:ignore_locked_folders].is_a?(klass) }
|
|
698
|
+
raise InvalidParameterError.new("Bad parameter: legacy_folder_matching must be a single value, not #{params[:legacy_folder_matching].class}") if [ Array, Hash ].any? { |klass| params[:legacy_folder_matching].is_a?(klass) }
|
|
673
699
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
700
|
+
raise InvalidParameterError.new("Bad parameter: overwrite_files must be a single value, not #{params[:overwrite_files].class}") if [ Array, Hash ].any? { |klass| params[:overwrite_files].is_a?(klass) }
|
|
674
701
|
raise InvalidParameterError.new("Bad parameter: path_time_zone must be an String") if !params[:path_time_zone].nil? and !params[:path_time_zone].is_a?(String)
|
|
675
702
|
raise InvalidParameterError.new("Bad parameter: retry_on_failure_interval_in_minutes must be an Integer") if !params[:retry_on_failure_interval_in_minutes].nil? and !params[:retry_on_failure_interval_in_minutes].is_a?(Integer)
|
|
676
703
|
raise InvalidParameterError.new("Bad parameter: retry_on_failure_number_of_attempts must be an Integer") if !params[:retry_on_failure_number_of_attempts].nil? and !params[:retry_on_failure_number_of_attempts].is_a?(Integer)
|
|
@@ -694,7 +721,7 @@ module Files
|
|
|
694
721
|
#
|
|
695
722
|
# Returns a Files::Automation.
|
|
696
723
|
def self.upgrade(id, params = {}, options = {})
|
|
697
|
-
params
|
|
724
|
+
params = (params || {}).dup
|
|
698
725
|
params[:id] = id
|
|
699
726
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
700
727
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -713,7 +740,7 @@ module Files
|
|
|
713
740
|
#
|
|
714
741
|
# Returns nil.
|
|
715
742
|
def self.manual_run(id, params = {}, options = {})
|
|
716
|
-
params
|
|
743
|
+
params = (params || {}).dup
|
|
717
744
|
params[:id] = id
|
|
718
745
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
719
746
|
raise InvalidParameterError.new("Bad parameter: items must be an Array") if !params[:items].nil? and !params[:items].is_a?(Array)
|
|
@@ -765,7 +792,7 @@ module Files
|
|
|
765
792
|
#
|
|
766
793
|
# Returns a Files::Automation.
|
|
767
794
|
def self.update(id, params = {}, options = {})
|
|
768
|
-
params
|
|
795
|
+
params = (params || {}).dup
|
|
769
796
|
params[:id] = id
|
|
770
797
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
771
798
|
raise InvalidParameterError.new("Bad parameter: source must be an String") if !params[:source].nil? and !params[:source].is_a?(String)
|
|
@@ -782,11 +809,18 @@ module Files
|
|
|
782
809
|
raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if !params[:schedule_times_of_day].nil? and !params[:schedule_times_of_day].is_a?(Array)
|
|
783
810
|
raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if !params[:schedule_time_zone].nil? and !params[:schedule_time_zone].is_a?(String)
|
|
784
811
|
raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if !params[:holiday_region].nil? and !params[:holiday_region].is_a?(String)
|
|
812
|
+
raise InvalidParameterError.new("Bad parameter: always_overwrite_size_matching_files must be a single value, not #{params[:always_overwrite_size_matching_files].class}") if [ Array, Hash ].any? { |klass| params[:always_overwrite_size_matching_files].is_a?(klass) }
|
|
813
|
+
raise InvalidParameterError.new("Bad parameter: always_serialize_jobs must be a single value, not #{params[:always_serialize_jobs].class}") if [ Array, Hash ].any? { |klass| params[:always_serialize_jobs].is_a?(klass) }
|
|
785
814
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
786
815
|
raise InvalidParameterError.new("Bad parameter: definition must be an Hash") if !params[:definition].nil? and !params[:definition].is_a?(Hash)
|
|
816
|
+
raise InvalidParameterError.new("Bad parameter: disabled must be a single value, not #{params[:disabled].class}") if [ Array, Hash ].any? { |klass| params[:disabled].is_a?(klass) }
|
|
787
817
|
raise InvalidParameterError.new("Bad parameter: exclude_pattern must be an String") if !params[:exclude_pattern].nil? and !params[:exclude_pattern].is_a?(String)
|
|
788
818
|
raise InvalidParameterError.new("Bad parameter: import_urls must be an Array") if !params[:import_urls].nil? and !params[:import_urls].is_a?(Array)
|
|
819
|
+
raise InvalidParameterError.new("Bad parameter: flatten_destination_structure must be a single value, not #{params[:flatten_destination_structure].class}") if [ Array, Hash ].any? { |klass| params[:flatten_destination_structure].is_a?(klass) }
|
|
820
|
+
raise InvalidParameterError.new("Bad parameter: ignore_locked_folders must be a single value, not #{params[:ignore_locked_folders].class}") if [ Array, Hash ].any? { |klass| params[:ignore_locked_folders].is_a?(klass) }
|
|
821
|
+
raise InvalidParameterError.new("Bad parameter: legacy_folder_matching must be a single value, not #{params[:legacy_folder_matching].class}") if [ Array, Hash ].any? { |klass| params[:legacy_folder_matching].is_a?(klass) }
|
|
789
822
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
823
|
+
raise InvalidParameterError.new("Bad parameter: overwrite_files must be a single value, not #{params[:overwrite_files].class}") if [ Array, Hash ].any? { |klass| params[:overwrite_files].is_a?(klass) }
|
|
790
824
|
raise InvalidParameterError.new("Bad parameter: path_time_zone must be an String") if !params[:path_time_zone].nil? and !params[:path_time_zone].is_a?(String)
|
|
791
825
|
raise InvalidParameterError.new("Bad parameter: retry_on_failure_interval_in_minutes must be an Integer") if !params[:retry_on_failure_interval_in_minutes].nil? and !params[:retry_on_failure_interval_in_minutes].is_a?(Integer)
|
|
792
826
|
raise InvalidParameterError.new("Bad parameter: retry_on_failure_number_of_attempts must be an Integer") if !params[:retry_on_failure_number_of_attempts].nil? and !params[:retry_on_failure_number_of_attempts].is_a?(Integer)
|
|
@@ -807,7 +841,7 @@ module Files
|
|
|
807
841
|
#
|
|
808
842
|
# Returns nil.
|
|
809
843
|
def self.delete(id, params = {}, options = {})
|
|
810
|
-
params
|
|
844
|
+
params = (params || {}).dup
|
|
811
845
|
params[:id] = id
|
|
812
846
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
813
847
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -115,8 +115,11 @@ module Files
|
|
|
115
115
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if !params[:filter_lt].nil? and !params[:filter_lt].is_a?(Hash)
|
|
116
116
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if !params[:filter_lteq].nil? and !params[:filter_lteq].is_a?(Hash)
|
|
117
117
|
|
|
118
|
+
list_options = options.dup
|
|
118
119
|
List.new(AutomationLog, params) do |page_params, &check_page|
|
|
119
|
-
Api.send_request("/automation_logs", :get, page_params,
|
|
120
|
+
response, page_options = Api.send_request("/automation_logs", :get, page_params, list_options, &check_page)
|
|
121
|
+
list_options = list_options.merge(page_options)
|
|
122
|
+
[ response, page_options ]
|
|
120
123
|
end
|
|
121
124
|
end
|
|
122
125
|
|
|
@@ -128,13 +128,15 @@ module Files
|
|
|
128
128
|
|
|
129
129
|
# Cancel Automation Run
|
|
130
130
|
def cancel(params = {})
|
|
131
|
-
params
|
|
131
|
+
params = (params || {}).dup
|
|
132
132
|
params[:id] = @attributes[:id]
|
|
133
133
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
134
134
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
135
135
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
136
136
|
|
|
137
|
-
Api.send_request("/automation_runs/#{@attributes[:id]}/cancel", :post, params, @options)
|
|
137
|
+
response, options = Api.send_request("/automation_runs/#{@attributes[:id]}/cancel", :post, params, @options)
|
|
138
|
+
@options = @options.merge(options)
|
|
139
|
+
[ response, options ]
|
|
138
140
|
end
|
|
139
141
|
|
|
140
142
|
# Re-run Automation from Node
|
|
@@ -142,7 +144,7 @@ module Files
|
|
|
142
144
|
# Parameters:
|
|
143
145
|
# node_id (required) - string - Node ID at which execution should resume.
|
|
144
146
|
def rerun(params = {})
|
|
145
|
-
params
|
|
147
|
+
params = (params || {}).dup
|
|
146
148
|
params[:id] = @attributes[:id]
|
|
147
149
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
148
150
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
@@ -150,7 +152,9 @@ module Files
|
|
|
150
152
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
151
153
|
raise MissingParameterError.new("Parameter missing: node_id") if params[:node_id].nil?
|
|
152
154
|
|
|
153
|
-
Api.send_request("/automation_runs/#{@attributes[:id]}/rerun", :post, params, @options)
|
|
155
|
+
response, options = Api.send_request("/automation_runs/#{@attributes[:id]}/rerun", :post, params, @options)
|
|
156
|
+
@options = @options.merge(options)
|
|
157
|
+
[ response, options ]
|
|
154
158
|
end
|
|
155
159
|
|
|
156
160
|
# Parameters:
|
|
@@ -174,8 +178,11 @@ module Files
|
|
|
174
178
|
raise InvalidParameterError.new("Bad parameter: automation_id must be an Integer") if !params[:automation_id].nil? and !params[:automation_id].is_a?(Integer)
|
|
175
179
|
raise MissingParameterError.new("Parameter missing: automation_id") if params[:automation_id].nil?
|
|
176
180
|
|
|
181
|
+
list_options = options.dup
|
|
177
182
|
List.new(AutomationRun, params) do |page_params, &check_page|
|
|
178
|
-
Api.send_request("/automation_runs", :get, page_params,
|
|
183
|
+
response, page_options = Api.send_request("/automation_runs", :get, page_params, list_options, &check_page)
|
|
184
|
+
list_options = list_options.merge(page_options)
|
|
185
|
+
[ response, page_options ]
|
|
179
186
|
end
|
|
180
187
|
end
|
|
181
188
|
|
|
@@ -191,7 +198,7 @@ module Files
|
|
|
191
198
|
#
|
|
192
199
|
# Returns a Files::AutomationRun.
|
|
193
200
|
def self.find(id, params = {}, options = {})
|
|
194
|
-
params
|
|
201
|
+
params = (params || {}).dup
|
|
195
202
|
params[:id] = id
|
|
196
203
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
197
204
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -213,7 +220,7 @@ module Files
|
|
|
213
220
|
#
|
|
214
221
|
# Returns a Files::AutomationExecutionNode.
|
|
215
222
|
def self.find_node(id, params = {}, options = {})
|
|
216
|
-
params
|
|
223
|
+
params = (params || {}).dup
|
|
217
224
|
params[:id] = id
|
|
218
225
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
219
226
|
raise InvalidParameterError.new("Bad parameter: node_id must be an String") if !params[:node_id].nil? and !params[:node_id].is_a?(String)
|
|
@@ -231,7 +238,7 @@ module Files
|
|
|
231
238
|
#
|
|
232
239
|
# Returns a Files::AutomationRun.
|
|
233
240
|
def self.cancel(id, params = {}, options = {})
|
|
234
|
-
params
|
|
241
|
+
params = (params || {}).dup
|
|
235
242
|
params[:id] = id
|
|
236
243
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
237
244
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -250,7 +257,7 @@ module Files
|
|
|
250
257
|
#
|
|
251
258
|
# Returns a Files::AutomationRun.
|
|
252
259
|
def self.rerun(id, params = {}, options = {})
|
|
253
|
-
params
|
|
260
|
+
params = (params || {}).dup
|
|
254
261
|
params[:id] = id
|
|
255
262
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
256
263
|
raise InvalidParameterError.new("Bad parameter: node_id must be an String") if !params[:node_id].nil? and !params[:node_id].is_a?(String)
|
|
@@ -80,8 +80,11 @@ module Files
|
|
|
80
80
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if !params[:filter_lt].nil? and !params[:filter_lt].is_a?(Hash)
|
|
81
81
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if !params[:filter_lteq].nil? and !params[:filter_lteq].is_a?(Hash)
|
|
82
82
|
|
|
83
|
+
list_options = options.dup
|
|
83
84
|
List.new(BandwidthSnapshot, params) do |page_params, &check_page|
|
|
84
|
-
Api.send_request("/bandwidth_snapshots", :get, page_params,
|
|
85
|
+
response, page_options = Api.send_request("/bandwidth_snapshots", :get, page_params, list_options, &check_page)
|
|
86
|
+
list_options = list_options.merge(page_options)
|
|
87
|
+
[ response, page_options ]
|
|
85
88
|
end
|
|
86
89
|
end
|
|
87
90
|
|
|
@@ -155,28 +155,34 @@ module Files
|
|
|
155
155
|
# description - string - Description for this behavior.
|
|
156
156
|
# attachment_delete - boolean - If `true`, delete the file stored in `attachment`.
|
|
157
157
|
def update(params = {})
|
|
158
|
-
params
|
|
158
|
+
params = (params || {}).dup
|
|
159
159
|
params[:id] = @attributes[:id]
|
|
160
160
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
161
161
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
162
|
+
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if !params[:value].nil? and !params[:value].is_a?(Hash)
|
|
163
|
+
raise InvalidParameterError.new("Bad parameter: disable_parent_folder_behavior must be a single value, not #{params[:disable_parent_folder_behavior].class}") if [ Array, Hash ].any? { |klass| params[:disable_parent_folder_behavior].is_a?(klass) }
|
|
164
|
+
raise InvalidParameterError.new("Bad parameter: recursive must be a single value, not #{params[:recursive].class}") if [ Array, Hash ].any? { |klass| params[:recursive].is_a?(klass) }
|
|
162
165
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
163
166
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
164
167
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
165
168
|
|
|
166
169
|
response, options = Api.send_request("/behaviors/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Behavior") }
|
|
167
170
|
@attributes = response.data
|
|
171
|
+
@options = @options.merge(options)
|
|
168
172
|
[ response, options ]
|
|
169
173
|
end
|
|
170
174
|
|
|
171
175
|
# Returns the [response, options] pair from Files::Api.send_request.
|
|
172
176
|
def delete(params = {})
|
|
173
|
-
params
|
|
177
|
+
params = (params || {}).dup
|
|
174
178
|
params[:id] = @attributes[:id]
|
|
175
179
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
176
180
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
177
181
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
178
182
|
|
|
179
|
-
Api.send_request("/behaviors/#{@attributes[:id]}", :delete, params, @options)
|
|
183
|
+
response, options = Api.send_request("/behaviors/#{@attributes[:id]}", :delete, params, @options)
|
|
184
|
+
@options = @options.merge(options)
|
|
185
|
+
[ response, options ]
|
|
180
186
|
end
|
|
181
187
|
|
|
182
188
|
# Alias for #delete. Returns nil.
|
|
@@ -191,6 +197,7 @@ module Files
|
|
|
191
197
|
else
|
|
192
198
|
new_obj = Behavior.create(@attributes, @options)
|
|
193
199
|
@attributes = new_obj.attributes
|
|
200
|
+
@options = @options.merge(new_obj.options)
|
|
194
201
|
end
|
|
195
202
|
|
|
196
203
|
true
|
|
@@ -212,8 +219,11 @@ module Files
|
|
|
212
219
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if !params[:sort_by].nil? and !params[:sort_by].is_a?(Hash)
|
|
213
220
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if !params[:filter].nil? and !params[:filter].is_a?(Hash)
|
|
214
221
|
|
|
222
|
+
list_options = options.dup
|
|
215
223
|
List.new(Behavior, params) do |page_params, &check_page|
|
|
216
|
-
Api.send_request("/behaviors", :get, page_params,
|
|
224
|
+
response, page_options = Api.send_request("/behaviors", :get, page_params, list_options, &check_page)
|
|
225
|
+
list_options = list_options.merge(page_options)
|
|
226
|
+
[ response, page_options ]
|
|
217
227
|
end
|
|
218
228
|
end
|
|
219
229
|
|
|
@@ -229,7 +239,7 @@ module Files
|
|
|
229
239
|
#
|
|
230
240
|
# Returns a Files::Behavior.
|
|
231
241
|
def self.find(id, params = {}, options = {})
|
|
232
|
-
params
|
|
242
|
+
params = (params || {}).dup
|
|
233
243
|
params[:id] = id
|
|
234
244
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
235
245
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -255,17 +265,21 @@ module Files
|
|
|
255
265
|
#
|
|
256
266
|
# Returns a Files::List of Files::Behavior objects.
|
|
257
267
|
def self.list_for(path, params = {}, options = {})
|
|
258
|
-
params
|
|
268
|
+
params = (params || {}).dup
|
|
259
269
|
params[:path] = path
|
|
260
270
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if !params[:cursor].nil? and !params[:cursor].is_a?(String)
|
|
261
271
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if !params[:per_page].nil? and !params[:per_page].is_a?(Integer)
|
|
262
272
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if !params[:sort_by].nil? and !params[:sort_by].is_a?(Hash)
|
|
263
273
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if !params[:filter].nil? and !params[:filter].is_a?(Hash)
|
|
264
274
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if !params[:path].nil? and !params[:path].is_a?(String)
|
|
275
|
+
raise InvalidParameterError.new("Bad parameter: ancestor_behaviors must be a single value, not #{params[:ancestor_behaviors].class}") if [ Array, Hash ].any? { |klass| params[:ancestor_behaviors].is_a?(klass) }
|
|
265
276
|
raise MissingParameterError.new("Parameter missing: path") if params[:path].nil?
|
|
266
277
|
|
|
278
|
+
list_options = options.dup
|
|
267
279
|
List.new(Behavior, params) do |page_params, &check_page|
|
|
268
|
-
Api.send_request("/behaviors/folders/#{page_params[:path]}", :get, page_params,
|
|
280
|
+
response, page_options = Api.send_request("/behaviors/folders/#{page_params[:path]}", :get, page_params, list_options, &check_page)
|
|
281
|
+
list_options = list_options.merge(page_options)
|
|
282
|
+
[ response, page_options ]
|
|
269
283
|
end
|
|
270
284
|
end
|
|
271
285
|
|
|
@@ -285,6 +299,8 @@ module Files
|
|
|
285
299
|
# Returns a Files::Behavior.
|
|
286
300
|
def self.create(params = {}, options = {})
|
|
287
301
|
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if !params[:value].nil? and !params[:value].is_a?(Hash)
|
|
302
|
+
raise InvalidParameterError.new("Bad parameter: disable_parent_folder_behavior must be a single value, not #{params[:disable_parent_folder_behavior].class}") if [ Array, Hash ].any? { |klass| params[:disable_parent_folder_behavior].is_a?(klass) }
|
|
303
|
+
raise InvalidParameterError.new("Bad parameter: recursive must be a single value, not #{params[:recursive].class}") if [ Array, Hash ].any? { |klass| params[:recursive].is_a?(klass) }
|
|
288
304
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
289
305
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
290
306
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if !params[:path].nil? and !params[:path].is_a?(String)
|
|
@@ -335,10 +351,12 @@ module Files
|
|
|
335
351
|
#
|
|
336
352
|
# Returns a Files::Behavior.
|
|
337
353
|
def self.update(id, params = {}, options = {})
|
|
338
|
-
params
|
|
354
|
+
params = (params || {}).dup
|
|
339
355
|
params[:id] = id
|
|
340
356
|
raise InvalidParameterError.new("Bad parameter: id must be one of Hash, String, Integer") if !params[:id].nil? and [ Hash, String, Integer ].none? { |klass| params[:id].is_a?(klass) }
|
|
341
357
|
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if !params[:value].nil? and !params[:value].is_a?(Hash)
|
|
358
|
+
raise InvalidParameterError.new("Bad parameter: disable_parent_folder_behavior must be a single value, not #{params[:disable_parent_folder_behavior].class}") if [ Array, Hash ].any? { |klass| params[:disable_parent_folder_behavior].is_a?(klass) }
|
|
359
|
+
raise InvalidParameterError.new("Bad parameter: recursive must be a single value, not #{params[:recursive].class}") if [ Array, Hash ].any? { |klass| params[:recursive].is_a?(klass) }
|
|
342
360
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
343
361
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
344
362
|
raise InvalidParameterError.new("Bad parameter: attachment_delete must be one of Hash, String, Integer") if !params[:attachment_delete].nil? and [ Hash, String, Integer ].none? { |klass| params[:attachment_delete].is_a?(klass) }
|
|
@@ -353,7 +371,7 @@ module Files
|
|
|
353
371
|
#
|
|
354
372
|
# Returns nil.
|
|
355
373
|
def self.delete(id, params = {}, options = {})
|
|
356
|
-
params
|
|
374
|
+
params = (params || {}).dup
|
|
357
375
|
params[:id] = id
|
|
358
376
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
359
377
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|