comet_backup_ruby_sdk 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile.lock +1 -1
  4. data/comet_backup_ruby_sdk.gemspec +1 -1
  5. data/lib/comet/comet_server.rb +244 -158
  6. data/lib/comet/definitions.rb +4 -4
  7. data/lib/comet/models/add_bucket_response_message.rb +6 -6
  8. data/lib/comet/models/admin_account_properties_response.rb +3 -3
  9. data/lib/comet/models/admin_email_options.rb +4 -4
  10. data/lib/comet/models/admin_resource_response.rb +5 -5
  11. data/lib/comet/models/admin_security_options.rb +7 -7
  12. data/lib/comet/models/admin_u2fregistration.rb +4 -4
  13. data/lib/comet/models/admin_user_permissions.rb +2 -2
  14. data/lib/comet/models/available_download.rb +4 -4
  15. data/lib/comet/models/azure_destination_location.rb +7 -7
  16. data/lib/comet/models/b2destination_location.rb +7 -7
  17. data/lib/comet/models/b2storage_extra_info.rb +2 -2
  18. data/lib/comet/models/b2transaction_totals.rb +5 -5
  19. data/lib/comet/models/b2virtual_storage_role_settings.rb +5 -5
  20. data/lib/comet/models/backup_job_advanced_options.rb +4 -4
  21. data/lib/comet/models/backup_job_detail.rb +20 -20
  22. data/lib/comet/models/backup_job_progress.rb +7 -7
  23. data/lib/comet/models/backup_rule_config.rb +12 -12
  24. data/lib/comet/models/backup_rule_event_triggers.rb +2 -2
  25. data/lib/comet/models/branding_options.rb +27 -27
  26. data/lib/comet/models/branding_properties.rb +23 -23
  27. data/lib/comet/models/browse_disk_drives_response.rb +4 -4
  28. data/lib/comet/models/browse_edbresponse.rb +4 -4
  29. data/lib/comet/models/browse_hvresponse.rb +4 -4
  30. data/lib/comet/models/browse_vssresponse.rb +4 -4
  31. data/lib/comet/models/bucket_properties.rb +6 -6
  32. data/lib/comet/models/bucket_usage_info.rb +3 -3
  33. data/lib/comet/models/comet_apiresponse_message.rb +4 -4
  34. data/lib/comet/models/comet_destination_location.rb +5 -5
  35. data/lib/comet/models/constellation_check_report.rb +4 -4
  36. data/lib/comet/models/constellation_stats.rb +6 -6
  37. data/lib/comet/models/constellation_status_apiresponse.rb +4 -4
  38. data/lib/comet/models/content_measurement.rb +4 -4
  39. data/lib/comet/models/content_measurement_component.rb +4 -4
  40. data/lib/comet/models/create_group_policy_response.rb +5 -5
  41. data/lib/comet/models/default_email_report_policy.rb +2 -2
  42. data/lib/comet/models/destination_config.rb +44 -44
  43. data/lib/comet/models/destination_location.rb +34 -34
  44. data/lib/comet/models/destination_statistics.rb +5 -5
  45. data/lib/comet/models/device_config.rb +3 -3
  46. data/lib/comet/models/disk_drive.rb +13 -13
  47. data/lib/comet/models/dispatcher_admin_sources_response.rb +5 -5
  48. data/lib/comet/models/dispatcher_stored_objects_response.rb +4 -4
  49. data/lib/comet/models/dispatcher_vault_snapshots_response.rb +4 -4
  50. data/lib/comet/models/edbfile_info.rb +5 -5
  51. data/lib/comet/models/email_options.rb +9 -9
  52. data/lib/comet/models/email_report_config.rb +3 -3
  53. data/lib/comet/models/email_report_generated_preview.rb +7 -7
  54. data/lib/comet/models/external_ldapauthentication_source_settings.rb +6 -6
  55. data/lib/comet/models/extra_file_exclusion.rb +4 -4
  56. data/lib/comet/models/ftpdestination_location.rb +9 -9
  57. data/lib/comet/models/get_group_policy_response.rb +5 -5
  58. data/lib/comet/models/get_profile_and_hash_response_message.rb +5 -5
  59. data/lib/comet/models/get_profile_hash_response_message.rb +5 -5
  60. data/lib/comet/models/group_policy.rb +4 -4
  61. data/lib/comet/models/hyper_vmachine_info.rb +4 -4
  62. data/lib/comet/models/install_creds.rb +5 -5
  63. data/lib/comet/models/install_token.rb +7 -7
  64. data/lib/comet/models/install_token_response.rb +4 -4
  65. data/lib/comet/models/job_entry.rb +5 -5
  66. data/lib/comet/models/live_user_connection.rb +8 -8
  67. data/lib/comet/models/local_destination_location.rb +6 -6
  68. data/lib/comet/models/mac_oscode_sign_properties.rb +8 -8
  69. data/lib/comet/models/mongo_dbconnection.rb +15 -15
  70. data/lib/comet/models/new_bucket_detail.rb +4 -4
  71. data/lib/comet/models/news_entry.rb +5 -5
  72. data/lib/comet/models/organization.rb +4 -4
  73. data/lib/comet/models/organization_response.rb +5 -5
  74. data/lib/comet/models/osinfo.rb +5 -5
  75. data/lib/comet/models/partition.rb +13 -13
  76. data/lib/comet/models/private_branding_properties.rb +17 -17
  77. data/lib/comet/models/protected_item_engine_type_policy.rb +3 -3
  78. data/lib/comet/models/public_branding_properties.rb +8 -8
  79. data/lib/comet/models/remote_server_address.rb +7 -7
  80. data/lib/comet/models/remote_storage_option.rb +8 -8
  81. data/lib/comet/models/replicator_state_apiresponse.rb +14 -14
  82. data/lib/comet/models/request_storage_vault_response_message.rb +5 -5
  83. data/lib/comet/models/restore_job_advanced_options.rb +6 -6
  84. data/lib/comet/models/retention_policy.rb +3 -3
  85. data/lib/comet/models/retention_range.rb +10 -10
  86. data/lib/comet/models/s3destination_location.rb +7 -7
  87. data/lib/comet/models/schedule_config.rb +5 -5
  88. data/lib/comet/models/search_clause.rb +6 -6
  89. data/lib/comet/models/server_config_options_branding_fragment.rb +2 -2
  90. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +2 -2
  91. data/lib/comet/models/server_meta_version_info.rb +17 -17
  92. data/lib/comet/models/session_key_regenerated_response.rb +6 -6
  93. data/lib/comet/models/sftpdestination_location.rb +9 -9
  94. data/lib/comet/models/size_measurement.rb +5 -5
  95. data/lib/comet/models/software_build_role_options.rb +2 -2
  96. data/lib/comet/models/software_update_news_response.rb +6 -6
  97. data/lib/comet/models/source_basic_info.rb +4 -4
  98. data/lib/comet/models/source_config.rb +11 -11
  99. data/lib/comet/models/source_statistics.rb +2 -2
  100. data/lib/comet/models/spanned_destination_location.rb +2 -2
  101. data/lib/comet/models/spanned_storage_extra_info.rb +2 -2
  102. data/lib/comet/models/sshconnection.rb +8 -8
  103. data/lib/comet/models/stat_result.rb +6 -6
  104. data/lib/comet/models/storage_free_space_info.rb +4 -4
  105. data/lib/comet/models/storage_vault_provider_policy.rb +3 -3
  106. data/lib/comet/models/stored_object.rb +10 -10
  107. data/lib/comet/models/streamable_event.rb +4 -4
  108. data/lib/comet/models/swift_destination_location.rb +15 -15
  109. data/lib/comet/models/test_response.rb +4 -4
  110. data/lib/comet/models/totp_regenerated_response.rb +7 -7
  111. data/lib/comet/models/u2fregister_request.rb +4 -4
  112. data/lib/comet/models/u2fregistered_key.rb +5 -5
  113. data/lib/comet/models/u2fregistration_challenge_response.rb +6 -6
  114. data/lib/comet/models/u2fsign_request.rb +5 -5
  115. data/lib/comet/models/u2fsign_response.rb +6 -6
  116. data/lib/comet/models/uninstall_config.rb +2 -2
  117. data/lib/comet/models/update_campaign_device_status.rb +3 -3
  118. data/lib/comet/models/update_campaign_options.rb +2 -2
  119. data/lib/comet/models/update_campaign_properties.rb +4 -4
  120. data/lib/comet/models/update_campaign_status.rb +4 -4
  121. data/lib/comet/models/update_campaign_status_device_entry.rb +5 -5
  122. data/lib/comet/models/user_custom_email_settings.rb +2 -2
  123. data/lib/comet/models/user_on_server.rb +4 -4
  124. data/lib/comet/models/user_policy.rb +6 -6
  125. data/lib/comet/models/user_profile_config.rb +18 -18
  126. data/lib/comet/models/user_profile_fragment.rb +3 -3
  127. data/lib/comet/models/vault_snapshot.rb +5 -5
  128. data/lib/comet/models/vsscomponent.rb +5 -5
  129. data/lib/comet/models/vsswriter_info.rb +3 -3
  130. data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +5 -5
  131. data/lib/comet/models/web_interface_branding_properties.rb +6 -6
  132. data/lib/comet/models/webhook_option.rb +4 -4
  133. data/lib/comet/models/win_smbauth.rb +6 -6
  134. data/lib/comet/models/windows_code_sign_properties.rb +11 -11
  135. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bf74463ba52a1b008b3d743be48d74a2ef042274ddc86bc08f8e952d40064cc
4
- data.tar.gz: 5296ec9e7ed5ae19711e77cf916ef4e7967d7a0bf3b27bab428a017c45e2d970
3
+ metadata.gz: ffe045abb4afab383a013a5da8d35ed80d576fa82361d1579421f23722393be7
4
+ data.tar.gz: cb90f69c80adce36b9277042ae4581a168d9cc4d820e8eed974c9a705cf9dca4
5
5
  SHA512:
6
- metadata.gz: b1271dca242a47f8b6958ed2972449cef6dec337fdd9f41d0b80e65606ec6460acb209cbecf1ee7aa43f7d5d0b98f7fedd1a13593a7c9ed4d01912192dbe4e33
7
- data.tar.gz: 704803dd4ac0b1b03bf43530f9b60d6fc9ed5ff23b02380085db3c032c6833e817e9056292d189fca9161e796f25ad8ff73f6b659973a283f1301991b9d735f9
6
+ metadata.gz: b239d4b53d1096c9acebdd9769a1f415081a7a74dcba8834bcef72ddb459b5ffda6d0a4d22ab8310661bacf0d577630dbb01ef7283f494dfabb922bfe17218fb
7
+ data.tar.gz: b9791ed93a89258fc608375ef5230e62dfbd35589c1bf5026aae2bd35816985cf5b2caf4ba3a5c3c39f0d61f409c92575a0a7f6f0b7f097abad08e0e48383697
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2020-11-24 v1.3.0
4
+ - Based on Comet 20.11.0
5
+ - Support new `AdminDispatcherDeleteSnapshots` API for deleting multiple snapshots in a single step
6
+ - Support `AdminMetaResourceNew` API using multipart request
7
+ - Fix an issue with properly raising `TypeError` for invalid parameters
8
+
3
9
  ## 2020-11-05 v1.2.0
4
10
  - Based on Comet 20.9.10
5
11
  - Support new `ThawExec` feature
@@ -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.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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.2.0'
15
+ spec.version = '1.3.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -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
 
@@ -1081,10 +1113,10 @@ module Comet
1081
1113
  # @return [Comet::CometAPIResponseMessage]
1082
1114
  def admin_dispatcher_reindex_storage_vault(target_id, destination)
1083
1115
  submit_params = {}
1084
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1116
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1085
1117
 
1086
1118
  submit_params['TargetID'] = target_id
1087
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1119
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1088
1120
 
1089
1121
  submit_params['Destination'] = destination
1090
1122
 
@@ -1107,7 +1139,7 @@ module Comet
1107
1139
  # @return [Comet::BrowseDiskDrivesResponse]
1108
1140
  def admin_dispatcher_request_browse_disk_drives(target_id)
1109
1141
  submit_params = {}
1110
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1142
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1111
1143
 
1112
1144
  submit_params['TargetID'] = target_id
1113
1145
 
@@ -1130,7 +1162,7 @@ module Comet
1130
1162
  # @return [Comet::BrowseEDBResponse]
1131
1163
  def admin_dispatcher_request_browse_exchange_edb(target_id)
1132
1164
  submit_params = {}
1133
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1165
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1134
1166
 
1135
1167
  submit_params['TargetID'] = target_id
1136
1168
 
@@ -1153,7 +1185,7 @@ module Comet
1153
1185
  # @return [Comet::BrowseHVResponse]
1154
1186
  def admin_dispatcher_request_browse_hyperv(target_id)
1155
1187
  submit_params = {}
1156
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1188
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1157
1189
 
1158
1190
  submit_params['TargetID'] = target_id
1159
1191
 
@@ -1176,7 +1208,7 @@ module Comet
1176
1208
  # @return [Comet::BrowseVSSResponse]
1177
1209
  def admin_dispatcher_request_browse_vss_aaw(target_id)
1178
1210
  submit_params = {}
1179
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1211
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1180
1212
 
1181
1213
  submit_params['TargetID'] = target_id
1182
1214
 
@@ -1201,11 +1233,11 @@ module Comet
1201
1233
  # @return [Array<Comet::StoredObject>]
1202
1234
  def admin_dispatcher_request_filesystem_objects(target_id, path = nil)
1203
1235
  submit_params = {}
1204
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1236
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1205
1237
 
1206
1238
  submit_params['TargetID'] = target_id
1207
1239
  unless path.nil?
1208
- raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1240
+ raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
1209
1241
 
1210
1242
  submit_params['Path'] = path
1211
1243
  end
@@ -1236,7 +1268,7 @@ module Comet
1236
1268
  # @return [Comet::DispatcherAdminSourcesResponse]
1237
1269
  def admin_dispatcher_request_import_sources(target_id)
1238
1270
  submit_params = {}
1239
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1271
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1240
1272
 
1241
1273
  submit_params['TargetID'] = target_id
1242
1274
 
@@ -1263,17 +1295,17 @@ module Comet
1263
1295
  # @return [Comet::DispatcherStoredObjectsResponse]
1264
1296
  def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil)
1265
1297
  submit_params = {}
1266
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1298
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1267
1299
 
1268
1300
  submit_params['TargetID'] = target_id
1269
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1301
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1270
1302
 
1271
1303
  submit_params['Destination'] = destination
1272
- raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1304
+ raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1273
1305
 
1274
1306
  submit_params['SnapshotID'] = snapshot_id
1275
1307
  unless tree_id.nil?
1276
- raise TypeError "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
1308
+ raise TypeError, "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
1277
1309
 
1278
1310
  submit_params['TreeID'] = tree_id
1279
1311
  end
@@ -1298,10 +1330,10 @@ module Comet
1298
1330
  # @return [Comet::DispatcherVaultSnapshotsResponse]
1299
1331
  def admin_dispatcher_request_vault_snapshots(target_id, destination)
1300
1332
  submit_params = {}
1301
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1333
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1302
1334
 
1303
1335
  submit_params['TargetID'] = target_id
1304
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1336
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1305
1337
 
1306
1338
  submit_params['Destination'] = destination
1307
1339
 
@@ -1325,10 +1357,10 @@ module Comet
1325
1357
  # @return [Comet::CometAPIResponseMessage]
1326
1358
  def admin_dispatcher_run_backup(target_id, backup_rule)
1327
1359
  submit_params = {}
1328
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1360
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1329
1361
 
1330
1362
  submit_params['TargetID'] = target_id
1331
- raise TypeError "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
1363
+ raise TypeError, "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
1332
1364
 
1333
1365
  submit_params['BackupRule'] = backup_rule
1334
1366
 
@@ -1354,17 +1386,17 @@ module Comet
1354
1386
  # @return [Comet::CometAPIResponseMessage]
1355
1387
  def admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil)
1356
1388
  submit_params = {}
1357
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1389
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1358
1390
 
1359
1391
  submit_params['TargetID'] = target_id
1360
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1392
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1361
1393
 
1362
1394
  submit_params['Source'] = source
1363
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1395
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1364
1396
 
1365
1397
  submit_params['Destination'] = destination
1366
1398
  unless options.nil?
1367
- raise TypeError "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
1399
+ raise TypeError, "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
1368
1400
 
1369
1401
  submit_params['Options'] = options.to_json
1370
1402
  end
@@ -1394,25 +1426,25 @@ module Comet
1394
1426
  # @return [Comet::CometAPIResponseMessage]
1395
1427
  def admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil)
1396
1428
  submit_params = {}
1397
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1429
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1398
1430
 
1399
1431
  submit_params['TargetID'] = target_id
1400
- raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1432
+ raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
1401
1433
 
1402
1434
  submit_params['Path'] = path
1403
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1435
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1404
1436
 
1405
1437
  submit_params['Source'] = source
1406
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1438
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1407
1439
 
1408
1440
  submit_params['Destination'] = destination
1409
1441
  unless snapshot.nil?
1410
- raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1442
+ raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1411
1443
 
1412
1444
  submit_params['Snapshot'] = snapshot
1413
1445
  end
1414
1446
  unless paths.nil?
1415
- raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1447
+ raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1416
1448
 
1417
1449
  submit_params['Paths'] = paths.to_json
1418
1450
  end
@@ -1442,25 +1474,25 @@ module Comet
1442
1474
  # @return [Comet::CometAPIResponseMessage]
1443
1475
  def admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil)
1444
1476
  submit_params = {}
1445
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1477
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1446
1478
 
1447
1479
  submit_params['TargetID'] = target_id
1448
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1480
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1449
1481
 
1450
1482
  submit_params['Source'] = source
1451
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1483
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1452
1484
 
1453
1485
  submit_params['Destination'] = destination
1454
- raise TypeError "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
1486
+ raise TypeError, "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
1455
1487
 
1456
1488
  submit_params['Options'] = options.to_json
1457
1489
  unless snapshot.nil?
1458
- raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1490
+ raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1459
1491
 
1460
1492
  submit_params['Snapshot'] = snapshot
1461
1493
  end
1462
1494
  unless paths.nil?
1463
- raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1495
+ raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1464
1496
 
1465
1497
  submit_params['Paths'] = paths.to_json
1466
1498
  end
@@ -1485,7 +1517,7 @@ module Comet
1485
1517
  # @return [Comet::CometAPIResponseMessage]
1486
1518
  def admin_dispatcher_uninstall_software(target_id, remove_config_file)
1487
1519
  submit_params = {}
1488
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1520
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1489
1521
 
1490
1522
  submit_params['TargetID'] = target_id
1491
1523
  submit_params['RemoveConfigFile'] = (remove_config_file ? 1 : 0)
@@ -1512,10 +1544,10 @@ module Comet
1512
1544
  # @return [Comet::CometAPIResponseMessage]
1513
1545
  def admin_dispatcher_unlock(target_id, destination)
1514
1546
  submit_params = {}
1515
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1547
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1516
1548
 
1517
1549
  submit_params['TargetID'] = target_id
1518
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1550
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1519
1551
 
1520
1552
  submit_params['Destination'] = destination
1521
1553
 
@@ -1540,10 +1572,10 @@ module Comet
1540
1572
  # @return [Comet::CometAPIResponseMessage]
1541
1573
  def admin_dispatcher_update_login_url(target_id, new_url)
1542
1574
  submit_params = {}
1543
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1575
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1544
1576
 
1545
1577
  submit_params['TargetID'] = target_id
1546
- raise TypeError "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
1578
+ raise TypeError, "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
1547
1579
 
1548
1580
  submit_params['NewURL'] = new_url
1549
1581
 
@@ -1568,13 +1600,13 @@ module Comet
1568
1600
  # @return [Comet::CometAPIResponseMessage]
1569
1601
  def admin_dispatcher_update_software(target_id, self_address = nil)
1570
1602
  submit_params = {}
1571
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1603
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1572
1604
 
1573
1605
  submit_params['TargetID'] = target_id
1574
1606
  if self_address.nil?
1575
1607
  submit_params['SelfAddress'] = @server_address
1576
1608
  else
1577
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
1609
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
1578
1610
 
1579
1611
  submit_params['SelfAddress'] = self_address
1580
1612
  end
@@ -1598,7 +1630,7 @@ module Comet
1598
1630
  # @return [String]
1599
1631
  def admin_get_job_log(job_id)
1600
1632
  submit_params = {}
1601
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1633
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1602
1634
 
1603
1635
  submit_params['JobID'] = job_id
1604
1636
 
@@ -1616,7 +1648,7 @@ module Comet
1616
1648
  # @return [Array<Comet::JobEntry>]
1617
1649
  def admin_get_job_log_entries(job_id)
1618
1650
  submit_params = {}
1619
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1651
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1620
1652
 
1621
1653
  submit_params['JobID'] = job_id
1622
1654
 
@@ -1646,7 +1678,7 @@ module Comet
1646
1678
  # @return [Comet::BackupJobDetail]
1647
1679
  def admin_get_job_properties(job_id)
1648
1680
  submit_params = {}
1649
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1681
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1650
1682
 
1651
1683
  submit_params['JobID'] = job_id
1652
1684
 
@@ -1695,7 +1727,7 @@ module Comet
1695
1727
  # @return [Array<Comet::BackupJobDetail>]
1696
1728
  def admin_get_jobs_for_custom_search(query)
1697
1729
  submit_params = {}
1698
- raise TypeError "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
1730
+ raise TypeError, "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
1699
1731
 
1700
1732
  submit_params['Query'] = query.to_json
1701
1733
 
@@ -1733,10 +1765,10 @@ module Comet
1733
1765
  # @return [Array<Comet::BackupJobDetail>]
1734
1766
  def admin_get_jobs_for_date_range(start_value, end_value)
1735
1767
  submit_params = {}
1736
- raise TypeError "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
1768
+ raise TypeError, "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
1737
1769
 
1738
1770
  submit_params['Start'] = start_value
1739
- raise TypeError "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
1771
+ raise TypeError, "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
1740
1772
 
1741
1773
  submit_params['End'] = end_value
1742
1774
 
@@ -1767,7 +1799,7 @@ module Comet
1767
1799
  # @return [Array<Comet::BackupJobDetail>]
1768
1800
  def admin_get_jobs_for_user(target_user)
1769
1801
  submit_params = {}
1770
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1802
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1771
1803
 
1772
1804
  submit_params['TargetUser'] = target_user
1773
1805
 
@@ -1822,7 +1854,7 @@ module Comet
1822
1854
  # @return [Comet::UserProfileConfig]
1823
1855
  def admin_get_user_profile(target_user)
1824
1856
  submit_params = {}
1825
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1857
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1826
1858
 
1827
1859
  submit_params['TargetUser'] = target_user
1828
1860
 
@@ -1847,7 +1879,7 @@ module Comet
1847
1879
  # @return [Comet::GetProfileAndHashResponseMessage]
1848
1880
  def admin_get_user_profile_and_hash(target_user)
1849
1881
  submit_params = {}
1850
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1882
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1851
1883
 
1852
1884
  submit_params['TargetUser'] = target_user
1853
1885
 
@@ -1872,7 +1904,7 @@ module Comet
1872
1904
  # @return [Comet::GetProfileHashResponseMessage]
1873
1905
  def admin_get_user_profile_hash(target_user)
1874
1906
  submit_params = {}
1875
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1907
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1876
1908
 
1877
1909
  submit_params['TargetUser'] = target_user
1878
1910
 
@@ -1898,10 +1930,10 @@ module Comet
1898
1930
  # @return [Comet::CometAPIResponseMessage]
1899
1931
  def admin_job_cancel(target_user, job_id)
1900
1932
  submit_params = {}
1901
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1933
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1902
1934
 
1903
1935
  submit_params['TargetUser'] = target_user
1904
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1936
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1905
1937
 
1906
1938
  submit_params['JobID'] = job_id
1907
1939
 
@@ -1930,7 +1962,7 @@ module Comet
1930
1962
  else
1931
1963
  ret = Array.new(json_body.length)
1932
1964
  json_body.each_with_index do |v, i|
1933
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
1965
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
1934
1966
 
1935
1967
  ret[i] = v
1936
1968
  end
@@ -1991,7 +2023,7 @@ module Comet
1991
2023
  # @return [Comet::CometAPIResponseMessage]
1992
2024
  def admin_meta_branding_config_set(branding_config)
1993
2025
  submit_params = {}
1994
- raise TypeError "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
2026
+ raise TypeError, "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
1995
2027
 
1996
2028
  submit_params['BrandingConfig'] = branding_config.to_json
1997
2029
 
@@ -2031,7 +2063,7 @@ module Comet
2031
2063
  # @return [Comet::CometAPIResponseMessage]
2032
2064
  def admin_meta_build_config_set(software_build_role_config)
2033
2065
  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
2066
+ 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
2067
 
2036
2068
  submit_params['SoftwareBuildRoleConfig'] = software_build_role_config.to_json
2037
2069
 
@@ -2060,7 +2092,7 @@ module Comet
2060
2092
  else
2061
2093
  ret = Array.new(json_body.length)
2062
2094
  json_body.each_with_index do |v, i|
2063
- raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
2095
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
2064
2096
 
2065
2097
  ret[i] = v
2066
2098
  end
@@ -2081,7 +2113,7 @@ module Comet
2081
2113
  # @return [String]
2082
2114
  def admin_meta_read_logs(log)
2083
2115
  submit_params = {}
2084
- raise TypeError "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
2116
+ raise TypeError, "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
2085
2117
 
2086
2118
  submit_params['Log'] = log
2087
2119
 
@@ -2123,7 +2155,7 @@ module Comet
2123
2155
  # @return [Comet::CometAPIResponseMessage]
2124
2156
  def admin_meta_remote_storage_vault_set(remote_storage_options)
2125
2157
  submit_params = {}
2126
- raise TypeError "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
2158
+ raise TypeError, "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
2127
2159
 
2128
2160
  submit_params['RemoteStorageOptions'] = remote_storage_options.to_json
2129
2161
 
@@ -2146,13 +2178,38 @@ module Comet
2146
2178
  # @return [String]
2147
2179
  def admin_meta_resource_get(hash)
2148
2180
  submit_params = {}
2149
- raise TypeError "'hash' expected String, got #{hash.class}" unless hash.is_a? String
2181
+ raise TypeError, "'hash' expected String, got #{hash.class}" unless hash.is_a? String
2150
2182
 
2151
2183
  submit_params['Hash'] = hash
2152
2184
 
2153
2185
  perform_request('api/v1/admin/meta/resource/get', submit_params)
2154
2186
  end
2155
2187
 
2188
+ # AdminMetaResourceNew
2189
+ #
2190
+ # Upload a resource file.
2191
+ # Resources are used to upload files within the server configuration.
2192
+ # The resulting resource ID is autogenerated.
2193
+ # 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.
2194
+ #
2195
+ # You must supply administrator authentication credentials to use this API.
2196
+ #
2197
+ # @param [String] upload The uploaded file contents, as a multipart/form-data part.
2198
+ # @return [Comet::AdminResourceResponse]
2199
+ def admin_meta_resource_new(upload)
2200
+ submit_params = {}
2201
+ raise TypeError, "'upload' expected String, got #{upload.class}" unless upload.is_a? String
2202
+
2203
+ submit_params['upload'] = upload
2204
+
2205
+ body = perform_request_multipart('api/v1/admin/meta/resource/new', submit_params)
2206
+ json_body = JSON.parse body
2207
+ check_status json_body
2208
+ ret = Comet::AdminResourceResponse.new
2209
+ ret.from_hash(json_body)
2210
+ ret
2211
+ end
2212
+
2156
2213
  # AdminMetaRestartService
2157
2214
  #
2158
2215
  # Restart server.
@@ -2188,10 +2245,10 @@ module Comet
2188
2245
  # @return [Comet::CometAPIResponseMessage]
2189
2246
  def admin_meta_send_test_email(email_options, recipient)
2190
2247
  submit_params = {}
2191
- raise TypeError "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
2248
+ raise TypeError, "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
2192
2249
 
2193
2250
  submit_params['EmailOptions'] = email_options.to_json
2194
- raise TypeError "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
2251
+ raise TypeError, "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
2195
2252
 
2196
2253
  submit_params['Recipient'] = recipient
2197
2254
 
@@ -2240,7 +2297,7 @@ module Comet
2240
2297
  else
2241
2298
  ret = Array.new(json_body.length)
2242
2299
  json_body.each_with_index do |v, i|
2243
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2300
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2244
2301
 
2245
2302
  ret[i] = v
2246
2303
  end
@@ -2263,7 +2320,7 @@ module Comet
2263
2320
  # @return [Comet::CometAPIResponseMessage]
2264
2321
  def admin_meta_server_config_set(config)
2265
2322
  submit_params = {}
2266
- raise TypeError "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
2323
+ raise TypeError, "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
2267
2324
 
2268
2325
  submit_params['Config'] = config.to_json
2269
2326
 
@@ -2391,7 +2448,7 @@ module Comet
2391
2448
  # @return [Comet::CometAPIResponseMessage]
2392
2449
  def admin_meta_webhook_options_set(webhook_options)
2393
2450
  submit_params = {}
2394
- raise TypeError "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
2451
+ raise TypeError, "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
2395
2452
 
2396
2453
  submit_params['WebhookOptions'] = webhook_options.to_json
2397
2454
 
@@ -2438,7 +2495,7 @@ module Comet
2438
2495
  # @return [Comet::CometAPIResponseMessage]
2439
2496
  def admin_news_remove(news_item)
2440
2497
  submit_params = {}
2441
- raise TypeError "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
2498
+ raise TypeError, "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
2442
2499
 
2443
2500
  submit_params['NewsItem'] = news_item
2444
2501
 
@@ -2461,7 +2518,7 @@ module Comet
2461
2518
  # @return [Comet::CometAPIResponseMessage]
2462
2519
  def admin_news_submit(news_content)
2463
2520
  submit_params = {}
2464
- raise TypeError "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
2521
+ raise TypeError, "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
2465
2522
 
2466
2523
  submit_params['NewsContent'] = news_content
2467
2524
 
@@ -2486,12 +2543,12 @@ module Comet
2486
2543
  def admin_organization_delete(organization_id = nil, uninstall_config = nil)
2487
2544
  submit_params = {}
2488
2545
  unless organization_id.nil?
2489
- raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2546
+ raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2490
2547
 
2491
2548
  submit_params['OrganizationID'] = organization_id
2492
2549
  end
2493
2550
  unless uninstall_config.nil?
2494
- raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
2551
+ raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
2495
2552
 
2496
2553
  submit_params['UninstallConfig'] = uninstall_config.to_json
2497
2554
  end
@@ -2541,12 +2598,12 @@ module Comet
2541
2598
  def admin_organization_set(organization_id = nil, organization = nil)
2542
2599
  submit_params = {}
2543
2600
  unless organization_id.nil?
2544
- raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2601
+ raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2545
2602
 
2546
2603
  submit_params['OrganizationID'] = organization_id
2547
2604
  end
2548
2605
  unless organization.nil?
2549
- raise TypeError "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
2606
+ raise TypeError, "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
2550
2607
 
2551
2608
  submit_params['Organization'] = organization.to_json
2552
2609
  end
@@ -2570,7 +2627,7 @@ module Comet
2570
2627
  # @return [Comet::CometAPIResponseMessage]
2571
2628
  def admin_policies_delete(policy_id)
2572
2629
  submit_params = {}
2573
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2630
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2574
2631
 
2575
2632
  submit_params['PolicyID'] = policy_id
2576
2633
 
@@ -2594,7 +2651,7 @@ module Comet
2594
2651
  # @return [Comet::GetGroupPolicyResponse]
2595
2652
  def admin_policies_get(policy_id)
2596
2653
  submit_params = {}
2597
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2654
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2598
2655
 
2599
2656
  submit_params['PolicyID'] = policy_id
2600
2657
 
@@ -2623,7 +2680,7 @@ module Comet
2623
2680
  ret = {}
2624
2681
  else
2625
2682
  json_body.each do |k, v|
2626
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2683
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2627
2684
 
2628
2685
  ret[k] = v
2629
2686
  end
@@ -2666,7 +2723,7 @@ module Comet
2666
2723
  # @return [Comet::CreateGroupPolicyResponse]
2667
2724
  def admin_policies_new(policy)
2668
2725
  submit_params = {}
2669
- raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2726
+ raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2670
2727
 
2671
2728
  submit_params['Policy'] = policy.to_json
2672
2729
 
@@ -2693,14 +2750,14 @@ module Comet
2693
2750
  # @return [Comet::CometAPIResponseMessage]
2694
2751
  def admin_policies_set(policy_id, policy, check_policy_hash = nil)
2695
2752
  submit_params = {}
2696
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2753
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2697
2754
 
2698
2755
  submit_params['PolicyID'] = policy_id
2699
- raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2756
+ raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2700
2757
 
2701
2758
  submit_params['Policy'] = policy.to_json
2702
2759
  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
2760
+ raise TypeError, "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
2704
2761
 
2705
2762
  submit_params['CheckPolicyHash'] = check_policy_hash
2706
2763
  end
@@ -2726,14 +2783,14 @@ module Comet
2726
2783
  # @return [Comet::EmailReportGeneratedPreview]
2727
2784
  def admin_preview_user_email_report(target_user, email_report_config, email_address = nil)
2728
2785
  submit_params = {}
2729
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2786
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2730
2787
 
2731
2788
  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
2789
+ raise TypeError, "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
2733
2790
 
2734
2791
  submit_params['EmailReportConfig'] = email_report_config.to_json
2735
2792
  unless email_address.nil?
2736
- raise TypeError "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
2793
+ raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
2737
2794
 
2738
2795
  submit_params['EmailAddress'] = email_address
2739
2796
  end
@@ -2785,16 +2842,16 @@ module Comet
2785
2842
  # @return [Comet::RequestStorageVaultResponseMessage]
2786
2843
  def admin_request_storage_vault(target_user, storage_provider, self_address = nil)
2787
2844
  submit_params = {}
2788
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2845
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2789
2846
 
2790
2847
  submit_params['TargetUser'] = target_user
2791
- raise TypeError "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
2848
+ raise TypeError, "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
2792
2849
 
2793
2850
  submit_params['StorageProvider'] = storage_provider
2794
2851
  if self_address.nil?
2795
2852
  submit_params['SelfAddress'] = @server_address
2796
2853
  else
2797
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
2854
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
2798
2855
 
2799
2856
  submit_params['SelfAddress'] = self_address
2800
2857
  end
@@ -2824,7 +2881,7 @@ module Comet
2824
2881
  ret = {}
2825
2882
  else
2826
2883
  json_body.each do |k, v|
2827
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2884
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2828
2885
 
2829
2886
  ret[k] = v
2830
2887
  end
@@ -2846,13 +2903,13 @@ module Comet
2846
2903
  # @return [Comet::CometAPIResponseMessage]
2847
2904
  def admin_reset_user_password(target_user, new_password, old_password)
2848
2905
  submit_params = {}
2849
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2906
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2850
2907
 
2851
2908
  submit_params['TargetUser'] = target_user
2852
- raise TypeError "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
2909
+ raise TypeError, "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
2853
2910
 
2854
2911
  submit_params['NewPassword'] = new_password
2855
- raise TypeError "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
2912
+ raise TypeError, "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
2856
2913
 
2857
2914
  submit_params['OldPassword'] = old_password
2858
2915
 
@@ -2877,10 +2934,10 @@ module Comet
2877
2934
  # @return [Comet::CometAPIResponseMessage]
2878
2935
  def admin_revoke_device(target_user, target_device)
2879
2936
  submit_params = {}
2880
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2937
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2881
2938
 
2882
2939
  submit_params['TargetUser'] = target_user
2883
- raise TypeError "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
2940
+ raise TypeError, "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
2884
2941
 
2885
2942
  submit_params['TargetDevice'] = target_device
2886
2943
 
@@ -2904,10 +2961,10 @@ module Comet
2904
2961
  # @return [Comet::CometAPIResponseMessage]
2905
2962
  def admin_set_user_profile(target_user, profile_data)
2906
2963
  submit_params = {}
2907
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2964
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2908
2965
 
2909
2966
  submit_params['TargetUser'] = target_user
2910
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2967
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2911
2968
 
2912
2969
  submit_params['ProfileData'] = profile_data.to_json
2913
2970
 
@@ -2934,13 +2991,13 @@ module Comet
2934
2991
  # @return [Comet::CometAPIResponseMessage]
2935
2992
  def admin_set_user_profile_hash(target_user, profile_data, require_hash)
2936
2993
  submit_params = {}
2937
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2994
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2938
2995
 
2939
2996
  submit_params['TargetUser'] = target_user
2940
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2997
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2941
2998
 
2942
2999
  submit_params['ProfileData'] = profile_data.to_json
2943
- raise TypeError "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
3000
+ raise TypeError, "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
2944
3001
 
2945
3002
  submit_params['RequireHash'] = require_hash
2946
3003
 
@@ -2965,11 +3022,11 @@ module Comet
2965
3022
  # @return [Comet::BucketProperties]
2966
3023
  def admin_storage_bucket_properties(bucket_id, after_timestamp = nil)
2967
3024
  submit_params = {}
2968
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3025
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2969
3026
 
2970
3027
  submit_params['BucketID'] = bucket_id
2971
3028
  unless after_timestamp.nil?
2972
- raise TypeError "'after_timestamp' expected Numeric, got #{after_timestamp.class}" unless after_timestamp.is_a? Numeric
3029
+ raise TypeError, "'after_timestamp' expected Numeric, got #{after_timestamp.class}" unless after_timestamp.is_a? Numeric
2973
3030
 
2974
3031
  submit_params['AfterTimestamp'] = after_timestamp
2975
3032
  end
@@ -2994,7 +3051,7 @@ module Comet
2994
3051
  # @return [Comet::CometAPIResponseMessage]
2995
3052
  def admin_storage_delete_bucket(bucket_id)
2996
3053
  submit_params = {}
2997
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3054
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2998
3055
 
2999
3056
  submit_params['BucketID'] = bucket_id
3000
3057
 
@@ -3020,7 +3077,7 @@ module Comet
3020
3077
  def admin_storage_free_space(bucket_id = nil)
3021
3078
  submit_params = {}
3022
3079
  unless bucket_id.nil?
3023
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3080
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3024
3081
 
3025
3082
  submit_params['BucketID'] = bucket_id
3026
3083
  end
@@ -3074,22 +3131,22 @@ module Comet
3074
3131
  def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil, set_organization_id = nil)
3075
3132
  submit_params = {}
3076
3133
  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
3134
+ raise TypeError, "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
3078
3135
 
3079
3136
  submit_params['SetBucketValue'] = set_bucket_value
3080
3137
  end
3081
3138
  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
3139
+ raise TypeError, "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
3083
3140
 
3084
3141
  submit_params['SetKeyHashFormat'] = set_key_hash_format
3085
3142
  end
3086
3143
  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
3144
+ raise TypeError, "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
3088
3145
 
3089
3146
  submit_params['SetKeyHashValue'] = set_key_hash_value
3090
3147
  end
3091
3148
  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
3149
+ raise TypeError, "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String
3093
3150
 
3094
3151
  submit_params['SetOrganizationID'] = set_organization_id
3095
3152
  end
@@ -3115,7 +3172,7 @@ module Comet
3115
3172
  # @return [Comet::CometAPIResponseMessage]
3116
3173
  def admin_update_campaign_start(options)
3117
3174
  submit_params = {}
3118
- raise TypeError "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
3175
+ raise TypeError, "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
3119
3176
 
3120
3177
  submit_params['Options'] = options.to_json
3121
3178
 
@@ -3229,6 +3286,35 @@ module Comet
3229
3286
 
3230
3287
  res.body
3231
3288
  end
3289
+
3290
+ # Perform a synchronous HTTP request, using multipart/form-data.
3291
+ #
3292
+ # @param [String] endpoint The URL suffix
3293
+ # @param [Hash<String,String>] params Form post parameters to submit to the target API
3294
+ # @return [String] Response body
3295
+ def perform_request_multipart(endpoint, params = {})
3296
+ full_uri = URI(@server_address + endpoint)
3297
+
3298
+ req = Net::HTTP::Post.new(full_uri)
3299
+ req['X-Comet-Admin-Username'] = @username
3300
+ req['X-Comet-Admin-AuthType'] = 'Password'
3301
+ req['X-Comet-Admin-Password'] = @password
3302
+
3303
+ form_params = []
3304
+ params.each do |k, v|
3305
+ form_params.append [k, v, {:filename => k}]
3306
+ end
3307
+ req.set_form(form_params, 'multipart/form-data')
3308
+
3309
+ http = Net::HTTP.new(full_uri.hostname, full_uri.port)
3310
+ res = http.request(req)
3311
+
3312
+ unless res.is_a?(Net::HTTPSuccess)
3313
+ raise res
3314
+ end
3315
+
3316
+ res.body
3317
+ end
3232
3318
  end
3233
3319
 
3234
3320
  end