comet_backup_ruby_sdk 2.43.0 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +101 -1
- data/lib/comet/definitions.rb +11 -2
- data/lib/comet/models/destination_config.rb +11 -0
- data/lib/comet/models/get_shared_storage_quota_response.rb +110 -0
- data/lib/comet/models/list_shared_storage_quota_response.rb +98 -0
- data/lib/comet/models/pvestorage_name.rb +16 -0
- data/lib/comet/models/set_shared_storage_quota_response.rb +92 -0
- data/lib/comet/models/shared_storage_quota.rb +94 -0
- data/lib/comet_backup_ruby_sdk.rb +4 -0
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f8bcc1711bb036830fb9143b2737e8981d2d6ac6dd33a3044f0071b0bbdaef5
|
|
4
|
+
data.tar.gz: a4238194d53bfc536198a86beb9c373d32b5503975cca6379174efe94ff9c1f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac782041cd6dbdedfd201782c173e87d5e58694b6ea5af3776740f7c4f782784dc14ebcdc3af9f7227ccc6bce8a59f1ebf202b1eb50f48b2b7a332b25958c00e
|
|
7
|
+
data.tar.gz: 4331c52faa2185690f4f6831a35bd3aee82b7f8b476f70075dce9cbb63eb57a0c1b61b724cedaccde95b0eaaf4a052d7b4ab8707fb58811de6a463ccc0fd89b5
|
data/CHANGELOG.md
CHANGED
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.44.0'
|
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
|
@@ -1863,8 +1863,9 @@ module Comet
|
|
|
1863
1863
|
#
|
|
1864
1864
|
# @param [String] target_id The live connection GUID
|
|
1865
1865
|
# @param [Comet::SSHConnection] credentials The SSH connection settings
|
|
1866
|
+
# @param [String] node The target node
|
|
1866
1867
|
# @return [Comet::BrowseProxmoxStorageResponse]
|
|
1867
|
-
def admin_dispatcher_request_browse_proxmox_storage(target_id, credentials)
|
|
1868
|
+
def admin_dispatcher_request_browse_proxmox_storage(target_id, credentials, node)
|
|
1868
1869
|
submit_params = {}
|
|
1869
1870
|
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1870
1871
|
|
|
@@ -1872,6 +1873,9 @@ module Comet
|
|
|
1872
1873
|
raise TypeError, "'credentials' expected Comet::SSHConnection, got #{credentials.class}" unless credentials.is_a? Comet::SSHConnection
|
|
1873
1874
|
|
|
1874
1875
|
submit_params['Credentials'] = credentials.to_json
|
|
1876
|
+
raise TypeError, "'node' expected String, got #{node.class}" unless node.is_a? String
|
|
1877
|
+
|
|
1878
|
+
submit_params['Node'] = node
|
|
1875
1879
|
|
|
1876
1880
|
body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox/storage', submit_params)
|
|
1877
1881
|
json_body = JSON.parse body
|
|
@@ -4680,6 +4684,102 @@ module Comet
|
|
|
4680
4684
|
ret
|
|
4681
4685
|
end
|
|
4682
4686
|
|
|
4687
|
+
# AdminSquotaDelete
|
|
4688
|
+
#
|
|
4689
|
+
# Delete a shared storage quota and detach all users.
|
|
4690
|
+
#
|
|
4691
|
+
# You must supply administrator authentication credentials to use this API.
|
|
4692
|
+
# This API requires the Auth Role to be enabled.
|
|
4693
|
+
#
|
|
4694
|
+
# @param [String] shared_storage_quota_id (No description available)
|
|
4695
|
+
# @return [Comet::CometAPIResponseMessage]
|
|
4696
|
+
def admin_squota_delete(shared_storage_quota_id)
|
|
4697
|
+
submit_params = {}
|
|
4698
|
+
raise TypeError, "'shared_storage_quota_id' expected String, got #{shared_storage_quota_id.class}" unless shared_storage_quota_id.is_a? String
|
|
4699
|
+
|
|
4700
|
+
submit_params['SharedStorageQuotaID'] = shared_storage_quota_id
|
|
4701
|
+
|
|
4702
|
+
body = perform_request('api/v1/admin/squota/delete', submit_params)
|
|
4703
|
+
json_body = JSON.parse body
|
|
4704
|
+
check_status json_body
|
|
4705
|
+
ret = Comet::CometAPIResponseMessage.new
|
|
4706
|
+
ret.from_hash(json_body)
|
|
4707
|
+
ret
|
|
4708
|
+
end
|
|
4709
|
+
|
|
4710
|
+
# AdminSquotaGetWithHash
|
|
4711
|
+
#
|
|
4712
|
+
# Get properties for a shared storage quota.
|
|
4713
|
+
#
|
|
4714
|
+
# You must supply administrator authentication credentials to use this API.
|
|
4715
|
+
# This API requires the Auth Role to be enabled.
|
|
4716
|
+
#
|
|
4717
|
+
# @param [String] shared_storage_quota_id (No description available)
|
|
4718
|
+
# @return [Comet::GetSharedStorageQuotaResponse]
|
|
4719
|
+
def admin_squota_get_with_hash(shared_storage_quota_id)
|
|
4720
|
+
submit_params = {}
|
|
4721
|
+
raise TypeError, "'shared_storage_quota_id' expected String, got #{shared_storage_quota_id.class}" unless shared_storage_quota_id.is_a? String
|
|
4722
|
+
|
|
4723
|
+
submit_params['SharedStorageQuotaID'] = shared_storage_quota_id
|
|
4724
|
+
|
|
4725
|
+
body = perform_request('api/v1/admin/squota/get-with-hash', submit_params)
|
|
4726
|
+
json_body = JSON.parse body
|
|
4727
|
+
check_status json_body
|
|
4728
|
+
ret = Comet::GetSharedStorageQuotaResponse.new
|
|
4729
|
+
ret.from_hash(json_body)
|
|
4730
|
+
ret
|
|
4731
|
+
end
|
|
4732
|
+
|
|
4733
|
+
# AdminSquotaListAll
|
|
4734
|
+
#
|
|
4735
|
+
# List available shared storage quota objects.
|
|
4736
|
+
#
|
|
4737
|
+
# You must supply administrator authentication credentials to use this API.
|
|
4738
|
+
# This API requires the Auth Role to be enabled.
|
|
4739
|
+
#
|
|
4740
|
+
# @return [Comet::ListSharedStorageQuotaResponse]
|
|
4741
|
+
def admin_squota_list_all
|
|
4742
|
+
body = perform_request('api/v1/admin/squota/list-all')
|
|
4743
|
+
json_body = JSON.parse body
|
|
4744
|
+
check_status json_body
|
|
4745
|
+
ret = Comet::ListSharedStorageQuotaResponse.new
|
|
4746
|
+
ret.from_hash(json_body)
|
|
4747
|
+
ret
|
|
4748
|
+
end
|
|
4749
|
+
|
|
4750
|
+
# AdminSquotaSetWithHash
|
|
4751
|
+
#
|
|
4752
|
+
# Create or update a shared storage quota.
|
|
4753
|
+
#
|
|
4754
|
+
# You must supply administrator authentication credentials to use this API.
|
|
4755
|
+
# This API requires the Auth Role to be enabled.
|
|
4756
|
+
#
|
|
4757
|
+
# @param [String] shared_storage_quota_id (No description available)
|
|
4758
|
+
# @param [Comet::SharedStorageQuota] shared_storage_quota (No description available)
|
|
4759
|
+
# @param [String] check_hash (Optional) If supplied, validate the change against this hash. Omit to forcibly apply changes.
|
|
4760
|
+
# @return [Comet::SetSharedStorageQuotaResponse]
|
|
4761
|
+
def admin_squota_set_with_hash(shared_storage_quota_id, shared_storage_quota, check_hash = nil)
|
|
4762
|
+
submit_params = {}
|
|
4763
|
+
raise TypeError, "'shared_storage_quota_id' expected String, got #{shared_storage_quota_id.class}" unless shared_storage_quota_id.is_a? String
|
|
4764
|
+
|
|
4765
|
+
submit_params['SharedStorageQuotaID'] = shared_storage_quota_id
|
|
4766
|
+
raise TypeError, "'shared_storage_quota' expected Comet::SharedStorageQuota, got #{shared_storage_quota.class}" unless shared_storage_quota.is_a? Comet::SharedStorageQuota
|
|
4767
|
+
|
|
4768
|
+
submit_params['SharedStorageQuota'] = shared_storage_quota.to_json
|
|
4769
|
+
unless check_hash.nil?
|
|
4770
|
+
raise TypeError, "'check_hash' expected String, got #{check_hash.class}" unless check_hash.is_a? String
|
|
4771
|
+
|
|
4772
|
+
submit_params['CheckHash'] = check_hash
|
|
4773
|
+
end
|
|
4774
|
+
|
|
4775
|
+
body = perform_request('api/v1/admin/squota/set-with-hash', submit_params)
|
|
4776
|
+
json_body = JSON.parse body
|
|
4777
|
+
check_status json_body
|
|
4778
|
+
ret = Comet::SetSharedStorageQuotaResponse.new
|
|
4779
|
+
ret.from_hash(json_body)
|
|
4780
|
+
ret
|
|
4781
|
+
end
|
|
4782
|
+
|
|
4683
4783
|
# AdminStorageBucketProperties
|
|
4684
4784
|
#
|
|
4685
4785
|
# Retrieve properties for a single bucket.
|
data/lib/comet/definitions.rb
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
module Comet
|
|
9
9
|
|
|
10
|
-
APPLICATION_VERSION = '25.9.
|
|
10
|
+
APPLICATION_VERSION = '25.9.8'
|
|
11
11
|
|
|
12
12
|
APPLICATION_VERSION_MAJOR = 25
|
|
13
13
|
|
|
14
14
|
APPLICATION_VERSION_MINOR = 9
|
|
15
15
|
|
|
16
|
-
APPLICATION_VERSION_REVISION =
|
|
16
|
+
APPLICATION_VERSION_REVISION = 8
|
|
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
|
|
@@ -972,6 +972,15 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
|
972
972
|
# StreamableEventType: UserGroup updated.
|
|
973
973
|
SEVT_USERGROUP_UPDATED = 4802
|
|
974
974
|
|
|
975
|
+
# StreamableEventType
|
|
976
|
+
SEVT_SQUOTA_NEW = 4803
|
|
977
|
+
|
|
978
|
+
# StreamableEventType
|
|
979
|
+
SEVT_SQUOTA_REMOVED = 4804
|
|
980
|
+
|
|
981
|
+
# StreamableEventType
|
|
982
|
+
SEVT_SQUOTA_UPDATED = 4805
|
|
983
|
+
|
|
975
984
|
# StreamableEventType
|
|
976
985
|
SEVT__MAX = 4999
|
|
977
986
|
|
|
@@ -236,6 +236,11 @@ module Comet
|
|
|
236
236
|
# @type [Number] storage_limit_bytes
|
|
237
237
|
attr_accessor :storage_limit_bytes
|
|
238
238
|
|
|
239
|
+
# If set, use a shared Storage Vault quota from the Comet Management Console. The direct value of
|
|
240
|
+
# StorageLimitBytes is ignored.
|
|
241
|
+
# @type [String] storage_limit_id
|
|
242
|
+
attr_accessor :storage_limit_id
|
|
243
|
+
|
|
239
244
|
# @type [Comet::DestinationStatistics] statistics
|
|
240
245
|
attr_accessor :statistics
|
|
241
246
|
|
|
@@ -316,6 +321,7 @@ module Comet
|
|
|
316
321
|
@encrypted_encryption_key = ''
|
|
317
322
|
@repo_init_timestamp = 0
|
|
318
323
|
@storage_limit_bytes = 0
|
|
324
|
+
@storage_limit_id = ''
|
|
319
325
|
@statistics = Comet::DestinationStatistics.new
|
|
320
326
|
@default_retention = Comet::RetentionPolicy.new
|
|
321
327
|
@retention_error = ''
|
|
@@ -582,6 +588,10 @@ module Comet
|
|
|
582
588
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
583
589
|
|
|
584
590
|
@storage_limit_bytes = v
|
|
591
|
+
when 'StorageLimitID'
|
|
592
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
593
|
+
|
|
594
|
+
@storage_limit_id = v
|
|
585
595
|
when 'Statistics'
|
|
586
596
|
@statistics = Comet::DestinationStatistics.new
|
|
587
597
|
@statistics.from_hash(v)
|
|
@@ -674,6 +684,7 @@ module Comet
|
|
|
674
684
|
ret['RepoInitTimestamp'] = @repo_init_timestamp
|
|
675
685
|
ret['StorageLimitEnabled'] = @storage_limit_enabled
|
|
676
686
|
ret['StorageLimitBytes'] = @storage_limit_bytes
|
|
687
|
+
ret['StorageLimitID'] = @storage_limit_id
|
|
677
688
|
unless @statistics.nil?
|
|
678
689
|
ret['Statistics'] = @statistics
|
|
679
690
|
end
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2025 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
|
+
# GetSharedStorageQuotaResponse is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
class GetSharedStorageQuotaResponse
|
|
14
|
+
|
|
15
|
+
# If the operation was successful, the status will be in the 200-299 range.
|
|
16
|
+
# @type [Number] status
|
|
17
|
+
attr_accessor :status
|
|
18
|
+
|
|
19
|
+
# @type [String] message
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
|
|
22
|
+
# @type [Comet::SharedStorageQuota] shared_storage_quota
|
|
23
|
+
attr_accessor :shared_storage_quota
|
|
24
|
+
|
|
25
|
+
# @type [String] shared_storage_quota_hash
|
|
26
|
+
attr_accessor :shared_storage_quota_hash
|
|
27
|
+
|
|
28
|
+
# Bytes
|
|
29
|
+
# @type [Number] current_usage
|
|
30
|
+
attr_accessor :current_usage
|
|
31
|
+
|
|
32
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
33
|
+
attr_accessor :unknown_json_fields
|
|
34
|
+
|
|
35
|
+
def initialize
|
|
36
|
+
clear
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def clear
|
|
40
|
+
@status = 0
|
|
41
|
+
@message = ''
|
|
42
|
+
@shared_storage_quota = Comet::SharedStorageQuota.new
|
|
43
|
+
@shared_storage_quota_hash = ''
|
|
44
|
+
@current_usage = 0
|
|
45
|
+
@unknown_json_fields = {}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# @param [String] json_string The complete object in JSON format
|
|
49
|
+
def from_json(json_string)
|
|
50
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
51
|
+
|
|
52
|
+
from_hash(JSON.parse(json_string))
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
56
|
+
def from_hash(obj)
|
|
57
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
58
|
+
|
|
59
|
+
obj.each do |k, v|
|
|
60
|
+
case k
|
|
61
|
+
when 'Status'
|
|
62
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
63
|
+
|
|
64
|
+
@status = v
|
|
65
|
+
when 'Message'
|
|
66
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
67
|
+
|
|
68
|
+
@message = v
|
|
69
|
+
when 'SharedStorageQuota'
|
|
70
|
+
@shared_storage_quota = Comet::SharedStorageQuota.new
|
|
71
|
+
@shared_storage_quota.from_hash(v)
|
|
72
|
+
when 'SharedStorageQuotaHash'
|
|
73
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
74
|
+
|
|
75
|
+
@shared_storage_quota_hash = v
|
|
76
|
+
when 'CurrentUsage'
|
|
77
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
78
|
+
|
|
79
|
+
@current_usage = v
|
|
80
|
+
else
|
|
81
|
+
@unknown_json_fields[k] = v
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
87
|
+
def to_hash
|
|
88
|
+
ret = {}
|
|
89
|
+
ret['Status'] = @status
|
|
90
|
+
ret['Message'] = @message
|
|
91
|
+
ret['SharedStorageQuota'] = @shared_storage_quota
|
|
92
|
+
ret['SharedStorageQuotaHash'] = @shared_storage_quota_hash
|
|
93
|
+
ret['CurrentUsage'] = @current_usage
|
|
94
|
+
@unknown_json_fields.each do |k, v|
|
|
95
|
+
ret[k] = v
|
|
96
|
+
end
|
|
97
|
+
ret
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
101
|
+
def to_h
|
|
102
|
+
to_hash
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @return [String] The complete object as a JSON string
|
|
106
|
+
def to_json(options = {})
|
|
107
|
+
to_hash.to_json(options)
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2025 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
|
+
# ListSharedStorageQuotaResponse is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
class ListSharedStorageQuotaResponse
|
|
14
|
+
|
|
15
|
+
# If the operation was successful, the status will be in the 200-299 range.
|
|
16
|
+
# @type [Number] status
|
|
17
|
+
attr_accessor :status
|
|
18
|
+
|
|
19
|
+
# @type [String] message
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
|
|
22
|
+
# @type [Hash{String => Comet::SharedStorageQuota}] entries
|
|
23
|
+
attr_accessor :entries
|
|
24
|
+
|
|
25
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
26
|
+
attr_accessor :unknown_json_fields
|
|
27
|
+
|
|
28
|
+
def initialize
|
|
29
|
+
clear
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def clear
|
|
33
|
+
@status = 0
|
|
34
|
+
@message = ''
|
|
35
|
+
@entries = {}
|
|
36
|
+
@unknown_json_fields = {}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @param [String] json_string The complete object in JSON format
|
|
40
|
+
def from_json(json_string)
|
|
41
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
42
|
+
|
|
43
|
+
from_hash(JSON.parse(json_string))
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
47
|
+
def from_hash(obj)
|
|
48
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
49
|
+
|
|
50
|
+
obj.each do |k, v|
|
|
51
|
+
case k
|
|
52
|
+
when 'Status'
|
|
53
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
54
|
+
|
|
55
|
+
@status = v
|
|
56
|
+
when 'Message'
|
|
57
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
58
|
+
|
|
59
|
+
@message = v
|
|
60
|
+
when 'Entries'
|
|
61
|
+
@entries = {}
|
|
62
|
+
if v.nil?
|
|
63
|
+
@entries = {}
|
|
64
|
+
else
|
|
65
|
+
v.each do |k1, v1|
|
|
66
|
+
@entries[k1] = Comet::SharedStorageQuota.new
|
|
67
|
+
@entries[k1].from_hash(v1)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
else
|
|
71
|
+
@unknown_json_fields[k] = v
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
77
|
+
def to_hash
|
|
78
|
+
ret = {}
|
|
79
|
+
ret['Status'] = @status
|
|
80
|
+
ret['Message'] = @message
|
|
81
|
+
ret['Entries'] = @entries
|
|
82
|
+
@unknown_json_fields.each do |k, v|
|
|
83
|
+
ret[k] = v
|
|
84
|
+
end
|
|
85
|
+
ret
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
89
|
+
def to_h
|
|
90
|
+
to_hash
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# @return [String] The complete object as a JSON string
|
|
94
|
+
def to_json(options = {})
|
|
95
|
+
to_hash.to_json(options)
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -19,6 +19,9 @@ module Comet
|
|
|
19
19
|
# @type [String] type
|
|
20
20
|
attr_accessor :type
|
|
21
21
|
|
|
22
|
+
# @type [Array<String>] content
|
|
23
|
+
attr_accessor :content
|
|
24
|
+
|
|
22
25
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
23
26
|
attr_accessor :unknown_json_fields
|
|
24
27
|
|
|
@@ -29,6 +32,7 @@ module Comet
|
|
|
29
32
|
def clear
|
|
30
33
|
@name = ''
|
|
31
34
|
@type = ''
|
|
35
|
+
@content = []
|
|
32
36
|
@unknown_json_fields = {}
|
|
33
37
|
end
|
|
34
38
|
|
|
@@ -53,6 +57,17 @@ module Comet
|
|
|
53
57
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
54
58
|
|
|
55
59
|
@type = v
|
|
60
|
+
when 'Content'
|
|
61
|
+
if v.nil?
|
|
62
|
+
@content = []
|
|
63
|
+
else
|
|
64
|
+
@content = Array.new(v.length)
|
|
65
|
+
v.each_with_index do |v1, i1|
|
|
66
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
|
67
|
+
|
|
68
|
+
@content[i1] = v1
|
|
69
|
+
end
|
|
70
|
+
end
|
|
56
71
|
else
|
|
57
72
|
@unknown_json_fields[k] = v
|
|
58
73
|
end
|
|
@@ -64,6 +79,7 @@ module Comet
|
|
|
64
79
|
ret = {}
|
|
65
80
|
ret['Name'] = @name
|
|
66
81
|
ret['Type'] = @type
|
|
82
|
+
ret['Content'] = @content
|
|
67
83
|
@unknown_json_fields.each do |k, v|
|
|
68
84
|
ret[k] = v
|
|
69
85
|
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2025 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
|
+
# SetSharedStorageQuotaResponse is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
class SetSharedStorageQuotaResponse
|
|
14
|
+
|
|
15
|
+
# If the operation was successful, the status will be in the 200-299 range.
|
|
16
|
+
# @type [Number] status
|
|
17
|
+
attr_accessor :status
|
|
18
|
+
|
|
19
|
+
# @type [String] message
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
|
|
22
|
+
# @type [String] shared_storage_quota_hash
|
|
23
|
+
attr_accessor :shared_storage_quota_hash
|
|
24
|
+
|
|
25
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
26
|
+
attr_accessor :unknown_json_fields
|
|
27
|
+
|
|
28
|
+
def initialize
|
|
29
|
+
clear
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def clear
|
|
33
|
+
@status = 0
|
|
34
|
+
@message = ''
|
|
35
|
+
@shared_storage_quota_hash = ''
|
|
36
|
+
@unknown_json_fields = {}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @param [String] json_string The complete object in JSON format
|
|
40
|
+
def from_json(json_string)
|
|
41
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
42
|
+
|
|
43
|
+
from_hash(JSON.parse(json_string))
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
47
|
+
def from_hash(obj)
|
|
48
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
49
|
+
|
|
50
|
+
obj.each do |k, v|
|
|
51
|
+
case k
|
|
52
|
+
when 'Status'
|
|
53
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
54
|
+
|
|
55
|
+
@status = v
|
|
56
|
+
when 'Message'
|
|
57
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
58
|
+
|
|
59
|
+
@message = v
|
|
60
|
+
when 'SharedStorageQuotaHash'
|
|
61
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
62
|
+
|
|
63
|
+
@shared_storage_quota_hash = v
|
|
64
|
+
else
|
|
65
|
+
@unknown_json_fields[k] = v
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
71
|
+
def to_hash
|
|
72
|
+
ret = {}
|
|
73
|
+
ret['Status'] = @status
|
|
74
|
+
ret['Message'] = @message
|
|
75
|
+
ret['SharedStorageQuotaHash'] = @shared_storage_quota_hash
|
|
76
|
+
@unknown_json_fields.each do |k, v|
|
|
77
|
+
ret[k] = v
|
|
78
|
+
end
|
|
79
|
+
ret
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
83
|
+
def to_h
|
|
84
|
+
to_hash
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# @return [String] The complete object as a JSON string
|
|
88
|
+
def to_json(options = {})
|
|
89
|
+
to_hash.to_json(options)
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2025 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
|
+
# SharedStorageQuota is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
# A SharedStorageQuota can be applied to multiple Storage Vaults in the
|
|
14
|
+
# 'DestinationConfig.StorageLimitID' field.
|
|
15
|
+
class SharedStorageQuota
|
|
16
|
+
|
|
17
|
+
# @type [String] description
|
|
18
|
+
attr_accessor :description
|
|
19
|
+
|
|
20
|
+
# @type [String] organization_id
|
|
21
|
+
attr_accessor :organization_id
|
|
22
|
+
|
|
23
|
+
# Bytes
|
|
24
|
+
# @type [Number] limit_bytes
|
|
25
|
+
attr_accessor :limit_bytes
|
|
26
|
+
|
|
27
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
28
|
+
attr_accessor :unknown_json_fields
|
|
29
|
+
|
|
30
|
+
def initialize
|
|
31
|
+
clear
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def clear
|
|
35
|
+
@description = ''
|
|
36
|
+
@organization_id = ''
|
|
37
|
+
@limit_bytes = 0
|
|
38
|
+
@unknown_json_fields = {}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# @param [String] json_string The complete object in JSON format
|
|
42
|
+
def from_json(json_string)
|
|
43
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
44
|
+
|
|
45
|
+
from_hash(JSON.parse(json_string))
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
49
|
+
def from_hash(obj)
|
|
50
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
51
|
+
|
|
52
|
+
obj.each do |k, v|
|
|
53
|
+
case k
|
|
54
|
+
when 'Description'
|
|
55
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
56
|
+
|
|
57
|
+
@description = v
|
|
58
|
+
when 'OrganizationID'
|
|
59
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
60
|
+
|
|
61
|
+
@organization_id = v
|
|
62
|
+
when 'LimitBytes'
|
|
63
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
64
|
+
|
|
65
|
+
@limit_bytes = v
|
|
66
|
+
else
|
|
67
|
+
@unknown_json_fields[k] = v
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
73
|
+
def to_hash
|
|
74
|
+
ret = {}
|
|
75
|
+
ret['Description'] = @description
|
|
76
|
+
ret['OrganizationID'] = @organization_id
|
|
77
|
+
ret['LimitBytes'] = @limit_bytes
|
|
78
|
+
@unknown_json_fields.each do |k, v|
|
|
79
|
+
ret[k] = v
|
|
80
|
+
end
|
|
81
|
+
ret
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
85
|
+
def to_h
|
|
86
|
+
to_hash
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @return [String] The complete object as a JSON string
|
|
90
|
+
def to_json(options = {})
|
|
91
|
+
to_hash.to_json(options)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -92,6 +92,7 @@ require_relative 'comet/models/ftpdestination_location'
|
|
|
92
92
|
require_relative 'comet/models/get_group_policy_response'
|
|
93
93
|
require_relative 'comet/models/get_profile_and_hash_response_message'
|
|
94
94
|
require_relative 'comet/models/get_profile_hash_response_message'
|
|
95
|
+
require_relative 'comet/models/get_shared_storage_quota_response'
|
|
95
96
|
require_relative 'comet/models/get_user_group_response'
|
|
96
97
|
require_relative 'comet/models/get_user_group_with_users_response'
|
|
97
98
|
require_relative 'comet/models/global_override_options'
|
|
@@ -108,6 +109,7 @@ require_relative 'comet/models/install_token_response'
|
|
|
108
109
|
require_relative 'comet/models/job_entry'
|
|
109
110
|
require_relative 'comet/models/license_limits'
|
|
110
111
|
require_relative 'comet/models/license_options'
|
|
112
|
+
require_relative 'comet/models/list_shared_storage_quota_response'
|
|
111
113
|
require_relative 'comet/models/live_user_connection'
|
|
112
114
|
require_relative 'comet/models/local_destination_location'
|
|
113
115
|
require_relative 'comet/models/local_storage_directory'
|
|
@@ -180,7 +182,9 @@ require_relative 'comet/models/server_meta_branding_properties'
|
|
|
180
182
|
require_relative 'comet/models/server_meta_version_info'
|
|
181
183
|
require_relative 'comet/models/session_key_regenerated_response'
|
|
182
184
|
require_relative 'comet/models/session_options'
|
|
185
|
+
require_relative 'comet/models/set_shared_storage_quota_response'
|
|
183
186
|
require_relative 'comet/models/sftpdestination_location'
|
|
187
|
+
require_relative 'comet/models/shared_storage_quota'
|
|
184
188
|
require_relative 'comet/models/single_field_source'
|
|
185
189
|
require_relative 'comet/models/size_measurement'
|
|
186
190
|
require_relative 'comet/models/smbdestination_location'
|
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.44.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: 2025-
|
|
11
|
+
date: 2025-12-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -170,6 +170,7 @@ files:
|
|
|
170
170
|
- lib/comet/models/get_group_policy_response.rb
|
|
171
171
|
- lib/comet/models/get_profile_and_hash_response_message.rb
|
|
172
172
|
- lib/comet/models/get_profile_hash_response_message.rb
|
|
173
|
+
- lib/comet/models/get_shared_storage_quota_response.rb
|
|
173
174
|
- lib/comet/models/get_user_group_response.rb
|
|
174
175
|
- lib/comet/models/get_user_group_with_users_response.rb
|
|
175
176
|
- lib/comet/models/global_override_options.rb
|
|
@@ -186,6 +187,7 @@ files:
|
|
|
186
187
|
- lib/comet/models/job_entry.rb
|
|
187
188
|
- lib/comet/models/license_limits.rb
|
|
188
189
|
- lib/comet/models/license_options.rb
|
|
190
|
+
- lib/comet/models/list_shared_storage_quota_response.rb
|
|
189
191
|
- lib/comet/models/live_user_connection.rb
|
|
190
192
|
- lib/comet/models/local_destination_location.rb
|
|
191
193
|
- lib/comet/models/local_storage_directory.rb
|
|
@@ -258,7 +260,9 @@ files:
|
|
|
258
260
|
- lib/comet/models/server_meta_version_info.rb
|
|
259
261
|
- lib/comet/models/session_key_regenerated_response.rb
|
|
260
262
|
- lib/comet/models/session_options.rb
|
|
263
|
+
- lib/comet/models/set_shared_storage_quota_response.rb
|
|
261
264
|
- lib/comet/models/sftpdestination_location.rb
|
|
265
|
+
- lib/comet/models/shared_storage_quota.rb
|
|
262
266
|
- lib/comet/models/single_field_source.rb
|
|
263
267
|
- lib/comet/models/size_measurement.rb
|
|
264
268
|
- lib/comet/models/smbdestination_location.rb
|