comet_backup_ruby_sdk 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -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 +184 -136
- data/lib/comet/definitions.rb +4 -4
- data/lib/comet/models/add_bucket_response_message.rb +15 -5
- data/lib/comet/models/admin_account_properties_response.rb +8 -2
- 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/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 +27 -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 +15 -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 +101 -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/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 +9 -3
- data/lib/comet/models/hyper_vmachine_info.rb +10 -4
- 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 +11 -3
- 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 +22 -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 +22 -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 +9 -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 +41 -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/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 +1 -0
- metadata +6 -2
|
@@ -24,19 +24,23 @@ module Comet
|
|
|
24
24
|
attr_accessor :unknown_json_fields
|
|
25
25
|
|
|
26
26
|
def initialize
|
|
27
|
+
clear
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def clear
|
|
27
31
|
@unknown_json_fields = {}
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
# @param [String] json_string The complete object in JSON format
|
|
31
35
|
def from_json(json_string)
|
|
32
|
-
raise TypeError 'expected
|
|
36
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
33
37
|
|
|
34
38
|
from_hash(JSON.parse(json_string))
|
|
35
39
|
end
|
|
36
40
|
|
|
37
41
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
38
42
|
def from_hash(obj)
|
|
39
|
-
raise TypeError 'expected
|
|
43
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
40
44
|
|
|
41
45
|
obj.each do |k, v|
|
|
42
46
|
case k
|
|
@@ -21,23 +21,30 @@ module Comet
|
|
|
21
21
|
attr_accessor :unknown_json_fields
|
|
22
22
|
|
|
23
23
|
def initialize
|
|
24
|
+
clear
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def clear
|
|
28
|
+
@status = 0
|
|
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 'Status'
|
|
46
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
47
|
+
|
|
41
48
|
@status = v
|
|
42
49
|
else
|
|
43
50
|
@unknown_json_fields[k] = v
|
|
@@ -30,19 +30,23 @@ module Comet
|
|
|
30
30
|
attr_accessor :unknown_json_fields
|
|
31
31
|
|
|
32
32
|
def initialize
|
|
33
|
+
clear
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def clear
|
|
33
37
|
@unknown_json_fields = {}
|
|
34
38
|
end
|
|
35
39
|
|
|
36
40
|
# @param [String] json_string The complete object in JSON format
|
|
37
41
|
def from_json(json_string)
|
|
38
|
-
raise TypeError 'expected
|
|
42
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
39
43
|
|
|
40
44
|
from_hash(JSON.parse(json_string))
|
|
41
45
|
end
|
|
42
46
|
|
|
43
47
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
44
48
|
def from_hash(obj)
|
|
45
|
-
raise TypeError 'expected
|
|
49
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
46
50
|
|
|
47
51
|
obj.each do |k, v|
|
|
48
52
|
case k
|
|
@@ -36,19 +36,25 @@ module Comet
|
|
|
36
36
|
attr_accessor :unknown_json_fields
|
|
37
37
|
|
|
38
38
|
def initialize
|
|
39
|
+
clear
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def clear
|
|
43
|
+
@start_time = 0
|
|
44
|
+
@target_version = ''
|
|
39
45
|
@unknown_json_fields = {}
|
|
40
46
|
end
|
|
41
47
|
|
|
42
48
|
# @param [String] json_string The complete object in JSON format
|
|
43
49
|
def from_json(json_string)
|
|
44
|
-
raise TypeError 'expected
|
|
50
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
45
51
|
|
|
46
52
|
from_hash(JSON.parse(json_string))
|
|
47
53
|
end
|
|
48
54
|
|
|
49
55
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
50
56
|
def from_hash(obj)
|
|
51
|
-
raise TypeError 'expected
|
|
57
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
52
58
|
|
|
53
59
|
obj.each do |k, v|
|
|
54
60
|
case k
|
|
@@ -61,9 +67,11 @@ module Comet
|
|
|
61
67
|
when 'DowngradeNewer'
|
|
62
68
|
@downgrade_newer = v
|
|
63
69
|
when 'StartTime'
|
|
70
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
71
|
+
|
|
64
72
|
@start_time = v
|
|
65
73
|
when 'TargetVersion'
|
|
66
|
-
raise TypeError 'expected
|
|
74
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
67
75
|
|
|
68
76
|
@target_version = v
|
|
69
77
|
else
|
|
@@ -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
|
|
@@ -99,42 +99,61 @@ module Comet
|
|
|
99
99
|
attr_accessor :unknown_json_fields
|
|
100
100
|
|
|
101
101
|
def initialize
|
|
102
|
+
clear
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def clear
|
|
106
|
+
@username = ''
|
|
107
|
+
@account_name = ''
|
|
108
|
+
@local_timezone = ''
|
|
109
|
+
@language_code = ''
|
|
102
110
|
@emails = []
|
|
103
111
|
@override_email_settings = {}
|
|
104
112
|
@destinations = {}
|
|
105
113
|
@sources = {}
|
|
106
114
|
@backup_rules = {}
|
|
107
115
|
@devices = {}
|
|
116
|
+
@all_protected_items_quota_bytes = 0
|
|
117
|
+
@maximum_devices = 0
|
|
118
|
+
@policy_id = ''
|
|
119
|
+
@policy = Comet::UserPolicy.new
|
|
120
|
+
@password_format = 0
|
|
121
|
+
@password_hash = ''
|
|
122
|
+
@password_recovery = ''
|
|
123
|
+
@totpkey_encryption_format = 0
|
|
124
|
+
@totpkey = ''
|
|
125
|
+
@create_time = 0
|
|
126
|
+
@creation_guid = ''
|
|
108
127
|
@unknown_json_fields = {}
|
|
109
128
|
end
|
|
110
129
|
|
|
111
130
|
# @param [String] json_string The complete object in JSON format
|
|
112
131
|
def from_json(json_string)
|
|
113
|
-
raise TypeError 'expected
|
|
132
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
114
133
|
|
|
115
134
|
from_hash(JSON.parse(json_string))
|
|
116
135
|
end
|
|
117
136
|
|
|
118
137
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
119
138
|
def from_hash(obj)
|
|
120
|
-
raise TypeError 'expected
|
|
139
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
121
140
|
|
|
122
141
|
obj.each do |k, v|
|
|
123
142
|
case k
|
|
124
143
|
when 'Username'
|
|
125
|
-
raise TypeError 'expected
|
|
144
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
126
145
|
|
|
127
146
|
@username = v
|
|
128
147
|
when 'AccountName'
|
|
129
|
-
raise TypeError 'expected
|
|
148
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
130
149
|
|
|
131
150
|
@account_name = v
|
|
132
151
|
when 'LocalTimezone'
|
|
133
|
-
raise TypeError 'expected
|
|
152
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
134
153
|
|
|
135
154
|
@local_timezone = v
|
|
136
155
|
when 'LanguageCode'
|
|
137
|
-
raise TypeError 'expected
|
|
156
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
138
157
|
|
|
139
158
|
@language_code = v
|
|
140
159
|
when 'Emails'
|
|
@@ -143,7 +162,7 @@ module Comet
|
|
|
143
162
|
else
|
|
144
163
|
@emails = Array.new(v.length)
|
|
145
164
|
v.each_with_index do |v1, i1|
|
|
146
|
-
raise TypeError 'expected
|
|
165
|
+
raise TypeError "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
|
147
166
|
|
|
148
167
|
@emails[i1] = v1
|
|
149
168
|
end
|
|
@@ -205,24 +224,30 @@ module Comet
|
|
|
205
224
|
when 'AllProtectedItemsQuotaEnabled'
|
|
206
225
|
@all_protected_items_quota_enabled = v
|
|
207
226
|
when 'AllProtectedItemsQuotaBytes'
|
|
227
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
228
|
+
|
|
208
229
|
@all_protected_items_quota_bytes = v
|
|
209
230
|
when 'MaximumDevices'
|
|
231
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
232
|
+
|
|
210
233
|
@maximum_devices = v
|
|
211
234
|
when 'PolicyID'
|
|
212
|
-
raise TypeError 'expected
|
|
235
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
213
236
|
|
|
214
237
|
@policy_id = v
|
|
215
238
|
when 'Policy'
|
|
216
239
|
@policy = Comet::UserPolicy.new
|
|
217
240
|
@policy.from_hash(v)
|
|
218
241
|
when 'PasswordFormat'
|
|
242
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
243
|
+
|
|
219
244
|
@password_format = v
|
|
220
245
|
when 'PasswordHash'
|
|
221
|
-
raise TypeError 'expected
|
|
246
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
222
247
|
|
|
223
248
|
@password_hash = v
|
|
224
249
|
when 'PasswordRecovery'
|
|
225
|
-
raise TypeError 'expected
|
|
250
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
226
251
|
|
|
227
252
|
@password_recovery = v
|
|
228
253
|
when 'AllowPasswordLogin'
|
|
@@ -230,17 +255,21 @@ module Comet
|
|
|
230
255
|
when 'AllowPasswordAndTOTPLogin'
|
|
231
256
|
@allow_password_and_totplogin = v
|
|
232
257
|
when 'TOTPKeyEncryptionFormat'
|
|
258
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
259
|
+
|
|
233
260
|
@totpkey_encryption_format = v
|
|
234
261
|
when 'TOTPKey'
|
|
235
|
-
raise TypeError 'expected
|
|
262
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
236
263
|
|
|
237
264
|
@totpkey = v
|
|
238
265
|
when 'RequirePasswordChange'
|
|
239
266
|
@require_password_change = v
|
|
240
267
|
when 'CreateTime'
|
|
268
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
269
|
+
|
|
241
270
|
@create_time = v
|
|
242
271
|
when 'CreationGUID'
|
|
243
|
-
raise TypeError 'expected
|
|
272
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
244
273
|
|
|
245
274
|
@creation_guid = v
|
|
246
275
|
else
|