comet_backup_ruby_sdk 1.14.0 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -0
  3. data/.rubocop.yml +0 -0
  4. data/CHANGELOG.md +6 -0
  5. data/Gemfile.lock +0 -0
  6. data/RELEASING.md +0 -0
  7. data/comet_backup_ruby_sdk.gemspec +1 -1
  8. data/lib/comet/comet_server.rb +49 -10
  9. data/lib/comet/definitions.rb +37 -4
  10. data/lib/{models/wasabi_virtual_storage_role_settings.rb → comet/models/amazon_awsvirtual_storage_role_settings.rb} +2 -2
  11. data/lib/comet/models/remote_server_address.rb +21 -0
  12. data/lib/comet/models/remote_storage_option.rb +21 -0
  13. data/lib/{models → comet/models}/s3generic_virtual_storage_role.rb +0 -0
  14. metadata +4 -171
  15. data/lib/api_response_error.rb +0 -27
  16. data/lib/comet_server.rb +0 -3785
  17. data/lib/definitions.rb +0 -710
  18. data/lib/models/add_bucket_response_message.rb +0 -102
  19. data/lib/models/admin_account_properties_response.rb +0 -91
  20. data/lib/models/admin_email_options.rb +0 -84
  21. data/lib/models/admin_resource_response.rb +0 -93
  22. data/lib/models/admin_security_options.rb +0 -177
  23. data/lib/models/admin_u2fregistration.rb +0 -93
  24. data/lib/models/admin_user_permissions.rb +0 -106
  25. data/lib/models/admin_web_authn_registration.rb +0 -121
  26. data/lib/models/allowed_admin_user.rb +0 -214
  27. data/lib/models/available_download.rb +0 -90
  28. data/lib/models/azure_destination_location.rb +0 -111
  29. data/lib/models/b2destination_location.rb +0 -130
  30. data/lib/models/b2storage_extra_info.rb +0 -81
  31. data/lib/models/b2transaction_totals.rb +0 -93
  32. data/lib/models/b2virtual_storage_role_settings.rb +0 -99
  33. data/lib/models/backup_job_advanced_options.rb +0 -117
  34. data/lib/models/backup_job_detail.rb +0 -328
  35. data/lib/models/backup_job_progress.rb +0 -111
  36. data/lib/models/backup_rule_config.rb +0 -233
  37. data/lib/models/backup_rule_event_triggers.rb +0 -82
  38. data/lib/models/branding_options.rb +0 -335
  39. data/lib/models/branding_properties.rb +0 -293
  40. data/lib/models/browse_disk_drives_response.rb +0 -99
  41. data/lib/models/browse_edbresponse.rb +0 -99
  42. data/lib/models/browse_hvresponse.rb +0 -99
  43. data/lib/models/browse_office_365list_virtual_accounts_response.rb +0 -99
  44. data/lib/models/browse_office_365objects_response.rb +0 -99
  45. data/lib/models/browse_sqlserver_response.rb +0 -100
  46. data/lib/models/browse_vssresponse.rb +0 -99
  47. data/lib/models/bucket_properties.rb +0 -110
  48. data/lib/models/bucket_usage_info.rb +0 -97
  49. data/lib/models/comet_apiresponse_message.rb +0 -84
  50. data/lib/models/comet_destination_location.rb +0 -93
  51. data/lib/models/constellation_check_report.rb +0 -99
  52. data/lib/models/constellation_stats.rb +0 -102
  53. data/lib/models/constellation_status_apiresponse.rb +0 -114
  54. data/lib/models/content_measurement.rb +0 -99
  55. data/lib/models/content_measurement_component.rb +0 -91
  56. data/lib/models/create_group_policy_response.rb +0 -93
  57. data/lib/models/custom_remote_bucket_settings.rb +0 -75
  58. data/lib/models/days_of_week_config.rb +0 -108
  59. data/lib/models/default_email_report_policy.rb +0 -87
  60. data/lib/models/default_source_with_osrestriction.rb +0 -83
  61. data/lib/models/destination_config.rb +0 -562
  62. data/lib/models/destination_location.rb +0 -421
  63. data/lib/models/destination_statistics.rb +0 -115
  64. data/lib/models/device_config.rb +0 -124
  65. data/lib/models/disk_drive.rb +0 -180
  66. data/lib/models/dispatcher_admin_sources_response.rb +0 -100
  67. data/lib/models/dispatcher_stored_objects_response.rb +0 -99
  68. data/lib/models/dispatcher_vault_snapshots_response.rb +0 -99
  69. data/lib/models/dispatcher_windisk_snapshot_response.rb +0 -99
  70. data/lib/models/edbfile_info.rb +0 -99
  71. data/lib/models/email_options.rb +0 -153
  72. data/lib/models/email_report_config.rb +0 -98
  73. data/lib/models/email_report_generated_preview.rb +0 -136
  74. data/lib/models/external_ldapauthentication_source_settings.rb +0 -135
  75. data/lib/models/extra_file_exclusion.rb +0 -90
  76. data/lib/models/ftpdestination_location.rb +0 -141
  77. data/lib/models/get_group_policy_response.rb +0 -101
  78. data/lib/models/get_profile_and_hash_response_message.rb +0 -101
  79. data/lib/models/get_profile_hash_response_message.rb +0 -93
  80. data/lib/models/group_policy.rb +0 -98
  81. data/lib/models/hour_sched_config.rb +0 -84
  82. data/lib/models/hyper_vmachine_info.rb +0 -84
  83. data/lib/models/install_creds.rb +0 -99
  84. data/lib/models/install_token.rb +0 -117
  85. data/lib/models/install_token_response.rb +0 -92
  86. data/lib/models/job_entry.rb +0 -94
  87. data/lib/models/live_user_connection.rb +0 -149
  88. data/lib/models/local_destination_location.rb +0 -102
  89. data/lib/models/mac_oscode_sign_properties.rb +0 -197
  90. data/lib/models/mongo_dbconnection.rb +0 -230
  91. data/lib/models/mssqlconnection.rb +0 -120
  92. data/lib/models/my_sqlconnection.rb +0 -141
  93. data/lib/models/new_bucket_detail.rb +0 -84
  94. data/lib/models/news_entry.rb +0 -93
  95. data/lib/models/office_365connection.rb +0 -131
  96. data/lib/models/office_365credential.rb +0 -111
  97. data/lib/models/office_365custom_setting.rb +0 -133
  98. data/lib/models/office_365custom_setting_v2.rb +0 -108
  99. data/lib/models/office_365mixed_virtual_account.rb +0 -211
  100. data/lib/models/office_365object_info.rb +0 -118
  101. data/lib/models/organization.rb +0 -151
  102. data/lib/models/organization_response.rb +0 -101
  103. data/lib/models/osinfo.rb +0 -99
  104. data/lib/models/partition.rb +0 -172
  105. data/lib/models/private_branding_properties.rb +0 -227
  106. data/lib/models/protected_item_engine_type_policy.rb +0 -88
  107. data/lib/models/public_branding_properties.rb +0 -132
  108. data/lib/models/register_office_application_begin_response.rb +0 -93
  109. data/lib/models/register_office_application_check_response.rb +0 -100
  110. data/lib/models/remote_server_address.rb +0 -167
  111. data/lib/models/remote_storage_option.rb +0 -188
  112. data/lib/models/replicator_state_apiresponse.rb +0 -174
  113. data/lib/models/request_storage_vault_response_message.rb +0 -93
  114. data/lib/models/restore_job_advanced_options.rb +0 -131
  115. data/lib/models/retention_policy.rb +0 -90
  116. data/lib/models/retention_range.rb +0 -138
  117. data/lib/models/s3destination_location.rb +0 -123
  118. data/lib/models/schedule_config.rb +0 -131
  119. data/lib/models/search_clause.rb +0 -119
  120. data/lib/models/self_backup_statistics.rb +0 -108
  121. data/lib/models/server_config_options_branding_fragment.rb +0 -74
  122. data/lib/models/server_config_options_software_build_role_fragment.rb +0 -74
  123. data/lib/models/server_meta_branding_properties.rb +0 -144
  124. data/lib/models/server_meta_version_info.rb +0 -261
  125. data/lib/models/session_key_regenerated_response.rb +0 -102
  126. data/lib/models/sftpdestination_location.rb +0 -135
  127. data/lib/models/size_measurement.rb +0 -93
  128. data/lib/models/software_build_role_options.rb +0 -78
  129. data/lib/models/software_update_news_response.rb +0 -109
  130. data/lib/models/source_basic_info.rb +0 -101
  131. data/lib/models/source_config.rb +0 -202
  132. data/lib/models/source_include_pattern.rb +0 -84
  133. data/lib/models/source_statistics.rb +0 -82
  134. data/lib/models/spanned_destination_location.rb +0 -87
  135. data/lib/models/spanned_storage_extra_info.rb +0 -81
  136. data/lib/models/sshconnection.rb +0 -126
  137. data/lib/models/stat_result.rb +0 -111
  138. data/lib/models/storage_free_space_info.rb +0 -110
  139. data/lib/models/storage_vault_provider_policy.rb +0 -88
  140. data/lib/models/stored_object.rb +0 -238
  141. data/lib/models/streamable_event.rb +0 -92
  142. data/lib/models/swift_destination_location.rb +0 -209
  143. data/lib/models/test_response.rb +0 -90
  144. data/lib/models/totp_regenerated_response.rb +0 -111
  145. data/lib/models/u2fregister_request.rb +0 -85
  146. data/lib/models/u2fregistered_key.rb +0 -94
  147. data/lib/models/u2fregistration_challenge_response.rb +0 -133
  148. data/lib/models/u2fsign_request.rb +0 -109
  149. data/lib/models/u2fsign_response.rb +0 -103
  150. data/lib/models/uninstall_config.rb +0 -78
  151. data/lib/models/update_campaign_device_status.rb +0 -75
  152. data/lib/models/update_campaign_options.rb +0 -113
  153. data/lib/models/update_campaign_properties.rb +0 -128
  154. data/lib/models/update_campaign_status.rb +0 -143
  155. data/lib/models/update_campaign_status_device_entry.rb +0 -93
  156. data/lib/models/user_custom_email_settings.rb +0 -81
  157. data/lib/models/user_on_server.rb +0 -84
  158. data/lib/models/user_policy.rb +0 -339
  159. data/lib/models/user_profile_config.rb +0 -349
  160. data/lib/models/user_profile_fragment.rb +0 -75
  161. data/lib/models/vault_snapshot.rb +0 -99
  162. data/lib/models/vmdksnapshot_view_options.rb +0 -90
  163. data/lib/models/vsscomponent.rb +0 -99
  164. data/lib/models/vsswriter_info.rb +0 -90
  165. data/lib/models/web_authn_authenticator_selection.rb +0 -96
  166. data/lib/models/web_authn_credential.rb +0 -105
  167. data/lib/models/web_authn_credential_assertion.rb +0 -74
  168. data/lib/models/web_authn_credential_descriptor.rb +0 -101
  169. data/lib/models/web_authn_credential_entity.rb +0 -86
  170. data/lib/models/web_authn_credential_parameter.rb +0 -84
  171. data/lib/models/web_authn_public_key_credential_creation_options.rb +0 -172
  172. data/lib/models/web_authn_public_key_credential_request_options.rb +0 -140
  173. data/lib/models/web_authn_registration_challenge_response.rb +0 -101
  174. data/lib/models/web_authn_relying_party_entity.rb +0 -95
  175. data/lib/models/web_authn_sign_request.rb +0 -83
  176. data/lib/models/web_authn_sign_response.rb +0 -84
  177. data/lib/models/web_authn_user_entity.rb +0 -105
  178. data/lib/models/web_interface_branding_properties.rb +0 -108
  179. data/lib/models/webhook_option.rb +0 -107
  180. data/lib/models/win_smbauth.rb +0 -102
  181. data/lib/models/windows_code_sign_properties.rb +0 -147
@@ -1,349 +0,0 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
3
- # Copyright (c) 2020-2022 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
- # UserProfileConfig is a typed class wrapper around the underlying Comet Server API data structure.
15
- # This is the main data structure for a user's profile.
16
- class UserProfileConfig
17
-
18
- # @type [String] username
19
- attr_accessor :username
20
-
21
- # @type [String] account_name
22
- attr_accessor :account_name
23
-
24
- # @type [String] local_timezone
25
- attr_accessor :local_timezone
26
-
27
- # @type [String] language_code
28
- attr_accessor :language_code
29
-
30
- # Tenant
31
- # @type [String] organization_id
32
- attr_accessor :organization_id
33
-
34
- # @type [Array<String>] emails
35
- attr_accessor :emails
36
-
37
- # @type [Hash{String => Comet::UserCustomEmailSettings}] override_email_settings
38
- attr_accessor :override_email_settings
39
-
40
- # @type [Boolean] send_email_reports
41
- attr_accessor :send_email_reports
42
-
43
- # Storage Vaults
44
- # @type [Hash{String => Comet::DestinationConfig}] destinations
45
- attr_accessor :destinations
46
-
47
- # Protected Items
48
- # @type [Hash{String => Comet::SourceConfig}] sources
49
- attr_accessor :sources
50
-
51
- # @type [Hash{String => Comet::BackupRuleConfig}] backup_rules
52
- attr_accessor :backup_rules
53
-
54
- # @type [Hash{String => Comet::DeviceConfig}] devices
55
- attr_accessor :devices
56
-
57
- # @type [Boolean] is_suspended
58
- attr_accessor :is_suspended
59
-
60
- # @type [Boolean] all_protected_items_quota_enabled
61
- attr_accessor :all_protected_items_quota_enabled
62
-
63
- # @type [Number] all_protected_items_quota_bytes
64
- attr_accessor :all_protected_items_quota_bytes
65
-
66
- # @type [Number] maximum_devices
67
- attr_accessor :maximum_devices
68
-
69
- # If the PolicyID field is set to a non-empty string, the Comet Server will enforce the contents of
70
- # the Policy field based on the matching server's policy. Otherwise if the PolicyID field is set to an
71
- # empty string, the administrator may configure any custom values in the Policy field.
72
- # @type [String] policy_id
73
- attr_accessor :policy_id
74
-
75
- # @type [Comet::UserPolicy] policy
76
- attr_accessor :policy
77
-
78
- # To change the user's password, use the AdminResetUserPassword API instead of accessing these fields
79
- # directly. Otherwise, other encrypted fields in the user profile may become corrupted.
80
- # @type [Number] password_format
81
- attr_accessor :password_format
82
-
83
- # @type [String] password_hash
84
- attr_accessor :password_hash
85
-
86
- # @type [String] password_recovery
87
- attr_accessor :password_recovery
88
-
89
- # @type [Boolean] allow_password_login
90
- attr_accessor :allow_password_login
91
-
92
- # @type [Boolean] allow_password_and_totplogin
93
- attr_accessor :allow_password_and_totplogin
94
-
95
- # @type [Number] totpkey_encryption_format
96
- attr_accessor :totpkey_encryption_format
97
-
98
- # @type [String] totpkey
99
- attr_accessor :totpkey
100
-
101
- # @type [Boolean] require_password_change
102
- attr_accessor :require_password_change
103
-
104
- # @type [Number] create_time
105
- attr_accessor :create_time
106
-
107
- # @type [String] creation_guid
108
- attr_accessor :creation_guid
109
-
110
- # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
111
- attr_accessor :unknown_json_fields
112
-
113
- def initialize
114
- clear
115
- end
116
-
117
- def clear
118
- @username = ''
119
- @account_name = ''
120
- @local_timezone = ''
121
- @language_code = ''
122
- @organization_id = ''
123
- @emails = []
124
- @override_email_settings = {}
125
- @destinations = {}
126
- @sources = {}
127
- @backup_rules = {}
128
- @devices = {}
129
- @all_protected_items_quota_bytes = 0
130
- @maximum_devices = 0
131
- @policy_id = ''
132
- @policy = Comet::UserPolicy.new
133
- @password_format = 0
134
- @password_hash = ''
135
- @password_recovery = ''
136
- @totpkey_encryption_format = 0
137
- @totpkey = ''
138
- @create_time = 0
139
- @creation_guid = ''
140
- @unknown_json_fields = {}
141
- end
142
-
143
- # @param [String] json_string The complete object in JSON format
144
- def from_json(json_string)
145
- raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
146
-
147
- from_hash(JSON.parse(json_string))
148
- end
149
-
150
- # @param [Hash] obj The complete object as a Ruby hash
151
- def from_hash(obj)
152
- raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
153
-
154
- obj.each do |k, v|
155
- case k
156
- when 'Username'
157
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
158
-
159
- @username = v
160
- when 'AccountName'
161
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
162
-
163
- @account_name = v
164
- when 'LocalTimezone'
165
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
166
-
167
- @local_timezone = v
168
- when 'LanguageCode'
169
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
170
-
171
- @language_code = v
172
- when 'OrganizationID'
173
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
174
-
175
- @organization_id = v
176
- when 'Emails'
177
- if v.nil?
178
- @emails = []
179
- else
180
- @emails = Array.new(v.length)
181
- v.each_with_index do |v1, i1|
182
- raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
183
-
184
- @emails[i1] = v1
185
- end
186
- end
187
- when 'OverrideEmailSettings'
188
- @override_email_settings = {}
189
- if v.nil?
190
- @override_email_settings = {}
191
- else
192
- v.each do |k1, v1|
193
- @override_email_settings[k1] = Comet::UserCustomEmailSettings.new
194
- @override_email_settings[k1].from_hash(v1)
195
- end
196
- end
197
- when 'SendEmailReports'
198
- @send_email_reports = v
199
- when 'Destinations'
200
- @destinations = {}
201
- if v.nil?
202
- @destinations = {}
203
- else
204
- v.each do |k1, v1|
205
- @destinations[k1] = Comet::DestinationConfig.new
206
- @destinations[k1].from_hash(v1)
207
- end
208
- end
209
- when 'Sources'
210
- @sources = {}
211
- if v.nil?
212
- @sources = {}
213
- else
214
- v.each do |k1, v1|
215
- @sources[k1] = Comet::SourceConfig.new
216
- @sources[k1].from_hash(v1)
217
- end
218
- end
219
- when 'BackupRules'
220
- @backup_rules = {}
221
- if v.nil?
222
- @backup_rules = {}
223
- else
224
- v.each do |k1, v1|
225
- @backup_rules[k1] = Comet::BackupRuleConfig.new
226
- @backup_rules[k1].from_hash(v1)
227
- end
228
- end
229
- when 'Devices'
230
- @devices = {}
231
- if v.nil?
232
- @devices = {}
233
- else
234
- v.each do |k1, v1|
235
- @devices[k1] = Comet::DeviceConfig.new
236
- @devices[k1].from_hash(v1)
237
- end
238
- end
239
- when 'IsSuspended'
240
- @is_suspended = v
241
- when 'AllProtectedItemsQuotaEnabled'
242
- @all_protected_items_quota_enabled = v
243
- when 'AllProtectedItemsQuotaBytes'
244
- raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
245
-
246
- @all_protected_items_quota_bytes = v
247
- when 'MaximumDevices'
248
- raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
249
-
250
- @maximum_devices = v
251
- when 'PolicyID'
252
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
253
-
254
- @policy_id = v
255
- when 'Policy'
256
- @policy = Comet::UserPolicy.new
257
- @policy.from_hash(v)
258
- when 'PasswordFormat'
259
- raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
260
-
261
- @password_format = v
262
- when 'PasswordHash'
263
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
264
-
265
- @password_hash = v
266
- when 'PasswordRecovery'
267
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
268
-
269
- @password_recovery = v
270
- when 'AllowPasswordLogin'
271
- @allow_password_login = v
272
- when 'AllowPasswordAndTOTPLogin'
273
- @allow_password_and_totplogin = v
274
- when 'TOTPKeyEncryptionFormat'
275
- raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
276
-
277
- @totpkey_encryption_format = v
278
- when 'TOTPKey'
279
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
280
-
281
- @totpkey = v
282
- when 'RequirePasswordChange'
283
- @require_password_change = v
284
- when 'CreateTime'
285
- raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
286
-
287
- @create_time = v
288
- when 'CreationGUID'
289
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
290
-
291
- @creation_guid = v
292
- else
293
- @unknown_json_fields[k] = v
294
- end
295
- end
296
- end
297
-
298
- # @return [Hash] The complete object as a Ruby hash
299
- def to_hash
300
- ret = {}
301
- ret['Username'] = @username
302
- ret['AccountName'] = @account_name
303
- ret['LocalTimezone'] = @local_timezone
304
- ret['LanguageCode'] = @language_code
305
- unless @organization_id.nil?
306
- ret['OrganizationID'] = @organization_id
307
- end
308
- ret['Emails'] = @emails
309
- ret['OverrideEmailSettings'] = @override_email_settings
310
- ret['SendEmailReports'] = @send_email_reports
311
- ret['Destinations'] = @destinations
312
- ret['Sources'] = @sources
313
- ret['BackupRules'] = @backup_rules
314
- ret['Devices'] = @devices
315
- ret['IsSuspended'] = @is_suspended
316
- ret['AllProtectedItemsQuotaEnabled'] = @all_protected_items_quota_enabled
317
- ret['AllProtectedItemsQuotaBytes'] = @all_protected_items_quota_bytes
318
- ret['MaximumDevices'] = @maximum_devices
319
- ret['PolicyID'] = @policy_id
320
- ret['Policy'] = @policy
321
- ret['PasswordFormat'] = @password_format
322
- ret['PasswordHash'] = @password_hash
323
- unless @password_recovery.nil?
324
- ret['PasswordRecovery'] = @password_recovery
325
- end
326
- ret['AllowPasswordLogin'] = @allow_password_login
327
- ret['AllowPasswordAndTOTPLogin'] = @allow_password_and_totplogin
328
- ret['TOTPKeyEncryptionFormat'] = @totpkey_encryption_format
329
- ret['TOTPKey'] = @totpkey
330
- ret['RequirePasswordChange'] = @require_password_change
331
- ret['CreateTime'] = @create_time
332
- ret['CreationGUID'] = @creation_guid
333
- @unknown_json_fields.each do |k, v|
334
- ret[k] = v
335
- end
336
- ret
337
- end
338
-
339
- # @return [Hash] The complete object as a Ruby hash
340
- def to_h
341
- to_hash
342
- end
343
-
344
- # @return [String] The complete object as a JSON string
345
- def to_json(options = {})
346
- to_hash.to_json(options)
347
- end
348
- end
349
- end
@@ -1,75 +0,0 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
3
- # Copyright (c) 2020-2022 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
- # UserProfileFragment is a typed class wrapper around the underlying Comet Server API data structure.
15
- class UserProfileFragment
16
-
17
- # @type [String] username
18
- attr_accessor :username
19
-
20
- # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
21
- attr_accessor :unknown_json_fields
22
-
23
- def initialize
24
- clear
25
- end
26
-
27
- def clear
28
- @username = ''
29
- @unknown_json_fields = {}
30
- end
31
-
32
- # @param [String] json_string The complete object in JSON format
33
- def from_json(json_string)
34
- raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
35
-
36
- from_hash(JSON.parse(json_string))
37
- end
38
-
39
- # @param [Hash] obj The complete object as a Ruby hash
40
- def from_hash(obj)
41
- raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
42
-
43
- obj.each do |k, v|
44
- case k
45
- when 'Username'
46
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
47
-
48
- @username = v
49
- else
50
- @unknown_json_fields[k] = v
51
- end
52
- end
53
- end
54
-
55
- # @return [Hash] The complete object as a Ruby hash
56
- def to_hash
57
- ret = {}
58
- ret['Username'] = @username
59
- @unknown_json_fields.each do |k, v|
60
- ret[k] = v
61
- end
62
- ret
63
- end
64
-
65
- # @return [Hash] The complete object as a Ruby hash
66
- def to_h
67
- to_hash
68
- end
69
-
70
- # @return [String] The complete object as a JSON string
71
- def to_json(options = {})
72
- to_hash.to_json(options)
73
- end
74
- end
75
- end
@@ -1,99 +0,0 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
3
- # Copyright (c) 2020-2022 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
- # VaultSnapshot is a typed class wrapper around the underlying Comet Server API data structure.
15
- class VaultSnapshot
16
-
17
- # @type [String] snapshot
18
- attr_accessor :snapshot
19
-
20
- # @type [String] source
21
- attr_accessor :source
22
-
23
- # @type [Number] create_time
24
- attr_accessor :create_time
25
-
26
- # @type [Boolean] has_original_path_info
27
- attr_accessor :has_original_path_info
28
-
29
- # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
30
- attr_accessor :unknown_json_fields
31
-
32
- def initialize
33
- clear
34
- end
35
-
36
- def clear
37
- @snapshot = ''
38
- @source = ''
39
- @create_time = 0
40
- @unknown_json_fields = {}
41
- end
42
-
43
- # @param [String] json_string The complete object in JSON format
44
- def from_json(json_string)
45
- raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
46
-
47
- from_hash(JSON.parse(json_string))
48
- end
49
-
50
- # @param [Hash] obj The complete object as a Ruby hash
51
- def from_hash(obj)
52
- raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
53
-
54
- obj.each do |k, v|
55
- case k
56
- when 'Snapshot'
57
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
58
-
59
- @snapshot = v
60
- when 'Source'
61
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
62
-
63
- @source = v
64
- when 'CreateTime'
65
- raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
66
-
67
- @create_time = v
68
- when 'HasOriginalPathInfo'
69
- @has_original_path_info = v
70
- else
71
- @unknown_json_fields[k] = v
72
- end
73
- end
74
- end
75
-
76
- # @return [Hash] The complete object as a Ruby hash
77
- def to_hash
78
- ret = {}
79
- ret['Snapshot'] = @snapshot
80
- ret['Source'] = @source
81
- ret['CreateTime'] = @create_time
82
- ret['HasOriginalPathInfo'] = @has_original_path_info
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
@@ -1,90 +0,0 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
3
- # Copyright (c) 2020-2022 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
- # VMDKSnapshotViewOptions is a typed class wrapper around the underlying Comet Server API data structure.
15
- class VMDKSnapshotViewOptions
16
-
17
- # @type [Boolean] enabled
18
- attr_accessor :enabled
19
-
20
- # @type [String] partition_guid
21
- attr_accessor :partition_guid
22
-
23
- # @type [String] list_path
24
- attr_accessor :list_path
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
- @partition_guid = ''
35
- @list_path = ''
36
- @unknown_json_fields = {}
37
- end
38
-
39
- # @param [String] json_string The complete object in JSON format
40
- def from_json(json_string)
41
- raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
42
-
43
- from_hash(JSON.parse(json_string))
44
- end
45
-
46
- # @param [Hash] obj The complete object as a Ruby hash
47
- def from_hash(obj)
48
- raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
49
-
50
- obj.each do |k, v|
51
- case k
52
- when 'Enabled'
53
- @enabled = v
54
- when 'PartitionGUID'
55
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
56
-
57
- @partition_guid = v
58
- when 'ListPath'
59
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
60
-
61
- @list_path = v
62
- else
63
- @unknown_json_fields[k] = v
64
- end
65
- end
66
- end
67
-
68
- # @return [Hash] The complete object as a Ruby hash
69
- def to_hash
70
- ret = {}
71
- ret['Enabled'] = @enabled
72
- ret['PartitionGUID'] = @partition_guid
73
- ret['ListPath'] = @list_path
74
- @unknown_json_fields.each do |k, v|
75
- ret[k] = v
76
- end
77
- ret
78
- end
79
-
80
- # @return [Hash] The complete object as a Ruby hash
81
- def to_h
82
- to_hash
83
- end
84
-
85
- # @return [String] The complete object as a JSON string
86
- def to_json(options = {})
87
- to_hash.to_json(options)
88
- end
89
- end
90
- end
@@ -1,99 +0,0 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
3
- # Copyright (c) 2020-2022 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
- # VSSComponent is a typed class wrapper around the underlying Comet Server API data structure.
15
- class VSSComponent
16
-
17
- # @type [String] path
18
- attr_accessor :path
19
-
20
- # @type [String] name
21
- attr_accessor :name
22
-
23
- # @type [String] ctype
24
- attr_accessor :ctype
25
-
26
- # @type [Boolean] selectable
27
- attr_accessor :selectable
28
-
29
- # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
30
- attr_accessor :unknown_json_fields
31
-
32
- def initialize
33
- clear
34
- end
35
-
36
- def clear
37
- @path = ''
38
- @name = ''
39
- @ctype = ''
40
- @unknown_json_fields = {}
41
- end
42
-
43
- # @param [String] json_string The complete object in JSON format
44
- def from_json(json_string)
45
- raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
46
-
47
- from_hash(JSON.parse(json_string))
48
- end
49
-
50
- # @param [Hash] obj The complete object as a Ruby hash
51
- def from_hash(obj)
52
- raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
53
-
54
- obj.each do |k, v|
55
- case k
56
- when 'Path'
57
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
58
-
59
- @path = v
60
- when 'Name'
61
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
62
-
63
- @name = v
64
- when 'CType'
65
- raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
66
-
67
- @ctype = v
68
- when 'Selectable'
69
- @selectable = v
70
- else
71
- @unknown_json_fields[k] = v
72
- end
73
- end
74
- end
75
-
76
- # @return [Hash] The complete object as a Ruby hash
77
- def to_hash
78
- ret = {}
79
- ret['Path'] = @path
80
- ret['Name'] = @name
81
- ret['CType'] = @ctype
82
- ret['Selectable'] = @selectable
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