comet_backup_ruby_sdk 1.1.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/Gemfile.lock +2 -2
  4. data/LICENSE +1 -1
  5. data/RELEASING.md +5 -3
  6. data/comet_backup_ruby_sdk.gemspec +1 -1
  7. data/lib/comet/api_response_error.rb +1 -1
  8. data/lib/comet/comet_server.rb +445 -169
  9. data/lib/comet/definitions.rb +42 -4
  10. data/lib/comet/models/add_bucket_response_message.rb +7 -7
  11. data/lib/comet/models/admin_account_properties_response.rb +4 -4
  12. data/lib/comet/models/admin_email_options.rb +5 -5
  13. data/lib/comet/models/admin_resource_response.rb +6 -6
  14. data/lib/comet/models/admin_security_options.rb +8 -8
  15. data/lib/comet/models/admin_u2fregistration.rb +5 -5
  16. data/lib/comet/models/admin_user_permissions.rb +3 -3
  17. data/lib/comet/models/available_download.rb +5 -5
  18. data/lib/comet/models/azure_destination_location.rb +8 -8
  19. data/lib/comet/models/b2destination_location.rb +8 -8
  20. data/lib/comet/models/b2storage_extra_info.rb +3 -3
  21. data/lib/comet/models/b2transaction_totals.rb +6 -6
  22. data/lib/comet/models/b2virtual_storage_role_settings.rb +6 -6
  23. data/lib/comet/models/backup_job_advanced_options.rb +5 -5
  24. data/lib/comet/models/backup_job_detail.rb +54 -21
  25. data/lib/comet/models/backup_job_progress.rb +8 -8
  26. data/lib/comet/models/backup_rule_config.rb +28 -12
  27. data/lib/comet/models/backup_rule_event_triggers.rb +3 -3
  28. data/lib/comet/models/branding_options.rb +37 -28
  29. data/lib/comet/models/branding_properties.rb +33 -24
  30. data/lib/comet/models/browse_disk_drives_response.rb +5 -5
  31. data/lib/comet/models/browse_edbresponse.rb +5 -5
  32. data/lib/comet/models/browse_hvresponse.rb +5 -5
  33. data/lib/comet/models/browse_office_365objects_response.rb +99 -0
  34. data/lib/comet/models/browse_sqlserver_response.rb +100 -0
  35. data/lib/comet/models/browse_vssresponse.rb +5 -5
  36. data/lib/comet/models/bucket_properties.rb +7 -7
  37. data/lib/comet/models/bucket_usage_info.rb +4 -4
  38. data/lib/comet/models/comet_apiresponse_message.rb +5 -5
  39. data/lib/comet/models/comet_destination_location.rb +6 -6
  40. data/lib/comet/models/constellation_check_report.rb +5 -5
  41. data/lib/comet/models/constellation_stats.rb +7 -7
  42. data/lib/comet/models/constellation_status_apiresponse.rb +5 -5
  43. data/lib/comet/models/content_measurement.rb +5 -5
  44. data/lib/comet/models/content_measurement_component.rb +5 -5
  45. data/lib/comet/models/create_group_policy_response.rb +6 -6
  46. data/lib/comet/models/custom_remote_bucket_settings.rb +75 -0
  47. data/lib/comet/models/default_email_report_policy.rb +3 -3
  48. data/lib/comet/models/default_source_with_osrestriction.rb +83 -0
  49. data/lib/comet/models/destination_config.rb +66 -44
  50. data/lib/comet/models/destination_location.rb +41 -35
  51. data/lib/comet/models/destination_statistics.rb +6 -6
  52. data/lib/comet/models/device_config.rb +4 -4
  53. data/lib/comet/models/disk_drive.rb +14 -14
  54. data/lib/comet/models/dispatcher_admin_sources_response.rb +6 -6
  55. data/lib/comet/models/dispatcher_stored_objects_response.rb +5 -5
  56. data/lib/comet/models/dispatcher_vault_snapshots_response.rb +5 -5
  57. data/lib/comet/models/edbfile_info.rb +6 -6
  58. data/lib/comet/models/email_options.rb +10 -10
  59. data/lib/comet/models/email_report_config.rb +4 -4
  60. data/lib/comet/models/email_report_generated_preview.rb +8 -8
  61. data/lib/comet/models/external_ldapauthentication_source_settings.rb +40 -7
  62. data/lib/comet/models/extra_file_exclusion.rb +5 -5
  63. data/lib/comet/models/ftpdestination_location.rb +10 -10
  64. data/lib/comet/models/get_group_policy_response.rb +6 -6
  65. data/lib/comet/models/get_profile_and_hash_response_message.rb +6 -6
  66. data/lib/comet/models/get_profile_hash_response_message.rb +6 -6
  67. data/lib/comet/models/group_policy.rb +5 -5
  68. data/lib/comet/models/hyper_vmachine_info.rb +5 -5
  69. data/lib/comet/models/install_creds.rb +6 -6
  70. data/lib/comet/models/install_token.rb +8 -8
  71. data/lib/comet/models/install_token_response.rb +5 -5
  72. data/lib/comet/models/job_entry.rb +6 -6
  73. data/lib/comet/models/live_user_connection.rb +9 -9
  74. data/lib/comet/models/local_destination_location.rb +7 -7
  75. data/lib/comet/models/mac_oscode_sign_properties.rb +9 -9
  76. data/lib/comet/models/mongo_dbconnection.rb +16 -16
  77. data/lib/comet/models/mssqlconnection.rb +120 -0
  78. data/lib/comet/models/my_sqlconnection.rb +102 -0
  79. data/lib/comet/models/new_bucket_detail.rb +5 -5
  80. data/lib/comet/models/news_entry.rb +6 -6
  81. data/lib/comet/models/office_365connection.rb +123 -0
  82. data/lib/comet/models/office_365credential.rb +111 -0
  83. data/lib/comet/models/office_365custom_setting.rb +132 -0
  84. data/lib/comet/models/office_365object_info.rb +118 -0
  85. data/lib/comet/models/organization.rb +11 -5
  86. data/lib/comet/models/organization_response.rb +6 -6
  87. data/lib/comet/models/osinfo.rb +6 -6
  88. data/lib/comet/models/partition.rb +14 -14
  89. data/lib/comet/models/private_branding_properties.rb +27 -18
  90. data/lib/comet/models/protected_item_engine_type_policy.rb +4 -4
  91. data/lib/comet/models/public_branding_properties.rb +9 -9
  92. data/lib/comet/models/register_office_application_begin_response.rb +93 -0
  93. data/lib/comet/models/register_office_application_check_response.rb +100 -0
  94. data/lib/comet/models/remote_server_address.rb +18 -8
  95. data/lib/comet/models/remote_storage_option.rb +19 -9
  96. data/lib/comet/models/replicator_state_apiresponse.rb +15 -15
  97. data/lib/comet/models/request_storage_vault_response_message.rb +6 -6
  98. data/lib/comet/models/restore_job_advanced_options.rb +23 -7
  99. data/lib/comet/models/retention_policy.rb +4 -4
  100. data/lib/comet/models/retention_range.rb +11 -11
  101. data/lib/comet/models/s3destination_location.rb +8 -8
  102. data/lib/comet/models/schedule_config.rb +6 -6
  103. data/lib/comet/models/search_clause.rb +7 -7
  104. data/lib/comet/models/self_backup_statistics.rb +108 -0
  105. data/lib/comet/models/server_config_options_branding_fragment.rb +3 -3
  106. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +3 -3
  107. data/lib/comet/models/server_meta_branding_properties.rb +135 -0
  108. data/lib/comet/models/server_meta_version_info.rb +33 -18
  109. data/lib/comet/models/session_key_regenerated_response.rb +7 -7
  110. data/lib/comet/models/sftpdestination_location.rb +10 -10
  111. data/lib/comet/models/size_measurement.rb +6 -6
  112. data/lib/comet/models/software_build_role_options.rb +3 -3
  113. data/lib/comet/models/software_update_news_response.rb +7 -7
  114. data/lib/comet/models/source_basic_info.rb +5 -5
  115. data/lib/comet/models/source_config.rb +27 -11
  116. data/lib/comet/models/source_include_pattern.rb +84 -0
  117. data/lib/comet/models/source_statistics.rb +11 -3
  118. data/lib/comet/models/spanned_destination_location.rb +9 -3
  119. data/lib/comet/models/spanned_storage_extra_info.rb +3 -3
  120. data/lib/comet/models/sshconnection.rb +9 -9
  121. data/lib/comet/models/stat_result.rb +7 -7
  122. data/lib/comet/models/storage_free_space_info.rb +5 -5
  123. data/lib/comet/models/storage_vault_provider_policy.rb +4 -4
  124. data/lib/comet/models/stored_object.rb +96 -11
  125. data/lib/comet/models/streamable_event.rb +8 -6
  126. data/lib/comet/models/swift_destination_location.rb +16 -16
  127. data/lib/comet/models/test_response.rb +5 -5
  128. data/lib/comet/models/totp_regenerated_response.rb +8 -8
  129. data/lib/comet/models/u2fregister_request.rb +5 -5
  130. data/lib/comet/models/u2fregistered_key.rb +6 -6
  131. data/lib/comet/models/u2fregistration_challenge_response.rb +7 -7
  132. data/lib/comet/models/u2fsign_request.rb +6 -6
  133. data/lib/comet/models/u2fsign_response.rb +7 -7
  134. data/lib/comet/models/uninstall_config.rb +3 -3
  135. data/lib/comet/models/update_campaign_device_status.rb +4 -4
  136. data/lib/comet/models/update_campaign_options.rb +3 -3
  137. data/lib/comet/models/update_campaign_properties.rb +5 -5
  138. data/lib/comet/models/update_campaign_status.rb +5 -5
  139. data/lib/comet/models/update_campaign_status_device_entry.rb +6 -6
  140. data/lib/comet/models/user_custom_email_settings.rb +3 -3
  141. data/lib/comet/models/user_on_server.rb +5 -5
  142. data/lib/comet/models/user_policy.rb +22 -7
  143. data/lib/comet/models/user_profile_config.rb +19 -19
  144. data/lib/comet/models/user_profile_fragment.rb +4 -4
  145. data/lib/comet/models/vault_snapshot.rb +12 -6
  146. data/lib/comet/models/vsscomponent.rb +6 -6
  147. data/lib/comet/models/vsswriter_info.rb +4 -4
  148. data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +6 -6
  149. data/lib/comet/models/web_interface_branding_properties.rb +7 -7
  150. data/lib/comet/models/webhook_option.rb +5 -5
  151. data/lib/comet/models/win_smbauth.rb +7 -7
  152. data/lib/comet/models/windows_code_sign_properties.rb +12 -12
  153. data/lib/comet_backup_ruby_sdk.rb +16 -1
  154. metadata +20 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28c20d30682b68212614c323e57214c8e7e4c25d7d96874d064c8d810e559faa
4
- data.tar.gz: 1abc454c8e6505934dade8b26ac3b3791bc6436bf7203332805fb375ce6e9b90
3
+ metadata.gz: e7343bc96e2ac87ca1b4ff694fbe25e01c6cca99b8dfe6da063050ab3c462530
4
+ data.tar.gz: ce7ea45a2480321db18a7bc3758d742464810d8feb1c6e2a652df13365404c92
5
5
  SHA512:
6
- metadata.gz: 0bc8d5889354e1a0a8f4b1e0c89a71b4a1d6c44faab8ec03432bfd7fdffaebebaeb6a44ea5e44293979a4f5694e89e14a63f0ba7f543fc420d1e05deb835d0d6
7
- data.tar.gz: c7654db0f8f17ef9fe6939e6fe3fc42f72db4d8b855b4b692fc5b1b2ac6a12d6858f5e7c7c8ecf82cd1994cf1b227223042e3226dd17308e5145b02df332a3f0
6
+ metadata.gz: 420c4b3892475409d56b1cc64a6a90e9d06ad8dcc4ad7ec3550ad0b861a5ad14807b0f21f4c4bfa542ff010b6beb833a91e627195c8ba215badc7528f7861072
7
+ data.tar.gz: 19ff57505c136f8d4150987cdd05c7d2133f7541c30256b579b46d83ae373847ea6a1af86c5b2cf2f0f61d672eeb3cff806bd0795d1d27762375df13b371a5f4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2021-07-01 v1.6.0
4
+ - Based on Comet 21.6.6
5
+ - Support new `DefaultSourceWithOSRestriction` and `LastSuccessfulBackupJob` fields
6
+ - Support custom credentials when performing a cloud Office 365 restore job
7
+ - Support identifying Microsoft Teams folders inside a Sharepoint backup job
8
+ - Document the `SourceIncludePattern` structure used for `PINCLUDE`/`RINCLUDE` rules in a File-type `EngineProps` array
9
+ - Document existing `BrandingProps` endpoint
10
+
11
+ ## 2021-05-25 v1.5.0
12
+ - Based on Comet 21.6.1
13
+ - Add new APIs to remotely browse MySQL, MongoDB, MSSQL database servers
14
+ - Add Microsoft Office 365 properties on BackupJobDetail and on StoredObject
15
+ - Add Microsoft Office 365 browsing APIs
16
+ - Add Microsoft Office 365 Engine definition (`ENGINE_BUILTIN_MSOFFICE`) and associated `EngineProp` data structure definitions
17
+ - Add `AdminDispatcherRegisterOfficeApplication` APIs
18
+ - Add `RESTORETYPE_OFFICE365_CLOUD` constant
19
+ - Support suspending organizations
20
+ - Support reading the Server Self-Backup status
21
+ - Support new `PathMenuBarIcnsFile` branding option for Comet Backup on macOS
22
+ - Add more detailed description for `AdminDispatcherRequestStoredObjects`
23
+
24
+ ## 2021-03-03 v1.4.0
25
+ - Based on Comet 21.2.1
26
+ - Support restoring files to original paths
27
+ - Support the new "Custom" requestable Storage Vault provider type and its `CustomRemoteBucketSettings` structure
28
+ - Support new `SpanUseStaticSlots` attribute
29
+ - Fix missing fields in `ExternalLDAPAuthenticationSourceSettings` structure
30
+ - Fix broken `AdminDispatcherRequestFilesystemObjects` that was parsing into the wrong response type
31
+
32
+ ## 2020-11-24 v1.3.0
33
+ - Based on Comet 20.11.0
34
+ - Support new `AdminDispatcherDeleteSnapshots` API for deleting multiple snapshots in a single step
35
+ - Support `AdminMetaResourceNew` API using multipart request
36
+ - Fix an issue with properly raising `TypeError` for invalid parameters
37
+
38
+ ## 2020-11-05 v1.2.0
39
+ - Based on Comet 20.9.10
40
+ - Support new `ThawExec` feature
41
+
3
42
  ## 2020-10-08 v1.1.0
4
43
  - Based on Comet 20.9.6
5
44
  - Support new `AdminStorageBucketProperties` API
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (1.1.0)
4
+ comet_backup_ruby_sdk (1.6.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,7 +14,7 @@ GEM
14
14
  rainbow (3.0.0)
15
15
  rake (13.0.1)
16
16
  regexp_parser (1.7.1)
17
- rexml (3.2.4)
17
+ rexml (3.2.5)
18
18
  rubocop (0.88.0)
19
19
  parallel (~> 1.10)
20
20
  parser (>= 2.7.1.1)
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020 Comet Licensing Ltd.
1
+ Copyright (c) 2021 Comet Licensing Ltd.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
data/RELEASING.md CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  1. All tests passing
4
4
  2. Update changelog in `CHANGELOG.md`
5
- 3. Update version number in `gemspec`
6
- 4. `gem build comet_backup_ruby_sdk`
5
+ 3. Update version number in `comet_backup_ruby_sdk.gemspec`
6
+ 4. `bundle install`
7
+ - Should update our internal version in Gemfile.lock
8
+ 4. `gem build comet_backup_ruby_sdk.gemspec`
7
9
  - Should be warning-free
8
10
  5. Git tag
9
11
  - Respect semver
10
- 6. `gem push comet_backup_ruby_sdk-0.x.x.gem`
12
+ 6. `gem push comet_backup_ruby_sdk-1.x.x.gem`
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
12
12
 
13
13
  Gem::Specification.new do |spec|
14
14
  spec.name = 'comet_backup_ruby_sdk'
15
- spec.version = '1.1.0'
15
+ spec.version = '1.6.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2020 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2021 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2020 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2021 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -26,11 +26,11 @@ module Comet
26
26
 
27
27
  # Initialize a new CometServer class instance.
28
28
  def initialize(server_address, username, password)
29
- raise TypeError "'server_address' expected String, got #{server_address.class}" unless server_address.is_a? String
29
+ raise TypeError, "'server_address' expected String, got #{server_address.class}" unless server_address.is_a? String
30
30
 
31
- raise TypeError "'username' expected String, got #{username.class}" unless username.is_a? String
31
+ raise TypeError, "'username' expected String, got #{username.class}" unless username.is_a? String
32
32
 
33
- raise TypeError "'password' expected String, got #{password.class}" unless password.is_a? String
33
+ raise TypeError, "'password' expected String, got #{password.class}" unless password.is_a? String
34
34
 
35
35
  @server_address = server_address
36
36
  @username = username
@@ -103,7 +103,7 @@ module Comet
103
103
  if self_address.nil?
104
104
  submit_params['SelfAddress'] = @server_address
105
105
  else
106
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
106
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
107
107
 
108
108
  submit_params['SelfAddress'] = self_address
109
109
  end
@@ -126,7 +126,7 @@ module Comet
126
126
  # @return [Comet::SessionKeyRegeneratedResponse]
127
127
  def admin_account_session_start_as_user(target_user)
128
128
  submit_params = {}
129
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
129
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
130
130
 
131
131
  submit_params['TargetUser'] = target_user
132
132
 
@@ -151,7 +151,7 @@ module Comet
151
151
  # @return [Comet::CometAPIResponseMessage]
152
152
  def admin_account_set_properties(security)
153
153
  submit_params = {}
154
- raise TypeError "'security' expected Comet::AdminSecurityOptions, got #{security.class}" unless security.is_a? Comet::AdminSecurityOptions
154
+ raise TypeError, "'security' expected Comet::AdminSecurityOptions, got #{security.class}" unless security.is_a? Comet::AdminSecurityOptions
155
155
 
156
156
  submit_params['Security'] = security.to_json
157
157
 
@@ -173,7 +173,7 @@ module Comet
173
173
  # @return [Comet::U2FRegistrationChallengeResponse]
174
174
  def admin_account_u2f_request_registration_challenge(self_address)
175
175
  submit_params = {}
176
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
176
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
177
177
 
178
178
  submit_params['SelfAddress'] = self_address
179
179
 
@@ -199,19 +199,19 @@ module Comet
199
199
  # @return [Comet::CometAPIResponseMessage]
200
200
  def admin_account_u2f_submit_challenge_response(u2fchallenge_id, u2fclient_data, u2fregistration_data, u2fversion, description)
201
201
  submit_params = {}
202
- raise TypeError "'u2fchallenge_id' expected String, got #{u2fchallenge_id.class}" unless u2fchallenge_id.is_a? String
202
+ raise TypeError, "'u2fchallenge_id' expected String, got #{u2fchallenge_id.class}" unless u2fchallenge_id.is_a? String
203
203
 
204
204
  submit_params['U2FChallengeID'] = u2fchallenge_id
205
- raise TypeError "'u2fclient_data' expected String, got #{u2fclient_data.class}" unless u2fclient_data.is_a? String
205
+ raise TypeError, "'u2fclient_data' expected String, got #{u2fclient_data.class}" unless u2fclient_data.is_a? String
206
206
 
207
207
  submit_params['U2FClientData'] = u2fclient_data
208
- raise TypeError "'u2fregistration_data' expected String, got #{u2fregistration_data.class}" unless u2fregistration_data.is_a? String
208
+ raise TypeError, "'u2fregistration_data' expected String, got #{u2fregistration_data.class}" unless u2fregistration_data.is_a? String
209
209
 
210
210
  submit_params['U2FRegistrationData'] = u2fregistration_data
211
- raise TypeError "'u2fversion' expected String, got #{u2fversion.class}" unless u2fversion.is_a? String
211
+ raise TypeError, "'u2fversion' expected String, got #{u2fversion.class}" unless u2fversion.is_a? String
212
212
 
213
213
  submit_params['U2FVersion'] = u2fversion
214
- raise TypeError "'description' expected String, got #{description.class}" unless description.is_a? String
214
+ raise TypeError, "'description' expected String, got #{description.class}" unless description.is_a? String
215
215
 
216
216
  submit_params['Description'] = description
217
217
 
@@ -233,7 +233,7 @@ module Comet
233
233
  # @return [Comet::CometAPIResponseMessage]
234
234
  def admin_account_validate_totp(totpcode)
235
235
  submit_params = {}
236
- raise TypeError "'totpcode' expected String, got #{totpcode.class}" unless totpcode.is_a? String
236
+ raise TypeError, "'totpcode' expected String, got #{totpcode.class}" unless totpcode.is_a? String
237
237
 
238
238
  submit_params['TOTPCode'] = totpcode
239
239
 
@@ -259,19 +259,19 @@ module Comet
259
259
  # @return [Comet::CometAPIResponseMessage]
260
260
  def admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil)
261
261
  submit_params = {}
262
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
262
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
263
263
 
264
264
  submit_params['TargetUser'] = target_user
265
- raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
265
+ raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
266
266
 
267
267
  submit_params['TargetPassword'] = target_password
268
268
  unless store_recovery_code.nil?
269
- raise TypeError "'store_recovery_code' expected Numeric, got #{store_recovery_code.class}" unless store_recovery_code.is_a? Numeric
269
+ raise TypeError, "'store_recovery_code' expected Numeric, got #{store_recovery_code.class}" unless store_recovery_code.is_a? Numeric
270
270
 
271
271
  submit_params['StoreRecoveryCode'] = store_recovery_code
272
272
  end
273
273
  unless require_password_change.nil?
274
- raise TypeError "'require_password_change' expected Numeric, got #{require_password_change.class}" unless require_password_change.is_a? Numeric
274
+ raise TypeError, "'require_password_change' expected Numeric, got #{require_password_change.class}" unless require_password_change.is_a? Numeric
275
275
 
276
276
  submit_params['RequirePasswordChange'] = require_password_change
277
277
  end
@@ -297,10 +297,10 @@ module Comet
297
297
  # @return [Comet::CometAPIResponseMessage]
298
298
  def admin_add_user_from_profile(target_user, profile_data)
299
299
  submit_params = {}
300
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
300
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
301
301
 
302
302
  submit_params['TargetUser'] = target_user
303
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
303
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
304
304
 
305
305
  submit_params['ProfileData'] = profile_data.to_json
306
306
 
@@ -324,7 +324,7 @@ module Comet
324
324
  # @return [Comet::CometAPIResponseMessage]
325
325
  def admin_admin_user_delete(target_user)
326
326
  submit_params = {}
327
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
327
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
328
328
 
329
329
  submit_params['TargetUser'] = target_user
330
330
 
@@ -375,14 +375,14 @@ module Comet
375
375
  # @return [Comet::CometAPIResponseMessage]
376
376
  def admin_admin_user_new(target_user, target_password, target_org_id = nil)
377
377
  submit_params = {}
378
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
378
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
379
379
 
380
380
  submit_params['TargetUser'] = target_user
381
- raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
381
+ raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
382
382
 
383
383
  submit_params['TargetPassword'] = target_password
384
384
  unless target_org_id.nil?
385
- raise TypeError "'target_org_id' expected String, got #{target_org_id.class}" unless target_org_id.is_a? String
385
+ raise TypeError, "'target_org_id' expected String, got #{target_org_id.class}" unless target_org_id.is_a? String
386
386
 
387
387
  submit_params['TargetOrgID'] = target_org_id
388
388
  end
@@ -433,13 +433,13 @@ module Comet
433
433
  # @return [String]
434
434
  def admin_branding_generate_client_by_platform(platform, self_address = nil)
435
435
  submit_params = {}
436
- raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
436
+ raise TypeError, "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
437
437
 
438
438
  submit_params['Platform'] = platform
439
439
  if self_address.nil?
440
440
  submit_params['SelfAddress'] = @server_address
441
441
  else
442
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
442
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
443
443
 
444
444
  submit_params['SelfAddress'] = self_address
445
445
  end
@@ -462,7 +462,7 @@ module Comet
462
462
  if self_address.nil?
463
463
  submit_params['SelfAddress'] = @server_address
464
464
  else
465
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
465
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
466
466
 
467
467
  submit_params['SelfAddress'] = self_address
468
468
  end
@@ -485,7 +485,7 @@ module Comet
485
485
  if self_address.nil?
486
486
  submit_params['SelfAddress'] = @server_address
487
487
  else
488
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
488
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
489
489
 
490
490
  submit_params['SelfAddress'] = self_address
491
491
  end
@@ -506,13 +506,13 @@ module Comet
506
506
  # @return [Comet::CometAPIResponseMessage]
507
507
  def admin_branding_generate_client_test(platform, self_address = nil)
508
508
  submit_params = {}
509
- raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
509
+ raise TypeError, "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
510
510
 
511
511
  submit_params['Platform'] = platform
512
512
  if self_address.nil?
513
513
  submit_params['SelfAddress'] = @server_address
514
514
  else
515
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
515
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
516
516
 
517
517
  submit_params['SelfAddress'] = self_address
518
518
  end
@@ -541,7 +541,7 @@ module Comet
541
541
  if self_address.nil?
542
542
  submit_params['SelfAddress'] = @server_address
543
543
  else
544
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
544
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
545
545
 
546
546
  submit_params['SelfAddress'] = self_address
547
547
  end
@@ -565,7 +565,7 @@ module Comet
565
565
  if self_address.nil?
566
566
  submit_params['SelfAddress'] = @server_address
567
567
  else
568
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
568
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
569
569
 
570
570
  submit_params['SelfAddress'] = self_address
571
571
  end
@@ -589,7 +589,7 @@ module Comet
589
589
  if self_address.nil?
590
590
  submit_params['SelfAddress'] = @server_address
591
591
  else
592
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
592
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
593
593
 
594
594
  submit_params['SelfAddress'] = self_address
595
595
  end
@@ -613,7 +613,7 @@ module Comet
613
613
  if self_address.nil?
614
614
  submit_params['SelfAddress'] = @server_address
615
615
  else
616
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
616
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
617
617
 
618
618
  submit_params['SelfAddress'] = self_address
619
619
  end
@@ -637,7 +637,7 @@ module Comet
637
637
  if self_address.nil?
638
638
  submit_params['SelfAddress'] = @server_address
639
639
  else
640
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
640
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
641
641
 
642
642
  submit_params['SelfAddress'] = self_address
643
643
  end
@@ -661,7 +661,7 @@ module Comet
661
661
  if self_address.nil?
662
662
  submit_params['SelfAddress'] = @server_address
663
663
  else
664
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
664
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
665
665
 
666
666
  submit_params['SelfAddress'] = self_address
667
667
  end
@@ -681,10 +681,10 @@ module Comet
681
681
  # @return [Comet::CometAPIResponseMessage]
682
682
  def admin_bulletin_submit(subject, content)
683
683
  submit_params = {}
684
- raise TypeError "'subject' expected String, got #{subject.class}" unless subject.is_a? String
684
+ raise TypeError, "'subject' expected String, got #{subject.class}" unless subject.is_a? String
685
685
 
686
686
  submit_params['Subject'] = subject
687
- raise TypeError "'content' expected String, got #{content.class}" unless content.is_a? String
687
+ raise TypeError, "'content' expected String, got #{content.class}" unless content.is_a? String
688
688
 
689
689
  submit_params['Content'] = content
690
690
 
@@ -782,14 +782,14 @@ module Comet
782
782
  # @return [Comet::InstallTokenResponse]
783
783
  def admin_create_install_token(target_user, target_password, server = nil)
784
784
  submit_params = {}
785
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
785
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
786
786
 
787
787
  submit_params['TargetUser'] = target_user
788
- raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
788
+ raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
789
789
 
790
790
  submit_params['TargetPassword'] = target_password
791
791
  unless server.nil?
792
- raise TypeError "'server' expected String, got #{server.class}" unless server.is_a? String
792
+ raise TypeError, "'server' expected String, got #{server.class}" unless server.is_a? String
793
793
 
794
794
  submit_params['Server'] = server
795
795
  end
@@ -817,11 +817,11 @@ module Comet
817
817
  # @return [Comet::CometAPIResponseMessage]
818
818
  def admin_delete_user(target_user, uninstall_config = nil)
819
819
  submit_params = {}
820
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
820
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
821
821
 
822
822
  submit_params['TargetUser'] = target_user
823
823
  unless uninstall_config.nil?
824
- raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
824
+ raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
825
825
 
826
826
  submit_params['UninstallConfig'] = uninstall_config.to_json
827
827
  end
@@ -845,7 +845,7 @@ module Comet
845
845
  # @return [Comet::CometAPIResponseMessage]
846
846
  def admin_disable_user_totp(target_user)
847
847
  submit_params = {}
848
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
848
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
849
849
 
850
850
  submit_params['TargetUser'] = target_user
851
851
 
@@ -870,10 +870,10 @@ module Comet
870
870
  # @return [Comet::CometAPIResponseMessage]
871
871
  def admin_dispatcher_apply_retention_rules(target_id, destination)
872
872
  submit_params = {}
873
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
873
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
874
874
 
875
875
  submit_params['TargetID'] = target_id
876
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
876
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
877
877
 
878
878
  submit_params['Destination'] = destination
879
879
 
@@ -898,10 +898,10 @@ module Comet
898
898
  # @return [Comet::CometAPIResponseMessage]
899
899
  def admin_dispatcher_deepverify_storage_vault(target_id, destination)
900
900
  submit_params = {}
901
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
901
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
902
902
 
903
903
  submit_params['TargetID'] = target_id
904
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
904
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
905
905
 
906
906
  submit_params['Destination'] = destination
907
907
 
@@ -926,13 +926,13 @@ module Comet
926
926
  # @return [Comet::CometAPIResponseMessage]
927
927
  def admin_dispatcher_delete_snapshot(target_id, destination_id, snapshot_id)
928
928
  submit_params = {}
929
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
929
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
930
930
 
931
931
  submit_params['TargetID'] = target_id
932
- raise TypeError "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
932
+ raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
933
933
 
934
934
  submit_params['DestinationID'] = destination_id
935
- raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
935
+ raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
936
936
 
937
937
  submit_params['SnapshotID'] = snapshot_id
938
938
 
@@ -944,6 +944,38 @@ module Comet
944
944
  ret
945
945
  end
946
946
 
947
+ # AdminDispatcherDeleteSnapshots
948
+ #
949
+ # Instruct a live connected device to delete multiple stored snapshots.
950
+ # The target device must be running Comet 20.9.10 or later.
951
+ #
952
+ # You must supply administrator authentication credentials to use this API.
953
+ # This API requires the Auth Role to be enabled.
954
+ #
955
+ # @param [String] target_id The live connection GUID
956
+ # @param [String] destination_id The Storage Vault GUID
957
+ # @param [Array<String>] snapshot_ids The backup job snapshot IDs to delete
958
+ # @return [Comet::CometAPIResponseMessage]
959
+ def admin_dispatcher_delete_snapshots(target_id, destination_id, snapshot_ids)
960
+ submit_params = {}
961
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
962
+
963
+ submit_params['TargetID'] = target_id
964
+ raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
965
+
966
+ submit_params['DestinationID'] = destination_id
967
+ raise TypeError, "'snapshot_ids' expected Array, got #{snapshot_ids.class}" unless snapshot_ids.is_a? Array
968
+
969
+ submit_params['SnapshotIDs'] = snapshot_ids.to_json
970
+
971
+ body = perform_request('api/v1/admin/dispatcher/delete-snapshots', submit_params)
972
+ json_body = JSON.parse body
973
+ check_status json_body
974
+ ret = Comet::CometAPIResponseMessage.new
975
+ ret.from_hash(json_body)
976
+ ret
977
+ end
978
+
947
979
  # AdminDispatcherDropConnection
948
980
  #
949
981
  # Disconnect a live connected device.
@@ -956,7 +988,7 @@ module Comet
956
988
  # @return [Comet::CometAPIResponseMessage]
957
989
  def admin_dispatcher_drop_connection(target_id)
958
990
  submit_params = {}
959
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
991
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
960
992
 
961
993
  submit_params['TargetID'] = target_id
962
994
 
@@ -981,10 +1013,10 @@ module Comet
981
1013
  # @return [Comet::CometAPIResponseMessage]
982
1014
  def admin_dispatcher_import_apply(target_id, import_source_id)
983
1015
  submit_params = {}
984
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1016
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
985
1017
 
986
1018
  submit_params['TargetID'] = target_id
987
- raise TypeError "'import_source_id' expected String, got #{import_source_id.class}" unless import_source_id.is_a? String
1019
+ raise TypeError, "'import_source_id' expected String, got #{import_source_id.class}" unless import_source_id.is_a? String
988
1020
 
989
1021
  submit_params['ImportSourceID'] = import_source_id
990
1022
 
@@ -1008,7 +1040,7 @@ module Comet
1008
1040
  # @return [Comet::CometAPIResponseMessage]
1009
1041
  def admin_dispatcher_kill_process(target_id)
1010
1042
  submit_params = {}
1011
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1043
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1012
1044
 
1013
1045
  submit_params['TargetID'] = target_id
1014
1046
 
@@ -1056,7 +1088,7 @@ module Comet
1056
1088
  # @return [Comet::CometAPIResponseMessage]
1057
1089
  def admin_dispatcher_refetch_profile(target_id)
1058
1090
  submit_params = {}
1059
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1091
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1060
1092
 
1061
1093
  submit_params['TargetID'] = target_id
1062
1094
 
@@ -1068,6 +1100,62 @@ module Comet
1068
1100
  ret
1069
1101
  end
1070
1102
 
1103
+ # AdminDispatcherRegisterOfficeApplicationBegin
1104
+ #
1105
+ # Begin the process of registering a new Azure AD application that can access Office 365 for backup.
1106
+ # After calling this API, you should supply the login details to the end-user, and then begin polling the AdminDispatcherRegisterOfficeApplicationCheck with the supplied "Continuation" parameter to check on the registration process.
1107
+ #
1108
+ # You must supply administrator authentication credentials to use this API.
1109
+ # This API requires the Auth Role to be enabled.
1110
+ #
1111
+ # @param [String] target_id The live connection GUID
1112
+ # @param [String] email_address The email address of the Azure AD administrator
1113
+ # @return [Comet::RegisterOfficeApplicationBeginResponse]
1114
+ def admin_dispatcher_register_office_application_begin(target_id, email_address)
1115
+ submit_params = {}
1116
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1117
+
1118
+ submit_params['TargetID'] = target_id
1119
+ raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
1120
+
1121
+ submit_params['EmailAddress'] = email_address
1122
+
1123
+ body = perform_request('api/v1/admin/dispatcher/register-office-application/begin', submit_params)
1124
+ json_body = JSON.parse body
1125
+ check_status json_body
1126
+ ret = Comet::RegisterOfficeApplicationBeginResponse.new
1127
+ ret.from_hash(json_body)
1128
+ ret
1129
+ end
1130
+
1131
+ # AdminDispatcherRegisterOfficeApplicationCheck
1132
+ #
1133
+ # Check the process of registering a new Azure AD application that can access Office 365 for backup.
1134
+ # You should begin the process by calling AdminDispatcherRegisterOfficeApplicationBegin and asking the end-user to complete the Azure authentication steps.
1135
+ #
1136
+ # You must supply administrator authentication credentials to use this API.
1137
+ # This API requires the Auth Role to be enabled.
1138
+ #
1139
+ # @param [String] target_id The live connection GUID
1140
+ # @param [String] continuation The ID returned from the AdminDispatcherRegisterOfficeApplicationBegin endpoint
1141
+ # @return [Comet::RegisterOfficeApplicationCheckResponse]
1142
+ def admin_dispatcher_register_office_application_check(target_id, continuation)
1143
+ submit_params = {}
1144
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1145
+
1146
+ submit_params['TargetID'] = target_id
1147
+ raise TypeError, "'continuation' expected String, got #{continuation.class}" unless continuation.is_a? String
1148
+
1149
+ submit_params['Continuation'] = continuation
1150
+
1151
+ body = perform_request('api/v1/admin/dispatcher/register-office-application/check', submit_params)
1152
+ json_body = JSON.parse body
1153
+ check_status json_body
1154
+ ret = Comet::RegisterOfficeApplicationCheckResponse.new
1155
+ ret.from_hash(json_body)
1156
+ ret
1157
+ end
1158
+
1071
1159
  # AdminDispatcherReindexStorageVault
1072
1160
  #
1073
1161
  # Instruct a live connected device to rebuild Storage Vault indexes now.
@@ -1081,10 +1169,10 @@ module Comet
1081
1169
  # @return [Comet::CometAPIResponseMessage]
1082
1170
  def admin_dispatcher_reindex_storage_vault(target_id, destination)
1083
1171
  submit_params = {}
1084
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1172
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1085
1173
 
1086
1174
  submit_params['TargetID'] = target_id
1087
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1175
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1088
1176
 
1089
1177
  submit_params['Destination'] = destination
1090
1178
 
@@ -1107,7 +1195,7 @@ module Comet
1107
1195
  # @return [Comet::BrowseDiskDrivesResponse]
1108
1196
  def admin_dispatcher_request_browse_disk_drives(target_id)
1109
1197
  submit_params = {}
1110
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1198
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1111
1199
 
1112
1200
  submit_params['TargetID'] = target_id
1113
1201
 
@@ -1130,7 +1218,7 @@ module Comet
1130
1218
  # @return [Comet::BrowseEDBResponse]
1131
1219
  def admin_dispatcher_request_browse_exchange_edb(target_id)
1132
1220
  submit_params = {}
1133
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1221
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1134
1222
 
1135
1223
  submit_params['TargetID'] = target_id
1136
1224
 
@@ -1153,7 +1241,7 @@ module Comet
1153
1241
  # @return [Comet::BrowseHVResponse]
1154
1242
  def admin_dispatcher_request_browse_hyperv(target_id)
1155
1243
  submit_params = {}
1156
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1244
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1157
1245
 
1158
1246
  submit_params['TargetID'] = target_id
1159
1247
 
@@ -1165,6 +1253,90 @@ module Comet
1165
1253
  ret
1166
1254
  end
1167
1255
 
1256
+ # AdminDispatcherRequestBrowseMongodb
1257
+ #
1258
+ # Request a list of tables in MongoDB database.
1259
+ # The remote device must have given consent for an MSP to browse their files.
1260
+ #
1261
+ # You must supply administrator authentication credentials to use this API.
1262
+ # This API requires the Auth Role to be enabled.
1263
+ #
1264
+ # @param [String] target_id The live connection GUID
1265
+ # @param [Comet::MongoDBConnection] credentials The Mongo database authentication settings
1266
+ # @return [Comet::BrowseSQLServerResponse]
1267
+ def admin_dispatcher_request_browse_mongodb(target_id, credentials)
1268
+ submit_params = {}
1269
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1270
+
1271
+ submit_params['TargetID'] = target_id
1272
+ raise TypeError, "'credentials' expected Comet::MongoDBConnection, got #{credentials.class}" unless credentials.is_a? Comet::MongoDBConnection
1273
+
1274
+ submit_params['Credentials'] = credentials.to_json
1275
+
1276
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mongodb', submit_params)
1277
+ json_body = JSON.parse body
1278
+ check_status json_body
1279
+ ret = Comet::BrowseSQLServerResponse.new
1280
+ ret.from_hash(json_body)
1281
+ ret
1282
+ end
1283
+
1284
+ # AdminDispatcherRequestBrowseMssql
1285
+ #
1286
+ # Request a list of tables in MSSQL database.
1287
+ # The remote device must have given consent for an MSP to browse their files.
1288
+ #
1289
+ # You must supply administrator authentication credentials to use this API.
1290
+ # This API requires the Auth Role to be enabled.
1291
+ #
1292
+ # @param [String] target_id The live connection GUID
1293
+ # @param [Comet::MSSQLConnection] credentials The MSSQL database authentication settings
1294
+ # @return [Comet::BrowseSQLServerResponse]
1295
+ def admin_dispatcher_request_browse_mssql(target_id, credentials)
1296
+ submit_params = {}
1297
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1298
+
1299
+ submit_params['TargetID'] = target_id
1300
+ raise TypeError, "'credentials' expected Comet::MSSQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MSSQLConnection
1301
+
1302
+ submit_params['Credentials'] = credentials.to_json
1303
+
1304
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mssql', submit_params)
1305
+ json_body = JSON.parse body
1306
+ check_status json_body
1307
+ ret = Comet::BrowseSQLServerResponse.new
1308
+ ret.from_hash(json_body)
1309
+ ret
1310
+ end
1311
+
1312
+ # AdminDispatcherRequestBrowseMysql
1313
+ #
1314
+ # Request a list of tables in MySQL database.
1315
+ # The remote device must have given consent for an MSP to browse their files.
1316
+ #
1317
+ # You must supply administrator authentication credentials to use this API.
1318
+ # This API requires the Auth Role to be enabled.
1319
+ #
1320
+ # @param [String] target_id The live connection GUID
1321
+ # @param [Comet::MySQLConnection] credentials The MySQL database authentication settings
1322
+ # @return [Comet::BrowseSQLServerResponse]
1323
+ def admin_dispatcher_request_browse_mysql(target_id, credentials)
1324
+ submit_params = {}
1325
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1326
+
1327
+ submit_params['TargetID'] = target_id
1328
+ raise TypeError, "'credentials' expected Comet::MySQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MySQLConnection
1329
+
1330
+ submit_params['Credentials'] = credentials.to_json
1331
+
1332
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mysql', submit_params)
1333
+ json_body = JSON.parse body
1334
+ check_status json_body
1335
+ ret = Comet::BrowseSQLServerResponse.new
1336
+ ret.from_hash(json_body)
1337
+ ret
1338
+ end
1339
+
1168
1340
  # AdminDispatcherRequestBrowseVssAaw
1169
1341
  #
1170
1342
  # Request a list of installed VSS Writers (Application-Aware Writers) from a live connected device.
@@ -1176,7 +1348,7 @@ module Comet
1176
1348
  # @return [Comet::BrowseVSSResponse]
1177
1349
  def admin_dispatcher_request_browse_vss_aaw(target_id)
1178
1350
  submit_params = {}
1179
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1351
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1180
1352
 
1181
1353
  submit_params['TargetID'] = target_id
1182
1354
 
@@ -1198,14 +1370,14 @@ module Comet
1198
1370
  #
1199
1371
  # @param [String] target_id The live connection GUID
1200
1372
  # @param [String] path (Optional) Browse objects inside this path. If empty or not present, returns the top-level device paths
1201
- # @return [Array<Comet::StoredObject>]
1373
+ # @return [Comet::DispatcherStoredObjectsResponse]
1202
1374
  def admin_dispatcher_request_filesystem_objects(target_id, path = nil)
1203
1375
  submit_params = {}
1204
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1376
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1205
1377
 
1206
1378
  submit_params['TargetID'] = target_id
1207
1379
  unless path.nil?
1208
- raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1380
+ raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
1209
1381
 
1210
1382
  submit_params['Path'] = path
1211
1383
  end
@@ -1213,15 +1385,8 @@ module Comet
1213
1385
  body = perform_request('api/v1/admin/dispatcher/request-filesystem-objects', submit_params)
1214
1386
  json_body = JSON.parse body
1215
1387
  check_status json_body
1216
- if json_body.nil?
1217
- ret = []
1218
- else
1219
- ret = Array.new(json_body.length)
1220
- json_body.each_with_index do |v, i|
1221
- ret[i] = Comet::StoredObject.new
1222
- ret[i].from_hash(v)
1223
- end
1224
- end
1388
+ ret = Comet::DispatcherStoredObjectsResponse.new
1389
+ ret.from_hash(json_body)
1225
1390
  ret
1226
1391
  end
1227
1392
 
@@ -1236,7 +1401,7 @@ module Comet
1236
1401
  # @return [Comet::DispatcherAdminSourcesResponse]
1237
1402
  def admin_dispatcher_request_import_sources(target_id)
1238
1403
  submit_params = {}
1239
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1404
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1240
1405
 
1241
1406
  submit_params['TargetID'] = target_id
1242
1407
 
@@ -1248,10 +1413,67 @@ module Comet
1248
1413
  ret
1249
1414
  end
1250
1415
 
1416
+ # AdminDispatcherRequestOffice365Accounts
1417
+ #
1418
+ # Request a list of Office365 mailbox accounts.
1419
+ # The remote device must have given consent for an MSP to browse their files.
1420
+ #
1421
+ # You must supply administrator authentication credentials to use this API.
1422
+ # This API requires the Auth Role to be enabled.
1423
+ #
1424
+ # @param [String] target_id The live connection GUID
1425
+ # @param [Comet::Office365Credential] credentials The Office365 account credential
1426
+ # @return [Comet::BrowseOffice365ObjectsResponse]
1427
+ def admin_dispatcher_request_office_365accounts(target_id, credentials)
1428
+ submit_params = {}
1429
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1430
+
1431
+ submit_params['TargetID'] = target_id
1432
+ raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential
1433
+
1434
+ submit_params['Credentials'] = credentials.to_json
1435
+
1436
+ body = perform_request('api/v1/admin/dispatcher/request-office365-accounts', submit_params)
1437
+ json_body = JSON.parse body
1438
+ check_status json_body
1439
+ ret = Comet::BrowseOffice365ObjectsResponse.new
1440
+ ret.from_hash(json_body)
1441
+ ret
1442
+ end
1443
+
1444
+ # AdminDispatcherRequestOffice365Sites
1445
+ #
1446
+ # Request a list of Office365 sites.
1447
+ # The remote device must have given consent for an MSP to browse their files.
1448
+ #
1449
+ # You must supply administrator authentication credentials to use this API.
1450
+ # This API requires the Auth Role to be enabled.
1451
+ #
1452
+ # @param [String] target_id The live connection GUID
1453
+ # @param [Comet::Office365Credential] credentials The Office365 account credential
1454
+ # @return [Comet::BrowseOffice365ObjectsResponse]
1455
+ def admin_dispatcher_request_office_365sites(target_id, credentials)
1456
+ submit_params = {}
1457
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1458
+
1459
+ submit_params['TargetID'] = target_id
1460
+ raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential
1461
+
1462
+ submit_params['Credentials'] = credentials.to_json
1463
+
1464
+ body = perform_request('api/v1/admin/dispatcher/request-office365-sites', submit_params)
1465
+ json_body = JSON.parse body
1466
+ check_status json_body
1467
+ ret = Comet::BrowseOffice365ObjectsResponse.new
1468
+ ret.from_hash(json_body)
1469
+ ret
1470
+ end
1471
+
1251
1472
  # AdminDispatcherRequestStoredObjects
1252
1473
  #
1253
1474
  # Request a list of stored objects inside an existing backup job.
1254
1475
  # The remote device must have given consent for an MSP to browse their files.
1476
+ # To service this request, the remote device must connect to the Storage Vault and load index data. There may be a small delay. If the remote device is running Comet 20.12.0 or later, the necessary index data is cached when this API is first called, for 15 minutes after the last repeated call. This can improve performance for interactively browsing an entire tree of stored objects.
1255
1477
  #
1256
1478
  # You must supply administrator authentication credentials to use this API.
1257
1479
  # This API requires the Auth Role to be enabled.
@@ -1263,17 +1485,17 @@ module Comet
1263
1485
  # @return [Comet::DispatcherStoredObjectsResponse]
1264
1486
  def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil)
1265
1487
  submit_params = {}
1266
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1488
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1267
1489
 
1268
1490
  submit_params['TargetID'] = target_id
1269
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1491
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1270
1492
 
1271
1493
  submit_params['Destination'] = destination
1272
- raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1494
+ raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1273
1495
 
1274
1496
  submit_params['SnapshotID'] = snapshot_id
1275
1497
  unless tree_id.nil?
1276
- raise TypeError "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
1498
+ raise TypeError, "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
1277
1499
 
1278
1500
  submit_params['TreeID'] = tree_id
1279
1501
  end
@@ -1298,10 +1520,10 @@ module Comet
1298
1520
  # @return [Comet::DispatcherVaultSnapshotsResponse]
1299
1521
  def admin_dispatcher_request_vault_snapshots(target_id, destination)
1300
1522
  submit_params = {}
1301
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1523
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1302
1524
 
1303
1525
  submit_params['TargetID'] = target_id
1304
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1526
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1305
1527
 
1306
1528
  submit_params['Destination'] = destination
1307
1529
 
@@ -1325,10 +1547,10 @@ module Comet
1325
1547
  # @return [Comet::CometAPIResponseMessage]
1326
1548
  def admin_dispatcher_run_backup(target_id, backup_rule)
1327
1549
  submit_params = {}
1328
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1550
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1329
1551
 
1330
1552
  submit_params['TargetID'] = target_id
1331
- raise TypeError "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
1553
+ raise TypeError, "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
1332
1554
 
1333
1555
  submit_params['BackupRule'] = backup_rule
1334
1556
 
@@ -1354,17 +1576,17 @@ module Comet
1354
1576
  # @return [Comet::CometAPIResponseMessage]
1355
1577
  def admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil)
1356
1578
  submit_params = {}
1357
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1579
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1358
1580
 
1359
1581
  submit_params['TargetID'] = target_id
1360
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1582
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1361
1583
 
1362
1584
  submit_params['Source'] = source
1363
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1585
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1364
1586
 
1365
1587
  submit_params['Destination'] = destination
1366
1588
  unless options.nil?
1367
- raise TypeError "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
1589
+ raise TypeError, "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
1368
1590
 
1369
1591
  submit_params['Options'] = options.to_json
1370
1592
  end
@@ -1394,25 +1616,25 @@ module Comet
1394
1616
  # @return [Comet::CometAPIResponseMessage]
1395
1617
  def admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil)
1396
1618
  submit_params = {}
1397
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1619
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1398
1620
 
1399
1621
  submit_params['TargetID'] = target_id
1400
- raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1622
+ raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
1401
1623
 
1402
1624
  submit_params['Path'] = path
1403
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1625
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1404
1626
 
1405
1627
  submit_params['Source'] = source
1406
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1628
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1407
1629
 
1408
1630
  submit_params['Destination'] = destination
1409
1631
  unless snapshot.nil?
1410
- raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1632
+ raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1411
1633
 
1412
1634
  submit_params['Snapshot'] = snapshot
1413
1635
  end
1414
1636
  unless paths.nil?
1415
- raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1637
+ raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1416
1638
 
1417
1639
  submit_params['Paths'] = paths.to_json
1418
1640
  end
@@ -1442,25 +1664,25 @@ module Comet
1442
1664
  # @return [Comet::CometAPIResponseMessage]
1443
1665
  def admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil)
1444
1666
  submit_params = {}
1445
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1667
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1446
1668
 
1447
1669
  submit_params['TargetID'] = target_id
1448
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1670
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1449
1671
 
1450
1672
  submit_params['Source'] = source
1451
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1673
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1452
1674
 
1453
1675
  submit_params['Destination'] = destination
1454
- raise TypeError "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
1676
+ raise TypeError, "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
1455
1677
 
1456
1678
  submit_params['Options'] = options.to_json
1457
1679
  unless snapshot.nil?
1458
- raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1680
+ raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1459
1681
 
1460
1682
  submit_params['Snapshot'] = snapshot
1461
1683
  end
1462
1684
  unless paths.nil?
1463
- raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1685
+ raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1464
1686
 
1465
1687
  submit_params['Paths'] = paths.to_json
1466
1688
  end
@@ -1485,7 +1707,7 @@ module Comet
1485
1707
  # @return [Comet::CometAPIResponseMessage]
1486
1708
  def admin_dispatcher_uninstall_software(target_id, remove_config_file)
1487
1709
  submit_params = {}
1488
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1710
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1489
1711
 
1490
1712
  submit_params['TargetID'] = target_id
1491
1713
  submit_params['RemoveConfigFile'] = (remove_config_file ? 1 : 0)
@@ -1512,10 +1734,10 @@ module Comet
1512
1734
  # @return [Comet::CometAPIResponseMessage]
1513
1735
  def admin_dispatcher_unlock(target_id, destination)
1514
1736
  submit_params = {}
1515
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1737
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1516
1738
 
1517
1739
  submit_params['TargetID'] = target_id
1518
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1740
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1519
1741
 
1520
1742
  submit_params['Destination'] = destination
1521
1743
 
@@ -1540,10 +1762,10 @@ module Comet
1540
1762
  # @return [Comet::CometAPIResponseMessage]
1541
1763
  def admin_dispatcher_update_login_url(target_id, new_url)
1542
1764
  submit_params = {}
1543
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1765
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1544
1766
 
1545
1767
  submit_params['TargetID'] = target_id
1546
- raise TypeError "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
1768
+ raise TypeError, "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
1547
1769
 
1548
1770
  submit_params['NewURL'] = new_url
1549
1771
 
@@ -1568,13 +1790,13 @@ module Comet
1568
1790
  # @return [Comet::CometAPIResponseMessage]
1569
1791
  def admin_dispatcher_update_software(target_id, self_address = nil)
1570
1792
  submit_params = {}
1571
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1793
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1572
1794
 
1573
1795
  submit_params['TargetID'] = target_id
1574
1796
  if self_address.nil?
1575
1797
  submit_params['SelfAddress'] = @server_address
1576
1798
  else
1577
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
1799
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
1578
1800
 
1579
1801
  submit_params['SelfAddress'] = self_address
1580
1802
  end
@@ -1598,7 +1820,7 @@ module Comet
1598
1820
  # @return [String]
1599
1821
  def admin_get_job_log(job_id)
1600
1822
  submit_params = {}
1601
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1823
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1602
1824
 
1603
1825
  submit_params['JobID'] = job_id
1604
1826
 
@@ -1616,7 +1838,7 @@ module Comet
1616
1838
  # @return [Array<Comet::JobEntry>]
1617
1839
  def admin_get_job_log_entries(job_id)
1618
1840
  submit_params = {}
1619
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1841
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1620
1842
 
1621
1843
  submit_params['JobID'] = job_id
1622
1844
 
@@ -1646,7 +1868,7 @@ module Comet
1646
1868
  # @return [Comet::BackupJobDetail]
1647
1869
  def admin_get_job_properties(job_id)
1648
1870
  submit_params = {}
1649
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1871
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1650
1872
 
1651
1873
  submit_params['JobID'] = job_id
1652
1874
 
@@ -1695,7 +1917,7 @@ module Comet
1695
1917
  # @return [Array<Comet::BackupJobDetail>]
1696
1918
  def admin_get_jobs_for_custom_search(query)
1697
1919
  submit_params = {}
1698
- raise TypeError "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
1920
+ raise TypeError, "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
1699
1921
 
1700
1922
  submit_params['Query'] = query.to_json
1701
1923
 
@@ -1733,10 +1955,10 @@ module Comet
1733
1955
  # @return [Array<Comet::BackupJobDetail>]
1734
1956
  def admin_get_jobs_for_date_range(start_value, end_value)
1735
1957
  submit_params = {}
1736
- raise TypeError "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
1958
+ raise TypeError, "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
1737
1959
 
1738
1960
  submit_params['Start'] = start_value
1739
- raise TypeError "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
1961
+ raise TypeError, "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
1740
1962
 
1741
1963
  submit_params['End'] = end_value
1742
1964
 
@@ -1767,7 +1989,7 @@ module Comet
1767
1989
  # @return [Array<Comet::BackupJobDetail>]
1768
1990
  def admin_get_jobs_for_user(target_user)
1769
1991
  submit_params = {}
1770
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1992
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1771
1993
 
1772
1994
  submit_params['TargetUser'] = target_user
1773
1995
 
@@ -1822,7 +2044,7 @@ module Comet
1822
2044
  # @return [Comet::UserProfileConfig]
1823
2045
  def admin_get_user_profile(target_user)
1824
2046
  submit_params = {}
1825
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2047
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1826
2048
 
1827
2049
  submit_params['TargetUser'] = target_user
1828
2050
 
@@ -1847,7 +2069,7 @@ module Comet
1847
2069
  # @return [Comet::GetProfileAndHashResponseMessage]
1848
2070
  def admin_get_user_profile_and_hash(target_user)
1849
2071
  submit_params = {}
1850
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2072
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1851
2073
 
1852
2074
  submit_params['TargetUser'] = target_user
1853
2075
 
@@ -1872,7 +2094,7 @@ module Comet
1872
2094
  # @return [Comet::GetProfileHashResponseMessage]
1873
2095
  def admin_get_user_profile_hash(target_user)
1874
2096
  submit_params = {}
1875
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2097
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1876
2098
 
1877
2099
  submit_params['TargetUser'] = target_user
1878
2100
 
@@ -1898,10 +2120,10 @@ module Comet
1898
2120
  # @return [Comet::CometAPIResponseMessage]
1899
2121
  def admin_job_cancel(target_user, job_id)
1900
2122
  submit_params = {}
1901
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2123
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1902
2124
 
1903
2125
  submit_params['TargetUser'] = target_user
1904
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
2126
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1905
2127
 
1906
2128
  submit_params['JobID'] = job_id
1907
2129
 
@@ -1930,7 +2152,7 @@ module Comet
1930
2152
  else
1931
2153
  ret = Array.new(json_body.length)
1932
2154
  json_body.each_with_index do |v, i|
1933
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2155
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
1934
2156
 
1935
2157
  ret[i] = v
1936
2158
  end
@@ -1991,7 +2213,7 @@ module Comet
1991
2213
  # @return [Comet::CometAPIResponseMessage]
1992
2214
  def admin_meta_branding_config_set(branding_config)
1993
2215
  submit_params = {}
1994
- raise TypeError "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
2216
+ raise TypeError, "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
1995
2217
 
1996
2218
  submit_params['BrandingConfig'] = branding_config.to_json
1997
2219
 
@@ -2031,7 +2253,7 @@ module Comet
2031
2253
  # @return [Comet::CometAPIResponseMessage]
2032
2254
  def admin_meta_build_config_set(software_build_role_config)
2033
2255
  submit_params = {}
2034
- raise TypeError "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
2256
+ raise TypeError, "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
2035
2257
 
2036
2258
  submit_params['SoftwareBuildRoleConfig'] = software_build_role_config.to_json
2037
2259
 
@@ -2060,7 +2282,7 @@ module Comet
2060
2282
  else
2061
2283
  ret = Array.new(json_body.length)
2062
2284
  json_body.each_with_index do |v, i|
2063
- raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
2285
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
2064
2286
 
2065
2287
  ret[i] = v
2066
2288
  end
@@ -2081,7 +2303,7 @@ module Comet
2081
2303
  # @return [String]
2082
2304
  def admin_meta_read_logs(log)
2083
2305
  submit_params = {}
2084
- raise TypeError "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
2306
+ raise TypeError, "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
2085
2307
 
2086
2308
  submit_params['Log'] = log
2087
2309
 
@@ -2123,7 +2345,7 @@ module Comet
2123
2345
  # @return [Comet::CometAPIResponseMessage]
2124
2346
  def admin_meta_remote_storage_vault_set(remote_storage_options)
2125
2347
  submit_params = {}
2126
- raise TypeError "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
2348
+ raise TypeError, "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
2127
2349
 
2128
2350
  submit_params['RemoteStorageOptions'] = remote_storage_options.to_json
2129
2351
 
@@ -2146,13 +2368,38 @@ module Comet
2146
2368
  # @return [String]
2147
2369
  def admin_meta_resource_get(hash)
2148
2370
  submit_params = {}
2149
- raise TypeError "'hash' expected String, got #{hash.class}" unless hash.is_a? String
2371
+ raise TypeError, "'hash' expected String, got #{hash.class}" unless hash.is_a? String
2150
2372
 
2151
2373
  submit_params['Hash'] = hash
2152
2374
 
2153
2375
  perform_request('api/v1/admin/meta/resource/get', submit_params)
2154
2376
  end
2155
2377
 
2378
+ # AdminMetaResourceNew
2379
+ #
2380
+ # Upload a resource file.
2381
+ # Resources are used to upload files within the server configuration.
2382
+ # The resulting resource ID is autogenerated.
2383
+ # The lifespan of an uploaded resource is undefined. Resources may be deleted automatically, but it should remain available until the next call to AdminMetaServerConfigSet, and will remain available for as long as it is referenced by the server configuration.
2384
+ #
2385
+ # You must supply administrator authentication credentials to use this API.
2386
+ #
2387
+ # @param [String] upload The uploaded file contents, as a multipart/form-data part.
2388
+ # @return [Comet::AdminResourceResponse]
2389
+ def admin_meta_resource_new(upload)
2390
+ submit_params = {}
2391
+ raise TypeError, "'upload' expected String, got #{upload.class}" unless upload.is_a? String
2392
+
2393
+ submit_params['upload'] = upload
2394
+
2395
+ body = perform_request_multipart('api/v1/admin/meta/resource/new', submit_params)
2396
+ json_body = JSON.parse body
2397
+ check_status json_body
2398
+ ret = Comet::AdminResourceResponse.new
2399
+ ret.from_hash(json_body)
2400
+ ret
2401
+ end
2402
+
2156
2403
  # AdminMetaRestartService
2157
2404
  #
2158
2405
  # Restart server.
@@ -2188,10 +2435,10 @@ module Comet
2188
2435
  # @return [Comet::CometAPIResponseMessage]
2189
2436
  def admin_meta_send_test_email(email_options, recipient)
2190
2437
  submit_params = {}
2191
- raise TypeError "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
2438
+ raise TypeError, "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
2192
2439
 
2193
2440
  submit_params['EmailOptions'] = email_options.to_json
2194
- raise TypeError "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
2441
+ raise TypeError, "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
2195
2442
 
2196
2443
  submit_params['Recipient'] = recipient
2197
2444
 
@@ -2240,7 +2487,7 @@ module Comet
2240
2487
  else
2241
2488
  ret = Array.new(json_body.length)
2242
2489
  json_body.each_with_index do |v, i|
2243
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2490
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2244
2491
 
2245
2492
  ret[i] = v
2246
2493
  end
@@ -2263,7 +2510,7 @@ module Comet
2263
2510
  # @return [Comet::CometAPIResponseMessage]
2264
2511
  def admin_meta_server_config_set(config)
2265
2512
  submit_params = {}
2266
- raise TypeError "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
2513
+ raise TypeError, "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
2267
2514
 
2268
2515
  submit_params['Config'] = config.to_json
2269
2516
 
@@ -2391,7 +2638,7 @@ module Comet
2391
2638
  # @return [Comet::CometAPIResponseMessage]
2392
2639
  def admin_meta_webhook_options_set(webhook_options)
2393
2640
  submit_params = {}
2394
- raise TypeError "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
2641
+ raise TypeError, "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
2395
2642
 
2396
2643
  submit_params['WebhookOptions'] = webhook_options.to_json
2397
2644
 
@@ -2438,7 +2685,7 @@ module Comet
2438
2685
  # @return [Comet::CometAPIResponseMessage]
2439
2686
  def admin_news_remove(news_item)
2440
2687
  submit_params = {}
2441
- raise TypeError "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
2688
+ raise TypeError, "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
2442
2689
 
2443
2690
  submit_params['NewsItem'] = news_item
2444
2691
 
@@ -2461,7 +2708,7 @@ module Comet
2461
2708
  # @return [Comet::CometAPIResponseMessage]
2462
2709
  def admin_news_submit(news_content)
2463
2710
  submit_params = {}
2464
- raise TypeError "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
2711
+ raise TypeError, "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
2465
2712
 
2466
2713
  submit_params['NewsContent'] = news_content
2467
2714
 
@@ -2486,12 +2733,12 @@ module Comet
2486
2733
  def admin_organization_delete(organization_id = nil, uninstall_config = nil)
2487
2734
  submit_params = {}
2488
2735
  unless organization_id.nil?
2489
- raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2736
+ raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2490
2737
 
2491
2738
  submit_params['OrganizationID'] = organization_id
2492
2739
  end
2493
2740
  unless uninstall_config.nil?
2494
- raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
2741
+ raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
2495
2742
 
2496
2743
  submit_params['UninstallConfig'] = uninstall_config.to_json
2497
2744
  end
@@ -2541,12 +2788,12 @@ module Comet
2541
2788
  def admin_organization_set(organization_id = nil, organization = nil)
2542
2789
  submit_params = {}
2543
2790
  unless organization_id.nil?
2544
- raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2791
+ raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2545
2792
 
2546
2793
  submit_params['OrganizationID'] = organization_id
2547
2794
  end
2548
2795
  unless organization.nil?
2549
- raise TypeError "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
2796
+ raise TypeError, "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
2550
2797
 
2551
2798
  submit_params['Organization'] = organization.to_json
2552
2799
  end
@@ -2570,7 +2817,7 @@ module Comet
2570
2817
  # @return [Comet::CometAPIResponseMessage]
2571
2818
  def admin_policies_delete(policy_id)
2572
2819
  submit_params = {}
2573
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2820
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2574
2821
 
2575
2822
  submit_params['PolicyID'] = policy_id
2576
2823
 
@@ -2594,7 +2841,7 @@ module Comet
2594
2841
  # @return [Comet::GetGroupPolicyResponse]
2595
2842
  def admin_policies_get(policy_id)
2596
2843
  submit_params = {}
2597
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2844
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2598
2845
 
2599
2846
  submit_params['PolicyID'] = policy_id
2600
2847
 
@@ -2623,7 +2870,7 @@ module Comet
2623
2870
  ret = {}
2624
2871
  else
2625
2872
  json_body.each do |k, v|
2626
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2873
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2627
2874
 
2628
2875
  ret[k] = v
2629
2876
  end
@@ -2666,7 +2913,7 @@ module Comet
2666
2913
  # @return [Comet::CreateGroupPolicyResponse]
2667
2914
  def admin_policies_new(policy)
2668
2915
  submit_params = {}
2669
- raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2916
+ raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2670
2917
 
2671
2918
  submit_params['Policy'] = policy.to_json
2672
2919
 
@@ -2693,14 +2940,14 @@ module Comet
2693
2940
  # @return [Comet::CometAPIResponseMessage]
2694
2941
  def admin_policies_set(policy_id, policy, check_policy_hash = nil)
2695
2942
  submit_params = {}
2696
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2943
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2697
2944
 
2698
2945
  submit_params['PolicyID'] = policy_id
2699
- raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2946
+ raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2700
2947
 
2701
2948
  submit_params['Policy'] = policy.to_json
2702
2949
  unless check_policy_hash.nil?
2703
- raise TypeError "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
2950
+ raise TypeError, "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
2704
2951
 
2705
2952
  submit_params['CheckPolicyHash'] = check_policy_hash
2706
2953
  end
@@ -2726,14 +2973,14 @@ module Comet
2726
2973
  # @return [Comet::EmailReportGeneratedPreview]
2727
2974
  def admin_preview_user_email_report(target_user, email_report_config, email_address = nil)
2728
2975
  submit_params = {}
2729
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2976
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2730
2977
 
2731
2978
  submit_params['TargetUser'] = target_user
2732
- raise TypeError "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
2979
+ raise TypeError, "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
2733
2980
 
2734
2981
  submit_params['EmailReportConfig'] = email_report_config.to_json
2735
2982
  unless email_address.nil?
2736
- raise TypeError "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
2983
+ raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
2737
2984
 
2738
2985
  submit_params['EmailAddress'] = email_address
2739
2986
  end
@@ -2785,16 +3032,16 @@ module Comet
2785
3032
  # @return [Comet::RequestStorageVaultResponseMessage]
2786
3033
  def admin_request_storage_vault(target_user, storage_provider, self_address = nil)
2787
3034
  submit_params = {}
2788
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3035
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2789
3036
 
2790
3037
  submit_params['TargetUser'] = target_user
2791
- raise TypeError "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
3038
+ raise TypeError, "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
2792
3039
 
2793
3040
  submit_params['StorageProvider'] = storage_provider
2794
3041
  if self_address.nil?
2795
3042
  submit_params['SelfAddress'] = @server_address
2796
3043
  else
2797
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
3044
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
2798
3045
 
2799
3046
  submit_params['SelfAddress'] = self_address
2800
3047
  end
@@ -2824,7 +3071,7 @@ module Comet
2824
3071
  ret = {}
2825
3072
  else
2826
3073
  json_body.each do |k, v|
2827
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
3074
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2828
3075
 
2829
3076
  ret[k] = v
2830
3077
  end
@@ -2846,13 +3093,13 @@ module Comet
2846
3093
  # @return [Comet::CometAPIResponseMessage]
2847
3094
  def admin_reset_user_password(target_user, new_password, old_password)
2848
3095
  submit_params = {}
2849
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3096
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2850
3097
 
2851
3098
  submit_params['TargetUser'] = target_user
2852
- raise TypeError "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
3099
+ raise TypeError, "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
2853
3100
 
2854
3101
  submit_params['NewPassword'] = new_password
2855
- raise TypeError "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
3102
+ raise TypeError, "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
2856
3103
 
2857
3104
  submit_params['OldPassword'] = old_password
2858
3105
 
@@ -2877,10 +3124,10 @@ module Comet
2877
3124
  # @return [Comet::CometAPIResponseMessage]
2878
3125
  def admin_revoke_device(target_user, target_device)
2879
3126
  submit_params = {}
2880
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3127
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2881
3128
 
2882
3129
  submit_params['TargetUser'] = target_user
2883
- raise TypeError "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
3130
+ raise TypeError, "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
2884
3131
 
2885
3132
  submit_params['TargetDevice'] = target_device
2886
3133
 
@@ -2904,10 +3151,10 @@ module Comet
2904
3151
  # @return [Comet::CometAPIResponseMessage]
2905
3152
  def admin_set_user_profile(target_user, profile_data)
2906
3153
  submit_params = {}
2907
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3154
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2908
3155
 
2909
3156
  submit_params['TargetUser'] = target_user
2910
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
3157
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2911
3158
 
2912
3159
  submit_params['ProfileData'] = profile_data.to_json
2913
3160
 
@@ -2934,13 +3181,13 @@ module Comet
2934
3181
  # @return [Comet::CometAPIResponseMessage]
2935
3182
  def admin_set_user_profile_hash(target_user, profile_data, require_hash)
2936
3183
  submit_params = {}
2937
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3184
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2938
3185
 
2939
3186
  submit_params['TargetUser'] = target_user
2940
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
3187
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2941
3188
 
2942
3189
  submit_params['ProfileData'] = profile_data.to_json
2943
- raise TypeError "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
3190
+ raise TypeError, "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
2944
3191
 
2945
3192
  submit_params['RequireHash'] = require_hash
2946
3193
 
@@ -2965,11 +3212,11 @@ module Comet
2965
3212
  # @return [Comet::BucketProperties]
2966
3213
  def admin_storage_bucket_properties(bucket_id, after_timestamp = nil)
2967
3214
  submit_params = {}
2968
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3215
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2969
3216
 
2970
3217
  submit_params['BucketID'] = bucket_id
2971
3218
  unless after_timestamp.nil?
2972
- raise TypeError "'after_timestamp' expected Numeric, got #{after_timestamp.class}" unless after_timestamp.is_a? Numeric
3219
+ raise TypeError, "'after_timestamp' expected Numeric, got #{after_timestamp.class}" unless after_timestamp.is_a? Numeric
2973
3220
 
2974
3221
  submit_params['AfterTimestamp'] = after_timestamp
2975
3222
  end
@@ -2994,7 +3241,7 @@ module Comet
2994
3241
  # @return [Comet::CometAPIResponseMessage]
2995
3242
  def admin_storage_delete_bucket(bucket_id)
2996
3243
  submit_params = {}
2997
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3244
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2998
3245
 
2999
3246
  submit_params['BucketID'] = bucket_id
3000
3247
 
@@ -3020,7 +3267,7 @@ module Comet
3020
3267
  def admin_storage_free_space(bucket_id = nil)
3021
3268
  submit_params = {}
3022
3269
  unless bucket_id.nil?
3023
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3270
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3024
3271
 
3025
3272
  submit_params['BucketID'] = bucket_id
3026
3273
  end
@@ -3074,22 +3321,22 @@ module Comet
3074
3321
  def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil, set_organization_id = nil)
3075
3322
  submit_params = {}
3076
3323
  unless set_bucket_value.nil?
3077
- raise TypeError "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
3324
+ raise TypeError, "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
3078
3325
 
3079
3326
  submit_params['SetBucketValue'] = set_bucket_value
3080
3327
  end
3081
3328
  unless set_key_hash_format.nil?
3082
- raise TypeError "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
3329
+ raise TypeError, "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
3083
3330
 
3084
3331
  submit_params['SetKeyHashFormat'] = set_key_hash_format
3085
3332
  end
3086
3333
  unless set_key_hash_value.nil?
3087
- raise TypeError "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
3334
+ raise TypeError, "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
3088
3335
 
3089
3336
  submit_params['SetKeyHashValue'] = set_key_hash_value
3090
3337
  end
3091
3338
  unless set_organization_id.nil?
3092
- raise TypeError "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String
3339
+ raise TypeError, "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String
3093
3340
 
3094
3341
  submit_params['SetOrganizationID'] = set_organization_id
3095
3342
  end
@@ -3115,7 +3362,7 @@ module Comet
3115
3362
  # @return [Comet::CometAPIResponseMessage]
3116
3363
  def admin_update_campaign_start(options)
3117
3364
  submit_params = {}
3118
- raise TypeError "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
3365
+ raise TypeError, "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
3119
3366
 
3120
3367
  submit_params['Options'] = options.to_json
3121
3368
 
@@ -3229,6 +3476,35 @@ module Comet
3229
3476
 
3230
3477
  res.body
3231
3478
  end
3479
+
3480
+ # Perform a synchronous HTTP request, using multipart/form-data.
3481
+ #
3482
+ # @param [String] endpoint The URL suffix
3483
+ # @param [Hash<String,String>] params Form post parameters to submit to the target API
3484
+ # @return [String] Response body
3485
+ def perform_request_multipart(endpoint, params = {})
3486
+ full_uri = URI(@server_address + endpoint)
3487
+
3488
+ req = Net::HTTP::Post.new(full_uri)
3489
+ req['X-Comet-Admin-Username'] = @username
3490
+ req['X-Comet-Admin-AuthType'] = 'Password'
3491
+ req['X-Comet-Admin-Password'] = @password
3492
+
3493
+ form_params = []
3494
+ params.each do |k, v|
3495
+ form_params.append [k, v, {:filename => k}]
3496
+ end
3497
+ req.set_form(form_params, 'multipart/form-data')
3498
+
3499
+ http = Net::HTTP.new(full_uri.hostname, full_uri.port)
3500
+ res = http.request(req)
3501
+
3502
+ unless res.is_a?(Net::HTTPSuccess)
3503
+ raise res
3504
+ end
3505
+
3506
+ res.body
3507
+ end
3232
3508
  end
3233
3509
 
3234
3510
  end