files.com 1.1.782 → 1.1.784

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.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/_VERSION +1 -1
  3. data/lib/files.com/api_client.rb +47 -15
  4. data/lib/files.com/models/account_line_item.rb +2 -0
  5. data/lib/files.com/models/action.rb +2 -0
  6. data/lib/files.com/models/action_log.rb +10 -8
  7. data/lib/files.com/models/action_notification_export.rb +14 -12
  8. data/lib/files.com/models/action_notification_export_result.rb +7 -5
  9. data/lib/files.com/models/agent_node.rb +2 -0
  10. data/lib/files.com/models/agent_node_connection.rb +2 -0
  11. data/lib/files.com/models/agent_node_instance.rb +2 -0
  12. data/lib/files.com/models/agent_push_update.rb +2 -0
  13. data/lib/files.com/models/ai_assistant_personality.rb +27 -25
  14. data/lib/files.com/models/ai_task.rb +73 -71
  15. data/lib/files.com/models/api_key.rb +38 -36
  16. data/lib/files.com/models/api_request_log.rb +10 -8
  17. data/lib/files.com/models/app.rb +7 -5
  18. data/lib/files.com/models/as2_incoming_message.rb +10 -8
  19. data/lib/files.com/models/as2_outgoing_message.rb +10 -8
  20. data/lib/files.com/models/as2_partner.rb +55 -53
  21. data/lib/files.com/models/as2_station.rb +36 -34
  22. data/lib/files.com/models/auto.rb +2 -0
  23. data/lib/files.com/models/automation.rb +114 -112
  24. data/lib/files.com/models/automation_authoring_schema.rb +2 -0
  25. data/lib/files.com/models/automation_execution_node.rb +2 -0
  26. data/lib/files.com/models/automation_log.rb +10 -8
  27. data/lib/files.com/models/automation_run.rb +27 -25
  28. data/lib/files.com/models/bandwidth_snapshot.rb +10 -8
  29. data/lib/files.com/models/behavior.rb +42 -40
  30. data/lib/files.com/models/bundle.rb +90 -88
  31. data/lib/files.com/models/bundle_action.rb +13 -11
  32. data/lib/files.com/models/bundle_download.rb +12 -10
  33. data/lib/files.com/models/bundle_notification.rb +22 -20
  34. data/lib/files.com/models/bundle_path.rb +2 -0
  35. data/lib/files.com/models/bundle_recipient.rb +17 -15
  36. data/lib/files.com/models/bundle_registration.rb +7 -5
  37. data/lib/files.com/models/chat_message.rb +2 -0
  38. data/lib/files.com/models/chat_session.rb +8 -6
  39. data/lib/files.com/models/child_site_management_policy.rb +32 -30
  40. data/lib/files.com/models/clickwrap.rb +30 -28
  41. data/lib/files.com/models/custom_domain.rb +36 -34
  42. data/lib/files.com/models/desktop_configuration_profile.rb +26 -24
  43. data/lib/files.com/models/direct_connection_info.rb +2 -0
  44. data/lib/files.com/models/dns_record.rb +4 -2
  45. data/lib/files.com/models/email_incoming_message.rb +11 -9
  46. data/lib/files.com/models/email_log.rb +9 -7
  47. data/lib/files.com/models/errors.rb +2 -0
  48. data/lib/files.com/models/event_channel.rb +26 -24
  49. data/lib/files.com/models/event_delivery_attempt.rb +8 -6
  50. data/lib/files.com/models/event_record.rb +13 -11
  51. data/lib/files.com/models/event_subscription.rb +42 -40
  52. data/lib/files.com/models/event_target.rb +30 -28
  53. data/lib/files.com/models/exavault_api_request_log.rb +10 -8
  54. data/lib/files.com/models/expectation.rb +79 -77
  55. data/lib/files.com/models/expectation_evaluation.rb +8 -6
  56. data/lib/files.com/models/expectation_incident.rb +24 -22
  57. data/lib/files.com/models/external_event.rb +16 -14
  58. data/lib/files.com/models/file.rb +138 -136
  59. data/lib/files.com/models/file_action.rb +2 -0
  60. data/lib/files.com/models/file_comment.rb +22 -20
  61. data/lib/files.com/models/file_comment_reaction.rb +11 -9
  62. data/lib/files.com/models/file_migration.rb +4 -2
  63. data/lib/files.com/models/file_migration_log.rb +9 -7
  64. data/lib/files.com/models/file_upload_part.rb +2 -0
  65. data/lib/files.com/models/folder.rb +15 -13
  66. data/lib/files.com/models/form_field.rb +2 -0
  67. data/lib/files.com/models/form_field_set.rb +25 -23
  68. data/lib/files.com/models/ftp_action_log.rb +10 -8
  69. data/lib/files.com/models/gpg_key.rb +42 -40
  70. data/lib/files.com/models/group.rb +44 -42
  71. data/lib/files.com/models/group_user.rb +34 -32
  72. data/lib/files.com/models/history.rb +40 -38
  73. data/lib/files.com/models/history_export.rb +26 -24
  74. data/lib/files.com/models/history_export_result.rb +7 -5
  75. data/lib/files.com/models/holiday_calendar.rb +22 -20
  76. data/lib/files.com/models/holiday_region.rb +4 -2
  77. data/lib/files.com/models/image.rb +2 -0
  78. data/lib/files.com/models/inbound_s3_log.rb +10 -8
  79. data/lib/files.com/models/inbox_recipient.rb +15 -13
  80. data/lib/files.com/models/inbox_registration.rb +5 -3
  81. data/lib/files.com/models/inbox_upload.rb +10 -8
  82. data/lib/files.com/models/integration_centric_profile.rb +27 -25
  83. data/lib/files.com/models/invoice.rb +6 -4
  84. data/lib/files.com/models/invoice_line_item.rb +2 -0
  85. data/lib/files.com/models/ip_address.rb +10 -8
  86. data/lib/files.com/models/key_lifecycle_rule.rb +31 -29
  87. data/lib/files.com/models/lock.rb +20 -18
  88. data/lib/files.com/models/metadata_category.rb +26 -24
  89. data/lib/files.com/models/notification.rb +45 -43
  90. data/lib/files.com/models/outbound_connection_log.rb +10 -8
  91. data/lib/files.com/models/partner.rb +48 -46
  92. data/lib/files.com/models/partner_channel.rb +44 -42
  93. data/lib/files.com/models/partner_channel_template.rb +46 -44
  94. data/lib/files.com/models/partner_connection.rb +2 -0
  95. data/lib/files.com/models/partner_site.rb +6 -4
  96. data/lib/files.com/models/partner_site_request.rb +21 -19
  97. data/lib/files.com/models/payment.rb +6 -4
  98. data/lib/files.com/models/payment_line_item.rb +2 -0
  99. data/lib/files.com/models/pending_work_event.rb +12 -10
  100. data/lib/files.com/models/permission.rb +25 -23
  101. data/lib/files.com/models/preview.rb +2 -0
  102. data/lib/files.com/models/public_hosting_request_log.rb +10 -8
  103. data/lib/files.com/models/public_ip_address.rb +2 -0
  104. data/lib/files.com/models/public_key.rb +32 -30
  105. data/lib/files.com/models/remote_bandwidth_snapshot.rb +10 -8
  106. data/lib/files.com/models/remote_mount_backend.rb +51 -49
  107. data/lib/files.com/models/remote_server.rb +261 -259
  108. data/lib/files.com/models/remote_server_configuration_file.rb +2 -0
  109. data/lib/files.com/models/remote_server_credential.rb +121 -119
  110. data/lib/files.com/models/request.rb +21 -19
  111. data/lib/files.com/models/restore.rb +11 -9
  112. data/lib/files.com/models/schedule.rb +33 -31
  113. data/lib/files.com/models/scheduled_export.rb +57 -55
  114. data/lib/files.com/models/scim_log.rb +7 -5
  115. data/lib/files.com/models/secret.rb +31 -29
  116. data/lib/files.com/models/session.rb +6 -4
  117. data/lib/files.com/models/settings_change.rb +6 -4
  118. data/lib/files.com/models/sftp_action_log.rb +10 -8
  119. data/lib/files.com/models/sftp_host_key.rb +23 -21
  120. data/lib/files.com/models/share_group.rb +27 -25
  121. data/lib/files.com/models/share_group_member.rb +2 -0
  122. data/lib/files.com/models/siem_http_destination.rb +95 -93
  123. data/lib/files.com/models/siem_http_destination_event.rb +12 -10
  124. data/lib/files.com/models/site.rb +80 -78
  125. data/lib/files.com/models/site_subdomain_redirect.rb +11 -9
  126. data/lib/files.com/models/snapshot.rb +28 -26
  127. data/lib/files.com/models/sso_event.rb +13 -11
  128. data/lib/files.com/models/sso_strategy.rb +11 -9
  129. data/lib/files.com/models/status.rb +2 -0
  130. data/lib/files.com/models/style.rb +14 -12
  131. data/lib/files.com/models/sync.rb +82 -80
  132. data/lib/files.com/models/sync_log.rb +9 -7
  133. data/lib/files.com/models/sync_run.rb +13 -11
  134. data/lib/files.com/models/sync_run_live_transfer.rb +2 -0
  135. data/lib/files.com/models/usage_by_top_level_dir.rb +2 -0
  136. data/lib/files.com/models/usage_daily_snapshot.rb +10 -8
  137. data/lib/files.com/models/usage_snapshot.rb +4 -2
  138. data/lib/files.com/models/user.rb +152 -150
  139. data/lib/files.com/models/user_additional_email_recipient.rb +23 -21
  140. data/lib/files.com/models/user_cipher_use.rb +11 -9
  141. data/lib/files.com/models/user_lifecycle_rule.rb +43 -41
  142. data/lib/files.com/models/user_request.rb +17 -15
  143. data/lib/files.com/models/user_security_event.rb +12 -10
  144. data/lib/files.com/models/user_sftp_client_use.rb +6 -4
  145. data/lib/files.com/models/web_dav_action_log.rb +10 -8
  146. data/lib/files.com/models/webhook_test.rb +11 -9
  147. data/lib/files.com/models/workspace.rb +20 -18
  148. data/lib/files.com/models/zip_list_entry.rb +2 -0
  149. data/lib/files.com/util.rb +31 -12
  150. data/lib/files.com/version.rb +1 -1
  151. data/spec/lib/api_client_spec.rb +86 -0
  152. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddcd318206fe185a4e00ccbfb7d6d2d4655a1f7810800a341bbfbe5132d17a17
4
- data.tar.gz: 65523517081a2759ad980a8cf43198e49bbb684609ba5d4512adda9ead3cf78b
3
+ metadata.gz: cd5e31f4e4c09fa7272e5c337ddc01c434546c93f177fe8fecd887839326f060
4
+ data.tar.gz: 143a0c464a2530296c1e67243d5f8d2e3640cff840c897ae2067517147af45b7
5
5
  SHA512:
6
- metadata.gz: 84dabf3483704390c691c4e2cb5b0ba75d7c12ef96e0a0559512cb7ebc674d8cf43813a720df47b7e8b4a3b9518ed0d3bace0f3ffc23fa95acf8e8f5dbcd2617
7
- data.tar.gz: 2873fd9698c3b0395217b4463d5613d39b6c42f7c70e0b0cbf29dec4d337095906494feadd85c04ec2a0735f381d248b0ff56a2ce57f6efac30acba0f35e3d1f
6
+ metadata.gz: 0d5eca777f0554ded3ad22b322bd8dcf959885c986c461a1d478c8097ffb00e2ee6d6741fd426cd36d0031796890f7d6ec7d0400f8c37072ae9079484a856fc7
7
+ data.tar.gz: f377e72e2cdb7e3f49391059d4c4c6115e506053cf7c371e6a0c2957018e701e8f3fd09ef8daeb099c498de22d8ce490826ea66cf596511bc43f8dd3f1fbaa89
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.782
1
+ 1.1.784
@@ -4,8 +4,33 @@ module Files
4
4
  class ApiClient
5
5
  attr_accessor :conn
6
6
 
7
- def initialize(conn = nil)
7
+ # Methods whose params travel in the query string rather than a request body.
8
+ QUERY_METHODS = %i[get head delete].freeze
9
+ private_constant :QUERY_METHODS
10
+
11
+ # The default for a logging option this client does not set itself.
12
+ USE_GLOBAL = Object.new.freeze
13
+ private_constant :USE_GLOBAL
14
+
15
+ # Creates a client that sends requests through +conn+, or through a new default connection when +conn+ is nil.
16
+ #
17
+ # By default the client logs its ordinary API requests, responses and errors through the library-wide Files.logger and
18
+ # Files.log_level, read as each message is logged. Pass either option to give this client its own setting
19
+ # instead, without changing the library-wide one or any other client:
20
+ #
21
+ # logger:: A Logger, or any object with the same +log+ method, that receives this client's ordinary API messages. Its own
22
+ # level decides which are written, and the client never changes it. Pass nil for no logger even when
23
+ # Files.logger is set.
24
+ # log_level:: Without a logger, the lowest level written to standard output and error: nil, Files::LEVEL_DEBUG,
25
+ # Files::LEVEL_INFO or Files::LEVEL_ERROR, or "debug" or "info", as Files.log_level= accepts. It
26
+ # is ignored when the client has a logger. Pass nil to write nothing there even when
27
+ # Files.log_level is set.
28
+ #
29
+ # A client created with logger: nil, log_level: nil logs no ordinary API messages.
30
+ def initialize(conn = nil, logger: USE_GLOBAL, log_level: USE_GLOBAL)
8
31
  self.conn = conn || self.class.default_conn
32
+ @logger = logger
33
+ @log_level = log_level.equal?(USE_GLOBAL) ? log_level : Util.normalize_log_level(log_level)
9
34
  @system_profiler = SystemProfiler.new
10
35
  @last_request_metrics = nil
11
36
  end
@@ -112,7 +137,7 @@ module Files
112
137
  body = nil
113
138
  query_params = nil
114
139
  case method.to_s.downcase.to_sym
115
- when :get, :head, :delete
140
+ when *QUERY_METHODS
116
141
  query_params = params
117
142
  else
118
143
  body = params
@@ -371,7 +396,7 @@ module Files
371
396
  else
372
397
  "The Files.com API returned an error without a message (HTTP response code was #{resp.http_status})"
373
398
  end
374
- Util.log_error("API error", status: resp.http_status, error_message: message)
399
+ Util.log_error("API error", { status: resp.http_status, error_message: message }, log_settings)
375
400
 
376
401
  api_error_class(resp.data[:type]).new(message,
377
402
  http_body: resp.http_body,
@@ -458,7 +483,7 @@ module Files
458
483
  error.message.empty? ? error.response[:body] : error.message
459
484
  end
460
485
 
461
- Util.log_error("Network error", error_message: error_message)
486
+ Util.log_error("Network error", { error_message: error_message }, log_settings)
462
487
  message = "Could not connect to Files.com at URL #{base_url}. Please check your internet connection and try again. If this problem persists, you should check Files.com's service status at https://status.files.com, or contact your primary account representative."
463
488
  message += " Request was retried #{num_retries} times." if num_retries > 0
464
489
  message += "\n\n(Network error: #{error_message})"
@@ -468,14 +493,14 @@ module Files
468
493
  raise APIConnectionError, message
469
494
  end
470
495
 
471
- private def request_headers(api_key, session_id, _method, workspace_id)
496
+ private def request_headers(api_key, session_id, method, workspace_id)
472
497
  user_agent = "Files.com Ruby SDK v#{Files::VERSION}"
473
498
  user_agent += " #{format_app_info(Files.app_info)}" unless Files.app_info.nil?
474
499
 
475
- headers = {
476
- "User-Agent" => user_agent,
477
- "Content-Type" => "application/x-www-form-urlencoded",
478
- }
500
+ headers = { "User-Agent" => user_agent }
501
+ # A request body gets its Content-Type from the multipart and URL-encoding middleware, which choose
502
+ # multipart/form-data when the body holds a file part and application/x-www-form-urlencoded otherwise.
503
+ headers["Content-Type"] = "application/x-www-form-urlencoded" if QUERY_METHODS.include?(method.to_s.downcase.to_sym)
479
504
 
480
505
  if Files.default_headers.is_a?(Proc)
481
506
  proc_headers = Files.default_headers.call
@@ -504,18 +529,25 @@ module Files
504
529
  end
505
530
 
506
531
  private def log_request(context, num_retries, no_body: false)
507
- Util.log_info("Request", method: context.method, num_retries: num_retries, path: context.path)
508
- Util.log_debug("Request details", body: context.body, query_params: context.query_params) unless no_body
532
+ Util.log_info("Request", { method: context.method, num_retries: num_retries, path: context.path }, log_settings)
533
+ Util.log_debug("Request details", { body: context.body, query_params: context.query_params }, log_settings) unless no_body
509
534
  end
510
535
 
511
536
  private def log_response(context, request_start, status, body, no_body: false)
512
- Util.log_info("Response", elapsed: Time.now - request_start, method: context.method, path: context.path, status: status)
513
- Util.log_debug("Response details", body: body) unless no_body
537
+ Util.log_info("Response", { elapsed: Time.now - request_start, method: context.method, path: context.path, status: status }, log_settings)
538
+ Util.log_debug("Response details", { body: body }, log_settings) unless no_body
514
539
  end
515
540
 
516
541
  private def log_response_error(context, request_start, error)
517
- Util.log_error("Error", elapsed: Time.now - request_start, error_type: error.class, method: context.method, path: context.path)
518
- Util.log_debug("Error details", error_message: error.message)
542
+ Util.log_error("Error", { elapsed: Time.now - request_start, error_type: error.class, method: context.method, path: context.path }, log_settings)
543
+ Util.log_debug("Error details", { error_message: error.message }, log_settings)
544
+ end
545
+
546
+ # This client's own logger and level where it set them, and the library-wide ones otherwise.
547
+ private def log_settings
548
+ Util::LogSettings.new(@logger.equal?(USE_GLOBAL) ? Files.logger : @logger,
549
+ @log_level.equal?(USE_GLOBAL) ? Files.log_level : @log_level
550
+ )
519
551
  end
520
552
 
521
553
  class RequestLogContext
@@ -3,6 +3,8 @@
3
3
  require "bigdecimal"
4
4
 
5
5
  module Files
6
+ # Files::AccountLineItem is the Ruby SDK's representation of Files.com API AccountLineItem objects.
7
+ # Each instance keeps its API field values in +attributes+.
6
8
  class AccountLineItem
7
9
  attr_reader :options, :attributes
8
10
 
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
+ # Files::Action is the Ruby SDK's representation of Files.com API Action objects.
5
+ # Each instance keeps its API field values in +attributes+.
4
6
  class Action
5
7
  attr_reader :options, :attributes
6
8
 
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
+ # Files::ActionLog is the Ruby SDK's representation of Files.com API ActionLog objects.
5
+ # Each instance keeps its API field values in +attributes+.
4
6
  class ActionLog
5
7
  attr_reader :options, :attributes
6
8
 
@@ -94,14 +96,14 @@ module Files
94
96
  #
95
97
  # Returns a Files::List of Files::ActionLog objects.
96
98
  def self.list(params = {}, options = {})
97
- raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
98
- raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
99
- raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
100
- raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params[:filter_gt] and !params[:filter_gt].is_a?(Hash)
101
- raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params[:filter_gteq] and !params[:filter_gteq].is_a?(Hash)
102
- raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if params[:filter_prefix] and !params[:filter_prefix].is_a?(Hash)
103
- raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
104
- raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
99
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if !params[:cursor].nil? and !params[:cursor].is_a?(String)
100
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if !params[:per_page].nil? and !params[:per_page].is_a?(Integer)
101
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if !params[:filter].nil? and !params[:filter].is_a?(Hash)
102
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if !params[:filter_gt].nil? and !params[:filter_gt].is_a?(Hash)
103
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if !params[:filter_gteq].nil? and !params[:filter_gteq].is_a?(Hash)
104
+ raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if !params[:filter_prefix].nil? and !params[:filter_prefix].is_a?(Hash)
105
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if !params[:filter_lt].nil? and !params[:filter_lt].is_a?(Hash)
106
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if !params[:filter_lteq].nil? and !params[:filter_lteq].is_a?(Hash)
105
107
 
106
108
  List.new(ActionLog, params) do |page_params, &check_page|
107
109
  Api.send_request("/action_logs", :get, page_params, options, &check_page)
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
+ # Files::ActionNotificationExport is the Ruby SDK's representation of Files.com API ActionNotificationExport objects.
5
+ # Each instance keeps its API field values in +attributes+.
4
6
  class ActionNotificationExport
5
7
  attr_reader :options, :attributes
6
8
 
@@ -165,8 +167,8 @@ module Files
165
167
  def self.find(id, params = {}, options = {})
166
168
  params ||= {}
167
169
  params[:id] = id
168
- raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
169
- raise MissingParameterError.new("Parameter missing: id") unless params[:id]
170
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
171
+ raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
170
172
 
171
173
  response, options = Api.send_request("/action_notification_exports/#{params[:id]}", :get, params, options) { |reply| reply.require_object("ActionNotificationExport") }
172
174
  ActionNotificationExport.new(response.data, options)
@@ -194,16 +196,16 @@ module Files
194
196
  #
195
197
  # Returns a Files::ActionNotificationExport.
196
198
  def self.create(params = {}, options = {})
197
- raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
198
- raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
199
- raise InvalidParameterError.new("Bad parameter: start_at must be an String") if params[:start_at] and !params[:start_at].is_a?(String)
200
- raise InvalidParameterError.new("Bad parameter: end_at must be an String") if params[:end_at] and !params[:end_at].is_a?(String)
201
- raise InvalidParameterError.new("Bad parameter: query_message must be an String") if params[:query_message] and !params[:query_message].is_a?(String)
202
- raise InvalidParameterError.new("Bad parameter: query_request_method must be an String") if params[:query_request_method] and !params[:query_request_method].is_a?(String)
203
- raise InvalidParameterError.new("Bad parameter: query_request_url must be an String") if params[:query_request_url] and !params[:query_request_url].is_a?(String)
204
- raise InvalidParameterError.new("Bad parameter: query_status must be an String") if params[:query_status] and !params[:query_status].is_a?(String)
205
- raise InvalidParameterError.new("Bad parameter: query_path must be an String") if params[:query_path] and !params[:query_path].is_a?(String)
206
- raise InvalidParameterError.new("Bad parameter: query_folder must be an String") if params[:query_folder] and !params[:query_folder].is_a?(String)
199
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if !params[:user_id].nil? and !params[:user_id].is_a?(Integer)
200
+ raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if !params[:workspace_id].nil? and !params[:workspace_id].is_a?(Integer)
201
+ raise InvalidParameterError.new("Bad parameter: start_at must be an String") if !params[:start_at].nil? and !params[:start_at].is_a?(String)
202
+ raise InvalidParameterError.new("Bad parameter: end_at must be an String") if !params[:end_at].nil? and !params[:end_at].is_a?(String)
203
+ raise InvalidParameterError.new("Bad parameter: query_message must be an String") if !params[:query_message].nil? and !params[:query_message].is_a?(String)
204
+ raise InvalidParameterError.new("Bad parameter: query_request_method must be an String") if !params[:query_request_method].nil? and !params[:query_request_method].is_a?(String)
205
+ raise InvalidParameterError.new("Bad parameter: query_request_url must be an String") if !params[:query_request_url].nil? and !params[:query_request_url].is_a?(String)
206
+ raise InvalidParameterError.new("Bad parameter: query_status must be an String") if !params[:query_status].nil? and !params[:query_status].is_a?(String)
207
+ raise InvalidParameterError.new("Bad parameter: query_path must be an String") if !params[:query_path].nil? and !params[:query_path].is_a?(String)
208
+ raise InvalidParameterError.new("Bad parameter: query_folder must be an String") if !params[:query_folder].nil? and !params[:query_folder].is_a?(String)
207
209
 
208
210
  response, options = Api.send_request("/action_notification_exports", :post, params, options) { |reply| reply.require_object("ActionNotificationExport") }
209
211
  ActionNotificationExport.new(response.data, options)
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
+ # Files::ActionNotificationExportResult is the Ruby SDK's representation of Files.com API ActionNotificationExportResult objects.
5
+ # Each instance keeps its API field values in +attributes+.
4
6
  class ActionNotificationExportResult
5
7
  attr_reader :options, :attributes
6
8
 
@@ -70,11 +72,11 @@ module Files
70
72
  #
71
73
  # Returns a Files::List of Files::ActionNotificationExportResult objects.
72
74
  def self.list(params = {}, options = {})
73
- raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
74
- raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
75
- raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
76
- raise InvalidParameterError.new("Bad parameter: action_notification_export_id must be an Integer") if params[:action_notification_export_id] and !params[:action_notification_export_id].is_a?(Integer)
77
- raise MissingParameterError.new("Parameter missing: action_notification_export_id") unless params[:action_notification_export_id]
75
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if !params[:user_id].nil? and !params[:user_id].is_a?(Integer)
76
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if !params[:cursor].nil? and !params[:cursor].is_a?(String)
77
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if !params[:per_page].nil? and !params[:per_page].is_a?(Integer)
78
+ raise InvalidParameterError.new("Bad parameter: action_notification_export_id must be an Integer") if !params[:action_notification_export_id].nil? and !params[:action_notification_export_id].is_a?(Integer)
79
+ raise MissingParameterError.new("Parameter missing: action_notification_export_id") if params[:action_notification_export_id].nil?
78
80
 
79
81
  List.new(ActionNotificationExportResult, params) do |page_params, &check_page|
80
82
  Api.send_request("/action_notification_export_results", :get, page_params, options, &check_page)
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
+ # Files::AgentNode is the Ruby SDK's representation of Files.com API AgentNode objects.
5
+ # Each instance keeps its API field values in +attributes+.
4
6
  class AgentNode
5
7
  attr_reader :options, :attributes
6
8
 
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
+ # Files::AgentNodeConnection is the Ruby SDK's representation of Files.com API AgentNodeConnection objects.
5
+ # Each instance keeps its API field values in +attributes+.
4
6
  class AgentNodeConnection
5
7
  attr_reader :options, :attributes
6
8
 
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
+ # Files::AgentNodeInstance is the Ruby SDK's representation of Files.com API AgentNodeInstance objects.
5
+ # Each instance keeps its API field values in +attributes+.
4
6
  class AgentNodeInstance
5
7
  attr_reader :options, :attributes
6
8
 
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
+ # Files::AgentPushUpdate is the Ruby SDK's representation of Files.com API AgentPushUpdate objects.
5
+ # Each instance keeps its API field values in +attributes+.
4
6
  class AgentPushUpdate
5
7
  attr_reader :options, :attributes
6
8
 
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
+ # Files::AiAssistantPersonality is the Ruby SDK's representation of Files.com API AiAssistantPersonality objects.
5
+ # Each instance keeps its API field values in +attributes+.
4
6
  class AiAssistantPersonality
5
7
  attr_reader :options, :attributes
6
8
 
@@ -83,11 +85,11 @@ module Files
83
85
  params ||= {}
84
86
  params[:id] = @attributes[:id]
85
87
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
86
- raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
87
- raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
88
- raise InvalidParameterError.new("Bad parameter: system_prompt must be an String") if params[:system_prompt] and !params[:system_prompt].is_a?(String)
89
- raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
90
- raise MissingParameterError.new("Parameter missing: id") unless params[:id]
88
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
89
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
90
+ raise InvalidParameterError.new("Bad parameter: system_prompt must be an String") if !params[:system_prompt].nil? and !params[:system_prompt].is_a?(String)
91
+ raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if !params[:workspace_id].nil? and !params[:workspace_id].is_a?(Integer)
92
+ raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
91
93
 
92
94
  response, options = Api.send_request("/ai_assistant_personalities/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("AiAssistantPersonality") }
93
95
  @attributes = response.data
@@ -99,8 +101,8 @@ module Files
99
101
  params ||= {}
100
102
  params[:id] = @attributes[:id]
101
103
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
102
- raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
103
- raise MissingParameterError.new("Parameter missing: id") unless params[:id]
104
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
105
+ raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
104
106
 
105
107
  Api.send_request("/ai_assistant_personalities/#{@attributes[:id]}", :delete, params, @options)
106
108
  end
@@ -133,10 +135,10 @@ module Files
133
135
  #
134
136
  # Returns a Files::List of Files::AiAssistantPersonality objects.
135
137
  def self.list(params = {}, options = {})
136
- raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
137
- raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
138
- raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
139
- raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
138
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if !params[:cursor].nil? and !params[:cursor].is_a?(String)
139
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if !params[:per_page].nil? and !params[:per_page].is_a?(Integer)
140
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if !params[:sort_by].nil? and !params[:sort_by].is_a?(Hash)
141
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if !params[:filter].nil? and !params[:filter].is_a?(Hash)
140
142
 
141
143
  List.new(AiAssistantPersonality, params) do |page_params, &check_page|
142
144
  Api.send_request("/ai_assistant_personalities", :get, page_params, options, &check_page)
@@ -157,8 +159,8 @@ module Files
157
159
  def self.find(id, params = {}, options = {})
158
160
  params ||= {}
159
161
  params[:id] = id
160
- raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
161
- raise MissingParameterError.new("Parameter missing: id") unless params[:id]
162
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
163
+ raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
162
164
 
163
165
  response, options = Api.send_request("/ai_assistant_personalities/#{params[:id]}", :get, params, options) { |reply| reply.require_object("AiAssistantPersonality") }
164
166
  AiAssistantPersonality.new(response.data, options)
@@ -180,11 +182,11 @@ module Files
180
182
  #
181
183
  # Returns a Files::AiAssistantPersonality.
182
184
  def self.create(params = {}, options = {})
183
- raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
184
- raise InvalidParameterError.new("Bad parameter: system_prompt must be an String") if params[:system_prompt] and !params[:system_prompt].is_a?(String)
185
- raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
186
- raise MissingParameterError.new("Parameter missing: name") unless params[:name]
187
- raise MissingParameterError.new("Parameter missing: system_prompt") unless params[:system_prompt]
185
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
186
+ raise InvalidParameterError.new("Bad parameter: system_prompt must be an String") if !params[:system_prompt].nil? and !params[:system_prompt].is_a?(String)
187
+ raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if !params[:workspace_id].nil? and !params[:workspace_id].is_a?(Integer)
188
+ raise MissingParameterError.new("Parameter missing: name") if params[:name].nil?
189
+ raise MissingParameterError.new("Parameter missing: system_prompt") if params[:system_prompt].nil?
188
190
 
189
191
  response, options = Api.send_request("/ai_assistant_personalities", :post, params, options) { |reply| reply.require_object("AiAssistantPersonality") }
190
192
  AiAssistantPersonality.new(response.data, options)
@@ -204,11 +206,11 @@ module Files
204
206
  def self.update(id, params = {}, options = {})
205
207
  params ||= {}
206
208
  params[:id] = id
207
- raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
208
- raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
209
- raise InvalidParameterError.new("Bad parameter: system_prompt must be an String") if params[:system_prompt] and !params[:system_prompt].is_a?(String)
210
- raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
211
- raise MissingParameterError.new("Parameter missing: id") unless params[:id]
209
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
210
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
211
+ raise InvalidParameterError.new("Bad parameter: system_prompt must be an String") if !params[:system_prompt].nil? and !params[:system_prompt].is_a?(String)
212
+ raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if !params[:workspace_id].nil? and !params[:workspace_id].is_a?(Integer)
213
+ raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
212
214
 
213
215
  response, options = Api.send_request("/ai_assistant_personalities/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("AiAssistantPersonality") }
214
216
  AiAssistantPersonality.new(response.data, options)
@@ -221,8 +223,8 @@ module Files
221
223
  def self.delete(id, params = {}, options = {})
222
224
  params ||= {}
223
225
  params[:id] = id
224
- raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
225
- raise MissingParameterError.new("Parameter missing: id") unless params[:id]
226
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
227
+ raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
226
228
 
227
229
  Api.send_request("/ai_assistant_personalities/#{params[:id]}", :delete, params, options)
228
230
  nil