comet_backup_ruby_sdk 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/Gemfile.lock +43 -0
  4. data/README.md +20 -4
  5. data/RELEASING.md +10 -0
  6. data/comet_backup_ruby_sdk.gemspec +1 -1
  7. data/lib/comet/comet_server.rb +184 -136
  8. data/lib/comet/definitions.rb +4 -4
  9. data/lib/comet/models/add_bucket_response_message.rb +15 -5
  10. data/lib/comet/models/admin_account_properties_response.rb +8 -2
  11. data/lib/comet/models/admin_resource_response.rb +13 -4
  12. data/lib/comet/models/admin_security_options.rb +18 -5
  13. data/lib/comet/models/admin_u2fregistration.rb +11 -3
  14. data/lib/comet/models/admin_user_permissions.rb +6 -2
  15. data/lib/comet/models/available_download.rb +10 -4
  16. data/lib/comet/models/azure_destination_location.rb +16 -7
  17. data/lib/comet/models/b2destination_location.rb +17 -6
  18. data/lib/comet/models/b2storage_extra_info.rb +6 -2
  19. data/lib/comet/models/b2transaction_totals.rb +15 -2
  20. data/lib/comet/models/backup_job_advanced_options.rb +12 -2
  21. data/lib/comet/models/backup_job_detail.rb +53 -10
  22. data/lib/comet/models/backup_job_progress.rb +21 -2
  23. data/lib/comet/models/backup_rule_config.rb +27 -7
  24. data/lib/comet/models/backup_rule_event_triggers.rb +6 -2
  25. data/lib/comet/models/branding_options.rb +59 -25
  26. data/lib/comet/models/branding_properties.rb +51 -21
  27. data/lib/comet/models/browse_disk_drives_response.rb +11 -3
  28. data/lib/comet/models/browse_edbresponse.rb +11 -3
  29. data/lib/comet/models/browse_hvresponse.rb +11 -3
  30. data/lib/comet/models/browse_vssresponse.rb +11 -3
  31. data/lib/comet/models/bucket_properties.rb +15 -3
  32. data/lib/comet/models/bucket_usage_info.rb +8 -2
  33. data/lib/comet/models/comet_apiresponse_message.rb +11 -3
  34. data/lib/comet/models/comet_destination_location.rb +12 -5
  35. data/lib/comet/models/constellation_check_report.rb +12 -2
  36. data/lib/comet/models/constellation_stats.rb +18 -2
  37. data/lib/comet/models/constellation_status_apiresponse.rb +9 -4
  38. data/lib/comet/models/content_measurement.rb +12 -2
  39. data/lib/comet/models/content_measurement_component.rb +10 -3
  40. data/lib/comet/models/create_group_policy_response.rb +13 -4
  41. data/lib/comet/models/default_email_report_policy.rb +6 -2
  42. data/lib/comet/models/destination_config.rb +101 -32
  43. data/lib/comet/models/destination_location.rb +78 -28
  44. data/lib/comet/models/destination_statistics.rb +16 -3
  45. data/lib/comet/models/device_config.rb +9 -3
  46. data/lib/comet/models/disk_drive.rb +34 -7
  47. data/lib/comet/models/dispatcher_admin_sources_response.rb +12 -4
  48. data/lib/comet/models/dispatcher_stored_objects_response.rb +11 -3
  49. data/lib/comet/models/dispatcher_vault_snapshots_response.rb +11 -3
  50. data/lib/comet/models/edbfile_info.rb +12 -5
  51. data/lib/comet/models/email_options.rb +21 -8
  52. data/lib/comet/models/email_report_config.rb +10 -2
  53. data/lib/comet/models/email_report_generated_preview.rb +17 -6
  54. data/lib/comet/models/extra_file_exclusion.rb +11 -3
  55. data/lib/comet/models/ftpdestination_location.rb +23 -6
  56. data/lib/comet/models/get_group_policy_response.rb +14 -4
  57. data/lib/comet/models/get_profile_and_hash_response_message.rb +14 -4
  58. data/lib/comet/models/get_profile_hash_response_message.rb +13 -4
  59. data/lib/comet/models/group_policy.rb +9 -3
  60. data/lib/comet/models/hyper_vmachine_info.rb +10 -4
  61. data/lib/comet/models/job_entry.rb +93 -0
  62. data/lib/comet/models/live_user_connection.rb +20 -7
  63. data/lib/comet/models/local_destination_location.rb +15 -5
  64. data/lib/comet/models/mac_oscode_sign_properties.rb +21 -6
  65. data/lib/comet/models/mongo_dbconnection.rb +33 -14
  66. data/lib/comet/models/new_bucket_detail.rb +10 -4
  67. data/lib/comet/models/news_entry.rb +11 -3
  68. data/lib/comet/models/osinfo.rb +12 -5
  69. data/lib/comet/models/partition.rb +32 -8
  70. data/lib/comet/models/private_branding_properties.rb +39 -15
  71. data/lib/comet/models/protected_item_engine_type_policy.rb +7 -3
  72. data/lib/comet/models/public_branding_properties.rb +18 -8
  73. data/lib/comet/models/remote_server_address.rb +19 -7
  74. data/lib/comet/models/remote_storage_option.rb +22 -7
  75. data/lib/comet/models/replicator_state_apiresponse.rb +40 -4
  76. data/lib/comet/models/request_storage_vault_response_message.rb +13 -4
  77. data/lib/comet/models/restore_job_advanced_options.rb +15 -4
  78. data/lib/comet/models/retention_policy.rb +9 -2
  79. data/lib/comet/models/retention_range.rb +30 -2
  80. data/lib/comet/models/s3destination_location.rb +16 -7
  81. data/lib/comet/models/schedule_config.rb +15 -2
  82. data/lib/comet/models/search_clause.rb +14 -6
  83. data/lib/comet/models/server_config_options_branding_fragment.rb +7 -2
  84. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +7 -2
  85. data/lib/comet/models/server_meta_version_info.rb +45 -7
  86. data/lib/comet/models/session_key_regenerated_response.rb +15 -5
  87. data/lib/comet/models/sftpdestination_location.rb +21 -8
  88. data/lib/comet/models/size_measurement.rb +15 -2
  89. data/lib/comet/models/software_build_role_options.rb +6 -2
  90. data/lib/comet/models/software_update_news_response.rb +13 -6
  91. data/lib/comet/models/source_basic_info.rb +11 -3
  92. data/lib/comet/models/source_config.rb +22 -8
  93. data/lib/comet/models/source_statistics.rb +7 -2
  94. data/lib/comet/models/spanned_destination_location.rb +6 -2
  95. data/lib/comet/models/spanned_storage_extra_info.rb +6 -2
  96. data/lib/comet/models/sshconnection.rb +19 -7
  97. data/lib/comet/models/stat_result.rb +18 -2
  98. data/lib/comet/models/storage_free_space_info.rb +14 -2
  99. data/lib/comet/models/storage_vault_provider_policy.rb +8 -2
  100. data/lib/comet/models/stored_object.rb +27 -5
  101. data/lib/comet/models/streamable_event.rb +9 -2
  102. data/lib/comet/models/swift_destination_location.rb +32 -15
  103. data/lib/comet/models/test_response.rb +11 -3
  104. data/lib/comet/models/totp_regenerated_response.rb +17 -6
  105. data/lib/comet/models/u2fregister_request.rb +10 -4
  106. data/lib/comet/models/u2fregistered_key.rb +12 -5
  107. data/lib/comet/models/u2fregistration_challenge_response.rb +15 -5
  108. data/lib/comet/models/u2fsign_request.rb +12 -5
  109. data/lib/comet/models/u2fsign_response.rb +14 -6
  110. data/lib/comet/models/uninstall_config.rb +6 -2
  111. data/lib/comet/models/update_campaign_device_status.rb +9 -2
  112. data/lib/comet/models/update_campaign_options.rb +6 -2
  113. data/lib/comet/models/update_campaign_properties.rb +11 -3
  114. data/lib/comet/models/update_campaign_status.rb +11 -3
  115. data/lib/comet/models/update_campaign_status_device_entry.rb +13 -4
  116. data/lib/comet/models/user_custom_email_settings.rb +6 -2
  117. data/lib/comet/models/user_on_server.rb +11 -3
  118. data/lib/comet/models/user_policy.rb +22 -2
  119. data/lib/comet/models/user_profile_config.rb +41 -12
  120. data/lib/comet/models/user_profile_fragment.rb +8 -3
  121. data/lib/comet/models/vault_snapshot.rb +13 -4
  122. data/lib/comet/models/vsscomponent.rb +12 -5
  123. data/lib/comet/models/vsswriter_info.rb +8 -3
  124. data/lib/comet/models/web_interface_branding_properties.rb +14 -6
  125. data/lib/comet/models/webhook_option.rb +10 -3
  126. data/lib/comet/models/win_smbauth.rb +15 -5
  127. data/lib/comet/models/windows_code_sign_properties.rb +26 -9
  128. data/lib/comet_backup_ruby_sdk.rb +1 -0
  129. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e51a11d5b03cf1b325584c429159a4e3ee504d3bbb35bba40018598ff96becf
4
- data.tar.gz: 1ef176d29a079a13ae4aea6489afbd6b2682d143c567876bf9009aa33122b161
3
+ metadata.gz: cb469739454eaf437ffee559876cecf0d66df9369b6cc9b30ed332c3177146e7
4
+ data.tar.gz: d0ad562130ff6906065b2f2cbf078049619c4720af042f04ccdb28d2d5ba8a8d
5
5
  SHA512:
6
- metadata.gz: c6a241c4231616d77fc376d0d165b15256ae59cbf4fff1e62a62d9812d355f046cf52d89fa06b05ec5d1ec3cce902baf7b63c7faba8058051c2e22c45bc10f4a
7
- data.tar.gz: b402d40013cab79d0af2b33c91423de4572686cd1b1ed372ccbdb2857745bbc48d46c01cdf904d09a9a846567c69b9813e92bd8f9c6cd1e08195c5a82d2d6731
6
+ metadata.gz: 50d4d0d017789a30d8005bba2746726ae8d1886c50124f7450ecfe0da23802fcdf649b2c379ad384a05896d1ab3d7f9e212d23495591083084e04b287314bd45
7
+ data.tar.gz: 6990c29cd57bee70c858f56f11404a785c18bb66b6f0ab809f307566e1fe300a8c865faf2ddd26a648d1a18c3cff4471a585348ad43d06a603b1d59cf2ffa6f9
@@ -0,0 +1,24 @@
1
+ # CHANGELOG
2
+
3
+ ## 2020-08-24 v0.3.1
4
+ - Fix an issue with version number in gem packaging
5
+ - Fix an issue with `.clear` initializers for numeric types
6
+ - Fix an issue with extra whitespace affecting the RuboCop linter
7
+
8
+ ## 2020-08-24 v0.3.0
9
+ - Based on Comet 20.8.0
10
+ - Feature: Support new `AdminGetJobLogEntries` endpoint
11
+ - Enhancement: Support new `.clear` method to reset a model class to its zero-initialized value
12
+ - Enhancement: Include the parameter name and expected type in all raised `TypeError` exception messages
13
+ - Enhancement: Zero-initialize all model class members on construction
14
+ - Enhancement: Raise `TypeError` for malformed numeric (int/float) type parameters (the Comet Server would already prevent these server-side)
15
+
16
+ ## 2020-08-04 v0.2.0
17
+ - Based on Comet 20.6.8-rc
18
+ - Initial public release
19
+
20
+ ## 2020-07-31 v0.1.0
21
+ - Gem packaging
22
+
23
+ ## 2020-07-31 v0.0.0
24
+ - Initial private release
@@ -0,0 +1,43 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ comet_backup_ruby_sdk (0.3.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.1)
10
+ minitest (5.14.1)
11
+ parallel (1.19.2)
12
+ parser (2.7.1.4)
13
+ ast (~> 2.4.1)
14
+ rainbow (3.0.0)
15
+ rake (13.0.1)
16
+ regexp_parser (1.7.1)
17
+ rexml (3.2.4)
18
+ rubocop (0.88.0)
19
+ parallel (~> 1.10)
20
+ parser (>= 2.7.1.1)
21
+ rainbow (>= 2.2.2, < 4.0)
22
+ regexp_parser (>= 1.7)
23
+ rexml
24
+ rubocop-ast (>= 0.1.0, < 1.0)
25
+ ruby-progressbar (~> 1.7)
26
+ unicode-display_width (>= 1.4.0, < 2.0)
27
+ rubocop-ast (0.3.0)
28
+ parser (>= 2.7.1.4)
29
+ ruby-progressbar (1.10.1)
30
+ unicode-display_width (1.7.0)
31
+
32
+ PLATFORMS
33
+ ruby
34
+
35
+ DEPENDENCIES
36
+ bundler (~> 1.17)
37
+ comet_backup_ruby_sdk!
38
+ minitest (~> 5.14)
39
+ rake (~> 13.0)
40
+ rubocop (~> 0.88)
41
+
42
+ BUNDLED WITH
43
+ 1.17.2
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # Ruby SDK for the Comet Server API
2
2
 
3
3
  [![@CometBackup on Twitter](https://img.shields.io/badge/twitter-%40CometBackup-blue.svg?style=flat)](https://twitter.com/CometBackup)
4
- ![MIT License](https://img.shields.io/packagist/l/cometbackup/comet-php-sdk.svg)
4
+ [![Gem Version](https://badge.fury.io/rb/comet_backup_ruby_sdk.svg)](https://badge.fury.io/rb/comet_backup_ruby_sdk)
5
+ ![MIT License](https://img.shields.io/badge/license-MIT-green)
5
6
 
6
7
  The Comet Server API allows you to create and manage customer accounts on your Comet Server.
7
8
 
@@ -21,7 +22,7 @@ Older API libraries can be safely used with newer versions of Comet Server. Unkn
21
22
 
22
23
  ## Getting Started
23
24
 
24
- This package is provided as a Gem hosted on [rubygems.org](https://rubygems.org/).
25
+ This package is provided as a Gem hosted on [rubygems.org](https://rubygems.org/gems/comet_backup_ruby_sdk).
25
26
 
26
27
  Install using [Bundler](https://bundler.io/):
27
28
 
@@ -32,9 +33,11 @@ bundle
32
33
 
33
34
  Or install using [Gem](https://rubygems.org/):
34
35
 
35
- $ gem install comet_backup_ruby_sdk
36
+ ```bash
37
+ gem install comet_backup_ruby_sdk
38
+ ```
36
39
 
37
- To compile the gem from source:
40
+ To compile the Gem from source:
38
41
 
39
42
  ```bash
40
43
  git clone https://github.com/CometBackup/comet-ruby-sdk.git
@@ -56,6 +59,8 @@ client.admin_list_users_full.each do |username, profile|
56
59
  end
57
60
  ```
58
61
 
62
+ ### Error handling
63
+
59
64
  The Comet Server API always returns an HTTP 200 status code, and puts application-level errors in the response message body using the `Comet::CometAPIResponseMessage` structure. This helps to distinguish between network-level errors and proxy-level errors. This SDK converts application-level errors to raise exceptions:
60
65
 
61
66
  ```ruby
@@ -74,6 +79,17 @@ rescue StandardError
74
79
  end
75
80
  ```
76
81
 
82
+ ### Running SDK test suite
83
+
84
+ ```ruby
85
+ bundle exec rake rubocop
86
+
87
+ COMETSERVER_ADDRESS='http://127.0.0.1:8060' \
88
+ COMETSERVER_ADMINUSER=admin \
89
+ COMETSERVER_ADMINPASS=admin \
90
+ bundle exec rake test
91
+ ```
92
+
77
93
  ## Getting Help
78
94
 
79
95
  Bug reports and pull requests are welcome on GitHub at [https://github.com/CometBackup/comet-ruby-sdk](https://github.com/CometBackup/comet-ruby-sdk).
@@ -0,0 +1,10 @@
1
+ # Procedure for releasing gem package updates
2
+
3
+ 1. All tests passing
4
+ 2. Update changelog in `CHANGELOG.md`
5
+ 3. Update version number in `gemspec`
6
+ 4. `gem build`
7
+ - Should be warning-free
8
+ 5. Git tag
9
+ - Respect semver
10
+ 6. `gem push comet_backup_ruby_sdk-0.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 = '0.2.0'
15
+ spec.version = '0.3.1'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -26,9 +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 'expected string' unless server_address.is_a? String
30
- raise TypeError 'expected string' unless username.is_a? String
31
- raise TypeError 'expected string' unless password.is_a? String
29
+ raise TypeError "'server_address' expected String, got #{server_address.class}" unless server_address.is_a? String
30
+
31
+ raise TypeError "'username' expected String, got #{username.class}" unless username.is_a? String
32
+
33
+ raise TypeError "'password' expected String, got #{password.class}" unless password.is_a? String
32
34
 
33
35
  @server_address = server_address
34
36
  @username = username
@@ -98,7 +100,7 @@ module Comet
98
100
  if self_address.nil?
99
101
  submit_params['SelfAddress'] = @server_address
100
102
  else
101
- raise TypeError 'expected string' unless self_address.is_a? String
103
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
102
104
 
103
105
  submit_params['SelfAddress'] = self_address
104
106
  end
@@ -121,7 +123,7 @@ module Comet
121
123
  # @return [Comet::SessionKeyRegeneratedResponse]
122
124
  def admin_account_session_start_as_user(target_user)
123
125
  submit_params = {}
124
- raise TypeError 'expected string' unless target_user.is_a? String
126
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
125
127
 
126
128
  submit_params['TargetUser'] = target_user
127
129
 
@@ -146,7 +148,7 @@ module Comet
146
148
  # @return [Comet::CometAPIResponseMessage]
147
149
  def admin_account_set_properties(security)
148
150
  submit_params = {}
149
- raise TypeError 'expected Comet::AdminSecurityOptions' unless security.is_a? Comet::AdminSecurityOptions
151
+ raise TypeError "'security' expected Comet::AdminSecurityOptions, got #{security.class}" unless security.is_a? Comet::AdminSecurityOptions
150
152
 
151
153
  submit_params['Security'] = security.to_json
152
154
 
@@ -168,7 +170,7 @@ module Comet
168
170
  # @return [Comet::U2FRegistrationChallengeResponse]
169
171
  def admin_account_u2f_request_registration_challenge(self_address)
170
172
  submit_params = {}
171
- raise TypeError 'expected string' unless self_address.is_a? String
173
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
172
174
 
173
175
  submit_params['SelfAddress'] = self_address
174
176
 
@@ -194,19 +196,19 @@ module Comet
194
196
  # @return [Comet::CometAPIResponseMessage]
195
197
  def admin_account_u2f_submit_challenge_response(u2fchallenge_id, u2fclient_data, u2fregistration_data, u2fversion, description)
196
198
  submit_params = {}
197
- raise TypeError 'expected string' unless u2fchallenge_id.is_a? String
199
+ raise TypeError "'u2fchallenge_id' expected String, got #{u2fchallenge_id.class}" unless u2fchallenge_id.is_a? String
198
200
 
199
201
  submit_params['U2FChallengeID'] = u2fchallenge_id
200
- raise TypeError 'expected string' unless u2fclient_data.is_a? String
202
+ raise TypeError "'u2fclient_data' expected String, got #{u2fclient_data.class}" unless u2fclient_data.is_a? String
201
203
 
202
204
  submit_params['U2FClientData'] = u2fclient_data
203
- raise TypeError 'expected string' unless u2fregistration_data.is_a? String
205
+ raise TypeError "'u2fregistration_data' expected String, got #{u2fregistration_data.class}" unless u2fregistration_data.is_a? String
204
206
 
205
207
  submit_params['U2FRegistrationData'] = u2fregistration_data
206
- raise TypeError 'expected string' unless u2fversion.is_a? String
208
+ raise TypeError "'u2fversion' expected String, got #{u2fversion.class}" unless u2fversion.is_a? String
207
209
 
208
210
  submit_params['U2FVersion'] = u2fversion
209
- raise TypeError 'expected string' unless description.is_a? String
211
+ raise TypeError "'description' expected String, got #{description.class}" unless description.is_a? String
210
212
 
211
213
  submit_params['Description'] = description
212
214
 
@@ -228,7 +230,7 @@ module Comet
228
230
  # @return [Comet::CometAPIResponseMessage]
229
231
  def admin_account_validate_totp(totpcode)
230
232
  submit_params = {}
231
- raise TypeError 'expected string' unless totpcode.is_a? String
233
+ raise TypeError "'totpcode' expected String, got #{totpcode.class}" unless totpcode.is_a? String
232
234
 
233
235
  submit_params['TOTPCode'] = totpcode
234
236
 
@@ -254,16 +256,20 @@ module Comet
254
256
  # @return [Comet::CometAPIResponseMessage]
255
257
  def admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil)
256
258
  submit_params = {}
257
- raise TypeError 'expected string' unless target_user.is_a? String
259
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
258
260
 
259
261
  submit_params['TargetUser'] = target_user
260
- raise TypeError 'expected string' unless target_password.is_a? String
262
+ raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
261
263
 
262
264
  submit_params['TargetPassword'] = target_password
263
265
  unless store_recovery_code.nil?
266
+ raise TypeError "'store_recovery_code' expected Numeric, got #{store_recovery_code.class}" unless store_recovery_code.is_a? Numeric
267
+
264
268
  submit_params['StoreRecoveryCode'] = store_recovery_code
265
269
  end
266
270
  unless require_password_change.nil?
271
+ raise TypeError "'require_password_change' expected Numeric, got #{require_password_change.class}" unless require_password_change.is_a? Numeric
272
+
267
273
  submit_params['RequirePasswordChange'] = require_password_change
268
274
  end
269
275
 
@@ -288,10 +294,10 @@ module Comet
288
294
  # @return [Comet::CometAPIResponseMessage]
289
295
  def admin_add_user_from_profile(target_user, profile_data)
290
296
  submit_params = {}
291
- raise TypeError 'expected string' unless target_user.is_a? String
297
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
292
298
 
293
299
  submit_params['TargetUser'] = target_user
294
- raise TypeError 'expected Comet::UserProfileConfig' unless profile_data.is_a? Comet::UserProfileConfig
300
+ raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
295
301
 
296
302
  submit_params['ProfileData'] = profile_data.to_json
297
303
 
@@ -341,11 +347,13 @@ module Comet
341
347
  # @return [String]
342
348
  def admin_branding_generate_client_by_platform(platform, self_address = nil)
343
349
  submit_params = {}
350
+ raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
351
+
344
352
  submit_params['Platform'] = platform
345
353
  if self_address.nil?
346
354
  submit_params['SelfAddress'] = @server_address
347
355
  else
348
- raise TypeError 'expected string' unless self_address.is_a? String
356
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
349
357
 
350
358
  submit_params['SelfAddress'] = self_address
351
359
  end
@@ -368,7 +376,7 @@ module Comet
368
376
  if self_address.nil?
369
377
  submit_params['SelfAddress'] = @server_address
370
378
  else
371
- raise TypeError 'expected string' unless self_address.is_a? String
379
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
372
380
 
373
381
  submit_params['SelfAddress'] = self_address
374
382
  end
@@ -391,7 +399,7 @@ module Comet
391
399
  if self_address.nil?
392
400
  submit_params['SelfAddress'] = @server_address
393
401
  else
394
- raise TypeError 'expected string' unless self_address.is_a? String
402
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
395
403
 
396
404
  submit_params['SelfAddress'] = self_address
397
405
  end
@@ -412,11 +420,13 @@ module Comet
412
420
  # @return [Comet::CometAPIResponseMessage]
413
421
  def admin_branding_generate_client_test(platform, self_address = nil)
414
422
  submit_params = {}
423
+ raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
424
+
415
425
  submit_params['Platform'] = platform
416
426
  if self_address.nil?
417
427
  submit_params['SelfAddress'] = @server_address
418
428
  else
419
- raise TypeError 'expected string' unless self_address.is_a? String
429
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
420
430
 
421
431
  submit_params['SelfAddress'] = self_address
422
432
  end
@@ -445,7 +455,7 @@ module Comet
445
455
  if self_address.nil?
446
456
  submit_params['SelfAddress'] = @server_address
447
457
  else
448
- raise TypeError 'expected string' unless self_address.is_a? String
458
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
449
459
 
450
460
  submit_params['SelfAddress'] = self_address
451
461
  end
@@ -469,7 +479,7 @@ module Comet
469
479
  if self_address.nil?
470
480
  submit_params['SelfAddress'] = @server_address
471
481
  else
472
- raise TypeError 'expected string' unless self_address.is_a? String
482
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
473
483
 
474
484
  submit_params['SelfAddress'] = self_address
475
485
  end
@@ -493,7 +503,7 @@ module Comet
493
503
  if self_address.nil?
494
504
  submit_params['SelfAddress'] = @server_address
495
505
  else
496
- raise TypeError 'expected string' unless self_address.is_a? String
506
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
497
507
 
498
508
  submit_params['SelfAddress'] = self_address
499
509
  end
@@ -517,7 +527,7 @@ module Comet
517
527
  if self_address.nil?
518
528
  submit_params['SelfAddress'] = @server_address
519
529
  else
520
- raise TypeError 'expected string' unless self_address.is_a? String
530
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
521
531
 
522
532
  submit_params['SelfAddress'] = self_address
523
533
  end
@@ -541,7 +551,7 @@ module Comet
541
551
  if self_address.nil?
542
552
  submit_params['SelfAddress'] = @server_address
543
553
  else
544
- raise TypeError 'expected string' unless self_address.is_a? String
554
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
545
555
 
546
556
  submit_params['SelfAddress'] = self_address
547
557
  end
@@ -565,7 +575,7 @@ module Comet
565
575
  if self_address.nil?
566
576
  submit_params['SelfAddress'] = @server_address
567
577
  else
568
- raise TypeError 'expected string' unless self_address.is_a? String
578
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
569
579
 
570
580
  submit_params['SelfAddress'] = self_address
571
581
  end
@@ -585,10 +595,10 @@ module Comet
585
595
  # @return [Comet::CometAPIResponseMessage]
586
596
  def admin_bulletin_submit(subject, content)
587
597
  submit_params = {}
588
- raise TypeError 'expected string' unless subject.is_a? String
598
+ raise TypeError "'subject' expected String, got #{subject.class}" unless subject.is_a? String
589
599
 
590
600
  submit_params['Subject'] = subject
591
- raise TypeError 'expected string' unless content.is_a? String
601
+ raise TypeError "'content' expected String, got #{content.class}" unless content.is_a? String
592
602
 
593
603
  submit_params['Content'] = content
594
604
 
@@ -683,11 +693,11 @@ module Comet
683
693
  # @return [Comet::CometAPIResponseMessage]
684
694
  def admin_delete_user(target_user, uninstall_config = nil)
685
695
  submit_params = {}
686
- raise TypeError 'expected string' unless target_user.is_a? String
696
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
687
697
 
688
698
  submit_params['TargetUser'] = target_user
689
699
  unless uninstall_config.nil?
690
- raise TypeError 'expected Comet::UninstallConfig' unless uninstall_config.is_a? Comet::UninstallConfig
700
+ raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
691
701
 
692
702
  submit_params['UninstallConfig'] = uninstall_config.to_json
693
703
  end
@@ -711,7 +721,7 @@ module Comet
711
721
  # @return [Comet::CometAPIResponseMessage]
712
722
  def admin_disable_user_totp(target_user)
713
723
  submit_params = {}
714
- raise TypeError 'expected string' unless target_user.is_a? String
724
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
715
725
 
716
726
  submit_params['TargetUser'] = target_user
717
727
 
@@ -736,10 +746,10 @@ module Comet
736
746
  # @return [Comet::CometAPIResponseMessage]
737
747
  def admin_dispatcher_apply_retention_rules(target_id, destination)
738
748
  submit_params = {}
739
- raise TypeError 'expected string' unless target_id.is_a? String
749
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
740
750
 
741
751
  submit_params['TargetID'] = target_id
742
- raise TypeError 'expected string' unless destination.is_a? String
752
+ raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
743
753
 
744
754
  submit_params['Destination'] = destination
745
755
 
@@ -764,10 +774,10 @@ module Comet
764
774
  # @return [Comet::CometAPIResponseMessage]
765
775
  def admin_dispatcher_deepverify_storage_vault(target_id, destination)
766
776
  submit_params = {}
767
- raise TypeError 'expected string' unless target_id.is_a? String
777
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
768
778
 
769
779
  submit_params['TargetID'] = target_id
770
- raise TypeError 'expected string' unless destination.is_a? String
780
+ raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
771
781
 
772
782
  submit_params['Destination'] = destination
773
783
 
@@ -792,13 +802,13 @@ module Comet
792
802
  # @return [Comet::CometAPIResponseMessage]
793
803
  def admin_dispatcher_delete_snapshot(target_id, destination_id, snapshot_id)
794
804
  submit_params = {}
795
- raise TypeError 'expected string' unless target_id.is_a? String
805
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
796
806
 
797
807
  submit_params['TargetID'] = target_id
798
- raise TypeError 'expected string' unless destination_id.is_a? String
808
+ raise TypeError "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
799
809
 
800
810
  submit_params['DestinationID'] = destination_id
801
- raise TypeError 'expected string' unless snapshot_id.is_a? String
811
+ raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
802
812
 
803
813
  submit_params['SnapshotID'] = snapshot_id
804
814
 
@@ -822,7 +832,7 @@ module Comet
822
832
  # @return [Comet::CometAPIResponseMessage]
823
833
  def admin_dispatcher_drop_connection(target_id)
824
834
  submit_params = {}
825
- raise TypeError 'expected string' unless target_id.is_a? String
835
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
826
836
 
827
837
  submit_params['TargetID'] = target_id
828
838
 
@@ -847,10 +857,10 @@ module Comet
847
857
  # @return [Comet::CometAPIResponseMessage]
848
858
  def admin_dispatcher_import_apply(target_id, import_source_id)
849
859
  submit_params = {}
850
- raise TypeError 'expected string' unless target_id.is_a? String
860
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
851
861
 
852
862
  submit_params['TargetID'] = target_id
853
- raise TypeError 'expected string' unless import_source_id.is_a? String
863
+ raise TypeError "'import_source_id' expected String, got #{import_source_id.class}" unless import_source_id.is_a? String
854
864
 
855
865
  submit_params['ImportSourceID'] = import_source_id
856
866
 
@@ -874,7 +884,7 @@ module Comet
874
884
  # @return [Comet::CometAPIResponseMessage]
875
885
  def admin_dispatcher_kill_process(target_id)
876
886
  submit_params = {}
877
- raise TypeError 'expected string' unless target_id.is_a? String
887
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
878
888
 
879
889
  submit_params['TargetID'] = target_id
880
890
 
@@ -922,7 +932,7 @@ module Comet
922
932
  # @return [Comet::CometAPIResponseMessage]
923
933
  def admin_dispatcher_refetch_profile(target_id)
924
934
  submit_params = {}
925
- raise TypeError 'expected string' unless target_id.is_a? String
935
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
926
936
 
927
937
  submit_params['TargetID'] = target_id
928
938
 
@@ -947,10 +957,10 @@ module Comet
947
957
  # @return [Comet::CometAPIResponseMessage]
948
958
  def admin_dispatcher_reindex_storage_vault(target_id, destination)
949
959
  submit_params = {}
950
- raise TypeError 'expected string' unless target_id.is_a? String
960
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
951
961
 
952
962
  submit_params['TargetID'] = target_id
953
- raise TypeError 'expected string' unless destination.is_a? String
963
+ raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
954
964
 
955
965
  submit_params['Destination'] = destination
956
966
 
@@ -973,7 +983,7 @@ module Comet
973
983
  # @return [Comet::BrowseDiskDrivesResponse]
974
984
  def admin_dispatcher_request_browse_disk_drives(target_id)
975
985
  submit_params = {}
976
- raise TypeError 'expected string' unless target_id.is_a? String
986
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
977
987
 
978
988
  submit_params['TargetID'] = target_id
979
989
 
@@ -996,7 +1006,7 @@ module Comet
996
1006
  # @return [Comet::BrowseEDBResponse]
997
1007
  def admin_dispatcher_request_browse_exchange_edb(target_id)
998
1008
  submit_params = {}
999
- raise TypeError 'expected string' unless target_id.is_a? String
1009
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1000
1010
 
1001
1011
  submit_params['TargetID'] = target_id
1002
1012
 
@@ -1019,7 +1029,7 @@ module Comet
1019
1029
  # @return [Comet::BrowseHVResponse]
1020
1030
  def admin_dispatcher_request_browse_hyperv(target_id)
1021
1031
  submit_params = {}
1022
- raise TypeError 'expected string' unless target_id.is_a? String
1032
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1023
1033
 
1024
1034
  submit_params['TargetID'] = target_id
1025
1035
 
@@ -1042,7 +1052,7 @@ module Comet
1042
1052
  # @return [Comet::BrowseVSSResponse]
1043
1053
  def admin_dispatcher_request_browse_vss_aaw(target_id)
1044
1054
  submit_params = {}
1045
- raise TypeError 'expected string' unless target_id.is_a? String
1055
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1046
1056
 
1047
1057
  submit_params['TargetID'] = target_id
1048
1058
 
@@ -1067,11 +1077,11 @@ module Comet
1067
1077
  # @return [Array<Comet::StoredObject>]
1068
1078
  def admin_dispatcher_request_filesystem_objects(target_id, path = nil)
1069
1079
  submit_params = {}
1070
- raise TypeError 'expected string' unless target_id.is_a? String
1080
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1071
1081
 
1072
1082
  submit_params['TargetID'] = target_id
1073
1083
  unless path.nil?
1074
- raise TypeError 'expected string' unless path.is_a? String
1084
+ raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1075
1085
 
1076
1086
  submit_params['Path'] = path
1077
1087
  end
@@ -1102,7 +1112,7 @@ module Comet
1102
1112
  # @return [Comet::DispatcherAdminSourcesResponse]
1103
1113
  def admin_dispatcher_request_import_sources(target_id)
1104
1114
  submit_params = {}
1105
- raise TypeError 'expected string' unless target_id.is_a? String
1115
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1106
1116
 
1107
1117
  submit_params['TargetID'] = target_id
1108
1118
 
@@ -1129,17 +1139,17 @@ module Comet
1129
1139
  # @return [Comet::DispatcherStoredObjectsResponse]
1130
1140
  def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil)
1131
1141
  submit_params = {}
1132
- raise TypeError 'expected string' unless target_id.is_a? String
1142
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1133
1143
 
1134
1144
  submit_params['TargetID'] = target_id
1135
- raise TypeError 'expected string' unless destination.is_a? String
1145
+ raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1136
1146
 
1137
1147
  submit_params['Destination'] = destination
1138
- raise TypeError 'expected string' unless snapshot_id.is_a? String
1148
+ raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1139
1149
 
1140
1150
  submit_params['SnapshotID'] = snapshot_id
1141
1151
  unless tree_id.nil?
1142
- raise TypeError 'expected string' unless tree_id.is_a? String
1152
+ raise TypeError "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
1143
1153
 
1144
1154
  submit_params['TreeID'] = tree_id
1145
1155
  end
@@ -1164,10 +1174,10 @@ module Comet
1164
1174
  # @return [Comet::DispatcherVaultSnapshotsResponse]
1165
1175
  def admin_dispatcher_request_vault_snapshots(target_id, destination)
1166
1176
  submit_params = {}
1167
- raise TypeError 'expected string' unless target_id.is_a? String
1177
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1168
1178
 
1169
1179
  submit_params['TargetID'] = target_id
1170
- raise TypeError 'expected string' unless destination.is_a? String
1180
+ raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1171
1181
 
1172
1182
  submit_params['Destination'] = destination
1173
1183
 
@@ -1191,10 +1201,10 @@ module Comet
1191
1201
  # @return [Comet::CometAPIResponseMessage]
1192
1202
  def admin_dispatcher_run_backup(target_id, backup_rule)
1193
1203
  submit_params = {}
1194
- raise TypeError 'expected string' unless target_id.is_a? String
1204
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1195
1205
 
1196
1206
  submit_params['TargetID'] = target_id
1197
- raise TypeError 'expected string' unless backup_rule.is_a? String
1207
+ raise TypeError "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
1198
1208
 
1199
1209
  submit_params['BackupRule'] = backup_rule
1200
1210
 
@@ -1220,17 +1230,17 @@ module Comet
1220
1230
  # @return [Comet::CometAPIResponseMessage]
1221
1231
  def admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil)
1222
1232
  submit_params = {}
1223
- raise TypeError 'expected string' unless target_id.is_a? String
1233
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1224
1234
 
1225
1235
  submit_params['TargetID'] = target_id
1226
- raise TypeError 'expected string' unless source.is_a? String
1236
+ raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1227
1237
 
1228
1238
  submit_params['Source'] = source
1229
- raise TypeError 'expected string' unless destination.is_a? String
1239
+ raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1230
1240
 
1231
1241
  submit_params['Destination'] = destination
1232
1242
  unless options.nil?
1233
- raise TypeError 'expected Comet::BackupJobAdvancedOptions' unless options.is_a? Comet::BackupJobAdvancedOptions
1243
+ raise TypeError "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
1234
1244
 
1235
1245
  submit_params['Options'] = options.to_json
1236
1246
  end
@@ -1260,25 +1270,25 @@ module Comet
1260
1270
  # @return [Comet::CometAPIResponseMessage]
1261
1271
  def admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil)
1262
1272
  submit_params = {}
1263
- raise TypeError 'expected string' unless target_id.is_a? String
1273
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1264
1274
 
1265
1275
  submit_params['TargetID'] = target_id
1266
- raise TypeError 'expected string' unless path.is_a? String
1276
+ raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1267
1277
 
1268
1278
  submit_params['Path'] = path
1269
- raise TypeError 'expected string' unless source.is_a? String
1279
+ raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1270
1280
 
1271
1281
  submit_params['Source'] = source
1272
- raise TypeError 'expected string' unless destination.is_a? String
1282
+ raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1273
1283
 
1274
1284
  submit_params['Destination'] = destination
1275
1285
  unless snapshot.nil?
1276
- raise TypeError 'expected string' unless snapshot.is_a? String
1286
+ raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1277
1287
 
1278
1288
  submit_params['Snapshot'] = snapshot
1279
1289
  end
1280
1290
  unless paths.nil?
1281
- raise TypeError 'expected array' unless paths.is_a? Array
1291
+ raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1282
1292
 
1283
1293
  submit_params['Paths'] = paths.to_json
1284
1294
  end
@@ -1308,25 +1318,25 @@ module Comet
1308
1318
  # @return [Comet::CometAPIResponseMessage]
1309
1319
  def admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil)
1310
1320
  submit_params = {}
1311
- raise TypeError 'expected string' unless target_id.is_a? String
1321
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1312
1322
 
1313
1323
  submit_params['TargetID'] = target_id
1314
- raise TypeError 'expected string' unless source.is_a? String
1324
+ raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1315
1325
 
1316
1326
  submit_params['Source'] = source
1317
- raise TypeError 'expected string' unless destination.is_a? String
1327
+ raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1318
1328
 
1319
1329
  submit_params['Destination'] = destination
1320
- raise TypeError 'expected Comet::RestoreJobAdvancedOptions' unless options.is_a? Comet::RestoreJobAdvancedOptions
1330
+ raise TypeError "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
1321
1331
 
1322
1332
  submit_params['Options'] = options.to_json
1323
1333
  unless snapshot.nil?
1324
- raise TypeError 'expected string' unless snapshot.is_a? String
1334
+ raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1325
1335
 
1326
1336
  submit_params['Snapshot'] = snapshot
1327
1337
  end
1328
1338
  unless paths.nil?
1329
- raise TypeError 'expected array' unless paths.is_a? Array
1339
+ raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1330
1340
 
1331
1341
  submit_params['Paths'] = paths.to_json
1332
1342
  end
@@ -1351,7 +1361,7 @@ module Comet
1351
1361
  # @return [Comet::CometAPIResponseMessage]
1352
1362
  def admin_dispatcher_uninstall_software(target_id, remove_config_file)
1353
1363
  submit_params = {}
1354
- raise TypeError 'expected string' unless target_id.is_a? String
1364
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1355
1365
 
1356
1366
  submit_params['TargetID'] = target_id
1357
1367
  submit_params['RemoveConfigFile'] = (remove_config_file ? 1 : 0)
@@ -1378,10 +1388,10 @@ module Comet
1378
1388
  # @return [Comet::CometAPIResponseMessage]
1379
1389
  def admin_dispatcher_unlock(target_id, destination)
1380
1390
  submit_params = {}
1381
- raise TypeError 'expected string' unless target_id.is_a? String
1391
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1382
1392
 
1383
1393
  submit_params['TargetID'] = target_id
1384
- raise TypeError 'expected string' unless destination.is_a? String
1394
+ raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1385
1395
 
1386
1396
  submit_params['Destination'] = destination
1387
1397
 
@@ -1406,10 +1416,10 @@ module Comet
1406
1416
  # @return [Comet::CometAPIResponseMessage]
1407
1417
  def admin_dispatcher_update_login_url(target_id, new_url)
1408
1418
  submit_params = {}
1409
- raise TypeError 'expected string' unless target_id.is_a? String
1419
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1410
1420
 
1411
1421
  submit_params['TargetID'] = target_id
1412
- raise TypeError 'expected string' unless new_url.is_a? String
1422
+ raise TypeError "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
1413
1423
 
1414
1424
  submit_params['NewURL'] = new_url
1415
1425
 
@@ -1434,13 +1444,13 @@ module Comet
1434
1444
  # @return [Comet::CometAPIResponseMessage]
1435
1445
  def admin_dispatcher_update_software(target_id, self_address = nil)
1436
1446
  submit_params = {}
1437
- raise TypeError 'expected string' unless target_id.is_a? String
1447
+ raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1438
1448
 
1439
1449
  submit_params['TargetID'] = target_id
1440
1450
  if self_address.nil?
1441
1451
  submit_params['SelfAddress'] = @server_address
1442
1452
  else
1443
- raise TypeError 'expected string' unless self_address.is_a? String
1453
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
1444
1454
 
1445
1455
  submit_params['SelfAddress'] = self_address
1446
1456
  end
@@ -1455,7 +1465,7 @@ module Comet
1455
1465
 
1456
1466
  # AdminGetJobLog
1457
1467
  #
1458
- # Get the report log entries for a single job.
1468
+ # Get the report log entries for a single job, in plaintext format.
1459
1469
  #
1460
1470
  # You must supply administrator authentication credentials to use this API.
1461
1471
  # This API requires the Auth Role to be enabled.
@@ -1464,13 +1474,43 @@ module Comet
1464
1474
  # @return [String]
1465
1475
  def admin_get_job_log(job_id)
1466
1476
  submit_params = {}
1467
- raise TypeError 'expected string' unless job_id.is_a? String
1477
+ raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1468
1478
 
1469
1479
  submit_params['JobID'] = job_id
1470
1480
 
1471
1481
  perform_request('/api/v1/admin/get-job-log', submit_params)
1472
1482
  end
1473
1483
 
1484
+ # AdminGetJobLogEntries
1485
+ #
1486
+ # Get the report log entries for a single job.
1487
+ #
1488
+ # You must supply administrator authentication credentials to use this API.
1489
+ # This API requires the Auth Role to be enabled.
1490
+ #
1491
+ # @param [String] job_id Selected job ID
1492
+ # @return [Array<Comet::JobEntry>]
1493
+ def admin_get_job_log_entries(job_id)
1494
+ submit_params = {}
1495
+ raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1496
+
1497
+ submit_params['JobID'] = job_id
1498
+
1499
+ body = perform_request('/api/v1/admin/get-job-log-entries', submit_params)
1500
+ json_body = JSON.parse body
1501
+ check_status json_body
1502
+ if json_body.nil?
1503
+ ret = []
1504
+ else
1505
+ ret = Array.new(json_body.length)
1506
+ json_body.each_with_index do |v, i|
1507
+ ret[i] = Comet::JobEntry.new
1508
+ ret[i].from_hash(v)
1509
+ end
1510
+ end
1511
+ ret
1512
+ end
1513
+
1474
1514
  # AdminGetJobProperties
1475
1515
  #
1476
1516
  # Get properties of a single job.
@@ -1482,7 +1522,7 @@ module Comet
1482
1522
  # @return [Comet::BackupJobDetail]
1483
1523
  def admin_get_job_properties(job_id)
1484
1524
  submit_params = {}
1485
- raise TypeError 'expected string' unless job_id.is_a? String
1525
+ raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1486
1526
 
1487
1527
  submit_params['JobID'] = job_id
1488
1528
 
@@ -1531,7 +1571,7 @@ module Comet
1531
1571
  # @return [Array<Comet::BackupJobDetail>]
1532
1572
  def admin_get_jobs_for_custom_search(query)
1533
1573
  submit_params = {}
1534
- raise TypeError 'expected Comet::SearchClause' unless query.is_a? Comet::SearchClause
1574
+ raise TypeError "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
1535
1575
 
1536
1576
  submit_params['Query'] = query.to_json
1537
1577
 
@@ -1569,7 +1609,11 @@ module Comet
1569
1609
  # @return [Array<Comet::BackupJobDetail>]
1570
1610
  def admin_get_jobs_for_date_range(start_value, end_value)
1571
1611
  submit_params = {}
1612
+ raise TypeError "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
1613
+
1572
1614
  submit_params['Start'] = start_value
1615
+ raise TypeError "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
1616
+
1573
1617
  submit_params['End'] = end_value
1574
1618
 
1575
1619
  body = perform_request('/api/v1/admin/get-jobs-for-date-range', submit_params)
@@ -1599,7 +1643,7 @@ module Comet
1599
1643
  # @return [Array<Comet::BackupJobDetail>]
1600
1644
  def admin_get_jobs_for_user(target_user)
1601
1645
  submit_params = {}
1602
- raise TypeError 'expected string' unless target_user.is_a? String
1646
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1603
1647
 
1604
1648
  submit_params['TargetUser'] = target_user
1605
1649
 
@@ -1654,7 +1698,7 @@ module Comet
1654
1698
  # @return [Comet::UserProfileConfig]
1655
1699
  def admin_get_user_profile(target_user)
1656
1700
  submit_params = {}
1657
- raise TypeError 'expected string' unless target_user.is_a? String
1701
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1658
1702
 
1659
1703
  submit_params['TargetUser'] = target_user
1660
1704
 
@@ -1679,7 +1723,7 @@ module Comet
1679
1723
  # @return [Comet::GetProfileAndHashResponseMessage]
1680
1724
  def admin_get_user_profile_and_hash(target_user)
1681
1725
  submit_params = {}
1682
- raise TypeError 'expected string' unless target_user.is_a? String
1726
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1683
1727
 
1684
1728
  submit_params['TargetUser'] = target_user
1685
1729
 
@@ -1704,7 +1748,7 @@ module Comet
1704
1748
  # @return [Comet::GetProfileHashResponseMessage]
1705
1749
  def admin_get_user_profile_hash(target_user)
1706
1750
  submit_params = {}
1707
- raise TypeError 'expected string' unless target_user.is_a? String
1751
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1708
1752
 
1709
1753
  submit_params['TargetUser'] = target_user
1710
1754
 
@@ -1730,10 +1774,10 @@ module Comet
1730
1774
  # @return [Comet::CometAPIResponseMessage]
1731
1775
  def admin_job_cancel(target_user, job_id)
1732
1776
  submit_params = {}
1733
- raise TypeError 'expected string' unless target_user.is_a? String
1777
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1734
1778
 
1735
1779
  submit_params['TargetUser'] = target_user
1736
- raise TypeError 'expected string' unless job_id.is_a? String
1780
+ raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1737
1781
 
1738
1782
  submit_params['JobID'] = job_id
1739
1783
 
@@ -1762,7 +1806,7 @@ module Comet
1762
1806
  else
1763
1807
  ret = Array.new(json_body.length)
1764
1808
  json_body.each_with_index do |v, i|
1765
- raise TypeError 'expected string' unless v.is_a? String
1809
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
1766
1810
 
1767
1811
  ret[i] = v
1768
1812
  end
@@ -1823,7 +1867,7 @@ module Comet
1823
1867
  # @return [Comet::CometAPIResponseMessage]
1824
1868
  def admin_meta_branding_config_set(branding_config)
1825
1869
  submit_params = {}
1826
- raise TypeError 'expected Comet::BrandingOptions' unless branding_config.is_a? Comet::BrandingOptions
1870
+ raise TypeError "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
1827
1871
 
1828
1872
  submit_params['BrandingConfig'] = branding_config.to_json
1829
1873
 
@@ -1863,7 +1907,7 @@ module Comet
1863
1907
  # @return [Comet::CometAPIResponseMessage]
1864
1908
  def admin_meta_build_config_set(software_build_role_config)
1865
1909
  submit_params = {}
1866
- raise TypeError 'expected Comet::SoftwareBuildRoleOptions' unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
1910
+ raise TypeError "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
1867
1911
 
1868
1912
  submit_params['SoftwareBuildRoleConfig'] = software_build_role_config.to_json
1869
1913
 
@@ -1891,6 +1935,8 @@ module Comet
1891
1935
  else
1892
1936
  ret = Array.new(json_body.length)
1893
1937
  json_body.each_with_index do |v, i|
1938
+ raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
1939
+
1894
1940
  ret[i] = v
1895
1941
  end
1896
1942
  end
@@ -1909,6 +1955,8 @@ module Comet
1909
1955
  # @return [String]
1910
1956
  def admin_meta_read_logs(log)
1911
1957
  submit_params = {}
1958
+ raise TypeError "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
1959
+
1912
1960
  submit_params['Log'] = log
1913
1961
 
1914
1962
  perform_request('/api/v1/admin/meta/read-logs', submit_params)
@@ -1949,7 +1997,7 @@ module Comet
1949
1997
  # @return [Comet::CometAPIResponseMessage]
1950
1998
  def admin_meta_remote_storage_vault_set(remote_storage_options)
1951
1999
  submit_params = {}
1952
- raise TypeError 'expected array' unless remote_storage_options.is_a? Array
2000
+ raise TypeError "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
1953
2001
 
1954
2002
  submit_params['RemoteStorageOptions'] = remote_storage_options.to_json
1955
2003
 
@@ -1972,7 +2020,7 @@ module Comet
1972
2020
  # @return [String]
1973
2021
  def admin_meta_resource_get(hash)
1974
2022
  submit_params = {}
1975
- raise TypeError 'expected string' unless hash.is_a? String
2023
+ raise TypeError "'hash' expected String, got #{hash.class}" unless hash.is_a? String
1976
2024
 
1977
2025
  submit_params['Hash'] = hash
1978
2026
 
@@ -2012,10 +2060,10 @@ module Comet
2012
2060
  # @return [Comet::CometAPIResponseMessage]
2013
2061
  def admin_meta_send_test_email(email_options, recipient)
2014
2062
  submit_params = {}
2015
- raise TypeError 'expected Comet::EmailOptions' unless email_options.is_a? Comet::EmailOptions
2063
+ raise TypeError "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
2016
2064
 
2017
2065
  submit_params['EmailOptions'] = email_options.to_json
2018
- raise TypeError 'expected string' unless recipient.is_a? String
2066
+ raise TypeError "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
2019
2067
 
2020
2068
  submit_params['Recipient'] = recipient
2021
2069
 
@@ -2062,7 +2110,7 @@ module Comet
2062
2110
  else
2063
2111
  ret = Array.new(json_body.length)
2064
2112
  json_body.each_with_index do |v, i|
2065
- raise TypeError 'expected string' unless v.is_a? String
2113
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2066
2114
 
2067
2115
  ret[i] = v
2068
2116
  end
@@ -2084,7 +2132,7 @@ module Comet
2084
2132
  # @return [Comet::CometAPIResponseMessage]
2085
2133
  def admin_meta_server_config_set(config)
2086
2134
  submit_params = {}
2087
- raise TypeError 'expected Comet::ServerConfigOptions' unless config.is_a? Comet::ServerConfigOptions
2135
+ raise TypeError "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
2088
2136
 
2089
2137
  submit_params['Config'] = config.to_json
2090
2138
 
@@ -2211,7 +2259,7 @@ module Comet
2211
2259
  # @return [Comet::CometAPIResponseMessage]
2212
2260
  def admin_meta_webhook_options_set(webhook_options)
2213
2261
  submit_params = {}
2214
- raise TypeError 'expected hash' unless webhook_options.is_a? Hash
2262
+ raise TypeError "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
2215
2263
 
2216
2264
  submit_params['WebhookOptions'] = webhook_options.to_json
2217
2265
 
@@ -2258,7 +2306,7 @@ module Comet
2258
2306
  # @return [Comet::CometAPIResponseMessage]
2259
2307
  def admin_news_remove(news_item)
2260
2308
  submit_params = {}
2261
- raise TypeError 'expected string' unless news_item.is_a? String
2309
+ raise TypeError "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
2262
2310
 
2263
2311
  submit_params['NewsItem'] = news_item
2264
2312
 
@@ -2281,7 +2329,7 @@ module Comet
2281
2329
  # @return [Comet::CometAPIResponseMessage]
2282
2330
  def admin_news_submit(news_content)
2283
2331
  submit_params = {}
2284
- raise TypeError 'expected string' unless news_content.is_a? String
2332
+ raise TypeError "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
2285
2333
 
2286
2334
  submit_params['NewsContent'] = news_content
2287
2335
 
@@ -2304,7 +2352,7 @@ module Comet
2304
2352
  # @return [Comet::CometAPIResponseMessage]
2305
2353
  def admin_policies_delete(policy_id)
2306
2354
  submit_params = {}
2307
- raise TypeError 'expected string' unless policy_id.is_a? String
2355
+ raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2308
2356
 
2309
2357
  submit_params['PolicyID'] = policy_id
2310
2358
 
@@ -2328,7 +2376,7 @@ module Comet
2328
2376
  # @return [Comet::GetGroupPolicyResponse]
2329
2377
  def admin_policies_get(policy_id)
2330
2378
  submit_params = {}
2331
- raise TypeError 'expected string' unless policy_id.is_a? String
2379
+ raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2332
2380
 
2333
2381
  submit_params['PolicyID'] = policy_id
2334
2382
 
@@ -2357,7 +2405,7 @@ module Comet
2357
2405
  ret = {}
2358
2406
  else
2359
2407
  json_body.each do |k, v|
2360
- raise TypeError 'expected string' unless v.is_a? String
2408
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2361
2409
 
2362
2410
  ret[k] = v
2363
2411
  end
@@ -2400,7 +2448,7 @@ module Comet
2400
2448
  # @return [Comet::CreateGroupPolicyResponse]
2401
2449
  def admin_policies_new(policy)
2402
2450
  submit_params = {}
2403
- raise TypeError 'expected Comet::GroupPolicy' unless policy.is_a? Comet::GroupPolicy
2451
+ raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2404
2452
 
2405
2453
  submit_params['Policy'] = policy.to_json
2406
2454
 
@@ -2427,14 +2475,14 @@ module Comet
2427
2475
  # @return [Comet::CometAPIResponseMessage]
2428
2476
  def admin_policies_set(policy_id, policy, check_policy_hash = nil)
2429
2477
  submit_params = {}
2430
- raise TypeError 'expected string' unless policy_id.is_a? String
2478
+ raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2431
2479
 
2432
2480
  submit_params['PolicyID'] = policy_id
2433
- raise TypeError 'expected Comet::GroupPolicy' unless policy.is_a? Comet::GroupPolicy
2481
+ raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2434
2482
 
2435
2483
  submit_params['Policy'] = policy.to_json
2436
2484
  unless check_policy_hash.nil?
2437
- raise TypeError 'expected string' unless check_policy_hash.is_a? String
2485
+ raise TypeError "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
2438
2486
 
2439
2487
  submit_params['CheckPolicyHash'] = check_policy_hash
2440
2488
  end
@@ -2460,14 +2508,14 @@ module Comet
2460
2508
  # @return [Comet::EmailReportGeneratedPreview]
2461
2509
  def admin_preview_user_email_report(target_user, email_report_config, email_address = nil)
2462
2510
  submit_params = {}
2463
- raise TypeError 'expected string' unless target_user.is_a? String
2511
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2464
2512
 
2465
2513
  submit_params['TargetUser'] = target_user
2466
- raise TypeError 'expected Comet::EmailReportConfig' unless email_report_config.is_a? Comet::EmailReportConfig
2514
+ raise TypeError "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
2467
2515
 
2468
2516
  submit_params['EmailReportConfig'] = email_report_config.to_json
2469
2517
  unless email_address.nil?
2470
- raise TypeError 'expected string' unless email_address.is_a? String
2518
+ raise TypeError "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
2471
2519
 
2472
2520
  submit_params['EmailAddress'] = email_address
2473
2521
  end
@@ -2518,16 +2566,16 @@ module Comet
2518
2566
  # @return [Comet::RequestStorageVaultResponseMessage]
2519
2567
  def admin_request_storage_vault(target_user, storage_provider, self_address = nil)
2520
2568
  submit_params = {}
2521
- raise TypeError 'expected string' unless target_user.is_a? String
2569
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2522
2570
 
2523
2571
  submit_params['TargetUser'] = target_user
2524
- raise TypeError 'expected string' unless storage_provider.is_a? String
2572
+ raise TypeError "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
2525
2573
 
2526
2574
  submit_params['StorageProvider'] = storage_provider
2527
2575
  if self_address.nil?
2528
2576
  submit_params['SelfAddress'] = @server_address
2529
2577
  else
2530
- raise TypeError 'expected string' unless self_address.is_a? String
2578
+ raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
2531
2579
 
2532
2580
  submit_params['SelfAddress'] = self_address
2533
2581
  end
@@ -2557,7 +2605,7 @@ module Comet
2557
2605
  ret = {}
2558
2606
  else
2559
2607
  json_body.each do |k, v|
2560
- raise TypeError 'expected string' unless v.is_a? String
2608
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2561
2609
 
2562
2610
  ret[k] = v
2563
2611
  end
@@ -2579,13 +2627,13 @@ module Comet
2579
2627
  # @return [Comet::CometAPIResponseMessage]
2580
2628
  def admin_reset_user_password(target_user, new_password, old_password)
2581
2629
  submit_params = {}
2582
- raise TypeError 'expected string' unless target_user.is_a? String
2630
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2583
2631
 
2584
2632
  submit_params['TargetUser'] = target_user
2585
- raise TypeError 'expected string' unless new_password.is_a? String
2633
+ raise TypeError "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
2586
2634
 
2587
2635
  submit_params['NewPassword'] = new_password
2588
- raise TypeError 'expected string' unless old_password.is_a? String
2636
+ raise TypeError "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
2589
2637
 
2590
2638
  submit_params['OldPassword'] = old_password
2591
2639
 
@@ -2610,10 +2658,10 @@ module Comet
2610
2658
  # @return [Comet::CometAPIResponseMessage]
2611
2659
  def admin_revoke_device(target_user, target_device)
2612
2660
  submit_params = {}
2613
- raise TypeError 'expected string' unless target_user.is_a? String
2661
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2614
2662
 
2615
2663
  submit_params['TargetUser'] = target_user
2616
- raise TypeError 'expected string' unless target_device.is_a? String
2664
+ raise TypeError "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
2617
2665
 
2618
2666
  submit_params['TargetDevice'] = target_device
2619
2667
 
@@ -2637,10 +2685,10 @@ module Comet
2637
2685
  # @return [Comet::CometAPIResponseMessage]
2638
2686
  def admin_set_user_profile(target_user, profile_data)
2639
2687
  submit_params = {}
2640
- raise TypeError 'expected string' unless target_user.is_a? String
2688
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2641
2689
 
2642
2690
  submit_params['TargetUser'] = target_user
2643
- raise TypeError 'expected Comet::UserProfileConfig' unless profile_data.is_a? Comet::UserProfileConfig
2691
+ raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2644
2692
 
2645
2693
  submit_params['ProfileData'] = profile_data.to_json
2646
2694
 
@@ -2667,13 +2715,13 @@ module Comet
2667
2715
  # @return [Comet::CometAPIResponseMessage]
2668
2716
  def admin_set_user_profile_hash(target_user, profile_data, require_hash)
2669
2717
  submit_params = {}
2670
- raise TypeError 'expected string' unless target_user.is_a? String
2718
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2671
2719
 
2672
2720
  submit_params['TargetUser'] = target_user
2673
- raise TypeError 'expected Comet::UserProfileConfig' unless profile_data.is_a? Comet::UserProfileConfig
2721
+ raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2674
2722
 
2675
2723
  submit_params['ProfileData'] = profile_data.to_json
2676
- raise TypeError 'expected string' unless require_hash.is_a? String
2724
+ raise TypeError "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
2677
2725
 
2678
2726
  submit_params['RequireHash'] = require_hash
2679
2727
 
@@ -2697,7 +2745,7 @@ module Comet
2697
2745
  # @return [Comet::CometAPIResponseMessage]
2698
2746
  def admin_storage_delete_bucket(bucket_id)
2699
2747
  submit_params = {}
2700
- raise TypeError 'expected string' unless bucket_id.is_a? String
2748
+ raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2701
2749
 
2702
2750
  submit_params['BucketID'] = bucket_id
2703
2751
 
@@ -2721,7 +2769,7 @@ module Comet
2721
2769
  # @return [Comet::StorageFreeSpaceInfo]
2722
2770
  def admin_storage_free_space(bucket_id)
2723
2771
  submit_params = {}
2724
- raise TypeError 'expected string' unless bucket_id.is_a? String
2772
+ raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2725
2773
 
2726
2774
  submit_params['BucketID'] = bucket_id
2727
2775
 
@@ -2773,17 +2821,17 @@ module Comet
2773
2821
  def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil)
2774
2822
  submit_params = {}
2775
2823
  unless set_bucket_value.nil?
2776
- raise TypeError 'expected string' unless set_bucket_value.is_a? String
2824
+ raise TypeError "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
2777
2825
 
2778
2826
  submit_params['SetBucketValue'] = set_bucket_value
2779
2827
  end
2780
2828
  unless set_key_hash_format.nil?
2781
- raise TypeError 'expected string' unless set_key_hash_format.is_a? String
2829
+ raise TypeError "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
2782
2830
 
2783
2831
  submit_params['SetKeyHashFormat'] = set_key_hash_format
2784
2832
  end
2785
2833
  unless set_key_hash_value.nil?
2786
- raise TypeError 'expected string' unless set_key_hash_value.is_a? String
2834
+ raise TypeError "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
2787
2835
 
2788
2836
  submit_params['SetKeyHashValue'] = set_key_hash_value
2789
2837
  end
@@ -2808,7 +2856,7 @@ module Comet
2808
2856
  # @return [Comet::CometAPIResponseMessage]
2809
2857
  def admin_update_campaign_start(options)
2810
2858
  submit_params = {}
2811
- raise TypeError 'expected Comet::UpdateCampaignOptions' unless options.is_a? Comet::UpdateCampaignOptions
2859
+ raise TypeError "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
2812
2860
 
2813
2861
  submit_params['Options'] = options.to_json
2814
2862