comet_backup_ruby_sdk 1.15.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -1
  3. data/Gemfile +2 -4
  4. data/Gemfile.lock +1 -1
  5. data/LICENSE +0 -0
  6. data/Rakefile +2 -4
  7. data/comet_backup_ruby_sdk.gemspec +1 -1
  8. data/lib/comet/api_response_error.rb +2 -4
  9. data/lib/comet/comet_server.rb +14 -10
  10. data/lib/comet/definitions.rb +18 -8
  11. data/lib/comet/models/add_bucket_response_message.rb +2 -4
  12. data/lib/comet/models/admin_account_properties_response.rb +2 -4
  13. data/lib/comet/models/admin_email_options.rb +2 -4
  14. data/lib/comet/models/admin_resource_response.rb +2 -4
  15. data/lib/comet/models/admin_security_options.rb +2 -4
  16. data/lib/comet/models/admin_u2fregistration.rb +2 -4
  17. data/lib/comet/models/admin_user_permissions.rb +2 -4
  18. data/lib/comet/models/admin_web_authn_registration.rb +2 -4
  19. data/lib/comet/models/allowed_admin_user.rb +2 -4
  20. data/lib/comet/models/amazon_awsvirtual_storage_role_settings.rb +2 -4
  21. data/lib/comet/models/authentication_role_options.rb +139 -0
  22. data/lib/comet/models/available_download.rb +2 -4
  23. data/lib/comet/models/azure_destination_location.rb +2 -4
  24. data/lib/comet/models/b2destination_location.rb +2 -4
  25. data/lib/comet/models/b2storage_extra_info.rb +2 -4
  26. data/lib/comet/models/b2transaction_totals.rb +2 -4
  27. data/lib/comet/models/b2virtual_storage_role_settings.rb +2 -4
  28. data/lib/comet/models/backup_job_advanced_options.rb +2 -4
  29. data/lib/comet/models/backup_job_detail.rb +2 -4
  30. data/lib/comet/models/backup_job_progress.rb +2 -4
  31. data/lib/comet/models/backup_rule_config.rb +2 -4
  32. data/lib/comet/models/backup_rule_event_triggers.rb +2 -4
  33. data/lib/comet/models/branding_options.rb +11 -4
  34. data/lib/comet/models/branding_properties.rb +11 -4
  35. data/lib/comet/models/browse_disk_drives_response.rb +2 -4
  36. data/lib/comet/models/browse_edbresponse.rb +2 -4
  37. data/lib/comet/models/browse_hvresponse.rb +2 -4
  38. data/lib/comet/models/browse_office_365list_virtual_accounts_response.rb +2 -4
  39. data/lib/comet/models/browse_office_365objects_response.rb +2 -4
  40. data/lib/comet/models/browse_sqlserver_response.rb +2 -4
  41. data/lib/comet/models/browse_vssresponse.rb +2 -4
  42. data/lib/comet/models/bucket_properties.rb +2 -4
  43. data/lib/comet/models/bucket_usage_info.rb +2 -4
  44. data/lib/comet/models/comet_apiresponse_message.rb +2 -4
  45. data/lib/comet/models/comet_destination_location.rb +2 -4
  46. data/lib/comet/models/constellation_check_report.rb +2 -4
  47. data/lib/comet/models/constellation_role_options.rb +91 -0
  48. data/lib/comet/models/constellation_stats.rb +2 -4
  49. data/lib/comet/models/constellation_status_apiresponse.rb +2 -4
  50. data/lib/comet/models/content_measurement.rb +2 -4
  51. data/lib/comet/models/content_measurement_component.rb +2 -4
  52. data/lib/comet/models/create_group_policy_response.rb +2 -4
  53. data/lib/comet/models/custom_remote_bucket_settings.rb +2 -4
  54. data/lib/comet/models/days_of_week_config.rb +2 -4
  55. data/lib/comet/models/default_email_report_policy.rb +2 -4
  56. data/lib/comet/models/default_source_with_osrestriction.rb +2 -4
  57. data/lib/comet/models/destination_config.rb +2 -4
  58. data/lib/comet/models/destination_location.rb +2 -4
  59. data/lib/comet/models/destination_statistics.rb +2 -4
  60. data/lib/comet/models/device_config.rb +2 -4
  61. data/lib/comet/models/disk_drive.rb +2 -4
  62. data/lib/comet/models/dispatcher_admin_sources_response.rb +2 -4
  63. data/lib/comet/models/dispatcher_stored_objects_response.rb +2 -4
  64. data/lib/comet/models/dispatcher_vault_snapshots_response.rb +2 -4
  65. data/lib/comet/models/dispatcher_windisk_snapshot_response.rb +2 -4
  66. data/lib/comet/models/edbfile_info.rb +2 -4
  67. data/lib/comet/models/email_options.rb +2 -4
  68. data/lib/comet/models/email_report_config.rb +2 -4
  69. data/lib/comet/models/email_report_generated_preview.rb +2 -4
  70. data/lib/comet/models/external_authentication_source.rb +184 -0
  71. data/lib/comet/models/external_ldapauthentication_source_server.rb +97 -0
  72. data/lib/comet/models/external_ldapauthentication_source_settings.rb +23 -10
  73. data/lib/comet/models/extra_file_exclusion.rb +2 -4
  74. data/lib/comet/models/ftpdestination_location.rb +2 -4
  75. data/lib/comet/models/get_group_policy_response.rb +2 -4
  76. data/lib/comet/models/get_profile_and_hash_response_message.rb +2 -4
  77. data/lib/comet/models/get_profile_hash_response_message.rb +2 -4
  78. data/lib/comet/models/group_policy.rb +2 -4
  79. data/lib/comet/models/hour_sched_config.rb +2 -4
  80. data/lib/comet/models/httpconnector_options.rb +139 -0
  81. data/lib/comet/models/hyper_vmachine_info.rb +2 -4
  82. data/lib/comet/models/install_creds.rb +2 -4
  83. data/lib/comet/models/install_token.rb +2 -4
  84. data/lib/comet/models/install_token_response.rb +2 -4
  85. data/lib/comet/models/job_entry.rb +2 -4
  86. data/lib/comet/models/license_options.rb +84 -0
  87. data/lib/comet/models/live_user_connection.rb +2 -4
  88. data/lib/comet/models/local_destination_location.rb +2 -4
  89. data/lib/comet/models/local_storage_directory.rb +73 -0
  90. data/lib/comet/models/mac_oscode_sign_properties.rb +2 -4
  91. data/lib/comet/models/mongo_dbconnection.rb +2 -4
  92. data/lib/comet/models/mssqlconnection.rb +2 -4
  93. data/lib/comet/models/my_sqlconnection.rb +2 -4
  94. data/lib/comet/models/new_bucket_detail.rb +2 -4
  95. data/lib/comet/models/news_entry.rb +2 -4
  96. data/lib/comet/models/office_365connection.rb +2 -4
  97. data/lib/comet/models/office_365credential.rb +2 -4
  98. data/lib/comet/models/office_365custom_setting.rb +2 -4
  99. data/lib/comet/models/office_365custom_setting_v2.rb +2 -4
  100. data/lib/comet/models/office_365mixed_virtual_account.rb +2 -4
  101. data/lib/comet/models/office_365object_info.rb +2 -4
  102. data/lib/comet/models/organization.rb +5 -7
  103. data/lib/comet/models/organization_response.rb +2 -4
  104. data/lib/comet/models/osinfo.rb +2 -4
  105. data/lib/comet/models/partition.rb +2 -4
  106. data/lib/comet/models/private_branding_properties.rb +11 -4
  107. data/lib/comet/models/protected_item_engine_type_policy.rb +2 -4
  108. data/lib/comet/models/public_branding_properties.rb +2 -4
  109. data/lib/comet/models/ratelimit_options.rb +81 -0
  110. data/lib/comet/models/ratelimit_rule.rb +82 -0
  111. data/lib/comet/models/register_office_application_begin_response.rb +2 -4
  112. data/lib/comet/models/register_office_application_check_response.rb +2 -4
  113. data/lib/comet/models/remote_server_address.rb +2 -4
  114. data/lib/comet/models/remote_storage_option.rb +2 -4
  115. data/lib/comet/models/replica_server.rb +187 -0
  116. data/lib/comet/models/replicator_state_apiresponse.rb +2 -4
  117. data/lib/comet/models/request_storage_vault_response_message.rb +2 -4
  118. data/lib/comet/models/restore_job_advanced_options.rb +2 -4
  119. data/lib/comet/models/retention_policy.rb +2 -4
  120. data/lib/comet/models/retention_range.rb +2 -4
  121. data/lib/comet/models/s3destination_location.rb +2 -4
  122. data/lib/comet/models/s3generic_virtual_storage_role.rb +2 -4
  123. data/lib/comet/models/schedule_config.rb +13 -4
  124. data/lib/comet/models/search_clause.rb +2 -4
  125. data/lib/comet/models/self_backup_options.rb +79 -0
  126. data/lib/comet/models/self_backup_statistics.rb +2 -4
  127. data/lib/comet/models/self_backup_target.rb +137 -0
  128. data/lib/comet/models/server_config_options.rb +253 -0
  129. data/lib/comet/models/server_config_options_branding_fragment.rb +2 -4
  130. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +2 -4
  131. data/lib/comet/models/server_meta_branding_properties.rb +2 -4
  132. data/lib/comet/models/server_meta_version_info.rb +2 -4
  133. data/lib/comet/models/session_key_regenerated_response.rb +2 -4
  134. data/lib/comet/models/session_options.rb +73 -0
  135. data/lib/comet/models/sftpdestination_location.rb +2 -4
  136. data/lib/comet/models/size_measurement.rb +2 -4
  137. data/lib/comet/models/software_build_role_options.rb +2 -4
  138. data/lib/comet/models/software_update_news_response.rb +2 -4
  139. data/lib/comet/models/source_basic_info.rb +2 -4
  140. data/lib/comet/models/source_config.rb +2 -4
  141. data/lib/comet/models/source_include_pattern.rb +2 -4
  142. data/lib/comet/models/source_statistics.rb +2 -4
  143. data/lib/comet/models/spanned_destination_location.rb +2 -4
  144. data/lib/comet/models/spanned_storage_extra_info.rb +2 -4
  145. data/lib/comet/models/sshconnection.rb +2 -4
  146. data/lib/comet/models/stat_result.rb +2 -4
  147. data/lib/comet/models/storage_free_space_info.rb +2 -4
  148. data/lib/comet/models/storage_role_options.rb +110 -0
  149. data/lib/comet/models/storage_vault_provider_policy.rb +2 -4
  150. data/lib/comet/models/stored_object.rb +2 -4
  151. data/lib/comet/models/streamable_event.rb +2 -4
  152. data/lib/comet/models/swift_destination_location.rb +2 -4
  153. data/lib/comet/models/test_response.rb +2 -4
  154. data/lib/comet/models/totp_regenerated_response.rb +2 -4
  155. data/lib/comet/models/u2fregister_request.rb +2 -4
  156. data/lib/comet/models/u2fregistered_key.rb +2 -4
  157. data/lib/comet/models/u2fregistration_challenge_response.rb +2 -4
  158. data/lib/comet/models/u2fsign_request.rb +2 -4
  159. data/lib/comet/models/u2fsign_response.rb +2 -4
  160. data/lib/comet/models/uninstall_config.rb +2 -4
  161. data/lib/comet/models/update_campaign_device_status.rb +2 -4
  162. data/lib/comet/models/update_campaign_options.rb +4 -6
  163. data/lib/comet/models/update_campaign_properties.rb +2 -4
  164. data/lib/comet/models/update_campaign_status.rb +2 -4
  165. data/lib/comet/models/update_campaign_status_device_entry.rb +2 -4
  166. data/lib/comet/models/user_custom_email_settings.rb +2 -4
  167. data/lib/comet/models/user_on_server.rb +2 -4
  168. data/lib/comet/models/user_policy.rb +2 -4
  169. data/lib/comet/models/user_profile_config.rb +2 -4
  170. data/lib/comet/models/user_profile_fragment.rb +2 -4
  171. data/lib/comet/models/vault_snapshot.rb +2 -4
  172. data/lib/comet/models/vmdksnapshot_view_options.rb +2 -4
  173. data/lib/comet/models/vsscomponent.rb +2 -4
  174. data/lib/comet/models/vsswriter_info.rb +2 -4
  175. data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +2 -4
  176. data/lib/comet/models/web_authn_authenticator_selection.rb +2 -4
  177. data/lib/comet/models/web_authn_credential.rb +2 -4
  178. data/lib/comet/models/web_authn_credential_assertion.rb +2 -4
  179. data/lib/comet/models/web_authn_credential_descriptor.rb +2 -4
  180. data/lib/comet/models/web_authn_credential_entity.rb +2 -4
  181. data/lib/comet/models/web_authn_credential_parameter.rb +2 -4
  182. data/lib/comet/models/web_authn_public_key_credential_creation_options.rb +2 -4
  183. data/lib/comet/models/web_authn_public_key_credential_request_options.rb +2 -4
  184. data/lib/comet/models/web_authn_registration_challenge_response.rb +2 -4
  185. data/lib/comet/models/web_authn_relying_party_entity.rb +2 -4
  186. data/lib/comet/models/web_authn_sign_request.rb +2 -4
  187. data/lib/comet/models/web_authn_sign_response.rb +2 -4
  188. data/lib/comet/models/web_authn_user_entity.rb +2 -4
  189. data/lib/comet/models/web_interface_branding_properties.rb +2 -4
  190. data/lib/comet/models/webhook_option.rb +2 -4
  191. data/lib/comet/models/win_smbauth.rb +2 -4
  192. data/lib/comet/models/windows_code_sign_properties.rb +2 -4
  193. data/lib/comet_backup_ruby_sdk.rb +19 -4
  194. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 856c001592ef3dad994ed3d321f8fa68e9f01829770a33117f688a4d22312801
4
- data.tar.gz: b31ac9bbebfd4b3696d079b15ede4fcab8c7a927e087f84651861714a38a8172
3
+ metadata.gz: 32e7a6800c1e43d0b3f33497694693dd69a090317a03ecee5a4ab8dcdbf3a8a5
4
+ data.tar.gz: ecbcdf90a4cf337d0f02c52c927481607611cc8f1c0c0859f2ff300e27e36a0a
5
5
  SHA512:
6
- metadata.gz: 1cf63478b5051ef36b844cbc82c8f20344e27a12e73898aec44e7f31f09a1cbd07e9d17ab58c0d1685de10716467d4643d90662208a331c0a3ec99eb0c96cfa2
7
- data.tar.gz: ee74bad01ce9338fa8536c02a38a66e9d8838b1dfe5560b1180163f978a81a75a8c438b885a95f6c4049d15cf26908ca60146b9b51689da4e5ef12f18454c24b
6
+ metadata.gz: 1d27e14ede1f37a25afb39292f5151b85822111c9222c45718e2e3fe25a6e0496d3dd0d327eff7887eebd50c3cc817bc6e68be1034963eb451081dc32cb9fad3
7
+ data.tar.gz: e76b0af2406eb542afc776130c1ae1d56e4ec6d94bca5ea4118eca1b1563a0f4b925c38ddacc686014bd19d69462da4c80a608d47c97e6de269b62b639ec019c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2022-06-28 v2.0.0
4
+ - Based on 22.6.2
5
+ - **BREAKING:** The `Organization.Email` class member is now declared as `EmailOptions` type instead of `AdminEmailOptions`. This change is fully backward-compatible on the HTTP/JSON level, but may cause issues if your application code checked this type explicitly
6
+ - **BREAKING:** The `AdminOrganizationDeleteRequest` API's response type has changed to be `APIResponseMessage`, not `OrganizationResponse`. The Comet Server API had only ever filled in the `APIResponseMessage`-compatible fields of the `OrganizationResponse` structure, so the HTTP/JSON response is unchanged, but this may cause issues if your application code checked this type explicitly
7
+ - Move `frozen_string_literal` declaration to the top line of all `*.rb` files
8
+ - "Requestable" Storage Vaults have been renamed to "Storage Templates". The API endpoint is unchanged, so this is backward-compatible with older Comet Server instances
9
+ - Document all `ServerConfigOptions` types for the `AdminMetaServerConfigSet` and `AdminMetaServerConfigGet` APIs
10
+ - Add new `FallbackServers` option for LDAP external authentication sources
11
+ - Add new `RandomDelaySecs` option for job schedules
12
+
3
13
  ## 2022-06-03 v1.15.0
4
14
  - Based on 22.5.0
5
15
  - Add `COMPRESS_*` compression settings for Self-Backups
@@ -9,7 +19,7 @@
9
19
  ## 2022-05-25 v1.14.0
10
20
  - Based on 22.3.7
11
21
  - Add new `REMOTESERVER_S3_GENERIC` `RemoteServerType`
12
- - add new `S3GenericVirtualStorageRole` support to the `RemoteServerAddress`
22
+ - Add new `S3GenericVirtualStorageRole` support to the `RemoteServerAddress`
13
23
 
14
24
  ## 2022-05-10 v1.13.0
15
25
  - Based on 22.3.5
data/Gemfile CHANGED
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  source 'https://rubygems.org'
11
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (1.14.0)
4
+ comet_backup_ruby_sdk (2.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/LICENSE CHANGED
File without changes
data/Rakefile CHANGED
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'rake/testtask'
11
9
  require 'rubocop/rake_task'
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
12
12
 
13
13
  Gem::Specification.new do |spec|
14
14
  spec.name = 'comet_backup_ruby_sdk'
15
- spec.version = '1.15.0'
15
+ spec.version = '2.0.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  module Comet
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'net/http'
11
9
  require 'json'
@@ -2192,7 +2190,9 @@ module Comet
2192
2190
  #
2193
2191
  # This API will return all jobs that either started or ended within the supplied range.
2194
2192
  #
2195
- # Incomplete jobs have an end time of `0`. You can use this API to find incomplete jobs by setting both `Start` and `End` to `0`.
2193
+ # Incomplete jobs have an end time of `0`. You can use this API to find only incomplete jobs by setting both `Start` and `End` to `0`.
2194
+ #
2195
+ # Prior to Comet Server 22.6.0, additional Incomplete jobs may have been returned if you specified non-zero arguments for both `Start` and `End`.
2196
2196
  #
2197
2197
  # You must supply administrator authentication credentials to use this API.
2198
2198
  # This API requires the Auth Role to be enabled.
@@ -2598,7 +2598,7 @@ module Comet
2598
2598
 
2599
2599
  # AdminMetaRemoteStorageVaultSet
2600
2600
  #
2601
- # Set Requestable Remote Storage Vault options.
2601
+ # Set Storage template vault options.
2602
2602
  #
2603
2603
  # You must supply administrator authentication credentials to use this API.
2604
2604
  # Access to this API may be prevented on a per-administrator basis.
@@ -2986,12 +2986,14 @@ module Comet
2986
2986
  #
2987
2987
  # Delete an organization and all related users.
2988
2988
  #
2989
+ # Prior to Comet 22.6.0, this API was documented as returning the OrganizationResponse type. However, it always has returned only a CometAPIResponseMessage.
2990
+ #
2989
2991
  # You must supply administrator authentication credentials to use this API.
2990
2992
  # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2991
2993
  #
2992
2994
  # @param [String] organization_id (Optional) (No description available)
2993
2995
  # @param [Comet::UninstallConfig] uninstall_config (Optional) Uninstall software configuration
2994
- # @return [Comet::OrganizationResponse]
2996
+ # @return [Comet::CometAPIResponseMessage]
2995
2997
  def admin_organization_delete(organization_id = nil, uninstall_config = nil)
2996
2998
  submit_params = {}
2997
2999
  unless organization_id.nil?
@@ -3008,7 +3010,7 @@ module Comet
3008
3010
  body = perform_request('api/v1/admin/organization/delete', submit_params)
3009
3011
  json_body = JSON.parse body
3010
3012
  check_status json_body
3011
- ret = Comet::OrganizationResponse.new
3013
+ ret = Comet::CometAPIResponseMessage.new
3012
3014
  ret.from_hash(json_body)
3013
3015
  ret
3014
3016
  end
@@ -3041,6 +3043,8 @@ module Comet
3041
3043
  #
3042
3044
  # Create or Update an Organization.
3043
3045
  #
3046
+ # Prior to Comet 22.6.0, the 'ID' and 'Organization' fields were not present in the response.
3047
+ #
3044
3048
  # You must supply administrator authentication credentials to use this API.
3045
3049
  # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3046
3050
  #
@@ -3308,7 +3312,7 @@ module Comet
3308
3312
  # This API requires the Auth Role to be enabled.
3309
3313
  #
3310
3314
  # @param [String] target_user The user to receive the new Storage Vault
3311
- # @param [String] storage_provider ID for the Requestable destination
3315
+ # @param [String] storage_provider ID for the storage template destination
3312
3316
  # @param [String] self_address (Optional) The external URL for this server. Used to resolve conflicts
3313
3317
  # @return [Comet::RequestStorageVaultResponseMessage]
3314
3318
  def admin_request_storage_vault(target_user, storage_provider, self_address = nil)
@@ -3342,7 +3346,7 @@ module Comet
3342
3346
  # You must supply administrator authentication credentials to use this API.
3343
3347
  # This API requires the Auth Role to be enabled.
3344
3348
  #
3345
- # @param [String] target_organization (Optional) If present, list the requestable Storage Vault options belonging to another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)
3349
+ # @param [String] target_organization (Optional) If present, list the storage template options belonging to another organization. Only allowed for administrator accounts in the top-level organization. (>= 22.3.7)
3346
3350
  # @return [Hash{String => String}]
3347
3351
  def admin_request_storage_vault_providers(target_organization = nil)
3348
3352
  submit_params = {}
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  module Comet
11
9
 
@@ -322,6 +320,9 @@ module Comet
322
320
 
323
321
  SCHEDULE_FREQUENCY_HIGHEST = 8015
324
322
 
323
+ # Maximum random delay (5 hours)
324
+ SCHEDULE_MAX_RANDOM_DELAY_SECS = 18_000
325
+
325
326
  # 2^50 (1 << 50)
326
327
  SCHEDULE_MAXINT = 1_125_899_906_842_624
327
328
 
@@ -468,15 +469,15 @@ module Comet
468
469
 
469
470
  DEFAULT_TIMEZONE = 'UTC'
470
471
 
471
- APPLICATION_VERSION = '22.5.0'
472
+ APPLICATION_VERSION = '22.6.3'
472
473
 
473
474
  APPLICATION_VERSION_MAJOR = 22
474
475
 
475
- APPLICATION_VERSION_MINOR = 5
476
+ APPLICATION_VERSION_MINOR = 6
476
477
 
477
- APPLICATION_VERSION_REVISION = 0
478
+ APPLICATION_VERSION_REVISION = 3
478
479
 
479
- RELEASE_CODENAME = 'Lysithea'
480
+ RELEASE_CODENAME = 'Voyager'
480
481
 
481
482
  ENCRYPTIONMETHOD_UNCONFIGURED = 0
482
483
 
@@ -661,10 +662,13 @@ module Comet
661
662
  # RemoteServerType:
662
663
  REMOTESERVER_AWS = 'aws'
663
664
 
665
+ # LDAPSecurityMethod:
664
666
  LDAPSECURITYMETHOD_PLAIN = 'plain'
665
667
 
668
+ # LDAPSecurityMethod:
666
669
  LDAPSECURITYMETHOD_LDAPS = 'ldaps'
667
670
 
671
+ # LDAPSecurityMethod:
668
672
  LDAPSECURITYMETHOD_STARTTLS = 'starttls'
669
673
 
670
674
  # MacOSCodesignLevel:
@@ -676,6 +680,12 @@ module Comet
676
680
  # MacOSCodesignLevel:
677
681
  MACOSCODESIGN_LEVEL_SIGN_NOTARISE_STAPLE = 2
678
682
 
683
+ # ClientBrandingBuildMode: Public-Doc: The software client will be custom-built by this Comet Server, allowing custom branding, default server URL, and codesigning.
684
+ CLIENTBRANDINGBUILD_CUSTOM = 0
685
+
686
+ # ClientBrandingBuildMode: Public-Doc: A pre-built software client will be served, with Comet-branding, no server URL, and Comet codesigning.
687
+ CLIENTBRANDINGBUILD_PREBUILT = 1
688
+
679
689
  # StreamableEventType:
680
690
  SEVT__MIN = 4000
681
691
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'base64'
11
9
  require 'json'
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'base64'
11
9
  require 'json'
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -0,0 +1,139 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
+ # Please see the LICENSE file for usage information.
5
+ #
6
+ # SPDX-License-Identifier: MIT
7
+
8
+ require 'json'
9
+
10
+ module Comet
11
+
12
+ # AuthenticationRoleOptions is a typed class wrapper around the underlying Comet Server API data structure.
13
+ class AuthenticationRoleOptions
14
+
15
+ # @type [Boolean] role_enabled
16
+ attr_accessor :role_enabled
17
+
18
+ # @type [Number] database_check_level
19
+ attr_accessor :database_check_level
20
+
21
+ # @type [Boolean] generate_missed_backup_events
22
+ attr_accessor :generate_missed_backup_events
23
+
24
+ # @type [Number] no_missed_backup_events_before
25
+ attr_accessor :no_missed_backup_events_before
26
+
27
+ # @type [Boolean] generate_scheduled_emails
28
+ attr_accessor :generate_scheduled_emails
29
+
30
+ # @type [Number] prune_logs_after_days
31
+ attr_accessor :prune_logs_after_days
32
+
33
+ # @type [Array<Comet::RemoteStorageOption>] remote_storage
34
+ attr_accessor :remote_storage
35
+
36
+ # @type [Array<Comet::ReplicaServer>] replicate_to
37
+ attr_accessor :replicate_to
38
+
39
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
40
+ attr_accessor :unknown_json_fields
41
+
42
+ def initialize
43
+ clear
44
+ end
45
+
46
+ def clear
47
+ @database_check_level = 0
48
+ @no_missed_backup_events_before = 0
49
+ @prune_logs_after_days = 0
50
+ @remote_storage = []
51
+ @replicate_to = []
52
+ @unknown_json_fields = {}
53
+ end
54
+
55
+ # @param [String] json_string The complete object in JSON format
56
+ def from_json(json_string)
57
+ raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
58
+
59
+ from_hash(JSON.parse(json_string))
60
+ end
61
+
62
+ # @param [Hash] obj The complete object as a Ruby hash
63
+ def from_hash(obj)
64
+ raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
65
+
66
+ obj.each do |k, v|
67
+ case k
68
+ when 'RoleEnabled'
69
+ @role_enabled = v
70
+ when 'DatabaseCheckLevel'
71
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
72
+
73
+ @database_check_level = v
74
+ when 'GenerateMissedBackupEvents'
75
+ @generate_missed_backup_events = v
76
+ when 'NoMissedBackupEventsBefore'
77
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
78
+
79
+ @no_missed_backup_events_before = v
80
+ when 'GenerateScheduledEmails'
81
+ @generate_scheduled_emails = v
82
+ when 'PruneLogsAfterDays'
83
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
84
+
85
+ @prune_logs_after_days = v
86
+ when 'RemoteStorage'
87
+ if v.nil?
88
+ @remote_storage = []
89
+ else
90
+ @remote_storage = Array.new(v.length)
91
+ v.each_with_index do |v1, i1|
92
+ @remote_storage[i1] = Comet::RemoteStorageOption.new
93
+ @remote_storage[i1].from_hash(v1)
94
+ end
95
+ end
96
+ when 'ReplicateTo'
97
+ if v.nil?
98
+ @replicate_to = []
99
+ else
100
+ @replicate_to = Array.new(v.length)
101
+ v.each_with_index do |v1, i1|
102
+ @replicate_to[i1] = Comet::ReplicaServer.new
103
+ @replicate_to[i1].from_hash(v1)
104
+ end
105
+ end
106
+ else
107
+ @unknown_json_fields[k] = v
108
+ end
109
+ end
110
+ end
111
+
112
+ # @return [Hash] The complete object as a Ruby hash
113
+ def to_hash
114
+ ret = {}
115
+ ret['RoleEnabled'] = @role_enabled
116
+ ret['DatabaseCheckLevel'] = @database_check_level
117
+ ret['GenerateMissedBackupEvents'] = @generate_missed_backup_events
118
+ ret['NoMissedBackupEventsBefore'] = @no_missed_backup_events_before
119
+ ret['GenerateScheduledEmails'] = @generate_scheduled_emails
120
+ ret['PruneLogsAfterDays'] = @prune_logs_after_days
121
+ ret['RemoteStorage'] = @remote_storage
122
+ ret['ReplicateTo'] = @replicate_to
123
+ @unknown_json_fields.each do |k, v|
124
+ ret[k] = v
125
+ end
126
+ ret
127
+ end
128
+
129
+ # @return [Hash] The complete object as a Ruby hash
130
+ def to_h
131
+ to_hash
132
+ end
133
+
134
+ # @return [String] The complete object as a JSON string
135
+ def to_json(options = {})
136
+ to_hash.to_json(options)
137
+ end
138
+ end
139
+ end
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9
 
@@ -1,11 +1,9 @@
1
- #!/usr/bin/env ruby --enable-frozen-string-literal
2
- #
1
+ # frozen_string_literal: true
2
+
3
3
  # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
7
- #
8
- # frozen_string_literal: true
9
7
 
10
8
  require 'json'
11
9