comet_backup_ruby_sdk 2.25.0 → 2.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +50 -1
- data/lib/comet/definitions.rb +36 -15
- data/lib/comet/models/admin_user_permissions.rb +9 -0
- data/lib/comet/models/amazon_awsvirtual_storage_role_settings.rb +14 -0
- data/lib/comet/models/custom_remote_bucket_settings.rb +17 -0
- data/lib/comet/models/destination_config.rb +18 -0
- data/lib/comet/models/destination_location.rb +8 -0
- data/lib/comet/models/external_authentication_source.rb +31 -1
- data/lib/comet/models/impossible_cloud_iamtemplate_settings.rb +131 -0
- data/lib/comet/models/impossible_cloud_partner_template_settings.rb +85 -0
- data/lib/comet/models/object_lock_storage_template_settings.rb +101 -0
- data/lib/comet/models/remote_server_address.rb +31 -1
- data/lib/comet/models/remote_storage_option.rb +31 -1
- data/lib/comet/models/replica_server.rb +31 -1
- data/lib/comet/models/restore_job_advanced_options.rb +7 -0
- data/lib/comet/models/s3generic_virtual_storage_role.rb +28 -0
- data/lib/comet/models/smbdestination_location.rb +109 -0
- data/lib/comet/models/source_config.rb +2 -0
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +15 -0
- data/lib/comet_backup_ruby_sdk.rb +4 -0
- metadata +6 -2
@@ -0,0 +1,85 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2024 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
|
+
# ImpossibleCloudPartnerTemplateSettings is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
# This type is available in Comet 24.3.1 and later.
|
14
|
+
class ImpossibleCloudPartnerTemplateSettings
|
15
|
+
|
16
|
+
# Optional. The region for your Partner console and for provisioning new buckets. If blank, uses the
|
17
|
+
# default region for Impossible Cloud (eu-central-2).
|
18
|
+
# @type [String] region
|
19
|
+
attr_accessor :region
|
20
|
+
|
21
|
+
# @type [String] access_key
|
22
|
+
attr_accessor :access_key
|
23
|
+
|
24
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
25
|
+
attr_accessor :unknown_json_fields
|
26
|
+
|
27
|
+
def initialize
|
28
|
+
clear
|
29
|
+
end
|
30
|
+
|
31
|
+
def clear
|
32
|
+
@region = ''
|
33
|
+
@access_key = ''
|
34
|
+
@unknown_json_fields = {}
|
35
|
+
end
|
36
|
+
|
37
|
+
# @param [String] json_string The complete object in JSON format
|
38
|
+
def from_json(json_string)
|
39
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
40
|
+
|
41
|
+
from_hash(JSON.parse(json_string))
|
42
|
+
end
|
43
|
+
|
44
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
45
|
+
def from_hash(obj)
|
46
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
47
|
+
|
48
|
+
obj.each do |k, v|
|
49
|
+
case k
|
50
|
+
when 'Region'
|
51
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
52
|
+
|
53
|
+
@region = v
|
54
|
+
when 'AccessKey'
|
55
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
56
|
+
|
57
|
+
@access_key = v
|
58
|
+
else
|
59
|
+
@unknown_json_fields[k] = v
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# @return [Hash] The complete object as a Ruby hash
|
65
|
+
def to_hash
|
66
|
+
ret = {}
|
67
|
+
ret['Region'] = @region
|
68
|
+
ret['AccessKey'] = @access_key
|
69
|
+
@unknown_json_fields.each do |k, v|
|
70
|
+
ret[k] = v
|
71
|
+
end
|
72
|
+
ret
|
73
|
+
end
|
74
|
+
|
75
|
+
# @return [Hash] The complete object as a Ruby hash
|
76
|
+
def to_h
|
77
|
+
to_hash
|
78
|
+
end
|
79
|
+
|
80
|
+
# @return [String] The complete object as a JSON string
|
81
|
+
def to_json(options = {})
|
82
|
+
to_hash.to_json(options)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2024 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
|
+
# ObjectLockStorageTemplateSettings is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class ObjectLockStorageTemplateSettings
|
14
|
+
|
15
|
+
# @type [Boolean] use_object_lock__legacy__do_not_use
|
16
|
+
# @deprecated This member has been deprecated since Comet version 23.x.x
|
17
|
+
attr_accessor :use_object_lock__legacy__do_not_use
|
18
|
+
|
19
|
+
# Control whether the resulting Storage Vaults are configured for Object Lock. One of the
|
20
|
+
# OBJECT_LOCK_ constants
|
21
|
+
# @type [Number] object_lock_mode
|
22
|
+
attr_accessor :object_lock_mode
|
23
|
+
|
24
|
+
# @type [Number] object_lock_days
|
25
|
+
attr_accessor :object_lock_days
|
26
|
+
|
27
|
+
# Control whether the "Allow removal of deleted files" checkbox is enabled for Storage Vaults
|
28
|
+
# generated from this Storage Template.
|
29
|
+
# When configuring a Storage Template from the Comet Server web interface, this field is set
|
30
|
+
# automatically for Storage Templates using Object Lock.
|
31
|
+
# @type [Boolean] remove_deleted
|
32
|
+
attr_accessor :remove_deleted
|
33
|
+
|
34
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
35
|
+
attr_accessor :unknown_json_fields
|
36
|
+
|
37
|
+
def initialize
|
38
|
+
clear
|
39
|
+
end
|
40
|
+
|
41
|
+
def clear
|
42
|
+
@object_lock_mode = 0
|
43
|
+
@object_lock_days = 0
|
44
|
+
@unknown_json_fields = {}
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param [String] json_string The complete object in JSON format
|
48
|
+
def from_json(json_string)
|
49
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
50
|
+
|
51
|
+
from_hash(JSON.parse(json_string))
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
55
|
+
def from_hash(obj)
|
56
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
57
|
+
|
58
|
+
obj.each do |k, v|
|
59
|
+
case k
|
60
|
+
when 'UseObjectLock'
|
61
|
+
@use_object_lock__legacy__do_not_use = v
|
62
|
+
when 'ObjectLockMode'
|
63
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
64
|
+
|
65
|
+
@object_lock_mode = v
|
66
|
+
when 'ObjectLockDays'
|
67
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
68
|
+
|
69
|
+
@object_lock_days = v
|
70
|
+
when 'RemoveDeleted'
|
71
|
+
@remove_deleted = v
|
72
|
+
else
|
73
|
+
@unknown_json_fields[k] = v
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# @return [Hash] The complete object as a Ruby hash
|
79
|
+
def to_hash
|
80
|
+
ret = {}
|
81
|
+
ret['UseObjectLock'] = @use_object_lock__legacy__do_not_use
|
82
|
+
ret['ObjectLockMode'] = @object_lock_mode
|
83
|
+
ret['ObjectLockDays'] = @object_lock_days
|
84
|
+
ret['RemoveDeleted'] = @remove_deleted
|
85
|
+
@unknown_json_fields.each do |k, v|
|
86
|
+
ret[k] = v
|
87
|
+
end
|
88
|
+
ret
|
89
|
+
end
|
90
|
+
|
91
|
+
# @return [Hash] The complete object as a Ruby hash
|
92
|
+
def to_h
|
93
|
+
to_hash
|
94
|
+
end
|
95
|
+
|
96
|
+
# @return [String] The complete object as a JSON string
|
97
|
+
def to_json(options = {})
|
98
|
+
to_hash.to_json(options)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -18,12 +18,15 @@ module Comet
|
|
18
18
|
# @type [String] description
|
19
19
|
attr_accessor :description
|
20
20
|
|
21
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
21
22
|
# @type [String] remote_address
|
22
23
|
attr_accessor :remote_address
|
23
24
|
|
25
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
24
26
|
# @type [String] username
|
25
27
|
attr_accessor :username
|
26
28
|
|
29
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
27
30
|
# @type [String] password
|
28
31
|
attr_accessor :password
|
29
32
|
|
@@ -33,25 +36,38 @@ module Comet
|
|
33
36
|
# @type [Comet::OidcConfig] oidc
|
34
37
|
attr_accessor :oidc
|
35
38
|
|
39
|
+
# Backblaze B2 (Storage Template / Constellation)
|
36
40
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
37
41
|
attr_accessor :b2
|
38
42
|
|
43
|
+
# Wasabi, or Comet Storage powered by Wasabi (Storage Template / Constellation)
|
39
44
|
# @type [Comet::WasabiVirtualStorageRoleSettings] wasabi
|
40
45
|
attr_accessor :wasabi
|
41
46
|
|
47
|
+
# Custom Remote Bucket HTTP protocol (Storage Template)
|
42
48
|
# @type [Comet::CustomRemoteBucketSettings] custom
|
43
49
|
attr_accessor :custom
|
44
50
|
|
51
|
+
# IDrive e2, or Custom IAM-compatible (Storage Template / Constellation)
|
45
52
|
# @type [Comet::S3GenericVirtualStorageRole] s3
|
46
53
|
attr_accessor :s3
|
47
54
|
|
48
|
-
# Amazon AWS
|
55
|
+
# Amazon AWS (Storage Template / Constellation)
|
49
56
|
# @type [Comet::AmazonAWSVirtualStorageRoleSettings] aws
|
50
57
|
attr_accessor :aws
|
51
58
|
|
59
|
+
# Storj (Storage Template / Constellation)
|
52
60
|
# @type [Comet::StorjVirtualStorageRoleSetting] storj
|
53
61
|
attr_accessor :storj
|
54
62
|
|
63
|
+
# Impossible Cloud Partner API (Storage Template / Constellation)
|
64
|
+
# @type [Comet::ImpossibleCloudPartnerTemplateSettings] imp_partner
|
65
|
+
attr_accessor :imp_partner
|
66
|
+
|
67
|
+
# Impossible Cloud IAM API (Storage Template / Constellation)
|
68
|
+
# @type [Comet::ImpossibleCloudIAMTemplateSettings] imp_user
|
69
|
+
attr_accessor :imp_user
|
70
|
+
|
55
71
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
56
72
|
attr_accessor :unknown_json_fields
|
57
73
|
|
@@ -73,6 +89,8 @@ module Comet
|
|
73
89
|
@s3 = Comet::S3GenericVirtualStorageRole.new
|
74
90
|
@aws = Comet::AmazonAWSVirtualStorageRoleSettings.new
|
75
91
|
@storj = Comet::StorjVirtualStorageRoleSetting.new
|
92
|
+
@imp_partner = Comet::ImpossibleCloudPartnerTemplateSettings.new
|
93
|
+
@imp_user = Comet::ImpossibleCloudIAMTemplateSettings.new
|
76
94
|
@unknown_json_fields = {}
|
77
95
|
end
|
78
96
|
|
@@ -133,6 +151,12 @@ module Comet
|
|
133
151
|
when 'Storj'
|
134
152
|
@storj = Comet::StorjVirtualStorageRoleSetting.new
|
135
153
|
@storj.from_hash(v)
|
154
|
+
when 'ImpPartner'
|
155
|
+
@imp_partner = Comet::ImpossibleCloudPartnerTemplateSettings.new
|
156
|
+
@imp_partner.from_hash(v)
|
157
|
+
when 'ImpUser'
|
158
|
+
@imp_user = Comet::ImpossibleCloudIAMTemplateSettings.new
|
159
|
+
@imp_user.from_hash(v)
|
136
160
|
else
|
137
161
|
@unknown_json_fields[k] = v
|
138
162
|
end
|
@@ -177,6 +201,12 @@ module Comet
|
|
177
201
|
unless @storj.nil?
|
178
202
|
ret['Storj'] = @storj
|
179
203
|
end
|
204
|
+
unless @imp_partner.nil?
|
205
|
+
ret['ImpPartner'] = @imp_partner
|
206
|
+
end
|
207
|
+
unless @imp_user.nil?
|
208
|
+
ret['ImpUser'] = @imp_user
|
209
|
+
end
|
180
210
|
@unknown_json_fields.each do |k, v|
|
181
211
|
ret[k] = v
|
182
212
|
end
|
@@ -18,12 +18,15 @@ module Comet
|
|
18
18
|
# @type [String] description
|
19
19
|
attr_accessor :description
|
20
20
|
|
21
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
21
22
|
# @type [String] remote_address
|
22
23
|
attr_accessor :remote_address
|
23
24
|
|
25
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
24
26
|
# @type [String] username
|
25
27
|
attr_accessor :username
|
26
28
|
|
29
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
27
30
|
# @type [String] password
|
28
31
|
attr_accessor :password
|
29
32
|
|
@@ -33,25 +36,38 @@ module Comet
|
|
33
36
|
# @type [Comet::OidcConfig] oidc
|
34
37
|
attr_accessor :oidc
|
35
38
|
|
39
|
+
# Backblaze B2 (Storage Template / Constellation)
|
36
40
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
37
41
|
attr_accessor :b2
|
38
42
|
|
43
|
+
# Wasabi, or Comet Storage powered by Wasabi (Storage Template / Constellation)
|
39
44
|
# @type [Comet::WasabiVirtualStorageRoleSettings] wasabi
|
40
45
|
attr_accessor :wasabi
|
41
46
|
|
47
|
+
# Custom Remote Bucket HTTP protocol (Storage Template)
|
42
48
|
# @type [Comet::CustomRemoteBucketSettings] custom
|
43
49
|
attr_accessor :custom
|
44
50
|
|
51
|
+
# IDrive e2, or Custom IAM-compatible (Storage Template / Constellation)
|
45
52
|
# @type [Comet::S3GenericVirtualStorageRole] s3
|
46
53
|
attr_accessor :s3
|
47
54
|
|
48
|
-
# Amazon AWS
|
55
|
+
# Amazon AWS (Storage Template / Constellation)
|
49
56
|
# @type [Comet::AmazonAWSVirtualStorageRoleSettings] aws
|
50
57
|
attr_accessor :aws
|
51
58
|
|
59
|
+
# Storj (Storage Template / Constellation)
|
52
60
|
# @type [Comet::StorjVirtualStorageRoleSetting] storj
|
53
61
|
attr_accessor :storj
|
54
62
|
|
63
|
+
# Impossible Cloud Partner API (Storage Template / Constellation)
|
64
|
+
# @type [Comet::ImpossibleCloudPartnerTemplateSettings] imp_partner
|
65
|
+
attr_accessor :imp_partner
|
66
|
+
|
67
|
+
# Impossible Cloud IAM API (Storage Template / Constellation)
|
68
|
+
# @type [Comet::ImpossibleCloudIAMTemplateSettings] imp_user
|
69
|
+
attr_accessor :imp_user
|
70
|
+
|
55
71
|
# @type [Boolean] storage_limit_enabled
|
56
72
|
attr_accessor :storage_limit_enabled
|
57
73
|
|
@@ -82,6 +98,8 @@ module Comet
|
|
82
98
|
@s3 = Comet::S3GenericVirtualStorageRole.new
|
83
99
|
@aws = Comet::AmazonAWSVirtualStorageRoleSettings.new
|
84
100
|
@storj = Comet::StorjVirtualStorageRoleSetting.new
|
101
|
+
@imp_partner = Comet::ImpossibleCloudPartnerTemplateSettings.new
|
102
|
+
@imp_user = Comet::ImpossibleCloudIAMTemplateSettings.new
|
85
103
|
@storage_limit_bytes = 0
|
86
104
|
@unknown_json_fields = {}
|
87
105
|
end
|
@@ -143,6 +161,12 @@ module Comet
|
|
143
161
|
when 'Storj'
|
144
162
|
@storj = Comet::StorjVirtualStorageRoleSetting.new
|
145
163
|
@storj.from_hash(v)
|
164
|
+
when 'ImpPartner'
|
165
|
+
@imp_partner = Comet::ImpossibleCloudPartnerTemplateSettings.new
|
166
|
+
@imp_partner.from_hash(v)
|
167
|
+
when 'ImpUser'
|
168
|
+
@imp_user = Comet::ImpossibleCloudIAMTemplateSettings.new
|
169
|
+
@imp_user.from_hash(v)
|
146
170
|
when 'StorageLimitEnabled'
|
147
171
|
@storage_limit_enabled = v
|
148
172
|
when 'StorageLimitBytes'
|
@@ -195,6 +219,12 @@ module Comet
|
|
195
219
|
unless @storj.nil?
|
196
220
|
ret['Storj'] = @storj
|
197
221
|
end
|
222
|
+
unless @imp_partner.nil?
|
223
|
+
ret['ImpPartner'] = @imp_partner
|
224
|
+
end
|
225
|
+
unless @imp_user.nil?
|
226
|
+
ret['ImpUser'] = @imp_user
|
227
|
+
end
|
198
228
|
ret['StorageLimitEnabled'] = @storage_limit_enabled
|
199
229
|
ret['StorageLimitBytes'] = @storage_limit_bytes
|
200
230
|
ret['RebrandStorage'] = @rebrand_storage
|
@@ -18,12 +18,15 @@ module Comet
|
|
18
18
|
# @type [String] description
|
19
19
|
attr_accessor :description
|
20
20
|
|
21
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
21
22
|
# @type [String] remote_address
|
22
23
|
attr_accessor :remote_address
|
23
24
|
|
25
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
24
26
|
# @type [String] username
|
25
27
|
attr_accessor :username
|
26
28
|
|
29
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
27
30
|
# @type [String] password
|
28
31
|
attr_accessor :password
|
29
32
|
|
@@ -33,25 +36,38 @@ module Comet
|
|
33
36
|
# @type [Comet::OidcConfig] oidc
|
34
37
|
attr_accessor :oidc
|
35
38
|
|
39
|
+
# Backblaze B2 (Storage Template / Constellation)
|
36
40
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
37
41
|
attr_accessor :b2
|
38
42
|
|
43
|
+
# Wasabi, or Comet Storage powered by Wasabi (Storage Template / Constellation)
|
39
44
|
# @type [Comet::WasabiVirtualStorageRoleSettings] wasabi
|
40
45
|
attr_accessor :wasabi
|
41
46
|
|
47
|
+
# Custom Remote Bucket HTTP protocol (Storage Template)
|
42
48
|
# @type [Comet::CustomRemoteBucketSettings] custom
|
43
49
|
attr_accessor :custom
|
44
50
|
|
51
|
+
# IDrive e2, or Custom IAM-compatible (Storage Template / Constellation)
|
45
52
|
# @type [Comet::S3GenericVirtualStorageRole] s3
|
46
53
|
attr_accessor :s3
|
47
54
|
|
48
|
-
# Amazon AWS
|
55
|
+
# Amazon AWS (Storage Template / Constellation)
|
49
56
|
# @type [Comet::AmazonAWSVirtualStorageRoleSettings] aws
|
50
57
|
attr_accessor :aws
|
51
58
|
|
59
|
+
# Storj (Storage Template / Constellation)
|
52
60
|
# @type [Comet::StorjVirtualStorageRoleSetting] storj
|
53
61
|
attr_accessor :storj
|
54
62
|
|
63
|
+
# Impossible Cloud Partner API (Storage Template / Constellation)
|
64
|
+
# @type [Comet::ImpossibleCloudPartnerTemplateSettings] imp_partner
|
65
|
+
attr_accessor :imp_partner
|
66
|
+
|
67
|
+
# Impossible Cloud IAM API (Storage Template / Constellation)
|
68
|
+
# @type [Comet::ImpossibleCloudIAMTemplateSettings] imp_user
|
69
|
+
attr_accessor :imp_user
|
70
|
+
|
55
71
|
# @type [String] replica_deletion_strategy
|
56
72
|
attr_accessor :replica_deletion_strategy
|
57
73
|
|
@@ -76,6 +92,8 @@ module Comet
|
|
76
92
|
@s3 = Comet::S3GenericVirtualStorageRole.new
|
77
93
|
@aws = Comet::AmazonAWSVirtualStorageRoleSettings.new
|
78
94
|
@storj = Comet::StorjVirtualStorageRoleSetting.new
|
95
|
+
@imp_partner = Comet::ImpossibleCloudPartnerTemplateSettings.new
|
96
|
+
@imp_user = Comet::ImpossibleCloudIAMTemplateSettings.new
|
79
97
|
@replica_deletion_strategy = ''
|
80
98
|
@unknown_json_fields = {}
|
81
99
|
end
|
@@ -137,6 +155,12 @@ module Comet
|
|
137
155
|
when 'Storj'
|
138
156
|
@storj = Comet::StorjVirtualStorageRoleSetting.new
|
139
157
|
@storj.from_hash(v)
|
158
|
+
when 'ImpPartner'
|
159
|
+
@imp_partner = Comet::ImpossibleCloudPartnerTemplateSettings.new
|
160
|
+
@imp_partner.from_hash(v)
|
161
|
+
when 'ImpUser'
|
162
|
+
@imp_user = Comet::ImpossibleCloudIAMTemplateSettings.new
|
163
|
+
@imp_user.from_hash(v)
|
140
164
|
when 'ReplicaDeletionStrategy'
|
141
165
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
142
166
|
|
@@ -185,6 +209,12 @@ module Comet
|
|
185
209
|
unless @storj.nil?
|
186
210
|
ret['Storj'] = @storj
|
187
211
|
end
|
212
|
+
unless @imp_partner.nil?
|
213
|
+
ret['ImpPartner'] = @imp_partner
|
214
|
+
end
|
215
|
+
unless @imp_user.nil?
|
216
|
+
ret['ImpUser'] = @imp_user
|
217
|
+
end
|
188
218
|
unless @replica_deletion_strategy.nil?
|
189
219
|
ret['ReplicaDeletionStrategy'] = @replica_deletion_strategy
|
190
220
|
end
|
@@ -24,6 +24,10 @@ module Comet
|
|
24
24
|
# @type [Boolean] overwrite_if_newer
|
25
25
|
attr_accessor :overwrite_if_newer
|
26
26
|
|
27
|
+
# For RESTORETYPE_FILE. If set, OverwriteExistingFiles must be true
|
28
|
+
# @type [Boolean] overwrite_if_different_content
|
29
|
+
attr_accessor :overwrite_if_different_content
|
30
|
+
|
27
31
|
# For RESTORETYPE_FILE. If set, DestPath must be blank
|
28
32
|
# @type [Boolean] dest_is_original_location
|
29
33
|
attr_accessor :dest_is_original_location
|
@@ -143,6 +147,8 @@ module Comet
|
|
143
147
|
@overwrite_existing_files = v
|
144
148
|
when 'OverwriteIfNewer'
|
145
149
|
@overwrite_if_newer = v
|
150
|
+
when 'OverwriteIfDifferentContent'
|
151
|
+
@overwrite_if_different_content = v
|
146
152
|
when 'DestIsOriginalLocation'
|
147
153
|
@dest_is_original_location = v
|
148
154
|
when 'DestPath'
|
@@ -218,6 +224,7 @@ module Comet
|
|
218
224
|
ret['Type'] = @type
|
219
225
|
ret['OverwriteExistingFiles'] = @overwrite_existing_files
|
220
226
|
ret['OverwriteIfNewer'] = @overwrite_if_newer
|
227
|
+
ret['OverwriteIfDifferentContent'] = @overwrite_if_different_content
|
221
228
|
ret['DestIsOriginalLocation'] = @dest_is_original_location
|
222
229
|
ret['DestPath'] = @dest_path
|
223
230
|
ret['ExactDestPaths'] = @exact_dest_paths
|
@@ -12,12 +12,21 @@ module Comet
|
|
12
12
|
# S3GenericVirtualStorageRole is a typed class wrapper around the underlying Comet Server API data structure.
|
13
13
|
class S3GenericVirtualStorageRole
|
14
14
|
|
15
|
+
# The URL for S3 API calls (e.g. "s3.amazonaws.com")
|
15
16
|
# @type [String] s3endpoint
|
16
17
|
attr_accessor :s3endpoint
|
17
18
|
|
19
|
+
# The URL for IAM API calls (e.g. "iam.amazonaws.com")
|
18
20
|
# @type [String] iamendpoint
|
19
21
|
attr_accessor :iamendpoint
|
20
22
|
|
23
|
+
# If set, the Storage Template will generate Storage Vaults pointing to a subdirectory within this
|
24
|
+
# bucket. A single dynamic IAM policy will cover all created Storage Vaults.
|
25
|
+
# This is preferable for platforms that have limits on the total number of IAM policies. However, it
|
26
|
+
# requires a high level of IAM compatibility.
|
27
|
+
# If left blank, the Storage Template will generate Storage Vaults pointing to new, separate S3
|
28
|
+
# buckets each time. An additional IAM policy is created for each new Storage Vault.
|
29
|
+
# This is preferable for platforms that have a lower level of IAM compatibility.
|
21
30
|
# @type [String] master_bucket
|
22
31
|
attr_accessor :master_bucket
|
23
32
|
|
@@ -28,17 +37,30 @@ module Comet
|
|
28
37
|
attr_accessor :secret_key
|
29
38
|
|
30
39
|
# @type [Boolean] use_object_lock__legacy__do_not_use
|
40
|
+
# @deprecated This member has been deprecated since Comet version 23.x.x
|
31
41
|
attr_accessor :use_object_lock__legacy__do_not_use
|
32
42
|
|
43
|
+
# Control whether the resulting Storage Vaults are configured for Object Lock. One of the
|
44
|
+
# OBJECT_LOCK_ constants
|
33
45
|
# @type [Number] object_lock_mode
|
34
46
|
attr_accessor :object_lock_mode
|
35
47
|
|
36
48
|
# @type [Number] object_lock_days
|
37
49
|
attr_accessor :object_lock_days
|
38
50
|
|
51
|
+
# Control whether the "Allow removal of deleted files" checkbox is enabled for Storage Vaults
|
52
|
+
# generated from this Storage Template.
|
53
|
+
# When configuring a Storage Template from the Comet Server web interface, this field is set
|
54
|
+
# automatically for Storage Templates using Object Lock.
|
39
55
|
# @type [Boolean] remove_deleted
|
40
56
|
attr_accessor :remove_deleted
|
41
57
|
|
58
|
+
# Optional. The region to be used for new buckets. If blank, uses the default region for the
|
59
|
+
# S3-compatible provider (e.g. us-east-1).
|
60
|
+
# This field is available in Comet 24.3.1 and later.
|
61
|
+
# @type [String] region
|
62
|
+
attr_accessor :region
|
63
|
+
|
42
64
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
43
65
|
attr_accessor :unknown_json_fields
|
44
66
|
|
@@ -54,6 +76,7 @@ module Comet
|
|
54
76
|
@secret_key = ''
|
55
77
|
@object_lock_mode = 0
|
56
78
|
@object_lock_days = 0
|
79
|
+
@region = ''
|
57
80
|
@unknown_json_fields = {}
|
58
81
|
end
|
59
82
|
|
@@ -102,6 +125,10 @@ module Comet
|
|
102
125
|
@object_lock_days = v
|
103
126
|
when 'RemoveDeleted'
|
104
127
|
@remove_deleted = v
|
128
|
+
when 'Region'
|
129
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
130
|
+
|
131
|
+
@region = v
|
105
132
|
else
|
106
133
|
@unknown_json_fields[k] = v
|
107
134
|
end
|
@@ -120,6 +147,7 @@ module Comet
|
|
120
147
|
ret['ObjectLockMode'] = @object_lock_mode
|
121
148
|
ret['ObjectLockDays'] = @object_lock_days
|
122
149
|
ret['RemoveDeleted'] = @remove_deleted
|
150
|
+
ret['Region'] = @region
|
123
151
|
@unknown_json_fields.each do |k, v|
|
124
152
|
ret[k] = v
|
125
153
|
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2024 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
|
+
# SMBDestinationLocation is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class SMBDestinationLocation
|
14
|
+
|
15
|
+
# @type [String] smbserver
|
16
|
+
attr_accessor :smbserver
|
17
|
+
|
18
|
+
# @type [String] smbshare
|
19
|
+
attr_accessor :smbshare
|
20
|
+
|
21
|
+
# @type [String] smbdirectory
|
22
|
+
attr_accessor :smbdirectory
|
23
|
+
|
24
|
+
# @type [String] smbusername
|
25
|
+
attr_accessor :smbusername
|
26
|
+
|
27
|
+
# @type [String] smbpassword
|
28
|
+
attr_accessor :smbpassword
|
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
|
+
@smbserver = ''
|
39
|
+
@smbshare = ''
|
40
|
+
@smbdirectory = ''
|
41
|
+
@smbusername = ''
|
42
|
+
@smbpassword = ''
|
43
|
+
@unknown_json_fields = {}
|
44
|
+
end
|
45
|
+
|
46
|
+
# @param [String] json_string The complete object in JSON format
|
47
|
+
def from_json(json_string)
|
48
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
49
|
+
|
50
|
+
from_hash(JSON.parse(json_string))
|
51
|
+
end
|
52
|
+
|
53
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
54
|
+
def from_hash(obj)
|
55
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
56
|
+
|
57
|
+
obj.each do |k, v|
|
58
|
+
case k
|
59
|
+
when 'SMBServer'
|
60
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
61
|
+
|
62
|
+
@smbserver = v
|
63
|
+
when 'SMBShare'
|
64
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
65
|
+
|
66
|
+
@smbshare = v
|
67
|
+
when 'SMBDirectory'
|
68
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
69
|
+
|
70
|
+
@smbdirectory = v
|
71
|
+
when 'SMBUsername'
|
72
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
73
|
+
|
74
|
+
@smbusername = v
|
75
|
+
when 'SMBPassword'
|
76
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
77
|
+
|
78
|
+
@smbpassword = v
|
79
|
+
else
|
80
|
+
@unknown_json_fields[k] = v
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# @return [Hash] The complete object as a Ruby hash
|
86
|
+
def to_hash
|
87
|
+
ret = {}
|
88
|
+
ret['SMBServer'] = @smbserver
|
89
|
+
ret['SMBShare'] = @smbshare
|
90
|
+
ret['SMBDirectory'] = @smbdirectory
|
91
|
+
ret['SMBUsername'] = @smbusername
|
92
|
+
ret['SMBPassword'] = @smbpassword
|
93
|
+
@unknown_json_fields.each do |k, v|
|
94
|
+
ret[k] = v
|
95
|
+
end
|
96
|
+
ret
|
97
|
+
end
|
98
|
+
|
99
|
+
# @return [Hash] The complete object as a Ruby hash
|
100
|
+
def to_h
|
101
|
+
to_hash
|
102
|
+
end
|
103
|
+
|
104
|
+
# @return [String] The complete object as a JSON string
|
105
|
+
def to_json(options = {})
|
106
|
+
to_hash.to_json(options)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -59,6 +59,8 @@ module Comet
|
|
59
59
|
# - USE_WIN_VSS: If present, the 'Take filesystem snapshot' checkbox is checked
|
60
60
|
# - CONFIRM_EFS: If present, the 'Dismiss EFS warning' checkbox is checked
|
61
61
|
# - RESCAN_UNCHANGED: If present, the 'Rescan unchanged files' checkbox is checked
|
62
|
+
# - EXTRA_ATTRIBUTES: If present, the 'Back up extra system permissions and attributes' checkbox is
|
63
|
+
# checked
|
62
64
|
#
|
63
65
|
# For engine1/mssql, Comet understands the following EngineProp keys:
|
64
66
|
#
|