comet_backup_ruby_sdk 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,28 +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
|
+
@new_bucket_id = ''
|
32
|
+
@new_bucket_key = ''
|
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 'NewBucketID'
|
44
|
-
raise TypeError 'expected
|
50
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
45
51
|
|
46
52
|
@new_bucket_id = v
|
47
53
|
when 'NewBucketKey'
|
48
|
-
raise TypeError 'expected
|
54
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
49
55
|
|
50
56
|
@new_bucket_key = v
|
51
57
|
else
|
@@ -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
|
+
@date_time = 0
|
32
|
+
@text_content = ''
|
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 'DateTime'
|
50
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
51
|
+
|
44
52
|
@date_time = v
|
45
53
|
when 'TextContent'
|
46
|
-
raise TypeError 'expected
|
54
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
47
55
|
|
48
56
|
@text_content = v
|
49
57
|
else
|
data/lib/comet/models/osinfo.rb
CHANGED
@@ -27,32 +27,39 @@ module Comet
|
|
27
27
|
attr_accessor :unknown_json_fields
|
28
28
|
|
29
29
|
def initialize
|
30
|
+
clear
|
31
|
+
end
|
32
|
+
|
33
|
+
def clear
|
34
|
+
@version = ''
|
35
|
+
@distribution = ''
|
36
|
+
@build = ''
|
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 'version'
|
47
|
-
raise TypeError 'expected
|
54
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
48
55
|
|
49
56
|
@version = v
|
50
57
|
when 'distribution'
|
51
|
-
raise TypeError 'expected
|
58
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
52
59
|
|
53
60
|
@distribution = v
|
54
61
|
when 'build'
|
55
|
-
raise TypeError 'expected
|
62
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
56
63
|
|
57
64
|
@build = v
|
58
65
|
else
|
@@ -51,41 +51,55 @@ module Comet
|
|
51
51
|
attr_accessor :unknown_json_fields
|
52
52
|
|
53
53
|
def initialize
|
54
|
+
clear
|
55
|
+
end
|
56
|
+
|
57
|
+
def clear
|
58
|
+
@device_name = ''
|
59
|
+
@filesystem = ''
|
60
|
+
@volume_name = ''
|
61
|
+
@volume_guid = ''
|
62
|
+
@volume_serial = ''
|
54
63
|
@mount_points = []
|
64
|
+
@read_offset = 0
|
65
|
+
@size = 0
|
66
|
+
@used_size = 0
|
67
|
+
@flags = 0
|
68
|
+
@bytes_per_filesystem_cluster = 0
|
55
69
|
@unknown_json_fields = {}
|
56
70
|
end
|
57
71
|
|
58
72
|
# @param [String] json_string The complete object in JSON format
|
59
73
|
def from_json(json_string)
|
60
|
-
raise TypeError 'expected
|
74
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
61
75
|
|
62
76
|
from_hash(JSON.parse(json_string))
|
63
77
|
end
|
64
78
|
|
65
79
|
# @param [Hash] obj The complete object as a Ruby hash
|
66
80
|
def from_hash(obj)
|
67
|
-
raise TypeError 'expected
|
81
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
68
82
|
|
69
83
|
obj.each do |k, v|
|
70
84
|
case k
|
71
85
|
when 'DeviceName'
|
72
|
-
raise TypeError 'expected
|
86
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
73
87
|
|
74
88
|
@device_name = v
|
75
89
|
when 'Filesystem'
|
76
|
-
raise TypeError 'expected
|
90
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
77
91
|
|
78
92
|
@filesystem = v
|
79
93
|
when 'VolumeName'
|
80
|
-
raise TypeError 'expected
|
94
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
81
95
|
|
82
96
|
@volume_name = v
|
83
97
|
when 'VolumeGuid'
|
84
|
-
raise TypeError 'expected
|
98
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
85
99
|
|
86
100
|
@volume_guid = v
|
87
101
|
when 'VolumeSerial'
|
88
|
-
raise TypeError 'expected
|
102
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
89
103
|
|
90
104
|
@volume_serial = v
|
91
105
|
when 'MountPoints'
|
@@ -94,20 +108,30 @@ module Comet
|
|
94
108
|
else
|
95
109
|
@mount_points = Array.new(v.length)
|
96
110
|
v.each_with_index do |v1, i1|
|
97
|
-
raise TypeError 'expected
|
111
|
+
raise TypeError "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
98
112
|
|
99
113
|
@mount_points[i1] = v1
|
100
114
|
end
|
101
115
|
end
|
102
116
|
when 'ReadOffset'
|
117
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
118
|
+
|
103
119
|
@read_offset = v
|
104
120
|
when 'Size'
|
121
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
122
|
+
|
105
123
|
@size = v
|
106
124
|
when 'UsedSize'
|
125
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
126
|
+
|
107
127
|
@used_size = v
|
108
128
|
when 'Flags'
|
129
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
130
|
+
|
109
131
|
@flags = v
|
110
132
|
when 'BytesPerFilesystemCluster'
|
133
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
134
|
+
|
111
135
|
@bytes_per_filesystem_cluster = v
|
112
136
|
else
|
113
137
|
@unknown_json_fields[k] = v
|
@@ -66,76 +66,100 @@ module Comet
|
|
66
66
|
attr_accessor :unknown_json_fields
|
67
67
|
|
68
68
|
def initialize
|
69
|
+
clear
|
70
|
+
end
|
71
|
+
|
72
|
+
def clear
|
73
|
+
@path_ico_file = ''
|
74
|
+
@path_icns_file = ''
|
75
|
+
@path_eula_rtf = ''
|
76
|
+
@path_tile_png = ''
|
77
|
+
@path_header_image = ''
|
78
|
+
@package_identifier = ''
|
79
|
+
@windows_code_sign_pkcs12file_path = ''
|
80
|
+
@windows_code_sign_pkcs12password_format = 0
|
81
|
+
@windows_code_sign_pkcs12password = ''
|
82
|
+
@windows_code_sign_pkcs11engine = ''
|
83
|
+
@windows_code_sign_pkcs11module = ''
|
84
|
+
@windows_code_sign_pkcs11certfile = ''
|
85
|
+
@windows_code_sign_pkcs11key_id = ''
|
86
|
+
@windows_code_sign_pkcs11password_format = 0
|
87
|
+
@windows_code_sign_pkcs11password = ''
|
88
|
+
@mac_oscode_sign = Comet::MacOSCodeSignProperties.new
|
69
89
|
@unknown_json_fields = {}
|
70
90
|
end
|
71
91
|
|
72
92
|
# @param [String] json_string The complete object in JSON format
|
73
93
|
def from_json(json_string)
|
74
|
-
raise TypeError 'expected
|
94
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
75
95
|
|
76
96
|
from_hash(JSON.parse(json_string))
|
77
97
|
end
|
78
98
|
|
79
99
|
# @param [Hash] obj The complete object as a Ruby hash
|
80
100
|
def from_hash(obj)
|
81
|
-
raise TypeError 'expected
|
101
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
82
102
|
|
83
103
|
obj.each do |k, v|
|
84
104
|
case k
|
85
105
|
when 'PathIcoFile'
|
86
|
-
raise TypeError 'expected
|
106
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
87
107
|
|
88
108
|
@path_ico_file = v
|
89
109
|
when 'PathIcnsFile'
|
90
|
-
raise TypeError 'expected
|
110
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
91
111
|
|
92
112
|
@path_icns_file = v
|
93
113
|
when 'PathEulaRtf'
|
94
|
-
raise TypeError 'expected
|
114
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
95
115
|
|
96
116
|
@path_eula_rtf = v
|
97
117
|
when 'PathTilePng'
|
98
|
-
raise TypeError 'expected
|
118
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
99
119
|
|
100
120
|
@path_tile_png = v
|
101
121
|
when 'PathHeaderImage'
|
102
|
-
raise TypeError 'expected
|
122
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
103
123
|
|
104
124
|
@path_header_image = v
|
105
125
|
when 'PackageIdentifier'
|
106
|
-
raise TypeError 'expected
|
126
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
107
127
|
|
108
128
|
@package_identifier = v
|
109
129
|
when 'WindowsCodeSignPKCS12FilePath'
|
110
|
-
raise TypeError 'expected
|
130
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
111
131
|
|
112
132
|
@windows_code_sign_pkcs12file_path = v
|
113
133
|
when 'WindowsCodeSignPKCS12PasswordFormat'
|
134
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
135
|
+
|
114
136
|
@windows_code_sign_pkcs12password_format = v
|
115
137
|
when 'WindowsCodeSignPKCS12Password'
|
116
|
-
raise TypeError 'expected
|
138
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
117
139
|
|
118
140
|
@windows_code_sign_pkcs12password = v
|
119
141
|
when 'WindowsCodeSignPKCS11Engine'
|
120
|
-
raise TypeError 'expected
|
142
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
121
143
|
|
122
144
|
@windows_code_sign_pkcs11engine = v
|
123
145
|
when 'WindowsCodeSignPKCS11Module'
|
124
|
-
raise TypeError 'expected
|
146
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
125
147
|
|
126
148
|
@windows_code_sign_pkcs11module = v
|
127
149
|
when 'WindowsCodeSignPKCS11Certfile'
|
128
|
-
raise TypeError 'expected
|
150
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
129
151
|
|
130
152
|
@windows_code_sign_pkcs11certfile = v
|
131
153
|
when 'WindowsCodeSignPKCS11KeyID'
|
132
|
-
raise TypeError 'expected
|
154
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
133
155
|
|
134
156
|
@windows_code_sign_pkcs11key_id = v
|
135
157
|
when 'WindowsCodeSignPKCS11PasswordFormat'
|
158
|
+
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
159
|
+
|
136
160
|
@windows_code_sign_pkcs11password_format = v
|
137
161
|
when 'WindowsCodeSignPKCS11Password'
|
138
|
-
raise TypeError 'expected
|
162
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
139
163
|
|
140
164
|
@windows_code_sign_pkcs11password = v
|
141
165
|
when 'MacOSCodeSign'
|
@@ -24,20 +24,24 @@ 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
|
@allowed_engine_type_when_restricted = []
|
28
32
|
@unknown_json_fields = {}
|
29
33
|
end
|
30
34
|
|
31
35
|
# @param [String] json_string The complete object in JSON format
|
32
36
|
def from_json(json_string)
|
33
|
-
raise TypeError 'expected
|
37
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
34
38
|
|
35
39
|
from_hash(JSON.parse(json_string))
|
36
40
|
end
|
37
41
|
|
38
42
|
# @param [Hash] obj The complete object as a Ruby hash
|
39
43
|
def from_hash(obj)
|
40
|
-
raise TypeError 'expected
|
44
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
41
45
|
|
42
46
|
obj.each do |k, v|
|
43
47
|
case k
|
@@ -49,7 +53,7 @@ module Comet
|
|
49
53
|
else
|
50
54
|
@allowed_engine_type_when_restricted = Array.new(v.length)
|
51
55
|
v.each_with_index do |v1, i1|
|
52
|
-
raise TypeError 'expected
|
56
|
+
raise TypeError "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
53
57
|
|
54
58
|
@allowed_engine_type_when_restricted[i1] = v1
|
55
59
|
end
|
@@ -42,46 +42,56 @@ module Comet
|
|
42
42
|
attr_accessor :unknown_json_fields
|
43
43
|
|
44
44
|
def initialize
|
45
|
+
clear
|
46
|
+
end
|
47
|
+
|
48
|
+
def clear
|
49
|
+
@product_name = ''
|
50
|
+
@company_name = ''
|
51
|
+
@help_url = ''
|
52
|
+
@default_login_server_url = ''
|
53
|
+
@tile_background_color = ''
|
54
|
+
@account_register_url = ''
|
45
55
|
@unknown_json_fields = {}
|
46
56
|
end
|
47
57
|
|
48
58
|
# @param [String] json_string The complete object in JSON format
|
49
59
|
def from_json(json_string)
|
50
|
-
raise TypeError 'expected
|
60
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
51
61
|
|
52
62
|
from_hash(JSON.parse(json_string))
|
53
63
|
end
|
54
64
|
|
55
65
|
# @param [Hash] obj The complete object as a Ruby hash
|
56
66
|
def from_hash(obj)
|
57
|
-
raise TypeError 'expected
|
67
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
58
68
|
|
59
69
|
obj.each do |k, v|
|
60
70
|
case k
|
61
71
|
when 'ProductName'
|
62
|
-
raise TypeError 'expected
|
72
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
63
73
|
|
64
74
|
@product_name = v
|
65
75
|
when 'CompanyName'
|
66
|
-
raise TypeError 'expected
|
76
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
67
77
|
|
68
78
|
@company_name = v
|
69
79
|
when 'HelpURL'
|
70
|
-
raise TypeError 'expected
|
80
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
71
81
|
|
72
82
|
@help_url = v
|
73
83
|
when 'HelpIsPopup'
|
74
84
|
@help_is_popup = v
|
75
85
|
when 'DefaultLoginServerURL'
|
76
|
-
raise TypeError 'expected
|
86
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
77
87
|
|
78
88
|
@default_login_server_url = v
|
79
89
|
when 'TileBackgroundColor'
|
80
|
-
raise TypeError 'expected
|
90
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
81
91
|
|
82
92
|
@tile_background_color = v
|
83
93
|
when 'AccountRegisterURL'
|
84
|
-
raise TypeError 'expected
|
94
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
85
95
|
|
86
96
|
@account_register_url = v
|
87
97
|
when 'HideBackgroundLogo'
|
@@ -42,40 +42,52 @@ module Comet
|
|
42
42
|
attr_accessor :unknown_json_fields
|
43
43
|
|
44
44
|
def initialize
|
45
|
+
clear
|
46
|
+
end
|
47
|
+
|
48
|
+
def clear
|
49
|
+
@type = ''
|
50
|
+
@description = ''
|
51
|
+
@remote_address = ''
|
52
|
+
@username = ''
|
53
|
+
@password = ''
|
54
|
+
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
55
|
+
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
56
|
+
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
45
57
|
@unknown_json_fields = {}
|
46
58
|
end
|
47
59
|
|
48
60
|
# @param [String] json_string The complete object in JSON format
|
49
61
|
def from_json(json_string)
|
50
|
-
raise TypeError 'expected
|
62
|
+
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
51
63
|
|
52
64
|
from_hash(JSON.parse(json_string))
|
53
65
|
end
|
54
66
|
|
55
67
|
# @param [Hash] obj The complete object as a Ruby hash
|
56
68
|
def from_hash(obj)
|
57
|
-
raise TypeError 'expected
|
69
|
+
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
58
70
|
|
59
71
|
obj.each do |k, v|
|
60
72
|
case k
|
61
73
|
when 'Type'
|
62
|
-
raise TypeError 'expected
|
74
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
63
75
|
|
64
76
|
@type = v
|
65
77
|
when 'Description'
|
66
|
-
raise TypeError 'expected
|
78
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
67
79
|
|
68
80
|
@description = v
|
69
81
|
when 'RemoteAddress'
|
70
|
-
raise TypeError 'expected
|
82
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
71
83
|
|
72
84
|
@remote_address = v
|
73
85
|
when 'Username'
|
74
|
-
raise TypeError 'expected
|
86
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
75
87
|
|
76
88
|
@username = v
|
77
89
|
when 'Password'
|
78
|
-
raise TypeError 'expected
|
90
|
+
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
79
91
|
|
80
92
|
@password = v
|
81
93
|
when 'LDAP'
|