comet_backup_ruby_sdk 2.9.0 → 2.11.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/.gitignore +0 -0
- data/.rubocop.yml +0 -0
- data/CHANGELOG.md +16 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +1 -1
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +137 -1
- data/lib/comet/definitions.rb +47 -9
- data/lib/comet/models/admin_account_properties_response.rb +1 -0
- data/lib/comet/models/admin_security_options.rb +4 -0
- data/lib/comet/models/admin_u2fregistration.rb +2 -0
- data/lib/comet/models/admin_user_permissions.rb +81 -0
- data/lib/comet/models/admin_web_authn_registration.rb +2 -0
- data/lib/comet/models/allowed_admin_user.rb +4 -0
- data/lib/comet/models/authentication_role_options.rb +2 -0
- data/lib/comet/models/branding_options.rb +6 -1
- data/lib/comet/models/branding_properties.rb +6 -1
- data/lib/comet/models/bucket_properties.rb +2 -0
- data/lib/comet/models/constellation_stats.rb +5 -0
- data/lib/comet/models/device_config.rb +12 -0
- data/lib/comet/models/email_reporting_option.rb +2 -0
- data/lib/comet/models/external_authentication_source.rb +10 -0
- data/lib/comet/models/external_authentication_source_display.rb +82 -0
- data/lib/comet/models/external_authentication_source_response.rb +99 -0
- data/lib/comet/models/external_ldapauthentication_source_server.rb +1 -0
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +1 -0
- data/lib/comet/models/install_token.rb +5 -0
- data/lib/comet/models/mac_oscode_sign_properties.rb +6 -0
- data/lib/comet/models/mssqlconnection.rb +3 -0
- data/lib/comet/models/news_entry.rb +1 -0
- data/lib/comet/models/oidc_claim.rb +84 -0
- data/lib/comet/models/oidc_config.rb +203 -0
- data/lib/comet/models/osinfo.rb +30 -0
- data/lib/comet/models/partition.rb +5 -0
- data/lib/comet/models/private_branding_properties.rb +6 -1
- data/lib/comet/models/psaconfig.rb +4 -0
- data/lib/comet/models/remote_server_address.rb +10 -0
- data/lib/comet/models/remote_storage_option.rb +10 -0
- data/lib/comet/models/replica_server.rb +10 -0
- data/lib/comet/models/restore_job_advanced_options.rb +19 -0
- data/lib/comet/models/retention_range.rb +8 -0
- data/lib/comet/models/search_clause.rb +16 -0
- data/lib/comet/models/self_backup_export_options.rb +1 -0
- data/lib/comet/models/self_backup_target.rb +1 -0
- data/lib/comet/models/server_config_options.rb +1 -0
- data/lib/comet/models/server_meta_branding_properties.rb +19 -0
- data/lib/comet/models/server_meta_version_info.rb +2 -0
- data/lib/comet/models/session_key_regenerated_response.rb +2 -0
- data/lib/comet/models/single_field_source.rb +1 -0
- data/lib/comet/models/software_update_news_response.rb +4 -0
- data/lib/comet/models/source_basic_info.rb +2 -0
- data/lib/comet/models/source_config.rb +20 -0
- data/lib/comet/models/storage_role_options.rb +1 -0
- data/lib/comet/models/totp_regenerated_response.rb +3 -0
- data/lib/comet/models/update_campaign_device_status.rb +1 -0
- data/lib/comet/models/update_campaign_properties.rb +1 -0
- data/lib/comet/models/update_campaign_status.rb +1 -0
- data/lib/comet/models/update_campaign_status_device_entry.rb +1 -0
- data/lib/comet/models/user_policy.rb +6 -0
- data/lib/comet/models/vault_snapshot.rb +1 -0
- data/lib/comet/models/vsscomponent.rb +1 -0
- data/lib/comet/models/web_authn_credential.rb +2 -0
- data/lib/comet/models/web_authn_credential_descriptor.rb +1 -0
- data/lib/comet/models/web_authn_public_key_credential_creation_options.rb +1 -0
- data/lib/comet/models/web_authn_public_key_credential_request_options.rb +1 -0
- data/lib/comet/models/web_authn_user_entity.rb +1 -0
- data/lib/comet/models/windows_code_sign_properties.rb +5 -1
- data/lib/comet_backup_ruby_sdk.rb +4 -0
- metadata +6 -2
@@ -0,0 +1,203 @@
|
|
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
|
+
# OidcConfig is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class OidcConfig
|
14
|
+
|
15
|
+
# @type [String] display_name
|
16
|
+
attr_accessor :display_name
|
17
|
+
|
18
|
+
# @type [Array<String>] hosts
|
19
|
+
attr_accessor :hosts
|
20
|
+
|
21
|
+
# @type [String] organization_id
|
22
|
+
attr_accessor :organization_id
|
23
|
+
|
24
|
+
# @type [String] provider
|
25
|
+
attr_accessor :provider
|
26
|
+
|
27
|
+
# @type [String] client_id
|
28
|
+
attr_accessor :client_id
|
29
|
+
|
30
|
+
# @type [String] client_secret
|
31
|
+
attr_accessor :client_secret
|
32
|
+
|
33
|
+
# @type [Boolean] skip_mfa
|
34
|
+
attr_accessor :skip_mfa
|
35
|
+
|
36
|
+
# @type [Array<String>] scopes
|
37
|
+
attr_accessor :scopes
|
38
|
+
|
39
|
+
# @type [Array<Comet::OidcClaim>] required_claims
|
40
|
+
attr_accessor :required_claims
|
41
|
+
|
42
|
+
# @type [String] generic_op_discovery_document_url
|
43
|
+
attr_accessor :generic_op_discovery_document_url
|
44
|
+
|
45
|
+
# @type [String] azure_adv2op_tenant_id
|
46
|
+
attr_accessor :azure_adv2op_tenant_id
|
47
|
+
|
48
|
+
# @type [String] google_op_hosted_domain
|
49
|
+
attr_accessor :google_op_hosted_domain
|
50
|
+
|
51
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
52
|
+
attr_accessor :unknown_json_fields
|
53
|
+
|
54
|
+
def initialize
|
55
|
+
clear
|
56
|
+
end
|
57
|
+
|
58
|
+
def clear
|
59
|
+
@display_name = ''
|
60
|
+
@hosts = []
|
61
|
+
@organization_id = ''
|
62
|
+
@provider = ''
|
63
|
+
@client_id = ''
|
64
|
+
@client_secret = ''
|
65
|
+
@scopes = []
|
66
|
+
@required_claims = []
|
67
|
+
@generic_op_discovery_document_url = ''
|
68
|
+
@azure_adv2op_tenant_id = ''
|
69
|
+
@google_op_hosted_domain = ''
|
70
|
+
@unknown_json_fields = {}
|
71
|
+
end
|
72
|
+
|
73
|
+
# @param [String] json_string The complete object in JSON format
|
74
|
+
def from_json(json_string)
|
75
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
76
|
+
|
77
|
+
from_hash(JSON.parse(json_string))
|
78
|
+
end
|
79
|
+
|
80
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
81
|
+
def from_hash(obj)
|
82
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
83
|
+
|
84
|
+
obj.each do |k, v|
|
85
|
+
case k
|
86
|
+
when 'DisplayName'
|
87
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
88
|
+
|
89
|
+
@display_name = v
|
90
|
+
when 'Hosts'
|
91
|
+
if v.nil?
|
92
|
+
@hosts = []
|
93
|
+
else
|
94
|
+
@hosts = Array.new(v.length)
|
95
|
+
v.each_with_index do |v1, i1|
|
96
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
97
|
+
|
98
|
+
@hosts[i1] = v1
|
99
|
+
end
|
100
|
+
end
|
101
|
+
when 'OrganizationID'
|
102
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
103
|
+
|
104
|
+
@organization_id = v
|
105
|
+
when 'Provider'
|
106
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
107
|
+
|
108
|
+
@provider = v
|
109
|
+
when 'ClientID'
|
110
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
111
|
+
|
112
|
+
@client_id = v
|
113
|
+
when 'ClientSecret'
|
114
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
115
|
+
|
116
|
+
@client_secret = v
|
117
|
+
when 'SkipMFA'
|
118
|
+
@skip_mfa = v
|
119
|
+
when 'Scopes'
|
120
|
+
if v.nil?
|
121
|
+
@scopes = []
|
122
|
+
else
|
123
|
+
@scopes = Array.new(v.length)
|
124
|
+
v.each_with_index do |v1, i1|
|
125
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
126
|
+
|
127
|
+
@scopes[i1] = v1
|
128
|
+
end
|
129
|
+
end
|
130
|
+
when 'RequiredClaims'
|
131
|
+
if v.nil?
|
132
|
+
@required_claims = []
|
133
|
+
else
|
134
|
+
@required_claims = Array.new(v.length)
|
135
|
+
v.each_with_index do |v1, i1|
|
136
|
+
@required_claims[i1] = Comet::OidcClaim.new
|
137
|
+
@required_claims[i1].from_hash(v1)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
when 'DiscoveryDocumentURL'
|
141
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
142
|
+
|
143
|
+
@generic_op_discovery_document_url = v
|
144
|
+
when 'AzureTenantID'
|
145
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
146
|
+
|
147
|
+
@azure_adv2op_tenant_id = v
|
148
|
+
when 'GoogleHostedDomain'
|
149
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
150
|
+
|
151
|
+
@google_op_hosted_domain = v
|
152
|
+
else
|
153
|
+
@unknown_json_fields[k] = v
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# @return [Hash] The complete object as a Ruby hash
|
159
|
+
def to_hash
|
160
|
+
ret = {}
|
161
|
+
ret['DisplayName'] = @display_name
|
162
|
+
unless @hosts.nil?
|
163
|
+
ret['Hosts'] = @hosts
|
164
|
+
end
|
165
|
+
unless @organization_id.nil?
|
166
|
+
ret['OrganizationID'] = @organization_id
|
167
|
+
end
|
168
|
+
ret['Provider'] = @provider
|
169
|
+
ret['ClientID'] = @client_id
|
170
|
+
ret['ClientSecret'] = @client_secret
|
171
|
+
ret['SkipMFA'] = @skip_mfa
|
172
|
+
unless @scopes.nil?
|
173
|
+
ret['Scopes'] = @scopes
|
174
|
+
end
|
175
|
+
unless @required_claims.nil?
|
176
|
+
ret['RequiredClaims'] = @required_claims
|
177
|
+
end
|
178
|
+
unless @generic_op_discovery_document_url.nil?
|
179
|
+
ret['DiscoveryDocumentURL'] = @generic_op_discovery_document_url
|
180
|
+
end
|
181
|
+
unless @azure_adv2op_tenant_id.nil?
|
182
|
+
ret['AzureTenantID'] = @azure_adv2op_tenant_id
|
183
|
+
end
|
184
|
+
unless @google_op_hosted_domain.nil?
|
185
|
+
ret['GoogleHostedDomain'] = @google_op_hosted_domain
|
186
|
+
end
|
187
|
+
@unknown_json_fields.each do |k, v|
|
188
|
+
ret[k] = v
|
189
|
+
end
|
190
|
+
ret
|
191
|
+
end
|
192
|
+
|
193
|
+
# @return [Hash] The complete object as a Ruby hash
|
194
|
+
def to_h
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# @return [String] The complete object as a JSON string
|
199
|
+
def to_json(options = {})
|
200
|
+
to_hash.to_json(options)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
data/lib/comet/models/osinfo.rb
CHANGED
@@ -10,17 +10,31 @@ require 'json'
|
|
10
10
|
module Comet
|
11
11
|
|
12
12
|
# OSInfo is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
# OSInfo represents the common set of version information between all operating systems
|
13
14
|
class OSInfo
|
14
15
|
|
16
|
+
# The primary version number (e.g. on Windows: 1703 / 2009, on Linux: 20.04 / 22.04)
|
15
17
|
# @type [String] version
|
16
18
|
attr_accessor :version
|
17
19
|
|
20
|
+
# The primary presentation name (e.g. "Windows 10 Pro", "debian", "Synology DSM")
|
18
21
|
# @type [String] distribution
|
19
22
|
attr_accessor :distribution
|
20
23
|
|
24
|
+
# The detailed build number (e.g. 19043)
|
21
25
|
# @type [String] build
|
22
26
|
attr_accessor :build
|
23
27
|
|
28
|
+
# The GOOS value
|
29
|
+
# This field is available in Comet 23.6.0 and later.
|
30
|
+
# @type [String] os
|
31
|
+
attr_accessor :os
|
32
|
+
|
33
|
+
# The GOARCH value
|
34
|
+
# This field is available in Comet 23.6.0 and later.
|
35
|
+
# @type [String] arch
|
36
|
+
attr_accessor :arch
|
37
|
+
|
24
38
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
25
39
|
attr_accessor :unknown_json_fields
|
26
40
|
|
@@ -32,6 +46,8 @@ module Comet
|
|
32
46
|
@version = ''
|
33
47
|
@distribution = ''
|
34
48
|
@build = ''
|
49
|
+
@os = ''
|
50
|
+
@arch = ''
|
35
51
|
@unknown_json_fields = {}
|
36
52
|
end
|
37
53
|
|
@@ -60,6 +76,14 @@ module Comet
|
|
60
76
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
61
77
|
|
62
78
|
@build = v
|
79
|
+
when 'os'
|
80
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
81
|
+
|
82
|
+
@os = v
|
83
|
+
when 'arch'
|
84
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
85
|
+
|
86
|
+
@arch = v
|
63
87
|
else
|
64
88
|
@unknown_json_fields[k] = v
|
65
89
|
end
|
@@ -78,6 +102,12 @@ module Comet
|
|
78
102
|
unless @build.nil?
|
79
103
|
ret['build'] = @build
|
80
104
|
end
|
105
|
+
unless @os.nil?
|
106
|
+
ret['os'] = @os
|
107
|
+
end
|
108
|
+
unless @arch.nil?
|
109
|
+
ret['arch'] = @arch
|
110
|
+
end
|
81
111
|
@unknown_json_fields.each do |k, v|
|
82
112
|
ret[k] = v
|
83
113
|
end
|
@@ -15,6 +15,7 @@ module Comet
|
|
15
15
|
# @type [String] device_name
|
16
16
|
attr_accessor :device_name
|
17
17
|
|
18
|
+
# The name of the filesystem used on this partition (e.g. "NTFS")
|
18
19
|
# @type [String] filesystem
|
19
20
|
attr_accessor :filesystem
|
20
21
|
|
@@ -30,12 +31,16 @@ module Comet
|
|
30
31
|
# @type [Array<String>] mount_points
|
31
32
|
attr_accessor :mount_points
|
32
33
|
|
34
|
+
# Bytes. The partition's offset within the DeviceName. It will be zero if this partition has a
|
35
|
+
# direct DeviceName handle.
|
33
36
|
# @type [Number] read_offset
|
34
37
|
attr_accessor :read_offset
|
35
38
|
|
39
|
+
# Bytes
|
36
40
|
# @type [Number] size
|
37
41
|
attr_accessor :size
|
38
42
|
|
43
|
+
# Bytes. Only present for supported filesystems that are currently mounted by the OS
|
39
44
|
# @type [Number] used_size
|
40
45
|
attr_accessor :used_size
|
41
46
|
|
@@ -12,6 +12,7 @@ module Comet
|
|
12
12
|
# PrivateBrandingProperties is a typed class wrapper around the underlying Comet Server API data structure.
|
13
13
|
class PrivateBrandingProperties
|
14
14
|
|
15
|
+
# One of the CLIENTBRANDINGBUILD_ constants
|
15
16
|
# @type [Number] build_mode
|
16
17
|
attr_accessor :build_mode
|
17
18
|
|
@@ -39,12 +40,14 @@ module Comet
|
|
39
40
|
# @type [String] package_identifier
|
40
41
|
attr_accessor :package_identifier
|
41
42
|
|
43
|
+
# One of the WINDOWSCODESIGN_METHOD_ constants
|
42
44
|
# @type [Number] windows_code_sign_method
|
43
45
|
attr_accessor :windows_code_sign_method
|
44
46
|
|
45
47
|
# @type [String] windows_code_sign_pkcs12file_path
|
46
48
|
attr_accessor :windows_code_sign_pkcs12file_path
|
47
49
|
|
50
|
+
# One of the ENCRYPTIONMETHOD_ constants
|
48
51
|
# @type [Number] windows_code_sign_pkcs12password_format
|
49
52
|
attr_accessor :windows_code_sign_pkcs12password_format
|
50
53
|
|
@@ -57,13 +60,14 @@ module Comet
|
|
57
60
|
# @type [String] windows_code_sign_pkcs11module
|
58
61
|
attr_accessor :windows_code_sign_pkcs11module
|
59
62
|
|
63
|
+
# This field was deprecated between 23.3.0 and 23.6.x, but is now used again.
|
60
64
|
# @type [String] windows_code_sign_pkcs11certfile
|
61
|
-
# @deprecated This member has been deprecated since Comet version 22.12.7
|
62
65
|
attr_accessor :windows_code_sign_pkcs11certfile
|
63
66
|
|
64
67
|
# @type [String] windows_code_sign_pkcs11key_id
|
65
68
|
attr_accessor :windows_code_sign_pkcs11key_id
|
66
69
|
|
70
|
+
# One of the ENCRYPTIONMETHOD_ constants
|
67
71
|
# @type [Number] windows_code_sign_pkcs11password_format
|
68
72
|
attr_accessor :windows_code_sign_pkcs11password_format
|
69
73
|
|
@@ -79,6 +83,7 @@ module Comet
|
|
79
83
|
# @type [String] windows_code_sign_azure_app_id
|
80
84
|
attr_accessor :windows_code_sign_azure_app_id
|
81
85
|
|
86
|
+
# One of the ENCRYPTIONMETHOD_ constants
|
82
87
|
# @type [Number] windows_code_sign_azure_app_secret_format
|
83
88
|
attr_accessor :windows_code_sign_azure_app_secret_format
|
84
89
|
|
@@ -12,18 +12,22 @@ 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
|
+
# For PSA_TYPE_GRADIENT. Defaults to enabled
|
15
16
|
# @type [Boolean] alerts_disabled
|
16
17
|
attr_accessor :alerts_disabled
|
17
18
|
|
18
19
|
# @type [Hash{String => String}] custom_headers
|
19
20
|
attr_accessor :custom_headers
|
20
21
|
|
22
|
+
# Specified credentials for the target PSA
|
21
23
|
# @type [String] partner_key
|
22
24
|
attr_accessor :partner_key
|
23
25
|
|
26
|
+
# One of the PSA_TYPE_ constants
|
24
27
|
# @type [Number] type
|
25
28
|
attr_accessor :type
|
26
29
|
|
30
|
+
# For PSA_TYPE_GENERIC
|
27
31
|
# @type [String] url
|
28
32
|
attr_accessor :url
|
29
33
|
|
@@ -30,6 +30,9 @@ module Comet
|
|
30
30
|
# @type [Comet::ExternalLDAPAuthenticationSourceSettings] ldap
|
31
31
|
attr_accessor :ldap
|
32
32
|
|
33
|
+
# @type [Comet::OidcConfig] oidc
|
34
|
+
attr_accessor :oidc
|
35
|
+
|
33
36
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
34
37
|
attr_accessor :b2
|
35
38
|
|
@@ -63,6 +66,7 @@ module Comet
|
|
63
66
|
@username = ''
|
64
67
|
@password = ''
|
65
68
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
69
|
+
@oidc = Comet::OidcConfig.new
|
66
70
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
67
71
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
68
72
|
@custom = Comet::CustomRemoteBucketSettings.new
|
@@ -108,6 +112,9 @@ module Comet
|
|
108
112
|
when 'LDAP'
|
109
113
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
110
114
|
@ldap.from_hash(v)
|
115
|
+
when 'OIDC'
|
116
|
+
@oidc = Comet::OidcConfig.new
|
117
|
+
@oidc.from_hash(v)
|
111
118
|
when 'B2'
|
112
119
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
113
120
|
@b2.from_hash(v)
|
@@ -149,6 +156,9 @@ module Comet
|
|
149
156
|
unless @ldap.nil?
|
150
157
|
ret['LDAP'] = @ldap
|
151
158
|
end
|
159
|
+
unless @oidc.nil?
|
160
|
+
ret['OIDC'] = @oidc
|
161
|
+
end
|
152
162
|
unless @b2.nil?
|
153
163
|
ret['B2'] = @b2
|
154
164
|
end
|
@@ -30,6 +30,9 @@ module Comet
|
|
30
30
|
# @type [Comet::ExternalLDAPAuthenticationSourceSettings] ldap
|
31
31
|
attr_accessor :ldap
|
32
32
|
|
33
|
+
# @type [Comet::OidcConfig] oidc
|
34
|
+
attr_accessor :oidc
|
35
|
+
|
33
36
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
34
37
|
attr_accessor :b2
|
35
38
|
|
@@ -72,6 +75,7 @@ module Comet
|
|
72
75
|
@username = ''
|
73
76
|
@password = ''
|
74
77
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
78
|
+
@oidc = Comet::OidcConfig.new
|
75
79
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
76
80
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
77
81
|
@custom = Comet::CustomRemoteBucketSettings.new
|
@@ -118,6 +122,9 @@ module Comet
|
|
118
122
|
when 'LDAP'
|
119
123
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
120
124
|
@ldap.from_hash(v)
|
125
|
+
when 'OIDC'
|
126
|
+
@oidc = Comet::OidcConfig.new
|
127
|
+
@oidc.from_hash(v)
|
121
128
|
when 'B2'
|
122
129
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
123
130
|
@b2.from_hash(v)
|
@@ -167,6 +174,9 @@ module Comet
|
|
167
174
|
unless @ldap.nil?
|
168
175
|
ret['LDAP'] = @ldap
|
169
176
|
end
|
177
|
+
unless @oidc.nil?
|
178
|
+
ret['OIDC'] = @oidc
|
179
|
+
end
|
170
180
|
unless @b2.nil?
|
171
181
|
ret['B2'] = @b2
|
172
182
|
end
|
@@ -30,6 +30,9 @@ module Comet
|
|
30
30
|
# @type [Comet::ExternalLDAPAuthenticationSourceSettings] ldap
|
31
31
|
attr_accessor :ldap
|
32
32
|
|
33
|
+
# @type [Comet::OidcConfig] oidc
|
34
|
+
attr_accessor :oidc
|
35
|
+
|
33
36
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
34
37
|
attr_accessor :b2
|
35
38
|
|
@@ -66,6 +69,7 @@ module Comet
|
|
66
69
|
@username = ''
|
67
70
|
@password = ''
|
68
71
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
72
|
+
@oidc = Comet::OidcConfig.new
|
69
73
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
70
74
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
71
75
|
@custom = Comet::CustomRemoteBucketSettings.new
|
@@ -112,6 +116,9 @@ module Comet
|
|
112
116
|
when 'LDAP'
|
113
117
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
114
118
|
@ldap.from_hash(v)
|
119
|
+
when 'OIDC'
|
120
|
+
@oidc = Comet::OidcConfig.new
|
121
|
+
@oidc.from_hash(v)
|
115
122
|
when 'B2'
|
116
123
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
117
124
|
@b2.from_hash(v)
|
@@ -157,6 +164,9 @@ module Comet
|
|
157
164
|
unless @ldap.nil?
|
158
165
|
ret['LDAP'] = @ldap
|
159
166
|
end
|
167
|
+
unless @oidc.nil?
|
168
|
+
ret['OIDC'] = @oidc
|
169
|
+
end
|
160
170
|
unless @b2.nil?
|
161
171
|
ret['B2'] = @b2
|
162
172
|
end
|
@@ -41,6 +41,19 @@ module Comet
|
|
41
41
|
# @type [Number] archive_format
|
42
42
|
attr_accessor :archive_format
|
43
43
|
|
44
|
+
# Default disabled. For RESTORETYPE_FILE and RESTORETYPE_WINDISK. Used to continue the restore job
|
45
|
+
# when unreadable data chunks are found.
|
46
|
+
# Corresponds to the "Allow partial file restores (zero-out unrecoverable data)" option
|
47
|
+
# This field is available in Comet 23.6.4 and later.
|
48
|
+
# @type [Boolean] skip_unreadable_chunks
|
49
|
+
attr_accessor :skip_unreadable_chunks
|
50
|
+
|
51
|
+
# Default disabled. Used to store the index files on disk instead of in memory.
|
52
|
+
# Corresponds to the "Prefer temporary files instead of RAM (slower)" option
|
53
|
+
# This field is available in Comet 23.6.4 and later.
|
54
|
+
# @type [Boolean] on_disk_indexes_key
|
55
|
+
attr_accessor :on_disk_indexes_key
|
56
|
+
|
44
57
|
# For RESTORETYPE_OFFICE365_CLOUD.
|
45
58
|
# @type [Comet::Office365Credential] office_365credential
|
46
59
|
attr_accessor :office_365credential
|
@@ -151,6 +164,10 @@ module Comet
|
|
151
164
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
152
165
|
|
153
166
|
@archive_format = v
|
167
|
+
when 'SkipUnreadableChunks'
|
168
|
+
@skip_unreadable_chunks = v
|
169
|
+
when 'OnDiskIndexesKey'
|
170
|
+
@on_disk_indexes_key = v
|
154
171
|
when 'Office365Credential'
|
155
172
|
@office_365credential = Comet::Office365Credential.new
|
156
173
|
@office_365credential.from_hash(v)
|
@@ -205,6 +222,8 @@ module Comet
|
|
205
222
|
ret['DestPath'] = @dest_path
|
206
223
|
ret['ExactDestPaths'] = @exact_dest_paths
|
207
224
|
ret['ArchiveFormat'] = @archive_format
|
225
|
+
ret['SkipUnreadableChunks'] = @skip_unreadable_chunks
|
226
|
+
ret['OnDiskIndexesKey'] = @on_disk_indexes_key
|
208
227
|
unless @office_365credential.nil?
|
209
228
|
ret['Office365Credential'] = @office_365credential
|
210
229
|
end
|
@@ -10,11 +10,15 @@ require 'json'
|
|
10
10
|
module Comet
|
11
11
|
|
12
12
|
# RetentionRange is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
# The Type field controls which fields of this data type are used. For additional information, see
|
14
|
+
# the notes on the RETENTIONRANGE_ constants.
|
13
15
|
class RetentionRange
|
14
16
|
|
17
|
+
# One of the RETENTIONRANGE_ constants
|
15
18
|
# @type [Number] type
|
16
19
|
attr_accessor :type
|
17
20
|
|
21
|
+
# Unix timestamp, in seconds. Used by RETENTIONRANGE_NEWER_THAN_X.
|
18
22
|
# @type [Number] timestamp
|
19
23
|
attr_accessor :timestamp
|
20
24
|
|
@@ -34,6 +38,10 @@ module Comet
|
|
34
38
|
# @type [Number] week_offset
|
35
39
|
attr_accessor :week_offset
|
36
40
|
|
41
|
+
# 1: 1st, 31: 31st
|
42
|
+
# Prior to Comet version 23.6.2, 31 was treated as 30.
|
43
|
+
# For months that do not have a day equal to the specified offset, no backup will be retained.
|
44
|
+
# For example, if the offset is set to 30, no backup will be kept for February.
|
37
45
|
# @type [Number] month_offset
|
38
46
|
attr_accessor :month_offset
|
39
47
|
|
@@ -12,18 +12,34 @@ module Comet
|
|
12
12
|
# SearchClause is a typed class wrapper around the underlying Comet Server API data structure.
|
13
13
|
class SearchClause
|
14
14
|
|
15
|
+
# One of the SEARCHCLAUSE_ constants (e.g. empty-string if this is a rule, or "and"/"or" if there
|
16
|
+
# are ClauseChildren)
|
15
17
|
# @type [String] clause_type
|
16
18
|
attr_accessor :clause_type
|
17
19
|
|
20
|
+
# The field name to search. Check the specific API for more information about which fields are
|
21
|
+
# available for searching. For use with ClauseType = SEARCHCLAUSE_RULE.
|
18
22
|
# @type [String] rule_field
|
19
23
|
attr_accessor :rule_field
|
20
24
|
|
25
|
+
# One of the SEARCHOPERATOR_ constants. The operator must match the type of the particular field.
|
26
|
+
# For use with ClauseType = SEARCHCLAUSE_RULE.
|
21
27
|
# @type [String] rule_operator
|
22
28
|
attr_accessor :rule_operator
|
23
29
|
|
30
|
+
# The value to compare the field against.
|
31
|
+
# - If the field is a string, any string is permissable.
|
32
|
+
# - If the field is an integer, the integer should be cast to a base-10 string. There is currently
|
33
|
+
# no support for fractional or floating-point numbers.
|
34
|
+
# - If the field is a boolean, the following values can be used for true ("1", "t", "T", "true",
|
35
|
+
# "TRUE", "True") and the following values can be used for false ("0", "f", "F", "false", "FALSE",
|
36
|
+
# "False").
|
37
|
+
# For use with ClauseType = SEARCHCLAUSE_RULE.
|
24
38
|
# @type [String] rule_value
|
25
39
|
attr_accessor :rule_value
|
26
40
|
|
41
|
+
# If ClauseType is not SEARCHCLAUSE_RULE, the child rules will be applied according to the
|
42
|
+
# ClauseType (e.g. "and"/"or")
|
27
43
|
# @type [Array<Comet::SearchClause>] clause_children
|
28
44
|
attr_accessor :clause_children
|
29
45
|
|
@@ -42,6 +42,7 @@ module Comet
|
|
42
42
|
# @type [Hash{String => Comet::ExternalAuthenticationSource}] external_admin_user_sources
|
43
43
|
attr_accessor :external_admin_user_sources
|
44
44
|
|
45
|
+
# The Comet Server can enforce a bandwidth limit based on the target IP address
|
45
46
|
# @type [Comet::RatelimitOptions] iprate_limit
|
46
47
|
attr_accessor :iprate_limit
|
47
48
|
|
@@ -28,9 +28,11 @@ module Comet
|
|
28
28
|
# @type [String] image_etag
|
29
29
|
attr_accessor :image_etag
|
30
30
|
|
31
|
+
# Colour in RGB hex format (e.g. "#FFFFFF")
|
31
32
|
# @type [String] top_color
|
32
33
|
attr_accessor :top_color
|
33
34
|
|
35
|
+
# Colour in RGB hex format (e.g. "#FFFFFF")
|
34
36
|
# @type [String] accent_color
|
35
37
|
attr_accessor :accent_color
|
36
38
|
|
@@ -49,6 +51,9 @@ module Comet
|
|
49
51
|
# @type [Number] expired_in_seconds
|
50
52
|
attr_accessor :expired_in_seconds
|
51
53
|
|
54
|
+
# @type [Array<Comet::ExternalAuthenticationSourceDisplay>] external_authentication_sources
|
55
|
+
attr_accessor :external_authentication_sources
|
56
|
+
|
52
57
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
53
58
|
attr_accessor :unknown_json_fields
|
54
59
|
|
@@ -64,6 +69,7 @@ module Comet
|
|
64
69
|
@accent_color = ''
|
65
70
|
@prune_logs_after_days = 0
|
66
71
|
@expired_in_seconds = 0
|
72
|
+
@external_authentication_sources = []
|
67
73
|
@unknown_json_fields = {}
|
68
74
|
end
|
69
75
|
|
@@ -116,6 +122,16 @@ module Comet
|
|
116
122
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
117
123
|
|
118
124
|
@expired_in_seconds = v
|
125
|
+
when 'ExternalAuthenticationSources'
|
126
|
+
if v.nil?
|
127
|
+
@external_authentication_sources = []
|
128
|
+
else
|
129
|
+
@external_authentication_sources = Array.new(v.length)
|
130
|
+
v.each_with_index do |v1, i1|
|
131
|
+
@external_authentication_sources[i1] = Comet::ExternalAuthenticationSourceDisplay.new
|
132
|
+
@external_authentication_sources[i1].from_hash(v1)
|
133
|
+
end
|
134
|
+
end
|
119
135
|
else
|
120
136
|
@unknown_json_fields[k] = v
|
121
137
|
end
|
@@ -136,6 +152,9 @@ module Comet
|
|
136
152
|
ret['AllowAuthenticatedDownloads'] = @allow_authenticated_downloads
|
137
153
|
ret['PruneLogsAfterDays'] = @prune_logs_after_days
|
138
154
|
ret['ExpiredInSeconds'] = @expired_in_seconds
|
155
|
+
unless @external_authentication_sources.nil?
|
156
|
+
ret['ExternalAuthenticationSources'] = @external_authentication_sources
|
157
|
+
end
|
139
158
|
@unknown_json_fields.each do |k, v|
|
140
159
|
ret[k] = v
|
141
160
|
end
|
@@ -62,6 +62,7 @@ module Comet
|
|
62
62
|
# @type [Number] server_license_feature_set
|
63
63
|
attr_accessor :server_license_feature_set
|
64
64
|
|
65
|
+
# Unix timestamp, in seconds.
|
65
66
|
# @type [Number] license_valid_until
|
66
67
|
attr_accessor :license_valid_until
|
67
68
|
|
@@ -89,6 +90,7 @@ module Comet
|
|
89
90
|
# @type [Boolean] scheduled_email_thread_last_wake_sent_emails
|
90
91
|
attr_accessor :scheduled_email_thread_last_wake_sent_emails
|
91
92
|
|
93
|
+
# This field is available in Comet 21.3.2 and later.
|
92
94
|
# @type [Array<Comet::SelfBackupStatistics>] self_backup
|
93
95
|
attr_accessor :self_backup
|
94
96
|
|