comet_backup_ruby_sdk 0.4.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/Gemfile.lock +1 -1
  4. data/LICENSE +1 -1
  5. data/RELEASING.md +1 -1
  6. data/comet_backup_ruby_sdk.gemspec +1 -1
  7. data/lib/comet/api_response_error.rb +1 -1
  8. data/lib/comet/comet_server.rb +613 -274
  9. data/lib/comet/definitions.rb +19 -7
  10. data/lib/comet/models/add_bucket_response_message.rb +7 -7
  11. data/lib/comet/models/admin_account_properties_response.rb +12 -3
  12. data/lib/comet/models/admin_email_options.rb +84 -0
  13. data/lib/comet/models/admin_resource_response.rb +6 -6
  14. data/lib/comet/models/admin_security_options.rb +8 -8
  15. data/lib/comet/models/admin_u2fregistration.rb +5 -5
  16. data/lib/comet/models/admin_user_permissions.rb +3 -3
  17. data/lib/comet/models/available_download.rb +5 -5
  18. data/lib/comet/models/azure_destination_location.rb +8 -8
  19. data/lib/comet/models/b2destination_location.rb +8 -8
  20. data/lib/comet/models/b2storage_extra_info.rb +3 -3
  21. data/lib/comet/models/b2transaction_totals.rb +6 -6
  22. data/lib/comet/models/b2virtual_storage_role_settings.rb +6 -6
  23. data/lib/comet/models/backup_job_advanced_options.rb +5 -5
  24. data/lib/comet/models/backup_job_detail.rb +21 -21
  25. data/lib/comet/models/backup_job_progress.rb +8 -8
  26. data/lib/comet/models/backup_rule_config.rb +28 -12
  27. data/lib/comet/models/backup_rule_event_triggers.rb +3 -3
  28. data/lib/comet/models/branding_options.rb +28 -28
  29. data/lib/comet/models/branding_properties.rb +24 -24
  30. data/lib/comet/models/browse_disk_drives_response.rb +5 -5
  31. data/lib/comet/models/browse_edbresponse.rb +5 -5
  32. data/lib/comet/models/browse_hvresponse.rb +5 -5
  33. data/lib/comet/models/browse_vssresponse.rb +5 -5
  34. data/lib/comet/models/bucket_properties.rb +15 -6
  35. data/lib/comet/models/bucket_usage_info.rb +4 -4
  36. data/lib/comet/models/comet_apiresponse_message.rb +5 -5
  37. data/lib/comet/models/comet_destination_location.rb +6 -6
  38. data/lib/comet/models/constellation_check_report.rb +5 -5
  39. data/lib/comet/models/constellation_stats.rb +7 -7
  40. data/lib/comet/models/constellation_status_apiresponse.rb +5 -5
  41. data/lib/comet/models/content_measurement.rb +5 -5
  42. data/lib/comet/models/content_measurement_component.rb +5 -5
  43. data/lib/comet/models/create_group_policy_response.rb +6 -6
  44. data/lib/comet/models/custom_remote_bucket_settings.rb +75 -0
  45. data/lib/comet/models/default_email_report_policy.rb +3 -3
  46. data/lib/comet/models/destination_config.rb +72 -44
  47. data/lib/comet/models/destination_location.rb +41 -35
  48. data/lib/comet/models/destination_statistics.rb +6 -6
  49. data/lib/comet/models/device_config.rb +4 -4
  50. data/lib/comet/models/disk_drive.rb +14 -14
  51. data/lib/comet/models/dispatcher_admin_sources_response.rb +6 -6
  52. data/lib/comet/models/dispatcher_stored_objects_response.rb +5 -5
  53. data/lib/comet/models/dispatcher_vault_snapshots_response.rb +5 -5
  54. data/lib/comet/models/edbfile_info.rb +6 -6
  55. data/lib/comet/models/email_options.rb +10 -10
  56. data/lib/comet/models/email_report_config.rb +4 -4
  57. data/lib/comet/models/email_report_generated_preview.rb +8 -8
  58. data/lib/comet/models/external_ldapauthentication_source_settings.rb +40 -7
  59. data/lib/comet/models/extra_file_exclusion.rb +5 -5
  60. data/lib/comet/models/ftpdestination_location.rb +10 -10
  61. data/lib/comet/models/get_group_policy_response.rb +6 -6
  62. data/lib/comet/models/get_profile_and_hash_response_message.rb +6 -6
  63. data/lib/comet/models/get_profile_hash_response_message.rb +6 -6
  64. data/lib/comet/models/group_policy.rb +13 -4
  65. data/lib/comet/models/hyper_vmachine_info.rb +5 -5
  66. data/lib/comet/models/install_creds.rb +99 -0
  67. data/lib/comet/models/install_token.rb +117 -0
  68. data/lib/comet/models/install_token_response.rb +92 -0
  69. data/lib/comet/models/job_entry.rb +6 -6
  70. data/lib/comet/models/live_user_connection.rb +9 -9
  71. data/lib/comet/models/local_destination_location.rb +7 -7
  72. data/lib/comet/models/mac_oscode_sign_properties.rb +9 -9
  73. data/lib/comet/models/mongo_dbconnection.rb +16 -16
  74. data/lib/comet/models/new_bucket_detail.rb +5 -5
  75. data/lib/comet/models/news_entry.rb +14 -5
  76. data/lib/comet/models/organization.rb +145 -0
  77. data/lib/comet/models/organization_response.rb +101 -0
  78. data/lib/comet/models/osinfo.rb +6 -6
  79. data/lib/comet/models/partition.rb +14 -14
  80. data/lib/comet/models/private_branding_properties.rb +18 -18
  81. data/lib/comet/models/protected_item_engine_type_policy.rb +4 -4
  82. data/lib/comet/models/public_branding_properties.rb +9 -9
  83. data/lib/comet/models/remote_server_address.rb +18 -8
  84. data/lib/comet/models/remote_storage_option.rb +25 -9
  85. data/lib/comet/models/replicator_state_apiresponse.rb +15 -15
  86. data/lib/comet/models/request_storage_vault_response_message.rb +6 -6
  87. data/lib/comet/models/restore_job_advanced_options.rb +13 -7
  88. data/lib/comet/models/retention_policy.rb +4 -4
  89. data/lib/comet/models/retention_range.rb +11 -11
  90. data/lib/comet/models/s3destination_location.rb +8 -8
  91. data/lib/comet/models/schedule_config.rb +6 -6
  92. data/lib/comet/models/search_clause.rb +7 -7
  93. data/lib/comet/models/server_config_options_branding_fragment.rb +3 -3
  94. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +3 -3
  95. data/lib/comet/models/server_meta_version_info.rb +18 -18
  96. data/lib/comet/models/session_key_regenerated_response.rb +7 -7
  97. data/lib/comet/models/sftpdestination_location.rb +10 -10
  98. data/lib/comet/models/size_measurement.rb +6 -6
  99. data/lib/comet/models/software_build_role_options.rb +3 -3
  100. data/lib/comet/models/software_update_news_response.rb +7 -7
  101. data/lib/comet/models/source_basic_info.rb +5 -5
  102. data/lib/comet/models/source_config.rb +27 -11
  103. data/lib/comet/models/source_statistics.rb +3 -3
  104. data/lib/comet/models/spanned_destination_location.rb +9 -3
  105. data/lib/comet/models/spanned_storage_extra_info.rb +3 -3
  106. data/lib/comet/models/sshconnection.rb +9 -9
  107. data/lib/comet/models/stat_result.rb +7 -7
  108. data/lib/comet/models/storage_free_space_info.rb +5 -5
  109. data/lib/comet/models/storage_vault_provider_policy.rb +4 -4
  110. data/lib/comet/models/stored_object.rb +11 -11
  111. data/lib/comet/models/streamable_event.rb +16 -5
  112. data/lib/comet/models/swift_destination_location.rb +16 -16
  113. data/lib/comet/models/test_response.rb +5 -5
  114. data/lib/comet/models/totp_regenerated_response.rb +8 -8
  115. data/lib/comet/models/u2fregister_request.rb +5 -5
  116. data/lib/comet/models/u2fregistered_key.rb +6 -6
  117. data/lib/comet/models/u2fregistration_challenge_response.rb +7 -7
  118. data/lib/comet/models/u2fsign_request.rb +6 -6
  119. data/lib/comet/models/u2fsign_response.rb +7 -7
  120. data/lib/comet/models/uninstall_config.rb +3 -3
  121. data/lib/comet/models/update_campaign_device_status.rb +4 -4
  122. data/lib/comet/models/update_campaign_options.rb +3 -3
  123. data/lib/comet/models/update_campaign_properties.rb +5 -5
  124. data/lib/comet/models/update_campaign_status.rb +5 -5
  125. data/lib/comet/models/update_campaign_status_device_entry.rb +6 -6
  126. data/lib/comet/models/user_custom_email_settings.rb +3 -3
  127. data/lib/comet/models/user_on_server.rb +5 -5
  128. data/lib/comet/models/user_policy.rb +7 -7
  129. data/lib/comet/models/user_profile_config.rb +29 -18
  130. data/lib/comet/models/user_profile_fragment.rb +4 -4
  131. data/lib/comet/models/vault_snapshot.rb +12 -6
  132. data/lib/comet/models/vsscomponent.rb +6 -6
  133. data/lib/comet/models/vsswriter_info.rb +4 -4
  134. data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +6 -6
  135. data/lib/comet/models/web_interface_branding_properties.rb +7 -7
  136. data/lib/comet/models/webhook_option.rb +5 -5
  137. data/lib/comet/models/win_smbauth.rb +7 -7
  138. data/lib/comet/models/windows_code_sign_properties.rb +12 -12
  139. data/lib/comet_backup_ruby_sdk.rb +8 -1
  140. metadata +9 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3faaa84e0d62d76bb3669935d01f4409c80a28a479c39cc5b60e8fe87b33494f
4
- data.tar.gz: 0a67b796036d8880111aa4f10aa832f3994d268257d90d58603bc881b338c8b0
3
+ metadata.gz: 1bcd5336d8e52eab1535016a7f4d9c0b0a703491b8f63fb01ccd44b4dfa5f517
4
+ data.tar.gz: 558c4b7ec014edd0fb7f114eb3a0b2b9dbcc890ca59d3090ff6c1731a885fec5
5
5
  SHA512:
6
- metadata.gz: 2ac65df6ad2859aec9c90dffe1704bf8f8ac940e2f519fd3155169c9b6955f8b1c801ffea812428ab149604303f16b6b5a03bf5a0cd1fb8b7854e32d12143146
7
- data.tar.gz: 108be0c78b2cf0be1d9ea54646993d34124aa7e7c21ffad2054d4eb35555a0d3f505f3a42aefda4596c5358d9cbc609c31c77d7a49fa7d6da4aae94d9d986830
6
+ metadata.gz: dd095297f0142a76f5d4f458e38e55435fc4b3d9c7e6b366a786e811275922e73bef8ac106eeb21e21f2aaca93e6bc177ba2d8ae158d93ddd1f5dc839f0d22f1
7
+ data.tar.gz: c752085a6a3cff6fafbe2e03dce5d0f23211f778fbb99030ba1ad67480b97abf0d1890e934a5145622f3c31561f68581c27edba55be7ea26e1772160077b4309
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2021-03-03 v1.4.0
4
+ - Based on Comet 21.2.1
5
+ - Support restoring files to original paths
6
+ - Support the new "Custom" requestable Storage Vault provider type and its `CustomRemoteBucketSettings` structure
7
+ - Support new `SpanUseStaticSlots` attribute
8
+ - Fix missing fields in `ExternalLDAPAuthenticationSourceSettings` structure
9
+ - Fix broken `AdminDispatcherRequestFilesystemObjects` that was parsing into the wrong response type
10
+
11
+ ## 2020-11-24 v1.3.0
12
+ - Based on Comet 20.11.0
13
+ - Support new `AdminDispatcherDeleteSnapshots` API for deleting multiple snapshots in a single step
14
+ - Support `AdminMetaResourceNew` API using multipart request
15
+ - Fix an issue with properly raising `TypeError` for invalid parameters
16
+
17
+ ## 2020-11-05 v1.2.0
18
+ - Based on Comet 20.9.10
19
+ - Support new `ThawExec` feature
20
+
21
+ ## 2020-10-08 v1.1.0
22
+ - Based on Comet 20.9.6
23
+ - Support new `AdminStorageBucketProperties` API
24
+ - Allow passing in nil or no value for `AdminStorageFreeSpace` parameter
25
+ - Fix an issue with automatic SelfAddress parameters not containing a trailing slash
26
+
27
+ ## 2020-09-16 v1.0.0
28
+ - 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/).
29
+ - Support new Organization feature
30
+ - Support new `AdminCreateInstallTokenRequest` API
31
+ - Support new Admin user management APIs
32
+ - Support new `RebrandStorage` property on Storage Vaults and on Requestable destination targets
33
+ - Update descriptions for `SEVT_META_HELLO` and `AdminMetaWebhookOptionsSet`
34
+
3
35
  ## 2020-08-28 v0.4.0
4
36
  - Feature: Add definitions B2 and Wasabi `VirtualStorageRole` classes
5
37
  - Feature: Add definitions for remote LDAP authentication data sources
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (0.3.1)
4
+ comet_backup_ruby_sdk (1.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
 
data/RELEASING.md CHANGED
@@ -3,7 +3,7 @@
3
3
  1. All tests passing
4
4
  2. Update changelog in `CHANGELOG.md`
5
5
  3. Update version number in `gemspec`
6
- 4. `gem build`
6
+ 4. `gem build comet_backup_ruby_sdk`
7
7
  - Should be warning-free
8
8
  5. Git tag
9
9
  - Respect semver
@@ -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 = '0.4.0'
15
+ spec.version = '1.4.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,97 @@ 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)
308
+ json_body = JSON.parse body
309
+ check_status json_body
310
+ ret = Comet::CometAPIResponseMessage.new
311
+ ret.from_hash(json_body)
312
+ ret
313
+ end
314
+
315
+ # AdminAdminUserDelete
316
+ #
317
+ # Delete an administrator.
318
+ #
319
+ # You must supply administrator authentication credentials to use this API.
320
+ # Access to this API may be prevented on a per-administrator basis.
321
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
322
+ #
323
+ # @param [String] target_user the username of the admin to be deleted
324
+ # @return [Comet::CometAPIResponseMessage]
325
+ def admin_admin_user_delete(target_user)
326
+ submit_params = {}
327
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
328
+
329
+ submit_params['TargetUser'] = target_user
330
+
331
+ body = perform_request('api/v1/admin/admin-user/delete', submit_params)
332
+ json_body = JSON.parse body
333
+ check_status json_body
334
+ ret = Comet::CometAPIResponseMessage.new
335
+ ret.from_hash(json_body)
336
+ ret
337
+ end
338
+
339
+ # AdminAdminUserList
340
+ #
341
+ # List administrators.
342
+ #
343
+ # You must supply administrator authentication credentials to use this API.
344
+ # Access to this API may be prevented on a per-administrator basis.
345
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
346
+ #
347
+ # @return [Array<Comet::AllowedAdminUser>]
348
+ def admin_admin_user_list
349
+ body = perform_request('api/v1/admin/admin-user/list')
350
+ json_body = JSON.parse body
351
+ check_status json_body
352
+ if json_body.nil?
353
+ ret = []
354
+ else
355
+ ret = Array.new(json_body.length)
356
+ json_body.each_with_index do |v, i|
357
+ ret[i] = Comet::AllowedAdminUser.new
358
+ ret[i].from_hash(v)
359
+ end
360
+ end
361
+ ret
362
+ end
363
+
364
+ # AdminAdminUserNew
365
+ #
366
+ # Add a new administrator.
367
+ #
368
+ # You must supply administrator authentication credentials to use this API.
369
+ # Access to this API may be prevented on a per-administrator basis.
370
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
371
+ #
372
+ # @param [String] target_user the username for this new admin
373
+ # @param [String] target_password the password for this new admin user
374
+ # @param [String] target_org_id (Optional) provide the organization ID for this user, it will default to the org of the authenticating user otherwise
375
+ # @return [Comet::CometAPIResponseMessage]
376
+ def admin_admin_user_new(target_user, target_password, target_org_id = nil)
377
+ submit_params = {}
378
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
379
+
380
+ submit_params['TargetUser'] = target_user
381
+ raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
382
+
383
+ submit_params['TargetPassword'] = target_password
384
+ unless target_org_id.nil?
385
+ raise TypeError, "'target_org_id' expected String, got #{target_org_id.class}" unless target_org_id.is_a? String
386
+
387
+ submit_params['TargetOrgID'] = target_org_id
388
+ end
389
+
390
+ body = perform_request('api/v1/admin/admin-user/new', submit_params)
305
391
  json_body = JSON.parse body
306
392
  check_status json_body
307
393
  ret = Comet::CometAPIResponseMessage.new
@@ -319,7 +405,7 @@ module Comet
319
405
  #
320
406
  # @return [Hash{Number => Comet::AvailableDownload}]
321
407
  def admin_branding_available_platforms
322
- body = perform_request('/api/v1/admin/branding/available-platforms')
408
+ body = perform_request('api/v1/admin/branding/available-platforms')
323
409
  json_body = JSON.parse body
324
410
  check_status json_body
325
411
  ret = {}
@@ -347,18 +433,18 @@ module Comet
347
433
  # @return [String]
348
434
  def admin_branding_generate_client_by_platform(platform, self_address = nil)
349
435
  submit_params = {}
350
- 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
351
437
 
352
438
  submit_params['Platform'] = platform
353
439
  if self_address.nil?
354
440
  submit_params['SelfAddress'] = @server_address
355
441
  else
356
- 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
357
443
 
358
444
  submit_params['SelfAddress'] = self_address
359
445
  end
360
446
 
361
- 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)
362
448
  end
363
449
 
364
450
  # AdminBrandingGenerateClientLinuxgeneric
@@ -376,12 +462,12 @@ module Comet
376
462
  if self_address.nil?
377
463
  submit_params['SelfAddress'] = @server_address
378
464
  else
379
- 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
380
466
 
381
467
  submit_params['SelfAddress'] = self_address
382
468
  end
383
469
 
384
- perform_request('/api/v1/admin/branding/generate-client/linuxgeneric', submit_params)
470
+ perform_request('api/v1/admin/branding/generate-client/linuxgeneric', submit_params)
385
471
  end
386
472
 
387
473
  # AdminBrandingGenerateClientMacosX8664
@@ -399,12 +485,12 @@ module Comet
399
485
  if self_address.nil?
400
486
  submit_params['SelfAddress'] = @server_address
401
487
  else
402
- 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
403
489
 
404
490
  submit_params['SelfAddress'] = self_address
405
491
  end
406
492
 
407
- 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)
408
494
  end
409
495
 
410
496
  # AdminBrandingGenerateClientTest
@@ -420,18 +506,18 @@ module Comet
420
506
  # @return [Comet::CometAPIResponseMessage]
421
507
  def admin_branding_generate_client_test(platform, self_address = nil)
422
508
  submit_params = {}
423
- 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
424
510
 
425
511
  submit_params['Platform'] = platform
426
512
  if self_address.nil?
427
513
  submit_params['SelfAddress'] = @server_address
428
514
  else
429
- 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
430
516
 
431
517
  submit_params['SelfAddress'] = self_address
432
518
  end
433
519
 
434
- 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)
435
521
  json_body = JSON.parse body
436
522
  check_status json_body
437
523
  ret = Comet::CometAPIResponseMessage.new
@@ -455,12 +541,12 @@ module Comet
455
541
  if self_address.nil?
456
542
  submit_params['SelfAddress'] = @server_address
457
543
  else
458
- 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
459
545
 
460
546
  submit_params['SelfAddress'] = self_address
461
547
  end
462
548
 
463
- 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)
464
550
  end
465
551
 
466
552
  # AdminBrandingGenerateClientWindowsAnycpuZip
@@ -479,12 +565,12 @@ module Comet
479
565
  if self_address.nil?
480
566
  submit_params['SelfAddress'] = @server_address
481
567
  else
482
- 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
483
569
 
484
570
  submit_params['SelfAddress'] = self_address
485
571
  end
486
572
 
487
- 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)
488
574
  end
489
575
 
490
576
  # AdminBrandingGenerateClientWindowsX8632Exe
@@ -503,12 +589,12 @@ module Comet
503
589
  if self_address.nil?
504
590
  submit_params['SelfAddress'] = @server_address
505
591
  else
506
- 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
507
593
 
508
594
  submit_params['SelfAddress'] = self_address
509
595
  end
510
596
 
511
- 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)
512
598
  end
513
599
 
514
600
  # AdminBrandingGenerateClientWindowsX8632Zip
@@ -527,12 +613,12 @@ module Comet
527
613
  if self_address.nil?
528
614
  submit_params['SelfAddress'] = @server_address
529
615
  else
530
- 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
531
617
 
532
618
  submit_params['SelfAddress'] = self_address
533
619
  end
534
620
 
535
- 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)
536
622
  end
537
623
 
538
624
  # AdminBrandingGenerateClientWindowsX8664Exe
@@ -551,12 +637,12 @@ module Comet
551
637
  if self_address.nil?
552
638
  submit_params['SelfAddress'] = @server_address
553
639
  else
554
- 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
555
641
 
556
642
  submit_params['SelfAddress'] = self_address
557
643
  end
558
644
 
559
- 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)
560
646
  end
561
647
 
562
648
  # AdminBrandingGenerateClientWindowsX8664Zip
@@ -575,12 +661,12 @@ module Comet
575
661
  if self_address.nil?
576
662
  submit_params['SelfAddress'] = @server_address
577
663
  else
578
- 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
579
665
 
580
666
  submit_params['SelfAddress'] = self_address
581
667
  end
582
668
 
583
- 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)
584
670
  end
585
671
 
586
672
  # AdminBulletinSubmit
@@ -595,14 +681,14 @@ module Comet
595
681
  # @return [Comet::CometAPIResponseMessage]
596
682
  def admin_bulletin_submit(subject, content)
597
683
  submit_params = {}
598
- 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
599
685
 
600
686
  submit_params['Subject'] = subject
601
- 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
602
688
 
603
689
  submit_params['Content'] = content
604
690
 
605
- body = perform_request('/api/v1/admin/bulletin/submit', submit_params)
691
+ body = perform_request('api/v1/admin/bulletin/submit', submit_params)
606
692
  json_body = JSON.parse body
607
693
  check_status json_body
608
694
  ret = Comet::CometAPIResponseMessage.new
@@ -615,11 +701,12 @@ module Comet
615
701
  # Get Constellation bucket usage report (cached).
616
702
  #
617
703
  # You must supply administrator authentication credentials to use this API.
704
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
618
705
  # This API requires the Constellation Role to be enabled.
619
706
  #
620
707
  # @return [Comet::ConstellationCheckReport]
621
708
  def admin_constellation_last_report
622
- body = perform_request('/api/v1/admin/constellation/last-report')
709
+ body = perform_request('api/v1/admin/constellation/last-report')
623
710
  json_body = JSON.parse body
624
711
  check_status json_body
625
712
  ret = Comet::ConstellationCheckReport.new
@@ -632,11 +719,12 @@ module Comet
632
719
  # Get Constellation bucket usage report (regenerate).
633
720
  #
634
721
  # You must supply administrator authentication credentials to use this API.
722
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
635
723
  # This API requires the Constellation Role to be enabled.
636
724
  #
637
725
  # @return [Comet::ConstellationCheckReport]
638
726
  def admin_constellation_new_report
639
- body = perform_request('/api/v1/admin/constellation/new-report')
727
+ body = perform_request('api/v1/admin/constellation/new-report')
640
728
  json_body = JSON.parse body
641
729
  check_status json_body
642
730
  ret = Comet::ConstellationCheckReport.new
@@ -649,11 +737,12 @@ module Comet
649
737
  # Prune unused buckets.
650
738
  #
651
739
  # You must supply administrator authentication credentials to use this API.
740
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
652
741
  # This API requires the Constellation Role to be enabled.
653
742
  #
654
743
  # @return [Comet::CometAPIResponseMessage]
655
744
  def admin_constellation_prune_now
656
- body = perform_request('/api/v1/admin/constellation/prune-now')
745
+ body = perform_request('api/v1/admin/constellation/prune-now')
657
746
  json_body = JSON.parse body
658
747
  check_status json_body
659
748
  ret = Comet::CometAPIResponseMessage.new
@@ -666,11 +755,12 @@ module Comet
666
755
  # Get Constellation status.
667
756
  #
668
757
  # You must supply administrator authentication credentials to use this API.
758
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
669
759
  # This API requires the Constellation Role to be enabled.
670
760
  #
671
761
  # @return [Comet::ConstellationStatusAPIResponse]
672
762
  def admin_constellation_status
673
- body = perform_request('/api/v1/admin/constellation/status')
763
+ body = perform_request('api/v1/admin/constellation/status')
674
764
  json_body = JSON.parse body
675
765
  check_status json_body
676
766
  ret = Comet::ConstellationStatusAPIResponse.new
@@ -678,6 +768,40 @@ module Comet
678
768
  ret
679
769
  end
680
770
 
771
+ # AdminCreateInstallToken
772
+ #
773
+ # Create token for silent installation (Windows only).
774
+ # Provide the installation token to silently install the client on windows `install.exe /TOKEN=<installtoken>`
775
+ #
776
+ # You must supply administrator authentication credentials to use this API.
777
+ # This API requires the Auth Role to be enabled.
778
+ #
779
+ # @param [String] target_user Selected account username
780
+ # @param [String] target_password Selected account password
781
+ # @param [String] server (Optional) External URL of the authentication server that is different from the current server
782
+ # @return [Comet::InstallTokenResponse]
783
+ def admin_create_install_token(target_user, target_password, server = nil)
784
+ submit_params = {}
785
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
786
+
787
+ submit_params['TargetUser'] = target_user
788
+ raise TypeError, "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
789
+
790
+ submit_params['TargetPassword'] = target_password
791
+ unless server.nil?
792
+ raise TypeError, "'server' expected String, got #{server.class}" unless server.is_a? String
793
+
794
+ submit_params['Server'] = server
795
+ end
796
+
797
+ body = perform_request('api/v1/admin/create-install-token', submit_params)
798
+ json_body = JSON.parse body
799
+ check_status json_body
800
+ ret = Comet::InstallTokenResponse.new
801
+ ret.from_hash(json_body)
802
+ ret
803
+ end
804
+
681
805
  # AdminDeleteUser
682
806
  #
683
807
  # Delete user account.
@@ -693,16 +817,16 @@ module Comet
693
817
  # @return [Comet::CometAPIResponseMessage]
694
818
  def admin_delete_user(target_user, uninstall_config = nil)
695
819
  submit_params = {}
696
- 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
697
821
 
698
822
  submit_params['TargetUser'] = target_user
699
823
  unless uninstall_config.nil?
700
- 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
701
825
 
702
826
  submit_params['UninstallConfig'] = uninstall_config.to_json
703
827
  end
704
828
 
705
- body = perform_request('/api/v1/admin/delete-user', submit_params)
829
+ body = perform_request('api/v1/admin/delete-user', submit_params)
706
830
  json_body = JSON.parse body
707
831
  check_status json_body
708
832
  ret = Comet::CometAPIResponseMessage.new
@@ -721,11 +845,11 @@ module Comet
721
845
  # @return [Comet::CometAPIResponseMessage]
722
846
  def admin_disable_user_totp(target_user)
723
847
  submit_params = {}
724
- 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
725
849
 
726
850
  submit_params['TargetUser'] = target_user
727
851
 
728
- body = perform_request('/api/v1/admin/disable-user-totp', submit_params)
852
+ body = perform_request('api/v1/admin/disable-user-totp', submit_params)
729
853
  json_body = JSON.parse body
730
854
  check_status json_body
731
855
  ret = Comet::CometAPIResponseMessage.new
@@ -746,14 +870,14 @@ module Comet
746
870
  # @return [Comet::CometAPIResponseMessage]
747
871
  def admin_dispatcher_apply_retention_rules(target_id, destination)
748
872
  submit_params = {}
749
- 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
750
874
 
751
875
  submit_params['TargetID'] = target_id
752
- 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
753
877
 
754
878
  submit_params['Destination'] = destination
755
879
 
756
- 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)
757
881
  json_body = JSON.parse body
758
882
  check_status json_body
759
883
  ret = Comet::CometAPIResponseMessage.new
@@ -774,14 +898,14 @@ module Comet
774
898
  # @return [Comet::CometAPIResponseMessage]
775
899
  def admin_dispatcher_deepverify_storage_vault(target_id, destination)
776
900
  submit_params = {}
777
- 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
778
902
 
779
903
  submit_params['TargetID'] = target_id
780
- 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
781
905
 
782
906
  submit_params['Destination'] = destination
783
907
 
784
- 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)
785
909
  json_body = JSON.parse body
786
910
  check_status json_body
787
911
  ret = Comet::CometAPIResponseMessage.new
@@ -802,17 +926,49 @@ module Comet
802
926
  # @return [Comet::CometAPIResponseMessage]
803
927
  def admin_dispatcher_delete_snapshot(target_id, destination_id, snapshot_id)
804
928
  submit_params = {}
805
- 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
806
930
 
807
931
  submit_params['TargetID'] = target_id
808
- 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
809
933
 
810
934
  submit_params['DestinationID'] = destination_id
811
- 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
812
936
 
813
937
  submit_params['SnapshotID'] = snapshot_id
814
938
 
815
- 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)
816
972
  json_body = JSON.parse body
817
973
  check_status json_body
818
974
  ret = Comet::CometAPIResponseMessage.new
@@ -832,11 +988,11 @@ module Comet
832
988
  # @return [Comet::CometAPIResponseMessage]
833
989
  def admin_dispatcher_drop_connection(target_id)
834
990
  submit_params = {}
835
- 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
836
992
 
837
993
  submit_params['TargetID'] = target_id
838
994
 
839
- body = perform_request('/api/v1/admin/dispatcher/drop-connection', submit_params)
995
+ body = perform_request('api/v1/admin/dispatcher/drop-connection', submit_params)
840
996
  json_body = JSON.parse body
841
997
  check_status json_body
842
998
  ret = Comet::CometAPIResponseMessage.new
@@ -857,14 +1013,14 @@ module Comet
857
1013
  # @return [Comet::CometAPIResponseMessage]
858
1014
  def admin_dispatcher_import_apply(target_id, import_source_id)
859
1015
  submit_params = {}
860
- 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
861
1017
 
862
1018
  submit_params['TargetID'] = target_id
863
- 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
864
1020
 
865
1021
  submit_params['ImportSourceID'] = import_source_id
866
1022
 
867
- body = perform_request('/api/v1/admin/dispatcher/import-apply', submit_params)
1023
+ body = perform_request('api/v1/admin/dispatcher/import-apply', submit_params)
868
1024
  json_body = JSON.parse body
869
1025
  check_status json_body
870
1026
  ret = Comet::CometAPIResponseMessage.new
@@ -884,11 +1040,11 @@ module Comet
884
1040
  # @return [Comet::CometAPIResponseMessage]
885
1041
  def admin_dispatcher_kill_process(target_id)
886
1042
  submit_params = {}
887
- 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
888
1044
 
889
1045
  submit_params['TargetID'] = target_id
890
1046
 
891
- body = perform_request('/api/v1/admin/dispatcher/kill-process', submit_params)
1047
+ body = perform_request('api/v1/admin/dispatcher/kill-process', submit_params)
892
1048
  json_body = JSON.parse body
893
1049
  check_status json_body
894
1050
  ret = Comet::CometAPIResponseMessage.new
@@ -905,7 +1061,7 @@ module Comet
905
1061
  #
906
1062
  # @return [Hash{String => Comet::LiveUserConnection}]
907
1063
  def admin_dispatcher_list_active
908
- body = perform_request('/api/v1/admin/dispatcher/list-active')
1064
+ body = perform_request('api/v1/admin/dispatcher/list-active')
909
1065
  json_body = JSON.parse body
910
1066
  check_status json_body
911
1067
  ret = {}
@@ -932,11 +1088,11 @@ module Comet
932
1088
  # @return [Comet::CometAPIResponseMessage]
933
1089
  def admin_dispatcher_refetch_profile(target_id)
934
1090
  submit_params = {}
935
- 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
936
1092
 
937
1093
  submit_params['TargetID'] = target_id
938
1094
 
939
- body = perform_request('/api/v1/admin/dispatcher/refetch-profile', submit_params)
1095
+ body = perform_request('api/v1/admin/dispatcher/refetch-profile', submit_params)
940
1096
  json_body = JSON.parse body
941
1097
  check_status json_body
942
1098
  ret = Comet::CometAPIResponseMessage.new
@@ -957,14 +1113,14 @@ module Comet
957
1113
  # @return [Comet::CometAPIResponseMessage]
958
1114
  def admin_dispatcher_reindex_storage_vault(target_id, destination)
959
1115
  submit_params = {}
960
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1116
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
961
1117
 
962
1118
  submit_params['TargetID'] = target_id
963
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1119
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
964
1120
 
965
1121
  submit_params['Destination'] = destination
966
1122
 
967
- body = perform_request('/api/v1/admin/dispatcher/reindex-storage-vault', submit_params)
1123
+ body = perform_request('api/v1/admin/dispatcher/reindex-storage-vault', submit_params)
968
1124
  json_body = JSON.parse body
969
1125
  check_status json_body
970
1126
  ret = Comet::CometAPIResponseMessage.new
@@ -983,11 +1139,11 @@ module Comet
983
1139
  # @return [Comet::BrowseDiskDrivesResponse]
984
1140
  def admin_dispatcher_request_browse_disk_drives(target_id)
985
1141
  submit_params = {}
986
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1142
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
987
1143
 
988
1144
  submit_params['TargetID'] = target_id
989
1145
 
990
- body = perform_request('/api/v1/admin/dispatcher/request-browse-disk-drives', submit_params)
1146
+ body = perform_request('api/v1/admin/dispatcher/request-browse-disk-drives', submit_params)
991
1147
  json_body = JSON.parse body
992
1148
  check_status json_body
993
1149
  ret = Comet::BrowseDiskDrivesResponse.new
@@ -1006,11 +1162,11 @@ module Comet
1006
1162
  # @return [Comet::BrowseEDBResponse]
1007
1163
  def admin_dispatcher_request_browse_exchange_edb(target_id)
1008
1164
  submit_params = {}
1009
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1165
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1010
1166
 
1011
1167
  submit_params['TargetID'] = target_id
1012
1168
 
1013
- body = perform_request('/api/v1/admin/dispatcher/request-browse-exchange-edb', submit_params)
1169
+ body = perform_request('api/v1/admin/dispatcher/request-browse-exchange-edb', submit_params)
1014
1170
  json_body = JSON.parse body
1015
1171
  check_status json_body
1016
1172
  ret = Comet::BrowseEDBResponse.new
@@ -1029,11 +1185,11 @@ module Comet
1029
1185
  # @return [Comet::BrowseHVResponse]
1030
1186
  def admin_dispatcher_request_browse_hyperv(target_id)
1031
1187
  submit_params = {}
1032
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1188
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1033
1189
 
1034
1190
  submit_params['TargetID'] = target_id
1035
1191
 
1036
- body = perform_request('/api/v1/admin/dispatcher/request-browse-hyperv', submit_params)
1192
+ body = perform_request('api/v1/admin/dispatcher/request-browse-hyperv', submit_params)
1037
1193
  json_body = JSON.parse body
1038
1194
  check_status json_body
1039
1195
  ret = Comet::BrowseHVResponse.new
@@ -1052,11 +1208,11 @@ module Comet
1052
1208
  # @return [Comet::BrowseVSSResponse]
1053
1209
  def admin_dispatcher_request_browse_vss_aaw(target_id)
1054
1210
  submit_params = {}
1055
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1211
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1056
1212
 
1057
1213
  submit_params['TargetID'] = target_id
1058
1214
 
1059
- body = perform_request('/api/v1/admin/dispatcher/request-browse-vss-aaw', submit_params)
1215
+ body = perform_request('api/v1/admin/dispatcher/request-browse-vss-aaw', submit_params)
1060
1216
  json_body = JSON.parse body
1061
1217
  check_status json_body
1062
1218
  ret = Comet::BrowseVSSResponse.new
@@ -1074,30 +1230,23 @@ module Comet
1074
1230
  #
1075
1231
  # @param [String] target_id The live connection GUID
1076
1232
  # @param [String] path (Optional) Browse objects inside this path. If empty or not present, returns the top-level device paths
1077
- # @return [Array<Comet::StoredObject>]
1233
+ # @return [Comet::DispatcherStoredObjectsResponse]
1078
1234
  def admin_dispatcher_request_filesystem_objects(target_id, path = nil)
1079
1235
  submit_params = {}
1080
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1236
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1081
1237
 
1082
1238
  submit_params['TargetID'] = target_id
1083
1239
  unless path.nil?
1084
- raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1240
+ raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
1085
1241
 
1086
1242
  submit_params['Path'] = path
1087
1243
  end
1088
1244
 
1089
- body = perform_request('/api/v1/admin/dispatcher/request-filesystem-objects', submit_params)
1245
+ body = perform_request('api/v1/admin/dispatcher/request-filesystem-objects', submit_params)
1090
1246
  json_body = JSON.parse body
1091
1247
  check_status json_body
1092
- if json_body.nil?
1093
- ret = []
1094
- else
1095
- ret = Array.new(json_body.length)
1096
- json_body.each_with_index do |v, i|
1097
- ret[i] = Comet::StoredObject.new
1098
- ret[i].from_hash(v)
1099
- end
1100
- end
1248
+ ret = Comet::DispatcherStoredObjectsResponse.new
1249
+ ret.from_hash(json_body)
1101
1250
  ret
1102
1251
  end
1103
1252
 
@@ -1112,11 +1261,11 @@ module Comet
1112
1261
  # @return [Comet::DispatcherAdminSourcesResponse]
1113
1262
  def admin_dispatcher_request_import_sources(target_id)
1114
1263
  submit_params = {}
1115
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1264
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1116
1265
 
1117
1266
  submit_params['TargetID'] = target_id
1118
1267
 
1119
- body = perform_request('/api/v1/admin/dispatcher/request-import-sources', submit_params)
1268
+ body = perform_request('api/v1/admin/dispatcher/request-import-sources', submit_params)
1120
1269
  json_body = JSON.parse body
1121
1270
  check_status json_body
1122
1271
  ret = Comet::DispatcherAdminSourcesResponse.new
@@ -1139,22 +1288,22 @@ module Comet
1139
1288
  # @return [Comet::DispatcherStoredObjectsResponse]
1140
1289
  def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil)
1141
1290
  submit_params = {}
1142
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1291
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1143
1292
 
1144
1293
  submit_params['TargetID'] = target_id
1145
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1294
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1146
1295
 
1147
1296
  submit_params['Destination'] = destination
1148
- raise TypeError "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1297
+ raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1149
1298
 
1150
1299
  submit_params['SnapshotID'] = snapshot_id
1151
1300
  unless tree_id.nil?
1152
- raise TypeError "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
1301
+ raise TypeError, "'tree_id' expected String, got #{tree_id.class}" unless tree_id.is_a? String
1153
1302
 
1154
1303
  submit_params['TreeID'] = tree_id
1155
1304
  end
1156
1305
 
1157
- body = perform_request('/api/v1/admin/dispatcher/request-stored-objects', submit_params)
1306
+ body = perform_request('api/v1/admin/dispatcher/request-stored-objects', submit_params)
1158
1307
  json_body = JSON.parse body
1159
1308
  check_status json_body
1160
1309
  ret = Comet::DispatcherStoredObjectsResponse.new
@@ -1174,14 +1323,14 @@ module Comet
1174
1323
  # @return [Comet::DispatcherVaultSnapshotsResponse]
1175
1324
  def admin_dispatcher_request_vault_snapshots(target_id, destination)
1176
1325
  submit_params = {}
1177
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1326
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1178
1327
 
1179
1328
  submit_params['TargetID'] = target_id
1180
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1329
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1181
1330
 
1182
1331
  submit_params['Destination'] = destination
1183
1332
 
1184
- body = perform_request('/api/v1/admin/dispatcher/request-vault-snapshots', submit_params)
1333
+ body = perform_request('api/v1/admin/dispatcher/request-vault-snapshots', submit_params)
1185
1334
  json_body = JSON.parse body
1186
1335
  check_status json_body
1187
1336
  ret = Comet::DispatcherVaultSnapshotsResponse.new
@@ -1201,14 +1350,14 @@ module Comet
1201
1350
  # @return [Comet::CometAPIResponseMessage]
1202
1351
  def admin_dispatcher_run_backup(target_id, backup_rule)
1203
1352
  submit_params = {}
1204
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1353
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1205
1354
 
1206
1355
  submit_params['TargetID'] = target_id
1207
- raise TypeError "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
1356
+ raise TypeError, "'backup_rule' expected String, got #{backup_rule.class}" unless backup_rule.is_a? String
1208
1357
 
1209
1358
  submit_params['BackupRule'] = backup_rule
1210
1359
 
1211
- body = perform_request('/api/v1/admin/dispatcher/run-backup', submit_params)
1360
+ body = perform_request('api/v1/admin/dispatcher/run-backup', submit_params)
1212
1361
  json_body = JSON.parse body
1213
1362
  check_status json_body
1214
1363
  ret = Comet::CometAPIResponseMessage.new
@@ -1230,22 +1379,22 @@ module Comet
1230
1379
  # @return [Comet::CometAPIResponseMessage]
1231
1380
  def admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil)
1232
1381
  submit_params = {}
1233
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1382
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1234
1383
 
1235
1384
  submit_params['TargetID'] = target_id
1236
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1385
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1237
1386
 
1238
1387
  submit_params['Source'] = source
1239
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1388
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1240
1389
 
1241
1390
  submit_params['Destination'] = destination
1242
1391
  unless options.nil?
1243
- raise TypeError "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
1392
+ raise TypeError, "'options' expected Comet::BackupJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::BackupJobAdvancedOptions
1244
1393
 
1245
1394
  submit_params['Options'] = options.to_json
1246
1395
  end
1247
1396
 
1248
- body = perform_request('/api/v1/admin/dispatcher/run-backup-custom', submit_params)
1397
+ body = perform_request('api/v1/admin/dispatcher/run-backup-custom', submit_params)
1249
1398
  json_body = JSON.parse body
1250
1399
  check_status json_body
1251
1400
  ret = Comet::CometAPIResponseMessage.new
@@ -1270,30 +1419,30 @@ module Comet
1270
1419
  # @return [Comet::CometAPIResponseMessage]
1271
1420
  def admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil)
1272
1421
  submit_params = {}
1273
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1422
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1274
1423
 
1275
1424
  submit_params['TargetID'] = target_id
1276
- raise TypeError "'path' expected String, got #{path.class}" unless path.is_a? String
1425
+ raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
1277
1426
 
1278
1427
  submit_params['Path'] = path
1279
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1428
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1280
1429
 
1281
1430
  submit_params['Source'] = source
1282
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1431
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1283
1432
 
1284
1433
  submit_params['Destination'] = destination
1285
1434
  unless snapshot.nil?
1286
- raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1435
+ raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1287
1436
 
1288
1437
  submit_params['Snapshot'] = snapshot
1289
1438
  end
1290
1439
  unless paths.nil?
1291
- raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1440
+ raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1292
1441
 
1293
1442
  submit_params['Paths'] = paths.to_json
1294
1443
  end
1295
1444
 
1296
- body = perform_request('/api/v1/admin/dispatcher/run-restore', submit_params)
1445
+ body = perform_request('api/v1/admin/dispatcher/run-restore', submit_params)
1297
1446
  json_body = JSON.parse body
1298
1447
  check_status json_body
1299
1448
  ret = Comet::CometAPIResponseMessage.new
@@ -1318,30 +1467,30 @@ module Comet
1318
1467
  # @return [Comet::CometAPIResponseMessage]
1319
1468
  def admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil)
1320
1469
  submit_params = {}
1321
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1470
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1322
1471
 
1323
1472
  submit_params['TargetID'] = target_id
1324
- raise TypeError "'source' expected String, got #{source.class}" unless source.is_a? String
1473
+ raise TypeError, "'source' expected String, got #{source.class}" unless source.is_a? String
1325
1474
 
1326
1475
  submit_params['Source'] = source
1327
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1476
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1328
1477
 
1329
1478
  submit_params['Destination'] = destination
1330
- raise TypeError "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
1479
+ raise TypeError, "'options' expected Comet::RestoreJobAdvancedOptions, got #{options.class}" unless options.is_a? Comet::RestoreJobAdvancedOptions
1331
1480
 
1332
1481
  submit_params['Options'] = options.to_json
1333
1482
  unless snapshot.nil?
1334
- raise TypeError "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1483
+ raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1335
1484
 
1336
1485
  submit_params['Snapshot'] = snapshot
1337
1486
  end
1338
1487
  unless paths.nil?
1339
- raise TypeError "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1488
+ raise TypeError, "'paths' expected Array, got #{paths.class}" unless paths.is_a? Array
1340
1489
 
1341
1490
  submit_params['Paths'] = paths.to_json
1342
1491
  end
1343
1492
 
1344
- body = perform_request('/api/v1/admin/dispatcher/run-restore-custom', submit_params)
1493
+ body = perform_request('api/v1/admin/dispatcher/run-restore-custom', submit_params)
1345
1494
  json_body = JSON.parse body
1346
1495
  check_status json_body
1347
1496
  ret = Comet::CometAPIResponseMessage.new
@@ -1361,12 +1510,12 @@ module Comet
1361
1510
  # @return [Comet::CometAPIResponseMessage]
1362
1511
  def admin_dispatcher_uninstall_software(target_id, remove_config_file)
1363
1512
  submit_params = {}
1364
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1513
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1365
1514
 
1366
1515
  submit_params['TargetID'] = target_id
1367
1516
  submit_params['RemoveConfigFile'] = (remove_config_file ? 1 : 0)
1368
1517
 
1369
- body = perform_request('/api/v1/admin/dispatcher/uninstall-software', submit_params)
1518
+ body = perform_request('api/v1/admin/dispatcher/uninstall-software', submit_params)
1370
1519
  json_body = JSON.parse body
1371
1520
  check_status json_body
1372
1521
  ret = Comet::CometAPIResponseMessage.new
@@ -1388,14 +1537,14 @@ module Comet
1388
1537
  # @return [Comet::CometAPIResponseMessage]
1389
1538
  def admin_dispatcher_unlock(target_id, destination)
1390
1539
  submit_params = {}
1391
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1540
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1392
1541
 
1393
1542
  submit_params['TargetID'] = target_id
1394
- raise TypeError "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1543
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1395
1544
 
1396
1545
  submit_params['Destination'] = destination
1397
1546
 
1398
- body = perform_request('/api/v1/admin/dispatcher/unlock', submit_params)
1547
+ body = perform_request('api/v1/admin/dispatcher/unlock', submit_params)
1399
1548
  json_body = JSON.parse body
1400
1549
  check_status json_body
1401
1550
  ret = Comet::CometAPIResponseMessage.new
@@ -1416,14 +1565,14 @@ module Comet
1416
1565
  # @return [Comet::CometAPIResponseMessage]
1417
1566
  def admin_dispatcher_update_login_url(target_id, new_url)
1418
1567
  submit_params = {}
1419
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1568
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1420
1569
 
1421
1570
  submit_params['TargetID'] = target_id
1422
- raise TypeError "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
1571
+ raise TypeError, "'new_url' expected String, got #{new_url.class}" unless new_url.is_a? String
1423
1572
 
1424
1573
  submit_params['NewURL'] = new_url
1425
1574
 
1426
- body = perform_request('/api/v1/admin/dispatcher/update-login-url', submit_params)
1575
+ body = perform_request('api/v1/admin/dispatcher/update-login-url', submit_params)
1427
1576
  json_body = JSON.parse body
1428
1577
  check_status json_body
1429
1578
  ret = Comet::CometAPIResponseMessage.new
@@ -1444,18 +1593,18 @@ module Comet
1444
1593
  # @return [Comet::CometAPIResponseMessage]
1445
1594
  def admin_dispatcher_update_software(target_id, self_address = nil)
1446
1595
  submit_params = {}
1447
- raise TypeError "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1596
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1448
1597
 
1449
1598
  submit_params['TargetID'] = target_id
1450
1599
  if self_address.nil?
1451
1600
  submit_params['SelfAddress'] = @server_address
1452
1601
  else
1453
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
1602
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
1454
1603
 
1455
1604
  submit_params['SelfAddress'] = self_address
1456
1605
  end
1457
1606
 
1458
- body = perform_request('/api/v1/admin/dispatcher/update-software', submit_params)
1607
+ body = perform_request('api/v1/admin/dispatcher/update-software', submit_params)
1459
1608
  json_body = JSON.parse body
1460
1609
  check_status json_body
1461
1610
  ret = Comet::CometAPIResponseMessage.new
@@ -1474,11 +1623,11 @@ module Comet
1474
1623
  # @return [String]
1475
1624
  def admin_get_job_log(job_id)
1476
1625
  submit_params = {}
1477
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1626
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1478
1627
 
1479
1628
  submit_params['JobID'] = job_id
1480
1629
 
1481
- perform_request('/api/v1/admin/get-job-log', submit_params)
1630
+ perform_request('api/v1/admin/get-job-log', submit_params)
1482
1631
  end
1483
1632
 
1484
1633
  # AdminGetJobLogEntries
@@ -1492,11 +1641,11 @@ module Comet
1492
1641
  # @return [Array<Comet::JobEntry>]
1493
1642
  def admin_get_job_log_entries(job_id)
1494
1643
  submit_params = {}
1495
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1644
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1496
1645
 
1497
1646
  submit_params['JobID'] = job_id
1498
1647
 
1499
- body = perform_request('/api/v1/admin/get-job-log-entries', submit_params)
1648
+ body = perform_request('api/v1/admin/get-job-log-entries', submit_params)
1500
1649
  json_body = JSON.parse body
1501
1650
  check_status json_body
1502
1651
  if json_body.nil?
@@ -1522,11 +1671,11 @@ module Comet
1522
1671
  # @return [Comet::BackupJobDetail]
1523
1672
  def admin_get_job_properties(job_id)
1524
1673
  submit_params = {}
1525
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1674
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1526
1675
 
1527
1676
  submit_params['JobID'] = job_id
1528
1677
 
1529
- body = perform_request('/api/v1/admin/get-job-properties', submit_params)
1678
+ body = perform_request('api/v1/admin/get-job-properties', submit_params)
1530
1679
  json_body = JSON.parse body
1531
1680
  check_status json_body
1532
1681
  ret = Comet::BackupJobDetail.new
@@ -1544,7 +1693,7 @@ module Comet
1544
1693
  #
1545
1694
  # @return [Array<Comet::BackupJobDetail>]
1546
1695
  def admin_get_jobs_all
1547
- body = perform_request('/api/v1/admin/get-jobs-all')
1696
+ body = perform_request('api/v1/admin/get-jobs-all')
1548
1697
  json_body = JSON.parse body
1549
1698
  check_status json_body
1550
1699
  if json_body.nil?
@@ -1571,11 +1720,11 @@ module Comet
1571
1720
  # @return [Array<Comet::BackupJobDetail>]
1572
1721
  def admin_get_jobs_for_custom_search(query)
1573
1722
  submit_params = {}
1574
- raise TypeError "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
1723
+ raise TypeError, "'query' expected Comet::SearchClause, got #{query.class}" unless query.is_a? Comet::SearchClause
1575
1724
 
1576
1725
  submit_params['Query'] = query.to_json
1577
1726
 
1578
- body = perform_request('/api/v1/admin/get-jobs-for-custom-search', submit_params)
1727
+ body = perform_request('api/v1/admin/get-jobs-for-custom-search', submit_params)
1579
1728
  json_body = JSON.parse body
1580
1729
  check_status json_body
1581
1730
  if json_body.nil?
@@ -1609,14 +1758,14 @@ module Comet
1609
1758
  # @return [Array<Comet::BackupJobDetail>]
1610
1759
  def admin_get_jobs_for_date_range(start_value, end_value)
1611
1760
  submit_params = {}
1612
- raise TypeError "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
1761
+ raise TypeError, "'start_value' expected Numeric, got #{start_value.class}" unless start_value.is_a? Numeric
1613
1762
 
1614
1763
  submit_params['Start'] = start_value
1615
- raise TypeError "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
1764
+ raise TypeError, "'end_value' expected Numeric, got #{end_value.class}" unless end_value.is_a? Numeric
1616
1765
 
1617
1766
  submit_params['End'] = end_value
1618
1767
 
1619
- body = perform_request('/api/v1/admin/get-jobs-for-date-range', submit_params)
1768
+ body = perform_request('api/v1/admin/get-jobs-for-date-range', submit_params)
1620
1769
  json_body = JSON.parse body
1621
1770
  check_status json_body
1622
1771
  if json_body.nil?
@@ -1643,11 +1792,11 @@ module Comet
1643
1792
  # @return [Array<Comet::BackupJobDetail>]
1644
1793
  def admin_get_jobs_for_user(target_user)
1645
1794
  submit_params = {}
1646
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1795
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1647
1796
 
1648
1797
  submit_params['TargetUser'] = target_user
1649
1798
 
1650
- body = perform_request('/api/v1/admin/get-jobs-for-user', submit_params)
1799
+ body = perform_request('api/v1/admin/get-jobs-for-user', submit_params)
1651
1800
  json_body = JSON.parse body
1652
1801
  check_status json_body
1653
1802
  if json_body.nil?
@@ -1672,7 +1821,7 @@ module Comet
1672
1821
  #
1673
1822
  # @return [Array<Comet::BackupJobDetail>]
1674
1823
  def admin_get_jobs_recent
1675
- body = perform_request('/api/v1/admin/get-jobs-recent')
1824
+ body = perform_request('api/v1/admin/get-jobs-recent')
1676
1825
  json_body = JSON.parse body
1677
1826
  check_status json_body
1678
1827
  if json_body.nil?
@@ -1698,11 +1847,11 @@ module Comet
1698
1847
  # @return [Comet::UserProfileConfig]
1699
1848
  def admin_get_user_profile(target_user)
1700
1849
  submit_params = {}
1701
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1850
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1702
1851
 
1703
1852
  submit_params['TargetUser'] = target_user
1704
1853
 
1705
- body = perform_request('/api/v1/admin/get-user-profile', submit_params)
1854
+ body = perform_request('api/v1/admin/get-user-profile', submit_params)
1706
1855
  json_body = JSON.parse body
1707
1856
  check_status json_body
1708
1857
  ret = Comet::UserProfileConfig.new
@@ -1723,11 +1872,11 @@ module Comet
1723
1872
  # @return [Comet::GetProfileAndHashResponseMessage]
1724
1873
  def admin_get_user_profile_and_hash(target_user)
1725
1874
  submit_params = {}
1726
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1875
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1727
1876
 
1728
1877
  submit_params['TargetUser'] = target_user
1729
1878
 
1730
- body = perform_request('/api/v1/admin/get-user-profile-and-hash', submit_params)
1879
+ body = perform_request('api/v1/admin/get-user-profile-and-hash', submit_params)
1731
1880
  json_body = JSON.parse body
1732
1881
  check_status json_body
1733
1882
  ret = Comet::GetProfileAndHashResponseMessage.new
@@ -1748,11 +1897,11 @@ module Comet
1748
1897
  # @return [Comet::GetProfileHashResponseMessage]
1749
1898
  def admin_get_user_profile_hash(target_user)
1750
1899
  submit_params = {}
1751
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1900
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1752
1901
 
1753
1902
  submit_params['TargetUser'] = target_user
1754
1903
 
1755
- body = perform_request('/api/v1/admin/get-user-profile-hash', submit_params)
1904
+ body = perform_request('api/v1/admin/get-user-profile-hash', submit_params)
1756
1905
  json_body = JSON.parse body
1757
1906
  check_status json_body
1758
1907
  ret = Comet::GetProfileHashResponseMessage.new
@@ -1774,14 +1923,14 @@ module Comet
1774
1923
  # @return [Comet::CometAPIResponseMessage]
1775
1924
  def admin_job_cancel(target_user, job_id)
1776
1925
  submit_params = {}
1777
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1926
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
1778
1927
 
1779
1928
  submit_params['TargetUser'] = target_user
1780
- raise TypeError "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1929
+ raise TypeError, "'job_id' expected String, got #{job_id.class}" unless job_id.is_a? String
1781
1930
 
1782
1931
  submit_params['JobID'] = job_id
1783
1932
 
1784
- body = perform_request('/api/v1/admin/job/cancel', submit_params)
1933
+ body = perform_request('api/v1/admin/job/cancel', submit_params)
1785
1934
  json_body = JSON.parse body
1786
1935
  check_status json_body
1787
1936
  ret = Comet::CometAPIResponseMessage.new
@@ -1798,7 +1947,7 @@ module Comet
1798
1947
  #
1799
1948
  # @return [Array<String>]
1800
1949
  def admin_list_users
1801
- body = perform_request('/api/v1/admin/list-users')
1950
+ body = perform_request('api/v1/admin/list-users')
1802
1951
  json_body = JSON.parse body
1803
1952
  check_status json_body
1804
1953
  if json_body.nil?
@@ -1806,7 +1955,7 @@ module Comet
1806
1955
  else
1807
1956
  ret = Array.new(json_body.length)
1808
1957
  json_body.each_with_index do |v, i|
1809
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
1958
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
1810
1959
 
1811
1960
  ret[i] = v
1812
1961
  end
@@ -1823,7 +1972,7 @@ module Comet
1823
1972
  #
1824
1973
  # @return [Hash{String => Comet::UserProfileConfig}]
1825
1974
  def admin_list_users_full
1826
- body = perform_request('/api/v1/admin/list-users-full')
1975
+ body = perform_request('api/v1/admin/list-users-full')
1827
1976
  json_body = JSON.parse body
1828
1977
  check_status json_body
1829
1978
  ret = {}
@@ -1847,7 +1996,7 @@ module Comet
1847
1996
  #
1848
1997
  # @return [Comet::ServerConfigOptionsBrandingFragment]
1849
1998
  def admin_meta_branding_config_get
1850
- body = perform_request('/api/v1/admin/meta/branding-config/get')
1999
+ body = perform_request('api/v1/admin/meta/branding-config/get')
1851
2000
  json_body = JSON.parse body
1852
2001
  check_status json_body
1853
2002
  ret = Comet::ServerConfigOptionsBrandingFragment.new
@@ -1867,11 +2016,11 @@ module Comet
1867
2016
  # @return [Comet::CometAPIResponseMessage]
1868
2017
  def admin_meta_branding_config_set(branding_config)
1869
2018
  submit_params = {}
1870
- raise TypeError "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
2019
+ raise TypeError, "'branding_config' expected Comet::BrandingOptions, got #{branding_config.class}" unless branding_config.is_a? Comet::BrandingOptions
1871
2020
 
1872
2021
  submit_params['BrandingConfig'] = branding_config.to_json
1873
2022
 
1874
- body = perform_request('/api/v1/admin/meta/branding-config/set', submit_params)
2023
+ body = perform_request('api/v1/admin/meta/branding-config/set', submit_params)
1875
2024
  json_body = JSON.parse body
1876
2025
  check_status json_body
1877
2026
  ret = Comet::CometAPIResponseMessage.new
@@ -1888,7 +2037,7 @@ module Comet
1888
2037
  #
1889
2038
  # @return [Comet::ServerConfigOptionsSoftwareBuildRoleFragment]
1890
2039
  def admin_meta_build_config_get
1891
- body = perform_request('/api/v1/admin/meta/build-config/get')
2040
+ body = perform_request('api/v1/admin/meta/build-config/get')
1892
2041
  json_body = JSON.parse body
1893
2042
  check_status json_body
1894
2043
  ret = Comet::ServerConfigOptionsSoftwareBuildRoleFragment.new
@@ -1907,11 +2056,11 @@ module Comet
1907
2056
  # @return [Comet::CometAPIResponseMessage]
1908
2057
  def admin_meta_build_config_set(software_build_role_config)
1909
2058
  submit_params = {}
1910
- raise TypeError "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
2059
+ raise TypeError, "'software_build_role_config' expected Comet::SoftwareBuildRoleOptions, got #{software_build_role_config.class}" unless software_build_role_config.is_a? Comet::SoftwareBuildRoleOptions
1911
2060
 
1912
2061
  submit_params['SoftwareBuildRoleConfig'] = software_build_role_config.to_json
1913
2062
 
1914
- body = perform_request('/api/v1/admin/meta/build-config/set', submit_params)
2063
+ body = perform_request('api/v1/admin/meta/build-config/set', submit_params)
1915
2064
  json_body = JSON.parse body
1916
2065
  check_status json_body
1917
2066
  ret = Comet::CometAPIResponseMessage.new
@@ -1924,10 +2073,11 @@ module Comet
1924
2073
  # Get log files.
1925
2074
  #
1926
2075
  # You must supply administrator authentication credentials to use this API.
2076
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
1927
2077
  #
1928
2078
  # @return [Array<Number>]
1929
2079
  def admin_meta_list_available_log_days
1930
- body = perform_request('/api/v1/admin/meta/list-available-log-days')
2080
+ body = perform_request('api/v1/admin/meta/list-available-log-days')
1931
2081
  json_body = JSON.parse body
1932
2082
  check_status json_body
1933
2083
  if json_body.nil?
@@ -1935,7 +2085,7 @@ module Comet
1935
2085
  else
1936
2086
  ret = Array.new(json_body.length)
1937
2087
  json_body.each_with_index do |v, i|
1938
- raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
2088
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
1939
2089
 
1940
2090
  ret[i] = v
1941
2091
  end
@@ -1950,16 +2100,17 @@ module Comet
1950
2100
  # This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.
1951
2101
  #
1952
2102
  # You must supply administrator authentication credentials to use this API.
2103
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
1953
2104
  #
1954
2105
  # @param [Number] log A log day, selected from the options returned by the Get Log Files API
1955
2106
  # @return [String]
1956
2107
  def admin_meta_read_logs(log)
1957
2108
  submit_params = {}
1958
- raise TypeError "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
2109
+ raise TypeError, "'log' expected Numeric, got #{log.class}" unless log.is_a? Numeric
1959
2110
 
1960
2111
  submit_params['Log'] = log
1961
2112
 
1962
- perform_request('/api/v1/admin/meta/read-logs', submit_params)
2113
+ perform_request('api/v1/admin/meta/read-logs', submit_params)
1963
2114
  end
1964
2115
 
1965
2116
  # AdminMetaRemoteStorageVaultGet
@@ -1971,7 +2122,7 @@ module Comet
1971
2122
  #
1972
2123
  # @return [Array<Comet::RemoteStorageOption>]
1973
2124
  def admin_meta_remote_storage_vault_get
1974
- body = perform_request('/api/v1/admin/meta/remote-storage-vault/get')
2125
+ body = perform_request('api/v1/admin/meta/remote-storage-vault/get')
1975
2126
  json_body = JSON.parse body
1976
2127
  check_status json_body
1977
2128
  if json_body.nil?
@@ -1997,11 +2148,11 @@ module Comet
1997
2148
  # @return [Comet::CometAPIResponseMessage]
1998
2149
  def admin_meta_remote_storage_vault_set(remote_storage_options)
1999
2150
  submit_params = {}
2000
- raise TypeError "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
2151
+ raise TypeError, "'remote_storage_options' expected Array, got #{remote_storage_options.class}" unless remote_storage_options.is_a? Array
2001
2152
 
2002
2153
  submit_params['RemoteStorageOptions'] = remote_storage_options.to_json
2003
2154
 
2004
- body = perform_request('/api/v1/admin/meta/remote-storage-vault/set', submit_params)
2155
+ body = perform_request('api/v1/admin/meta/remote-storage-vault/set', submit_params)
2005
2156
  json_body = JSON.parse body
2006
2157
  check_status json_body
2007
2158
  ret = Comet::CometAPIResponseMessage.new
@@ -2020,11 +2171,36 @@ module Comet
2020
2171
  # @return [String]
2021
2172
  def admin_meta_resource_get(hash)
2022
2173
  submit_params = {}
2023
- raise TypeError "'hash' expected String, got #{hash.class}" unless hash.is_a? String
2174
+ raise TypeError, "'hash' expected String, got #{hash.class}" unless hash.is_a? String
2024
2175
 
2025
2176
  submit_params['Hash'] = hash
2026
2177
 
2027
- perform_request('/api/v1/admin/meta/resource/get', submit_params)
2178
+ perform_request('api/v1/admin/meta/resource/get', submit_params)
2179
+ end
2180
+
2181
+ # AdminMetaResourceNew
2182
+ #
2183
+ # Upload a resource file.
2184
+ # Resources are used to upload files within the server configuration.
2185
+ # The resulting resource ID is autogenerated.
2186
+ # 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.
2187
+ #
2188
+ # You must supply administrator authentication credentials to use this API.
2189
+ #
2190
+ # @param [String] upload The uploaded file contents, as a multipart/form-data part.
2191
+ # @return [Comet::AdminResourceResponse]
2192
+ def admin_meta_resource_new(upload)
2193
+ submit_params = {}
2194
+ raise TypeError, "'upload' expected String, got #{upload.class}" unless upload.is_a? String
2195
+
2196
+ submit_params['upload'] = upload
2197
+
2198
+ body = perform_request_multipart('api/v1/admin/meta/resource/new', submit_params)
2199
+ json_body = JSON.parse body
2200
+ check_status json_body
2201
+ ret = Comet::AdminResourceResponse.new
2202
+ ret.from_hash(json_body)
2203
+ ret
2028
2204
  end
2029
2205
 
2030
2206
  # AdminMetaRestartService
@@ -2035,11 +2211,12 @@ module Comet
2035
2211
  # Prior to 18.9.2, this API terminated the server immediately without returning a response. In 18.9.2 and later, it returns a successful response before shutting down.
2036
2212
  #
2037
2213
  # You must supply administrator authentication credentials to use this API.
2214
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2038
2215
  # Access to this API may be prevented on a per-administrator basis.
2039
2216
  #
2040
2217
  # @return [Comet::CometAPIResponseMessage]
2041
2218
  def admin_meta_restart_service
2042
- body = perform_request('/api/v1/admin/meta/restart-service')
2219
+ body = perform_request('api/v1/admin/meta/restart-service')
2043
2220
  json_body = JSON.parse body
2044
2221
  check_status json_body
2045
2222
  ret = Comet::CometAPIResponseMessage.new
@@ -2053,6 +2230,7 @@ module Comet
2053
2230
  # This allows the Comet Server web interface to support testing different email credentials during setup.
2054
2231
  #
2055
2232
  # You must supply administrator authentication credentials to use this API.
2233
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2056
2234
  # Access to this API may be prevented on a per-administrator basis.
2057
2235
  #
2058
2236
  # @param [Comet::EmailOptions] email_options Updated configuration content
@@ -2060,14 +2238,14 @@ module Comet
2060
2238
  # @return [Comet::CometAPIResponseMessage]
2061
2239
  def admin_meta_send_test_email(email_options, recipient)
2062
2240
  submit_params = {}
2063
- raise TypeError "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
2241
+ raise TypeError, "'email_options' expected Comet::EmailOptions, got #{email_options.class}" unless email_options.is_a? Comet::EmailOptions
2064
2242
 
2065
2243
  submit_params['EmailOptions'] = email_options.to_json
2066
- raise TypeError "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
2244
+ raise TypeError, "'recipient' expected String, got #{recipient.class}" unless recipient.is_a? String
2067
2245
 
2068
2246
  submit_params['Recipient'] = recipient
2069
2247
 
2070
- body = perform_request('/api/v1/admin/meta/send-test-email', submit_params)
2248
+ body = perform_request('api/v1/admin/meta/send-test-email', submit_params)
2071
2249
  json_body = JSON.parse body
2072
2250
  check_status json_body
2073
2251
  ret = Comet::CometAPIResponseMessage.new
@@ -2081,10 +2259,11 @@ module Comet
2081
2259
  #
2082
2260
  # You must supply administrator authentication credentials to use this API.
2083
2261
  # Access to this API may be prevented on a per-administrator basis.
2262
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2084
2263
  #
2085
2264
  # @return [Comet::ServerConfigOptions]
2086
2265
  def admin_meta_server_config_get
2087
- body = perform_request('/api/v1/admin/meta/server-config/get')
2266
+ body = perform_request('api/v1/admin/meta/server-config/get')
2088
2267
  json_body = JSON.parse body
2089
2268
  check_status json_body
2090
2269
  ret = Comet::ServerConfigOptions.new
@@ -2099,10 +2278,11 @@ module Comet
2099
2278
  #
2100
2279
  # You must supply administrator authentication credentials to use this API.
2101
2280
  # Access to this API may be prevented on a per-administrator basis.
2281
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2102
2282
  #
2103
2283
  # @return [Array<String>]
2104
2284
  def admin_meta_server_config_network_interfaces
2105
- body = perform_request('/api/v1/admin/meta/server-config/network-interfaces')
2285
+ body = perform_request('api/v1/admin/meta/server-config/network-interfaces')
2106
2286
  json_body = JSON.parse body
2107
2287
  check_status json_body
2108
2288
  if json_body.nil?
@@ -2110,7 +2290,7 @@ module Comet
2110
2290
  else
2111
2291
  ret = Array.new(json_body.length)
2112
2292
  json_body.each_with_index do |v, i|
2113
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2293
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2114
2294
 
2115
2295
  ret[i] = v
2116
2296
  end
@@ -2127,16 +2307,17 @@ module Comet
2127
2307
  #
2128
2308
  # You must supply administrator authentication credentials to use this API.
2129
2309
  # Access to this API may be prevented on a per-administrator basis.
2310
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2130
2311
  #
2131
2312
  # @param [Comet::ServerConfigOptions] config Updated configuration content
2132
2313
  # @return [Comet::CometAPIResponseMessage]
2133
2314
  def admin_meta_server_config_set(config)
2134
2315
  submit_params = {}
2135
- raise TypeError "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
2316
+ raise TypeError, "'config' expected Comet::ServerConfigOptions, got #{config.class}" unless config.is_a? Comet::ServerConfigOptions
2136
2317
 
2137
2318
  submit_params['Config'] = config.to_json
2138
2319
 
2139
- body = perform_request('/api/v1/admin/meta/server-config/set', submit_params)
2320
+ body = perform_request('api/v1/admin/meta/server-config/set', submit_params)
2140
2321
  json_body = JSON.parse body
2141
2322
  check_status json_body
2142
2323
  ret = Comet::CometAPIResponseMessage.new
@@ -2152,11 +2333,12 @@ module Comet
2152
2333
  # Prior to 18.9.2, this API terminated the server immediately without returning a response. In 18.9.2 and later, it returns a successful response before shutting down.
2153
2334
  #
2154
2335
  # You must supply administrator authentication credentials to use this API.
2336
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2155
2337
  # Access to this API may be prevented on a per-administrator basis.
2156
2338
  #
2157
2339
  # @return [Comet::CometAPIResponseMessage]
2158
2340
  def admin_meta_shutdown_service
2159
- body = perform_request('/api/v1/admin/meta/shutdown-service')
2341
+ body = perform_request('api/v1/admin/meta/shutdown-service')
2160
2342
  json_body = JSON.parse body
2161
2343
  check_status json_body
2162
2344
  ret = Comet::CometAPIResponseMessage.new
@@ -2172,7 +2354,7 @@ module Comet
2172
2354
  #
2173
2355
  # @return [Comet::SoftwareUpdateNewsResponse]
2174
2356
  def admin_meta_software_update_news
2175
- body = perform_request('/api/v1/admin/meta/software-update-news')
2357
+ body = perform_request('api/v1/admin/meta/software-update-news')
2176
2358
  json_body = JSON.parse body
2177
2359
  check_status json_body
2178
2360
  ret = Comet::SoftwareUpdateNewsResponse.new
@@ -2193,7 +2375,7 @@ module Comet
2193
2375
  submit_params = {}
2194
2376
  submit_params['Simple'] = (simple ? 1 : 0)
2195
2377
 
2196
- body = perform_request('/api/v1/admin/meta/stats', submit_params)
2378
+ body = perform_request('api/v1/admin/meta/stats', submit_params)
2197
2379
  json_body = JSON.parse body
2198
2380
  check_status json_body
2199
2381
  ret = {}
@@ -2217,7 +2399,7 @@ module Comet
2217
2399
  #
2218
2400
  # @return [Comet::ServerMetaVersionInfo]
2219
2401
  def admin_meta_version
2220
- body = perform_request('/api/v1/admin/meta/version')
2402
+ body = perform_request('api/v1/admin/meta/version')
2221
2403
  json_body = JSON.parse body
2222
2404
  check_status json_body
2223
2405
  ret = Comet::ServerMetaVersionInfo.new
@@ -2233,7 +2415,7 @@ module Comet
2233
2415
  #
2234
2416
  # @return [Hash{String => Comet::WebhookOption}]
2235
2417
  def admin_meta_webhook_options_get
2236
- body = perform_request('/api/v1/admin/meta/webhook-options/get')
2418
+ body = perform_request('api/v1/admin/meta/webhook-options/get')
2237
2419
  json_body = JSON.parse body
2238
2420
  check_status json_body
2239
2421
  ret = {}
@@ -2255,15 +2437,15 @@ module Comet
2255
2437
  #
2256
2438
  # You must supply administrator authentication credentials to use this API.
2257
2439
  #
2258
- # @param [Hash{String => Comet::WebhookOption}] webhook_options A json encoded string of the new webhook target options.
2440
+ # @param [Hash{String => Comet::WebhookOption}] webhook_options The replacement webhook target options.
2259
2441
  # @return [Comet::CometAPIResponseMessage]
2260
2442
  def admin_meta_webhook_options_set(webhook_options)
2261
2443
  submit_params = {}
2262
- raise TypeError "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
2444
+ raise TypeError, "'webhook_options' expected Hash, got #{webhook_options.class}" unless webhook_options.is_a? Hash
2263
2445
 
2264
2446
  submit_params['WebhookOptions'] = webhook_options.to_json
2265
2447
 
2266
- body = perform_request('/api/v1/admin/meta/webhook-options/set', submit_params)
2448
+ body = perform_request('api/v1/admin/meta/webhook-options/set', submit_params)
2267
2449
  json_body = JSON.parse body
2268
2450
  check_status json_body
2269
2451
  ret = Comet::CometAPIResponseMessage.new
@@ -2280,7 +2462,7 @@ module Comet
2280
2462
  #
2281
2463
  # @return [Hash{String => Comet::NewsEntry}]
2282
2464
  def admin_news_get_all
2283
- body = perform_request('/api/v1/admin/news/get-all')
2465
+ body = perform_request('api/v1/admin/news/get-all')
2284
2466
  json_body = JSON.parse body
2285
2467
  check_status json_body
2286
2468
  ret = {}
@@ -2306,11 +2488,11 @@ module Comet
2306
2488
  # @return [Comet::CometAPIResponseMessage]
2307
2489
  def admin_news_remove(news_item)
2308
2490
  submit_params = {}
2309
- raise TypeError "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
2491
+ raise TypeError, "'news_item' expected String, got #{news_item.class}" unless news_item.is_a? String
2310
2492
 
2311
2493
  submit_params['NewsItem'] = news_item
2312
2494
 
2313
- body = perform_request('/api/v1/admin/news/remove', submit_params)
2495
+ body = perform_request('api/v1/admin/news/remove', submit_params)
2314
2496
  json_body = JSON.parse body
2315
2497
  check_status json_body
2316
2498
  ret = Comet::CometAPIResponseMessage.new
@@ -2329,11 +2511,11 @@ module Comet
2329
2511
  # @return [Comet::CometAPIResponseMessage]
2330
2512
  def admin_news_submit(news_content)
2331
2513
  submit_params = {}
2332
- raise TypeError "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
2514
+ raise TypeError, "'news_content' expected String, got #{news_content.class}" unless news_content.is_a? String
2333
2515
 
2334
2516
  submit_params['NewsContent'] = news_content
2335
2517
 
2336
- body = perform_request('/api/v1/admin/news/submit', submit_params)
2518
+ body = perform_request('api/v1/admin/news/submit', submit_params)
2337
2519
  json_body = JSON.parse body
2338
2520
  check_status json_body
2339
2521
  ret = Comet::CometAPIResponseMessage.new
@@ -2341,6 +2523,92 @@ module Comet
2341
2523
  ret
2342
2524
  end
2343
2525
 
2526
+ # AdminOrganizationDelete
2527
+ #
2528
+ # Delete an organization and all related users.
2529
+ #
2530
+ # You must supply administrator authentication credentials to use this API.
2531
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2532
+ #
2533
+ # @param [String] organization_id (Optional) (No description available)
2534
+ # @param [Comet::UninstallConfig] uninstall_config (Optional) Uninstall software configuration
2535
+ # @return [Comet::OrganizationResponse]
2536
+ def admin_organization_delete(organization_id = nil, uninstall_config = nil)
2537
+ submit_params = {}
2538
+ unless organization_id.nil?
2539
+ raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2540
+
2541
+ submit_params['OrganizationID'] = organization_id
2542
+ end
2543
+ unless uninstall_config.nil?
2544
+ raise TypeError, "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
2545
+
2546
+ submit_params['UninstallConfig'] = uninstall_config.to_json
2547
+ end
2548
+
2549
+ body = perform_request('api/v1/admin/organization/delete', submit_params)
2550
+ json_body = JSON.parse body
2551
+ check_status json_body
2552
+ ret = Comet::OrganizationResponse.new
2553
+ ret.from_hash(json_body)
2554
+ ret
2555
+ end
2556
+
2557
+ # AdminOrganizationList
2558
+ #
2559
+ # List Organizations.
2560
+ #
2561
+ # You must supply administrator authentication credentials to use this API.
2562
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2563
+ #
2564
+ # @return [Hash{String => Comet::Organization}]
2565
+ def admin_organization_list
2566
+ body = perform_request('api/v1/admin/organization/list')
2567
+ json_body = JSON.parse body
2568
+ check_status json_body
2569
+ ret = {}
2570
+ if json_body.nil?
2571
+ ret = {}
2572
+ else
2573
+ json_body.each do |k, v|
2574
+ ret[k] = Comet::Organization.new
2575
+ ret[k].from_hash(v)
2576
+ end
2577
+ end
2578
+ ret
2579
+ end
2580
+
2581
+ # AdminOrganizationSet
2582
+ #
2583
+ # Create or Update an Organization.
2584
+ #
2585
+ # You must supply administrator authentication credentials to use this API.
2586
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2587
+ #
2588
+ # @param [String] organization_id (Optional) (No description available)
2589
+ # @param [Comet::Organization] organization (Optional) (No description available)
2590
+ # @return [Comet::OrganizationResponse]
2591
+ def admin_organization_set(organization_id = nil, organization = nil)
2592
+ submit_params = {}
2593
+ unless organization_id.nil?
2594
+ raise TypeError, "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2595
+
2596
+ submit_params['OrganizationID'] = organization_id
2597
+ end
2598
+ unless organization.nil?
2599
+ raise TypeError, "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
2600
+
2601
+ submit_params['Organization'] = organization.to_json
2602
+ end
2603
+
2604
+ body = perform_request('api/v1/admin/organization/set', submit_params)
2605
+ json_body = JSON.parse body
2606
+ check_status json_body
2607
+ ret = Comet::OrganizationResponse.new
2608
+ ret.from_hash(json_body)
2609
+ ret
2610
+ end
2611
+
2344
2612
  # AdminPoliciesDelete
2345
2613
  #
2346
2614
  # Delete an existing policy object.
@@ -2352,11 +2620,11 @@ module Comet
2352
2620
  # @return [Comet::CometAPIResponseMessage]
2353
2621
  def admin_policies_delete(policy_id)
2354
2622
  submit_params = {}
2355
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2623
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2356
2624
 
2357
2625
  submit_params['PolicyID'] = policy_id
2358
2626
 
2359
- body = perform_request('/api/v1/admin/policies/delete', submit_params)
2627
+ body = perform_request('api/v1/admin/policies/delete', submit_params)
2360
2628
  json_body = JSON.parse body
2361
2629
  check_status json_body
2362
2630
  ret = Comet::CometAPIResponseMessage.new
@@ -2376,11 +2644,11 @@ module Comet
2376
2644
  # @return [Comet::GetGroupPolicyResponse]
2377
2645
  def admin_policies_get(policy_id)
2378
2646
  submit_params = {}
2379
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2647
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2380
2648
 
2381
2649
  submit_params['PolicyID'] = policy_id
2382
2650
 
2383
- body = perform_request('/api/v1/admin/policies/get', submit_params)
2651
+ body = perform_request('api/v1/admin/policies/get', submit_params)
2384
2652
  json_body = JSON.parse body
2385
2653
  check_status json_body
2386
2654
  ret = Comet::GetGroupPolicyResponse.new
@@ -2397,7 +2665,7 @@ module Comet
2397
2665
  #
2398
2666
  # @return [Hash{String => String}]
2399
2667
  def admin_policies_list
2400
- body = perform_request('/api/v1/admin/policies/list')
2668
+ body = perform_request('api/v1/admin/policies/list')
2401
2669
  json_body = JSON.parse body
2402
2670
  check_status json_body
2403
2671
  ret = {}
@@ -2405,7 +2673,7 @@ module Comet
2405
2673
  ret = {}
2406
2674
  else
2407
2675
  json_body.each do |k, v|
2408
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2676
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2409
2677
 
2410
2678
  ret[k] = v
2411
2679
  end
@@ -2422,7 +2690,7 @@ module Comet
2422
2690
  #
2423
2691
  # @return [Hash{String => Comet::GroupPolicy}]
2424
2692
  def admin_policies_list_full
2425
- body = perform_request('/api/v1/admin/policies/list-full')
2693
+ body = perform_request('api/v1/admin/policies/list-full')
2426
2694
  json_body = JSON.parse body
2427
2695
  check_status json_body
2428
2696
  ret = {}
@@ -2448,11 +2716,11 @@ module Comet
2448
2716
  # @return [Comet::CreateGroupPolicyResponse]
2449
2717
  def admin_policies_new(policy)
2450
2718
  submit_params = {}
2451
- raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2719
+ raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2452
2720
 
2453
2721
  submit_params['Policy'] = policy.to_json
2454
2722
 
2455
- body = perform_request('/api/v1/admin/policies/new', submit_params)
2723
+ body = perform_request('api/v1/admin/policies/new', submit_params)
2456
2724
  json_body = JSON.parse body
2457
2725
  check_status json_body
2458
2726
  ret = Comet::CreateGroupPolicyResponse.new
@@ -2475,19 +2743,19 @@ module Comet
2475
2743
  # @return [Comet::CometAPIResponseMessage]
2476
2744
  def admin_policies_set(policy_id, policy, check_policy_hash = nil)
2477
2745
  submit_params = {}
2478
- raise TypeError "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2746
+ raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
2479
2747
 
2480
2748
  submit_params['PolicyID'] = policy_id
2481
- raise TypeError "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2749
+ raise TypeError, "'policy' expected Comet::GroupPolicy, got #{policy.class}" unless policy.is_a? Comet::GroupPolicy
2482
2750
 
2483
2751
  submit_params['Policy'] = policy.to_json
2484
2752
  unless check_policy_hash.nil?
2485
- raise TypeError "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
2753
+ raise TypeError, "'check_policy_hash' expected String, got #{check_policy_hash.class}" unless check_policy_hash.is_a? String
2486
2754
 
2487
2755
  submit_params['CheckPolicyHash'] = check_policy_hash
2488
2756
  end
2489
2757
 
2490
- body = perform_request('/api/v1/admin/policies/set', submit_params)
2758
+ body = perform_request('api/v1/admin/policies/set', submit_params)
2491
2759
  json_body = JSON.parse body
2492
2760
  check_status json_body
2493
2761
  ret = Comet::CometAPIResponseMessage.new
@@ -2508,19 +2776,19 @@ module Comet
2508
2776
  # @return [Comet::EmailReportGeneratedPreview]
2509
2777
  def admin_preview_user_email_report(target_user, email_report_config, email_address = nil)
2510
2778
  submit_params = {}
2511
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2779
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2512
2780
 
2513
2781
  submit_params['TargetUser'] = target_user
2514
- raise TypeError "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
2782
+ raise TypeError, "'email_report_config' expected Comet::EmailReportConfig, got #{email_report_config.class}" unless email_report_config.is_a? Comet::EmailReportConfig
2515
2783
 
2516
2784
  submit_params['EmailReportConfig'] = email_report_config.to_json
2517
2785
  unless email_address.nil?
2518
- raise TypeError "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
2786
+ raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
2519
2787
 
2520
2788
  submit_params['EmailAddress'] = email_address
2521
2789
  end
2522
2790
 
2523
- body = perform_request('/api/v1/admin/preview-user-email-report', submit_params)
2791
+ body = perform_request('api/v1/admin/preview-user-email-report', submit_params)
2524
2792
  json_body = JSON.parse body
2525
2793
  check_status json_body
2526
2794
  ret = Comet::EmailReportGeneratedPreview.new
@@ -2533,10 +2801,11 @@ module Comet
2533
2801
  # Get Replication status.
2534
2802
  #
2535
2803
  # You must supply administrator authentication credentials to use this API.
2804
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2536
2805
  #
2537
2806
  # @return [Array<Comet::ReplicatorStateAPIResponse>]
2538
2807
  def admin_replication_state
2539
- body = perform_request('/api/v1/admin/replication/state')
2808
+ body = perform_request('api/v1/admin/replication/state')
2540
2809
  json_body = JSON.parse body
2541
2810
  check_status json_body
2542
2811
  if json_body.nil?
@@ -2566,21 +2835,21 @@ module Comet
2566
2835
  # @return [Comet::RequestStorageVaultResponseMessage]
2567
2836
  def admin_request_storage_vault(target_user, storage_provider, self_address = nil)
2568
2837
  submit_params = {}
2569
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2838
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2570
2839
 
2571
2840
  submit_params['TargetUser'] = target_user
2572
- raise TypeError "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
2841
+ raise TypeError, "'storage_provider' expected String, got #{storage_provider.class}" unless storage_provider.is_a? String
2573
2842
 
2574
2843
  submit_params['StorageProvider'] = storage_provider
2575
2844
  if self_address.nil?
2576
2845
  submit_params['SelfAddress'] = @server_address
2577
2846
  else
2578
- raise TypeError "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
2847
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
2579
2848
 
2580
2849
  submit_params['SelfAddress'] = self_address
2581
2850
  end
2582
2851
 
2583
- body = perform_request('/api/v1/admin/request-storage-vault', submit_params)
2852
+ body = perform_request('api/v1/admin/request-storage-vault', submit_params)
2584
2853
  json_body = JSON.parse body
2585
2854
  check_status json_body
2586
2855
  ret = Comet::RequestStorageVaultResponseMessage.new
@@ -2597,7 +2866,7 @@ module Comet
2597
2866
  #
2598
2867
  # @return [Hash{String => String}]
2599
2868
  def admin_request_storage_vault_providers
2600
- body = perform_request('/api/v1/admin/request-storage-vault-providers')
2869
+ body = perform_request('api/v1/admin/request-storage-vault-providers')
2601
2870
  json_body = JSON.parse body
2602
2871
  check_status json_body
2603
2872
  ret = {}
@@ -2605,7 +2874,7 @@ module Comet
2605
2874
  ret = {}
2606
2875
  else
2607
2876
  json_body.each do |k, v|
2608
- raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
2877
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
2609
2878
 
2610
2879
  ret[k] = v
2611
2880
  end
@@ -2627,17 +2896,17 @@ module Comet
2627
2896
  # @return [Comet::CometAPIResponseMessage]
2628
2897
  def admin_reset_user_password(target_user, new_password, old_password)
2629
2898
  submit_params = {}
2630
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2899
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2631
2900
 
2632
2901
  submit_params['TargetUser'] = target_user
2633
- raise TypeError "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
2902
+ raise TypeError, "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
2634
2903
 
2635
2904
  submit_params['NewPassword'] = new_password
2636
- raise TypeError "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
2905
+ raise TypeError, "'old_password' expected String, got #{old_password.class}" unless old_password.is_a? String
2637
2906
 
2638
2907
  submit_params['OldPassword'] = old_password
2639
2908
 
2640
- body = perform_request('/api/v1/admin/reset-user-password', submit_params)
2909
+ body = perform_request('api/v1/admin/reset-user-password', submit_params)
2641
2910
  json_body = JSON.parse body
2642
2911
  check_status json_body
2643
2912
  ret = Comet::CometAPIResponseMessage.new
@@ -2658,14 +2927,14 @@ module Comet
2658
2927
  # @return [Comet::CometAPIResponseMessage]
2659
2928
  def admin_revoke_device(target_user, target_device)
2660
2929
  submit_params = {}
2661
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2930
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2662
2931
 
2663
2932
  submit_params['TargetUser'] = target_user
2664
- raise TypeError "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
2933
+ raise TypeError, "'target_device' expected String, got #{target_device.class}" unless target_device.is_a? String
2665
2934
 
2666
2935
  submit_params['TargetDevice'] = target_device
2667
2936
 
2668
- body = perform_request('/api/v1/admin/revoke-device', submit_params)
2937
+ body = perform_request('api/v1/admin/revoke-device', submit_params)
2669
2938
  json_body = JSON.parse body
2670
2939
  check_status json_body
2671
2940
  ret = Comet::CometAPIResponseMessage.new
@@ -2685,14 +2954,14 @@ module Comet
2685
2954
  # @return [Comet::CometAPIResponseMessage]
2686
2955
  def admin_set_user_profile(target_user, profile_data)
2687
2956
  submit_params = {}
2688
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2957
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2689
2958
 
2690
2959
  submit_params['TargetUser'] = target_user
2691
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2960
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2692
2961
 
2693
2962
  submit_params['ProfileData'] = profile_data.to_json
2694
2963
 
2695
- body = perform_request('/api/v1/admin/set-user-profile', submit_params)
2964
+ body = perform_request('api/v1/admin/set-user-profile', submit_params)
2696
2965
  json_body = JSON.parse body
2697
2966
  check_status json_body
2698
2967
  ret = Comet::CometAPIResponseMessage.new
@@ -2715,17 +2984,17 @@ module Comet
2715
2984
  # @return [Comet::CometAPIResponseMessage]
2716
2985
  def admin_set_user_profile_hash(target_user, profile_data, require_hash)
2717
2986
  submit_params = {}
2718
- raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2987
+ raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
2719
2988
 
2720
2989
  submit_params['TargetUser'] = target_user
2721
- raise TypeError "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2990
+ raise TypeError, "'profile_data' expected Comet::UserProfileConfig, got #{profile_data.class}" unless profile_data.is_a? Comet::UserProfileConfig
2722
2991
 
2723
2992
  submit_params['ProfileData'] = profile_data.to_json
2724
- raise TypeError "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
2993
+ raise TypeError, "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
2725
2994
 
2726
2995
  submit_params['RequireHash'] = require_hash
2727
2996
 
2728
- body = perform_request('/api/v1/admin/set-user-profile-hash', submit_params)
2997
+ body = perform_request('api/v1/admin/set-user-profile-hash', submit_params)
2729
2998
  json_body = JSON.parse body
2730
2999
  check_status json_body
2731
3000
  ret = Comet::CometAPIResponseMessage.new
@@ -2733,6 +3002,36 @@ module Comet
2733
3002
  ret
2734
3003
  end
2735
3004
 
3005
+ # AdminStorageBucketProperties
3006
+ #
3007
+ # Retrieve properties for a single bucket.
3008
+ # This API can also be used to refresh the size measurement for a single bucket by passing a valid AfterTimestamp parameter.
3009
+ #
3010
+ # You must supply administrator authentication credentials to use this API.
3011
+ # This API requires the Storage Role to be enabled.
3012
+ #
3013
+ # @param [String] bucket_id Bucket ID
3014
+ # @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.
3015
+ # @return [Comet::BucketProperties]
3016
+ def admin_storage_bucket_properties(bucket_id, after_timestamp = nil)
3017
+ submit_params = {}
3018
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3019
+
3020
+ submit_params['BucketID'] = bucket_id
3021
+ unless after_timestamp.nil?
3022
+ raise TypeError, "'after_timestamp' expected Numeric, got #{after_timestamp.class}" unless after_timestamp.is_a? Numeric
3023
+
3024
+ submit_params['AfterTimestamp'] = after_timestamp
3025
+ end
3026
+
3027
+ body = perform_request('api/v1/admin/storage/bucket-properties', submit_params)
3028
+ json_body = JSON.parse body
3029
+ check_status json_body
3030
+ ret = Comet::BucketProperties.new
3031
+ ret.from_hash(json_body)
3032
+ ret
3033
+ end
3034
+
2736
3035
  # AdminStorageDeleteBucket
2737
3036
  #
2738
3037
  # Delete a bucket.
@@ -2745,11 +3044,11 @@ module Comet
2745
3044
  # @return [Comet::CometAPIResponseMessage]
2746
3045
  def admin_storage_delete_bucket(bucket_id)
2747
3046
  submit_params = {}
2748
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3047
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2749
3048
 
2750
3049
  submit_params['BucketID'] = bucket_id
2751
3050
 
2752
- body = perform_request('/api/v1/admin/storage/delete-bucket', submit_params)
3051
+ body = perform_request('api/v1/admin/storage/delete-bucket', submit_params)
2753
3052
  json_body = JSON.parse body
2754
3053
  check_status json_body
2755
3054
  ret = Comet::CometAPIResponseMessage.new
@@ -2764,16 +3063,19 @@ module Comet
2764
3063
  # You must supply administrator authentication credentials to use this API.
2765
3064
  # Access to this API may be prevented on a per-administrator basis.
2766
3065
  # This API requires the Storage Role to be enabled.
3066
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2767
3067
  #
2768
- # @param [String] bucket_id Selected bucket name
3068
+ # @param [String] bucket_id (Optional) (This parameter is not used)
2769
3069
  # @return [Comet::StorageFreeSpaceInfo]
2770
- def admin_storage_free_space(bucket_id)
3070
+ def admin_storage_free_space(bucket_id = nil)
2771
3071
  submit_params = {}
2772
- raise TypeError "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
3072
+ unless bucket_id.nil?
3073
+ raise TypeError, "'bucket_id' expected String, got #{bucket_id.class}" unless bucket_id.is_a? String
2773
3074
 
2774
- submit_params['BucketID'] = bucket_id
3075
+ submit_params['BucketID'] = bucket_id
3076
+ end
2775
3077
 
2776
- body = perform_request('/api/v1/admin/storage/free-space', submit_params)
3078
+ body = perform_request('api/v1/admin/storage/free-space', submit_params)
2777
3079
  json_body = JSON.parse body
2778
3080
  check_status json_body
2779
3081
  ret = Comet::StorageFreeSpaceInfo.new
@@ -2790,7 +3092,7 @@ module Comet
2790
3092
  #
2791
3093
  # @return [Hash{String => Comet::BucketProperties}]
2792
3094
  def admin_storage_list_buckets
2793
- body = perform_request('/api/v1/admin/storage/list-buckets')
3095
+ body = perform_request('api/v1/admin/storage/list-buckets')
2794
3096
  json_body = JSON.parse body
2795
3097
  check_status json_body
2796
3098
  ret = {}
@@ -2817,26 +3119,32 @@ module Comet
2817
3119
  # @param [String] set_bucket_value (Optional) Bucket ID
2818
3120
  # @param [String] set_key_hash_format (Optional) Bucket key hashing format
2819
3121
  # @param [String] set_key_hash_value (Optional) Bucket key hash
3122
+ # @param [String] set_organization_id (Optional) Target organization ID (>= 20.9.0)
2820
3123
  # @return [Comet::AddBucketResponseMessage]
2821
- def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil)
3124
+ def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil, set_organization_id = nil)
2822
3125
  submit_params = {}
2823
3126
  unless set_bucket_value.nil?
2824
- raise TypeError "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
3127
+ raise TypeError, "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
2825
3128
 
2826
3129
  submit_params['SetBucketValue'] = set_bucket_value
2827
3130
  end
2828
3131
  unless set_key_hash_format.nil?
2829
- raise TypeError "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
3132
+ raise TypeError, "'set_key_hash_format' expected String, got #{set_key_hash_format.class}" unless set_key_hash_format.is_a? String
2830
3133
 
2831
3134
  submit_params['SetKeyHashFormat'] = set_key_hash_format
2832
3135
  end
2833
3136
  unless set_key_hash_value.nil?
2834
- raise TypeError "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
3137
+ raise TypeError, "'set_key_hash_value' expected String, got #{set_key_hash_value.class}" unless set_key_hash_value.is_a? String
2835
3138
 
2836
3139
  submit_params['SetKeyHashValue'] = set_key_hash_value
2837
3140
  end
3141
+ unless set_organization_id.nil?
3142
+ raise TypeError, "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String
2838
3143
 
2839
- body = perform_request('/api/v1/admin/storage/register-bucket', submit_params)
3144
+ submit_params['SetOrganizationID'] = set_organization_id
3145
+ end
3146
+
3147
+ body = perform_request('api/v1/admin/storage/register-bucket', submit_params)
2840
3148
  json_body = JSON.parse body
2841
3149
  check_status json_body
2842
3150
  ret = Comet::AddBucketResponseMessage.new
@@ -2849,6 +3157,7 @@ module Comet
2849
3157
  # Start a new software update campaign.
2850
3158
  #
2851
3159
  # You must supply administrator authentication credentials to use this API.
3160
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2852
3161
  # This API requires the Software Build Role to be enabled.
2853
3162
  # This API requires the Auth Role to be enabled.
2854
3163
  #
@@ -2856,11 +3165,11 @@ module Comet
2856
3165
  # @return [Comet::CometAPIResponseMessage]
2857
3166
  def admin_update_campaign_start(options)
2858
3167
  submit_params = {}
2859
- raise TypeError "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
3168
+ raise TypeError, "'options' expected Comet::UpdateCampaignOptions, got #{options.class}" unless options.is_a? Comet::UpdateCampaignOptions
2860
3169
 
2861
3170
  submit_params['Options'] = options.to_json
2862
3171
 
2863
- body = perform_request('/api/v1/admin/update-campaign/start', submit_params)
3172
+ body = perform_request('api/v1/admin/update-campaign/start', submit_params)
2864
3173
  json_body = JSON.parse body
2865
3174
  check_status json_body
2866
3175
  ret = Comet::CometAPIResponseMessage.new
@@ -2873,12 +3182,13 @@ module Comet
2873
3182
  # Get current campaign status.
2874
3183
  #
2875
3184
  # You must supply administrator authentication credentials to use this API.
3185
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2876
3186
  # This API requires the Software Build Role to be enabled.
2877
3187
  # This API requires the Auth Role to be enabled.
2878
3188
  #
2879
3189
  # @return [Comet::UpdateCampaignStatus]
2880
3190
  def admin_update_campaign_status
2881
- body = perform_request('/api/v1/admin/update-campaign/status')
3191
+ body = perform_request('api/v1/admin/update-campaign/status')
2882
3192
  json_body = JSON.parse body
2883
3193
  check_status json_body
2884
3194
  ret = Comet::UpdateCampaignStatus.new
@@ -2894,7 +3204,7 @@ module Comet
2894
3204
  #
2895
3205
  # @return [Comet::SessionKeyRegeneratedResponse]
2896
3206
  def hybrid_session_start
2897
- body = perform_request('/api/v1/hybrid/session/start')
3207
+ body = perform_request('api/v1/hybrid/session/start')
2898
3208
  json_body = JSON.parse body
2899
3209
  check_status json_body
2900
3210
  ret = Comet::SessionKeyRegeneratedResponse.new
@@ -2911,7 +3221,7 @@ module Comet
2911
3221
  #
2912
3222
  # @return [Comet::CometAPIResponseMessage]
2913
3223
  def user_web_session_revoke
2914
- body = perform_request('/api/v1/user/web/session/revoke')
3224
+ body = perform_request('api/v1/user/web/session/revoke')
2915
3225
  json_body = JSON.parse body
2916
3226
  check_status json_body
2917
3227
  ret = Comet::CometAPIResponseMessage.new
@@ -2928,7 +3238,7 @@ module Comet
2928
3238
  #
2929
3239
  # @return [Comet::SessionKeyRegeneratedResponse]
2930
3240
  def user_web_session_start
2931
- body = perform_request('/api/v1/user/web/session/start')
3241
+ body = perform_request('api/v1/user/web/session/start')
2932
3242
  json_body = JSON.parse body
2933
3243
  check_status json_body
2934
3244
  ret = Comet::SessionKeyRegeneratedResponse.new
@@ -2969,6 +3279,35 @@ module Comet
2969
3279
 
2970
3280
  res.body
2971
3281
  end
3282
+
3283
+ # Perform a synchronous HTTP request, using multipart/form-data.
3284
+ #
3285
+ # @param [String] endpoint The URL suffix
3286
+ # @param [Hash<String,String>] params Form post parameters to submit to the target API
3287
+ # @return [String] Response body
3288
+ def perform_request_multipart(endpoint, params = {})
3289
+ full_uri = URI(@server_address + endpoint)
3290
+
3291
+ req = Net::HTTP::Post.new(full_uri)
3292
+ req['X-Comet-Admin-Username'] = @username
3293
+ req['X-Comet-Admin-AuthType'] = 'Password'
3294
+ req['X-Comet-Admin-Password'] = @password
3295
+
3296
+ form_params = []
3297
+ params.each do |k, v|
3298
+ form_params.append [k, v, {:filename => k}]
3299
+ end
3300
+ req.set_form(form_params, 'multipart/form-data')
3301
+
3302
+ http = Net::HTTP.new(full_uri.hostname, full_uri.port)
3303
+ res = http.request(req)
3304
+
3305
+ unless res.is_a?(Net::HTTPSuccess)
3306
+ raise res
3307
+ end
3308
+
3309
+ res.body
3310
+ end
2972
3311
  end
2973
3312
 
2974
3313
  end