comet_backup_ruby_sdk 1.7.0 → 1.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 +1 -0
- data/CHANGELOG.md +27 -0
- data/Gemfile.lock +3 -3
- data/README.md +1 -1
- data/RELEASING.md +1 -0
- data/comet_backup_ruby_sdk.gemspec +2 -2
- data/lib/comet/comet_server.rb +171 -3
- data/lib/comet/definitions.rb +26 -2
- data/lib/comet/models/admin_security_options.rb +23 -0
- data/lib/comet/models/admin_web_authn_registration.rb +112 -0
- data/lib/comet/models/allowed_admin_user.rb +212 -0
- data/lib/comet/models/b2destination_location.rb +8 -0
- data/lib/comet/models/b2virtual_storage_role_settings.rb +6 -0
- data/lib/comet/models/browse_office_365list_virtual_accounts_response.rb +99 -0
- data/lib/comet/models/device_config.rb +11 -0
- data/lib/comet/models/dispatcher_windisk_snapshot_response.rb +99 -0
- data/lib/comet/models/email_report_generated_preview.rb +25 -0
- data/lib/comet/models/my_sqlconnection.rb +39 -0
- data/lib/comet/models/office_365connection.rb +8 -0
- data/lib/comet/models/office_365custom_setting_v2.rb +108 -0
- data/lib/comet/models/office_365mixed_virtual_account.rb +203 -0
- data/lib/comet/models/server_meta_branding_properties.rb +9 -0
- data/lib/comet/models/stat_result.rb +9 -0
- data/lib/comet/models/web_authn_authenticator_selection.rb +96 -0
- data/lib/comet/models/web_authn_credential.rb +105 -0
- data/lib/comet/models/web_authn_credential_assertion.rb +74 -0
- data/lib/comet/models/web_authn_credential_descriptor.rb +101 -0
- data/lib/comet/models/web_authn_credential_entity.rb +86 -0
- data/lib/comet/models/web_authn_credential_parameter.rb +84 -0
- data/lib/comet/models/web_authn_public_key_credential_creation_options.rb +173 -0
- data/lib/comet/models/web_authn_public_key_credential_request_options.rb +141 -0
- data/lib/comet/models/web_authn_registration_challenge_response.rb +101 -0
- data/lib/comet/models/web_authn_relying_party_entity.rb +95 -0
- data/lib/comet/models/web_authn_sign_request.rb +83 -0
- data/lib/comet/models/web_authn_sign_response.rb +84 -0
- data/lib/comet/models/web_authn_user_entity.rb +105 -0
- data/lib/comet/models/webhook_option.rb +16 -0
- data/lib/comet_backup_ruby_sdk.rb +19 -0
- metadata +24 -4
@@ -0,0 +1,212 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
#
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
module Comet
|
13
|
+
|
14
|
+
# AllowedAdminUser is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class AllowedAdminUser
|
16
|
+
|
17
|
+
# @type [String] username
|
18
|
+
attr_accessor :username
|
19
|
+
|
20
|
+
# @type [String] organization_id
|
21
|
+
attr_accessor :organization_id
|
22
|
+
|
23
|
+
# @type [String] external_authentication_source
|
24
|
+
attr_accessor :external_authentication_source
|
25
|
+
|
26
|
+
# @type [Number] password_format
|
27
|
+
attr_accessor :password_format
|
28
|
+
|
29
|
+
# @type [String] password
|
30
|
+
attr_accessor :password
|
31
|
+
|
32
|
+
# @type [Boolean] allow_password_login
|
33
|
+
attr_accessor :allow_password_login
|
34
|
+
|
35
|
+
# @type [Boolean] allow_password_and_totplogin
|
36
|
+
attr_accessor :allow_password_and_totplogin
|
37
|
+
|
38
|
+
# @type [Boolean] allow_password_and_u2flogin
|
39
|
+
attr_accessor :allow_password_and_u2flogin
|
40
|
+
|
41
|
+
# @type [Boolean] allow_password_and_web_authn_login
|
42
|
+
attr_accessor :allow_password_and_web_authn_login
|
43
|
+
|
44
|
+
# @type [Array<Comet::AdminU2FRegistration>] u2fregistrations
|
45
|
+
attr_accessor :u2fregistrations
|
46
|
+
|
47
|
+
# @type [Array<Comet::AdminWebAuthnRegistration>] web_authn_registrations
|
48
|
+
attr_accessor :web_authn_registrations
|
49
|
+
|
50
|
+
# @type [Number] totpkey_encryption_format
|
51
|
+
attr_accessor :totpkey_encryption_format
|
52
|
+
|
53
|
+
# @type [String] totpkey
|
54
|
+
attr_accessor :totpkey
|
55
|
+
|
56
|
+
# @type [String] ipwhitelist
|
57
|
+
attr_accessor :ipwhitelist
|
58
|
+
|
59
|
+
# @type [Comet::AdminUserPermissions] permissions
|
60
|
+
attr_accessor :permissions
|
61
|
+
|
62
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
63
|
+
attr_accessor :unknown_json_fields
|
64
|
+
|
65
|
+
def initialize
|
66
|
+
clear
|
67
|
+
end
|
68
|
+
|
69
|
+
def clear
|
70
|
+
@username = ''
|
71
|
+
@organization_id = ''
|
72
|
+
@external_authentication_source = ''
|
73
|
+
@password_format = 0
|
74
|
+
@password = ''
|
75
|
+
@u2fregistrations = []
|
76
|
+
@web_authn_registrations = []
|
77
|
+
@totpkey_encryption_format = 0
|
78
|
+
@totpkey = ''
|
79
|
+
@ipwhitelist = ''
|
80
|
+
@permissions = Comet::AdminUserPermissions.new
|
81
|
+
@unknown_json_fields = {}
|
82
|
+
end
|
83
|
+
|
84
|
+
# @param [String] json_string The complete object in JSON format
|
85
|
+
def from_json(json_string)
|
86
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
87
|
+
|
88
|
+
from_hash(JSON.parse(json_string))
|
89
|
+
end
|
90
|
+
|
91
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
92
|
+
def from_hash(obj)
|
93
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
94
|
+
|
95
|
+
obj.each do |k, v|
|
96
|
+
case k
|
97
|
+
when 'Username'
|
98
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
99
|
+
|
100
|
+
@username = v
|
101
|
+
when 'OrganizationID'
|
102
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
103
|
+
|
104
|
+
@organization_id = v
|
105
|
+
when 'ExternalAuthenticationSource'
|
106
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
107
|
+
|
108
|
+
@external_authentication_source = v
|
109
|
+
when 'PasswordFormat'
|
110
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
111
|
+
|
112
|
+
@password_format = v
|
113
|
+
when 'Password'
|
114
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
115
|
+
|
116
|
+
@password = v
|
117
|
+
when 'AllowPasswordLogin'
|
118
|
+
@allow_password_login = v
|
119
|
+
when 'AllowPasswordAndTOTPLogin'
|
120
|
+
@allow_password_and_totplogin = v
|
121
|
+
when 'AllowPasswordAndU2FLogin'
|
122
|
+
@allow_password_and_u2flogin = v
|
123
|
+
when 'AllowPasswordAndWebAuthnLogin'
|
124
|
+
@allow_password_and_web_authn_login = v
|
125
|
+
when 'U2FRegistrations'
|
126
|
+
if v.nil?
|
127
|
+
@u2fregistrations = []
|
128
|
+
else
|
129
|
+
@u2fregistrations = Array.new(v.length)
|
130
|
+
v.each_with_index do |v1, i1|
|
131
|
+
@u2fregistrations[i1] = Comet::AdminU2FRegistration.new
|
132
|
+
@u2fregistrations[i1].from_hash(v1)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
when 'WebAuthnRegistrations'
|
136
|
+
if v.nil?
|
137
|
+
@web_authn_registrations = []
|
138
|
+
else
|
139
|
+
@web_authn_registrations = Array.new(v.length)
|
140
|
+
v.each_with_index do |v1, i1|
|
141
|
+
@web_authn_registrations[i1] = Comet::AdminWebAuthnRegistration.new
|
142
|
+
@web_authn_registrations[i1].from_hash(v1)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
when 'TOTPKeyEncryptionFormat'
|
146
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
147
|
+
|
148
|
+
@totpkey_encryption_format = v
|
149
|
+
when 'TOTPKey'
|
150
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
151
|
+
|
152
|
+
@totpkey = v
|
153
|
+
when 'IPWhitelist'
|
154
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
155
|
+
|
156
|
+
@ipwhitelist = v
|
157
|
+
when 'Permissions'
|
158
|
+
@permissions = Comet::AdminUserPermissions.new
|
159
|
+
@permissions.from_hash(v)
|
160
|
+
else
|
161
|
+
@unknown_json_fields[k] = v
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
# @return [Hash] The complete object as a Ruby hash
|
167
|
+
def to_hash
|
168
|
+
ret = {}
|
169
|
+
ret['Username'] = @username
|
170
|
+
ret['OrganizationID'] = @organization_id
|
171
|
+
unless @external_authentication_source.nil?
|
172
|
+
ret['ExternalAuthenticationSource'] = @external_authentication_source
|
173
|
+
end
|
174
|
+
ret['PasswordFormat'] = @password_format
|
175
|
+
ret['Password'] = @password
|
176
|
+
ret['AllowPasswordLogin'] = @allow_password_login
|
177
|
+
ret['AllowPasswordAndTOTPLogin'] = @allow_password_and_totplogin
|
178
|
+
ret['AllowPasswordAndU2FLogin'] = @allow_password_and_u2flogin
|
179
|
+
ret['AllowPasswordAndWebAuthnLogin'] = @allow_password_and_web_authn_login
|
180
|
+
unless @u2fregistrations.nil?
|
181
|
+
ret['U2FRegistrations'] = @u2fregistrations
|
182
|
+
end
|
183
|
+
unless @web_authn_registrations.nil?
|
184
|
+
ret['WebAuthnRegistrations'] = @web_authn_registrations
|
185
|
+
end
|
186
|
+
unless @totpkey_encryption_format.nil?
|
187
|
+
ret['TOTPKeyEncryptionFormat'] = @totpkey_encryption_format
|
188
|
+
end
|
189
|
+
unless @totpkey.nil?
|
190
|
+
ret['TOTPKey'] = @totpkey
|
191
|
+
end
|
192
|
+
unless @ipwhitelist.nil?
|
193
|
+
ret['IPWhitelist'] = @ipwhitelist
|
194
|
+
end
|
195
|
+
ret['Permissions'] = @permissions
|
196
|
+
@unknown_json_fields.each do |k, v|
|
197
|
+
ret[k] = v
|
198
|
+
end
|
199
|
+
ret
|
200
|
+
end
|
201
|
+
|
202
|
+
# @return [Hash] The complete object as a Ruby hash
|
203
|
+
def to_h
|
204
|
+
to_hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# @return [String] The complete object as a JSON string
|
208
|
+
def to_json(options = {})
|
209
|
+
to_hash.to_json(options)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
@@ -29,6 +29,9 @@ module Comet
|
|
29
29
|
# @type [Number] max_connections
|
30
30
|
attr_accessor :max_connections
|
31
31
|
|
32
|
+
# @type [Boolean] hide_deleted_files
|
33
|
+
attr_accessor :hide_deleted_files
|
34
|
+
|
32
35
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
33
36
|
attr_accessor :unknown_json_fields
|
34
37
|
|
@@ -78,6 +81,8 @@ module Comet
|
|
78
81
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
79
82
|
|
80
83
|
@max_connections = v
|
84
|
+
when 'HideDeletedFiles'
|
85
|
+
@hide_deleted_files = v
|
81
86
|
else
|
82
87
|
@unknown_json_fields[k] = v
|
83
88
|
end
|
@@ -102,6 +107,9 @@ module Comet
|
|
102
107
|
unless @max_connections.nil?
|
103
108
|
ret['MaxConnections'] = @max_connections
|
104
109
|
end
|
110
|
+
unless @hide_deleted_files.nil?
|
111
|
+
ret['HideDeletedFiles'] = @hide_deleted_files
|
112
|
+
end
|
105
113
|
@unknown_json_fields.each do |k, v|
|
106
114
|
ret[k] = v
|
107
115
|
end
|
@@ -23,6 +23,9 @@ module Comet
|
|
23
23
|
# @type [String] app_key
|
24
24
|
attr_accessor :app_key
|
25
25
|
|
26
|
+
# @type [Boolean] hide_deleted_files
|
27
|
+
attr_accessor :hide_deleted_files
|
28
|
+
|
26
29
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
27
30
|
attr_accessor :unknown_json_fields
|
28
31
|
|
@@ -62,6 +65,8 @@ module Comet
|
|
62
65
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
63
66
|
|
64
67
|
@app_key = v
|
68
|
+
when 'HideDeletedFiles'
|
69
|
+
@hide_deleted_files = v
|
65
70
|
else
|
66
71
|
@unknown_json_fields[k] = v
|
67
72
|
end
|
@@ -74,6 +79,7 @@ module Comet
|
|
74
79
|
ret['MasterBucket'] = @master_bucket
|
75
80
|
ret['KeyID'] = @key_id
|
76
81
|
ret['AppKey'] = @app_key
|
82
|
+
ret['HideDeletedFiles'] = @hide_deleted_files
|
77
83
|
@unknown_json_fields.each do |k, v|
|
78
84
|
ret[k] = v
|
79
85
|
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
#
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
module Comet
|
13
|
+
|
14
|
+
# BrowseOffice365ListVirtualAccountsResponse is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class BrowseOffice365ListVirtualAccountsResponse
|
16
|
+
|
17
|
+
# @type [Number] status
|
18
|
+
attr_accessor :status
|
19
|
+
|
20
|
+
# @type [String] message
|
21
|
+
attr_accessor :message
|
22
|
+
|
23
|
+
# @type [Array<Comet::Office365MixedVirtualAccount>] objects
|
24
|
+
attr_accessor :objects
|
25
|
+
|
26
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
27
|
+
attr_accessor :unknown_json_fields
|
28
|
+
|
29
|
+
def initialize
|
30
|
+
clear
|
31
|
+
end
|
32
|
+
|
33
|
+
def clear
|
34
|
+
@status = 0
|
35
|
+
@message = ''
|
36
|
+
@objects = []
|
37
|
+
@unknown_json_fields = {}
|
38
|
+
end
|
39
|
+
|
40
|
+
# @param [String] json_string The complete object in JSON format
|
41
|
+
def from_json(json_string)
|
42
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
43
|
+
|
44
|
+
from_hash(JSON.parse(json_string))
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
48
|
+
def from_hash(obj)
|
49
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
50
|
+
|
51
|
+
obj.each do |k, v|
|
52
|
+
case k
|
53
|
+
when 'Status'
|
54
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
55
|
+
|
56
|
+
@status = v
|
57
|
+
when 'Message'
|
58
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
59
|
+
|
60
|
+
@message = v
|
61
|
+
when 'Objects'
|
62
|
+
if v.nil?
|
63
|
+
@objects = []
|
64
|
+
else
|
65
|
+
@objects = Array.new(v.length)
|
66
|
+
v.each_with_index do |v1, i1|
|
67
|
+
@objects[i1] = Comet::Office365MixedVirtualAccount.new
|
68
|
+
@objects[i1].from_hash(v1)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
else
|
72
|
+
@unknown_json_fields[k] = v
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# @return [Hash] The complete object as a Ruby hash
|
78
|
+
def to_hash
|
79
|
+
ret = {}
|
80
|
+
ret['Status'] = @status
|
81
|
+
ret['Message'] = @message
|
82
|
+
ret['Objects'] = @objects
|
83
|
+
@unknown_json_fields.each do |k, v|
|
84
|
+
ret[k] = v
|
85
|
+
end
|
86
|
+
ret
|
87
|
+
end
|
88
|
+
|
89
|
+
# @return [Hash] The complete object as a Ruby hash
|
90
|
+
def to_h
|
91
|
+
to_hash
|
92
|
+
end
|
93
|
+
|
94
|
+
# @return [String] The complete object as a JSON string
|
95
|
+
def to_json(options = {})
|
96
|
+
to_hash.to_json(options)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -17,6 +17,9 @@ module Comet
|
|
17
17
|
# @type [String] friendly_name
|
18
18
|
attr_accessor :friendly_name
|
19
19
|
|
20
|
+
# @type [Number] registration_time
|
21
|
+
attr_accessor :registration_time
|
22
|
+
|
20
23
|
# @type [Comet::OSInfo] platform_version
|
21
24
|
attr_accessor :platform_version
|
22
25
|
|
@@ -35,6 +38,7 @@ module Comet
|
|
35
38
|
|
36
39
|
def clear
|
37
40
|
@friendly_name = ''
|
41
|
+
@registration_time = 0
|
38
42
|
@platform_version = Comet::OSInfo.new
|
39
43
|
@sources = {}
|
40
44
|
@device_timezone = ''
|
@@ -58,6 +62,10 @@ module Comet
|
|
58
62
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
59
63
|
|
60
64
|
@friendly_name = v
|
65
|
+
when 'RegistrationTime'
|
66
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
67
|
+
|
68
|
+
@registration_time = v
|
61
69
|
when 'PlatformVersion'
|
62
70
|
@platform_version = Comet::OSInfo.new
|
63
71
|
@platform_version.from_hash(v)
|
@@ -85,6 +93,9 @@ module Comet
|
|
85
93
|
def to_hash
|
86
94
|
ret = {}
|
87
95
|
ret['FriendlyName'] = @friendly_name
|
96
|
+
unless @registration_time.nil?
|
97
|
+
ret['RegistrationTime'] = @registration_time
|
98
|
+
end
|
88
99
|
unless @platform_version.nil?
|
89
100
|
ret['PlatformVersion'] = @platform_version
|
90
101
|
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
#
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
module Comet
|
13
|
+
|
14
|
+
# DispatcherWindiskSnapshotResponse is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class DispatcherWindiskSnapshotResponse
|
16
|
+
|
17
|
+
# @type [Number] status
|
18
|
+
attr_accessor :status
|
19
|
+
|
20
|
+
# @type [String] message
|
21
|
+
attr_accessor :message
|
22
|
+
|
23
|
+
# @type [Array<Comet::DiskDrive>] windisk_snapshot
|
24
|
+
attr_accessor :windisk_snapshot
|
25
|
+
|
26
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
27
|
+
attr_accessor :unknown_json_fields
|
28
|
+
|
29
|
+
def initialize
|
30
|
+
clear
|
31
|
+
end
|
32
|
+
|
33
|
+
def clear
|
34
|
+
@status = 0
|
35
|
+
@message = ''
|
36
|
+
@windisk_snapshot = []
|
37
|
+
@unknown_json_fields = {}
|
38
|
+
end
|
39
|
+
|
40
|
+
# @param [String] json_string The complete object in JSON format
|
41
|
+
def from_json(json_string)
|
42
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
43
|
+
|
44
|
+
from_hash(JSON.parse(json_string))
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
48
|
+
def from_hash(obj)
|
49
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
50
|
+
|
51
|
+
obj.each do |k, v|
|
52
|
+
case k
|
53
|
+
when 'Status'
|
54
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
55
|
+
|
56
|
+
@status = v
|
57
|
+
when 'Message'
|
58
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
59
|
+
|
60
|
+
@message = v
|
61
|
+
when 'WindiskSnapshot'
|
62
|
+
if v.nil?
|
63
|
+
@windisk_snapshot = []
|
64
|
+
else
|
65
|
+
@windisk_snapshot = Array.new(v.length)
|
66
|
+
v.each_with_index do |v1, i1|
|
67
|
+
@windisk_snapshot[i1] = Comet::DiskDrive.new
|
68
|
+
@windisk_snapshot[i1].from_hash(v1)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
else
|
72
|
+
@unknown_json_fields[k] = v
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# @return [Hash] The complete object as a Ruby hash
|
78
|
+
def to_hash
|
79
|
+
ret = {}
|
80
|
+
ret['Status'] = @status
|
81
|
+
ret['Message'] = @message
|
82
|
+
ret['WindiskSnapshot'] = @windisk_snapshot
|
83
|
+
@unknown_json_fields.each do |k, v|
|
84
|
+
ret[k] = v
|
85
|
+
end
|
86
|
+
ret
|
87
|
+
end
|
88
|
+
|
89
|
+
# @return [Hash] The complete object as a Ruby hash
|
90
|
+
def to_h
|
91
|
+
to_hash
|
92
|
+
end
|
93
|
+
|
94
|
+
# @return [String] The complete object as a JSON string
|
95
|
+
def to_json(options = {})
|
96
|
+
to_hash.to_json(options)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -20,6 +20,12 @@ module Comet
|
|
20
20
|
# @type [String] message
|
21
21
|
attr_accessor :message
|
22
22
|
|
23
|
+
# @type [String] from
|
24
|
+
attr_accessor :from
|
25
|
+
|
26
|
+
# @type [Array<String>] to
|
27
|
+
attr_accessor :to
|
28
|
+
|
23
29
|
# @type [String] email_subject
|
24
30
|
attr_accessor :email_subject
|
25
31
|
|
@@ -39,6 +45,8 @@ module Comet
|
|
39
45
|
def clear
|
40
46
|
@status = 0
|
41
47
|
@message = ''
|
48
|
+
@from = ''
|
49
|
+
@to = []
|
42
50
|
@email_subject = ''
|
43
51
|
@email_body_html = ''
|
44
52
|
@email_body_plaintext = ''
|
@@ -66,6 +74,21 @@ module Comet
|
|
66
74
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
67
75
|
|
68
76
|
@message = v
|
77
|
+
when 'From'
|
78
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
79
|
+
|
80
|
+
@from = v
|
81
|
+
when 'To'
|
82
|
+
if v.nil?
|
83
|
+
@to = []
|
84
|
+
else
|
85
|
+
@to = Array.new(v.length)
|
86
|
+
v.each_with_index do |v1, i1|
|
87
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
88
|
+
|
89
|
+
@to[i1] = v1
|
90
|
+
end
|
91
|
+
end
|
69
92
|
when 'EmailSubject'
|
70
93
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
71
94
|
|
@@ -89,6 +112,8 @@ module Comet
|
|
89
112
|
ret = {}
|
90
113
|
ret['Status'] = @status
|
91
114
|
ret['Message'] = @message
|
115
|
+
ret['From'] = @from
|
116
|
+
ret['To'] = @to
|
92
117
|
ret['EmailSubject'] = @email_subject
|
93
118
|
ret['EmailBodyHTML'] = @email_body_html
|
94
119
|
ret['EmailBodyPlaintext'] = @email_body_plaintext
|
@@ -26,6 +26,21 @@ module Comet
|
|
26
26
|
# @type [String] password
|
27
27
|
attr_accessor :password
|
28
28
|
|
29
|
+
# @type [Boolean] use_tls
|
30
|
+
attr_accessor :use_tls
|
31
|
+
|
32
|
+
# @type [Boolean] tlsskip_verify
|
33
|
+
attr_accessor :tlsskip_verify
|
34
|
+
|
35
|
+
# @type [String] tlscustom_server_capath
|
36
|
+
attr_accessor :tlscustom_server_capath
|
37
|
+
|
38
|
+
# @type [String] tlscustom_client_crt_path
|
39
|
+
attr_accessor :tlscustom_client_crt_path
|
40
|
+
|
41
|
+
# @type [String] tlscustom_client_key_path
|
42
|
+
attr_accessor :tlscustom_client_key_path
|
43
|
+
|
29
44
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
30
45
|
attr_accessor :unknown_json_fields
|
31
46
|
|
@@ -38,6 +53,9 @@ module Comet
|
|
38
53
|
@port = ''
|
39
54
|
@username = ''
|
40
55
|
@password = ''
|
56
|
+
@tlscustom_server_capath = ''
|
57
|
+
@tlscustom_client_crt_path = ''
|
58
|
+
@tlscustom_client_key_path = ''
|
41
59
|
@unknown_json_fields = {}
|
42
60
|
end
|
43
61
|
|
@@ -70,6 +88,22 @@ module Comet
|
|
70
88
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
71
89
|
|
72
90
|
@password = v
|
91
|
+
when 'UseTLS'
|
92
|
+
@use_tls = v
|
93
|
+
when 'TLSSkipVerify'
|
94
|
+
@tlsskip_verify = v
|
95
|
+
when 'TLSCustomServerCAPath'
|
96
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
97
|
+
|
98
|
+
@tlscustom_server_capath = v
|
99
|
+
when 'TLSCustomClientCrtPath'
|
100
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
101
|
+
|
102
|
+
@tlscustom_client_crt_path = v
|
103
|
+
when 'TLSCustomClientKeyPath'
|
104
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
105
|
+
|
106
|
+
@tlscustom_client_key_path = v
|
73
107
|
else
|
74
108
|
@unknown_json_fields[k] = v
|
75
109
|
end
|
@@ -83,6 +117,11 @@ module Comet
|
|
83
117
|
ret['Port'] = @port
|
84
118
|
ret['Username'] = @username
|
85
119
|
ret['Password'] = @password
|
120
|
+
ret['UseTLS'] = @use_tls
|
121
|
+
ret['TLSSkipVerify'] = @tlsskip_verify
|
122
|
+
ret['TLSCustomServerCAPath'] = @tlscustom_server_capath
|
123
|
+
ret['TLSCustomClientCrtPath'] = @tlscustom_client_crt_path
|
124
|
+
ret['TLSCustomClientKeyPath'] = @tlscustom_client_key_path
|
86
125
|
@unknown_json_fields.each do |k, v|
|
87
126
|
ret[k] = v
|
88
127
|
end
|
@@ -29,6 +29,9 @@ module Comet
|
|
29
29
|
# @type [Array<String>] site_unique_members
|
30
30
|
attr_accessor :site_unique_members
|
31
31
|
|
32
|
+
# @type [Comet::Office365CustomSettingV2] custom_setting_v2
|
33
|
+
attr_accessor :custom_setting_v2
|
34
|
+
|
32
35
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
33
36
|
attr_accessor :unknown_json_fields
|
34
37
|
|
@@ -42,6 +45,7 @@ module Comet
|
|
42
45
|
@custom_setting = Comet::Office365CustomSetting.new
|
43
46
|
@mailbox_unique_members = []
|
44
47
|
@site_unique_members = []
|
48
|
+
@custom_setting_v2 = Comet::Office365CustomSettingV2.new
|
45
49
|
@unknown_json_fields = {}
|
46
50
|
end
|
47
51
|
|
@@ -90,6 +94,9 @@ module Comet
|
|
90
94
|
@site_unique_members[i1] = v1
|
91
95
|
end
|
92
96
|
end
|
97
|
+
when 'CustomSettingV2'
|
98
|
+
@custom_setting_v2 = Comet::Office365CustomSettingV2.new
|
99
|
+
@custom_setting_v2.from_hash(v)
|
93
100
|
else
|
94
101
|
@unknown_json_fields[k] = v
|
95
102
|
end
|
@@ -104,6 +111,7 @@ module Comet
|
|
104
111
|
ret['CustomSetting'] = @custom_setting
|
105
112
|
ret['MailboxUniqueMembers'] = @mailbox_unique_members
|
106
113
|
ret['SiteUniqueMembers'] = @site_unique_members
|
114
|
+
ret['CustomSettingV2'] = @custom_setting_v2
|
107
115
|
@unknown_json_fields.each do |k, v|
|
108
116
|
ret[k] = v
|
109
117
|
end
|