comet_backup_ruby_sdk 0.2.0 → 1.2.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 +47 -0
- data/Gemfile.lock +43 -0
- data/README.md +20 -4
- data/RELEASING.md +10 -0
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +562 -254
- data/lib/comet/definitions.rb +19 -4
- data/lib/comet/models/add_bucket_response_message.rb +15 -5
- data/lib/comet/models/admin_account_properties_response.rb +17 -2
- data/lib/comet/models/admin_email_options.rb +84 -0
- data/lib/comet/models/admin_resource_response.rb +13 -4
- data/lib/comet/models/admin_security_options.rb +18 -5
- data/lib/comet/models/admin_u2fregistration.rb +11 -3
- data/lib/comet/models/admin_user_permissions.rb +6 -2
- data/lib/comet/models/available_download.rb +10 -4
- data/lib/comet/models/azure_destination_location.rb +16 -7
- data/lib/comet/models/b2destination_location.rb +17 -6
- data/lib/comet/models/b2storage_extra_info.rb +6 -2
- data/lib/comet/models/b2transaction_totals.rb +15 -2
- data/lib/comet/models/b2virtual_storage_role_settings.rb +93 -0
- data/lib/comet/models/backup_job_advanced_options.rb +12 -2
- data/lib/comet/models/backup_job_detail.rb +53 -10
- data/lib/comet/models/backup_job_progress.rb +21 -2
- data/lib/comet/models/backup_rule_config.rb +43 -7
- data/lib/comet/models/backup_rule_event_triggers.rb +6 -2
- data/lib/comet/models/branding_options.rb +59 -25
- data/lib/comet/models/branding_properties.rb +51 -21
- data/lib/comet/models/browse_disk_drives_response.rb +11 -3
- data/lib/comet/models/browse_edbresponse.rb +11 -3
- data/lib/comet/models/browse_hvresponse.rb +11 -3
- data/lib/comet/models/browse_vssresponse.rb +11 -3
- data/lib/comet/models/bucket_properties.rb +24 -3
- data/lib/comet/models/bucket_usage_info.rb +8 -2
- data/lib/comet/models/comet_apiresponse_message.rb +11 -3
- data/lib/comet/models/comet_destination_location.rb +12 -5
- data/lib/comet/models/constellation_check_report.rb +12 -2
- data/lib/comet/models/constellation_stats.rb +18 -2
- data/lib/comet/models/constellation_status_apiresponse.rb +9 -4
- data/lib/comet/models/content_measurement.rb +12 -2
- data/lib/comet/models/content_measurement_component.rb +10 -3
- data/lib/comet/models/create_group_policy_response.rb +13 -4
- data/lib/comet/models/default_email_report_policy.rb +6 -2
- data/lib/comet/models/destination_config.rb +123 -32
- data/lib/comet/models/destination_location.rb +78 -28
- data/lib/comet/models/destination_statistics.rb +16 -3
- data/lib/comet/models/device_config.rb +9 -3
- data/lib/comet/models/disk_drive.rb +34 -7
- data/lib/comet/models/dispatcher_admin_sources_response.rb +12 -4
- data/lib/comet/models/dispatcher_stored_objects_response.rb +11 -3
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +11 -3
- data/lib/comet/models/edbfile_info.rb +12 -5
- data/lib/comet/models/email_options.rb +21 -8
- data/lib/comet/models/email_report_config.rb +10 -2
- data/lib/comet/models/email_report_generated_preview.rb +17 -6
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +102 -0
- data/lib/comet/models/extra_file_exclusion.rb +11 -3
- data/lib/comet/models/ftpdestination_location.rb +23 -6
- data/lib/comet/models/get_group_policy_response.rb +14 -4
- data/lib/comet/models/get_profile_and_hash_response_message.rb +14 -4
- data/lib/comet/models/get_profile_hash_response_message.rb +13 -4
- data/lib/comet/models/group_policy.rb +18 -3
- data/lib/comet/models/hyper_vmachine_info.rb +10 -4
- data/lib/comet/models/install_creds.rb +99 -0
- data/lib/comet/models/install_token.rb +117 -0
- data/lib/comet/models/install_token_response.rb +92 -0
- data/lib/comet/models/job_entry.rb +93 -0
- data/lib/comet/models/live_user_connection.rb +20 -7
- data/lib/comet/models/local_destination_location.rb +15 -5
- data/lib/comet/models/mac_oscode_sign_properties.rb +21 -6
- data/lib/comet/models/mongo_dbconnection.rb +33 -14
- data/lib/comet/models/new_bucket_detail.rb +10 -4
- data/lib/comet/models/news_entry.rb +20 -3
- data/lib/comet/models/organization.rb +145 -0
- data/lib/comet/models/organization_response.rb +101 -0
- data/lib/comet/models/osinfo.rb +12 -5
- data/lib/comet/models/partition.rb +32 -8
- data/lib/comet/models/private_branding_properties.rb +39 -15
- data/lib/comet/models/protected_item_engine_type_policy.rb +7 -3
- data/lib/comet/models/public_branding_properties.rb +18 -8
- data/lib/comet/models/remote_server_address.rb +19 -7
- data/lib/comet/models/remote_storage_option.rb +28 -7
- data/lib/comet/models/replicator_state_apiresponse.rb +40 -4
- data/lib/comet/models/request_storage_vault_response_message.rb +13 -4
- data/lib/comet/models/restore_job_advanced_options.rb +15 -4
- data/lib/comet/models/retention_policy.rb +9 -2
- data/lib/comet/models/retention_range.rb +30 -2
- data/lib/comet/models/s3destination_location.rb +16 -7
- data/lib/comet/models/schedule_config.rb +15 -2
- data/lib/comet/models/search_clause.rb +14 -6
- data/lib/comet/models/server_config_options_branding_fragment.rb +7 -2
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +7 -2
- data/lib/comet/models/server_meta_version_info.rb +45 -7
- data/lib/comet/models/session_key_regenerated_response.rb +15 -5
- data/lib/comet/models/sftpdestination_location.rb +21 -8
- data/lib/comet/models/size_measurement.rb +15 -2
- data/lib/comet/models/software_build_role_options.rb +6 -2
- data/lib/comet/models/software_update_news_response.rb +13 -6
- data/lib/comet/models/source_basic_info.rb +11 -3
- data/lib/comet/models/source_config.rb +38 -8
- data/lib/comet/models/source_statistics.rb +7 -2
- data/lib/comet/models/spanned_destination_location.rb +6 -2
- data/lib/comet/models/spanned_storage_extra_info.rb +6 -2
- data/lib/comet/models/sshconnection.rb +19 -7
- data/lib/comet/models/stat_result.rb +18 -2
- data/lib/comet/models/storage_free_space_info.rb +14 -2
- data/lib/comet/models/storage_vault_provider_policy.rb +8 -2
- data/lib/comet/models/stored_object.rb +27 -5
- data/lib/comet/models/streamable_event.rb +18 -2
- data/lib/comet/models/swift_destination_location.rb +32 -15
- data/lib/comet/models/test_response.rb +11 -3
- data/lib/comet/models/totp_regenerated_response.rb +17 -6
- data/lib/comet/models/u2fregister_request.rb +10 -4
- data/lib/comet/models/u2fregistered_key.rb +12 -5
- data/lib/comet/models/u2fregistration_challenge_response.rb +15 -5
- data/lib/comet/models/u2fsign_request.rb +12 -5
- data/lib/comet/models/u2fsign_response.rb +14 -6
- data/lib/comet/models/uninstall_config.rb +6 -2
- data/lib/comet/models/update_campaign_device_status.rb +9 -2
- data/lib/comet/models/update_campaign_options.rb +6 -2
- data/lib/comet/models/update_campaign_properties.rb +11 -3
- data/lib/comet/models/update_campaign_status.rb +11 -3
- data/lib/comet/models/update_campaign_status_device_entry.rb +13 -4
- data/lib/comet/models/user_custom_email_settings.rb +6 -2
- data/lib/comet/models/user_on_server.rb +11 -3
- data/lib/comet/models/user_policy.rb +22 -2
- data/lib/comet/models/user_profile_config.rb +52 -12
- data/lib/comet/models/user_profile_fragment.rb +8 -3
- data/lib/comet/models/vault_snapshot.rb +13 -4
- data/lib/comet/models/vsscomponent.rb +12 -5
- data/lib/comet/models/vsswriter_info.rb +8 -3
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +93 -0
- data/lib/comet/models/web_interface_branding_properties.rb +14 -6
- data/lib/comet/models/webhook_option.rb +10 -3
- data/lib/comet/models/win_smbauth.rb +15 -5
- data/lib/comet/models/windows_code_sign_properties.rb +26 -9
- data/lib/comet_backup_ruby_sdk.rb +10 -0
- metadata +15 -2
@@ -39,20 +39,26 @@ module Comet
|
|
39
39
|
attr_accessor :unknown_json_fields
|
40
40
|
|
41
41
|
def initialize
|
42
|
+
clear
|
43
|
+
end
|
44
|
+
|
45
|
+
def clear
|
46
|
+
@start_time = 0
|
47
|
+
@target_version = ''
|
42
48
|
@devices = []
|
43
49
|
@unknown_json_fields = {}
|
44
50
|
end
|
45
51
|
|
46
52
|
# @param [String] json_string The complete object in JSON format
|
47
53
|
def from_json(json_string)
|
48
|
-
raise TypeError 'expected
|
54
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
49
55
|
|
50
56
|
from_hash(JSON.parse(json_string))
|
51
57
|
end
|
52
58
|
|
53
59
|
# @param [Hash] obj The complete object as a Ruby hash
|
54
60
|
def from_hash(obj)
|
55
|
-
raise TypeError 'expected
|
61
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
56
62
|
|
57
63
|
obj.each do |k, v|
|
58
64
|
case k
|
@@ -65,9 +71,11 @@ module Comet
|
|
65
71
|
when 'DowngradeNewer'
|
66
72
|
@downgrade_newer = v
|
67
73
|
when 'StartTime'
|
74
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
75
|
+
|
68
76
|
@start_time = v
|
69
77
|
when 'TargetVersion'
|
70
|
-
raise TypeError 'expected
|
78
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
71
79
|
|
72
80
|
@target_version = v
|
73
81
|
when 'Devices'
|
@@ -27,31 +27,40 @@ module Comet
|
|
27
27
|
attr_accessor :unknown_json_fields
|
28
28
|
|
29
29
|
def initialize
|
30
|
+
clear
|
31
|
+
end
|
32
|
+
|
33
|
+
def clear
|
34
|
+
@username = ''
|
35
|
+
@device_id = ''
|
36
|
+
@status = 0
|
30
37
|
@unknown_json_fields = {}
|
31
38
|
end
|
32
39
|
|
33
40
|
# @param [String] json_string The complete object in JSON format
|
34
41
|
def from_json(json_string)
|
35
|
-
raise TypeError 'expected
|
42
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
36
43
|
|
37
44
|
from_hash(JSON.parse(json_string))
|
38
45
|
end
|
39
46
|
|
40
47
|
# @param [Hash] obj The complete object as a Ruby hash
|
41
48
|
def from_hash(obj)
|
42
|
-
raise TypeError 'expected
|
49
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
43
50
|
|
44
51
|
obj.each do |k, v|
|
45
52
|
case k
|
46
53
|
when 'Username'
|
47
|
-
raise TypeError 'expected
|
54
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
48
55
|
|
49
56
|
@username = v
|
50
57
|
when 'DeviceID'
|
51
|
-
raise TypeError 'expected
|
58
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
52
59
|
|
53
60
|
@device_id = v
|
54
61
|
when 'Status'
|
62
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
63
|
+
|
55
64
|
@status = v
|
56
65
|
else
|
57
66
|
@unknown_json_fields[k] = v
|
@@ -21,20 +21,24 @@ module Comet
|
|
21
21
|
attr_accessor :unknown_json_fields
|
22
22
|
|
23
23
|
def initialize
|
24
|
+
clear
|
25
|
+
end
|
26
|
+
|
27
|
+
def clear
|
24
28
|
@reports = []
|
25
29
|
@unknown_json_fields = {}
|
26
30
|
end
|
27
31
|
|
28
32
|
# @param [String] json_string The complete object in JSON format
|
29
33
|
def from_json(json_string)
|
30
|
-
raise TypeError 'expected
|
34
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
31
35
|
|
32
36
|
from_hash(JSON.parse(json_string))
|
33
37
|
end
|
34
38
|
|
35
39
|
# @param [Hash] obj The complete object as a Ruby hash
|
36
40
|
def from_hash(obj)
|
37
|
-
raise TypeError 'expected
|
41
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
38
42
|
|
39
43
|
obj.each do |k, v|
|
40
44
|
case k
|
@@ -24,26 +24,34 @@ module Comet
|
|
24
24
|
attr_accessor :unknown_json_fields
|
25
25
|
|
26
26
|
def initialize
|
27
|
+
clear
|
28
|
+
end
|
29
|
+
|
30
|
+
def clear
|
31
|
+
@server_id = 0
|
32
|
+
@username = ''
|
27
33
|
@unknown_json_fields = {}
|
28
34
|
end
|
29
35
|
|
30
36
|
# @param [String] json_string The complete object in JSON format
|
31
37
|
def from_json(json_string)
|
32
|
-
raise TypeError 'expected
|
38
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
33
39
|
|
34
40
|
from_hash(JSON.parse(json_string))
|
35
41
|
end
|
36
42
|
|
37
43
|
# @param [Hash] obj The complete object as a Ruby hash
|
38
44
|
def from_hash(obj)
|
39
|
-
raise TypeError 'expected
|
45
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
40
46
|
|
41
47
|
obj.each do |k, v|
|
42
48
|
case k
|
43
49
|
when 'ServerID'
|
50
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
51
|
+
|
44
52
|
@server_id = v
|
45
53
|
when 'Username'
|
46
|
-
raise TypeError 'expected
|
54
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
47
55
|
|
48
56
|
@username = v
|
49
57
|
else
|
@@ -114,7 +114,19 @@ module Comet
|
|
114
114
|
attr_accessor :unknown_json_fields
|
115
115
|
|
116
116
|
def initialize
|
117
|
+
clear
|
118
|
+
end
|
119
|
+
|
120
|
+
def clear
|
121
|
+
@storage_vault_providers = Comet::StorageVaultProviderPolicy.new
|
122
|
+
@protected_item_engine_types = Comet::ProtectedItemEngineTypePolicy.new
|
117
123
|
@file_and_folder_mandatory_exclusions = []
|
124
|
+
@mode_schedule_skip_already_running = 0
|
125
|
+
@mode_admin_reset_password = 0
|
126
|
+
@mode_admin_view_filenames = 0
|
127
|
+
@mode_require_user_reset_password = 0
|
128
|
+
@default_email_reports = Comet::DefaultEmailReportPolicy.new
|
129
|
+
@default_storage_vault_retention = Comet::RetentionPolicy.new
|
118
130
|
@default_sources = {}
|
119
131
|
@default_sources_backup_rules = {}
|
120
132
|
@default_backup_rules = {}
|
@@ -123,14 +135,14 @@ module Comet
|
|
123
135
|
|
124
136
|
# @param [String] json_string The complete object in JSON format
|
125
137
|
def from_json(json_string)
|
126
|
-
raise TypeError 'expected
|
138
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
127
139
|
|
128
140
|
from_hash(JSON.parse(json_string))
|
129
141
|
end
|
130
142
|
|
131
143
|
# @param [Hash] obj The complete object as a Ruby hash
|
132
144
|
def from_hash(obj)
|
133
|
-
raise TypeError 'expected
|
145
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
134
146
|
|
135
147
|
obj.each do |k, v|
|
136
148
|
case k
|
@@ -167,12 +179,20 @@ module Comet
|
|
167
179
|
end
|
168
180
|
end
|
169
181
|
when 'ModeScheduleSkipAlreadyRunning'
|
182
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
183
|
+
|
170
184
|
@mode_schedule_skip_already_running = v
|
171
185
|
when 'ModeAdminResetPassword'
|
186
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
187
|
+
|
172
188
|
@mode_admin_reset_password = v
|
173
189
|
when 'ModeAdminViewFilenames'
|
190
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
191
|
+
|
174
192
|
@mode_admin_view_filenames = v
|
175
193
|
when 'ModeRequireUserResetPassword'
|
194
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
195
|
+
|
176
196
|
@mode_require_user_reset_password = v
|
177
197
|
when 'PreventDeleteSingleSnapshots'
|
178
198
|
@prevent_delete_single_snapshots = v
|
@@ -26,6 +26,9 @@ module Comet
|
|
26
26
|
# @type [String] language_code
|
27
27
|
attr_accessor :language_code
|
28
28
|
|
29
|
+
# @type [String] organization_id
|
30
|
+
attr_accessor :organization_id
|
31
|
+
|
29
32
|
# @type [Array<String>] emails
|
30
33
|
attr_accessor :emails
|
31
34
|
|
@@ -99,51 +102,75 @@ module Comet
|
|
99
102
|
attr_accessor :unknown_json_fields
|
100
103
|
|
101
104
|
def initialize
|
105
|
+
clear
|
106
|
+
end
|
107
|
+
|
108
|
+
def clear
|
109
|
+
@username = ''
|
110
|
+
@account_name = ''
|
111
|
+
@local_timezone = ''
|
112
|
+
@language_code = ''
|
113
|
+
@organization_id = ''
|
102
114
|
@emails = []
|
103
115
|
@override_email_settings = {}
|
104
116
|
@destinations = {}
|
105
117
|
@sources = {}
|
106
118
|
@backup_rules = {}
|
107
119
|
@devices = {}
|
120
|
+
@all_protected_items_quota_bytes = 0
|
121
|
+
@maximum_devices = 0
|
122
|
+
@policy_id = ''
|
123
|
+
@policy = Comet::UserPolicy.new
|
124
|
+
@password_format = 0
|
125
|
+
@password_hash = ''
|
126
|
+
@password_recovery = ''
|
127
|
+
@totpkey_encryption_format = 0
|
128
|
+
@totpkey = ''
|
129
|
+
@create_time = 0
|
130
|
+
@creation_guid = ''
|
108
131
|
@unknown_json_fields = {}
|
109
132
|
end
|
110
133
|
|
111
134
|
# @param [String] json_string The complete object in JSON format
|
112
135
|
def from_json(json_string)
|
113
|
-
raise TypeError 'expected
|
136
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
114
137
|
|
115
138
|
from_hash(JSON.parse(json_string))
|
116
139
|
end
|
117
140
|
|
118
141
|
# @param [Hash] obj The complete object as a Ruby hash
|
119
142
|
def from_hash(obj)
|
120
|
-
raise TypeError 'expected
|
143
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
121
144
|
|
122
145
|
obj.each do |k, v|
|
123
146
|
case k
|
124
147
|
when 'Username'
|
125
|
-
raise TypeError 'expected
|
148
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
126
149
|
|
127
150
|
@username = v
|
128
151
|
when 'AccountName'
|
129
|
-
raise TypeError 'expected
|
152
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
130
153
|
|
131
154
|
@account_name = v
|
132
155
|
when 'LocalTimezone'
|
133
|
-
raise TypeError 'expected
|
156
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
134
157
|
|
135
158
|
@local_timezone = v
|
136
159
|
when 'LanguageCode'
|
137
|
-
raise TypeError 'expected
|
160
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
138
161
|
|
139
162
|
@language_code = v
|
163
|
+
when 'OrganizationID'
|
164
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
165
|
+
|
166
|
+
@organization_id = v
|
140
167
|
when 'Emails'
|
141
168
|
if v.nil?
|
142
169
|
@emails = []
|
143
170
|
else
|
144
171
|
@emails = Array.new(v.length)
|
145
172
|
v.each_with_index do |v1, i1|
|
146
|
-
raise TypeError 'expected
|
173
|
+
raise TypeError "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
147
174
|
|
148
175
|
@emails[i1] = v1
|
149
176
|
end
|
@@ -205,24 +232,30 @@ module Comet
|
|
205
232
|
when 'AllProtectedItemsQuotaEnabled'
|
206
233
|
@all_protected_items_quota_enabled = v
|
207
234
|
when 'AllProtectedItemsQuotaBytes'
|
235
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
236
|
+
|
208
237
|
@all_protected_items_quota_bytes = v
|
209
238
|
when 'MaximumDevices'
|
239
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
240
|
+
|
210
241
|
@maximum_devices = v
|
211
242
|
when 'PolicyID'
|
212
|
-
raise TypeError 'expected
|
243
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
213
244
|
|
214
245
|
@policy_id = v
|
215
246
|
when 'Policy'
|
216
247
|
@policy = Comet::UserPolicy.new
|
217
248
|
@policy.from_hash(v)
|
218
249
|
when 'PasswordFormat'
|
250
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
251
|
+
|
219
252
|
@password_format = v
|
220
253
|
when 'PasswordHash'
|
221
|
-
raise TypeError 'expected
|
254
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
222
255
|
|
223
256
|
@password_hash = v
|
224
257
|
when 'PasswordRecovery'
|
225
|
-
raise TypeError 'expected
|
258
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
226
259
|
|
227
260
|
@password_recovery = v
|
228
261
|
when 'AllowPasswordLogin'
|
@@ -230,17 +263,21 @@ module Comet
|
|
230
263
|
when 'AllowPasswordAndTOTPLogin'
|
231
264
|
@allow_password_and_totplogin = v
|
232
265
|
when 'TOTPKeyEncryptionFormat'
|
266
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
267
|
+
|
233
268
|
@totpkey_encryption_format = v
|
234
269
|
when 'TOTPKey'
|
235
|
-
raise TypeError 'expected
|
270
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
236
271
|
|
237
272
|
@totpkey = v
|
238
273
|
when 'RequirePasswordChange'
|
239
274
|
@require_password_change = v
|
240
275
|
when 'CreateTime'
|
276
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
277
|
+
|
241
278
|
@create_time = v
|
242
279
|
when 'CreationGUID'
|
243
|
-
raise TypeError 'expected
|
280
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
244
281
|
|
245
282
|
@creation_guid = v
|
246
283
|
else
|
@@ -256,6 +293,9 @@ module Comet
|
|
256
293
|
ret['AccountName'] = @account_name
|
257
294
|
ret['LocalTimezone'] = @local_timezone
|
258
295
|
ret['LanguageCode'] = @language_code
|
296
|
+
unless @organization_id.nil?
|
297
|
+
ret['OrganizationID'] = @organization_id
|
298
|
+
end
|
259
299
|
ret['Emails'] = @emails
|
260
300
|
ret['OverrideEmailSettings'] = @override_email_settings
|
261
301
|
ret['SendEmailReports'] = @send_email_reports
|
@@ -21,24 +21,29 @@ module Comet
|
|
21
21
|
attr_accessor :unknown_json_fields
|
22
22
|
|
23
23
|
def initialize
|
24
|
+
clear
|
25
|
+
end
|
26
|
+
|
27
|
+
def clear
|
28
|
+
@username = ''
|
24
29
|
@unknown_json_fields = {}
|
25
30
|
end
|
26
31
|
|
27
32
|
# @param [String] json_string The complete object in JSON format
|
28
33
|
def from_json(json_string)
|
29
|
-
raise TypeError 'expected
|
34
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
30
35
|
|
31
36
|
from_hash(JSON.parse(json_string))
|
32
37
|
end
|
33
38
|
|
34
39
|
# @param [Hash] obj The complete object as a Ruby hash
|
35
40
|
def from_hash(obj)
|
36
|
-
raise TypeError 'expected
|
41
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
37
42
|
|
38
43
|
obj.each do |k, v|
|
39
44
|
case k
|
40
45
|
when 'Username'
|
41
|
-
raise TypeError 'expected
|
46
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
42
47
|
|
43
48
|
@username = v
|
44
49
|
else
|
@@ -27,31 +27,40 @@ module Comet
|
|
27
27
|
attr_accessor :unknown_json_fields
|
28
28
|
|
29
29
|
def initialize
|
30
|
+
clear
|
31
|
+
end
|
32
|
+
|
33
|
+
def clear
|
34
|
+
@snapshot = ''
|
35
|
+
@source = ''
|
36
|
+
@create_time = 0
|
30
37
|
@unknown_json_fields = {}
|
31
38
|
end
|
32
39
|
|
33
40
|
# @param [String] json_string The complete object in JSON format
|
34
41
|
def from_json(json_string)
|
35
|
-
raise TypeError 'expected
|
42
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
36
43
|
|
37
44
|
from_hash(JSON.parse(json_string))
|
38
45
|
end
|
39
46
|
|
40
47
|
# @param [Hash] obj The complete object as a Ruby hash
|
41
48
|
def from_hash(obj)
|
42
|
-
raise TypeError 'expected
|
49
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
43
50
|
|
44
51
|
obj.each do |k, v|
|
45
52
|
case k
|
46
53
|
when 'Snapshot'
|
47
|
-
raise TypeError 'expected
|
54
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
48
55
|
|
49
56
|
@snapshot = v
|
50
57
|
when 'Source'
|
51
|
-
raise TypeError 'expected
|
58
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
52
59
|
|
53
60
|
@source = v
|
54
61
|
when 'CreateTime'
|
62
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
63
|
+
|
55
64
|
@create_time = v
|
56
65
|
else
|
57
66
|
@unknown_json_fields[k] = v
|