comet_backup_ruby_sdk 2.43.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +0 -0
- data/CHANGELOG.md +35 -0
- data/Gemfile +0 -0
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/RELEASING.md +7 -7
- data/Rakefile +0 -0
- data/comet_backup_ruby_sdk.gemspec +2 -3
- data/lib/comet/api_response_error.rb +1 -1
- data/lib/comet/comet_server.rb +824 -90
- data/lib/comet/definitions.rb +409 -125
- data/lib/comet/models/add_bucket_response_message.rb +1 -1
- data/lib/comet/models/admin_account_apitoken_create_response.rb +102 -0
- data/lib/comet/models/admin_account_apitoken_list_response.rb +98 -0
- data/lib/comet/models/admin_account_properties_response.rb +38 -1
- data/lib/comet/models/admin_apitoken.rb +139 -0
- data/lib/comet/models/admin_apitoken_info.rb +117 -0
- data/lib/comet/models/admin_email_options.rb +1 -1
- data/lib/comet/models/admin_options.rb +1 -1
- data/lib/comet/models/admin_resource_response.rb +1 -1
- data/lib/comet/models/admin_security_options.rb +1 -1
- data/lib/comet/models/admin_u2fregistration.rb +1 -1
- data/lib/comet/models/admin_user_permissions.rb +20 -1
- data/lib/comet/models/admin_web_authn_registration.rb +1 -1
- data/lib/comet/models/allowed_admin_user.rb +19 -1
- data/lib/comet/models/amazon_awsvirtual_storage_role_settings.rb +1 -1
- data/lib/comet/models/attributed_content_measurement.rb +146 -0
- data/lib/comet/models/attributed_content_measurement_component.rb +105 -0
- data/lib/comet/models/authentication_role_options.rb +2 -4
- data/lib/comet/models/available_download.rb +1 -1
- data/lib/comet/models/azure_destination_location.rb +1 -1
- data/lib/comet/models/b2destination_location.rb +1 -1
- data/lib/comet/models/b2storage_extra_info.rb +1 -1
- data/lib/comet/models/b2transaction_totals.rb +1 -1
- data/lib/comet/models/b2virtual_storage_role_settings.rb +1 -1
- data/lib/comet/models/backup_job_advanced_options.rb +15 -1
- data/lib/comet/models/backup_job_detail.rb +14 -2
- data/lib/comet/models/backup_job_progress.rb +1 -1
- data/lib/comet/models/backup_rule_config.rb +43 -1
- data/lib/comet/models/backup_rule_event_triggers.rb +1 -1
- data/lib/comet/models/branding_options.rb +184 -1
- data/lib/comet/models/branding_properties.rb +184 -1
- data/lib/comet/models/browse_disk_drives_response.rb +1 -1
- data/lib/comet/models/browse_edbresponse.rb +1 -1
- data/lib/comet/models/browse_hvresponse.rb +1 -1
- data/lib/comet/models/browse_office_365list_virtual_accounts_response.rb +1 -1
- data/lib/comet/models/browse_office_365objects_response.rb +1 -1
- data/lib/comet/models/browse_proxmox_nodes_response.rb +1 -1
- data/lib/comet/models/browse_proxmox_response.rb +16 -1
- data/lib/comet/models/browse_proxmox_storage_response.rb +1 -1
- data/lib/comet/models/browse_sqlserver_response.rb +1 -1
- data/lib/comet/models/browse_vmware_datacenters_response.rb +1 -1
- data/lib/comet/models/browse_vmware_datastores_response.rb +1 -1
- data/lib/comet/models/browse_vmware_hosts_response.rb +1 -1
- data/lib/comet/models/browse_vmware_networks_response.rb +1 -1
- data/lib/comet/models/browse_vmware_response.rb +1 -1
- data/lib/comet/models/browse_vssresponse.rb +1 -1
- data/lib/comet/models/bucket_properties.rb +1 -1
- data/lib/comet/models/bucket_usage_info.rb +1 -1
- data/lib/comet/models/comet_apiresponse_message.rb +1 -1
- data/lib/comet/models/comet_destination_location.rb +1 -1
- data/lib/comet/models/constellation_check_report.rb +1 -1
- data/lib/comet/models/constellation_role_options.rb +1 -1
- data/lib/comet/models/constellation_stats.rb +1 -1
- data/lib/comet/models/constellation_status_apiresponse.rb +1 -1
- data/lib/comet/models/content_measurement.rb +1 -1
- data/lib/comet/models/content_measurement_component.rb +3 -3
- data/lib/comet/models/count_jobs_response.rb +1 -1
- data/lib/comet/models/create_group_policy_response.rb +1 -1
- data/lib/comet/models/create_user_group_response.rb +1 -1
- data/lib/comet/models/custom_branding_item.rb +143 -0
- data/lib/comet/models/custom_branding_options.rb +79 -0
- data/lib/comet/models/custom_branding_origin.rb +76 -0
- data/lib/comet/models/custom_remote_bucket_settings.rb +1 -1
- data/lib/comet/models/days_of_week_config.rb +1 -1
- data/lib/comet/models/default_email_report_policy.rb +1 -1
- data/lib/comet/models/default_source_with_osrestriction.rb +1 -1
- data/lib/comet/models/destination_config.rb +43 -5
- data/lib/comet/models/destination_location.rb +11 -2
- data/lib/comet/models/destination_statistics.rb +1 -1
- data/lib/comet/models/device_config.rb +42 -1
- data/lib/comet/models/device_identity_response.rb +82 -0
- data/lib/comet/models/disk_drive.rb +1 -1
- data/lib/comet/models/dispatch_with_job_idresponse.rb +1 -1
- data/lib/comet/models/dispatcher_admin_sources_response.rb +1 -1
- data/lib/comet/models/dispatcher_list_snapshot_virtual_machines_response.rb +1 -1
- data/lib/comet/models/dispatcher_stored_objects_response.rb +1 -1
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +1 -1
- data/lib/comet/models/dispatcher_windisk_snapshot_response.rb +1 -1
- data/lib/comet/models/dnscache_options.rb +94 -0
- data/lib/comet/models/edbfile_info.rb +1 -1
- data/lib/comet/models/email_options.rb +14 -1
- data/lib/comet/models/email_report_config.rb +15 -1
- data/lib/comet/models/email_report_generated_preview.rb +1 -1
- data/lib/comet/models/email_reporting_option.rb +1 -1
- data/lib/comet/models/external_authentication_source.rb +1 -1
- data/lib/comet/models/external_authentication_source_display.rb +1 -1
- data/lib/comet/models/external_authentication_source_response.rb +1 -1
- data/lib/comet/models/external_ldapauthentication_source_server.rb +1 -1
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +1 -1
- data/lib/comet/models/extra_file_exclusion.rb +1 -1
- data/lib/comet/models/file_option.rb +1 -1
- data/lib/comet/models/ftpdestination_location.rb +1 -1
- data/lib/comet/models/get_group_policy_response.rb +1 -1
- data/lib/comet/models/get_profile_and_hash_response_message.rb +1 -1
- data/lib/comet/models/get_profile_hash_response_message.rb +1 -1
- data/lib/comet/models/get_shared_storage_quota_response.rb +110 -0
- data/lib/comet/models/get_user_group_response.rb +1 -1
- data/lib/comet/models/get_user_group_with_users_response.rb +1 -1
- data/lib/comet/models/global_override_options.rb +1 -1
- data/lib/comet/models/group_policy.rb +1 -1
- data/lib/comet/models/hour_sched_config.rb +1 -1
- data/lib/comet/models/httpconnector_options.rb +1 -1
- data/lib/comet/models/hyper_vmachine_info.rb +1 -1
- data/lib/comet/models/hyper_vrestore_target_options.rb +1 -1
- data/lib/comet/models/impossible_cloud_iamtemplate_settings.rb +1 -1
- data/lib/comet/models/impossible_cloud_partner_template_settings.rb +1 -1
- data/lib/comet/models/install_creds.rb +1 -1
- data/lib/comet/models/install_token.rb +8 -8
- data/lib/comet/models/install_token_response.rb +1 -1
- data/lib/comet/models/job_entry.rb +1 -1
- data/lib/comet/models/license_limits.rb +1 -1
- data/lib/comet/models/license_options.rb +1 -1
- data/lib/comet/models/linux_rpm_code_sign_properties.rb +115 -0
- data/lib/comet/models/list_shared_storage_quota_response.rb +98 -0
- data/lib/comet/models/live_user_connection.rb +1 -1
- data/lib/comet/models/local_destination_location.rb +2 -2
- data/lib/comet/models/local_storage_directory.rb +1 -1
- data/lib/comet/models/login_protection_options.rb +1 -1
- data/lib/comet/models/mac_oscode_sign_properties.rb +1 -1
- data/lib/comet/models/mongo_dbconnection.rb +4 -1
- data/lib/comet/models/mssqlconnection.rb +1 -1
- data/lib/comet/models/mssqllogin_args.rb +1 -1
- data/lib/comet/models/my_sqlconnection.rb +1 -1
- data/lib/comet/models/new_bucket_detail.rb +1 -1
- data/lib/comet/models/news_entry.rb +1 -1
- data/lib/comet/models/nfsdestination_location.rb +132 -0
- data/lib/comet/models/ninja_one_auth_callback_response.rb +82 -0
- data/lib/comet/models/ninja_one_config.rb +130 -0
- data/lib/comet/models/ninja_one_organization.rb +91 -0
- data/lib/comet/models/node.rb +80 -0
- data/lib/comet/models/object_lock_storage_template_settings.rb +1 -1
- data/lib/comet/models/office_365connection.rb +1 -1
- data/lib/comet/models/office_365convert_selection_response.rb +102 -0
- data/lib/comet/models/office_365credential.rb +1 -1
- data/lib/comet/models/office_365custom_setting.rb +1 -1
- data/lib/comet/models/office_365custom_setting_v2.rb +23 -1
- data/lib/comet/models/office_365effective_selection.rb +109 -0
- data/lib/comet/models/office_365effective_selection_account.rb +101 -0
- data/lib/comet/models/office_365evaluate_selection_rules_response.rb +95 -0
- data/lib/comet/models/office_365mixed_virtual_account.rb +1 -1
- data/lib/comet/models/office_365object_info.rb +1 -1
- data/lib/comet/models/office_365selection_rule.rb +182 -0
- data/lib/comet/models/office_365service_rule_decision.rb +93 -0
- data/lib/comet/models/oidc_claim.rb +1 -1
- data/lib/comet/models/oidc_config.rb +1 -1
- data/lib/comet/models/organization.rb +1 -1
- data/lib/comet/models/organization_login_urlresponse.rb +1 -1
- data/lib/comet/models/organization_response.rb +1 -1
- data/lib/comet/models/osinfo.rb +1 -1
- data/lib/comet/models/partition.rb +1 -1
- data/lib/comet/models/partition_conflict.rb +1 -1
- data/lib/comet/models/pkcs_11allowed_driver.rb +75 -0
- data/lib/comet/models/pkcs_11allowlist_options.rb +90 -0
- data/lib/comet/models/policy_options.rb +1 -1
- data/lib/comet/models/postgre_sqlconnection.rb +151 -0
- data/lib/comet/models/private_branding_properties.rb +184 -1
- data/lib/comet/models/protected_item_engine_type_policy.rb +1 -1
- data/lib/comet/models/protected_item_with_backup_rules_response.rb +1 -1
- data/lib/comet/models/proxmox_connection.rb +1 -1
- data/lib/comet/models/proxmox_restore_target_options.rb +1 -1
- data/lib/comet/models/psaconfig.rb +26 -1
- data/lib/comet/models/psaconfig_connect_wise.rb +130 -0
- data/lib/comet/models/psagrouped_by.rb +1 -1
- data/lib/comet/models/public_branding_properties.rb +1 -1
- data/lib/comet/models/pvebackup_disk.rb +1 -1
- data/lib/comet/models/pvebackup_node.rb +1 -1
- data/lib/comet/models/pvebackup_vm.rb +1 -1
- data/lib/comet/models/pvedisk.rb +1 -1
- data/lib/comet/models/pveparams.rb +2 -4
- data/lib/comet/models/pvestorage_name.rb +17 -1
- data/lib/comet/models/pvevm.rb +8 -1
- data/lib/comet/models/ratelimit_options.rb +1 -1
- data/lib/comet/models/ratelimit_rule.rb +1 -1
- data/lib/comet/models/register_office_application_begin_response.rb +1 -1
- data/lib/comet/models/register_office_application_check_response.rb +1 -1
- data/lib/comet/models/registration_lobby_connection.rb +1 -1
- data/lib/comet/models/remote_server_address.rb +1 -1
- data/lib/comet/models/remote_storage_option.rb +10 -1
- data/lib/comet/models/replica_server.rb +1 -1
- data/lib/comet/models/replicator_state_apiresponse.rb +1 -1
- data/lib/comet/models/request_storage_vault_response_message.rb +1 -1
- data/lib/comet/models/restore_job_advanced_options.rb +66 -10
- data/lib/comet/models/retention_policy.rb +1 -1
- data/lib/comet/models/retention_range.rb +1 -1
- data/lib/comet/models/s3destination_location.rb +1 -1
- data/lib/comet/models/s3generic_virtual_storage_role.rb +1 -1
- data/lib/comet/models/schedule_config.rb +1 -1
- data/lib/comet/models/search_clause.rb +1 -1
- data/lib/comet/models/search_result_file_info.rb +1 -1
- data/lib/comet/models/search_snapshots_response.rb +1 -1
- data/lib/comet/models/self_backup_event_data.rb +135 -0
- data/lib/comet/models/self_backup_export_options.rb +1 -1
- data/lib/comet/models/self_backup_options.rb +1 -1
- data/lib/comet/models/self_backup_statistics.rb +1 -1
- data/lib/comet/models/self_backup_target.rb +1 -1
- data/lib/comet/models/server_config_options.rb +76 -1
- data/lib/comet/models/server_config_options_and_hash_response.rb +103 -0
- data/lib/comet/models/server_config_options_branding_fragment.rb +1 -1
- data/lib/comet/models/server_config_options_hash_response.rb +95 -0
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +1 -1
- data/lib/comet/models/server_meta_branding_properties.rb +20 -1
- data/lib/comet/models/server_meta_version_info.rb +1 -1
- data/lib/comet/models/session_key_regenerated_response.rb +1 -1
- data/lib/comet/models/session_options.rb +1 -1
- data/lib/comet/models/set_shared_storage_quota_response.rb +92 -0
- data/lib/comet/models/sftpdestination_location.rb +1 -1
- data/lib/comet/models/shared_storage_quota.rb +94 -0
- data/lib/comet/models/single_field_source.rb +2 -2
- data/lib/comet/models/size_measurement.rb +1 -1
- data/lib/comet/models/smbdestination_location.rb +1 -1
- data/lib/comet/models/smtpoauth_options.rb +154 -0
- data/lib/comet/models/software_build_role_options.rb +1 -1
- data/lib/comet/models/software_update_news_response.rb +1 -1
- data/lib/comet/models/source_basic_info.rb +10 -1
- data/lib/comet/models/source_config.rb +69 -4
- data/lib/comet/models/source_include_pattern.rb +1 -1
- data/lib/comet/models/source_statistics.rb +1 -1
- data/lib/comet/models/spanned_destination_location.rb +1 -1
- data/lib/comet/models/spanned_storage_extra_info.rb +1 -1
- data/lib/comet/models/speed_limit_time_window.rb +114 -0
- data/lib/comet/models/sshconnection.rb +1 -1
- data/lib/comet/models/stat_result.rb +1 -1
- data/lib/comet/models/storage_free_space_info.rb +1 -1
- data/lib/comet/models/storage_role_options.rb +1 -1
- data/lib/comet/models/storage_vault_provider_policy.rb +1 -1
- data/lib/comet/models/stored_object.rb +1 -1
- data/lib/comet/models/storj_destination_location.rb +1 -1
- data/lib/comet/models/storj_virtual_storage_role_setting.rb +1 -1
- data/lib/comet/models/streamable_event.rb +1 -1
- data/lib/comet/models/swift_destination_location.rb +1 -1
- data/lib/comet/models/test_response.rb +1 -1
- data/lib/comet/models/time_span.rb +1 -1
- data/lib/comet/models/totp_regenerated_response.rb +1 -1
- data/lib/comet/models/u2fregister_request.rb +1 -1
- data/lib/comet/models/u2fregistered_key.rb +1 -1
- data/lib/comet/models/u2fregistration_challenge_response.rb +1 -1
- data/lib/comet/models/u2fsign_request.rb +1 -1
- data/lib/comet/models/u2fsign_response.rb +1 -1
- data/lib/comet/models/uninstall_config.rb +1 -1
- data/lib/comet/models/update_campaign_device_status.rb +9 -1
- data/lib/comet/models/update_campaign_options.rb +1 -1
- data/lib/comet/models/update_campaign_properties.rb +1 -1
- data/lib/comet/models/update_campaign_skip_detail.rb +100 -0
- data/lib/comet/models/update_campaign_status.rb +1 -1
- data/lib/comet/models/update_campaign_status_device_entry.rb +9 -1
- data/lib/comet/models/user_custom_email_settings.rb +1 -1
- data/lib/comet/models/user_group.rb +1 -1
- data/lib/comet/models/user_on_server.rb +1 -1
- data/lib/comet/models/user_policy.rb +18 -1
- data/lib/comet/models/user_profile_config.rb +82 -8
- data/lib/comet/models/user_profile_fragment.rb +1 -1
- data/lib/comet/models/user_server_config.rb +1 -1
- data/lib/comet/models/vault_snapshot.rb +1 -1
- data/lib/comet/models/vmdisk_info.rb +1 -1
- data/lib/comet/models/vmdksnapshot_view_options.rb +1 -1
- data/lib/comet/models/vminfo.rb +1 -1
- data/lib/comet/models/vminfo_list.rb +1 -1
- data/lib/comet/models/vmware_connection.rb +1 -1
- data/lib/comet/models/vmware_datacenter_info.rb +1 -1
- data/lib/comet/models/vmware_datastore_info.rb +1 -1
- data/lib/comet/models/vmware_host_info.rb +1 -1
- data/lib/comet/models/vmware_machine_info.rb +1 -1
- data/lib/comet/models/vmware_network_info.rb +1 -1
- data/lib/comet/models/vmware_restore_target_options.rb +1 -1
- data/lib/comet/models/vsphere_connection.rb +1 -1
- data/lib/comet/models/vsscomponent.rb +1 -1
- data/lib/comet/models/vsswriter_info.rb +1 -1
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +1 -1
- data/lib/comet/models/web_authn_authenticator_selection.rb +1 -1
- data/lib/comet/models/web_authn_credential.rb +1 -1
- data/lib/comet/models/web_authn_credential_assertion.rb +1 -1
- data/lib/comet/models/web_authn_credential_descriptor.rb +1 -1
- data/lib/comet/models/web_authn_credential_entity.rb +1 -1
- data/lib/comet/models/web_authn_credential_parameter.rb +1 -1
- data/lib/comet/models/web_authn_public_key_credential_creation_options.rb +2 -4
- data/lib/comet/models/web_authn_public_key_credential_request_options.rb +1 -1
- data/lib/comet/models/web_authn_registration_challenge_response.rb +1 -1
- data/lib/comet/models/web_authn_relying_party_entity.rb +1 -1
- data/lib/comet/models/web_authn_sign_request.rb +1 -1
- data/lib/comet/models/web_authn_sign_response.rb +1 -1
- data/lib/comet/models/web_authn_user_entity.rb +1 -1
- data/lib/comet/models/web_dav_destination_location.rb +1 -1
- data/lib/comet/models/web_interface_branding_properties.rb +1 -1
- data/lib/comet/models/webhook_awsoptions.rb +96 -0
- data/lib/comet/models/webhook_option.rb +49 -2
- data/lib/comet/models/win_smbauth.rb +3 -3
- data/lib/comet/models/windows_code_sign_properties.rb +176 -1
- data/lib/comet_backup_ruby_sdk.rb +39 -1
- metadata +43 -23
- data/Gemfile.lock +0 -43
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2026 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
|
+
# SetSharedStorageQuotaResponse is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
class SetSharedStorageQuotaResponse
|
|
14
|
+
|
|
15
|
+
# If the operation was successful, the status will be in the 200-299 range.
|
|
16
|
+
# @type [Number] status
|
|
17
|
+
attr_accessor :status
|
|
18
|
+
|
|
19
|
+
# @type [String] message
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
|
|
22
|
+
# @type [String] shared_storage_quota_hash
|
|
23
|
+
attr_accessor :shared_storage_quota_hash
|
|
24
|
+
|
|
25
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
26
|
+
attr_accessor :unknown_json_fields
|
|
27
|
+
|
|
28
|
+
def initialize
|
|
29
|
+
clear
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def clear
|
|
33
|
+
@status = 0
|
|
34
|
+
@message = ''
|
|
35
|
+
@shared_storage_quota_hash = ''
|
|
36
|
+
@unknown_json_fields = {}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @param [String] json_string The complete object in JSON format
|
|
40
|
+
def from_json(json_string)
|
|
41
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
42
|
+
|
|
43
|
+
from_hash(JSON.parse(json_string))
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
47
|
+
def from_hash(obj)
|
|
48
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
49
|
+
|
|
50
|
+
obj.each do |k, v|
|
|
51
|
+
case k
|
|
52
|
+
when 'Status'
|
|
53
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
54
|
+
|
|
55
|
+
@status = v
|
|
56
|
+
when 'Message'
|
|
57
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
58
|
+
|
|
59
|
+
@message = v
|
|
60
|
+
when 'SharedStorageQuotaHash'
|
|
61
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
62
|
+
|
|
63
|
+
@shared_storage_quota_hash = v
|
|
64
|
+
else
|
|
65
|
+
@unknown_json_fields[k] = v
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
71
|
+
def to_hash
|
|
72
|
+
ret = {}
|
|
73
|
+
ret['Status'] = @status
|
|
74
|
+
ret['Message'] = @message
|
|
75
|
+
ret['SharedStorageQuotaHash'] = @shared_storage_quota_hash
|
|
76
|
+
@unknown_json_fields.each do |k, v|
|
|
77
|
+
ret[k] = v
|
|
78
|
+
end
|
|
79
|
+
ret
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
83
|
+
def to_h
|
|
84
|
+
to_hash
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# @return [String] The complete object as a JSON string
|
|
88
|
+
def to_json(options = {})
|
|
89
|
+
to_hash.to_json(options)
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2026 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
|
+
# SharedStorageQuota is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
# A SharedStorageQuota can be applied to multiple Storage Vaults in the
|
|
14
|
+
# 'DestinationConfig.StorageLimitID' field.
|
|
15
|
+
class SharedStorageQuota
|
|
16
|
+
|
|
17
|
+
# @type [String] description
|
|
18
|
+
attr_accessor :description
|
|
19
|
+
|
|
20
|
+
# @type [String] organization_id
|
|
21
|
+
attr_accessor :organization_id
|
|
22
|
+
|
|
23
|
+
# Bytes
|
|
24
|
+
# @type [Number] limit_bytes
|
|
25
|
+
attr_accessor :limit_bytes
|
|
26
|
+
|
|
27
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
28
|
+
attr_accessor :unknown_json_fields
|
|
29
|
+
|
|
30
|
+
def initialize
|
|
31
|
+
clear
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def clear
|
|
35
|
+
@description = ''
|
|
36
|
+
@organization_id = ''
|
|
37
|
+
@limit_bytes = 0
|
|
38
|
+
@unknown_json_fields = {}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# @param [String] json_string The complete object in JSON format
|
|
42
|
+
def from_json(json_string)
|
|
43
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
44
|
+
|
|
45
|
+
from_hash(JSON.parse(json_string))
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
49
|
+
def from_hash(obj)
|
|
50
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
51
|
+
|
|
52
|
+
obj.each do |k, v|
|
|
53
|
+
case k
|
|
54
|
+
when 'Description'
|
|
55
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
56
|
+
|
|
57
|
+
@description = v
|
|
58
|
+
when 'OrganizationID'
|
|
59
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
60
|
+
|
|
61
|
+
@organization_id = v
|
|
62
|
+
when 'LimitBytes'
|
|
63
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
64
|
+
|
|
65
|
+
@limit_bytes = v
|
|
66
|
+
else
|
|
67
|
+
@unknown_json_fields[k] = v
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
73
|
+
def to_hash
|
|
74
|
+
ret = {}
|
|
75
|
+
ret['Description'] = @description
|
|
76
|
+
ret['OrganizationID'] = @organization_id
|
|
77
|
+
ret['LimitBytes'] = @limit_bytes
|
|
78
|
+
@unknown_json_fields.each do |k, v|
|
|
79
|
+
ret[k] = v
|
|
80
|
+
end
|
|
81
|
+
ret
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
85
|
+
def to_h
|
|
86
|
+
to_hash
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @return [String] The complete object as a JSON string
|
|
90
|
+
def to_json(options = {})
|
|
91
|
+
to_hash.to_json(options)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2026 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -15,7 +15,7 @@ module Comet
|
|
|
15
15
|
# @type [String] field_name
|
|
16
16
|
attr_accessor :field_name
|
|
17
17
|
|
|
18
|
-
# One of
|
|
18
|
+
# One of the SOURCEFIELD_ constants
|
|
19
19
|
# @type [String] field_type
|
|
20
20
|
attr_accessor :field_type
|
|
21
21
|
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2026 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
|
+
# SMTPOAuthOptions is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
class SMTPOAuthOptions
|
|
14
|
+
|
|
15
|
+
# One of the SMTP_OAUTH_PROVIDER_ constants
|
|
16
|
+
# @type [Number] provider
|
|
17
|
+
attr_accessor :provider
|
|
18
|
+
|
|
19
|
+
# One of the SMTP_OAUTH_FLOW_ constants
|
|
20
|
+
# @type [Number] flow
|
|
21
|
+
attr_accessor :flow
|
|
22
|
+
|
|
23
|
+
# For SMTP_OAUTH_PROVIDER_MICROSOFT, the directory (tenant) ID or verified domain of the app
|
|
24
|
+
# registration
|
|
25
|
+
# @type [String] tenant_id
|
|
26
|
+
attr_accessor :tenant_id
|
|
27
|
+
|
|
28
|
+
# The OAuth 2.0 client ID of the customer-owned app registration
|
|
29
|
+
# @type [String] client_id
|
|
30
|
+
attr_accessor :client_id
|
|
31
|
+
|
|
32
|
+
# The OAuth 2.0 client secret of the customer-owned app registration
|
|
33
|
+
# @type [String] client_secret
|
|
34
|
+
attr_accessor :client_secret
|
|
35
|
+
|
|
36
|
+
# One of the ENCRYPTIONMETHOD_ constants
|
|
37
|
+
# @type [Number] client_secret_format
|
|
38
|
+
attr_accessor :client_secret_format
|
|
39
|
+
|
|
40
|
+
# For SMTP_OAUTH_FLOW_AUTHORIZATION_CODE, the refresh token returned by the
|
|
41
|
+
# AdminMetaEmailOptionsOauthCallback API
|
|
42
|
+
# @type [String] refresh_token
|
|
43
|
+
attr_accessor :refresh_token
|
|
44
|
+
|
|
45
|
+
# One of the ENCRYPTIONMETHOD_ constants
|
|
46
|
+
# @type [Number] refresh_token_format
|
|
47
|
+
attr_accessor :refresh_token_format
|
|
48
|
+
|
|
49
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
50
|
+
attr_accessor :unknown_json_fields
|
|
51
|
+
|
|
52
|
+
def initialize
|
|
53
|
+
clear
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def clear
|
|
57
|
+
@provider = 0
|
|
58
|
+
@flow = 0
|
|
59
|
+
@tenant_id = ''
|
|
60
|
+
@client_id = ''
|
|
61
|
+
@client_secret = ''
|
|
62
|
+
@client_secret_format = 0
|
|
63
|
+
@refresh_token = ''
|
|
64
|
+
@refresh_token_format = 0
|
|
65
|
+
@unknown_json_fields = {}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# @param [String] json_string The complete object in JSON format
|
|
69
|
+
def from_json(json_string)
|
|
70
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
71
|
+
|
|
72
|
+
from_hash(JSON.parse(json_string))
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
76
|
+
def from_hash(obj)
|
|
77
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
78
|
+
|
|
79
|
+
obj.each do |k, v|
|
|
80
|
+
case k
|
|
81
|
+
when 'Provider'
|
|
82
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
83
|
+
|
|
84
|
+
@provider = v
|
|
85
|
+
when 'Flow'
|
|
86
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
87
|
+
|
|
88
|
+
@flow = v
|
|
89
|
+
when 'TenantID'
|
|
90
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
91
|
+
|
|
92
|
+
@tenant_id = v
|
|
93
|
+
when 'ClientID'
|
|
94
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
95
|
+
|
|
96
|
+
@client_id = v
|
|
97
|
+
when 'ClientSecret'
|
|
98
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
99
|
+
|
|
100
|
+
@client_secret = v
|
|
101
|
+
when 'ClientSecretFormat'
|
|
102
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
103
|
+
|
|
104
|
+
@client_secret_format = v
|
|
105
|
+
when 'RefreshToken'
|
|
106
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
107
|
+
|
|
108
|
+
@refresh_token = v
|
|
109
|
+
when 'RefreshTokenFormat'
|
|
110
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
111
|
+
|
|
112
|
+
@refresh_token_format = v
|
|
113
|
+
else
|
|
114
|
+
@unknown_json_fields[k] = v
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
120
|
+
def to_hash
|
|
121
|
+
ret = {}
|
|
122
|
+
ret['Provider'] = @provider
|
|
123
|
+
ret['Flow'] = @flow
|
|
124
|
+
unless @tenant_id.nil?
|
|
125
|
+
ret['TenantID'] = @tenant_id
|
|
126
|
+
end
|
|
127
|
+
ret['ClientID'] = @client_id
|
|
128
|
+
ret['ClientSecret'] = @client_secret
|
|
129
|
+
unless @client_secret_format.nil?
|
|
130
|
+
ret['ClientSecretFormat'] = @client_secret_format
|
|
131
|
+
end
|
|
132
|
+
unless @refresh_token.nil?
|
|
133
|
+
ret['RefreshToken'] = @refresh_token
|
|
134
|
+
end
|
|
135
|
+
unless @refresh_token_format.nil?
|
|
136
|
+
ret['RefreshTokenFormat'] = @refresh_token_format
|
|
137
|
+
end
|
|
138
|
+
@unknown_json_fields.each do |k, v|
|
|
139
|
+
ret[k] = v
|
|
140
|
+
end
|
|
141
|
+
ret
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
145
|
+
def to_h
|
|
146
|
+
to_hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @return [String] The complete object as a JSON string
|
|
150
|
+
def to_json(options = {})
|
|
151
|
+
to_hash.to_json(options)
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2026 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -26,6 +26,9 @@ module Comet
|
|
|
26
26
|
# @type [Number] total_vm_count
|
|
27
27
|
attr_accessor :total_vm_count
|
|
28
28
|
|
|
29
|
+
# @type [Number] total_lxc_count
|
|
30
|
+
attr_accessor :total_lxc_count
|
|
31
|
+
|
|
29
32
|
# Bytes
|
|
30
33
|
# @type [Number] size
|
|
31
34
|
attr_accessor :size
|
|
@@ -45,6 +48,7 @@ module Comet
|
|
|
45
48
|
@description = ''
|
|
46
49
|
@o365account_count = 0
|
|
47
50
|
@total_vm_count = 0
|
|
51
|
+
@total_lxc_count = 0
|
|
48
52
|
@size = 0
|
|
49
53
|
@override_destination_retention = {}
|
|
50
54
|
@unknown_json_fields = {}
|
|
@@ -79,6 +83,10 @@ module Comet
|
|
|
79
83
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
80
84
|
|
|
81
85
|
@total_vm_count = v
|
|
86
|
+
when 'TotalLxcCount'
|
|
87
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
88
|
+
|
|
89
|
+
@total_lxc_count = v
|
|
82
90
|
when 'Size'
|
|
83
91
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
84
92
|
|
|
@@ -106,6 +114,7 @@ module Comet
|
|
|
106
114
|
ret['Description'] = @description
|
|
107
115
|
ret['O365AccountCount'] = @o365account_count
|
|
108
116
|
ret['TotalVmCount'] = @total_vm_count
|
|
117
|
+
ret['TotalLxcCount'] = @total_lxc_count
|
|
109
118
|
ret['Size'] = @size
|
|
110
119
|
unless @override_destination_retention.nil?
|
|
111
120
|
ret['OverrideDestinationRetention'] = @override_destination_retention
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2026 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -95,6 +95,73 @@ module Comet
|
|
|
95
95
|
# - SAVEAS: The virtual filename inside the backup snapshot
|
|
96
96
|
# - Any key starting with EXTRACOMMAND- : Additional commands to run. Each value should be a JSON
|
|
97
97
|
# array of 3 strings, equivalent to the COMMAND, WORKDIR, SAVEAS values.
|
|
98
|
+
#
|
|
99
|
+
# For engine1/mysql, Comet understands the following EngineProp keys:
|
|
100
|
+
#
|
|
101
|
+
# - USERNAME: The username to connect to the MySQL server
|
|
102
|
+
# - PASSWORD: The password to connect to the MySQL server
|
|
103
|
+
# - HOST: The hostname or IP address of the MySQL server
|
|
104
|
+
# - PORT: The TCP port of the MySQL server. If not present, defaults to 3306
|
|
105
|
+
# - USE_TLS: If set to "1", connect using TLS
|
|
106
|
+
# - TLS_SKIP_VERIFY: If set to "1" and USE_TLS is set, skip verifying the server certificate
|
|
107
|
+
# - TLS_CUSTOM_SERVER_CA_PATH: Path to a custom CA file or directory for verifying the server
|
|
108
|
+
# certificate
|
|
109
|
+
# - TLS_CUSTOM_CLIENT_CRT_PATH: Path to a client TLS certificate file
|
|
110
|
+
# - TLS_CUSTOM_CLIENT_KEY_PATH: Path to a client TLS private key file
|
|
111
|
+
# - MYSQLDUMP: Path to a custom mysqldump binary, or "$internal$" to force the internal
|
|
112
|
+
# implementation. If not present, autodiscover a mysqldump binary and fall back to the internal
|
|
113
|
+
# implementation
|
|
114
|
+
# - ISOLATION_MODE: One of "ST" (single transaction), "FL" (lock tables), or "UNSAFE". If not
|
|
115
|
+
# present, defaults to "ST"
|
|
116
|
+
# - EXTRA_PARAMS: Extra space-separated arguments to pass to mysqldump
|
|
117
|
+
# - ALL_DATABASES: If present, include all databases with specified exclusions. If not present, only
|
|
118
|
+
# back up the specified inclusions
|
|
119
|
+
# - Any key starting with DATABASE: A database that is included. Only valid if ALL_DATABASES is not
|
|
120
|
+
# present.
|
|
121
|
+
# - Any key starting with EXCEPT-DATABASE: A database that is excluded. Only valid if ALL_DATABASES
|
|
122
|
+
# is present.
|
|
123
|
+
# - METADATA_FILE: Path to a local file whose content will be stored in the backup snapshot under
|
|
124
|
+
# the reserved ".metadata" filename. The file is read at backup time on the device. Restore jobs of
|
|
125
|
+
# type RESTORETYPE_MYSQL skip this stream; it can be retrieved with a file restore. If not present,
|
|
126
|
+
# no metadata stream is added
|
|
127
|
+
# - INCLUDE_USERS_GRANTS: Optional. If set to "1", additionally capture the MySQL server's user
|
|
128
|
+
# accounts and their privilege grants as a generated SQL script, stored in the backup snapshot under
|
|
129
|
+
# the reserved ".users-grants.sql" filename. Requires the connecting MySQL user to have privileges
|
|
130
|
+
# to read the grant tables. Restore jobs of type RESTORETYPE_MYSQL skip this stream; it can be
|
|
131
|
+
# retrieved with a file restore. If not present, or set to any other value, no users-and-grants
|
|
132
|
+
# stream is added
|
|
133
|
+
#
|
|
134
|
+
# For engine1/postgresql, Comet understands the following EngineProp keys:
|
|
135
|
+
#
|
|
136
|
+
# - USERNAME: The username to connect to the PostgreSQL server
|
|
137
|
+
# - PASSWORD: The password to connect to the PostgreSQL server
|
|
138
|
+
# - HOST: The hostname or IP address of the PostgreSQL server
|
|
139
|
+
# - PORT: The TCP port of the PostgreSQL server. If not present, defaults to 5432
|
|
140
|
+
# - CONNECT_DATABASE: The database to connect to in order to list databases. If not present,
|
|
141
|
+
# defaults to "postgres"
|
|
142
|
+
# - USE_TLS: If set to "1", connect using TLS
|
|
143
|
+
# - TLS_SKIP_VERIFY: If set to "1" and USE_TLS is set, skip verifying the server certificate
|
|
144
|
+
# - TLS_CUSTOM_SERVER_CA_PATH: Path to a custom CA file for verifying the server certificate
|
|
145
|
+
# - TLS_CUSTOM_CLIENT_CRT_PATH: Path to a client TLS certificate file
|
|
146
|
+
# - TLS_CUSTOM_CLIENT_KEY_PATH: Path to a client TLS private key file
|
|
147
|
+
# - PGDUMP: Path to a custom pg_dump binary. If not present, autodiscover a pg_dump binary
|
|
148
|
+
# - EXTRA_PARAMS: Extra space-separated arguments to pass to pg_dump
|
|
149
|
+
# - ALL_DATABASES: If present, include all databases with specified exclusions. If not present, only
|
|
150
|
+
# back up the specified inclusions
|
|
151
|
+
# - Any key starting with DATABASE: A database that is included. Only valid if ALL_DATABASES is not
|
|
152
|
+
# present.
|
|
153
|
+
# - Any key starting with EXCEPT-DATABASE: A database that is excluded. Only valid if ALL_DATABASES
|
|
154
|
+
# is present.
|
|
155
|
+
# - METADATA_FILE: Path to a local file whose content will be stored in the backup snapshot under
|
|
156
|
+
# the reserved ".metadata" filename. The file is read at backup time on the device. Restore jobs of
|
|
157
|
+
# type RESTORETYPE_POSTGRESQL skip this stream; it can be retrieved with a file restore. If not
|
|
158
|
+
# present, no metadata stream is added
|
|
159
|
+
# - INCLUDE_GLOBALS: Optional. If set to "1", additionally capture the PostgreSQL cluster's globals
|
|
160
|
+
# - its roles with their privileges, and its tablespaces - as a generated SQL script, stored in the
|
|
161
|
+
# backup snapshot under the reserved ".globals.sql" filename. Requires a pg_dumpall binary alongside
|
|
162
|
+
# pg_dump, and the connecting role to be a superuser in order to read the cluster catalogs. Restore
|
|
163
|
+
# jobs of type RESTORETYPE_POSTGRESQL skip this stream; it can be retrieved with a file restore and
|
|
164
|
+
# replayed by hand. If not present, or set to any other value, no globals stream is added
|
|
98
165
|
# @type [Hash{String => String}] engine_props
|
|
99
166
|
attr_accessor :engine_props
|
|
100
167
|
|
|
@@ -260,9 +327,7 @@ module Comet
|
|
|
260
327
|
unless @override_destination_retention.nil?
|
|
261
328
|
ret['OverrideDestinationRetention'] = @override_destination_retention
|
|
262
329
|
end
|
|
263
|
-
|
|
264
|
-
ret['Statistics'] = @statistics
|
|
265
|
-
end
|
|
330
|
+
ret['Statistics'] = @statistics
|
|
266
331
|
@unknown_json_fields.each do |k, v|
|
|
267
332
|
ret[k] = v
|
|
268
333
|
end
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2026 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
|
+
# SpeedLimitTimeWindow is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
# SpeedLimitTimeWindow optionally restricts the vault speed limit
|
|
14
|
+
# (BackupJobAdvancedOptions.LimitVaultSpeedBps) to a specific time of day and, optionally, certain
|
|
15
|
+
# days of the week.
|
|
16
|
+
# When RestrictTimes is set, the speed limit applies only while the current local time is inside the
|
|
17
|
+
# window; outside the window the job runs unlimited.
|
|
18
|
+
# It has no effect unless a LimitVaultSpeedBps is also set.
|
|
19
|
+
class SpeedLimitTimeWindow
|
|
20
|
+
|
|
21
|
+
# If true, LimitVaultSpeedBps only applies during the window defined below; outside it the job runs
|
|
22
|
+
# unlimited.
|
|
23
|
+
# @type [Boolean] restrict_times
|
|
24
|
+
attr_accessor :restrict_times
|
|
25
|
+
|
|
26
|
+
# The local time-of-day when the window starts.
|
|
27
|
+
# @type [Comet::HourSchedConfig] from_time
|
|
28
|
+
attr_accessor :from_time
|
|
29
|
+
|
|
30
|
+
# The local time-of-day when the window ends. If earlier than FromTime, the window wraps past
|
|
31
|
+
# midnight. If equal to FromTime, the window covers the whole day.
|
|
32
|
+
# @type [Comet::HourSchedConfig] to_time
|
|
33
|
+
attr_accessor :to_time
|
|
34
|
+
|
|
35
|
+
# If true, the window only applies on the days of the week selected in DaysSelect. If no day is
|
|
36
|
+
# selected at all, the day-of-week restriction is ignored and the window applies on every day.
|
|
37
|
+
# @type [Boolean] restrict_days
|
|
38
|
+
attr_accessor :restrict_days
|
|
39
|
+
|
|
40
|
+
# The days of the week the window applies on, when RestrictDays is true.
|
|
41
|
+
# @type [Comet::DaysOfWeekConfig] days_select
|
|
42
|
+
attr_accessor :days_select
|
|
43
|
+
|
|
44
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
45
|
+
attr_accessor :unknown_json_fields
|
|
46
|
+
|
|
47
|
+
def initialize
|
|
48
|
+
clear
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def clear
|
|
52
|
+
@from_time = Comet::HourSchedConfig.new
|
|
53
|
+
@to_time = Comet::HourSchedConfig.new
|
|
54
|
+
@days_select = Comet::DaysOfWeekConfig.new
|
|
55
|
+
@unknown_json_fields = {}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# @param [String] json_string The complete object in JSON format
|
|
59
|
+
def from_json(json_string)
|
|
60
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
61
|
+
|
|
62
|
+
from_hash(JSON.parse(json_string))
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
66
|
+
def from_hash(obj)
|
|
67
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
68
|
+
|
|
69
|
+
obj.each do |k, v|
|
|
70
|
+
case k
|
|
71
|
+
when 'RestrictTimes'
|
|
72
|
+
@restrict_times = v
|
|
73
|
+
when 'FromTime'
|
|
74
|
+
@from_time = Comet::HourSchedConfig.new
|
|
75
|
+
@from_time.from_hash(v)
|
|
76
|
+
when 'ToTime'
|
|
77
|
+
@to_time = Comet::HourSchedConfig.new
|
|
78
|
+
@to_time.from_hash(v)
|
|
79
|
+
when 'RestrictDays'
|
|
80
|
+
@restrict_days = v
|
|
81
|
+
when 'DaysSelect'
|
|
82
|
+
@days_select = Comet::DaysOfWeekConfig.new
|
|
83
|
+
@days_select.from_hash(v)
|
|
84
|
+
else
|
|
85
|
+
@unknown_json_fields[k] = v
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
91
|
+
def to_hash
|
|
92
|
+
ret = {}
|
|
93
|
+
ret['RestrictTimes'] = @restrict_times
|
|
94
|
+
ret['FromTime'] = @from_time
|
|
95
|
+
ret['ToTime'] = @to_time
|
|
96
|
+
ret['RestrictDays'] = @restrict_days
|
|
97
|
+
ret['DaysSelect'] = @days_select
|
|
98
|
+
@unknown_json_fields.each do |k, v|
|
|
99
|
+
ret[k] = v
|
|
100
|
+
end
|
|
101
|
+
ret
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
105
|
+
def to_h
|
|
106
|
+
to_hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# @return [String] The complete object as a JSON string
|
|
110
|
+
def to_json(options = {})
|
|
111
|
+
to_hash.to_json(options)
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|