comet_backup_ruby_sdk 1.12.0 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69a41caa98a2a94326271b4b1ee4f2d7f61e98b0d62c1964ac1707e1984dca72
4
- data.tar.gz: 3dce1759fcc473dcd64b592cfab33633ae31fe619ea07b0a9e13719c7981e5da
3
+ metadata.gz: 856c001592ef3dad994ed3d321f8fa68e9f01829770a33117f688a4d22312801
4
+ data.tar.gz: b31ac9bbebfd4b3696d079b15ede4fcab8c7a927e087f84651861714a38a8172
5
5
  SHA512:
6
- metadata.gz: b3f505381b2cd44a90667f1de2f8fa6d4b99cffeb106e271eac055545ea7f51c57c948077baabb52025b120ded6efe0bd1bbbcf3df5b3dceabc84960b5040a3f
7
- data.tar.gz: 4a3588488fb2a2da49662460438c0e8d85f7f57cb7fdd654199c30fe6c4bfd820e418872a8f0f751c1a7094d0d6b0754809c4fcb94cf98846cbbe3810eb341a0
6
+ metadata.gz: 1cf63478b5051ef36b844cbc82c8f20344e27a12e73898aec44e7f31f09a1cbd07e9d17ab58c0d1685de10716467d4643d90662208a331c0a3ec99eb0c96cfa2
7
+ data.tar.gz: ee74bad01ce9338fa8536c02a38a66e9d8838b1dfe5560b1180163f978a81a75a8c438b885a95f6c4049d15cf26908ca60146b9b51689da4e5ef12f18454c24b
data/CHANGELOG.md CHANGED
@@ -1,8 +1,30 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2022-06-03 v1.15.0
4
+ - Based on 22.5.0
5
+ - Add `COMPRESS_*` compression settings for Self-Backups
6
+ - Add `RESTOREARCHIVEFORMAT_TARZSTD` for using the tar.zst archive restore format
7
+ - Add `target_organization` parameter to support cross-tenant operations in some API methods
8
+
9
+ ## 2022-05-25 v1.14.0
10
+ - Based on 22.3.7
11
+ - Add new `REMOTESERVER_S3_GENERIC` `RemoteServerType`
12
+ - add new `S3GenericVirtualStorageRole` support to the `RemoteServerAddress`
13
+
14
+ ## 2022-05-10 v1.13.0
15
+ - Based on 22.3.5
16
+ - Add new `RestrictRuntime`, `FromTime`, `ToTime`, `RestrictDays`, `DaysSelect` types to ScheduleConfig to add time and day restrictions in a hourly schedule.
17
+ - Add new `TotalVmCount` to `BackupJobDetail` API.
18
+ - Add new fields to `MacOSCodeSignProperties` to support code signing.
19
+ - Add new `ForceUpgradeRunning`, `ApplyDeviceFilter`, and `DeviceFilter` fields to `UpdateCampaign` types to support sending a bulk upgrade to a custom query of users
20
+ - Add new `AdminBrandingGenerateClientSpkDsm6` and `AdminBrandingGenerateClientSpkDsm7` APIs and associated types for generating and downloading Synology SPKs
21
+ - Add new `PathAppIconImage` field to branding options types to support branding of the app icon when installed in Synology's Package Center (and other software managers)
22
+ - Add new constants for VMDK single file restore
23
+
3
24
  ## 2022-01-28 v1.12.0
4
25
  - Based on 21.12.4
5
26
  - Add `AdminStoragePingDestination` API to perform a server-side Test Connections action when configuring Storage Role
27
+ - Add `DestinationSize*` on `BackupJobDetail` struct, to track Storage Vault size measurements taken as part of jobs
6
28
  - Add `HasLicense` on `Office365MixedVirtualAccount` struct, and add `TotalLicensedMailsCount` and `TotalUnlicensedMailsCount` on `BackupJobDetail` struct, to track Office 365 license usage
7
29
  - Add `AdminWebAuthnRegistration` new `Type` field and `WEBAUTHN_DEVICE_TYPE` constants, to determine the type of hardware WebAuthn device
8
30
  - Add deprecation comments to U2F types (use WebAuthn instead), to `B2DestinationLocation.MaxConnections`, and to `Office365CustomSetting` (use Office365CustomSettingV2 instead)
data/Gemfile CHANGED
File without changes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (1.12.0)
4
+ comet_backup_ruby_sdk (1.14.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
@@ -81,8 +81,9 @@ end
81
81
 
82
82
  ### Running SDK test suite
83
83
 
84
- ```ruby
85
- bundle exec rake rubocop
84
+ ```bash
85
+ # safe formatting/fixing and linting
86
+ bundle exec rake rubocop -a
86
87
 
87
88
  COMETSERVER_ADDRESS='http://127.0.0.1:8060' \
88
89
  COMETSERVER_ADMINUSER=admin \
data/Rakefile CHANGED
File without changes
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
12
12
 
13
13
  Gem::Specification.new do |spec|
14
14
  spec.name = 'comet_backup_ruby_sdk'
15
- spec.version = '1.12.0'
15
+ spec.version = '1.15.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -314,8 +314,9 @@ module Comet
314
314
  # @param [String] target_password New account password
315
315
  # @param [Number] store_recovery_code (Optional) If set to 1, store and keep a password recovery code for the generated user (>= 18.3.9)
316
316
  # @param [Number] require_password_change (Optional) If set to 1, require to reset password at the first login for the generated user (>= 20.3.4)
317
+ # @param [String] target_organization (Optional) If present, create the user account on behalf of another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)
317
318
  # @return [Comet::CometAPIResponseMessage]
318
- def admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil)
319
+ def admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil, target_organization = nil)
319
320
  submit_params = {}
320
321
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
321
322
 
@@ -333,6 +334,11 @@ module Comet
333
334
 
334
335
  submit_params['RequirePasswordChange'] = require_password_change
335
336
  end
337
+ unless target_organization.nil?
338
+ raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String
339
+
340
+ submit_params['TargetOrganization'] = target_organization
341
+ end
336
342
 
337
343
  body = perform_request('api/v1/admin/add-user', submit_params)
338
344
  json_body = JSON.parse body
@@ -352,8 +358,9 @@ module Comet
352
358
  #
353
359
  # @param [String] target_user New account username
354
360
  # @param [Comet::UserProfileConfig] profile_data New account profile
361
+ # @param [String] target_organization (Optional) If present, create the user account on behalf of another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)
355
362
  # @return [Comet::CometAPIResponseMessage]
356
- def admin_add_user_from_profile(target_user, profile_data)
363
+ def admin_add_user_from_profile(target_user, profile_data, target_organization = nil)
357
364
  submit_params = {}
358
365
  raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
359
366
 
@@ -361,6 +368,11 @@ module Comet
361
368
  raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
362
369
 
363
370
  submit_params['ProfileData'] = profile_data.to_json
371
+ unless target_organization.nil?
372
+ raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String
373
+
374
+ submit_params['TargetOrganization'] = target_organization
375
+ end
364
376
 
365
377
  body = perform_request('api/v1/admin/add-user-from-profile', submit_params)
366
378
  json_body = JSON.parse body
@@ -551,6 +563,52 @@ module Comet
551
563
  perform_request('api/v1/admin/branding/generate-client/macos-x86_64', submit_params)
552
564
  end
553
565
 
566
+ # AdminBrandingGenerateClientSpkDsm6
567
+ #
568
+ # Download software (Synology SPK for DSM 6).
569
+ #
570
+ # This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads.
571
+ # This API requires the Software Build Role to be enabled.
572
+ # This API requires the Auth Role to be enabled.
573
+ #
574
+ # @param [String] self_address (Optional) The external URL of this server, used to resolve conflicts
575
+ # @return [String]
576
+ def admin_branding_generate_client_spk_dsm_6(self_address = nil)
577
+ submit_params = {}
578
+ if self_address.nil?
579
+ submit_params['SelfAddress'] = @server_address
580
+ else
581
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
582
+
583
+ submit_params['SelfAddress'] = self_address
584
+ end
585
+
586
+ perform_request('api/v1/admin/branding/generate-client/spk-dsm6', submit_params)
587
+ end
588
+
589
+ # AdminBrandingGenerateClientSpkDsm7
590
+ #
591
+ # Download software (Synology SPK for DSM 7).
592
+ #
593
+ # This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads.
594
+ # This API requires the Software Build Role to be enabled.
595
+ # This API requires the Auth Role to be enabled.
596
+ #
597
+ # @param [String] self_address (Optional) The external URL of this server, used to resolve conflicts
598
+ # @return [String]
599
+ def admin_branding_generate_client_spk_dsm_7(self_address = nil)
600
+ submit_params = {}
601
+ if self_address.nil?
602
+ submit_params['SelfAddress'] = @server_address
603
+ else
604
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
605
+
606
+ submit_params['SelfAddress'] = self_address
607
+ end
608
+
609
+ perform_request('api/v1/admin/branding/generate-client/spk-dsm7', submit_params)
610
+ end
611
+
554
612
  # AdminBrandingGenerateClientTest
555
613
  #
556
614
  # Check if a software download is available.
@@ -828,8 +886,10 @@ module Comet
828
886
 
829
887
  # AdminCreateInstallToken
830
888
  #
831
- # Create token for silent installation (Windows only).
889
+ # Create token for silent installation.
890
+ # Currently only supported for Windows & macOS only
832
891
  # Provide the installation token to silently install the client on windows `install.exe /TOKEN=<installtoken>`
892
+ # Provide the installation token to silently install the client on Mac OS `sudo launchctl setenv BACKUP_APP_TOKEN "installtoken" && sudo /usr/sbin/installer -allowUntrusted -pkg "Comet Backup.pkg" -target /`
833
893
  #
834
894
  # You must supply administrator authentication credentials to use this API.
835
895
  # This API requires the Auth Role to be enabled.
@@ -1631,9 +1691,10 @@ module Comet
1631
1691
  # @param [String] target_id The live connection GUID
1632
1692
  # @param [String] destination The Storage Vault ID
1633
1693
  # @param [String] snapshot_id The selected backup job snapshot
1634
- # @param [String] tree_id (Optional) Browse objects inside subdirectory of backup snapshot
1694
+ # @param [String] tree_id (Optional) Browse objects inside subdirectory of backup snapshot. If it is for VMDK single file restore, it should be the disk image's subtree ID.
1695
+ # @param [Comet::VMDKSnapshotViewOptions] options (Optional) Request a list of stored objects in vmdk file
1635
1696
  # @return [Comet::DispatcherStoredObjectsResponse]
1636
- def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil)
1697
+ def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil, options = nil)
1637
1698
  submit_params = {}
1638
1699
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1639
1700
 
@@ -1649,6 +1710,11 @@ module Comet
1649
1710
 
1650
1711
  submit_params['TreeID'] = tree_id
1651
1712
  end
1713
+ unless options.nil?
1714
+ raise TypeError, "'options' expected Comet::VMDKSnapshotViewOptions, got #{options.class}" unless options.is_a? Comet::VMDKSnapshotViewOptions
1715
+
1716
+ submit_params['Options'] = options.to_json
1717
+ end
1652
1718
 
1653
1719
  body = perform_request('api/v1/admin/dispatcher/request-stored-objects', submit_params)
1654
1720
  json_body = JSON.parse body
@@ -3052,13 +3118,22 @@ module Comet
3052
3118
  # AdminPoliciesList
3053
3119
  #
3054
3120
  # List all policy object names.
3121
+ # For the top-level organization, the API result includes all policies for all organizations, unless the TargetOrganization parameter is present.
3055
3122
  #
3056
3123
  # You must supply administrator authentication credentials to use this API.
3057
3124
  # This API requires the Auth Role to be enabled.
3058
3125
  #
3126
+ # @param [String] target_organization (Optional) If present, list the policies belonging to another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)
3059
3127
  # @return [Hash{String => String}]
3060
- def admin_policies_list
3061
- body = perform_request('api/v1/admin/policies/list')
3128
+ def admin_policies_list(target_organization = nil)
3129
+ submit_params = {}
3130
+ unless target_organization.nil?
3131
+ raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String
3132
+
3133
+ submit_params['TargetOrganization'] = target_organization
3134
+ end
3135
+
3136
+ body = perform_request('api/v1/admin/policies/list', submit_params)
3062
3137
  json_body = JSON.parse body
3063
3138
  check_status json_body
3064
3139
  ret = {}
@@ -3077,13 +3152,22 @@ module Comet
3077
3152
  # AdminPoliciesListFull
3078
3153
  #
3079
3154
  # Get all policy objects.
3155
+ # For the top-level organization, the API result includes all policies for all organizations, unless the TargetOrganization parameter is present.
3080
3156
  #
3081
3157
  # You must supply administrator authentication credentials to use this API.
3082
3158
  # This API requires the Auth Role to be enabled.
3083
3159
  #
3160
+ # @param [String] target_organization (Optional) If present, list the policies belonging to another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)
3084
3161
  # @return [Hash{String => Comet::GroupPolicy}]
3085
- def admin_policies_list_full
3086
- body = perform_request('api/v1/admin/policies/list-full')
3162
+ def admin_policies_list_full(target_organization = nil)
3163
+ submit_params = {}
3164
+ unless target_organization.nil?
3165
+ raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String
3166
+
3167
+ submit_params['TargetOrganization'] = target_organization
3168
+ end
3169
+
3170
+ body = perform_request('api/v1/admin/policies/list-full', submit_params)
3087
3171
  json_body = JSON.parse body
3088
3172
  check_status json_body
3089
3173
  ret = {}
@@ -3218,6 +3302,7 @@ module Comet
3218
3302
  # Request a new Storage Vault on behalf of a user.
3219
3303
  # This action does not respect the "Prevent creating new Storage Vaults (via Request)" policy setting. New Storage Vaults can be requested regardless of the policy setting.
3220
3304
  # Prior to Comet 19.8.0, the response type was CometAPIResponseMessage (i.e. no DestinationID field in response).
3305
+ # The StorageProvider must exist for the target user account's organization.
3221
3306
  #
3222
3307
  # You must supply administrator authentication credentials to use this API.
3223
3308
  # This API requires the Auth Role to be enabled.
@@ -3257,9 +3342,17 @@ module Comet
3257
3342
  # You must supply administrator authentication credentials to use this API.
3258
3343
  # This API requires the Auth Role to be enabled.
3259
3344
  #
3345
+ # @param [String] target_organization (Optional) If present, list the requestable Storage Vault options belonging to another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)
3260
3346
  # @return [Hash{String => String}]
3261
- def admin_request_storage_vault_providers
3262
- body = perform_request('api/v1/admin/request-storage-vault-providers')
3347
+ def admin_request_storage_vault_providers(target_organization = nil)
3348
+ submit_params = {}
3349
+ unless target_organization.nil?
3350
+ raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String
3351
+
3352
+ submit_params['TargetOrganization'] = target_organization
3353
+ end
3354
+
3355
+ body = perform_request('api/v1/admin/request-storage-vault-providers', submit_params)
3263
3356
  json_body = JSON.parse body
3264
3357
  check_status json_body
3265
3358
  ret = {}
@@ -9,6 +9,18 @@
9
9
 
10
10
  module Comet
11
11
 
12
+ # AutoRetentionLevel: The system will automatically choose how often to run an automatic Retention Pass after each backup job.
13
+ BACKUPJOBAUTORETENTION_AUTOMATIC = 0
14
+
15
+ # AutoRetentionLevel: The system will run a Retention Pass after every single backup job. This is more system-intensive, but is the most responsive at freeing storage space.
16
+ BACKUPJOBAUTORETENTION_IMMEDIATE = 1
17
+
18
+ # AutoRetentionLevel: The system will follow the automatic ruleset for a 'High Power' device.
19
+ BACKUPJOBAUTORETENTION_MORE_OFTEN = 2
20
+
21
+ # AutoRetentionLevel: The system will follow the automatic ruleset for a 'Low Power' device.
22
+ BACKUPJOBAUTORETENTION_LESS_OFTEN = 3
23
+
12
24
  # JobClassification:
13
25
  JOB_CLASSIFICATION__MIN = 4000
14
26
 
@@ -144,6 +156,8 @@ module Comet
144
156
  # FtpsModeType:
145
157
  FTPS_MODE_EXPLICIT = 2
146
158
 
159
+ INSTALLER_METADATA_FILE = 'installer.json'
160
+
147
161
  # Severity:
148
162
  SEVERITY_INFO = 'I'
149
163
 
@@ -197,6 +211,15 @@ module Comet
197
211
  # RestoreType:
198
212
  RESTORETYPE_OFFICE365_CLOUD = 6
199
213
 
214
+ # RestoreType:
215
+ RESTORETYPE_VMDK_FILE = 7
216
+
217
+ # RestoreType:
218
+ RESTORETYPE_VMDK_FILE_NULL = 8
219
+
220
+ # RestoreType:
221
+ RESTORETYPE_VMDK_FILE_ARCHIVE = 9
222
+
200
223
  # RestoreType: RESTORETYPE_PROCESS_ARCHIVE
201
224
  RESTORETYPE_PROCESS_TARBALL = 3
202
225
 
@@ -212,6 +235,9 @@ module Comet
212
235
  # RestoreArchiveFormat: SquashFS container
213
236
  RESTOREARCHIVEFORMAT_SQFS = 3
214
237
 
238
+ # RestoreArchiveFormat:
239
+ RESTOREARCHIVEFORMAT_TARZSTD = 4
240
+
215
241
  # RetentionMode: If this mode is set in a RetentionPolicy, then RetentionPolicy.Ranges should be ignored.
216
242
  RETENTIONMODE_KEEP_EVERYTHING = 801
217
243
 
@@ -392,6 +418,18 @@ module Comet
392
418
  # StoredObjectType:
393
419
  STOREDOBJECTTYPE_MSSITELISTDRIVEENTITY = 'mssitelistdriveentity'
394
420
 
421
+ # StoredObjectType:
422
+ STOREDOBJECTTYPE_VMDK_FILE = 'vmdkfile'
423
+
424
+ # StoredObjectType:
425
+ STOREDOBJECTTYPE_VMDK_DIRECTORY = 'vmdkdir'
426
+
427
+ # StoredObjectType:
428
+ STOREDOBJECTTYPE_VMDK_WINEFS = 'vmdkwinefs'
429
+
430
+ # StoredObjectType:
431
+ STOREDOBJECTTYPE_VMDK_SYMLINK = 'vmdksymlink'
432
+
395
433
  # ExtraFileExclusionOSRestriction:
396
434
  OS_ANY = 0
397
435
 
@@ -430,15 +468,15 @@ module Comet
430
468
 
431
469
  DEFAULT_TIMEZONE = 'UTC'
432
470
 
433
- APPLICATION_VERSION = '21.12.4'
471
+ APPLICATION_VERSION = '22.5.0'
434
472
 
435
- APPLICATION_VERSION_MAJOR = 21
473
+ APPLICATION_VERSION_MAJOR = 22
436
474
 
437
- APPLICATION_VERSION_MINOR = 12
475
+ APPLICATION_VERSION_MINOR = 5
438
476
 
439
- APPLICATION_VERSION_REVISION = 4
477
+ APPLICATION_VERSION_REVISION = 0
440
478
 
441
- RELEASE_CODENAME = 'Voyager'
479
+ RELEASE_CODENAME = 'Lysithea'
442
480
 
443
481
  ENCRYPTIONMETHOD_UNCONFIGURED = 0
444
482
 
@@ -448,6 +486,8 @@ module Comet
448
486
 
449
487
  TOTPREQUIRED_ERROR = 'ERR_TOTP_REQUIRED'
450
488
 
489
+ UNSUPPORT_VMDK_FILE_SYSTEM = 'ERR_UNSUPPORT_VMDK_FILE_SYSTEM'
490
+
451
491
  EMAIL_WORKER_STATE_NOT_STARTED = 0
452
492
 
453
493
  EMAIL_WORKER_STATE_STARTED = 1
@@ -615,6 +655,12 @@ module Comet
615
655
  # RemoteServerType:
616
656
  REMOTESERVER_CUSTOM = 'custom'
617
657
 
658
+ # RemoteServerType:
659
+ REMOTESERVER_S3_GENERIC = 's3'
660
+
661
+ # RemoteServerType:
662
+ REMOTESERVER_AWS = 'aws'
663
+
618
664
  LDAPSECURITYMETHOD_PLAIN = 'plain'
619
665
 
620
666
  LDAPSECURITYMETHOD_LDAPS = 'ldaps'
@@ -657,6 +703,30 @@ module Comet
657
703
  # StreamableEventType:
658
704
  SEVT__MAX = 4999
659
705
 
706
+ # CompressMode:
707
+ COMPRESS_INVALID = 0
708
+
709
+ # CompressMode:
710
+ COMPRESS_LVL_1 = 1
711
+
712
+ # CompressMode:
713
+ COMPRESS_LVL_2 = 2
714
+
715
+ # CompressMode:
716
+ COMPRESS_LVL_3 = 3
717
+
718
+ # CompressMode:
719
+ COMPRESS_LVL_4 = 4
720
+
721
+ # CompressMode:
722
+ COMPRESS_LVL_5 = 5
723
+
724
+ # CompressMode:
725
+ COMPRESS_MAX = COMPRESS_LVL_5
726
+
727
+ # CompressMode:
728
+ COMPRESS_DEFAULT = COMPRESS_LVL_4
729
+
660
730
  OFFICE365_REGION_PUBLIC = 'GlobalPublicCloud'
661
731
 
662
732
  OFFICE365_REGION_CHINA = 'ChinaCloud'
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env ruby --enable-frozen-string-literal
2
+ #
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
+ # Please see the LICENSE file for usage information.
5
+ #
6
+ # SPDX-License-Identifier: MIT
7
+ #
8
+ # frozen_string_literal: true
9
+
10
+ require 'json'
11
+
12
+ module Comet
13
+
14
+ # AmazonAWSVirtualStorageRoleSettings is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class AmazonAWSVirtualStorageRoleSettings
16
+
17
+ # @type [String] master_bucket
18
+ attr_accessor :master_bucket
19
+
20
+ # @type [String] access_key
21
+ attr_accessor :access_key
22
+
23
+ # @type [String] secret_key
24
+ attr_accessor :secret_key
25
+
26
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
27
+ attr_accessor :unknown_json_fields
28
+
29
+ def initialize
30
+ clear
31
+ end
32
+
33
+ def clear
34
+ @master_bucket = ''
35
+ @access_key = ''
36
+ @secret_key = ''
37
+ @unknown_json_fields = {}
38
+ end
39
+
40
+ # @param [String] json_string The complete object in JSON format
41
+ def from_json(json_string)
42
+ raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
43
+
44
+ from_hash(JSON.parse(json_string))
45
+ end
46
+
47
+ # @param [Hash] obj The complete object as a Ruby hash
48
+ def from_hash(obj)
49
+ raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
50
+
51
+ obj.each do |k, v|
52
+ case k
53
+ when 'MasterBucket'
54
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
55
+
56
+ @master_bucket = v
57
+ when 'AccessKey'
58
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
59
+
60
+ @access_key = v
61
+ when 'SecretKey'
62
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
63
+
64
+ @secret_key = v
65
+ else
66
+ @unknown_json_fields[k] = v
67
+ end
68
+ end
69
+ end
70
+
71
+ # @return [Hash] The complete object as a Ruby hash
72
+ def to_hash
73
+ ret = {}
74
+ ret['MasterBucket'] = @master_bucket
75
+ ret['AccessKey'] = @access_key
76
+ ret['SecretKey'] = @secret_key
77
+ @unknown_json_fields.each do |k, v|
78
+ ret[k] = v
79
+ end
80
+ ret
81
+ end
82
+
83
+ # @return [Hash] The complete object as a Ruby hash
84
+ def to_h
85
+ to_hash
86
+ end
87
+
88
+ # @return [String] The complete object as a JSON string
89
+ def to_json(options = {})
90
+ to_hash.to_json(options)
91
+ end
92
+ end
93
+ end
@@ -32,6 +32,9 @@ module Comet
32
32
  # @type [Boolean] allow_zero_files_success
33
33
  attr_accessor :allow_zero_files_success
34
34
 
35
+ # @type [Number] auto_retention_level
36
+ attr_accessor :auto_retention_level
37
+
35
38
  # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
36
39
  attr_accessor :unknown_json_fields
37
40
 
@@ -42,6 +45,7 @@ module Comet
42
45
  def clear
43
46
  @stop_after = 0
44
47
  @limit_vault_speed_bps = 0
48
+ @auto_retention_level = 0
45
49
  @unknown_json_fields = {}
46
50
  end
47
51
 
@@ -74,6 +78,10 @@ module Comet
74
78
  @use_on_disk_indexes = v
75
79
  when 'AllowZeroFilesSuccess'
76
80
  @allow_zero_files_success = v
81
+ when 'AutoRetentionLevel'
82
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
83
+
84
+ @auto_retention_level = v
77
85
  else
78
86
  @unknown_json_fields[k] = v
79
87
  end
@@ -89,6 +97,7 @@ module Comet
89
97
  ret['ReduceDiskConcurrency'] = @reduce_disk_concurrency
90
98
  ret['UseOnDiskIndexes'] = @use_on_disk_indexes
91
99
  ret['AllowZeroFilesSuccess'] = @allow_zero_files_success
100
+ ret['AutoRetentionLevel'] = @auto_retention_level
92
101
  @unknown_json_fields.each do |k, v|
93
102
  ret[k] = v
94
103
  end
@@ -65,6 +65,9 @@ module Comet
65
65
  # @type [Number] download_size
66
66
  attr_accessor :download_size
67
67
 
68
+ # @type [Number] total_vm_count
69
+ attr_accessor :total_vm_count
70
+
68
71
  # @type [Number] total_mails_count
69
72
  attr_accessor :total_mails_count
70
73
 
@@ -117,6 +120,7 @@ module Comet
117
120
  @total_chunks = 0
118
121
  @upload_size = 0
119
122
  @download_size = 0
123
+ @total_vm_count = 0
120
124
  @total_mails_count = 0
121
125
  @total_sites_count = 0
122
126
  @total_accounts_count = 0
@@ -210,6 +214,10 @@ module Comet
210
214
  raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
211
215
 
212
216
  @download_size = v
217
+ when 'TotalVmCount'
218
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
219
+
220
+ @total_vm_count = v
213
221
  when 'TotalMailsCount'
214
222
  raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
215
223
 
@@ -271,6 +279,9 @@ module Comet
271
279
  ret['TotalChunks'] = @total_chunks
272
280
  ret['UploadSize'] = @upload_size
273
281
  ret['DownloadSize'] = @download_size
282
+ unless @total_vm_count.nil?
283
+ ret['TotalVmCount'] = @total_vm_count
284
+ end
274
285
  unless @total_mails_count.nil?
275
286
  ret['TotalMailsCount'] = @total_mails_count
276
287
  end
@@ -56,6 +56,9 @@ module Comet
56
56
  # @type [Boolean] allow_zero_files_success
57
57
  attr_accessor :allow_zero_files_success
58
58
 
59
+ # @type [Number] auto_retention_level
60
+ attr_accessor :auto_retention_level
61
+
59
62
  # @type [Array<Comet::ScheduleConfig>] schedules
60
63
  attr_accessor :schedules
61
64
 
@@ -80,6 +83,7 @@ module Comet
80
83
  @destination = ''
81
84
  @stop_after = 0
82
85
  @limit_vault_speed_bps = 0
86
+ @auto_retention_level = 0
83
87
  @schedules = []
84
88
  @event_triggers = Comet::BackupRuleEventTriggers.new
85
89
  @unknown_json_fields = {}
@@ -167,6 +171,10 @@ module Comet
167
171
  @use_on_disk_indexes = v
168
172
  when 'AllowZeroFilesSuccess'
169
173
  @allow_zero_files_success = v
174
+ when 'AutoRetentionLevel'
175
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
176
+
177
+ @auto_retention_level = v
170
178
  when 'Schedules'
171
179
  if v.nil?
172
180
  @schedules = []
@@ -203,6 +211,7 @@ module Comet
203
211
  ret['ReduceDiskConcurrency'] = @reduce_disk_concurrency
204
212
  ret['UseOnDiskIndexes'] = @use_on_disk_indexes
205
213
  ret['AllowZeroFilesSuccess'] = @allow_zero_files_success
214
+ ret['AutoRetentionLevel'] = @auto_retention_level
206
215
  ret['Schedules'] = @schedules
207
216
  ret['EventTriggers'] = @event_triggers
208
217
  @unknown_json_fields.each do |k, v|
@@ -71,6 +71,9 @@ module Comet
71
71
  # @type [String] path_header_image
72
72
  attr_accessor :path_header_image
73
73
 
74
+ # @type [String] path_app_icon_image
75
+ attr_accessor :path_app_icon_image
76
+
74
77
  # @type [String] package_identifier
75
78
  attr_accessor :package_identifier
76
79
 
@@ -128,6 +131,7 @@ module Comet
128
131
  @path_eula_rtf = ''
129
132
  @path_tile_png = ''
130
133
  @path_header_image = ''
134
+ @path_app_icon_image = ''
131
135
  @package_identifier = ''
132
136
  @windows_code_sign_pkcs12file_path = ''
133
137
  @windows_code_sign_pkcs12password_format = 0
@@ -225,6 +229,10 @@ module Comet
225
229
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
226
230
 
227
231
  @path_header_image = v
232
+ when 'PathAppIconImage'
233
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
234
+
235
+ @path_app_icon_image = v
228
236
  when 'PackageIdentifier'
229
237
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
230
238
 
@@ -296,6 +304,7 @@ module Comet
296
304
  ret['PathEulaRtf'] = @path_eula_rtf
297
305
  ret['PathTilePng'] = @path_tile_png
298
306
  ret['PathHeaderImage'] = @path_header_image
307
+ ret['PathAppIconImage'] = @path_app_icon_image
299
308
  ret['PackageIdentifier'] = @package_identifier
300
309
  ret['WindowsCodeSignPKCS12FilePath'] = @windows_code_sign_pkcs12file_path
301
310
  ret['WindowsCodeSignPKCS12PasswordFormat'] = @windows_code_sign_pkcs12password_format