comet_backup_ruby_sdk 1.0.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/Gemfile.lock +2 -2
  4. data/LICENSE +1 -1
  5. data/comet_backup_ruby_sdk.gemspec +1 -1
  6. data/lib/comet/api_response_error.rb +1 -1
  7. data/lib/comet/comet_server.rb +602 -291
  8. data/lib/comet/definitions.rb +48 -4
  9. data/lib/comet/models/add_bucket_response_message.rb +7 -7
  10. data/lib/comet/models/admin_account_properties_response.rb +4 -4
  11. data/lib/comet/models/admin_email_options.rb +5 -5
  12. data/lib/comet/models/admin_resource_response.rb +6 -6
  13. data/lib/comet/models/admin_security_options.rb +8 -8
  14. data/lib/comet/models/admin_u2fregistration.rb +5 -5
  15. data/lib/comet/models/admin_user_permissions.rb +3 -3
  16. data/lib/comet/models/available_download.rb +5 -5
  17. data/lib/comet/models/azure_destination_location.rb +8 -8
  18. data/lib/comet/models/b2destination_location.rb +8 -8
  19. data/lib/comet/models/b2storage_extra_info.rb +3 -3
  20. data/lib/comet/models/b2transaction_totals.rb +6 -6
  21. data/lib/comet/models/b2virtual_storage_role_settings.rb +6 -6
  22. data/lib/comet/models/backup_job_advanced_options.rb +5 -5
  23. data/lib/comet/models/backup_job_detail.rb +54 -21
  24. data/lib/comet/models/backup_job_progress.rb +8 -8
  25. data/lib/comet/models/backup_rule_config.rb +28 -12
  26. data/lib/comet/models/backup_rule_event_triggers.rb +3 -3
  27. data/lib/comet/models/branding_options.rb +37 -28
  28. data/lib/comet/models/branding_properties.rb +33 -24
  29. data/lib/comet/models/browse_disk_drives_response.rb +5 -5
  30. data/lib/comet/models/browse_edbresponse.rb +5 -5
  31. data/lib/comet/models/browse_hvresponse.rb +5 -5
  32. data/lib/comet/models/browse_office_365objects_response.rb +99 -0
  33. data/lib/comet/models/browse_sqlserver_response.rb +100 -0
  34. data/lib/comet/models/browse_vssresponse.rb +5 -5
  35. data/lib/comet/models/bucket_properties.rb +7 -7
  36. data/lib/comet/models/bucket_usage_info.rb +4 -4
  37. data/lib/comet/models/comet_apiresponse_message.rb +5 -5
  38. data/lib/comet/models/comet_destination_location.rb +6 -6
  39. data/lib/comet/models/constellation_check_report.rb +5 -5
  40. data/lib/comet/models/constellation_stats.rb +7 -7
  41. data/lib/comet/models/constellation_status_apiresponse.rb +5 -5
  42. data/lib/comet/models/content_measurement.rb +5 -5
  43. data/lib/comet/models/content_measurement_component.rb +5 -5
  44. data/lib/comet/models/create_group_policy_response.rb +6 -6
  45. data/lib/comet/models/custom_remote_bucket_settings.rb +75 -0
  46. data/lib/comet/models/default_email_report_policy.rb +3 -3
  47. data/lib/comet/models/destination_config.rb +66 -44
  48. data/lib/comet/models/destination_location.rb +41 -35
  49. data/lib/comet/models/destination_statistics.rb +6 -6
  50. data/lib/comet/models/device_config.rb +4 -4
  51. data/lib/comet/models/disk_drive.rb +14 -14
  52. data/lib/comet/models/dispatcher_admin_sources_response.rb +6 -6
  53. data/lib/comet/models/dispatcher_stored_objects_response.rb +5 -5
  54. data/lib/comet/models/dispatcher_vault_snapshots_response.rb +5 -5
  55. data/lib/comet/models/edbfile_info.rb +6 -6
  56. data/lib/comet/models/email_options.rb +10 -10
  57. data/lib/comet/models/email_report_config.rb +4 -4
  58. data/lib/comet/models/email_report_generated_preview.rb +8 -8
  59. data/lib/comet/models/external_ldapauthentication_source_settings.rb +40 -7
  60. data/lib/comet/models/extra_file_exclusion.rb +5 -5
  61. data/lib/comet/models/ftpdestination_location.rb +10 -10
  62. data/lib/comet/models/get_group_policy_response.rb +6 -6
  63. data/lib/comet/models/get_profile_and_hash_response_message.rb +6 -6
  64. data/lib/comet/models/get_profile_hash_response_message.rb +6 -6
  65. data/lib/comet/models/group_policy.rb +5 -5
  66. data/lib/comet/models/hyper_vmachine_info.rb +5 -5
  67. data/lib/comet/models/install_creds.rb +6 -6
  68. data/lib/comet/models/install_token.rb +8 -8
  69. data/lib/comet/models/install_token_response.rb +5 -5
  70. data/lib/comet/models/job_entry.rb +6 -6
  71. data/lib/comet/models/live_user_connection.rb +9 -9
  72. data/lib/comet/models/local_destination_location.rb +7 -7
  73. data/lib/comet/models/mac_oscode_sign_properties.rb +9 -9
  74. data/lib/comet/models/mongo_dbconnection.rb +16 -16
  75. data/lib/comet/models/mssqlconnection.rb +120 -0
  76. data/lib/comet/models/my_sqlconnection.rb +102 -0
  77. data/lib/comet/models/new_bucket_detail.rb +5 -5
  78. data/lib/comet/models/news_entry.rb +6 -6
  79. data/lib/comet/models/office_365connection.rb +123 -0
  80. data/lib/comet/models/office_365credential.rb +111 -0
  81. data/lib/comet/models/office_365custom_setting.rb +132 -0
  82. data/lib/comet/models/office_365object_info.rb +118 -0
  83. data/lib/comet/models/organization.rb +11 -5
  84. data/lib/comet/models/organization_response.rb +6 -6
  85. data/lib/comet/models/osinfo.rb +6 -6
  86. data/lib/comet/models/partition.rb +14 -14
  87. data/lib/comet/models/private_branding_properties.rb +27 -18
  88. data/lib/comet/models/protected_item_engine_type_policy.rb +4 -4
  89. data/lib/comet/models/public_branding_properties.rb +9 -9
  90. data/lib/comet/models/register_office_application_begin_response.rb +93 -0
  91. data/lib/comet/models/register_office_application_check_response.rb +100 -0
  92. data/lib/comet/models/remote_server_address.rb +18 -8
  93. data/lib/comet/models/remote_storage_option.rb +19 -9
  94. data/lib/comet/models/replicator_state_apiresponse.rb +15 -15
  95. data/lib/comet/models/request_storage_vault_response_message.rb +6 -6
  96. data/lib/comet/models/restore_job_advanced_options.rb +13 -7
  97. data/lib/comet/models/retention_policy.rb +4 -4
  98. data/lib/comet/models/retention_range.rb +11 -11
  99. data/lib/comet/models/s3destination_location.rb +8 -8
  100. data/lib/comet/models/schedule_config.rb +6 -6
  101. data/lib/comet/models/search_clause.rb +7 -7
  102. data/lib/comet/models/self_backup_statistics.rb +108 -0
  103. data/lib/comet/models/server_config_options_branding_fragment.rb +3 -3
  104. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +3 -3
  105. data/lib/comet/models/server_meta_version_info.rb +33 -18
  106. data/lib/comet/models/session_key_regenerated_response.rb +7 -7
  107. data/lib/comet/models/sftpdestination_location.rb +10 -10
  108. data/lib/comet/models/size_measurement.rb +6 -6
  109. data/lib/comet/models/software_build_role_options.rb +3 -3
  110. data/lib/comet/models/software_update_news_response.rb +7 -7
  111. data/lib/comet/models/source_basic_info.rb +5 -5
  112. data/lib/comet/models/source_config.rb +27 -11
  113. data/lib/comet/models/source_statistics.rb +3 -3
  114. data/lib/comet/models/spanned_destination_location.rb +9 -3
  115. data/lib/comet/models/spanned_storage_extra_info.rb +3 -3
  116. data/lib/comet/models/sshconnection.rb +9 -9
  117. data/lib/comet/models/stat_result.rb +7 -7
  118. data/lib/comet/models/storage_free_space_info.rb +5 -5
  119. data/lib/comet/models/storage_vault_provider_policy.rb +4 -4
  120. data/lib/comet/models/stored_object.rb +96 -11
  121. data/lib/comet/models/streamable_event.rb +8 -6
  122. data/lib/comet/models/swift_destination_location.rb +16 -16
  123. data/lib/comet/models/test_response.rb +5 -5
  124. data/lib/comet/models/totp_regenerated_response.rb +8 -8
  125. data/lib/comet/models/u2fregister_request.rb +5 -5
  126. data/lib/comet/models/u2fregistered_key.rb +6 -6
  127. data/lib/comet/models/u2fregistration_challenge_response.rb +7 -7
  128. data/lib/comet/models/u2fsign_request.rb +6 -6
  129. data/lib/comet/models/u2fsign_response.rb +7 -7
  130. data/lib/comet/models/uninstall_config.rb +3 -3
  131. data/lib/comet/models/update_campaign_device_status.rb +4 -4
  132. data/lib/comet/models/update_campaign_options.rb +3 -3
  133. data/lib/comet/models/update_campaign_properties.rb +5 -5
  134. data/lib/comet/models/update_campaign_status.rb +5 -5
  135. data/lib/comet/models/update_campaign_status_device_entry.rb +6 -6
  136. data/lib/comet/models/user_custom_email_settings.rb +3 -3
  137. data/lib/comet/models/user_on_server.rb +5 -5
  138. data/lib/comet/models/user_policy.rb +7 -7
  139. data/lib/comet/models/user_profile_config.rb +19 -19
  140. data/lib/comet/models/user_profile_fragment.rb +4 -4
  141. data/lib/comet/models/vault_snapshot.rb +12 -6
  142. data/lib/comet/models/vsscomponent.rb +6 -6
  143. data/lib/comet/models/vsswriter_info.rb +4 -4
  144. data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +6 -6
  145. data/lib/comet/models/web_interface_branding_properties.rb +7 -7
  146. data/lib/comet/models/webhook_option.rb +5 -5
  147. data/lib/comet/models/win_smbauth.rb +7 -7
  148. data/lib/comet/models/windows_code_sign_properties.rb +12 -12
  149. data/lib/comet_backup_ruby_sdk.rb +13 -1
  150. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ab077fca07acb49e1718c0ba71798a105e88ec3862457648e9c7ac99bc5da49
4
- data.tar.gz: f495d2a625abb94c25ef337ac03dce967bc64595c8847f92215b7fe2efccf1b4
3
+ metadata.gz: e207ce3e89091839b912a7f7ee7de17315de2474890d7560b5b79f1afee434c5
4
+ data.tar.gz: d85eddeaa1e27a71d3d1415742afa28808e8575f2a46bf20d56a7b0da75a3c9f
5
5
  SHA512:
6
- metadata.gz: ebf84239a94db56cfc315b3a4e0b51805fa84cd9e6aaef679757ccbbad02e4bcc5f2b0b2f96b82993a4cfe23e280a9b5cce15c96237c43f922558f2b1d90b12a
7
- data.tar.gz: 459c8197ab831eb5a6a9c526692ec2e3e30ff248647ca1b60cd8be20fe371f2ab940dcd1ae04658f2d8a2589364a5615e36482aaa4a941a9ee84c96956488ff7
6
+ metadata.gz: 566f2c136d8c7af458ab75d6fd9f0117ab68a5c114e1ab589af8990773f8e6850326d323380aec56a36332e6bfc85686ce5cbdafeeb358ccb5a0058a2d051e0e
7
+ data.tar.gz: c92c6256810c4dcaec62ee81ff44ebc2944b97c41a5fa193200b340f523973ea74fee4c4372d37321356020c9323723e7137d2b4593b8fc381ef00abcd96212c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2021-05-25 v1.5.0
4
+ - Based on Comet 21.6.1
5
+ - Add new APIs to remotely browse MySQL, MongoDB, MSSQL database servers
6
+ - Add Microsoft Office 365 properties on BackupJobDetail and on StoredObject
7
+ - Add Microsoft Office 365 browsing APIs
8
+ - Add Microsoft Office 365 Engine definition (`ENGINE_BUILTIN_MSOFFICE`) and associated `EngineProp` data structure definitions
9
+ - Add `AdminDispatcherRegisterOfficeApplication` APIs
10
+ - Add `RESTORETYPE_OFFICE365_CLOUD` constant
11
+ - Support suspending organizations
12
+ - Support reading the Server Self-Backup status
13
+ - Support new `PathMenuBarIcnsFile` branding option for Comet Backup on macOS
14
+ - Add more detailed description for `AdminDispatcherRequestStoredObjects`
15
+
16
+ ## 2021-03-03 v1.4.0
17
+ - Based on Comet 21.2.1
18
+ - Support restoring files to original paths
19
+ - Support the new "Custom" requestable Storage Vault provider type and its `CustomRemoteBucketSettings` structure
20
+ - Support new `SpanUseStaticSlots` attribute
21
+ - Fix missing fields in `ExternalLDAPAuthenticationSourceSettings` structure
22
+ - Fix broken `AdminDispatcherRequestFilesystemObjects` that was parsing into the wrong response type
23
+
24
+ ## 2020-11-24 v1.3.0
25
+ - Based on Comet 20.11.0
26
+ - Support new `AdminDispatcherDeleteSnapshots` API for deleting multiple snapshots in a single step
27
+ - Support `AdminMetaResourceNew` API using multipart request
28
+ - Fix an issue with properly raising `TypeError` for invalid parameters
29
+
30
+ ## 2020-11-05 v1.2.0
31
+ - Based on Comet 20.9.10
32
+ - Support new `ThawExec` feature
33
+
34
+ ## 2020-10-08 v1.1.0
35
+ - Based on Comet 20.9.6
36
+ - Support new `AdminStorageBucketProperties` API
37
+ - Allow passing in nil or no value for `AdminStorageFreeSpace` parameter
38
+ - Fix an issue with automatic SelfAddress parameters not containing a trailing slash
39
+
3
40
  ## 2020-09-16 v1.0.0
4
41
  - Tag a v1.0.0 release as the SDK design has stabilized. Future v1.x.x SDK releases will remain compatible with code written against v1.0.0, according to [Semantic Versioning](https://semver.org/).
5
42
  - Support new Organization feature
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (1.0.0)
4
+ comet_backup_ruby_sdk (1.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,7 +14,7 @@ GEM
14
14
  rainbow (3.0.0)
15
15
  rake (13.0.1)
16
16
  regexp_parser (1.7.1)
17
- rexml (3.2.4)
17
+ rexml (3.2.5)
18
18
  rubocop (0.88.0)
19
19
  parallel (~> 1.10)
20
20
  parser (>= 2.7.1.1)
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020 Comet Licensing Ltd.
1
+ Copyright (c) 2021 Comet Licensing Ltd.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
12
12
 
13
13
  Gem::Specification.new do |spec|
14
14
  spec.name = 'comet_backup_ruby_sdk'
15
- spec.version = '1.0.0'
15
+ spec.version = '1.5.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2020 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2021 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2020 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2021 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -26,15 +26,18 @@ module Comet
26
26
 
27
27
  # Initialize a new CometServer class instance.
28
28
  def initialize(server_address, username, password)
29
- raise TypeError "'server_address' expected String, got #{server_address.class}" unless server_address.is_a? String
29
+ raise TypeError, "'server_address' expected String, got #{server_address.class}" unless server_address.is_a? String
30
30
 
31
- raise TypeError "'username' expected String, got #{username.class}" unless username.is_a? String
31
+ raise TypeError, "'username' expected String, got #{username.class}" unless username.is_a? String
32
32
 
33
- raise TypeError "'password' expected String, got #{password.class}" unless password.is_a? String
33
+ raise TypeError, "'password' expected String, got #{password.class}" unless password.is_a? String
34
34
 
35
35
  @server_address = server_address
36
36
  @username = username
37
37
  @password = password
38
+
39
+ # Ensure Comet Server URL has a trailing slash
40
+ @server_address += '/' unless server_address.end_with?('/')
38
41
  end
39
42
 
40
43
  # AdminAccountProperties
@@ -46,7 +49,7 @@ module Comet
46
49
  #
47
50
  # @return [Comet::AdminAccountPropertiesResponse]
48
51
  def admin_account_properties
49
- body = perform_request('/api/v1/admin/account/properties')
52
+ body = perform_request('api/v1/admin/account/properties')
50
53
  json_body = JSON.parse body
51
54
  check_status json_body
52
55
  ret = Comet::AdminAccountPropertiesResponse.new
@@ -63,7 +66,7 @@ module Comet
63
66
  #
64
67
  # @return [Comet::TotpRegeneratedResponse]
65
68
  def admin_account_regenerate_totp
66
- body = perform_request('/api/v1/admin/account/regenerate-totp')
69
+ body = perform_request('api/v1/admin/account/regenerate-totp')
67
70
  json_body = JSON.parse body
68
71
  check_status json_body
69
72
  ret = Comet::TotpRegeneratedResponse.new
@@ -79,7 +82,7 @@ module Comet
79
82
  #
80
83
  # @return [Comet::CometAPIResponseMessage]
81
84
  def admin_account_session_revoke
82
- body = perform_request('/api/v1/admin/account/session-revoke')
85
+ body = perform_request('api/v1/admin/account/session-revoke')
83
86
  json_body = JSON.parse body
84
87
  check_status json_body
85
88
  ret = Comet::CometAPIResponseMessage.new
@@ -100,12 +103,12 @@ module Comet
100
103
  if self_address.nil?
101
104
  submit_params['SelfAddress'] = @server_address
102
105
  else
103
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
106
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
104
107
 
105
108
  submit_params['SelfAddress'] = self_address
106
109
  end
107
110
 
108
- body = perform_request('/api/v1/admin/account/session-start', submit_params)
111
+ body = perform_request('api/v1/admin/account/session-start', submit_params)
109
112
  json_body = JSON.parse body
110
113
  check_status json_body
111
114
  ret = Comet::SessionKeyRegeneratedResponse.new
@@ -123,11 +126,11 @@ module Comet
123
126
  # @return [Comet::SessionKeyRegeneratedResponse]
124
127
  def admin_account_session_start_as_user(target_user)
125
128
  submit_params = {}
126
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
129
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
127
130
 
128
131
  submit_params['TargetUser'] = target_user
129
132
 
130
- body = perform_request('/api/v1/admin/account/session-start-as-user', submit_params)
133
+ body = perform_request('api/v1/admin/account/session-start-as-user', submit_params)
131
134
  json_body = JSON.parse body
132
135
  check_status json_body
133
136
  ret = Comet::SessionKeyRegeneratedResponse.new
@@ -148,11 +151,11 @@ module Comet
148
151
  # @return [Comet::CometAPIResponseMessage]
149
152
  def admin_account_set_properties(security)
150
153
  submit_params = {}
151
- raise TypeError "'security' expected Comet::AdminSecurityOptions, got #{security.class}" unless security.is_a? Comet::AdminSecurityOptions
154
+ raise TypeError, "'security' expected Comet::AdminSecurityOptions, got #{security.class}" unless security.is_a? Comet::AdminSecurityOptions
152
155
 
153
156
  submit_params['Security'] = security.to_json
154
157
 
155
- body = perform_request('/api/v1/admin/account/set-properties', submit_params)
158
+ body = perform_request('api/v1/admin/account/set-properties', submit_params)
156
159
  json_body = JSON.parse body
157
160
  check_status json_body
158
161
  ret = Comet::CometAPIResponseMessage.new
@@ -170,11 +173,11 @@ module Comet
170
173
  # @return [Comet::U2FRegistrationChallengeResponse]
171
174
  def admin_account_u2f_request_registration_challenge(self_address)
172
175
  submit_params = {}
173
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
176
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
174
177
 
175
178
  submit_params['SelfAddress'] = self_address
176
179
 
177
- body = perform_request('/api/v1/admin/account/u2f/request-registration-challenge', submit_params)
180
+ body = perform_request('api/v1/admin/account/u2f/request-registration-challenge', submit_params)
178
181
  json_body = JSON.parse body
179
182
  check_status json_body
180
183
  ret = Comet::U2FRegistrationChallengeResponse.new
@@ -196,23 +199,23 @@ module Comet
196
199
  # @return [Comet::CometAPIResponseMessage]
197
200
  def admin_account_u2f_submit_challenge_response(u2fchallenge_id, u2fclient_data, u2fregistration_data, u2fversion, description)
198
201
  submit_params = {}
199
- raise TypeError "'u2fchallenge_id' expected String, got #{u2fchallenge_id.class}" unless u2fchallenge_id.is_a? String
202
+ raise TypeError, "'u2fchallenge_id' expected String, got #{u2fchallenge_id.class}" unless u2fchallenge_id.is_a? String
200
203
 
201
204
  submit_params['U2FChallengeID'] = u2fchallenge_id
202
- raise TypeError "'u2fclient_data' expected String, got #{u2fclient_data.class}" unless u2fclient_data.is_a? String
205
+ raise TypeError, "'u2fclient_data' expected String, got #{u2fclient_data.class}" unless u2fclient_data.is_a? String
203
206
 
204
207
  submit_params['U2FClientData'] = u2fclient_data
205
- raise TypeError "'u2fregistration_data' expected String, got #{u2fregistration_data.class}" unless u2fregistration_data.is_a? String
208
+ raise TypeError, "'u2fregistration_data' expected String, got #{u2fregistration_data.class}" unless u2fregistration_data.is_a? String
206
209
 
207
210
  submit_params['U2FRegistrationData'] = u2fregistration_data
208
- raise TypeError "'u2fversion' expected String, got #{u2fversion.class}" unless u2fversion.is_a? String
211
+ raise TypeError, "'u2fversion' expected String, got #{u2fversion.class}" unless u2fversion.is_a? String
209
212
 
210
213
  submit_params['U2FVersion'] = u2fversion
211
- raise TypeError "'description' expected String, got #{description.class}" unless description.is_a? String
214
+ raise TypeError, "'description' expected String, got #{description.class}" unless description.is_a? String
212
215
 
213
216
  submit_params['Description'] = description
214
217
 
215
- body = perform_request('/api/v1/admin/account/u2f/submit-challenge-response', submit_params)
218
+ body = perform_request('api/v1/admin/account/u2f/submit-challenge-response', submit_params)
216
219
  json_body = JSON.parse body
217
220
  check_status json_body
218
221
  ret = Comet::CometAPIResponseMessage.new
@@ -230,11 +233,11 @@ module Comet
230
233
  # @return [Comet::CometAPIResponseMessage]
231
234
  def admin_account_validate_totp(totpcode)
232
235
  submit_params = {}
233
- raise TypeError "'totpcode' expected String, got #{totpcode.class}" unless totpcode.is_a? String
236
+ raise TypeError, "'totpcode' expected String, got #{totpcode.class}" unless totpcode.is_a? String
234
237
 
235
238
  submit_params['TOTPCode'] = totpcode
236
239
 
237
- body = perform_request('/api/v1/admin/account/validate-totp', submit_params)
240
+ body = perform_request('api/v1/admin/account/validate-totp', submit_params)
238
241
  json_body = JSON.parse body
239
242
  check_status json_body
240
243
  ret = Comet::CometAPIResponseMessage.new
@@ -256,24 +259,24 @@ module Comet
256
259
  # @return [Comet::CometAPIResponseMessage]
257
260
  def admin_add_user(target_user, target_password, store_recovery_code = nil, require_password_change = nil)
258
261
  submit_params = {}
259
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
262
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
260
263
 
261
264
  submit_params['TargetUser'] = target_user
262
- raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
265
+ raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
263
266
 
264
267
  submit_params['TargetPassword'] = target_password
265
268
  unless store_recovery_code.nil?
266
- raise TypeError "'store_recovery_code' expected Numeric, got #{store_recovery_code.class}" unless store_recovery_code.is_a? Numeric
269
+ raise TypeError, "'store_recovery_code' expected Numeric, got #{store_recovery_code.class}" unless store_recovery_code.is_a? Numeric
267
270
 
268
271
  submit_params['StoreRecoveryCode'] = store_recovery_code
269
272
  end
270
273
  unless require_password_change.nil?
271
- raise TypeError "'require_password_change' expected Numeric, got #{require_password_change.class}" unless require_password_change.is_a? Numeric
274
+ raise TypeError, "'require_password_change' expected Numeric, got #{require_password_change.class}" unless require_password_change.is_a? Numeric
272
275
 
273
276
  submit_params['RequirePasswordChange'] = require_password_change
274
277
  end
275
278
 
276
- body = perform_request('/api/v1/admin/add-user', submit_params)
279
+ body = perform_request('api/v1/admin/add-user', submit_params)
277
280
  json_body = JSON.parse body
278
281
  check_status json_body
279
282
  ret = Comet::CometAPIResponseMessage.new
@@ -294,14 +297,14 @@ module Comet
294
297
  # @return [Comet::CometAPIResponseMessage]
295
298
  def admin_add_user_from_profile(target_user, profile_data)
296
299
  submit_params = {}
297
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
300
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
298
301
 
299
302
  submit_params['TargetUser'] = target_user
300
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
303
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
301
304
 
302
305
  submit_params['ProfileData'] = profile_data.to_json
303
306
 
304
- body = perform_request('/api/v1/admin/add-user-from-profile', submit_params)
307
+ body = perform_request('api/v1/admin/add-user-from-profile', submit_params)
305
308
  json_body = JSON.parse body
306
309
  check_status json_body
307
310
  ret = Comet::CometAPIResponseMessage.new
@@ -321,11 +324,11 @@ module Comet
321
324
  # @return [Comet::CometAPIResponseMessage]
322
325
  def admin_admin_user_delete(target_user)
323
326
  submit_params = {}
324
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
327
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
325
328
 
326
329
  submit_params['TargetUser'] = target_user
327
330
 
328
- body = perform_request('/api/v1/admin/admin-user/delete', submit_params)
331
+ body = perform_request('api/v1/admin/admin-user/delete', submit_params)
329
332
  json_body = JSON.parse body
330
333
  check_status json_body
331
334
  ret = Comet::CometAPIResponseMessage.new
@@ -343,7 +346,7 @@ module Comet
343
346
  #
344
347
  # @return [Array<Comet::AllowedAdminUser>]
345
348
  def admin_admin_user_list
346
- body = perform_request('/api/v1/admin/admin-user/list')
349
+ body = perform_request('api/v1/admin/admin-user/list')
347
350
  json_body = JSON.parse body
348
351
  check_status json_body
349
352
  if json_body.nil?
@@ -372,19 +375,19 @@ module Comet
372
375
  # @return [Comet::CometAPIResponseMessage]
373
376
  def admin_admin_user_new(target_user, target_password, target_org_id = nil)
374
377
  submit_params = {}
375
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
378
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
376
379
 
377
380
  submit_params['TargetUser'] = target_user
378
- raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
381
+ raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
379
382
 
380
383
  submit_params['TargetPassword'] = target_password
381
384
  unless target_org_id.nil?
382
- raise TypeError "'target_org_id' expected String, got #{target_org_id.class}" unless target_org_id.is_a? String
385
+ raise TypeError, "'target_org_id' expected String, got #{target_org_id.class}" unless target_org_id.is_a? String
383
386
 
384
387
  submit_params['TargetOrgID'] = target_org_id
385
388
  end
386
389
 
387
- body = perform_request('/api/v1/admin/admin-user/new', submit_params)
390
+ body = perform_request('api/v1/admin/admin-user/new', submit_params)
388
391
  json_body = JSON.parse body
389
392
  check_status json_body
390
393
  ret = Comet::CometAPIResponseMessage.new
@@ -402,7 +405,7 @@ module Comet
402
405
  #
403
406
  # @return [Hash{Number => Comet::AvailableDownload}]
404
407
  def admin_branding_available_platforms
405
- body = perform_request('/api/v1/admin/branding/available-platforms')
408
+ body = perform_request('api/v1/admin/branding/available-platforms')
406
409
  json_body = JSON.parse body
407
410
  check_status json_body
408
411
  ret = {}
@@ -430,18 +433,18 @@ module Comet
430
433
  # @return [String]
431
434
  def admin_branding_generate_client_by_platform(platform, self_address = nil)
432
435
  submit_params = {}
433
- raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
436
+ raise TypeError, "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
434
437
 
435
438
  submit_params['Platform'] = platform
436
439
  if self_address.nil?
437
440
  submit_params['SelfAddress'] = @server_address
438
441
  else
439
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
442
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
440
443
 
441
444
  submit_params['SelfAddress'] = self_address
442
445
  end
443
446
 
444
- perform_request('/api/v1/admin/branding/generate-client/by-platform', submit_params)
447
+ perform_request('api/v1/admin/branding/generate-client/by-platform', submit_params)
445
448
  end
446
449
 
447
450
  # AdminBrandingGenerateClientLinuxgeneric
@@ -459,12 +462,12 @@ module Comet
459
462
  if self_address.nil?
460
463
  submit_params['SelfAddress'] = @server_address
461
464
  else
462
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
465
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
463
466
 
464
467
  submit_params['SelfAddress'] = self_address
465
468
  end
466
469
 
467
- perform_request('/api/v1/admin/branding/generate-client/linuxgeneric', submit_params)
470
+ perform_request('api/v1/admin/branding/generate-client/linuxgeneric', submit_params)
468
471
  end
469
472
 
470
473
  # AdminBrandingGenerateClientMacosX8664
@@ -482,12 +485,12 @@ module Comet
482
485
  if self_address.nil?
483
486
  submit_params['SelfAddress'] = @server_address
484
487
  else
485
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
488
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
486
489
 
487
490
  submit_params['SelfAddress'] = self_address
488
491
  end
489
492
 
490
- perform_request('/api/v1/admin/branding/generate-client/macos-x86_64', submit_params)
493
+ perform_request('api/v1/admin/branding/generate-client/macos-x86_64', submit_params)
491
494
  end
492
495
 
493
496
  # AdminBrandingGenerateClientTest
@@ -503,18 +506,18 @@ module Comet
503
506
  # @return [Comet::CometAPIResponseMessage]
504
507
  def admin_branding_generate_client_test(platform, self_address = nil)
505
508
  submit_params = {}
506
- raise TypeError "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
509
+ raise TypeError, "'platform' expected Numeric, got #{platform.class}" unless platform.is_a? Numeric
507
510
 
508
511
  submit_params['Platform'] = platform
509
512
  if self_address.nil?
510
513
  submit_params['SelfAddress'] = @server_address
511
514
  else
512
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
515
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
513
516
 
514
517
  submit_params['SelfAddress'] = self_address
515
518
  end
516
519
 
517
- body = perform_request('/api/v1/admin/branding/generate-client/test', submit_params)
520
+ body = perform_request('api/v1/admin/branding/generate-client/test', submit_params)
518
521
  json_body = JSON.parse body
519
522
  check_status json_body
520
523
  ret = Comet::CometAPIResponseMessage.new
@@ -538,12 +541,12 @@ module Comet
538
541
  if self_address.nil?
539
542
  submit_params['SelfAddress'] = @server_address
540
543
  else
541
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
544
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
542
545
 
543
546
  submit_params['SelfAddress'] = self_address
544
547
  end
545
548
 
546
- perform_request('/api/v1/admin/branding/generate-client/windows-anycpu-exe', submit_params)
549
+ perform_request('api/v1/admin/branding/generate-client/windows-anycpu-exe', submit_params)
547
550
  end
548
551
 
549
552
  # AdminBrandingGenerateClientWindowsAnycpuZip
@@ -562,12 +565,12 @@ module Comet
562
565
  if self_address.nil?
563
566
  submit_params['SelfAddress'] = @server_address
564
567
  else
565
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
568
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
566
569
 
567
570
  submit_params['SelfAddress'] = self_address
568
571
  end
569
572
 
570
- perform_request('/api/v1/admin/branding/generate-client/windows-anycpu-zip', submit_params)
573
+ perform_request('api/v1/admin/branding/generate-client/windows-anycpu-zip', submit_params)
571
574
  end
572
575
 
573
576
  # AdminBrandingGenerateClientWindowsX8632Exe
@@ -586,12 +589,12 @@ module Comet
586
589
  if self_address.nil?
587
590
  submit_params['SelfAddress'] = @server_address
588
591
  else
589
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
592
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
590
593
 
591
594
  submit_params['SelfAddress'] = self_address
592
595
  end
593
596
 
594
- perform_request('/api/v1/admin/branding/generate-client/windows-x86_32-exe', submit_params)
597
+ perform_request('api/v1/admin/branding/generate-client/windows-x86_32-exe', submit_params)
595
598
  end
596
599
 
597
600
  # AdminBrandingGenerateClientWindowsX8632Zip
@@ -610,12 +613,12 @@ module Comet
610
613
  if self_address.nil?
611
614
  submit_params['SelfAddress'] = @server_address
612
615
  else
613
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
616
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
614
617
 
615
618
  submit_params['SelfAddress'] = self_address
616
619
  end
617
620
 
618
- perform_request('/api/v1/admin/branding/generate-client/windows-x86_32-zip', submit_params)
621
+ perform_request('api/v1/admin/branding/generate-client/windows-x86_32-zip', submit_params)
619
622
  end
620
623
 
621
624
  # AdminBrandingGenerateClientWindowsX8664Exe
@@ -634,12 +637,12 @@ module Comet
634
637
  if self_address.nil?
635
638
  submit_params['SelfAddress'] = @server_address
636
639
  else
637
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
640
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
638
641
 
639
642
  submit_params['SelfAddress'] = self_address
640
643
  end
641
644
 
642
- perform_request('/api/v1/admin/branding/generate-client/windows-x86_64-exe', submit_params)
645
+ perform_request('api/v1/admin/branding/generate-client/windows-x86_64-exe', submit_params)
643
646
  end
644
647
 
645
648
  # AdminBrandingGenerateClientWindowsX8664Zip
@@ -658,12 +661,12 @@ module Comet
658
661
  if self_address.nil?
659
662
  submit_params['SelfAddress'] = @server_address
660
663
  else
661
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
664
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
662
665
 
663
666
  submit_params['SelfAddress'] = self_address
664
667
  end
665
668
 
666
- perform_request('/api/v1/admin/branding/generate-client/windows-x86_64-zip', submit_params)
669
+ perform_request('api/v1/admin/branding/generate-client/windows-x86_64-zip', submit_params)
667
670
  end
668
671
 
669
672
  # AdminBulletinSubmit
@@ -678,14 +681,14 @@ module Comet
678
681
  # @return [Comet::CometAPIResponseMessage]
679
682
  def admin_bulletin_submit(subject, content)
680
683
  submit_params = {}
681
- raise TypeError "'subject' expected String, got #{subject.class}" unless subject.is_a? String
684
+ raise TypeError, "'subject' expected String, got #{subject.class}" unless subject.is_a? String
682
685
 
683
686
  submit_params['Subject'] = subject
684
- raise TypeError "'content' expected String, got #{content.class}" unless content.is_a? String
687
+ raise TypeError, "'content' expected String, got #{content.class}" unless content.is_a? String
685
688
 
686
689
  submit_params['Content'] = content
687
690
 
688
- body = perform_request('/api/v1/admin/bulletin/submit', submit_params)
691
+ body = perform_request('api/v1/admin/bulletin/submit', submit_params)
689
692
  json_body = JSON.parse body
690
693
  check_status json_body
691
694
  ret = Comet::CometAPIResponseMessage.new
@@ -703,7 +706,7 @@ module Comet
703
706
  #
704
707
  # @return [Comet::ConstellationCheckReport]
705
708
  def admin_constellation_last_report
706
- body = perform_request('/api/v1/admin/constellation/last-report')
709
+ body = perform_request('api/v1/admin/constellation/last-report')
707
710
  json_body = JSON.parse body
708
711
  check_status json_body
709
712
  ret = Comet::ConstellationCheckReport.new
@@ -721,7 +724,7 @@ module Comet
721
724
  #
722
725
  # @return [Comet::ConstellationCheckReport]
723
726
  def admin_constellation_new_report
724
- body = perform_request('/api/v1/admin/constellation/new-report')
727
+ body = perform_request('api/v1/admin/constellation/new-report')
725
728
  json_body = JSON.parse body
726
729
  check_status json_body
727
730
  ret = Comet::ConstellationCheckReport.new
@@ -739,7 +742,7 @@ module Comet
739
742
  #
740
743
  # @return [Comet::CometAPIResponseMessage]
741
744
  def admin_constellation_prune_now
742
- body = perform_request('/api/v1/admin/constellation/prune-now')
745
+ body = perform_request('api/v1/admin/constellation/prune-now')
743
746
  json_body = JSON.parse body
744
747
  check_status json_body
745
748
  ret = Comet::CometAPIResponseMessage.new
@@ -757,7 +760,7 @@ module Comet
757
760
  #
758
761
  # @return [Comet::ConstellationStatusAPIResponse]
759
762
  def admin_constellation_status
760
- body = perform_request('/api/v1/admin/constellation/status')
763
+ body = perform_request('api/v1/admin/constellation/status')
761
764
  json_body = JSON.parse body
762
765
  check_status json_body
763
766
  ret = Comet::ConstellationStatusAPIResponse.new
@@ -779,19 +782,19 @@ module Comet
779
782
  # @return [Comet::InstallTokenResponse]
780
783
  def admin_create_install_token(target_user, target_password, server = nil)
781
784
  submit_params = {}
782
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
785
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
783
786
 
784
787
  submit_params['TargetUser'] = target_user
785
- raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
788
+ raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
786
789
 
787
790
  submit_params['TargetPassword'] = target_password
788
791
  unless server.nil?
789
- raise TypeError "'server' expected String, got #{server.class}" unless server.is_a? String
792
+ raise TypeError, "'server' expected String, got #{server.class}" unless server.is_a? String
790
793
 
791
794
  submit_params['Server'] = server
792
795
  end
793
796
 
794
- body = perform_request('/api/v1/admin/create-install-token', submit_params)
797
+ body = perform_request('api/v1/admin/create-install-token', submit_params)
795
798
  json_body = JSON.parse body
796
799
  check_status json_body
797
800
  ret = Comet::InstallTokenResponse.new
@@ -814,16 +817,16 @@ module Comet
814
817
  # @return [Comet::CometAPIResponseMessage]
815
818
  def admin_delete_user(target_user, uninstall_config = nil)
816
819
  submit_params = {}
817
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
820
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
818
821
 
819
822
  submit_params['TargetUser'] = target_user
820
823
  unless uninstall_config.nil?
821
- raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
824
+ raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
822
825
 
823
826
  submit_params['UninstallConfig'] = uninstall_config.to_json
824
827
  end
825
828
 
826
- body = perform_request('/api/v1/admin/delete-user', submit_params)
829
+ body = perform_request('api/v1/admin/delete-user', submit_params)
827
830
  json_body = JSON.parse body
828
831
  check_status json_body
829
832
  ret = Comet::CometAPIResponseMessage.new
@@ -842,11 +845,11 @@ module Comet
842
845
  # @return [Comet::CometAPIResponseMessage]
843
846
  def admin_disable_user_totp(target_user)
844
847
  submit_params = {}
845
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
848
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
846
849
 
847
850
  submit_params['TargetUser'] = target_user
848
851
 
849
- body = perform_request('/api/v1/admin/disable-user-totp', submit_params)
852
+ body = perform_request('api/v1/admin/disable-user-totp', submit_params)
850
853
  json_body = JSON.parse body
851
854
  check_status json_body
852
855
  ret = Comet::CometAPIResponseMessage.new
@@ -867,14 +870,14 @@ module Comet
867
870
  # @return [Comet::CometAPIResponseMessage]
868
871
  def admin_dispatcher_apply_retention_rules(target_id, destination)
869
872
  submit_params = {}
870
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
873
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
871
874
 
872
875
  submit_params['TargetID'] = target_id
873
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
876
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
874
877
 
875
878
  submit_params['Destination'] = destination
876
879
 
877
- body = perform_request('/api/v1/admin/dispatcher/apply-retention-rules', submit_params)
880
+ body = perform_request('api/v1/admin/dispatcher/apply-retention-rules', submit_params)
878
881
  json_body = JSON.parse body
879
882
  check_status json_body
880
883
  ret = Comet::CometAPIResponseMessage.new
@@ -895,14 +898,14 @@ module Comet
895
898
  # @return [Comet::CometAPIResponseMessage]
896
899
  def admin_dispatcher_deepverify_storage_vault(target_id, destination)
897
900
  submit_params = {}
898
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
901
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
899
902
 
900
903
  submit_params['TargetID'] = target_id
901
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
904
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
902
905
 
903
906
  submit_params['Destination'] = destination
904
907
 
905
- body = perform_request('/api/v1/admin/dispatcher/deepverify-storage-vault', submit_params)
908
+ body = perform_request('api/v1/admin/dispatcher/deepverify-storage-vault', submit_params)
906
909
  json_body = JSON.parse body
907
910
  check_status json_body
908
911
  ret = Comet::CometAPIResponseMessage.new
@@ -923,17 +926,49 @@ module Comet
923
926
  # @return [Comet::CometAPIResponseMessage]
924
927
  def admin_dispatcher_delete_snapshot(target_id, destination_id, snapshot_id)
925
928
  submit_params = {}
926
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
929
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
927
930
 
928
931
  submit_params['TargetID'] = target_id
929
- raise TypeError "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
932
+ raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
930
933
 
931
934
  submit_params['DestinationID'] = destination_id
932
- raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
935
+ raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
933
936
 
934
937
  submit_params['SnapshotID'] = snapshot_id
935
938
 
936
- body = perform_request('/api/v1/admin/dispatcher/delete-snapshot', submit_params)
939
+ body = perform_request('api/v1/admin/dispatcher/delete-snapshot', submit_params)
940
+ json_body = JSON.parse body
941
+ check_status json_body
942
+ ret = Comet::CometAPIResponseMessage.new
943
+ ret.from_hash(json_body)
944
+ ret
945
+ end
946
+
947
+ # AdminDispatcherDeleteSnapshots
948
+ #
949
+ # Instruct a live connected device to delete multiple stored snapshots.
950
+ # The target device must be running Comet 20.9.10 or later.
951
+ #
952
+ # You must supply administrator authentication credentials to use this API.
953
+ # This API requires the Auth Role to be enabled.
954
+ #
955
+ # @param [String] target_id The live connection GUID
956
+ # @param [String] destination_id The Storage Vault GUID
957
+ # @param [Array<String>] snapshot_ids The backup job snapshot IDs to delete
958
+ # @return [Comet::CometAPIResponseMessage]
959
+ def admin_dispatcher_delete_snapshots(target_id, destination_id, snapshot_ids)
960
+ submit_params = {}
961
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
962
+
963
+ submit_params['TargetID'] = target_id
964
+ raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
965
+
966
+ submit_params['DestinationID'] = destination_id
967
+ raise TypeError, "'snapshot_ids' expected Array, got #{snapshot_ids.class}" unless snapshot_ids.is_a? Array
968
+
969
+ submit_params['SnapshotIDs'] = snapshot_ids.to_json
970
+
971
+ body = perform_request('api/v1/admin/dispatcher/delete-snapshots', submit_params)
937
972
  json_body = JSON.parse body
938
973
  check_status json_body
939
974
  ret = Comet::CometAPIResponseMessage.new
@@ -953,11 +988,11 @@ module Comet
953
988
  # @return [Comet::CometAPIResponseMessage]
954
989
  def admin_dispatcher_drop_connection(target_id)
955
990
  submit_params = {}
956
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
991
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
957
992
 
958
993
  submit_params['TargetID'] = target_id
959
994
 
960
- body = perform_request('/api/v1/admin/dispatcher/drop-connection', submit_params)
995
+ body = perform_request('api/v1/admin/dispatcher/drop-connection', submit_params)
961
996
  json_body = JSON.parse body
962
997
  check_status json_body
963
998
  ret = Comet::CometAPIResponseMessage.new
@@ -978,14 +1013,14 @@ module Comet
978
1013
  # @return [Comet::CometAPIResponseMessage]
979
1014
  def admin_dispatcher_import_apply(target_id, import_source_id)
980
1015
  submit_params = {}
981
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1016
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
982
1017
 
983
1018
  submit_params['TargetID'] = target_id
984
- raise TypeError "'import_source_id' expected String, got #{import_source_id.class}" unless import_source_id.is_a? String
1019
+ raise TypeError, "'import_source_id' expected String, got #{import_source_id.class}" unless import_source_id.is_a? String
985
1020
 
986
1021
  submit_params['ImportSourceID'] = import_source_id
987
1022
 
988
- body = perform_request('/api/v1/admin/dispatcher/import-apply', submit_params)
1023
+ body = perform_request('api/v1/admin/dispatcher/import-apply', submit_params)
989
1024
  json_body = JSON.parse body
990
1025
  check_status json_body
991
1026
  ret = Comet::CometAPIResponseMessage.new
@@ -1005,11 +1040,11 @@ module Comet
1005
1040
  # @return [Comet::CometAPIResponseMessage]
1006
1041
  def admin_dispatcher_kill_process(target_id)
1007
1042
  submit_params = {}
1008
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1043
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1009
1044
 
1010
1045
  submit_params['TargetID'] = target_id
1011
1046
 
1012
- body = perform_request('/api/v1/admin/dispatcher/kill-process', submit_params)
1047
+ body = perform_request('api/v1/admin/dispatcher/kill-process', submit_params)
1013
1048
  json_body = JSON.parse body
1014
1049
  check_status json_body
1015
1050
  ret = Comet::CometAPIResponseMessage.new
@@ -1026,7 +1061,7 @@ module Comet
1026
1061
  #
1027
1062
  # @return [Hash{String => Comet::LiveUserConnection}]
1028
1063
  def admin_dispatcher_list_active
1029
- body = perform_request('/api/v1/admin/dispatcher/list-active')
1064
+ body = perform_request('api/v1/admin/dispatcher/list-active')
1030
1065
  json_body = JSON.parse body
1031
1066
  check_status json_body
1032
1067
  ret = {}
@@ -1053,11 +1088,11 @@ module Comet
1053
1088
  # @return [Comet::CometAPIResponseMessage]
1054
1089
  def admin_dispatcher_refetch_profile(target_id)
1055
1090
  submit_params = {}
1056
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1091
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1057
1092
 
1058
1093
  submit_params['TargetID'] = target_id
1059
1094
 
1060
- body = perform_request('/api/v1/admin/dispatcher/refetch-profile', submit_params)
1095
+ body = perform_request('api/v1/admin/dispatcher/refetch-profile', submit_params)
1061
1096
  json_body = JSON.parse body
1062
1097
  check_status json_body
1063
1098
  ret = Comet::CometAPIResponseMessage.new
@@ -1065,6 +1100,62 @@ module Comet
1065
1100
  ret
1066
1101
  end
1067
1102
 
1103
+ # AdminDispatcherRegisterOfficeApplicationBegin
1104
+ #
1105
+ # Begin the process of registering a new Azure AD application that can access Office 365 for backup.
1106
+ # After calling this API, you should supply the login details to the end-user, and then begin polling the AdminDispatcherRegisterOfficeApplicationCheck with the supplied "Continuation" parameter to check on the registration process.
1107
+ #
1108
+ # You must supply administrator authentication credentials to use this API.
1109
+ # This API requires the Auth Role to be enabled.
1110
+ #
1111
+ # @param [String] target_id The live connection GUID
1112
+ # @param [String] email_address The email address of the Azure AD administrator
1113
+ # @return [Comet::RegisterOfficeApplicationBeginResponse]
1114
+ def admin_dispatcher_register_office_application_begin(target_id, email_address)
1115
+ submit_params = {}
1116
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1117
+
1118
+ submit_params['TargetID'] = target_id
1119
+ raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
1120
+
1121
+ submit_params['EmailAddress'] = email_address
1122
+
1123
+ body = perform_request('api/v1/admin/dispatcher/register-office-application/begin', submit_params)
1124
+ json_body = JSON.parse body
1125
+ check_status json_body
1126
+ ret = Comet::RegisterOfficeApplicationBeginResponse.new
1127
+ ret.from_hash(json_body)
1128
+ ret
1129
+ end
1130
+
1131
+ # AdminDispatcherRegisterOfficeApplicationCheck
1132
+ #
1133
+ # Check the process of registering a new Azure AD application that can access Office 365 for backup.
1134
+ # You should begin the process by calling AdminDispatcherRegisterOfficeApplicationBegin and asking the end-user to complete the Azure authentication steps.
1135
+ #
1136
+ # You must supply administrator authentication credentials to use this API.
1137
+ # This API requires the Auth Role to be enabled.
1138
+ #
1139
+ # @param [String] target_id The live connection GUID
1140
+ # @param [String] continuation The ID returned from the AdminDispatcherRegisterOfficeApplicationBegin endpoint
1141
+ # @return [Comet::RegisterOfficeApplicationCheckResponse]
1142
+ def admin_dispatcher_register_office_application_check(target_id, continuation)
1143
+ submit_params = {}
1144
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1145
+
1146
+ submit_params['TargetID'] = target_id
1147
+ raise TypeError, "'continuation' expected String, got #{continuation.class}" unless continuation.is_a? String
1148
+
1149
+ submit_params['Continuation'] = continuation
1150
+
1151
+ body = perform_request('api/v1/admin/dispatcher/register-office-application/check', submit_params)
1152
+ json_body = JSON.parse body
1153
+ check_status json_body
1154
+ ret = Comet::RegisterOfficeApplicationCheckResponse.new
1155
+ ret.from_hash(json_body)
1156
+ ret
1157
+ end
1158
+
1068
1159
  # AdminDispatcherReindexStorageVault
1069
1160
  #
1070
1161
  # Instruct a live connected device to rebuild Storage Vault indexes now.
@@ -1078,14 +1169,14 @@ module Comet
1078
1169
  # @return [Comet::CometAPIResponseMessage]
1079
1170
  def admin_dispatcher_reindex_storage_vault(target_id, destination)
1080
1171
  submit_params = {}
1081
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1172
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1082
1173
 
1083
1174
  submit_params['TargetID'] = target_id
1084
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1175
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1085
1176
 
1086
1177
  submit_params['Destination'] = destination
1087
1178
 
1088
- body = perform_request('/api/v1/admin/dispatcher/reindex-storage-vault', submit_params)
1179
+ body = perform_request('api/v1/admin/dispatcher/reindex-storage-vault', submit_params)
1089
1180
  json_body = JSON.parse body
1090
1181
  check_status json_body
1091
1182
  ret = Comet::CometAPIResponseMessage.new
@@ -1104,11 +1195,11 @@ module Comet
1104
1195
  # @return [Comet::BrowseDiskDrivesResponse]
1105
1196
  def admin_dispatcher_request_browse_disk_drives(target_id)
1106
1197
  submit_params = {}
1107
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1198
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1108
1199
 
1109
1200
  submit_params['TargetID'] = target_id
1110
1201
 
1111
- body = perform_request('/api/v1/admin/dispatcher/request-browse-disk-drives', submit_params)
1202
+ body = perform_request('api/v1/admin/dispatcher/request-browse-disk-drives', submit_params)
1112
1203
  json_body = JSON.parse body
1113
1204
  check_status json_body
1114
1205
  ret = Comet::BrowseDiskDrivesResponse.new
@@ -1127,11 +1218,11 @@ module Comet
1127
1218
  # @return [Comet::BrowseEDBResponse]
1128
1219
  def admin_dispatcher_request_browse_exchange_edb(target_id)
1129
1220
  submit_params = {}
1130
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1221
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1131
1222
 
1132
1223
  submit_params['TargetID'] = target_id
1133
1224
 
1134
- body = perform_request('/api/v1/admin/dispatcher/request-browse-exchange-edb', submit_params)
1225
+ body = perform_request('api/v1/admin/dispatcher/request-browse-exchange-edb', submit_params)
1135
1226
  json_body = JSON.parse body
1136
1227
  check_status json_body
1137
1228
  ret = Comet::BrowseEDBResponse.new
@@ -1150,11 +1241,11 @@ module Comet
1150
1241
  # @return [Comet::BrowseHVResponse]
1151
1242
  def admin_dispatcher_request_browse_hyperv(target_id)
1152
1243
  submit_params = {}
1153
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1244
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1154
1245
 
1155
1246
  submit_params['TargetID'] = target_id
1156
1247
 
1157
- body = perform_request('/api/v1/admin/dispatcher/request-browse-hyperv', submit_params)
1248
+ body = perform_request('api/v1/admin/dispatcher/request-browse-hyperv', submit_params)
1158
1249
  json_body = JSON.parse body
1159
1250
  check_status json_body
1160
1251
  ret = Comet::BrowseHVResponse.new
@@ -1162,6 +1253,90 @@ module Comet
1162
1253
  ret
1163
1254
  end
1164
1255
 
1256
+ # AdminDispatcherRequestBrowseMongodb
1257
+ #
1258
+ # Request a list of tables in MongoDB database.
1259
+ # The remote device must have given consent for an MSP to browse their files.
1260
+ #
1261
+ # You must supply administrator authentication credentials to use this API.
1262
+ # This API requires the Auth Role to be enabled.
1263
+ #
1264
+ # @param [String] target_id The live connection GUID
1265
+ # @param [Comet::MongoDBConnection] credentials The Mongo database authentication settings
1266
+ # @return [Comet::BrowseSQLServerResponse]
1267
+ def admin_dispatcher_request_browse_mongodb(target_id, credentials)
1268
+ submit_params = {}
1269
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1270
+
1271
+ submit_params['TargetID'] = target_id
1272
+ raise TypeError, "'credentials' expected Comet::MongoDBConnection, got #{credentials.class}" unless credentials.is_a? Comet::MongoDBConnection
1273
+
1274
+ submit_params['Credentials'] = credentials.to_json
1275
+
1276
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mongodb', submit_params)
1277
+ json_body = JSON.parse body
1278
+ check_status json_body
1279
+ ret = Comet::BrowseSQLServerResponse.new
1280
+ ret.from_hash(json_body)
1281
+ ret
1282
+ end
1283
+
1284
+ # AdminDispatcherRequestBrowseMssql
1285
+ #
1286
+ # Request a list of tables in MSSQL database.
1287
+ # The remote device must have given consent for an MSP to browse their files.
1288
+ #
1289
+ # You must supply administrator authentication credentials to use this API.
1290
+ # This API requires the Auth Role to be enabled.
1291
+ #
1292
+ # @param [String] target_id The live connection GUID
1293
+ # @param [Comet::MSSQLConnection] credentials The MSSQL database authentication settings
1294
+ # @return [Comet::BrowseSQLServerResponse]
1295
+ def admin_dispatcher_request_browse_mssql(target_id, credentials)
1296
+ submit_params = {}
1297
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1298
+
1299
+ submit_params['TargetID'] = target_id
1300
+ raise TypeError, "'credentials' expected Comet::MSSQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MSSQLConnection
1301
+
1302
+ submit_params['Credentials'] = credentials.to_json
1303
+
1304
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mssql', submit_params)
1305
+ json_body = JSON.parse body
1306
+ check_status json_body
1307
+ ret = Comet::BrowseSQLServerResponse.new
1308
+ ret.from_hash(json_body)
1309
+ ret
1310
+ end
1311
+
1312
+ # AdminDispatcherRequestBrowseMysql
1313
+ #
1314
+ # Request a list of tables in MySQL database.
1315
+ # The remote device must have given consent for an MSP to browse their files.
1316
+ #
1317
+ # You must supply administrator authentication credentials to use this API.
1318
+ # This API requires the Auth Role to be enabled.
1319
+ #
1320
+ # @param [String] target_id The live connection GUID
1321
+ # @param [Comet::MySQLConnection] credentials The MySQL database authentication settings
1322
+ # @return [Comet::BrowseSQLServerResponse]
1323
+ def admin_dispatcher_request_browse_mysql(target_id, credentials)
1324
+ submit_params = {}
1325
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1326
+
1327
+ submit_params['TargetID'] = target_id
1328
+ raise TypeError, "'credentials' expected Comet::MySQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MySQLConnection
1329
+
1330
+ submit_params['Credentials'] = credentials.to_json
1331
+
1332
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mysql', submit_params)
1333
+ json_body = JSON.parse body
1334
+ check_status json_body
1335
+ ret = Comet::BrowseSQLServerResponse.new
1336
+ ret.from_hash(json_body)
1337
+ ret
1338
+ end
1339
+
1165
1340
  # AdminDispatcherRequestBrowseVssAaw
1166
1341
  #
1167
1342
  # Request a list of installed VSS Writers (Application-Aware Writers) from a live connected device.
@@ -1173,11 +1348,11 @@ module Comet
1173
1348
  # @return [Comet::BrowseVSSResponse]
1174
1349
  def admin_dispatcher_request_browse_vss_aaw(target_id)
1175
1350
  submit_params = {}
1176
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1351
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1177
1352
 
1178
1353
  submit_params['TargetID'] = target_id
1179
1354
 
1180
- body = perform_request('/api/v1/admin/dispatcher/request-browse-vss-aaw', submit_params)
1355
+ body = perform_request('api/v1/admin/dispatcher/request-browse-vss-aaw', submit_params)
1181
1356
  json_body = JSON.parse body
1182
1357
  check_status json_body
1183
1358
  ret = Comet::BrowseVSSResponse.new
@@ -1195,30 +1370,23 @@ module Comet
1195
1370
  #
1196
1371
  # @param [String] target_id The live connection GUID
1197
1372
  # @param [String] path (Optional) Browse objects inside this path. If empty or not present, returns the top-level device paths
1198
- # @return [Array<Comet::StoredObject>]
1373
+ # @return [Comet::DispatcherStoredObjectsResponse]
1199
1374
  def admin_dispatcher_request_filesystem_objects(target_id, path = nil)
1200
1375
  submit_params = {}
1201
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1376
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1202
1377
 
1203
1378
  submit_params['TargetID'] = target_id
1204
1379
  unless path.nil?
1205
- raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1380
+ raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
1206
1381
 
1207
1382
  submit_params['Path'] = path
1208
1383
  end
1209
1384
 
1210
- body = perform_request('/api/v1/admin/dispatcher/request-filesystem-objects', submit_params)
1385
+ body = perform_request('api/v1/admin/dispatcher/request-filesystem-objects', submit_params)
1211
1386
  json_body = JSON.parse body
1212
1387
  check_status json_body
1213
- if json_body.nil?
1214
- ret = []
1215
- else
1216
- ret = Array.new(json_body.length)
1217
- json_body.each_with_index do |v, i|
1218
- ret[i] = Comet::StoredObject.new
1219
- ret[i].from_hash(v)
1220
- end
1221
- end
1388
+ ret = Comet::DispatcherStoredObjectsResponse.new
1389
+ ret.from_hash(json_body)
1222
1390
  ret
1223
1391
  end
1224
1392
 
@@ -1233,11 +1401,11 @@ module Comet
1233
1401
  # @return [Comet::DispatcherAdminSourcesResponse]
1234
1402
  def admin_dispatcher_request_import_sources(target_id)
1235
1403
  submit_params = {}
1236
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1404
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1237
1405
 
1238
1406
  submit_params['TargetID'] = target_id
1239
1407
 
1240
- body = perform_request('/api/v1/admin/dispatcher/request-import-sources', submit_params)
1408
+ body = perform_request('api/v1/admin/dispatcher/request-import-sources', submit_params)
1241
1409
  json_body = JSON.parse body
1242
1410
  check_status json_body
1243
1411
  ret = Comet::DispatcherAdminSourcesResponse.new
@@ -1245,10 +1413,67 @@ module Comet
1245
1413
  ret
1246
1414
  end
1247
1415
 
1416
+ # AdminDispatcherRequestOffice365Accounts
1417
+ #
1418
+ # Request a list of Office365 mailbox accounts.
1419
+ # The remote device must have given consent for an MSP to browse their files.
1420
+ #
1421
+ # You must supply administrator authentication credentials to use this API.
1422
+ # This API requires the Auth Role to be enabled.
1423
+ #
1424
+ # @param [String] target_id The live connection GUID
1425
+ # @param [Comet::Office365Credential] credentials The Office365 account credential
1426
+ # @return [Comet::BrowseOffice365ObjectsResponse]
1427
+ def admin_dispatcher_request_office_365accounts(target_id, credentials)
1428
+ submit_params = {}
1429
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1430
+
1431
+ submit_params['TargetID'] = target_id
1432
+ raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential
1433
+
1434
+ submit_params['Credentials'] = credentials.to_json
1435
+
1436
+ body = perform_request('api/v1/admin/dispatcher/request-office365-accounts', submit_params)
1437
+ json_body = JSON.parse body
1438
+ check_status json_body
1439
+ ret = Comet::BrowseOffice365ObjectsResponse.new
1440
+ ret.from_hash(json_body)
1441
+ ret
1442
+ end
1443
+
1444
+ # AdminDispatcherRequestOffice365Sites
1445
+ #
1446
+ # Request a list of Office365 sites.
1447
+ # The remote device must have given consent for an MSP to browse their files.
1448
+ #
1449
+ # You must supply administrator authentication credentials to use this API.
1450
+ # This API requires the Auth Role to be enabled.
1451
+ #
1452
+ # @param [String] target_id The live connection GUID
1453
+ # @param [Comet::Office365Credential] credentials The Office365 account credential
1454
+ # @return [Comet::BrowseOffice365ObjectsResponse]
1455
+ def admin_dispatcher_request_office_365sites(target_id, credentials)
1456
+ submit_params = {}
1457
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1458
+
1459
+ submit_params['TargetID'] = target_id
1460
+ raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential
1461
+
1462
+ submit_params['Credentials'] = credentials.to_json
1463
+
1464
+ body = perform_request('api/v1/admin/dispatcher/request-office365-sites', submit_params)
1465
+ json_body = JSON.parse body
1466
+ check_status json_body
1467
+ ret = Comet::BrowseOffice365ObjectsResponse.new
1468
+ ret.from_hash(json_body)
1469
+ ret
1470
+ end
1471
+
1248
1472
  # AdminDispatcherRequestStoredObjects
1249
1473
  #
1250
1474
  # Request a list of stored objects inside an existing backup job.
1251
1475
  # The remote device must have given consent for an MSP to browse their files.
1476
+ # To service this request, the remote device must connect to the Storage Vault and load index data. There may be a small delay. If the remote device is running Comet 20.12.0 or later, the necessary index data is cached when this API is first called, for 15 minutes after the last repeated call. This can improve performance for interactively browsing an entire tree of stored objects.
1252
1477
  #
1253
1478
  # You must supply administrator authentication credentials to use this API.
1254
1479
  # This API requires the Auth Role to be enabled.
@@ -1260,22 +1485,22 @@ module Comet
1260
1485
  # @return [Comet::DispatcherStoredObjectsResponse]
1261
1486
  def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil)
1262
1487
  submit_params = {}
1263
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1488
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1264
1489
 
1265
1490
  submit_params['TargetID'] = target_id
1266
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1491
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1267
1492
 
1268
1493
  submit_params['Destination'] = destination
1269
- raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1494
+ raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1270
1495
 
1271
1496
  submit_params['SnapshotID'] = snapshot_id
1272
1497
  unless tree_id.nil?
1273
- raise TypeError "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
1498
+ raise TypeError, "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
1274
1499
 
1275
1500
  submit_params['TreeID'] = tree_id
1276
1501
  end
1277
1502
 
1278
- body = perform_request('/api/v1/admin/dispatcher/request-stored-objects', submit_params)
1503
+ body = perform_request('api/v1/admin/dispatcher/request-stored-objects', submit_params)
1279
1504
  json_body = JSON.parse body
1280
1505
  check_status json_body
1281
1506
  ret = Comet::DispatcherStoredObjectsResponse.new
@@ -1295,14 +1520,14 @@ module Comet
1295
1520
  # @return [Comet::DispatcherVaultSnapshotsResponse]
1296
1521
  def admin_dispatcher_request_vault_snapshots(target_id, destination)
1297
1522
  submit_params = {}
1298
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1523
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1299
1524
 
1300
1525
  submit_params['TargetID'] = target_id
1301
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1526
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1302
1527
 
1303
1528
  submit_params['Destination'] = destination
1304
1529
 
1305
- body = perform_request('/api/v1/admin/dispatcher/request-vault-snapshots', submit_params)
1530
+ body = perform_request('api/v1/admin/dispatcher/request-vault-snapshots', submit_params)
1306
1531
  json_body = JSON.parse body
1307
1532
  check_status json_body
1308
1533
  ret = Comet::DispatcherVaultSnapshotsResponse.new
@@ -1322,14 +1547,14 @@ module Comet
1322
1547
  # @return [Comet::CometAPIResponseMessage]
1323
1548
  def admin_dispatcher_run_backup(target_id, backup_rule)
1324
1549
  submit_params = {}
1325
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1550
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1326
1551
 
1327
1552
  submit_params['TargetID'] = target_id
1328
- raise TypeError "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
1553
+ raise TypeError, "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
1329
1554
 
1330
1555
  submit_params['BackupRule'] = backup_rule
1331
1556
 
1332
- body = perform_request('/api/v1/admin/dispatcher/run-backup', submit_params)
1557
+ body = perform_request('api/v1/admin/dispatcher/run-backup', submit_params)
1333
1558
  json_body = JSON.parse body
1334
1559
  check_status json_body
1335
1560
  ret = Comet::CometAPIResponseMessage.new
@@ -1351,22 +1576,22 @@ module Comet
1351
1576
  # @return [Comet::CometAPIResponseMessage]
1352
1577
  def admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil)
1353
1578
  submit_params = {}
1354
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1579
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1355
1580
 
1356
1581
  submit_params['TargetID'] = target_id
1357
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1582
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1358
1583
 
1359
1584
  submit_params['Source'] = source
1360
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1585
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1361
1586
 
1362
1587
  submit_params['Destination'] = destination
1363
1588
  unless options.nil?
1364
- raise TypeError "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
1589
+ raise TypeError, "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
1365
1590
 
1366
1591
  submit_params['Options'] = options.to_json
1367
1592
  end
1368
1593
 
1369
- body = perform_request('/api/v1/admin/dispatcher/run-backup-custom', submit_params)
1594
+ body = perform_request('api/v1/admin/dispatcher/run-backup-custom', submit_params)
1370
1595
  json_body = JSON.parse body
1371
1596
  check_status json_body
1372
1597
  ret = Comet::CometAPIResponseMessage.new
@@ -1391,30 +1616,30 @@ module Comet
1391
1616
  # @return [Comet::CometAPIResponseMessage]
1392
1617
  def admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil)
1393
1618
  submit_params = {}
1394
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1619
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1395
1620
 
1396
1621
  submit_params['TargetID'] = target_id
1397
- raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1622
+ raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
1398
1623
 
1399
1624
  submit_params['Path'] = path
1400
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1625
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1401
1626
 
1402
1627
  submit_params['Source'] = source
1403
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1628
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1404
1629
 
1405
1630
  submit_params['Destination'] = destination
1406
1631
  unless snapshot.nil?
1407
- raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1632
+ raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1408
1633
 
1409
1634
  submit_params['Snapshot'] = snapshot
1410
1635
  end
1411
1636
  unless paths.nil?
1412
- raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1637
+ raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1413
1638
 
1414
1639
  submit_params['Paths'] = paths.to_json
1415
1640
  end
1416
1641
 
1417
- body = perform_request('/api/v1/admin/dispatcher/run-restore', submit_params)
1642
+ body = perform_request('api/v1/admin/dispatcher/run-restore', submit_params)
1418
1643
  json_body = JSON.parse body
1419
1644
  check_status json_body
1420
1645
  ret = Comet::CometAPIResponseMessage.new
@@ -1439,30 +1664,30 @@ module Comet
1439
1664
  # @return [Comet::CometAPIResponseMessage]
1440
1665
  def admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil)
1441
1666
  submit_params = {}
1442
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1667
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1443
1668
 
1444
1669
  submit_params['TargetID'] = target_id
1445
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1670
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1446
1671
 
1447
1672
  submit_params['Source'] = source
1448
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1673
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1449
1674
 
1450
1675
  submit_params['Destination'] = destination
1451
- raise TypeError "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
1676
+ raise TypeError, "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
1452
1677
 
1453
1678
  submit_params['Options'] = options.to_json
1454
1679
  unless snapshot.nil?
1455
- raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1680
+ raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1456
1681
 
1457
1682
  submit_params['Snapshot'] = snapshot
1458
1683
  end
1459
1684
  unless paths.nil?
1460
- raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1685
+ raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1461
1686
 
1462
1687
  submit_params['Paths'] = paths.to_json
1463
1688
  end
1464
1689
 
1465
- body = perform_request('/api/v1/admin/dispatcher/run-restore-custom', submit_params)
1690
+ body = perform_request('api/v1/admin/dispatcher/run-restore-custom', submit_params)
1466
1691
  json_body = JSON.parse body
1467
1692
  check_status json_body
1468
1693
  ret = Comet::CometAPIResponseMessage.new
@@ -1482,12 +1707,12 @@ module Comet
1482
1707
  # @return [Comet::CometAPIResponseMessage]
1483
1708
  def admin_dispatcher_uninstall_software(target_id, remove_config_file)
1484
1709
  submit_params = {}
1485
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1710
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1486
1711
 
1487
1712
  submit_params['TargetID'] = target_id
1488
1713
  submit_params['RemoveConfigFile'] = (remove_config_file ? 1 : 0)
1489
1714
 
1490
- body = perform_request('/api/v1/admin/dispatcher/uninstall-software', submit_params)
1715
+ body = perform_request('api/v1/admin/dispatcher/uninstall-software', submit_params)
1491
1716
  json_body = JSON.parse body
1492
1717
  check_status json_body
1493
1718
  ret = Comet::CometAPIResponseMessage.new
@@ -1509,14 +1734,14 @@ module Comet
1509
1734
  # @return [Comet::CometAPIResponseMessage]
1510
1735
  def admin_dispatcher_unlock(target_id, destination)
1511
1736
  submit_params = {}
1512
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1737
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1513
1738
 
1514
1739
  submit_params['TargetID'] = target_id
1515
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1740
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1516
1741
 
1517
1742
  submit_params['Destination'] = destination
1518
1743
 
1519
- body = perform_request('/api/v1/admin/dispatcher/unlock', submit_params)
1744
+ body = perform_request('api/v1/admin/dispatcher/unlock', submit_params)
1520
1745
  json_body = JSON.parse body
1521
1746
  check_status json_body
1522
1747
  ret = Comet::CometAPIResponseMessage.new
@@ -1537,14 +1762,14 @@ module Comet
1537
1762
  # @return [Comet::CometAPIResponseMessage]
1538
1763
  def admin_dispatcher_update_login_url(target_id, new_url)
1539
1764
  submit_params = {}
1540
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1765
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1541
1766
 
1542
1767
  submit_params['TargetID'] = target_id
1543
- raise TypeError "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
1768
+ raise TypeError, "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
1544
1769
 
1545
1770
  submit_params['NewURL'] = new_url
1546
1771
 
1547
- body = perform_request('/api/v1/admin/dispatcher/update-login-url', submit_params)
1772
+ body = perform_request('api/v1/admin/dispatcher/update-login-url', submit_params)
1548
1773
  json_body = JSON.parse body
1549
1774
  check_status json_body
1550
1775
  ret = Comet::CometAPIResponseMessage.new
@@ -1565,18 +1790,18 @@ module Comet
1565
1790
  # @return [Comet::CometAPIResponseMessage]
1566
1791
  def admin_dispatcher_update_software(target_id, self_address = nil)
1567
1792
  submit_params = {}
1568
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1793
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1569
1794
 
1570
1795
  submit_params['TargetID'] = target_id
1571
1796
  if self_address.nil?
1572
1797
  submit_params['SelfAddress'] = @server_address
1573
1798
  else
1574
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
1799
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
1575
1800
 
1576
1801
  submit_params['SelfAddress'] = self_address
1577
1802
  end
1578
1803
 
1579
- body = perform_request('/api/v1/admin/dispatcher/update-software', submit_params)
1804
+ body = perform_request('api/v1/admin/dispatcher/update-software', submit_params)
1580
1805
  json_body = JSON.parse body
1581
1806
  check_status json_body
1582
1807
  ret = Comet::CometAPIResponseMessage.new
@@ -1595,11 +1820,11 @@ module Comet
1595
1820
  # @return [String]
1596
1821
  def admin_get_job_log(job_id)
1597
1822
  submit_params = {}
1598
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1823
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1599
1824
 
1600
1825
  submit_params['JobID'] = job_id
1601
1826
 
1602
- perform_request('/api/v1/admin/get-job-log', submit_params)
1827
+ perform_request('api/v1/admin/get-job-log', submit_params)
1603
1828
  end
1604
1829
 
1605
1830
  # AdminGetJobLogEntries
@@ -1613,11 +1838,11 @@ module Comet
1613
1838
  # @return [Array<Comet::JobEntry>]
1614
1839
  def admin_get_job_log_entries(job_id)
1615
1840
  submit_params = {}
1616
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1841
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1617
1842
 
1618
1843
  submit_params['JobID'] = job_id
1619
1844
 
1620
- body = perform_request('/api/v1/admin/get-job-log-entries', submit_params)
1845
+ body = perform_request('api/v1/admin/get-job-log-entries', submit_params)
1621
1846
  json_body = JSON.parse body
1622
1847
  check_status json_body
1623
1848
  if json_body.nil?
@@ -1643,11 +1868,11 @@ module Comet
1643
1868
  # @return [Comet::BackupJobDetail]
1644
1869
  def admin_get_job_properties(job_id)
1645
1870
  submit_params = {}
1646
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1871
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1647
1872
 
1648
1873
  submit_params['JobID'] = job_id
1649
1874
 
1650
- body = perform_request('/api/v1/admin/get-job-properties', submit_params)
1875
+ body = perform_request('api/v1/admin/get-job-properties', submit_params)
1651
1876
  json_body = JSON.parse body
1652
1877
  check_status json_body
1653
1878
  ret = Comet::BackupJobDetail.new
@@ -1665,7 +1890,7 @@ module Comet
1665
1890
  #
1666
1891
  # @return [Array<Comet::BackupJobDetail>]
1667
1892
  def admin_get_jobs_all
1668
- body = perform_request('/api/v1/admin/get-jobs-all')
1893
+ body = perform_request('api/v1/admin/get-jobs-all')
1669
1894
  json_body = JSON.parse body
1670
1895
  check_status json_body
1671
1896
  if json_body.nil?
@@ -1692,11 +1917,11 @@ module Comet
1692
1917
  # @return [Array<Comet::BackupJobDetail>]
1693
1918
  def admin_get_jobs_for_custom_search(query)
1694
1919
  submit_params = {}
1695
- raise TypeError "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
1920
+ raise TypeError, "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
1696
1921
 
1697
1922
  submit_params['Query'] = query.to_json
1698
1923
 
1699
- body = perform_request('/api/v1/admin/get-jobs-for-custom-search', submit_params)
1924
+ body = perform_request('api/v1/admin/get-jobs-for-custom-search', submit_params)
1700
1925
  json_body = JSON.parse body
1701
1926
  check_status json_body
1702
1927
  if json_body.nil?
@@ -1730,14 +1955,14 @@ module Comet
1730
1955
  # @return [Array<Comet::BackupJobDetail>]
1731
1956
  def admin_get_jobs_for_date_range(start_value, end_value)
1732
1957
  submit_params = {}
1733
- raise TypeError "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
1958
+ raise TypeError, "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
1734
1959
 
1735
1960
  submit_params['Start'] = start_value
1736
- raise TypeError "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
1961
+ raise TypeError, "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
1737
1962
 
1738
1963
  submit_params['End'] = end_value
1739
1964
 
1740
- body = perform_request('/api/v1/admin/get-jobs-for-date-range', submit_params)
1965
+ body = perform_request('api/v1/admin/get-jobs-for-date-range', submit_params)
1741
1966
  json_body = JSON.parse body
1742
1967
  check_status json_body
1743
1968
  if json_body.nil?
@@ -1764,11 +1989,11 @@ module Comet
1764
1989
  # @return [Array<Comet::BackupJobDetail>]
1765
1990
  def admin_get_jobs_for_user(target_user)
1766
1991
  submit_params = {}
1767
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1992
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1768
1993
 
1769
1994
  submit_params['TargetUser'] = target_user
1770
1995
 
1771
- body = perform_request('/api/v1/admin/get-jobs-for-user', submit_params)
1996
+ body = perform_request('api/v1/admin/get-jobs-for-user', submit_params)
1772
1997
  json_body = JSON.parse body
1773
1998
  check_status json_body
1774
1999
  if json_body.nil?
@@ -1793,7 +2018,7 @@ module Comet
1793
2018
  #
1794
2019
  # @return [Array<Comet::BackupJobDetail>]
1795
2020
  def admin_get_jobs_recent
1796
- body = perform_request('/api/v1/admin/get-jobs-recent')
2021
+ body = perform_request('api/v1/admin/get-jobs-recent')
1797
2022
  json_body = JSON.parse body
1798
2023
  check_status json_body
1799
2024
  if json_body.nil?
@@ -1819,11 +2044,11 @@ module Comet
1819
2044
  # @return [Comet::UserProfileConfig]
1820
2045
  def admin_get_user_profile(target_user)
1821
2046
  submit_params = {}
1822
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2047
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1823
2048
 
1824
2049
  submit_params['TargetUser'] = target_user
1825
2050
 
1826
- body = perform_request('/api/v1/admin/get-user-profile', submit_params)
2051
+ body = perform_request('api/v1/admin/get-user-profile', submit_params)
1827
2052
  json_body = JSON.parse body
1828
2053
  check_status json_body
1829
2054
  ret = Comet::UserProfileConfig.new
@@ -1844,11 +2069,11 @@ module Comet
1844
2069
  # @return [Comet::GetProfileAndHashResponseMessage]
1845
2070
  def admin_get_user_profile_and_hash(target_user)
1846
2071
  submit_params = {}
1847
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2072
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1848
2073
 
1849
2074
  submit_params['TargetUser'] = target_user
1850
2075
 
1851
- body = perform_request('/api/v1/admin/get-user-profile-and-hash', submit_params)
2076
+ body = perform_request('api/v1/admin/get-user-profile-and-hash', submit_params)
1852
2077
  json_body = JSON.parse body
1853
2078
  check_status json_body
1854
2079
  ret = Comet::GetProfileAndHashResponseMessage.new
@@ -1869,11 +2094,11 @@ module Comet
1869
2094
  # @return [Comet::GetProfileHashResponseMessage]
1870
2095
  def admin_get_user_profile_hash(target_user)
1871
2096
  submit_params = {}
1872
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2097
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1873
2098
 
1874
2099
  submit_params['TargetUser'] = target_user
1875
2100
 
1876
- body = perform_request('/api/v1/admin/get-user-profile-hash', submit_params)
2101
+ body = perform_request('api/v1/admin/get-user-profile-hash', submit_params)
1877
2102
  json_body = JSON.parse body
1878
2103
  check_status json_body
1879
2104
  ret = Comet::GetProfileHashResponseMessage.new
@@ -1895,14 +2120,14 @@ module Comet
1895
2120
  # @return [Comet::CometAPIResponseMessage]
1896
2121
  def admin_job_cancel(target_user, job_id)
1897
2122
  submit_params = {}
1898
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2123
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1899
2124
 
1900
2125
  submit_params['TargetUser'] = target_user
1901
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
2126
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1902
2127
 
1903
2128
  submit_params['JobID'] = job_id
1904
2129
 
1905
- body = perform_request('/api/v1/admin/job/cancel', submit_params)
2130
+ body = perform_request('api/v1/admin/job/cancel', submit_params)
1906
2131
  json_body = JSON.parse body
1907
2132
  check_status json_body
1908
2133
  ret = Comet::CometAPIResponseMessage.new
@@ -1919,7 +2144,7 @@ module Comet
1919
2144
  #
1920
2145
  # @return [Array<String>]
1921
2146
  def admin_list_users
1922
- body = perform_request('/api/v1/admin/list-users')
2147
+ body = perform_request('api/v1/admin/list-users')
1923
2148
  json_body = JSON.parse body
1924
2149
  check_status json_body
1925
2150
  if json_body.nil?
@@ -1927,7 +2152,7 @@ module Comet
1927
2152
  else
1928
2153
  ret = Array.new(json_body.length)
1929
2154
  json_body.each_with_index do |v, i|
1930
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2155
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
1931
2156
 
1932
2157
  ret[i] = v
1933
2158
  end
@@ -1944,7 +2169,7 @@ module Comet
1944
2169
  #
1945
2170
  # @return [Hash{String => Comet::UserProfileConfig}]
1946
2171
  def admin_list_users_full
1947
- body = perform_request('/api/v1/admin/list-users-full')
2172
+ body = perform_request('api/v1/admin/list-users-full')
1948
2173
  json_body = JSON.parse body
1949
2174
  check_status json_body
1950
2175
  ret = {}
@@ -1968,7 +2193,7 @@ module Comet
1968
2193
  #
1969
2194
  # @return [Comet::ServerConfigOptionsBrandingFragment]
1970
2195
  def admin_meta_branding_config_get
1971
- body = perform_request('/api/v1/admin/meta/branding-config/get')
2196
+ body = perform_request('api/v1/admin/meta/branding-config/get')
1972
2197
  json_body = JSON.parse body
1973
2198
  check_status json_body
1974
2199
  ret = Comet::ServerConfigOptionsBrandingFragment.new
@@ -1988,11 +2213,11 @@ module Comet
1988
2213
  # @return [Comet::CometAPIResponseMessage]
1989
2214
  def admin_meta_branding_config_set(branding_config)
1990
2215
  submit_params = {}
1991
- raise TypeError "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
2216
+ raise TypeError, "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
1992
2217
 
1993
2218
  submit_params['BrandingConfig'] = branding_config.to_json
1994
2219
 
1995
- body = perform_request('/api/v1/admin/meta/branding-config/set', submit_params)
2220
+ body = perform_request('api/v1/admin/meta/branding-config/set', submit_params)
1996
2221
  json_body = JSON.parse body
1997
2222
  check_status json_body
1998
2223
  ret = Comet::CometAPIResponseMessage.new
@@ -2009,7 +2234,7 @@ module Comet
2009
2234
  #
2010
2235
  # @return [Comet::ServerConfigOptionsSoftwareBuildRoleFragment]
2011
2236
  def admin_meta_build_config_get
2012
- body = perform_request('/api/v1/admin/meta/build-config/get')
2237
+ body = perform_request('api/v1/admin/meta/build-config/get')
2013
2238
  json_body = JSON.parse body
2014
2239
  check_status json_body
2015
2240
  ret = Comet::ServerConfigOptionsSoftwareBuildRoleFragment.new
@@ -2028,11 +2253,11 @@ module Comet
2028
2253
  # @return [Comet::CometAPIResponseMessage]
2029
2254
  def admin_meta_build_config_set(software_build_role_config)
2030
2255
  submit_params = {}
2031
- raise TypeError "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
2256
+ raise TypeError, "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
2032
2257
 
2033
2258
  submit_params['SoftwareBuildRoleConfig'] = software_build_role_config.to_json
2034
2259
 
2035
- body = perform_request('/api/v1/admin/meta/build-config/set', submit_params)
2260
+ body = perform_request('api/v1/admin/meta/build-config/set', submit_params)
2036
2261
  json_body = JSON.parse body
2037
2262
  check_status json_body
2038
2263
  ret = Comet::CometAPIResponseMessage.new
@@ -2049,7 +2274,7 @@ module Comet
2049
2274
  #
2050
2275
  # @return [Array<Number>]
2051
2276
  def admin_meta_list_available_log_days
2052
- body = perform_request('/api/v1/admin/meta/list-available-log-days')
2277
+ body = perform_request('api/v1/admin/meta/list-available-log-days')
2053
2278
  json_body = JSON.parse body
2054
2279
  check_status json_body
2055
2280
  if json_body.nil?
@@ -2057,7 +2282,7 @@ module Comet
2057
2282
  else
2058
2283
  ret = Array.new(json_body.length)
2059
2284
  json_body.each_with_index do |v, i|
2060
- raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
2285
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
2061
2286
 
2062
2287
  ret[i] = v
2063
2288
  end
@@ -2078,11 +2303,11 @@ module Comet
2078
2303
  # @return [String]
2079
2304
  def admin_meta_read_logs(log)
2080
2305
  submit_params = {}
2081
- raise TypeError "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
2306
+ raise TypeError, "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
2082
2307
 
2083
2308
  submit_params['Log'] = log
2084
2309
 
2085
- perform_request('/api/v1/admin/meta/read-logs', submit_params)
2310
+ perform_request('api/v1/admin/meta/read-logs', submit_params)
2086
2311
  end
2087
2312
 
2088
2313
  # AdminMetaRemoteStorageVaultGet
@@ -2094,7 +2319,7 @@ module Comet
2094
2319
  #
2095
2320
  # @return [Array<Comet::RemoteStorageOption>]
2096
2321
  def admin_meta_remote_storage_vault_get
2097
- body = perform_request('/api/v1/admin/meta/remote-storage-vault/get')
2322
+ body = perform_request('api/v1/admin/meta/remote-storage-vault/get')
2098
2323
  json_body = JSON.parse body
2099
2324
  check_status json_body
2100
2325
  if json_body.nil?
@@ -2120,11 +2345,11 @@ module Comet
2120
2345
  # @return [Comet::CometAPIResponseMessage]
2121
2346
  def admin_meta_remote_storage_vault_set(remote_storage_options)
2122
2347
  submit_params = {}
2123
- raise TypeError "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
2348
+ raise TypeError, "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
2124
2349
 
2125
2350
  submit_params['RemoteStorageOptions'] = remote_storage_options.to_json
2126
2351
 
2127
- body = perform_request('/api/v1/admin/meta/remote-storage-vault/set', submit_params)
2352
+ body = perform_request('api/v1/admin/meta/remote-storage-vault/set', submit_params)
2128
2353
  json_body = JSON.parse body
2129
2354
  check_status json_body
2130
2355
  ret = Comet::CometAPIResponseMessage.new
@@ -2143,11 +2368,36 @@ module Comet
2143
2368
  # @return [String]
2144
2369
  def admin_meta_resource_get(hash)
2145
2370
  submit_params = {}
2146
- raise TypeError "'hash' expected String, got #{hash.class}" unless hash.is_a? String
2371
+ raise TypeError, "'hash' expected String, got #{hash.class}" unless hash.is_a? String
2147
2372
 
2148
2373
  submit_params['Hash'] = hash
2149
2374
 
2150
- perform_request('/api/v1/admin/meta/resource/get', submit_params)
2375
+ perform_request('api/v1/admin/meta/resource/get', submit_params)
2376
+ end
2377
+
2378
+ # AdminMetaResourceNew
2379
+ #
2380
+ # Upload a resource file.
2381
+ # Resources are used to upload files within the server configuration.
2382
+ # The resulting resource ID is autogenerated.
2383
+ # The lifespan of an uploaded resource is undefined. Resources may be deleted automatically, but it should remain available until the next call to AdminMetaServerConfigSet, and will remain available for as long as it is referenced by the server configuration.
2384
+ #
2385
+ # You must supply administrator authentication credentials to use this API.
2386
+ #
2387
+ # @param [String] upload The uploaded file contents, as a multipart/form-data part.
2388
+ # @return [Comet::AdminResourceResponse]
2389
+ def admin_meta_resource_new(upload)
2390
+ submit_params = {}
2391
+ raise TypeError, "'upload' expected String, got #{upload.class}" unless upload.is_a? String
2392
+
2393
+ submit_params['upload'] = upload
2394
+
2395
+ body = perform_request_multipart('api/v1/admin/meta/resource/new', submit_params)
2396
+ json_body = JSON.parse body
2397
+ check_status json_body
2398
+ ret = Comet::AdminResourceResponse.new
2399
+ ret.from_hash(json_body)
2400
+ ret
2151
2401
  end
2152
2402
 
2153
2403
  # AdminMetaRestartService
@@ -2163,7 +2413,7 @@ module Comet
2163
2413
  #
2164
2414
  # @return [Comet::CometAPIResponseMessage]
2165
2415
  def admin_meta_restart_service
2166
- body = perform_request('/api/v1/admin/meta/restart-service')
2416
+ body = perform_request('api/v1/admin/meta/restart-service')
2167
2417
  json_body = JSON.parse body
2168
2418
  check_status json_body
2169
2419
  ret = Comet::CometAPIResponseMessage.new
@@ -2185,14 +2435,14 @@ module Comet
2185
2435
  # @return [Comet::CometAPIResponseMessage]
2186
2436
  def admin_meta_send_test_email(email_options, recipient)
2187
2437
  submit_params = {}
2188
- raise TypeError "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
2438
+ raise TypeError, "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
2189
2439
 
2190
2440
  submit_params['EmailOptions'] = email_options.to_json
2191
- raise TypeError "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
2441
+ raise TypeError, "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
2192
2442
 
2193
2443
  submit_params['Recipient'] = recipient
2194
2444
 
2195
- body = perform_request('/api/v1/admin/meta/send-test-email', submit_params)
2445
+ body = perform_request('api/v1/admin/meta/send-test-email', submit_params)
2196
2446
  json_body = JSON.parse body
2197
2447
  check_status json_body
2198
2448
  ret = Comet::CometAPIResponseMessage.new
@@ -2210,7 +2460,7 @@ module Comet
2210
2460
  #
2211
2461
  # @return [Comet::ServerConfigOptions]
2212
2462
  def admin_meta_server_config_get
2213
- body = perform_request('/api/v1/admin/meta/server-config/get')
2463
+ body = perform_request('api/v1/admin/meta/server-config/get')
2214
2464
  json_body = JSON.parse body
2215
2465
  check_status json_body
2216
2466
  ret = Comet::ServerConfigOptions.new
@@ -2229,7 +2479,7 @@ module Comet
2229
2479
  #
2230
2480
  # @return [Array<String>]
2231
2481
  def admin_meta_server_config_network_interfaces
2232
- body = perform_request('/api/v1/admin/meta/server-config/network-interfaces')
2482
+ body = perform_request('api/v1/admin/meta/server-config/network-interfaces')
2233
2483
  json_body = JSON.parse body
2234
2484
  check_status json_body
2235
2485
  if json_body.nil?
@@ -2237,7 +2487,7 @@ module Comet
2237
2487
  else
2238
2488
  ret = Array.new(json_body.length)
2239
2489
  json_body.each_with_index do |v, i|
2240
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2490
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2241
2491
 
2242
2492
  ret[i] = v
2243
2493
  end
@@ -2260,11 +2510,11 @@ module Comet
2260
2510
  # @return [Comet::CometAPIResponseMessage]
2261
2511
  def admin_meta_server_config_set(config)
2262
2512
  submit_params = {}
2263
- raise TypeError "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
2513
+ raise TypeError, "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
2264
2514
 
2265
2515
  submit_params['Config'] = config.to_json
2266
2516
 
2267
- body = perform_request('/api/v1/admin/meta/server-config/set', submit_params)
2517
+ body = perform_request('api/v1/admin/meta/server-config/set', submit_params)
2268
2518
  json_body = JSON.parse body
2269
2519
  check_status json_body
2270
2520
  ret = Comet::CometAPIResponseMessage.new
@@ -2285,7 +2535,7 @@ module Comet
2285
2535
  #
2286
2536
  # @return [Comet::CometAPIResponseMessage]
2287
2537
  def admin_meta_shutdown_service
2288
- body = perform_request('/api/v1/admin/meta/shutdown-service')
2538
+ body = perform_request('api/v1/admin/meta/shutdown-service')
2289
2539
  json_body = JSON.parse body
2290
2540
  check_status json_body
2291
2541
  ret = Comet::CometAPIResponseMessage.new
@@ -2301,7 +2551,7 @@ module Comet
2301
2551
  #
2302
2552
  # @return [Comet::SoftwareUpdateNewsResponse]
2303
2553
  def admin_meta_software_update_news
2304
- body = perform_request('/api/v1/admin/meta/software-update-news')
2554
+ body = perform_request('api/v1/admin/meta/software-update-news')
2305
2555
  json_body = JSON.parse body
2306
2556
  check_status json_body
2307
2557
  ret = Comet::SoftwareUpdateNewsResponse.new
@@ -2322,7 +2572,7 @@ module Comet
2322
2572
  submit_params = {}
2323
2573
  submit_params['Simple'] = (simple ? 1 : 0)
2324
2574
 
2325
- body = perform_request('/api/v1/admin/meta/stats', submit_params)
2575
+ body = perform_request('api/v1/admin/meta/stats', submit_params)
2326
2576
  json_body = JSON.parse body
2327
2577
  check_status json_body
2328
2578
  ret = {}
@@ -2346,7 +2596,7 @@ module Comet
2346
2596
  #
2347
2597
  # @return [Comet::ServerMetaVersionInfo]
2348
2598
  def admin_meta_version
2349
- body = perform_request('/api/v1/admin/meta/version')
2599
+ body = perform_request('api/v1/admin/meta/version')
2350
2600
  json_body = JSON.parse body
2351
2601
  check_status json_body
2352
2602
  ret = Comet::ServerMetaVersionInfo.new
@@ -2362,7 +2612,7 @@ module Comet
2362
2612
  #
2363
2613
  # @return [Hash{String => Comet::WebhookOption}]
2364
2614
  def admin_meta_webhook_options_get
2365
- body = perform_request('/api/v1/admin/meta/webhook-options/get')
2615
+ body = perform_request('api/v1/admin/meta/webhook-options/get')
2366
2616
  json_body = JSON.parse body
2367
2617
  check_status json_body
2368
2618
  ret = {}
@@ -2388,11 +2638,11 @@ module Comet
2388
2638
  # @return [Comet::CometAPIResponseMessage]
2389
2639
  def admin_meta_webhook_options_set(webhook_options)
2390
2640
  submit_params = {}
2391
- raise TypeError "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
2641
+ raise TypeError, "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
2392
2642
 
2393
2643
  submit_params['WebhookOptions'] = webhook_options.to_json
2394
2644
 
2395
- body = perform_request('/api/v1/admin/meta/webhook-options/set', submit_params)
2645
+ body = perform_request('api/v1/admin/meta/webhook-options/set', submit_params)
2396
2646
  json_body = JSON.parse body
2397
2647
  check_status json_body
2398
2648
  ret = Comet::CometAPIResponseMessage.new
@@ -2409,7 +2659,7 @@ module Comet
2409
2659
  #
2410
2660
  # @return [Hash{String => Comet::NewsEntry}]
2411
2661
  def admin_news_get_all
2412
- body = perform_request('/api/v1/admin/news/get-all')
2662
+ body = perform_request('api/v1/admin/news/get-all')
2413
2663
  json_body = JSON.parse body
2414
2664
  check_status json_body
2415
2665
  ret = {}
@@ -2435,11 +2685,11 @@ module Comet
2435
2685
  # @return [Comet::CometAPIResponseMessage]
2436
2686
  def admin_news_remove(news_item)
2437
2687
  submit_params = {}
2438
- raise TypeError "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
2688
+ raise TypeError, "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
2439
2689
 
2440
2690
  submit_params['NewsItem'] = news_item
2441
2691
 
2442
- body = perform_request('/api/v1/admin/news/remove', submit_params)
2692
+ body = perform_request('api/v1/admin/news/remove', submit_params)
2443
2693
  json_body = JSON.parse body
2444
2694
  check_status json_body
2445
2695
  ret = Comet::CometAPIResponseMessage.new
@@ -2458,11 +2708,11 @@ module Comet
2458
2708
  # @return [Comet::CometAPIResponseMessage]
2459
2709
  def admin_news_submit(news_content)
2460
2710
  submit_params = {}
2461
- raise TypeError "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
2711
+ raise TypeError, "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
2462
2712
 
2463
2713
  submit_params['NewsContent'] = news_content
2464
2714
 
2465
- body = perform_request('/api/v1/admin/news/submit', submit_params)
2715
+ body = perform_request('api/v1/admin/news/submit', submit_params)
2466
2716
  json_body = JSON.parse body
2467
2717
  check_status json_body
2468
2718
  ret = Comet::CometAPIResponseMessage.new
@@ -2483,17 +2733,17 @@ module Comet
2483
2733
  def admin_organization_delete(organization_id = nil, uninstall_config = nil)
2484
2734
  submit_params = {}
2485
2735
  unless organization_id.nil?
2486
- raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2736
+ raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2487
2737
 
2488
2738
  submit_params['OrganizationID'] = organization_id
2489
2739
  end
2490
2740
  unless uninstall_config.nil?
2491
- raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
2741
+ raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
2492
2742
 
2493
2743
  submit_params['UninstallConfig'] = uninstall_config.to_json
2494
2744
  end
2495
2745
 
2496
- body = perform_request('/api/v1/admin/organization/delete', submit_params)
2746
+ body = perform_request('api/v1/admin/organization/delete', submit_params)
2497
2747
  json_body = JSON.parse body
2498
2748
  check_status json_body
2499
2749
  ret = Comet::OrganizationResponse.new
@@ -2510,7 +2760,7 @@ module Comet
2510
2760
  #
2511
2761
  # @return [Hash{String => Comet::Organization}]
2512
2762
  def admin_organization_list
2513
- body = perform_request('/api/v1/admin/organization/list')
2763
+ body = perform_request('api/v1/admin/organization/list')
2514
2764
  json_body = JSON.parse body
2515
2765
  check_status json_body
2516
2766
  ret = {}
@@ -2538,17 +2788,17 @@ module Comet
2538
2788
  def admin_organization_set(organization_id = nil, organization = nil)
2539
2789
  submit_params = {}
2540
2790
  unless organization_id.nil?
2541
- raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2791
+ raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2542
2792
 
2543
2793
  submit_params['OrganizationID'] = organization_id
2544
2794
  end
2545
2795
  unless organization.nil?
2546
- raise TypeError "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
2796
+ raise TypeError, "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
2547
2797
 
2548
2798
  submit_params['Organization'] = organization.to_json
2549
2799
  end
2550
2800
 
2551
- body = perform_request('/api/v1/admin/organization/set', submit_params)
2801
+ body = perform_request('api/v1/admin/organization/set', submit_params)
2552
2802
  json_body = JSON.parse body
2553
2803
  check_status json_body
2554
2804
  ret = Comet::OrganizationResponse.new
@@ -2567,11 +2817,11 @@ module Comet
2567
2817
  # @return [Comet::CometAPIResponseMessage]
2568
2818
  def admin_policies_delete(policy_id)
2569
2819
  submit_params = {}
2570
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2820
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2571
2821
 
2572
2822
  submit_params['PolicyID'] = policy_id
2573
2823
 
2574
- body = perform_request('/api/v1/admin/policies/delete', submit_params)
2824
+ body = perform_request('api/v1/admin/policies/delete', submit_params)
2575
2825
  json_body = JSON.parse body
2576
2826
  check_status json_body
2577
2827
  ret = Comet::CometAPIResponseMessage.new
@@ -2591,11 +2841,11 @@ module Comet
2591
2841
  # @return [Comet::GetGroupPolicyResponse]
2592
2842
  def admin_policies_get(policy_id)
2593
2843
  submit_params = {}
2594
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2844
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2595
2845
 
2596
2846
  submit_params['PolicyID'] = policy_id
2597
2847
 
2598
- body = perform_request('/api/v1/admin/policies/get', submit_params)
2848
+ body = perform_request('api/v1/admin/policies/get', submit_params)
2599
2849
  json_body = JSON.parse body
2600
2850
  check_status json_body
2601
2851
  ret = Comet::GetGroupPolicyResponse.new
@@ -2612,7 +2862,7 @@ module Comet
2612
2862
  #
2613
2863
  # @return [Hash{String => String}]
2614
2864
  def admin_policies_list
2615
- body = perform_request('/api/v1/admin/policies/list')
2865
+ body = perform_request('api/v1/admin/policies/list')
2616
2866
  json_body = JSON.parse body
2617
2867
  check_status json_body
2618
2868
  ret = {}
@@ -2620,7 +2870,7 @@ module Comet
2620
2870
  ret = {}
2621
2871
  else
2622
2872
  json_body.each do |k, v|
2623
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2873
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2624
2874
 
2625
2875
  ret[k] = v
2626
2876
  end
@@ -2637,7 +2887,7 @@ module Comet
2637
2887
  #
2638
2888
  # @return [Hash{String => Comet::GroupPolicy}]
2639
2889
  def admin_policies_list_full
2640
- body = perform_request('/api/v1/admin/policies/list-full')
2890
+ body = perform_request('api/v1/admin/policies/list-full')
2641
2891
  json_body = JSON.parse body
2642
2892
  check_status json_body
2643
2893
  ret = {}
@@ -2663,11 +2913,11 @@ module Comet
2663
2913
  # @return [Comet::CreateGroupPolicyResponse]
2664
2914
  def admin_policies_new(policy)
2665
2915
  submit_params = {}
2666
- raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2916
+ raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2667
2917
 
2668
2918
  submit_params['Policy'] = policy.to_json
2669
2919
 
2670
- body = perform_request('/api/v1/admin/policies/new', submit_params)
2920
+ body = perform_request('api/v1/admin/policies/new', submit_params)
2671
2921
  json_body = JSON.parse body
2672
2922
  check_status json_body
2673
2923
  ret = Comet::CreateGroupPolicyResponse.new
@@ -2690,19 +2940,19 @@ module Comet
2690
2940
  # @return [Comet::CometAPIResponseMessage]
2691
2941
  def admin_policies_set(policy_id, policy, check_policy_hash = nil)
2692
2942
  submit_params = {}
2693
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2943
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2694
2944
 
2695
2945
  submit_params['PolicyID'] = policy_id
2696
- raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2946
+ raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2697
2947
 
2698
2948
  submit_params['Policy'] = policy.to_json
2699
2949
  unless check_policy_hash.nil?
2700
- raise TypeError "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
2950
+ raise TypeError, "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
2701
2951
 
2702
2952
  submit_params['CheckPolicyHash'] = check_policy_hash
2703
2953
  end
2704
2954
 
2705
- body = perform_request('/api/v1/admin/policies/set', submit_params)
2955
+ body = perform_request('api/v1/admin/policies/set', submit_params)
2706
2956
  json_body = JSON.parse body
2707
2957
  check_status json_body
2708
2958
  ret = Comet::CometAPIResponseMessage.new
@@ -2723,19 +2973,19 @@ module Comet
2723
2973
  # @return [Comet::EmailReportGeneratedPreview]
2724
2974
  def admin_preview_user_email_report(target_user, email_report_config, email_address = nil)
2725
2975
  submit_params = {}
2726
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2976
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2727
2977
 
2728
2978
  submit_params['TargetUser'] = target_user
2729
- raise TypeError "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
2979
+ raise TypeError, "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
2730
2980
 
2731
2981
  submit_params['EmailReportConfig'] = email_report_config.to_json
2732
2982
  unless email_address.nil?
2733
- raise TypeError "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
2983
+ raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
2734
2984
 
2735
2985
  submit_params['EmailAddress'] = email_address
2736
2986
  end
2737
2987
 
2738
- body = perform_request('/api/v1/admin/preview-user-email-report', submit_params)
2988
+ body = perform_request('api/v1/admin/preview-user-email-report', submit_params)
2739
2989
  json_body = JSON.parse body
2740
2990
  check_status json_body
2741
2991
  ret = Comet::EmailReportGeneratedPreview.new
@@ -2752,7 +3002,7 @@ module Comet
2752
3002
  #
2753
3003
  # @return [Array<Comet::ReplicatorStateAPIResponse>]
2754
3004
  def admin_replication_state
2755
- body = perform_request('/api/v1/admin/replication/state')
3005
+ body = perform_request('api/v1/admin/replication/state')
2756
3006
  json_body = JSON.parse body
2757
3007
  check_status json_body
2758
3008
  if json_body.nil?
@@ -2782,21 +3032,21 @@ module Comet
2782
3032
  # @return [Comet::RequestStorageVaultResponseMessage]
2783
3033
  def admin_request_storage_vault(target_user, storage_provider, self_address = nil)
2784
3034
  submit_params = {}
2785
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3035
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2786
3036
 
2787
3037
  submit_params['TargetUser'] = target_user
2788
- raise TypeError "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
3038
+ raise TypeError, "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
2789
3039
 
2790
3040
  submit_params['StorageProvider'] = storage_provider
2791
3041
  if self_address.nil?
2792
3042
  submit_params['SelfAddress'] = @server_address
2793
3043
  else
2794
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
3044
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
2795
3045
 
2796
3046
  submit_params['SelfAddress'] = self_address
2797
3047
  end
2798
3048
 
2799
- body = perform_request('/api/v1/admin/request-storage-vault', submit_params)
3049
+ body = perform_request('api/v1/admin/request-storage-vault', submit_params)
2800
3050
  json_body = JSON.parse body
2801
3051
  check_status json_body
2802
3052
  ret = Comet::RequestStorageVaultResponseMessage.new
@@ -2813,7 +3063,7 @@ module Comet
2813
3063
  #
2814
3064
  # @return [Hash{String => String}]
2815
3065
  def admin_request_storage_vault_providers
2816
- body = perform_request('/api/v1/admin/request-storage-vault-providers')
3066
+ body = perform_request('api/v1/admin/request-storage-vault-providers')
2817
3067
  json_body = JSON.parse body
2818
3068
  check_status json_body
2819
3069
  ret = {}
@@ -2821,7 +3071,7 @@ module Comet
2821
3071
  ret = {}
2822
3072
  else
2823
3073
  json_body.each do |k, v|
2824
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
3074
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2825
3075
 
2826
3076
  ret[k] = v
2827
3077
  end
@@ -2843,17 +3093,17 @@ module Comet
2843
3093
  # @return [Comet::CometAPIResponseMessage]
2844
3094
  def admin_reset_user_password(target_user, new_password, old_password)
2845
3095
  submit_params = {}
2846
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3096
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2847
3097
 
2848
3098
  submit_params['TargetUser'] = target_user
2849
- raise TypeError "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
3099
+ raise TypeError, "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
2850
3100
 
2851
3101
  submit_params['NewPassword'] = new_password
2852
- raise TypeError "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
3102
+ raise TypeError, "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
2853
3103
 
2854
3104
  submit_params['OldPassword'] = old_password
2855
3105
 
2856
- body = perform_request('/api/v1/admin/reset-user-password', submit_params)
3106
+ body = perform_request('api/v1/admin/reset-user-password', submit_params)
2857
3107
  json_body = JSON.parse body
2858
3108
  check_status json_body
2859
3109
  ret = Comet::CometAPIResponseMessage.new
@@ -2874,14 +3124,14 @@ module Comet
2874
3124
  # @return [Comet::CometAPIResponseMessage]
2875
3125
  def admin_revoke_device(target_user, target_device)
2876
3126
  submit_params = {}
2877
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3127
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2878
3128
 
2879
3129
  submit_params['TargetUser'] = target_user
2880
- raise TypeError "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
3130
+ raise TypeError, "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
2881
3131
 
2882
3132
  submit_params['TargetDevice'] = target_device
2883
3133
 
2884
- body = perform_request('/api/v1/admin/revoke-device', submit_params)
3134
+ body = perform_request('api/v1/admin/revoke-device', submit_params)
2885
3135
  json_body = JSON.parse body
2886
3136
  check_status json_body
2887
3137
  ret = Comet::CometAPIResponseMessage.new
@@ -2901,14 +3151,14 @@ module Comet
2901
3151
  # @return [Comet::CometAPIResponseMessage]
2902
3152
  def admin_set_user_profile(target_user, profile_data)
2903
3153
  submit_params = {}
2904
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3154
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2905
3155
 
2906
3156
  submit_params['TargetUser'] = target_user
2907
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
3157
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2908
3158
 
2909
3159
  submit_params['ProfileData'] = profile_data.to_json
2910
3160
 
2911
- body = perform_request('/api/v1/admin/set-user-profile', submit_params)
3161
+ body = perform_request('api/v1/admin/set-user-profile', submit_params)
2912
3162
  json_body = JSON.parse body
2913
3163
  check_status json_body
2914
3164
  ret = Comet::CometAPIResponseMessage.new
@@ -2931,17 +3181,17 @@ module Comet
2931
3181
  # @return [Comet::CometAPIResponseMessage]
2932
3182
  def admin_set_user_profile_hash(target_user, profile_data, require_hash)
2933
3183
  submit_params = {}
2934
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
3184
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2935
3185
 
2936
3186
  submit_params['TargetUser'] = target_user
2937
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
3187
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2938
3188
 
2939
3189
  submit_params['ProfileData'] = profile_data.to_json
2940
- raise TypeError "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
3190
+ raise TypeError, "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
2941
3191
 
2942
3192
  submit_params['RequireHash'] = require_hash
2943
3193
 
2944
- body = perform_request('/api/v1/admin/set-user-profile-hash', submit_params)
3194
+ body = perform_request('api/v1/admin/set-user-profile-hash', submit_params)
2945
3195
  json_body = JSON.parse body
2946
3196
  check_status json_body
2947
3197
  ret = Comet::CometAPIResponseMessage.new
@@ -2949,6 +3199,36 @@ module Comet
2949
3199
  ret
2950
3200
  end
2951
3201
 
3202
+ # AdminStorageBucketProperties
3203
+ #
3204
+ # Retrieve properties for a single bucket.
3205
+ # This API can also be used to refresh the size measurement for a single bucket by passing a valid AfterTimestamp parameter.
3206
+ #
3207
+ # You must supply administrator authentication credentials to use this API.
3208
+ # This API requires the Storage Role to be enabled.
3209
+ #
3210
+ # @param [String] bucket_id Bucket ID
3211
+ # @param [Number] after_timestamp (Optional) Allow a stale size measurement if it is at least as new as the supplied Unix timestamp. Timestamps in the future may produce a result clamped down to the Comet Server's current time. If not present, the size measurement may be arbitrarily stale.
3212
+ # @return [Comet::BucketProperties]
3213
+ def admin_storage_bucket_properties(bucket_id, after_timestamp = nil)
3214
+ submit_params = {}
3215
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3216
+
3217
+ submit_params['BucketID'] = bucket_id
3218
+ unless after_timestamp.nil?
3219
+ raise TypeError, "'after_timestamp' expected Numeric, got #{after_timestamp.class}" unless after_timestamp.is_a? Numeric
3220
+
3221
+ submit_params['AfterTimestamp'] = after_timestamp
3222
+ end
3223
+
3224
+ body = perform_request('api/v1/admin/storage/bucket-properties', submit_params)
3225
+ json_body = JSON.parse body
3226
+ check_status json_body
3227
+ ret = Comet::BucketProperties.new
3228
+ ret.from_hash(json_body)
3229
+ ret
3230
+ end
3231
+
2952
3232
  # AdminStorageDeleteBucket
2953
3233
  #
2954
3234
  # Delete a bucket.
@@ -2961,11 +3241,11 @@ module Comet
2961
3241
  # @return [Comet::CometAPIResponseMessage]
2962
3242
  def admin_storage_delete_bucket(bucket_id)
2963
3243
  submit_params = {}
2964
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3244
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2965
3245
 
2966
3246
  submit_params['BucketID'] = bucket_id
2967
3247
 
2968
- body = perform_request('/api/v1/admin/storage/delete-bucket', submit_params)
3248
+ body = perform_request('api/v1/admin/storage/delete-bucket', submit_params)
2969
3249
  json_body = JSON.parse body
2970
3250
  check_status json_body
2971
3251
  ret = Comet::CometAPIResponseMessage.new
@@ -2982,15 +3262,17 @@ module Comet
2982
3262
  # This API requires the Storage Role to be enabled.
2983
3263
  # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2984
3264
  #
2985
- # @param [String] bucket_id Selected bucket name
3265
+ # @param [String] bucket_id (Optional) (This parameter is not used)
2986
3266
  # @return [Comet::StorageFreeSpaceInfo]
2987
- def admin_storage_free_space(bucket_id)
3267
+ def admin_storage_free_space(bucket_id = nil)
2988
3268
  submit_params = {}
2989
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3269
+ unless bucket_id.nil?
3270
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2990
3271
 
2991
- submit_params['BucketID'] = bucket_id
3272
+ submit_params['BucketID'] = bucket_id
3273
+ end
2992
3274
 
2993
- body = perform_request('/api/v1/admin/storage/free-space', submit_params)
3275
+ body = perform_request('api/v1/admin/storage/free-space', submit_params)
2994
3276
  json_body = JSON.parse body
2995
3277
  check_status json_body
2996
3278
  ret = Comet::StorageFreeSpaceInfo.new
@@ -3007,7 +3289,7 @@ module Comet
3007
3289
  #
3008
3290
  # @return [Hash{String => Comet::BucketProperties}]
3009
3291
  def admin_storage_list_buckets
3010
- body = perform_request('/api/v1/admin/storage/list-buckets')
3292
+ body = perform_request('api/v1/admin/storage/list-buckets')
3011
3293
  json_body = JSON.parse body
3012
3294
  check_status json_body
3013
3295
  ret = {}
@@ -3039,27 +3321,27 @@ module Comet
3039
3321
  def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil, set_organization_id = nil)
3040
3322
  submit_params = {}
3041
3323
  unless set_bucket_value.nil?
3042
- raise TypeError "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
3324
+ raise TypeError, "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
3043
3325
 
3044
3326
  submit_params['SetBucketValue'] = set_bucket_value
3045
3327
  end
3046
3328
  unless set_key_hash_format.nil?
3047
- raise TypeError "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
3329
+ raise TypeError, "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
3048
3330
 
3049
3331
  submit_params['SetKeyHashFormat'] = set_key_hash_format
3050
3332
  end
3051
3333
  unless set_key_hash_value.nil?
3052
- raise TypeError "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
3334
+ raise TypeError, "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
3053
3335
 
3054
3336
  submit_params['SetKeyHashValue'] = set_key_hash_value
3055
3337
  end
3056
3338
  unless set_organization_id.nil?
3057
- raise TypeError "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String
3339
+ raise TypeError, "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String
3058
3340
 
3059
3341
  submit_params['SetOrganizationID'] = set_organization_id
3060
3342
  end
3061
3343
 
3062
- body = perform_request('/api/v1/admin/storage/register-bucket', submit_params)
3344
+ body = perform_request('api/v1/admin/storage/register-bucket', submit_params)
3063
3345
  json_body = JSON.parse body
3064
3346
  check_status json_body
3065
3347
  ret = Comet::AddBucketResponseMessage.new
@@ -3080,11 +3362,11 @@ module Comet
3080
3362
  # @return [Comet::CometAPIResponseMessage]
3081
3363
  def admin_update_campaign_start(options)
3082
3364
  submit_params = {}
3083
- raise TypeError "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
3365
+ raise TypeError, "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
3084
3366
 
3085
3367
  submit_params['Options'] = options.to_json
3086
3368
 
3087
- body = perform_request('/api/v1/admin/update-campaign/start', submit_params)
3369
+ body = perform_request('api/v1/admin/update-campaign/start', submit_params)
3088
3370
  json_body = JSON.parse body
3089
3371
  check_status json_body
3090
3372
  ret = Comet::CometAPIResponseMessage.new
@@ -3103,7 +3385,7 @@ module Comet
3103
3385
  #
3104
3386
  # @return [Comet::UpdateCampaignStatus]
3105
3387
  def admin_update_campaign_status
3106
- body = perform_request('/api/v1/admin/update-campaign/status')
3388
+ body = perform_request('api/v1/admin/update-campaign/status')
3107
3389
  json_body = JSON.parse body
3108
3390
  check_status json_body
3109
3391
  ret = Comet::UpdateCampaignStatus.new
@@ -3119,7 +3401,7 @@ module Comet
3119
3401
  #
3120
3402
  # @return [Comet::SessionKeyRegeneratedResponse]
3121
3403
  def hybrid_session_start
3122
- body = perform_request('/api/v1/hybrid/session/start')
3404
+ body = perform_request('api/v1/hybrid/session/start')
3123
3405
  json_body = JSON.parse body
3124
3406
  check_status json_body
3125
3407
  ret = Comet::SessionKeyRegeneratedResponse.new
@@ -3136,7 +3418,7 @@ module Comet
3136
3418
  #
3137
3419
  # @return [Comet::CometAPIResponseMessage]
3138
3420
  def user_web_session_revoke
3139
- body = perform_request('/api/v1/user/web/session/revoke')
3421
+ body = perform_request('api/v1/user/web/session/revoke')
3140
3422
  json_body = JSON.parse body
3141
3423
  check_status json_body
3142
3424
  ret = Comet::CometAPIResponseMessage.new
@@ -3153,7 +3435,7 @@ module Comet
3153
3435
  #
3154
3436
  # @return [Comet::SessionKeyRegeneratedResponse]
3155
3437
  def user_web_session_start
3156
- body = perform_request('/api/v1/user/web/session/start')
3438
+ body = perform_request('api/v1/user/web/session/start')
3157
3439
  json_body = JSON.parse body
3158
3440
  check_status json_body
3159
3441
  ret = Comet::SessionKeyRegeneratedResponse.new
@@ -3194,6 +3476,35 @@ module Comet
3194
3476
 
3195
3477
  res.body
3196
3478
  end
3479
+
3480
+ # Perform a synchronous HTTP request, using multipart/form-data.
3481
+ #
3482
+ # @param [String] endpoint The URL suffix
3483
+ # @param [Hash<String,String>] params Form post parameters to submit to the target API
3484
+ # @return [String] Response body
3485
+ def perform_request_multipart(endpoint, params = {})
3486
+ full_uri = URI(@server_address + endpoint)
3487
+
3488
+ req = Net::HTTP::Post.new(full_uri)
3489
+ req['X-Comet-Admin-Username'] = @username
3490
+ req['X-Comet-Admin-AuthType'] = 'Password'
3491
+ req['X-Comet-Admin-Password'] = @password
3492
+
3493
+ form_params = []
3494
+ params.each do |k, v|
3495
+ form_params.append [k, v, {:filename => k}]
3496
+ end
3497
+ req.set_form(form_params, 'multipart/form-data')
3498
+
3499
+ http = Net::HTTP.new(full_uri.hostname, full_uri.port)
3500
+ res = http.request(req)
3501
+
3502
+ unless res.is_a?(Net::HTTPSuccess)
3503
+ raise res
3504
+ end
3505
+
3506
+ res.body
3507
+ end
3197
3508
  end
3198
3509
 
3199
3510
  end