comet_backup_ruby_sdk 2.4.0 → 2.5.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: 3e25663bd2981d72004508afa32d6bbd82e6618ecfc9502d326a74bf7601e5ba
4
- data.tar.gz: a31154c4fc007ac666eb30bacce04f570193387466d7a8458050bfdb901fca83
3
+ metadata.gz: 31d37f9db407cb918ddc8ef37463e6a0e5876adcb1c393b7139ec86631165c59
4
+ data.tar.gz: 4e418f15a2d9ef97ba7c6a1b01b33eea54e95080bbabfe4d595c084e402dabfe
5
5
  SHA512:
6
- metadata.gz: 91f0c27cd10765ddc7e4804b306aaa85f07ded7abd5c90a308a02100041c1aa0e2b20144ce6b4f9391d516509af0beac581eee832382a913bcf3db9c5e6c86b6
7
- data.tar.gz: 5aa36f2a530a61860938cbf1bc78bd55571d0caf9748a7f8bdca842d7a13671b762562382474aa7a5acaca8e7735c9432fae9fe13074309c13de2836bf65b7b3
6
+ metadata.gz: ac49b81b1c33dcf60b72dff86a78ec6e22ca1fee9735c11e085928be4a55f73ecb0897a2fd27f93fa1196526cda9746c98c533c8778fb02cbfc92a21b355983f
7
+ data.tar.gz: e129d700eaa4a97048052e1636fd4fcad77db8a903af92e063b1e4c62b579aa98b77d0a4270df3e248abf459f781ec7b520e04b71e121de3bd9a1f362c03d8bd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2023-02-15 v2.5.0
4
+ - Based on 22.12.8
5
+ - Add `TimeSpan` option to `EmailReportOptions`
6
+ - Add `AlertsDisabled` (default: false) toggle for `PSAConfig` objects
7
+ - Add `LastSuspended` for tracking `UserProfileConfig` suspensions
8
+ - Improve documentation
9
+
3
10
  ## 2023-01-11 v2.4.0
4
11
  - Based on 22.12.2
5
12
  - Add new `AdminCountJobsForCustomSearchRequest` API to count total number of jobs for a given search query
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (2.4.0)
4
+ comet_backup_ruby_sdk (2.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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.4.0'
15
+ spec.version = '2.5.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -388,7 +388,7 @@ module Comet
388
388
  #
389
389
  # You must supply administrator authentication credentials to use this API.
390
390
  # Access to this API may be prevented on a per-administrator basis.
391
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
391
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
392
392
  #
393
393
  # @param [String] target_user the username of the admin to be deleted
394
394
  # @return [Comet::CometAPIResponseMessage]
@@ -412,7 +412,7 @@ module Comet
412
412
  #
413
413
  # You must supply administrator authentication credentials to use this API.
414
414
  # Access to this API may be prevented on a per-administrator basis.
415
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
415
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
416
416
  #
417
417
  # @return [Array<Comet::AllowedAdminUser>]
418
418
  def admin_admin_user_list
@@ -437,7 +437,7 @@ module Comet
437
437
  #
438
438
  # You must supply administrator authentication credentials to use this API.
439
439
  # Access to this API may be prevented on a per-administrator basis.
440
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
440
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
441
441
  #
442
442
  # @param [String] target_user the username for this new admin
443
443
  # @param [String] target_password the password for this new admin user
@@ -874,7 +874,7 @@ module Comet
874
874
  # Prune unused buckets.
875
875
  #
876
876
  # You must supply administrator authentication credentials to use this API.
877
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
877
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
878
878
  # This API requires the Constellation Role to be enabled.
879
879
  #
880
880
  # @return [Comet::CometAPIResponseMessage]
@@ -1204,7 +1204,7 @@ module Comet
1204
1204
  #
1205
1205
  # You must supply administrator authentication credentials to use this API.
1206
1206
  # This API requires the Auth Role to be enabled.
1207
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
1207
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
1208
1208
  #
1209
1209
  # @param [String] organization_id Target organization
1210
1210
  # @return [Comet::OrganizationLoginURLResponse]
@@ -2533,7 +2533,7 @@ module Comet
2533
2533
  # AdminMetaBrandingConfigSet
2534
2534
  #
2535
2535
  # Set Branding configuration.
2536
- # Note that file resources must be provided using a resource URI I.E `"resource://05ba0b90ee66bda433169581188aba8d29faa938f9464cccd651a02fdf2e5b57"`. See AdminMetaResourceNew for the API documentation to create new file resources.
2536
+ # Note that file resources must be provided using a resource URI, i.e `"resource://05ba0b90ee66bda433169581188aba8d29faa938f9464cccd651a02fdf2e5b57"`. See AdminMetaResourceNew for the API documentation to create new file resources.
2537
2537
  #
2538
2538
  # You must supply administrator authentication credentials to use this API.
2539
2539
  # Access to this API may be prevented on a per-administrator basis.
@@ -2639,6 +2639,7 @@ module Comet
2639
2639
  # Get the email options.
2640
2640
  #
2641
2641
  # You must supply administrator authentication credentials to use this API.
2642
+ # Access to this API may be prevented on a per-administrator basis.
2642
2643
  #
2643
2644
  # @return [Comet::EmailOptions]
2644
2645
  def admin_meta_email_options_get
@@ -2655,6 +2656,7 @@ module Comet
2655
2656
  # Set the email options.
2656
2657
  #
2657
2658
  # You must supply administrator authentication credentials to use this API.
2659
+ # Access to this API may be prevented on a per-administrator basis.
2658
2660
  #
2659
2661
  # @param [Comet::EmailOptions] email_options The replacement email reporting options.
2660
2662
  # @return [Comet::CometAPIResponseMessage]
@@ -2677,7 +2679,7 @@ module Comet
2677
2679
  # Get log files.
2678
2680
  #
2679
2681
  # You must supply administrator authentication credentials to use this API.
2680
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2682
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
2681
2683
  #
2682
2684
  # @return [Array<Number>]
2683
2685
  def admin_meta_list_available_log_days
@@ -2767,7 +2769,7 @@ module Comet
2767
2769
  # This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.
2768
2770
  #
2769
2771
  # You must supply administrator authentication credentials to use this API.
2770
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2772
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
2771
2773
  #
2772
2774
  # @return [String]
2773
2775
  def admin_meta_read_all_logs
@@ -2781,7 +2783,7 @@ module Comet
2781
2783
  # This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.
2782
2784
  #
2783
2785
  # You must supply administrator authentication credentials to use this API.
2784
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2786
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
2785
2787
  #
2786
2788
  # @param [Number] log A log day, selected from the options returned by the Get Log Files API
2787
2789
  # @return [String]
@@ -2892,7 +2894,7 @@ module Comet
2892
2894
  # Prior to 18.9.2, this API terminated the server immediately without returning a response. In 18.9.2 and later, it returns a successful response before shutting down.
2893
2895
  #
2894
2896
  # You must supply administrator authentication credentials to use this API.
2895
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2897
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
2896
2898
  # Access to this API may be prevented on a per-administrator basis.
2897
2899
  #
2898
2900
  # @return [Comet::CometAPIResponseMessage]
@@ -2911,6 +2913,7 @@ module Comet
2911
2913
  # This allows the Comet Server web interface to support testing different email credentials during setup.
2912
2914
  #
2913
2915
  # You must supply administrator authentication credentials to use this API.
2916
+ # Access to this API may be prevented on a per-administrator basis.
2914
2917
  #
2915
2918
  # @param [Comet::EmailOptions] email_options Updated configuration content
2916
2919
  # @param [String] recipient Target email address to send test email
@@ -2938,6 +2941,7 @@ module Comet
2938
2941
  # This allows a user to send a test email report
2939
2942
  #
2940
2943
  # You must supply administrator authentication credentials to use this API.
2944
+ # Access to this API may be prevented on a per-administrator basis.
2941
2945
  #
2942
2946
  # @param [Comet::EmailReportingOption] email_reporting_option Test email reporting option for sending
2943
2947
  # @return [Comet::CometAPIResponseMessage]
@@ -2961,7 +2965,7 @@ module Comet
2961
2965
  #
2962
2966
  # You must supply administrator authentication credentials to use this API.
2963
2967
  # Access to this API may be prevented on a per-administrator basis.
2964
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2968
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
2965
2969
  #
2966
2970
  # @return [Comet::ServerConfigOptions]
2967
2971
  def admin_meta_server_config_get
@@ -2980,7 +2984,7 @@ module Comet
2980
2984
  #
2981
2985
  # You must supply administrator authentication credentials to use this API.
2982
2986
  # Access to this API may be prevented on a per-administrator basis.
2983
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2987
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
2984
2988
  #
2985
2989
  # @return [Array<String>]
2986
2990
  def admin_meta_server_config_network_interfaces
@@ -3009,7 +3013,7 @@ module Comet
3009
3013
  #
3010
3014
  # You must supply administrator authentication credentials to use this API.
3011
3015
  # Access to this API may be prevented on a per-administrator basis.
3012
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3016
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3013
3017
  #
3014
3018
  # @param [Comet::ServerConfigOptions] config Updated configuration content
3015
3019
  # @return [Comet::CometAPIResponseMessage]
@@ -3035,7 +3039,7 @@ module Comet
3035
3039
  # Prior to 18.9.2, this API terminated the server immediately without returning a response. In 18.9.2 and later, it returns a successful response before shutting down.
3036
3040
  #
3037
3041
  # You must supply administrator authentication credentials to use this API.
3038
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3042
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3039
3043
  # Access to this API may be prevented on a per-administrator basis.
3040
3044
  #
3041
3045
  # @return [Comet::CometAPIResponseMessage]
@@ -3114,6 +3118,7 @@ module Comet
3114
3118
  # Get the server webhook configuration.
3115
3119
  #
3116
3120
  # You must supply administrator authentication credentials to use this API.
3121
+ # Access to this API may be prevented on a per-administrator basis.
3117
3122
  #
3118
3123
  # @return [Hash{String => Comet::WebhookOption}]
3119
3124
  def admin_meta_webhook_options_get
@@ -3138,6 +3143,7 @@ module Comet
3138
3143
  # Calling this endpoint will interrupt any messages currently queued for existing webhook destinations.
3139
3144
  #
3140
3145
  # You must supply administrator authentication credentials to use this API.
3146
+ # Access to this API may be prevented on a per-administrator basis.
3141
3147
  #
3142
3148
  # @param [Hash{String => Comet::WebhookOption}] webhook_options The replacement webhook target options.
3143
3149
  # @return [Comet::CometAPIResponseMessage]
@@ -3232,7 +3238,7 @@ module Comet
3232
3238
  # Prior to Comet 22.6.0, this API was documented as returning the OrganizationResponse type. However, it always has returned only a CometAPIResponseMessage.
3233
3239
  #
3234
3240
  # You must supply administrator authentication credentials to use this API.
3235
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3241
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3236
3242
  #
3237
3243
  # @param [String] organization_id (Optional) (No description available)
3238
3244
  # @param [Comet::UninstallConfig] uninstall_config (Optional) Uninstall software configuration
@@ -3263,7 +3269,7 @@ module Comet
3263
3269
  # Run self-backup for a specific tenant.
3264
3270
  #
3265
3271
  # You must supply administrator authentication credentials to use this API.
3266
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3272
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3267
3273
  #
3268
3274
  # @param [Comet::SelfBackupExportOptions] options The export config options
3269
3275
  # @return [Comet::CometAPIResponseMessage]
@@ -3286,7 +3292,7 @@ module Comet
3286
3292
  # List Organizations.
3287
3293
  #
3288
3294
  # You must supply administrator authentication credentials to use this API.
3289
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3295
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3290
3296
  #
3291
3297
  # @return [Hash{String => Comet::Organization}]
3292
3298
  def admin_organization_list
@@ -3312,7 +3318,7 @@ module Comet
3312
3318
  # Prior to Comet 22.6.0, the 'ID' and 'Organization' fields were not present in the response.
3313
3319
  #
3314
3320
  # You must supply administrator authentication credentials to use this API.
3315
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3321
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3316
3322
  #
3317
3323
  # @param [String] organization_id (Optional) (No description available)
3318
3324
  # @param [Comet::Organization] organization (Optional) (No description available)
@@ -3548,7 +3554,7 @@ module Comet
3548
3554
  # Get Replication status.
3549
3555
  #
3550
3556
  # You must supply administrator authentication credentials to use this API.
3551
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3557
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3552
3558
  #
3553
3559
  # @return [Array<Comet::ReplicatorStateAPIResponse>]
3554
3560
  def admin_replication_state
@@ -3705,7 +3711,7 @@ module Comet
3705
3711
  # Run self-backup on all targets.
3706
3712
  #
3707
3713
  # You must supply administrator authentication credentials to use this API.
3708
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3714
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3709
3715
  #
3710
3716
  # @return [Comet::CometAPIResponseMessage]
3711
3717
  def admin_self_backup_start
@@ -3838,7 +3844,7 @@ module Comet
3838
3844
  # You must supply administrator authentication credentials to use this API.
3839
3845
  # Access to this API may be prevented on a per-administrator basis.
3840
3846
  # This API requires the Storage Role to be enabled.
3841
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3847
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3842
3848
  #
3843
3849
  # @param [String] bucket_id (Optional) (This parameter is not used)
3844
3850
  # @return [Comet::StorageFreeSpaceInfo]
@@ -3889,7 +3895,7 @@ module Comet
3889
3895
  # You must supply administrator authentication credentials to use this API.
3890
3896
  # Access to this API may be prevented on a per-administrator basis.
3891
3897
  # This API requires the Storage Role to be enabled.
3892
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3898
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3893
3899
  #
3894
3900
  # @param [Comet::DestinationLocation] extra_data The destination location settings
3895
3901
  # @return [Comet::CometAPIResponseMessage]
@@ -3957,7 +3963,7 @@ module Comet
3957
3963
  # Start a new software update campaign.
3958
3964
  #
3959
3965
  # You must supply administrator authentication credentials to use this API.
3960
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3966
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3961
3967
  # This API requires the Software Build Role to be enabled.
3962
3968
  # This API requires the Auth Role to be enabled.
3963
3969
  #
@@ -3982,7 +3988,7 @@ module Comet
3982
3988
  # Get current campaign status.
3983
3989
  #
3984
3990
  # You must supply administrator authentication credentials to use this API.
3985
- # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3991
+ # This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
3986
3992
  # This API requires the Software Build Role to be enabled.
3987
3993
  # This API requires the Auth Role to be enabled.
3988
3994
  #
@@ -147,6 +147,12 @@ module Comet
147
147
  # EmailReportType:
148
148
  EMAILREPORTTYPE_SUMMARY = 1
149
149
 
150
+ # EmailReportType:
151
+ EMAILREPORTTYPE_GROUPED_STATUS = 2
152
+
153
+ # EmailReportType:
154
+ EMAILREPORTTYPE_RECENT_ACTIVITY = 3
155
+
150
156
  # FtpsModeType:
151
157
  FTPS_MODE_PLAINTEXT = 0
152
158
 
@@ -443,6 +449,15 @@ module Comet
443
449
  # StoredObjectType:
444
450
  STOREDOBJECTTYPE_VMDK_SYMLINK = 'vmdksymlink'
445
451
 
452
+ # StoredObjectType:
453
+ STOREDOBJECTTYPE_VIRTUALIMAGE_DISK = 'virtualimagedisk'
454
+
455
+ # StoredObjectType:
456
+ STOREDOBJECTTYPE_VHDX_GPT_PARTITION = 'vhdxpartitiongpt'
457
+
458
+ # StoredObjectType:
459
+ STOREDOBJECTTYPE_VHDX_MBR_PARTITION = 'vhdxpartitionmbr'
460
+
446
461
  # ExtraFileExclusionOSRestriction:
447
462
  OS_ANY = 0
448
463
 
@@ -481,13 +496,13 @@ module Comet
481
496
 
482
497
  DEFAULT_TIMEZONE = 'UTC'
483
498
 
484
- APPLICATION_VERSION = '22.12.2'
499
+ APPLICATION_VERSION = '22.12.8'
485
500
 
486
501
  APPLICATION_VERSION_MAJOR = 22
487
502
 
488
503
  APPLICATION_VERSION_MINOR = 12
489
504
 
490
- APPLICATION_VERSION_REVISION = 2
505
+ APPLICATION_VERSION_REVISION = 8
491
506
 
492
507
  RELEASE_CODENAME = 'Voyager'
493
508
 
@@ -501,6 +516,10 @@ module Comet
501
516
 
502
517
  UNSUPPORT_VMDK_FILE_SYSTEM = 'ERR_UNSUPPORT_VMDK_FILE_SYSTEM'
503
518
 
519
+ UNSUPPORT_VHDX_FILE_SYSTEM = 'ERR_UNSUPPORT_VHDX_FILE_SYSTEM'
520
+
521
+ VHDX_PARTITON_READ_ERR_MSG = 'ERR_VHDX_PARTITION'
522
+
504
523
  EMAIL_WORKER_STATE_NOT_STARTED = 0
505
524
 
506
525
  EMAIL_WORKER_STATE_STARTED = 1
@@ -18,6 +18,9 @@ module Comet
18
18
  # @type [Array<Comet::ScheduleConfig>] summary_frequency
19
19
  attr_accessor :summary_frequency
20
20
 
21
+ # @type [Comet::TimeSpan] time_span
22
+ attr_accessor :time_span
23
+
21
24
  # @type [Comet::SearchClause] filter
22
25
  attr_accessor :filter
23
26
 
@@ -31,6 +34,7 @@ module Comet
31
34
  def clear
32
35
  @report_type = 0
33
36
  @summary_frequency = []
37
+ @time_span = Comet::TimeSpan.new
34
38
  @filter = Comet::SearchClause.new
35
39
  @unknown_json_fields = {}
36
40
  end
@@ -62,6 +66,9 @@ module Comet
62
66
  @summary_frequency[i1].from_hash(v1)
63
67
  end
64
68
  end
69
+ when 'TimeSpan'
70
+ @time_span = Comet::TimeSpan.new
71
+ @time_span.from_hash(v)
65
72
  when 'Filter'
66
73
  @filter = Comet::SearchClause.new
67
74
  @filter.from_hash(v)
@@ -76,6 +83,9 @@ module Comet
76
83
  ret = {}
77
84
  ret['ReportType'] = @report_type
78
85
  ret['SummaryFrequency'] = @summary_frequency
86
+ unless @time_span.nil?
87
+ ret['TimeSpan'] = @time_span
88
+ end
79
89
  ret['Filter'] = @filter
80
90
  @unknown_json_fields.each do |k, v|
81
91
  ret[k] = v
@@ -28,6 +28,7 @@ module Comet
28
28
  attr_accessor :authentication_db
29
29
 
30
30
  # @type [String] mongo_shell_path
31
+ # @deprecated This member has been deprecated since Comet version 22.12.3
31
32
  attr_accessor :mongo_shell_path
32
33
 
33
34
  # @type [String] mongodump_path
@@ -12,17 +12,20 @@ module Comet
12
12
  # PSAConfig is a typed class wrapper around the underlying Comet Server API data structure.
13
13
  class PSAConfig
14
14
 
15
- # @type [String] url
16
- attr_accessor :url
15
+ # @type [Boolean] alerts_disabled
16
+ attr_accessor :alerts_disabled
17
17
 
18
18
  # @type [Hash{String => String}] custom_headers
19
19
  attr_accessor :custom_headers
20
20
 
21
+ # @type [String] partner_key
22
+ attr_accessor :partner_key
23
+
21
24
  # @type [Number] type
22
25
  attr_accessor :type
23
26
 
24
- # @type [String] partner_key
25
- attr_accessor :partner_key
27
+ # @type [String] url
28
+ attr_accessor :url
26
29
 
27
30
  # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
28
31
  attr_accessor :unknown_json_fields
@@ -32,10 +35,10 @@ module Comet
32
35
  end
33
36
 
34
37
  def clear
35
- @url = ''
36
38
  @custom_headers = {}
37
- @type = 0
38
39
  @partner_key = ''
40
+ @type = 0
41
+ @url = ''
39
42
  @unknown_json_fields = {}
40
43
  end
41
44
 
@@ -52,10 +55,8 @@ module Comet
52
55
 
53
56
  obj.each do |k, v|
54
57
  case k
55
- when 'URL'
56
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
57
-
58
- @url = v
58
+ when 'AlertsDisabled'
59
+ @alerts_disabled = v
59
60
  when 'CustomHeaders'
60
61
  @custom_headers = {}
61
62
  if v.nil?
@@ -67,14 +68,18 @@ module Comet
67
68
  @custom_headers[k1] = v1
68
69
  end
69
70
  end
71
+ when 'PartnerKey'
72
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
73
+
74
+ @partner_key = v
70
75
  when 'Type'
71
76
  raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
72
77
 
73
78
  @type = v
74
- when 'PartnerKey'
79
+ when 'URL'
75
80
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
76
81
 
77
- @partner_key = v
82
+ @url = v
78
83
  else
79
84
  @unknown_json_fields[k] = v
80
85
  end
@@ -84,14 +89,15 @@ module Comet
84
89
  # @return [Hash] The complete object as a Ruby hash
85
90
  def to_hash
86
91
  ret = {}
87
- ret['URL'] = @url
92
+ ret['AlertsDisabled'] = @alerts_disabled
88
93
  unless @custom_headers.nil?
89
94
  ret['CustomHeaders'] = @custom_headers
90
95
  end
91
- ret['Type'] = @type
92
96
  unless @partner_key.nil?
93
97
  ret['PartnerKey'] = @partner_key
94
98
  end
99
+ ret['Type'] = @type
100
+ ret['URL'] = @url
95
101
  @unknown_json_fields.each do |k, v|
96
102
  ret[k] = v
97
103
  end
@@ -0,0 +1,106 @@
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
+ # SingleFieldSource is a typed class wrapper around the underlying Comet Server API data structure.
13
+ class SingleFieldSource
14
+
15
+ # @type [String] field_name
16
+ attr_accessor :field_name
17
+
18
+ # @type [String] field_type
19
+ attr_accessor :field_type
20
+
21
+ # @type [Boolean] bool_val
22
+ attr_accessor :bool_val
23
+
24
+ # @type [Number] int_val
25
+ attr_accessor :int_val
26
+
27
+ # @type [String] str_val
28
+ attr_accessor :str_val
29
+
30
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
31
+ attr_accessor :unknown_json_fields
32
+
33
+ def initialize
34
+ clear
35
+ end
36
+
37
+ def clear
38
+ @field_name = ''
39
+ @field_type = ''
40
+ @int_val = 0
41
+ @str_val = ''
42
+ @unknown_json_fields = {}
43
+ end
44
+
45
+ # @param [String] json_string The complete object in JSON format
46
+ def from_json(json_string)
47
+ raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
48
+
49
+ from_hash(JSON.parse(json_string))
50
+ end
51
+
52
+ # @param [Hash] obj The complete object as a Ruby hash
53
+ def from_hash(obj)
54
+ raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
55
+
56
+ obj.each do |k, v|
57
+ case k
58
+ when 'FieldName'
59
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
60
+
61
+ @field_name = v
62
+ when 'FieldType'
63
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
64
+
65
+ @field_type = v
66
+ when 'BoolVal'
67
+ @bool_val = v
68
+ when 'IntVal'
69
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
70
+
71
+ @int_val = v
72
+ when 'StrVal'
73
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
74
+
75
+ @str_val = v
76
+ else
77
+ @unknown_json_fields[k] = v
78
+ end
79
+ end
80
+ end
81
+
82
+ # @return [Hash] The complete object as a Ruby hash
83
+ def to_hash
84
+ ret = {}
85
+ ret['FieldName'] = @field_name
86
+ ret['FieldType'] = @field_type
87
+ ret['BoolVal'] = @bool_val
88
+ ret['IntVal'] = @int_val
89
+ ret['StrVal'] = @str_val
90
+ @unknown_json_fields.each do |k, v|
91
+ ret[k] = v
92
+ end
93
+ ret
94
+ end
95
+
96
+ # @return [Hash] The complete object as a Ruby hash
97
+ def to_h
98
+ to_hash
99
+ end
100
+
101
+ # @return [String] The complete object as a JSON string
102
+ def to_json(options = {})
103
+ to_hash.to_json(options)
104
+ end
105
+ end
106
+ 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
+ # TimeSpan is a typed class wrapper around the underlying Comet Server API data structure.
13
+ class TimeSpan
14
+
15
+ # @type [Number] frequency_type
16
+ attr_accessor :frequency_type
17
+
18
+ # @type [Number] seconds
19
+ attr_accessor :seconds
20
+
21
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
22
+ attr_accessor :unknown_json_fields
23
+
24
+ def initialize
25
+ clear
26
+ end
27
+
28
+ def clear
29
+ @frequency_type = 0
30
+ @seconds = 0
31
+ @unknown_json_fields = {}
32
+ end
33
+
34
+ # @param [String] json_string The complete object in JSON format
35
+ def from_json(json_string)
36
+ raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
37
+
38
+ from_hash(JSON.parse(json_string))
39
+ end
40
+
41
+ # @param [Hash] obj The complete object as a Ruby hash
42
+ def from_hash(obj)
43
+ raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
44
+
45
+ obj.each do |k, v|
46
+ case k
47
+ when 'FrequencyType'
48
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
49
+
50
+ @frequency_type = v
51
+ when 'Seconds'
52
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
53
+
54
+ @seconds = v
55
+ else
56
+ @unknown_json_fields[k] = v
57
+ end
58
+ end
59
+ end
60
+
61
+ # @return [Hash] The complete object as a Ruby hash
62
+ def to_hash
63
+ ret = {}
64
+ ret['FrequencyType'] = @frequency_type
65
+ ret['Seconds'] = @seconds
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
@@ -55,6 +55,9 @@ module Comet
55
55
  # @type [Boolean] is_suspended
56
56
  attr_accessor :is_suspended
57
57
 
58
+ # @type [Number] last_suspended
59
+ attr_accessor :last_suspended
60
+
58
61
  # @type [Boolean] all_protected_items_quota_enabled
59
62
  attr_accessor :all_protected_items_quota_enabled
60
63
 
@@ -130,6 +133,7 @@ module Comet
130
133
  @sources = {}
131
134
  @backup_rules = {}
132
135
  @devices = {}
136
+ @last_suspended = 0
133
137
  @all_protected_items_quota_bytes = 0
134
138
  @maximum_devices = 0
135
139
  @quota_office_365protected_accounts = 0
@@ -244,6 +248,10 @@ module Comet
244
248
  end
245
249
  when 'IsSuspended'
246
250
  @is_suspended = v
251
+ when 'LastSuspended'
252
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
253
+
254
+ @last_suspended = v
247
255
  when 'AllProtectedItemsQuotaEnabled'
248
256
  @all_protected_items_quota_enabled = v
249
257
  when 'AllProtectedItemsQuotaBytes'
@@ -326,6 +334,9 @@ module Comet
326
334
  ret['BackupRules'] = @backup_rules
327
335
  ret['Devices'] = @devices
328
336
  ret['IsSuspended'] = @is_suspended
337
+ unless @last_suspended.nil?
338
+ ret['LastSuspended'] = @last_suspended
339
+ end
329
340
  ret['AllProtectedItemsQuotaEnabled'] = @all_protected_items_quota_enabled
330
341
  ret['AllProtectedItemsQuotaBytes'] = @all_protected_items_quota_bytes
331
342
  ret['MaximumDevices'] = @maximum_devices
@@ -21,6 +21,9 @@ module Comet
21
21
  # @type [String] list_path
22
22
  attr_accessor :list_path
23
23
 
24
+ # @type [String] partition_name
25
+ attr_accessor :partition_name
26
+
24
27
  # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
25
28
  attr_accessor :unknown_json_fields
26
29
 
@@ -31,6 +34,7 @@ module Comet
31
34
  def clear
32
35
  @partition_guid = ''
33
36
  @list_path = ''
37
+ @partition_name = ''
34
38
  @unknown_json_fields = {}
35
39
  end
36
40
 
@@ -57,6 +61,10 @@ module Comet
57
61
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
58
62
 
59
63
  @list_path = v
64
+ when 'PartitionName'
65
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
66
+
67
+ @partition_name = v
60
68
  else
61
69
  @unknown_json_fields[k] = v
62
70
  end
@@ -69,6 +77,7 @@ module Comet
69
77
  ret['Enabled'] = @enabled
70
78
  ret['PartitionGUID'] = @partition_guid
71
79
  ret['ListPath'] = @list_path
80
+ ret['PartitionName'] = @partition_name
72
81
  @unknown_json_fields.each do |k, v|
73
82
  ret[k] = v
74
83
  end
@@ -140,6 +140,7 @@ require_relative 'comet/models/server_meta_version_info'
140
140
  require_relative 'comet/models/session_key_regenerated_response'
141
141
  require_relative 'comet/models/session_options'
142
142
  require_relative 'comet/models/sftpdestination_location'
143
+ require_relative 'comet/models/single_field_source'
143
144
  require_relative 'comet/models/size_measurement'
144
145
  require_relative 'comet/models/software_build_role_options'
145
146
  require_relative 'comet/models/software_update_news_response'
@@ -160,6 +161,7 @@ require_relative 'comet/models/storj_virtual_storage_role_setting'
160
161
  require_relative 'comet/models/streamable_event'
161
162
  require_relative 'comet/models/swift_destination_location'
162
163
  require_relative 'comet/models/test_response'
164
+ require_relative 'comet/models/time_span'
163
165
  require_relative 'comet/models/totp_regenerated_response'
164
166
  require_relative 'comet/models/u2fregister_request'
165
167
  require_relative 'comet/models/u2fregistered_key'
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.0
4
+ version: 2.5.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-01-11 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -218,6 +218,7 @@ files:
218
218
  - lib/comet/models/session_key_regenerated_response.rb
219
219
  - lib/comet/models/session_options.rb
220
220
  - lib/comet/models/sftpdestination_location.rb
221
+ - lib/comet/models/single_field_source.rb
221
222
  - lib/comet/models/size_measurement.rb
222
223
  - lib/comet/models/software_build_role_options.rb
223
224
  - lib/comet/models/software_update_news_response.rb
@@ -238,6 +239,7 @@ files:
238
239
  - lib/comet/models/streamable_event.rb
239
240
  - lib/comet/models/swift_destination_location.rb
240
241
  - lib/comet/models/test_response.rb
242
+ - lib/comet/models/time_span.rb
241
243
  - lib/comet/models/totp_regenerated_response.rb
242
244
  - lib/comet/models/u2fregister_request.rb
243
245
  - lib/comet/models/u2fregistered_key.rb