comet_backup_ruby_sdk 2.12.0 → 2.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +115 -0
- data/lib/comet/definitions.rb +27 -13
- data/lib/comet/models/amazon_awsvirtual_storage_role_settings.rb +13 -4
- data/lib/comet/models/destination_config.rb +9 -0
- data/lib/comet/models/destination_location.rb +9 -0
- data/lib/comet/models/install_creds.rb +9 -0
- data/lib/comet/models/psaconfig.rb +8 -0
- data/lib/comet/models/psagrouped_by.rb +82 -0
- data/lib/comet/models/registration_lobby_connection.rb +150 -0
- data/lib/comet/models/s3destination_location.rb +9 -0
- data/lib/comet/models/s3generic_virtual_storage_role.rb +13 -4
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +13 -4
- data/lib/comet_backup_ruby_sdk.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5595c2c9458e40b3d6c0bd1289e9f2c3e42c7b6b76877047dea9a626648808bc
|
4
|
+
data.tar.gz: bec6a1ecdc82849345abf3e1d3a7f58fbfafcc1a46a02e1596e3c9dec16e8e15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60823a0d07939472f63562529d631036306fcdfea97b1419cd80798361cb500ae30a297a22286825dd023a699e4aaed3f4ff3138a6b4c7c1dc5d747f89b6d264
|
7
|
+
data.tar.gz: 2dd9f6f226e55b48d8e65217124ac84a502293b64c1cc6a538ece2cd1de5401bd0acc820c31c2f3ba3b0521307875c23f60fc5b570f1d93c1534164221634c38
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2023-09-19 v2.14.0
|
4
|
+
|
5
|
+
- Based on Comet 23.9.2
|
6
|
+
- 'UseObjectLock' for S3 compatible storage settings deprecated. Replaced by 'ObjectLockMode'
|
7
|
+
- New Streamable event SEVT_DEVICE_LOBBY_CONNECT and SEVT_DEVICE_LOBBY_DISCONNECT
|
8
|
+
- Added 'TOTPCode' to 'InstallCreds' used for device registration.
|
9
|
+
- 'GroupedBy' added to 'PSAConfig' for grouping statistics.
|
10
|
+
- New APIs
|
11
|
+
- AdminInstallationDispatchDropConnection
|
12
|
+
- AdminInstallationDispatchRegisterDevice
|
13
|
+
- AdminInstallationListActive
|
14
|
+
- AdminJobAbandon
|
15
|
+
|
16
|
+
## 2023-08-29 v2.13.0
|
17
|
+
|
18
|
+
- Based on Comet 23.8.0
|
19
|
+
- Improve documentation of JobStatus constants
|
20
|
+
|
3
21
|
## 2023-08-09 v2.12.0
|
4
22
|
|
5
23
|
- Based on Comet 23.6.9
|
data/Gemfile.lock
CHANGED
@@ -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 = '2.
|
15
|
+
spec.version = '2.14.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
@@ -2617,6 +2617,121 @@ module Comet
|
|
2617
2617
|
ret
|
2618
2618
|
end
|
2619
2619
|
|
2620
|
+
# AdminInstallationDispatchDropConnection
|
2621
|
+
#
|
2622
|
+
# Instruct a live connected device to disconnect.
|
2623
|
+
# The device will terminate its live-connection process and will not reconnect.
|
2624
|
+
#
|
2625
|
+
# You must supply administrator authentication credentials to use this API.
|
2626
|
+
# This API requires the Auth Role to be enabled.
|
2627
|
+
#
|
2628
|
+
# @param [String] device_id The live connection Device GUID
|
2629
|
+
# @return [Comet::CometAPIResponseMessage]
|
2630
|
+
def admin_installation_dispatch_drop_connection(device_id)
|
2631
|
+
submit_params = {}
|
2632
|
+
raise TypeError, "'device_id' expected String, got #{device_id.class}" unless device_id.is_a? String
|
2633
|
+
|
2634
|
+
submit_params['DeviceID'] = device_id
|
2635
|
+
|
2636
|
+
body = perform_request('api/v1/admin/installation/dispatch/drop-connection', submit_params)
|
2637
|
+
json_body = JSON.parse body
|
2638
|
+
check_status json_body
|
2639
|
+
ret = Comet::CometAPIResponseMessage.new
|
2640
|
+
ret.from_hash(json_body)
|
2641
|
+
ret
|
2642
|
+
end
|
2643
|
+
|
2644
|
+
# AdminInstallationDispatchRegisterDevice
|
2645
|
+
#
|
2646
|
+
# Instruct an unregistered device to authenticate with a given user.
|
2647
|
+
#
|
2648
|
+
# You must supply administrator authentication credentials to use this API.
|
2649
|
+
# This API requires the Auth Role to be enabled.
|
2650
|
+
#
|
2651
|
+
# @param [String] device_id The live connection Device GUID
|
2652
|
+
# @param [String] target_user Selected account username
|
2653
|
+
# @param [String] target_password Selected account password
|
2654
|
+
# @param [String] target_totpcode (Optional) Selected account TOTP code
|
2655
|
+
# @return [String]
|
2656
|
+
def admin_installation_dispatch_register_device(device_id, target_user, target_password, target_totpcode = nil)
|
2657
|
+
submit_params = {}
|
2658
|
+
raise TypeError, "'device_id' expected String, got #{device_id.class}" unless device_id.is_a? String
|
2659
|
+
|
2660
|
+
submit_params['DeviceID'] = device_id
|
2661
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2662
|
+
|
2663
|
+
submit_params['TargetUser'] = target_user
|
2664
|
+
raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
|
2665
|
+
|
2666
|
+
submit_params['TargetPassword'] = target_password
|
2667
|
+
unless target_totpcode.nil?
|
2668
|
+
raise TypeError, "'target_totpcode' expected String, got #{target_totpcode.class}" unless target_totpcode.is_a? String
|
2669
|
+
|
2670
|
+
submit_params['TargetTOTPCode'] = target_totpcode
|
2671
|
+
end
|
2672
|
+
|
2673
|
+
body = perform_request('api/v1/admin/installation/dispatch/register-device', submit_params)
|
2674
|
+
json_body = JSON.parse body
|
2675
|
+
check_status json_body
|
2676
|
+
raise TypeError, "'json_body' expected String, got #{json_body.class}" unless json_body.is_a? String
|
2677
|
+
|
2678
|
+
ret = json_body
|
2679
|
+
ret
|
2680
|
+
end
|
2681
|
+
|
2682
|
+
# AdminInstallationListActive
|
2683
|
+
#
|
2684
|
+
# List live connected devices in lobby mode.
|
2685
|
+
#
|
2686
|
+
# You must supply administrator authentication credentials to use this API.
|
2687
|
+
# This API requires the Auth Role to be enabled.
|
2688
|
+
#
|
2689
|
+
# @return [Hash{String => Comet::RegistrationLobbyConnection}]
|
2690
|
+
def admin_installation_list_active
|
2691
|
+
body = perform_request('api/v1/admin/installation/list-active')
|
2692
|
+
json_body = JSON.parse body
|
2693
|
+
check_status json_body
|
2694
|
+
ret = {}
|
2695
|
+
if json_body.nil?
|
2696
|
+
ret = {}
|
2697
|
+
else
|
2698
|
+
json_body.each do |k, v|
|
2699
|
+
ret[k] = Comet::RegistrationLobbyConnection.new
|
2700
|
+
ret[k].from_hash(v)
|
2701
|
+
end
|
2702
|
+
end
|
2703
|
+
ret
|
2704
|
+
end
|
2705
|
+
|
2706
|
+
# AdminJobAbandon
|
2707
|
+
#
|
2708
|
+
# Mark a running job as abandoned.
|
2709
|
+
# This will change the status of a running job to abandoned.
|
2710
|
+
# This is intended to be used on jobs which are definitely no longer running but are stuck in the running state; it will not attempt to cancel the job. If the job is detected to still be running after being marked as abandoned, it will be revived.
|
2711
|
+
#
|
2712
|
+
# You must supply administrator authentication credentials to use this API.
|
2713
|
+
# This API requires the Auth Role to be enabled.
|
2714
|
+
#
|
2715
|
+
# @param [String] target_user Username
|
2716
|
+
# @param [String] job_id Job ID
|
2717
|
+
# @return [Comet::CometAPIResponseMessage]
|
2718
|
+
def admin_job_abandon(target_user, job_id)
|
2719
|
+
submit_params = {}
|
2720
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
2721
|
+
|
2722
|
+
submit_params['TargetUser'] = target_user
|
2723
|
+
raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
|
2724
|
+
|
2725
|
+
submit_params['JobID'] = job_id
|
2726
|
+
|
2727
|
+
body = perform_request('api/v1/admin/job/abandon', submit_params)
|
2728
|
+
json_body = JSON.parse body
|
2729
|
+
check_status json_body
|
2730
|
+
ret = Comet::CometAPIResponseMessage.new
|
2731
|
+
ret.from_hash(json_body)
|
2732
|
+
ret
|
2733
|
+
end
|
2734
|
+
|
2620
2735
|
# AdminJobCancel
|
2621
2736
|
#
|
2622
2737
|
# Cancel a running job.
|
data/lib/comet/definitions.rb
CHANGED
@@ -7,13 +7,13 @@
|
|
7
7
|
|
8
8
|
module Comet
|
9
9
|
|
10
|
-
APPLICATION_VERSION = '23.
|
10
|
+
APPLICATION_VERSION = '23.9.2'
|
11
11
|
|
12
12
|
APPLICATION_VERSION_MAJOR = 23
|
13
13
|
|
14
|
-
APPLICATION_VERSION_MINOR =
|
14
|
+
APPLICATION_VERSION_MINOR = 9
|
15
15
|
|
16
|
-
APPLICATION_VERSION_REVISION =
|
16
|
+
APPLICATION_VERSION_REVISION = 2
|
17
17
|
|
18
18
|
# AutoRetentionLevel: The system will automatically choose how often to run an automatic Retention Pass after each backup job.
|
19
19
|
BACKUPJOBAUTORETENTION_AUTOMATIC = 0
|
@@ -264,7 +264,7 @@ module Comet
|
|
264
264
|
# JobStatus: If the BackupJobDetail.Status field is a 5xxx code, the job has stopped for a successful reason.
|
265
265
|
JOB_STATUS_STOP_SUCCESS__MIN = 5000
|
266
266
|
|
267
|
-
# JobStatus
|
267
|
+
# JobStatus: The job is complete and was successful.
|
268
268
|
JOB_STATUS_STOP_SUCCESS = 5000
|
269
269
|
|
270
270
|
# JobStatus
|
@@ -276,10 +276,10 @@ module Comet
|
|
276
276
|
# JobStatus: Unused
|
277
277
|
JOB_STATUS_RUNNING_INDETERMINATE = 6000
|
278
278
|
|
279
|
-
# JobStatus
|
279
|
+
# JobStatus: The last information the server received from the device is that the job is currently running.
|
280
280
|
JOB_STATUS_RUNNING_ACTIVE = 6001
|
281
281
|
|
282
|
-
# JobStatus:
|
282
|
+
# JobStatus: The job was thought to have been in an Abandoned state but updated the Comet Server with a running status.
|
283
283
|
JOB_STATUS_RUNNING_REVIVED = 6002
|
284
284
|
|
285
285
|
# JobStatus
|
@@ -291,25 +291,25 @@ module Comet
|
|
291
291
|
# JobStatus
|
292
292
|
JOB_STATUS_FAILED_TIMEOUT = 7000
|
293
293
|
|
294
|
-
# JobStatus
|
294
|
+
# JobStatus: The job is complete but there was a problem that may have resulted in issues with the expected result.
|
295
295
|
JOB_STATUS_FAILED_WARNING = 7001
|
296
296
|
|
297
|
-
# JobStatus
|
297
|
+
# JobStatus: There was an error during the job and it did not fully complete.
|
298
298
|
JOB_STATUS_FAILED_ERROR = 7002
|
299
299
|
|
300
|
-
# JobStatus
|
300
|
+
# JobStatus: During a backup job either the "All protected items" quota or "Storage Vault" quota was exceeded.
|
301
301
|
JOB_STATUS_FAILED_QUOTA = 7003
|
302
302
|
|
303
|
-
# JobStatus
|
303
|
+
# JobStatus: The job did not start at its scheduled time.
|
304
304
|
JOB_STATUS_FAILED_SCHEDULEMISSED = 7004
|
305
305
|
|
306
|
-
# JobStatus
|
306
|
+
# JobStatus: The job was cancelled manually, a device shutdown was detected, or the backup time limit was reached.
|
307
307
|
JOB_STATUS_FAILED_CANCELLED = 7005
|
308
308
|
|
309
|
-
# JobStatus
|
309
|
+
# JobStatus: The backup job was skipped as there was already a backup running and the "Skip if already running" option was enabled.
|
310
310
|
JOB_STATUS_FAILED_SKIPALREADYRUNNING = 7006
|
311
311
|
|
312
|
-
# JobStatus
|
312
|
+
# JobStatus: The job has stopped unexpectedly or has been manually marked as abandoned by an admin.
|
313
313
|
JOB_STATUS_FAILED_ABANDONED = 7007
|
314
314
|
|
315
315
|
# JobStatus
|
@@ -361,6 +361,12 @@ module Comet
|
|
361
361
|
# MSSQLRestoreOpt
|
362
362
|
MSSQL_RESTORE_NORECOVERY = 'NO_RECOVERY'
|
363
363
|
|
364
|
+
OBJECT_LOCK_LEGACY = 0
|
365
|
+
|
366
|
+
OBJECT_LOCK_ON = 1
|
367
|
+
|
368
|
+
OBJECT_LOCK_OFF = 2
|
369
|
+
|
364
370
|
OFFICE365_REGION_PUBLIC = 'GlobalPublicCloud'
|
365
371
|
|
366
372
|
OFFICE365_REGION_CHINA = 'ChinaCloud'
|
@@ -829,6 +835,12 @@ module Comet
|
|
829
835
|
# StreamableEventType: Device live connection ended
|
830
836
|
SEVT_DEVICE_LIVE_DISCONNECT = 4703
|
831
837
|
|
838
|
+
# StreamableEventType: Device connected to registration lobby
|
839
|
+
SEVT_DEVICE_LOBBY_CONNECT = 4704
|
840
|
+
|
841
|
+
# StreamableEventType: Device disconnected from registration lobby
|
842
|
+
SEVT_DEVICE_LOBBY_DISCONNECT = 4705
|
843
|
+
|
832
844
|
# StreamableEventType
|
833
845
|
SEVT__MAX = 4999
|
834
846
|
|
@@ -958,6 +970,8 @@ module Comet
|
|
958
970
|
# UpdateStatus: The device has successfully updated to the target version.
|
959
971
|
UPDATESTATUS_UPDATE_CONFIRMED = 5
|
960
972
|
|
973
|
+
USERNAME_MAX_LENGTH = 255
|
974
|
+
|
961
975
|
# If an API response returns in failure, but it includes this value in the CometAPIResponseMessage->Message parameter, it indicates that the specified Device ID was invalid or not found.
|
962
976
|
UNKNOWN_DEVICE_ERROR = 'ERR_UNKNOWN_DEVICE'
|
963
977
|
|
@@ -21,8 +21,11 @@ module Comet
|
|
21
21
|
# @type [String] secret_key
|
22
22
|
attr_accessor :secret_key
|
23
23
|
|
24
|
-
# @type [Boolean]
|
25
|
-
attr_accessor :
|
24
|
+
# @type [Boolean] use_object_lock__legacy__do_not_use
|
25
|
+
attr_accessor :use_object_lock__legacy__do_not_use
|
26
|
+
|
27
|
+
# @type [Number] object_lock_mode
|
28
|
+
attr_accessor :object_lock_mode
|
26
29
|
|
27
30
|
# @type [Number] object_lock_days
|
28
31
|
attr_accessor :object_lock_days
|
@@ -41,6 +44,7 @@ module Comet
|
|
41
44
|
@master_bucket = ''
|
42
45
|
@access_key = ''
|
43
46
|
@secret_key = ''
|
47
|
+
@object_lock_mode = 0
|
44
48
|
@object_lock_days = 0
|
45
49
|
@unknown_json_fields = {}
|
46
50
|
end
|
@@ -71,7 +75,11 @@ module Comet
|
|
71
75
|
|
72
76
|
@secret_key = v
|
73
77
|
when 'UseObjectLock'
|
74
|
-
@
|
78
|
+
@use_object_lock__legacy__do_not_use = v
|
79
|
+
when 'ObjectLockMode'
|
80
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
81
|
+
|
82
|
+
@object_lock_mode = v
|
75
83
|
when 'ObjectLockDays'
|
76
84
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
77
85
|
|
@@ -90,7 +98,8 @@ module Comet
|
|
90
98
|
ret['MasterBucket'] = @master_bucket
|
91
99
|
ret['AccessKey'] = @access_key
|
92
100
|
ret['SecretKey'] = @secret_key
|
93
|
-
ret['UseObjectLock'] = @
|
101
|
+
ret['UseObjectLock'] = @use_object_lock__legacy__do_not_use
|
102
|
+
ret['ObjectLockMode'] = @object_lock_mode
|
94
103
|
ret['ObjectLockDays'] = @object_lock_days
|
95
104
|
ret['RemoveDeleted'] = @remove_deleted
|
96
105
|
@unknown_json_fields.each do |k, v|
|
@@ -77,6 +77,9 @@ module Comet
|
|
77
77
|
# @type [Boolean] s3remove_deleted
|
78
78
|
attr_accessor :s3remove_deleted
|
79
79
|
|
80
|
+
# @type [Number] s3object_lock_mode
|
81
|
+
attr_accessor :s3object_lock_mode
|
82
|
+
|
80
83
|
# @type [Number] s3object_lock_days
|
81
84
|
attr_accessor :s3object_lock_days
|
82
85
|
|
@@ -264,6 +267,7 @@ module Comet
|
|
264
267
|
@s3bucket_name = ''
|
265
268
|
@s3subdir = ''
|
266
269
|
@s3custom_region = ''
|
270
|
+
@s3object_lock_mode = 0
|
267
271
|
@s3object_lock_days = 0
|
268
272
|
@sftpserver = ''
|
269
273
|
@sftpusername = ''
|
@@ -406,6 +410,10 @@ module Comet
|
|
406
410
|
@s3uses_v2signing = v
|
407
411
|
when 'S3RemoveDeleted'
|
408
412
|
@s3remove_deleted = v
|
413
|
+
when 'S3ObjectLockMode'
|
414
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
415
|
+
|
416
|
+
@s3object_lock_mode = v
|
409
417
|
when 'S3ObjectLockDays'
|
410
418
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
411
419
|
|
@@ -586,6 +594,7 @@ module Comet
|
|
586
594
|
ret['S3CustomRegion'] = @s3custom_region
|
587
595
|
ret['S3UsesV2Signing'] = @s3uses_v2signing
|
588
596
|
ret['S3RemoveDeleted'] = @s3remove_deleted
|
597
|
+
ret['S3ObjectLockMode'] = @s3object_lock_mode
|
589
598
|
ret['S3ObjectLockDays'] = @s3object_lock_days
|
590
599
|
ret['SFTPServer'] = @sftpserver
|
591
600
|
ret['SFTPUsername'] = @sftpusername
|
@@ -57,6 +57,9 @@ module Comet
|
|
57
57
|
# @type [Boolean] s3remove_deleted
|
58
58
|
attr_accessor :s3remove_deleted
|
59
59
|
|
60
|
+
# @type [Number] s3object_lock_mode
|
61
|
+
attr_accessor :s3object_lock_mode
|
62
|
+
|
60
63
|
# @type [Number] s3object_lock_days
|
61
64
|
attr_accessor :s3object_lock_days
|
62
65
|
|
@@ -205,6 +208,7 @@ module Comet
|
|
205
208
|
@s3bucket_name = ''
|
206
209
|
@s3subdir = ''
|
207
210
|
@s3custom_region = ''
|
211
|
+
@s3object_lock_mode = 0
|
208
212
|
@s3object_lock_days = 0
|
209
213
|
@sftpserver = ''
|
210
214
|
@sftpusername = ''
|
@@ -296,6 +300,10 @@ module Comet
|
|
296
300
|
@s3uses_v2signing = v
|
297
301
|
when 'S3RemoveDeleted'
|
298
302
|
@s3remove_deleted = v
|
303
|
+
when 'S3ObjectLockMode'
|
304
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
305
|
+
|
306
|
+
@s3object_lock_mode = v
|
299
307
|
when 'S3ObjectLockDays'
|
300
308
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
301
309
|
|
@@ -444,6 +452,7 @@ module Comet
|
|
444
452
|
ret['S3CustomRegion'] = @s3custom_region
|
445
453
|
ret['S3UsesV2Signing'] = @s3uses_v2signing
|
446
454
|
ret['S3RemoveDeleted'] = @s3remove_deleted
|
455
|
+
ret['S3ObjectLockMode'] = @s3object_lock_mode
|
447
456
|
ret['S3ObjectLockDays'] = @s3object_lock_days
|
448
457
|
ret['SFTPServer'] = @sftpserver
|
449
458
|
ret['SFTPUsername'] = @sftpusername
|
@@ -18,6 +18,9 @@ module Comet
|
|
18
18
|
# @type [String] password
|
19
19
|
attr_accessor :password
|
20
20
|
|
21
|
+
# @type [String] totpcode
|
22
|
+
attr_accessor :totpcode
|
23
|
+
|
21
24
|
# @type [String] server
|
22
25
|
attr_accessor :server
|
23
26
|
|
@@ -34,6 +37,7 @@ module Comet
|
|
34
37
|
def clear
|
35
38
|
@username = ''
|
36
39
|
@password = ''
|
40
|
+
@totpcode = ''
|
37
41
|
@server = ''
|
38
42
|
@unknown_json_fields = {}
|
39
43
|
end
|
@@ -59,6 +63,10 @@ module Comet
|
|
59
63
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
60
64
|
|
61
65
|
@password = v
|
66
|
+
when 'TOTPCode'
|
67
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
68
|
+
|
69
|
+
@totpcode = v
|
62
70
|
when 'Server'
|
63
71
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
64
72
|
|
@@ -76,6 +84,7 @@ module Comet
|
|
76
84
|
ret = {}
|
77
85
|
ret['Username'] = @username
|
78
86
|
ret['Password'] = @password
|
87
|
+
ret['TOTPCode'] = @totpcode
|
79
88
|
ret['Server'] = @server
|
80
89
|
ret['AutoLogin'] = @auto_login
|
81
90
|
@unknown_json_fields.each do |k, v|
|
@@ -31,6 +31,9 @@ module Comet
|
|
31
31
|
# @type [String] url
|
32
32
|
attr_accessor :url
|
33
33
|
|
34
|
+
# @type [Comet::PSAGroupedBy] grouped_by
|
35
|
+
attr_accessor :grouped_by
|
36
|
+
|
34
37
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
35
38
|
attr_accessor :unknown_json_fields
|
36
39
|
|
@@ -43,6 +46,7 @@ module Comet
|
|
43
46
|
@partner_key = ''
|
44
47
|
@type = 0
|
45
48
|
@url = ''
|
49
|
+
@grouped_by = Comet::PSAGroupedBy.new
|
46
50
|
@unknown_json_fields = {}
|
47
51
|
end
|
48
52
|
|
@@ -84,6 +88,9 @@ module Comet
|
|
84
88
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
85
89
|
|
86
90
|
@url = v
|
91
|
+
when 'GroupedBy'
|
92
|
+
@grouped_by = Comet::PSAGroupedBy.new
|
93
|
+
@grouped_by.from_hash(v)
|
87
94
|
else
|
88
95
|
@unknown_json_fields[k] = v
|
89
96
|
end
|
@@ -102,6 +109,7 @@ module Comet
|
|
102
109
|
end
|
103
110
|
ret['Type'] = @type
|
104
111
|
ret['URL'] = @url
|
112
|
+
ret['GroupedBy'] = @grouped_by
|
105
113
|
@unknown_json_fields.each do |k, v|
|
106
114
|
ret[k] = v
|
107
115
|
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2023 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
|
8
|
+
require 'json'
|
9
|
+
|
10
|
+
module Comet
|
11
|
+
|
12
|
+
# PSAGroupedBy is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class PSAGroupedBy
|
14
|
+
|
15
|
+
# @type [Boolean] users
|
16
|
+
attr_accessor :users
|
17
|
+
|
18
|
+
# @type [Boolean] tenants
|
19
|
+
attr_accessor :tenants
|
20
|
+
|
21
|
+
# @type [Boolean] account_name
|
22
|
+
attr_accessor :account_name
|
23
|
+
|
24
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
25
|
+
attr_accessor :unknown_json_fields
|
26
|
+
|
27
|
+
def initialize
|
28
|
+
clear
|
29
|
+
end
|
30
|
+
|
31
|
+
def clear
|
32
|
+
@unknown_json_fields = {}
|
33
|
+
end
|
34
|
+
|
35
|
+
# @param [String] json_string The complete object in JSON format
|
36
|
+
def from_json(json_string)
|
37
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
38
|
+
|
39
|
+
from_hash(JSON.parse(json_string))
|
40
|
+
end
|
41
|
+
|
42
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
43
|
+
def from_hash(obj)
|
44
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
45
|
+
|
46
|
+
obj.each do |k, v|
|
47
|
+
case k
|
48
|
+
when 'Users'
|
49
|
+
@users = v
|
50
|
+
when 'Tenants'
|
51
|
+
@tenants = v
|
52
|
+
when 'AccountName'
|
53
|
+
@account_name = v
|
54
|
+
else
|
55
|
+
@unknown_json_fields[k] = v
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# @return [Hash] The complete object as a Ruby hash
|
61
|
+
def to_hash
|
62
|
+
ret = {}
|
63
|
+
ret['Users'] = @users
|
64
|
+
ret['Tenants'] = @tenants
|
65
|
+
ret['AccountName'] = @account_name
|
66
|
+
@unknown_json_fields.each do |k, v|
|
67
|
+
ret[k] = v
|
68
|
+
end
|
69
|
+
ret
|
70
|
+
end
|
71
|
+
|
72
|
+
# @return [Hash] The complete object as a Ruby hash
|
73
|
+
def to_h
|
74
|
+
to_hash
|
75
|
+
end
|
76
|
+
|
77
|
+
# @return [String] The complete object as a JSON string
|
78
|
+
def to_json(options = {})
|
79
|
+
to_hash.to_json(options)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2023 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
|
8
|
+
require 'json'
|
9
|
+
|
10
|
+
module Comet
|
11
|
+
|
12
|
+
# RegistrationLobbyConnection is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class RegistrationLobbyConnection
|
14
|
+
|
15
|
+
# @type [String] device_id
|
16
|
+
attr_accessor :device_id
|
17
|
+
|
18
|
+
# @type [String] organization_id
|
19
|
+
attr_accessor :organization_id
|
20
|
+
|
21
|
+
# @type [String] friendly_name
|
22
|
+
attr_accessor :friendly_name
|
23
|
+
|
24
|
+
# @type [String] reported_version
|
25
|
+
attr_accessor :reported_version
|
26
|
+
|
27
|
+
# @type [String] reported_platform
|
28
|
+
attr_accessor :reported_platform
|
29
|
+
|
30
|
+
# @type [Comet::OSInfo] reported_platform_version
|
31
|
+
attr_accessor :reported_platform_version
|
32
|
+
|
33
|
+
# @type [String] device_time_zone
|
34
|
+
attr_accessor :device_time_zone
|
35
|
+
|
36
|
+
# @type [String] ipaddress
|
37
|
+
attr_accessor :ipaddress
|
38
|
+
|
39
|
+
# @type [Number] connection_time
|
40
|
+
attr_accessor :connection_time
|
41
|
+
|
42
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
43
|
+
attr_accessor :unknown_json_fields
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
clear
|
47
|
+
end
|
48
|
+
|
49
|
+
def clear
|
50
|
+
@device_id = ''
|
51
|
+
@organization_id = ''
|
52
|
+
@friendly_name = ''
|
53
|
+
@reported_version = ''
|
54
|
+
@reported_platform = ''
|
55
|
+
@reported_platform_version = Comet::OSInfo.new
|
56
|
+
@device_time_zone = ''
|
57
|
+
@ipaddress = ''
|
58
|
+
@connection_time = 0
|
59
|
+
@unknown_json_fields = {}
|
60
|
+
end
|
61
|
+
|
62
|
+
# @param [String] json_string The complete object in JSON format
|
63
|
+
def from_json(json_string)
|
64
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
65
|
+
|
66
|
+
from_hash(JSON.parse(json_string))
|
67
|
+
end
|
68
|
+
|
69
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
70
|
+
def from_hash(obj)
|
71
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
72
|
+
|
73
|
+
obj.each do |k, v|
|
74
|
+
case k
|
75
|
+
when 'DeviceID'
|
76
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
77
|
+
|
78
|
+
@device_id = v
|
79
|
+
when 'OrganizationID'
|
80
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
81
|
+
|
82
|
+
@organization_id = v
|
83
|
+
when 'FriendlyName'
|
84
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
85
|
+
|
86
|
+
@friendly_name = v
|
87
|
+
when 'ReportedVersion'
|
88
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
89
|
+
|
90
|
+
@reported_version = v
|
91
|
+
when 'ReportedPlatform'
|
92
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
93
|
+
|
94
|
+
@reported_platform = v
|
95
|
+
when 'ReportedPlatformVersion'
|
96
|
+
@reported_platform_version = Comet::OSInfo.new
|
97
|
+
@reported_platform_version.from_hash(v)
|
98
|
+
when 'DeviceTimeZone'
|
99
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
100
|
+
|
101
|
+
@device_time_zone = v
|
102
|
+
when 'IPAddress'
|
103
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
104
|
+
|
105
|
+
@ipaddress = v
|
106
|
+
when 'ConnectionTime'
|
107
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
108
|
+
|
109
|
+
@connection_time = v
|
110
|
+
else
|
111
|
+
@unknown_json_fields[k] = v
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
# @return [Hash] The complete object as a Ruby hash
|
117
|
+
def to_hash
|
118
|
+
ret = {}
|
119
|
+
ret['DeviceID'] = @device_id
|
120
|
+
ret['OrganizationID'] = @organization_id
|
121
|
+
ret['FriendlyName'] = @friendly_name
|
122
|
+
ret['ReportedVersion'] = @reported_version
|
123
|
+
ret['ReportedPlatform'] = @reported_platform
|
124
|
+
unless @reported_platform_version.nil?
|
125
|
+
ret['ReportedPlatformVersion'] = @reported_platform_version
|
126
|
+
end
|
127
|
+
unless @device_time_zone.nil?
|
128
|
+
ret['DeviceTimeZone'] = @device_time_zone
|
129
|
+
end
|
130
|
+
unless @ipaddress.nil?
|
131
|
+
ret['IPAddress'] = @ipaddress
|
132
|
+
end
|
133
|
+
ret['ConnectionTime'] = @connection_time
|
134
|
+
@unknown_json_fields.each do |k, v|
|
135
|
+
ret[k] = v
|
136
|
+
end
|
137
|
+
ret
|
138
|
+
end
|
139
|
+
|
140
|
+
# @return [Hash] The complete object as a Ruby hash
|
141
|
+
def to_h
|
142
|
+
to_hash
|
143
|
+
end
|
144
|
+
|
145
|
+
# @return [String] The complete object as a JSON string
|
146
|
+
def to_json(options = {})
|
147
|
+
to_hash.to_json(options)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -40,6 +40,9 @@ module Comet
|
|
40
40
|
# @type [Boolean] s3remove_deleted
|
41
41
|
attr_accessor :s3remove_deleted
|
42
42
|
|
43
|
+
# @type [Number] s3object_lock_mode
|
44
|
+
attr_accessor :s3object_lock_mode
|
45
|
+
|
43
46
|
# @type [Number] s3object_lock_days
|
44
47
|
attr_accessor :s3object_lock_days
|
45
48
|
|
@@ -57,6 +60,7 @@ module Comet
|
|
57
60
|
@s3bucket_name = ''
|
58
61
|
@s3subdir = ''
|
59
62
|
@s3custom_region = ''
|
63
|
+
@s3object_lock_mode = 0
|
60
64
|
@s3object_lock_days = 0
|
61
65
|
@unknown_json_fields = {}
|
62
66
|
end
|
@@ -104,6 +108,10 @@ module Comet
|
|
104
108
|
@s3uses_v2signing = v
|
105
109
|
when 'S3RemoveDeleted'
|
106
110
|
@s3remove_deleted = v
|
111
|
+
when 'S3ObjectLockMode'
|
112
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
113
|
+
|
114
|
+
@s3object_lock_mode = v
|
107
115
|
when 'S3ObjectLockDays'
|
108
116
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
109
117
|
|
@@ -126,6 +134,7 @@ module Comet
|
|
126
134
|
ret['S3CustomRegion'] = @s3custom_region
|
127
135
|
ret['S3UsesV2Signing'] = @s3uses_v2signing
|
128
136
|
ret['S3RemoveDeleted'] = @s3remove_deleted
|
137
|
+
ret['S3ObjectLockMode'] = @s3object_lock_mode
|
129
138
|
ret['S3ObjectLockDays'] = @s3object_lock_days
|
130
139
|
@unknown_json_fields.each do |k, v|
|
131
140
|
ret[k] = v
|
@@ -27,8 +27,11 @@ module Comet
|
|
27
27
|
# @type [String] secret_key
|
28
28
|
attr_accessor :secret_key
|
29
29
|
|
30
|
-
# @type [Boolean]
|
31
|
-
attr_accessor :
|
30
|
+
# @type [Boolean] use_object_lock__legacy__do_not_use
|
31
|
+
attr_accessor :use_object_lock__legacy__do_not_use
|
32
|
+
|
33
|
+
# @type [Number] object_lock_mode
|
34
|
+
attr_accessor :object_lock_mode
|
32
35
|
|
33
36
|
# @type [Number] object_lock_days
|
34
37
|
attr_accessor :object_lock_days
|
@@ -49,6 +52,7 @@ module Comet
|
|
49
52
|
@master_bucket = ''
|
50
53
|
@access_key = ''
|
51
54
|
@secret_key = ''
|
55
|
+
@object_lock_mode = 0
|
52
56
|
@object_lock_days = 0
|
53
57
|
@unknown_json_fields = {}
|
54
58
|
end
|
@@ -87,7 +91,11 @@ module Comet
|
|
87
91
|
|
88
92
|
@secret_key = v
|
89
93
|
when 'UseObjectLock'
|
90
|
-
@
|
94
|
+
@use_object_lock__legacy__do_not_use = v
|
95
|
+
when 'ObjectLockMode'
|
96
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
97
|
+
|
98
|
+
@object_lock_mode = v
|
91
99
|
when 'ObjectLockDays'
|
92
100
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
93
101
|
|
@@ -108,7 +116,8 @@ module Comet
|
|
108
116
|
ret['MasterBucket'] = @master_bucket
|
109
117
|
ret['AccessKey'] = @access_key
|
110
118
|
ret['SecretKey'] = @secret_key
|
111
|
-
ret['UseObjectLock'] = @
|
119
|
+
ret['UseObjectLock'] = @use_object_lock__legacy__do_not_use
|
120
|
+
ret['ObjectLockMode'] = @object_lock_mode
|
112
121
|
ret['ObjectLockDays'] = @object_lock_days
|
113
122
|
ret['RemoveDeleted'] = @remove_deleted
|
114
123
|
@unknown_json_fields.each do |k, v|
|
@@ -21,8 +21,11 @@ module Comet
|
|
21
21
|
# @type [String] secret_key
|
22
22
|
attr_accessor :secret_key
|
23
23
|
|
24
|
-
# @type [Boolean]
|
25
|
-
attr_accessor :
|
24
|
+
# @type [Boolean] use_object_lock__legacy__do_not_use
|
25
|
+
attr_accessor :use_object_lock__legacy__do_not_use
|
26
|
+
|
27
|
+
# @type [Number] object_lock_mode
|
28
|
+
attr_accessor :object_lock_mode
|
26
29
|
|
27
30
|
# @type [Number] object_lock_days
|
28
31
|
attr_accessor :object_lock_days
|
@@ -41,6 +44,7 @@ module Comet
|
|
41
44
|
@master_bucket = ''
|
42
45
|
@access_key = ''
|
43
46
|
@secret_key = ''
|
47
|
+
@object_lock_mode = 0
|
44
48
|
@object_lock_days = 0
|
45
49
|
@unknown_json_fields = {}
|
46
50
|
end
|
@@ -71,7 +75,11 @@ module Comet
|
|
71
75
|
|
72
76
|
@secret_key = v
|
73
77
|
when 'UseObjectLock'
|
74
|
-
@
|
78
|
+
@use_object_lock__legacy__do_not_use = v
|
79
|
+
when 'ObjectLockMode'
|
80
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
81
|
+
|
82
|
+
@object_lock_mode = v
|
75
83
|
when 'ObjectLockDays'
|
76
84
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
77
85
|
|
@@ -90,7 +98,8 @@ module Comet
|
|
90
98
|
ret['MasterBucket'] = @master_bucket
|
91
99
|
ret['AccessKey'] = @access_key
|
92
100
|
ret['SecretKey'] = @secret_key
|
93
|
-
ret['UseObjectLock'] = @
|
101
|
+
ret['UseObjectLock'] = @use_object_lock__legacy__do_not_use
|
102
|
+
ret['ObjectLockMode'] = @object_lock_mode
|
94
103
|
ret['ObjectLockDays'] = @object_lock_days
|
95
104
|
ret['RemoveDeleted'] = @remove_deleted
|
96
105
|
@unknown_json_fields.each do |k, v|
|
@@ -116,11 +116,13 @@ require_relative 'comet/models/partition'
|
|
116
116
|
require_relative 'comet/models/private_branding_properties'
|
117
117
|
require_relative 'comet/models/protected_item_engine_type_policy'
|
118
118
|
require_relative 'comet/models/psaconfig'
|
119
|
+
require_relative 'comet/models/psagrouped_by'
|
119
120
|
require_relative 'comet/models/public_branding_properties'
|
120
121
|
require_relative 'comet/models/ratelimit_options'
|
121
122
|
require_relative 'comet/models/ratelimit_rule'
|
122
123
|
require_relative 'comet/models/register_office_application_begin_response'
|
123
124
|
require_relative 'comet/models/register_office_application_check_response'
|
125
|
+
require_relative 'comet/models/registration_lobby_connection'
|
124
126
|
require_relative 'comet/models/remote_server_address'
|
125
127
|
require_relative 'comet/models/remote_storage_option'
|
126
128
|
require_relative 'comet/models/replica_server'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comet_backup_ruby_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Comet Licensing Ltd.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -194,11 +194,13 @@ files:
|
|
194
194
|
- lib/comet/models/private_branding_properties.rb
|
195
195
|
- lib/comet/models/protected_item_engine_type_policy.rb
|
196
196
|
- lib/comet/models/psaconfig.rb
|
197
|
+
- lib/comet/models/psagrouped_by.rb
|
197
198
|
- lib/comet/models/public_branding_properties.rb
|
198
199
|
- lib/comet/models/ratelimit_options.rb
|
199
200
|
- lib/comet/models/ratelimit_rule.rb
|
200
201
|
- lib/comet/models/register_office_application_begin_response.rb
|
201
202
|
- lib/comet/models/register_office_application_check_response.rb
|
203
|
+
- lib/comet/models/registration_lobby_connection.rb
|
202
204
|
- lib/comet/models/remote_server_address.rb
|
203
205
|
- lib/comet/models/remote_storage_option.rb
|
204
206
|
- lib/comet/models/replica_server.rb
|