comet_backup_ruby_sdk 1.0.0 → 1.5.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 +37 -0
- data/Gemfile.lock +2 -2
- data/LICENSE +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/api_response_error.rb +1 -1
- data/lib/comet/comet_server.rb +602 -291
- data/lib/comet/definitions.rb +48 -4
- data/lib/comet/models/add_bucket_response_message.rb +7 -7
- data/lib/comet/models/admin_account_properties_response.rb +4 -4
- data/lib/comet/models/admin_email_options.rb +5 -5
- data/lib/comet/models/admin_resource_response.rb +6 -6
- data/lib/comet/models/admin_security_options.rb +8 -8
- data/lib/comet/models/admin_u2fregistration.rb +5 -5
- data/lib/comet/models/admin_user_permissions.rb +3 -3
- data/lib/comet/models/available_download.rb +5 -5
- data/lib/comet/models/azure_destination_location.rb +8 -8
- data/lib/comet/models/b2destination_location.rb +8 -8
- data/lib/comet/models/b2storage_extra_info.rb +3 -3
- data/lib/comet/models/b2transaction_totals.rb +6 -6
- data/lib/comet/models/b2virtual_storage_role_settings.rb +6 -6
- data/lib/comet/models/backup_job_advanced_options.rb +5 -5
- data/lib/comet/models/backup_job_detail.rb +54 -21
- data/lib/comet/models/backup_job_progress.rb +8 -8
- data/lib/comet/models/backup_rule_config.rb +28 -12
- data/lib/comet/models/backup_rule_event_triggers.rb +3 -3
- data/lib/comet/models/branding_options.rb +37 -28
- data/lib/comet/models/branding_properties.rb +33 -24
- data/lib/comet/models/browse_disk_drives_response.rb +5 -5
- data/lib/comet/models/browse_edbresponse.rb +5 -5
- data/lib/comet/models/browse_hvresponse.rb +5 -5
- data/lib/comet/models/browse_office_365objects_response.rb +99 -0
- data/lib/comet/models/browse_sqlserver_response.rb +100 -0
- data/lib/comet/models/browse_vssresponse.rb +5 -5
- data/lib/comet/models/bucket_properties.rb +7 -7
- data/lib/comet/models/bucket_usage_info.rb +4 -4
- data/lib/comet/models/comet_apiresponse_message.rb +5 -5
- data/lib/comet/models/comet_destination_location.rb +6 -6
- data/lib/comet/models/constellation_check_report.rb +5 -5
- data/lib/comet/models/constellation_stats.rb +7 -7
- data/lib/comet/models/constellation_status_apiresponse.rb +5 -5
- data/lib/comet/models/content_measurement.rb +5 -5
- data/lib/comet/models/content_measurement_component.rb +5 -5
- data/lib/comet/models/create_group_policy_response.rb +6 -6
- data/lib/comet/models/custom_remote_bucket_settings.rb +75 -0
- data/lib/comet/models/default_email_report_policy.rb +3 -3
- data/lib/comet/models/destination_config.rb +66 -44
- data/lib/comet/models/destination_location.rb +41 -35
- data/lib/comet/models/destination_statistics.rb +6 -6
- data/lib/comet/models/device_config.rb +4 -4
- data/lib/comet/models/disk_drive.rb +14 -14
- data/lib/comet/models/dispatcher_admin_sources_response.rb +6 -6
- data/lib/comet/models/dispatcher_stored_objects_response.rb +5 -5
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +5 -5
- data/lib/comet/models/edbfile_info.rb +6 -6
- data/lib/comet/models/email_options.rb +10 -10
- data/lib/comet/models/email_report_config.rb +4 -4
- data/lib/comet/models/email_report_generated_preview.rb +8 -8
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +40 -7
- data/lib/comet/models/extra_file_exclusion.rb +5 -5
- data/lib/comet/models/ftpdestination_location.rb +10 -10
- data/lib/comet/models/get_group_policy_response.rb +6 -6
- data/lib/comet/models/get_profile_and_hash_response_message.rb +6 -6
- data/lib/comet/models/get_profile_hash_response_message.rb +6 -6
- data/lib/comet/models/group_policy.rb +5 -5
- data/lib/comet/models/hyper_vmachine_info.rb +5 -5
- data/lib/comet/models/install_creds.rb +6 -6
- data/lib/comet/models/install_token.rb +8 -8
- data/lib/comet/models/install_token_response.rb +5 -5
- data/lib/comet/models/job_entry.rb +6 -6
- data/lib/comet/models/live_user_connection.rb +9 -9
- data/lib/comet/models/local_destination_location.rb +7 -7
- data/lib/comet/models/mac_oscode_sign_properties.rb +9 -9
- data/lib/comet/models/mongo_dbconnection.rb +16 -16
- data/lib/comet/models/mssqlconnection.rb +120 -0
- data/lib/comet/models/my_sqlconnection.rb +102 -0
- data/lib/comet/models/new_bucket_detail.rb +5 -5
- data/lib/comet/models/news_entry.rb +6 -6
- data/lib/comet/models/office_365connection.rb +123 -0
- data/lib/comet/models/office_365credential.rb +111 -0
- data/lib/comet/models/office_365custom_setting.rb +132 -0
- data/lib/comet/models/office_365object_info.rb +118 -0
- data/lib/comet/models/organization.rb +11 -5
- data/lib/comet/models/organization_response.rb +6 -6
- data/lib/comet/models/osinfo.rb +6 -6
- data/lib/comet/models/partition.rb +14 -14
- data/lib/comet/models/private_branding_properties.rb +27 -18
- data/lib/comet/models/protected_item_engine_type_policy.rb +4 -4
- data/lib/comet/models/public_branding_properties.rb +9 -9
- data/lib/comet/models/register_office_application_begin_response.rb +93 -0
- data/lib/comet/models/register_office_application_check_response.rb +100 -0
- data/lib/comet/models/remote_server_address.rb +18 -8
- data/lib/comet/models/remote_storage_option.rb +19 -9
- data/lib/comet/models/replicator_state_apiresponse.rb +15 -15
- data/lib/comet/models/request_storage_vault_response_message.rb +6 -6
- data/lib/comet/models/restore_job_advanced_options.rb +13 -7
- data/lib/comet/models/retention_policy.rb +4 -4
- data/lib/comet/models/retention_range.rb +11 -11
- data/lib/comet/models/s3destination_location.rb +8 -8
- data/lib/comet/models/schedule_config.rb +6 -6
- data/lib/comet/models/search_clause.rb +7 -7
- data/lib/comet/models/self_backup_statistics.rb +108 -0
- data/lib/comet/models/server_config_options_branding_fragment.rb +3 -3
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +3 -3
- data/lib/comet/models/server_meta_version_info.rb +33 -18
- data/lib/comet/models/session_key_regenerated_response.rb +7 -7
- data/lib/comet/models/sftpdestination_location.rb +10 -10
- data/lib/comet/models/size_measurement.rb +6 -6
- data/lib/comet/models/software_build_role_options.rb +3 -3
- data/lib/comet/models/software_update_news_response.rb +7 -7
- data/lib/comet/models/source_basic_info.rb +5 -5
- data/lib/comet/models/source_config.rb +27 -11
- data/lib/comet/models/source_statistics.rb +3 -3
- data/lib/comet/models/spanned_destination_location.rb +9 -3
- data/lib/comet/models/spanned_storage_extra_info.rb +3 -3
- data/lib/comet/models/sshconnection.rb +9 -9
- data/lib/comet/models/stat_result.rb +7 -7
- data/lib/comet/models/storage_free_space_info.rb +5 -5
- data/lib/comet/models/storage_vault_provider_policy.rb +4 -4
- data/lib/comet/models/stored_object.rb +96 -11
- data/lib/comet/models/streamable_event.rb +8 -6
- data/lib/comet/models/swift_destination_location.rb +16 -16
- data/lib/comet/models/test_response.rb +5 -5
- data/lib/comet/models/totp_regenerated_response.rb +8 -8
- data/lib/comet/models/u2fregister_request.rb +5 -5
- data/lib/comet/models/u2fregistered_key.rb +6 -6
- data/lib/comet/models/u2fregistration_challenge_response.rb +7 -7
- data/lib/comet/models/u2fsign_request.rb +6 -6
- data/lib/comet/models/u2fsign_response.rb +7 -7
- data/lib/comet/models/uninstall_config.rb +3 -3
- data/lib/comet/models/update_campaign_device_status.rb +4 -4
- data/lib/comet/models/update_campaign_options.rb +3 -3
- data/lib/comet/models/update_campaign_properties.rb +5 -5
- data/lib/comet/models/update_campaign_status.rb +5 -5
- data/lib/comet/models/update_campaign_status_device_entry.rb +6 -6
- data/lib/comet/models/user_custom_email_settings.rb +3 -3
- data/lib/comet/models/user_on_server.rb +5 -5
- data/lib/comet/models/user_policy.rb +7 -7
- data/lib/comet/models/user_profile_config.rb +19 -19
- data/lib/comet/models/user_profile_fragment.rb +4 -4
- data/lib/comet/models/vault_snapshot.rb +12 -6
- data/lib/comet/models/vsscomponent.rb +6 -6
- data/lib/comet/models/vsswriter_info.rb +4 -4
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +6 -6
- data/lib/comet/models/web_interface_branding_properties.rb +7 -7
- data/lib/comet/models/webhook_option.rb +5 -5
- data/lib/comet/models/win_smbauth.rb +7 -7
- data/lib/comet/models/windows_code_sign_properties.rb +12 -12
- data/lib/comet_backup_ruby_sdk.rb +13 -1
- metadata +14 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -134,6 +134,9 @@ module Comet
|
|
|
134
134
|
# @type [Array<Comet::DestinationLocation>] span_targets
|
|
135
135
|
attr_accessor :span_targets
|
|
136
136
|
|
|
137
|
+
# @type [Boolean] span_use_static_slots
|
|
138
|
+
attr_accessor :span_use_static_slots
|
|
139
|
+
|
|
137
140
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
138
141
|
attr_accessor :unknown_json_fields
|
|
139
142
|
|
|
@@ -182,153 +185,153 @@ module Comet
|
|
|
182
185
|
|
|
183
186
|
# @param [String] json_string The complete object in JSON format
|
|
184
187
|
def from_json(json_string)
|
|
185
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
188
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
186
189
|
|
|
187
190
|
from_hash(JSON.parse(json_string))
|
|
188
191
|
end
|
|
189
192
|
|
|
190
193
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
191
194
|
def from_hash(obj)
|
|
192
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
195
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
193
196
|
|
|
194
197
|
obj.each do |k, v|
|
|
195
198
|
case k
|
|
196
199
|
when 'DestinationType'
|
|
197
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
200
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
198
201
|
|
|
199
202
|
@destination_type = v
|
|
200
203
|
when 'CometServer'
|
|
201
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
204
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
202
205
|
|
|
203
206
|
@comet_server = v
|
|
204
207
|
when 'CometBucket'
|
|
205
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
208
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
206
209
|
|
|
207
210
|
@comet_bucket = v
|
|
208
211
|
when 'CometBucketKey'
|
|
209
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
212
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
210
213
|
|
|
211
214
|
@comet_bucket_key = v
|
|
212
215
|
when 'S3Server'
|
|
213
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
216
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
214
217
|
|
|
215
218
|
@s3server = v
|
|
216
219
|
when 'S3UsesTLS'
|
|
217
220
|
@s3uses_tls = v
|
|
218
221
|
when 'S3AccessKey'
|
|
219
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
222
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
220
223
|
|
|
221
224
|
@s3access_key = v
|
|
222
225
|
when 'S3SecretKey'
|
|
223
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
226
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
224
227
|
|
|
225
228
|
@s3secret_key = v
|
|
226
229
|
when 'S3BucketName'
|
|
227
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
230
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
228
231
|
|
|
229
232
|
@s3bucket_name = v
|
|
230
233
|
when 'S3Subdir'
|
|
231
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
234
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
232
235
|
|
|
233
236
|
@s3subdir = v
|
|
234
237
|
when 'S3UsesV2Signing'
|
|
235
238
|
@s3uses_v2signing = v
|
|
236
239
|
when 'SFTPServer'
|
|
237
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
240
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
238
241
|
|
|
239
242
|
@sftpserver = v
|
|
240
243
|
when 'SFTPUsername'
|
|
241
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
244
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
242
245
|
|
|
243
246
|
@sftpusername = v
|
|
244
247
|
when 'SFTPRemotePath'
|
|
245
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
248
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
246
249
|
|
|
247
250
|
@sftpremote_path = v
|
|
248
251
|
when 'SFTPAuthMode'
|
|
249
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
252
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
250
253
|
|
|
251
254
|
@sftpauth_mode = v
|
|
252
255
|
when 'SFTPPassword'
|
|
253
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
256
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
254
257
|
|
|
255
258
|
@sftppassword = v
|
|
256
259
|
when 'SFTPPrivateKey'
|
|
257
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
260
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
258
261
|
|
|
259
262
|
@sftpprivate_key = v
|
|
260
263
|
when 'SFTPCustomAuth_UseKnownHostsFile'
|
|
261
264
|
@sftpcustom_auth__use_known_hosts_file = v
|
|
262
265
|
when 'SFTPCustomAuth_KnownHostsFile'
|
|
263
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
266
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
264
267
|
|
|
265
268
|
@sftpcustom_auth__known_hosts_file = v
|
|
266
269
|
when 'FTPServer'
|
|
267
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
270
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
268
271
|
|
|
269
272
|
@ftpserver = v
|
|
270
273
|
when 'FTPUsername'
|
|
271
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
274
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
272
275
|
|
|
273
276
|
@ftpusername = v
|
|
274
277
|
when 'FTPPassword'
|
|
275
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
278
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
276
279
|
|
|
277
280
|
@ftppassword = v
|
|
278
281
|
when 'FTPBaseUseHomeDirectory'
|
|
279
282
|
@ftpbase_use_home_directory = v
|
|
280
283
|
when 'FTPCustomBaseDirectory'
|
|
281
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
284
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
282
285
|
|
|
283
286
|
@ftpcustom_base_directory = v
|
|
284
287
|
when 'FTPSMode'
|
|
285
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
288
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
286
289
|
|
|
287
290
|
@ftpsmode = v
|
|
288
291
|
when 'FTPPort'
|
|
289
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
292
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
290
293
|
|
|
291
294
|
@ftpport = v
|
|
292
295
|
when 'FTPMaxConnections'
|
|
293
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
296
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
294
297
|
|
|
295
298
|
@ftpmax_connections = v
|
|
296
299
|
when 'FTPAcceptInvalidSSL'
|
|
297
300
|
@ftpaccept_invalid_ssl = v
|
|
298
301
|
when 'AZBAccountName'
|
|
299
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
302
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
300
303
|
|
|
301
304
|
@azbaccount_name = v
|
|
302
305
|
when 'AZBAccountKey'
|
|
303
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
306
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
304
307
|
|
|
305
308
|
@azbaccount_key = v
|
|
306
309
|
when 'AZBContainer'
|
|
307
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
310
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
308
311
|
|
|
309
312
|
@azbcontainer = v
|
|
310
313
|
when 'AZBRealm'
|
|
311
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
314
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
312
315
|
|
|
313
316
|
@azbrealm = v
|
|
314
317
|
when 'AZBPrefix'
|
|
315
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
318
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
316
319
|
|
|
317
320
|
@azbprefix = v
|
|
318
321
|
when 'LocalcopyPath'
|
|
319
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
322
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
320
323
|
|
|
321
324
|
@localcopy_path = v
|
|
322
325
|
when 'LocalcopyWinSMBUsername'
|
|
323
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
326
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
324
327
|
|
|
325
328
|
@localcopy_win_smbusername = v
|
|
326
329
|
when 'LocalcopyWinSMBPassword'
|
|
327
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
330
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
328
331
|
|
|
329
332
|
@localcopy_win_smbpassword = v
|
|
330
333
|
when 'LocalcopyWinSMBPasswordFormat'
|
|
331
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
334
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
332
335
|
|
|
333
336
|
@localcopy_win_smbpassword_format = v
|
|
334
337
|
when 'Swift'
|
|
@@ -347,6 +350,8 @@ module Comet
|
|
|
347
350
|
@span_targets[i1].from_hash(v1)
|
|
348
351
|
end
|
|
349
352
|
end
|
|
353
|
+
when 'SpanUseStaticSlots'
|
|
354
|
+
@span_use_static_slots = v
|
|
350
355
|
else
|
|
351
356
|
@unknown_json_fields[k] = v
|
|
352
357
|
end
|
|
@@ -396,6 +401,7 @@ module Comet
|
|
|
396
401
|
ret['Swift'] = @swift
|
|
397
402
|
ret['B2'] = @b2
|
|
398
403
|
ret['SpanTargets'] = @span_targets
|
|
404
|
+
ret['SpanUseStaticSlots'] = @span_use_static_slots
|
|
399
405
|
@unknown_json_fields.each do |k, v|
|
|
400
406
|
ret[k] = v
|
|
401
407
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -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'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -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'
|