comet_backup_ruby_sdk 0.3.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/Gemfile.lock +1 -1
- data/RELEASING.md +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +609 -263
- data/lib/comet/definitions.rb +19 -4
- data/lib/comet/models/add_bucket_response_message.rb +6 -6
- data/lib/comet/models/admin_account_properties_response.rb +11 -2
- data/lib/comet/models/admin_email_options.rb +84 -0
- data/lib/comet/models/admin_resource_response.rb +5 -5
- data/lib/comet/models/admin_security_options.rb +7 -7
- data/lib/comet/models/admin_u2fregistration.rb +4 -4
- data/lib/comet/models/admin_user_permissions.rb +2 -2
- data/lib/comet/models/available_download.rb +4 -4
- data/lib/comet/models/azure_destination_location.rb +7 -7
- data/lib/comet/models/b2destination_location.rb +7 -7
- data/lib/comet/models/b2storage_extra_info.rb +2 -2
- data/lib/comet/models/b2transaction_totals.rb +5 -5
- data/lib/comet/models/b2virtual_storage_role_settings.rb +93 -0
- data/lib/comet/models/backup_job_advanced_options.rb +4 -4
- data/lib/comet/models/backup_job_detail.rb +20 -20
- data/lib/comet/models/backup_job_progress.rb +7 -7
- data/lib/comet/models/backup_rule_config.rb +27 -11
- data/lib/comet/models/backup_rule_event_triggers.rb +2 -2
- data/lib/comet/models/branding_options.rb +27 -27
- data/lib/comet/models/branding_properties.rb +23 -23
- data/lib/comet/models/browse_disk_drives_response.rb +4 -4
- data/lib/comet/models/browse_edbresponse.rb +4 -4
- data/lib/comet/models/browse_hvresponse.rb +4 -4
- data/lib/comet/models/browse_vssresponse.rb +4 -4
- data/lib/comet/models/bucket_properties.rb +14 -5
- data/lib/comet/models/bucket_usage_info.rb +3 -3
- data/lib/comet/models/comet_apiresponse_message.rb +4 -4
- data/lib/comet/models/comet_destination_location.rb +5 -5
- data/lib/comet/models/constellation_check_report.rb +4 -4
- data/lib/comet/models/constellation_stats.rb +6 -6
- data/lib/comet/models/constellation_status_apiresponse.rb +4 -4
- data/lib/comet/models/content_measurement.rb +4 -4
- data/lib/comet/models/content_measurement_component.rb +4 -4
- data/lib/comet/models/create_group_policy_response.rb +5 -5
- data/lib/comet/models/default_email_report_policy.rb +2 -2
- data/lib/comet/models/destination_config.rb +65 -43
- data/lib/comet/models/destination_location.rb +34 -34
- data/lib/comet/models/destination_statistics.rb +5 -5
- data/lib/comet/models/device_config.rb +3 -3
- data/lib/comet/models/disk_drive.rb +13 -13
- data/lib/comet/models/dispatcher_admin_sources_response.rb +5 -5
- data/lib/comet/models/dispatcher_stored_objects_response.rb +4 -4
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +4 -4
- data/lib/comet/models/edbfile_info.rb +5 -5
- data/lib/comet/models/email_options.rb +9 -9
- data/lib/comet/models/email_report_config.rb +3 -3
- data/lib/comet/models/email_report_generated_preview.rb +7 -7
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +102 -0
- data/lib/comet/models/extra_file_exclusion.rb +4 -4
- data/lib/comet/models/ftpdestination_location.rb +9 -9
- data/lib/comet/models/get_group_policy_response.rb +5 -5
- data/lib/comet/models/get_profile_and_hash_response_message.rb +5 -5
- data/lib/comet/models/get_profile_hash_response_message.rb +5 -5
- data/lib/comet/models/group_policy.rb +12 -3
- data/lib/comet/models/hyper_vmachine_info.rb +4 -4
- data/lib/comet/models/install_creds.rb +99 -0
- data/lib/comet/models/install_token.rb +117 -0
- data/lib/comet/models/install_token_response.rb +92 -0
- data/lib/comet/models/job_entry.rb +5 -5
- data/lib/comet/models/live_user_connection.rb +8 -8
- data/lib/comet/models/local_destination_location.rb +6 -6
- data/lib/comet/models/mac_oscode_sign_properties.rb +8 -8
- data/lib/comet/models/mongo_dbconnection.rb +15 -15
- data/lib/comet/models/new_bucket_detail.rb +4 -4
- data/lib/comet/models/news_entry.rb +13 -4
- data/lib/comet/models/organization.rb +145 -0
- data/lib/comet/models/organization_response.rb +101 -0
- data/lib/comet/models/osinfo.rb +5 -5
- data/lib/comet/models/partition.rb +13 -13
- data/lib/comet/models/private_branding_properties.rb +17 -17
- data/lib/comet/models/protected_item_engine_type_policy.rb +3 -3
- data/lib/comet/models/public_branding_properties.rb +8 -8
- data/lib/comet/models/remote_server_address.rb +7 -7
- data/lib/comet/models/remote_storage_option.rb +14 -8
- data/lib/comet/models/replicator_state_apiresponse.rb +14 -14
- data/lib/comet/models/request_storage_vault_response_message.rb +5 -5
- data/lib/comet/models/restore_job_advanced_options.rb +6 -6
- data/lib/comet/models/retention_policy.rb +3 -3
- data/lib/comet/models/retention_range.rb +10 -10
- data/lib/comet/models/s3destination_location.rb +7 -7
- data/lib/comet/models/schedule_config.rb +5 -5
- data/lib/comet/models/search_clause.rb +6 -6
- data/lib/comet/models/server_config_options_branding_fragment.rb +2 -2
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +2 -2
- data/lib/comet/models/server_meta_version_info.rb +17 -17
- data/lib/comet/models/session_key_regenerated_response.rb +6 -6
- data/lib/comet/models/sftpdestination_location.rb +9 -9
- data/lib/comet/models/size_measurement.rb +5 -5
- data/lib/comet/models/software_build_role_options.rb +2 -2
- data/lib/comet/models/software_update_news_response.rb +6 -6
- data/lib/comet/models/source_basic_info.rb +4 -4
- data/lib/comet/models/source_config.rb +26 -10
- data/lib/comet/models/source_statistics.rb +2 -2
- data/lib/comet/models/spanned_destination_location.rb +2 -2
- data/lib/comet/models/spanned_storage_extra_info.rb +2 -2
- data/lib/comet/models/sshconnection.rb +8 -8
- data/lib/comet/models/stat_result.rb +6 -6
- data/lib/comet/models/storage_free_space_info.rb +5 -5
- data/lib/comet/models/storage_vault_provider_policy.rb +3 -3
- data/lib/comet/models/stored_object.rb +10 -10
- data/lib/comet/models/streamable_event.rb +12 -3
- data/lib/comet/models/swift_destination_location.rb +15 -15
- data/lib/comet/models/test_response.rb +4 -4
- data/lib/comet/models/totp_regenerated_response.rb +7 -7
- data/lib/comet/models/u2fregister_request.rb +4 -4
- data/lib/comet/models/u2fregistered_key.rb +5 -5
- data/lib/comet/models/u2fregistration_challenge_response.rb +6 -6
- data/lib/comet/models/u2fsign_request.rb +5 -5
- data/lib/comet/models/u2fsign_response.rb +6 -6
- data/lib/comet/models/uninstall_config.rb +2 -2
- data/lib/comet/models/update_campaign_device_status.rb +3 -3
- data/lib/comet/models/update_campaign_options.rb +2 -2
- data/lib/comet/models/update_campaign_properties.rb +4 -4
- data/lib/comet/models/update_campaign_status.rb +4 -4
- data/lib/comet/models/update_campaign_status_device_entry.rb +5 -5
- data/lib/comet/models/user_custom_email_settings.rb +2 -2
- data/lib/comet/models/user_on_server.rb +4 -4
- data/lib/comet/models/user_policy.rb +6 -6
- data/lib/comet/models/user_profile_config.rb +28 -17
- data/lib/comet/models/user_profile_fragment.rb +3 -3
- data/lib/comet/models/vault_snapshot.rb +5 -5
- data/lib/comet/models/vsscomponent.rb +5 -5
- data/lib/comet/models/vsswriter_info.rb +3 -3
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +93 -0
- data/lib/comet/models/web_interface_branding_properties.rb +6 -6
- data/lib/comet/models/webhook_option.rb +4 -4
- data/lib/comet/models/win_smbauth.rb +6 -6
- data/lib/comet/models/windows_code_sign_properties.rb +11 -11
- data/lib/comet_backup_ruby_sdk.rb +9 -0
- metadata +11 -2
|
@@ -182,153 +182,153 @@ module Comet
|
|
|
182
182
|
|
|
183
183
|
# @param [String] json_string The complete object in JSON format
|
|
184
184
|
def from_json(json_string)
|
|
185
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
185
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
186
186
|
|
|
187
187
|
from_hash(JSON.parse(json_string))
|
|
188
188
|
end
|
|
189
189
|
|
|
190
190
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
191
191
|
def from_hash(obj)
|
|
192
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
192
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
193
193
|
|
|
194
194
|
obj.each do |k, v|
|
|
195
195
|
case k
|
|
196
196
|
when 'DestinationType'
|
|
197
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
197
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
198
198
|
|
|
199
199
|
@destination_type = v
|
|
200
200
|
when 'CometServer'
|
|
201
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
201
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
202
202
|
|
|
203
203
|
@comet_server = v
|
|
204
204
|
when 'CometBucket'
|
|
205
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
205
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
206
206
|
|
|
207
207
|
@comet_bucket = v
|
|
208
208
|
when 'CometBucketKey'
|
|
209
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
209
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
210
210
|
|
|
211
211
|
@comet_bucket_key = v
|
|
212
212
|
when 'S3Server'
|
|
213
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
213
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
214
214
|
|
|
215
215
|
@s3server = v
|
|
216
216
|
when 'S3UsesTLS'
|
|
217
217
|
@s3uses_tls = v
|
|
218
218
|
when 'S3AccessKey'
|
|
219
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
219
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
220
220
|
|
|
221
221
|
@s3access_key = v
|
|
222
222
|
when 'S3SecretKey'
|
|
223
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
223
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
224
224
|
|
|
225
225
|
@s3secret_key = v
|
|
226
226
|
when 'S3BucketName'
|
|
227
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
227
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
228
228
|
|
|
229
229
|
@s3bucket_name = v
|
|
230
230
|
when 'S3Subdir'
|
|
231
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
231
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
232
232
|
|
|
233
233
|
@s3subdir = v
|
|
234
234
|
when 'S3UsesV2Signing'
|
|
235
235
|
@s3uses_v2signing = v
|
|
236
236
|
when 'SFTPServer'
|
|
237
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
237
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
238
238
|
|
|
239
239
|
@sftpserver = v
|
|
240
240
|
when 'SFTPUsername'
|
|
241
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
241
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
242
242
|
|
|
243
243
|
@sftpusername = v
|
|
244
244
|
when 'SFTPRemotePath'
|
|
245
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
245
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
246
246
|
|
|
247
247
|
@sftpremote_path = v
|
|
248
248
|
when 'SFTPAuthMode'
|
|
249
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
249
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
250
250
|
|
|
251
251
|
@sftpauth_mode = v
|
|
252
252
|
when 'SFTPPassword'
|
|
253
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
253
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
254
254
|
|
|
255
255
|
@sftppassword = v
|
|
256
256
|
when 'SFTPPrivateKey'
|
|
257
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
257
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
258
258
|
|
|
259
259
|
@sftpprivate_key = v
|
|
260
260
|
when 'SFTPCustomAuth_UseKnownHostsFile'
|
|
261
261
|
@sftpcustom_auth__use_known_hosts_file = v
|
|
262
262
|
when 'SFTPCustomAuth_KnownHostsFile'
|
|
263
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
263
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
264
264
|
|
|
265
265
|
@sftpcustom_auth__known_hosts_file = v
|
|
266
266
|
when 'FTPServer'
|
|
267
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
267
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
268
268
|
|
|
269
269
|
@ftpserver = v
|
|
270
270
|
when 'FTPUsername'
|
|
271
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
271
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
272
272
|
|
|
273
273
|
@ftpusername = v
|
|
274
274
|
when 'FTPPassword'
|
|
275
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
275
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
276
276
|
|
|
277
277
|
@ftppassword = v
|
|
278
278
|
when 'FTPBaseUseHomeDirectory'
|
|
279
279
|
@ftpbase_use_home_directory = v
|
|
280
280
|
when 'FTPCustomBaseDirectory'
|
|
281
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
281
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
282
282
|
|
|
283
283
|
@ftpcustom_base_directory = v
|
|
284
284
|
when 'FTPSMode'
|
|
285
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
285
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
286
286
|
|
|
287
287
|
@ftpsmode = v
|
|
288
288
|
when 'FTPPort'
|
|
289
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
289
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
290
290
|
|
|
291
291
|
@ftpport = v
|
|
292
292
|
when 'FTPMaxConnections'
|
|
293
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
293
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
294
294
|
|
|
295
295
|
@ftpmax_connections = v
|
|
296
296
|
when 'FTPAcceptInvalidSSL'
|
|
297
297
|
@ftpaccept_invalid_ssl = v
|
|
298
298
|
when 'AZBAccountName'
|
|
299
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
299
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
300
300
|
|
|
301
301
|
@azbaccount_name = v
|
|
302
302
|
when 'AZBAccountKey'
|
|
303
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
303
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
304
304
|
|
|
305
305
|
@azbaccount_key = v
|
|
306
306
|
when 'AZBContainer'
|
|
307
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
307
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
308
308
|
|
|
309
309
|
@azbcontainer = v
|
|
310
310
|
when 'AZBRealm'
|
|
311
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
311
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
312
312
|
|
|
313
313
|
@azbrealm = v
|
|
314
314
|
when 'AZBPrefix'
|
|
315
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
315
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
316
316
|
|
|
317
317
|
@azbprefix = v
|
|
318
318
|
when 'LocalcopyPath'
|
|
319
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
319
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
320
320
|
|
|
321
321
|
@localcopy_path = v
|
|
322
322
|
when 'LocalcopyWinSMBUsername'
|
|
323
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
323
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
324
324
|
|
|
325
325
|
@localcopy_win_smbusername = v
|
|
326
326
|
when 'LocalcopyWinSMBPassword'
|
|
327
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
327
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
328
328
|
|
|
329
329
|
@localcopy_win_smbpassword = v
|
|
330
330
|
when 'LocalcopyWinSMBPasswordFormat'
|
|
331
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
331
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
332
332
|
|
|
333
333
|
@localcopy_win_smbpassword_format = v
|
|
334
334
|
when 'Swift'
|
|
@@ -47,14 +47,14 @@ module Comet
|
|
|
47
47
|
|
|
48
48
|
# @param [String] json_string The complete object in JSON format
|
|
49
49
|
def from_json(json_string)
|
|
50
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
50
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
51
51
|
|
|
52
52
|
from_hash(JSON.parse(json_string))
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
56
56
|
def from_hash(obj)
|
|
57
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
57
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
58
58
|
|
|
59
59
|
obj.each do |k, v|
|
|
60
60
|
case k
|
|
@@ -65,15 +65,15 @@ module Comet
|
|
|
65
65
|
@client_provided_content = Comet::ContentMeasurement.new
|
|
66
66
|
@client_provided_content.from_hash(v)
|
|
67
67
|
when 'LastSuccessfulDeepVerify_GUID'
|
|
68
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
68
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
69
69
|
|
|
70
70
|
@last_successful_deep_verify__guid = v
|
|
71
71
|
when 'LastSuccessfulDeepVerify_StartTime'
|
|
72
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
72
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
73
73
|
|
|
74
74
|
@last_successful_deep_verify__start_time = v
|
|
75
75
|
when 'LastSuccessfulDeepVerify_EndTime'
|
|
76
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
76
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
77
77
|
|
|
78
78
|
@last_successful_deep_verify__end_time = v
|
|
79
79
|
else
|
|
@@ -39,19 +39,19 @@ module Comet
|
|
|
39
39
|
|
|
40
40
|
# @param [String] json_string The complete object in JSON format
|
|
41
41
|
def from_json(json_string)
|
|
42
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
42
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
43
43
|
|
|
44
44
|
from_hash(JSON.parse(json_string))
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
48
48
|
def from_hash(obj)
|
|
49
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
49
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
50
50
|
|
|
51
51
|
obj.each do |k, v|
|
|
52
52
|
case k
|
|
53
53
|
when 'FriendlyName'
|
|
54
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
54
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
55
55
|
|
|
56
56
|
@friendly_name = v
|
|
57
57
|
when 'PlatformVersion'
|
|
@@ -75,39 +75,39 @@ module Comet
|
|
|
75
75
|
|
|
76
76
|
# @param [String] json_string The complete object in JSON format
|
|
77
77
|
def from_json(json_string)
|
|
78
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
78
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
79
79
|
|
|
80
80
|
from_hash(JSON.parse(json_string))
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
84
84
|
def from_hash(obj)
|
|
85
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
85
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
86
86
|
|
|
87
87
|
obj.each do |k, v|
|
|
88
88
|
case k
|
|
89
89
|
when 'ID'
|
|
90
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
90
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
91
91
|
|
|
92
92
|
@id = v
|
|
93
93
|
when 'DeviceName'
|
|
94
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
94
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
95
95
|
|
|
96
96
|
@device_name = v
|
|
97
97
|
when 'Caption'
|
|
98
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
98
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
99
99
|
|
|
100
100
|
@caption = v
|
|
101
101
|
when 'Model'
|
|
102
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
102
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
103
103
|
|
|
104
104
|
@model = v
|
|
105
105
|
when 'SerialNumber'
|
|
106
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
106
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
107
107
|
|
|
108
108
|
@serial_number = v
|
|
109
109
|
when 'Size'
|
|
110
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
110
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
111
111
|
|
|
112
112
|
@size = v
|
|
113
113
|
when 'Partitions'
|
|
@@ -121,23 +121,23 @@ module Comet
|
|
|
121
121
|
end
|
|
122
122
|
end
|
|
123
123
|
when 'Flags'
|
|
124
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
124
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
125
125
|
|
|
126
126
|
@flags = v
|
|
127
127
|
when 'Cylinders'
|
|
128
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
128
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
129
129
|
|
|
130
130
|
@cylinders = v
|
|
131
131
|
when 'Heads'
|
|
132
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
132
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
133
133
|
|
|
134
134
|
@heads = v
|
|
135
135
|
when 'Sectors'
|
|
136
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
136
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
137
137
|
|
|
138
138
|
@sectors = v
|
|
139
139
|
when 'SectorSize'
|
|
140
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
140
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
141
141
|
|
|
142
142
|
@sector_size = v
|
|
143
143
|
else
|
|
@@ -39,23 +39,23 @@ module Comet
|
|
|
39
39
|
|
|
40
40
|
# @param [String] json_string The complete object in JSON format
|
|
41
41
|
def from_json(json_string)
|
|
42
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
42
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
43
43
|
|
|
44
44
|
from_hash(JSON.parse(json_string))
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
48
48
|
def from_hash(obj)
|
|
49
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
49
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
50
50
|
|
|
51
51
|
obj.each do |k, v|
|
|
52
52
|
case k
|
|
53
53
|
when 'Status'
|
|
54
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
54
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
55
55
|
|
|
56
56
|
@status = v
|
|
57
57
|
when 'Message'
|
|
58
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
58
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
59
59
|
|
|
60
60
|
@message = v
|
|
61
61
|
when 'ImportSources'
|
|
@@ -64,7 +64,7 @@ module Comet
|
|
|
64
64
|
@import_sources = {}
|
|
65
65
|
else
|
|
66
66
|
v.each do |k1, v1|
|
|
67
|
-
raise TypeError "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
|
67
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
|
68
68
|
|
|
69
69
|
@import_sources[k1] = v1
|
|
70
70
|
end
|
|
@@ -39,23 +39,23 @@ module Comet
|
|
|
39
39
|
|
|
40
40
|
# @param [String] json_string The complete object in JSON format
|
|
41
41
|
def from_json(json_string)
|
|
42
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
42
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
43
43
|
|
|
44
44
|
from_hash(JSON.parse(json_string))
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
48
48
|
def from_hash(obj)
|
|
49
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
49
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
50
50
|
|
|
51
51
|
obj.each do |k, v|
|
|
52
52
|
case k
|
|
53
53
|
when 'Status'
|
|
54
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
54
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
55
55
|
|
|
56
56
|
@status = v
|
|
57
57
|
when 'Message'
|
|
58
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
58
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
59
59
|
|
|
60
60
|
@message = v
|
|
61
61
|
when 'StoredObjects'
|
|
@@ -39,23 +39,23 @@ module Comet
|
|
|
39
39
|
|
|
40
40
|
# @param [String] json_string The complete object in JSON format
|
|
41
41
|
def from_json(json_string)
|
|
42
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
42
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
43
43
|
|
|
44
44
|
from_hash(JSON.parse(json_string))
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
48
48
|
def from_hash(obj)
|
|
49
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
49
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
50
50
|
|
|
51
51
|
obj.each do |k, v|
|
|
52
52
|
case k
|
|
53
53
|
when 'Status'
|
|
54
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
54
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
55
55
|
|
|
56
56
|
@status = v
|
|
57
57
|
when 'Message'
|
|
58
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
58
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
59
59
|
|
|
60
60
|
@message = v
|
|
61
61
|
when 'Snapshots'
|
|
@@ -42,27 +42,27 @@ module Comet
|
|
|
42
42
|
|
|
43
43
|
# @param [String] json_string The complete object in JSON format
|
|
44
44
|
def from_json(json_string)
|
|
45
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
45
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
46
46
|
|
|
47
47
|
from_hash(JSON.parse(json_string))
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
51
51
|
def from_hash(obj)
|
|
52
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
52
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
53
53
|
|
|
54
54
|
obj.each do |k, v|
|
|
55
55
|
case k
|
|
56
56
|
when 'Name'
|
|
57
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
57
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
58
58
|
|
|
59
59
|
@name = v
|
|
60
60
|
when 'Guid'
|
|
61
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
61
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
62
62
|
|
|
63
63
|
@guid = v
|
|
64
64
|
when 'ServerName'
|
|
65
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
65
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
66
66
|
|
|
67
67
|
@server_name = v
|
|
68
68
|
when 'CircularLoggingEnabled'
|