comet_backup_ruby_sdk 2.44.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 +29 -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 +724 -90
- data/lib/comet/definitions.rb +400 -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 +32 -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 +1 -1
- 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 +1 -1
- 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 +1 -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 +1 -1
- data/lib/comet/models/sftpdestination_location.rb +1 -1
- data/lib/comet/models/shared_storage_quota.rb +1 -1
- 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 +35 -1
- metadata +39 -23
- data/Gemfile.lock +0 -43
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
# AttributedContentMeasurement is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
class AttributedContentMeasurement
|
|
14
|
+
|
|
15
|
+
# Unix timestamp in seconds
|
|
16
|
+
# @type [Number] measure_started
|
|
17
|
+
attr_accessor :measure_started
|
|
18
|
+
|
|
19
|
+
# Unix timestamp in seconds
|
|
20
|
+
# @type [Number] measure_completed
|
|
21
|
+
attr_accessor :measure_completed
|
|
22
|
+
|
|
23
|
+
# @type [Array<Comet::AttributedContentMeasurementComponent>] components
|
|
24
|
+
attr_accessor :components
|
|
25
|
+
|
|
26
|
+
# Display names for the item segments that appear in the Components' UsedBy paths, deduplicated. The
|
|
27
|
+
# key is the "<EngineType>:<type>:<id>" segment token; the value is a human-readable name (e.g. a
|
|
28
|
+
# SharePoint site display name). A consumer can render the item tree offline from the paths and
|
|
29
|
+
# these names without a separate catalog lookup.
|
|
30
|
+
# @type [Hash{String => String}] display_names
|
|
31
|
+
attr_accessor :display_names
|
|
32
|
+
|
|
33
|
+
# The number of data chunks that could not be located in the Storage Vault index during measurement.
|
|
34
|
+
# A non-zero value means the measurement may under-attribute: per-item byte figures are an
|
|
35
|
+
# undercount, and a pack whose references all missed is bucketed as unreferenced rather than under
|
|
36
|
+
# its true source. Consumers that require exact source-level parity MUST discard a measurement with
|
|
37
|
+
# a non-zero value and remeasure later.
|
|
38
|
+
# @type [Number] lookup_misses
|
|
39
|
+
attr_accessor :lookup_misses
|
|
40
|
+
|
|
41
|
+
# The number of data chunks that were found in more than one pack during measurement (a transient
|
|
42
|
+
# duplicate pending cleanup). The index cannot say which physical copy existing snapshots reference,
|
|
43
|
+
# so component byte totals may shift between packs. Consumers that require exact source-level parity
|
|
44
|
+
# MUST discard a measurement with a non-zero value and remeasure later.
|
|
45
|
+
# @type [Number] ambiguous_blobs
|
|
46
|
+
attr_accessor :ambiguous_blobs
|
|
47
|
+
|
|
48
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
49
|
+
attr_accessor :unknown_json_fields
|
|
50
|
+
|
|
51
|
+
def initialize
|
|
52
|
+
clear
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def clear
|
|
56
|
+
@measure_started = 0
|
|
57
|
+
@measure_completed = 0
|
|
58
|
+
@components = []
|
|
59
|
+
@display_names = {}
|
|
60
|
+
@lookup_misses = 0
|
|
61
|
+
@ambiguous_blobs = 0
|
|
62
|
+
@unknown_json_fields = {}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# @param [String] json_string The complete object in JSON format
|
|
66
|
+
def from_json(json_string)
|
|
67
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
68
|
+
|
|
69
|
+
from_hash(JSON.parse(json_string))
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
73
|
+
def from_hash(obj)
|
|
74
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
75
|
+
|
|
76
|
+
obj.each do |k, v|
|
|
77
|
+
case k
|
|
78
|
+
when 'MeasureStarted'
|
|
79
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
80
|
+
|
|
81
|
+
@measure_started = v
|
|
82
|
+
when 'MeasureCompleted'
|
|
83
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
84
|
+
|
|
85
|
+
@measure_completed = v
|
|
86
|
+
when 'Components'
|
|
87
|
+
if v.nil?
|
|
88
|
+
@components = []
|
|
89
|
+
else
|
|
90
|
+
@components = Array.new(v.length)
|
|
91
|
+
v.each_with_index do |v1, i1|
|
|
92
|
+
@components[i1] = Comet::AttributedContentMeasurementComponent.new
|
|
93
|
+
@components[i1].from_hash(v1)
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
when 'DisplayNames'
|
|
97
|
+
@display_names = {}
|
|
98
|
+
if v.nil?
|
|
99
|
+
@display_names = {}
|
|
100
|
+
else
|
|
101
|
+
v.each do |k1, v1|
|
|
102
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
|
103
|
+
|
|
104
|
+
@display_names[k1] = v1
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
when 'LookupMisses'
|
|
108
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
109
|
+
|
|
110
|
+
@lookup_misses = v
|
|
111
|
+
when 'AmbiguousBlobs'
|
|
112
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
113
|
+
|
|
114
|
+
@ambiguous_blobs = v
|
|
115
|
+
else
|
|
116
|
+
@unknown_json_fields[k] = v
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
122
|
+
def to_hash
|
|
123
|
+
ret = {}
|
|
124
|
+
ret['MeasureStarted'] = @measure_started
|
|
125
|
+
ret['MeasureCompleted'] = @measure_completed
|
|
126
|
+
ret['Components'] = @components
|
|
127
|
+
ret['DisplayNames'] = @display_names
|
|
128
|
+
ret['LookupMisses'] = @lookup_misses
|
|
129
|
+
ret['AmbiguousBlobs'] = @ambiguous_blobs
|
|
130
|
+
@unknown_json_fields.each do |k, v|
|
|
131
|
+
ret[k] = v
|
|
132
|
+
end
|
|
133
|
+
ret
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
137
|
+
def to_h
|
|
138
|
+
to_hash
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# @return [String] The complete object as a JSON string
|
|
142
|
+
def to_json(options = {})
|
|
143
|
+
to_hash.to_json(options)
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
# AttributedContentMeasurementComponent is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
class AttributedContentMeasurementComponent
|
|
14
|
+
|
|
15
|
+
# @type [Number] bytes
|
|
16
|
+
attr_accessor :bytes
|
|
17
|
+
|
|
18
|
+
# A list of strings describing which groups of snapshots, and which items within those snapshots,
|
|
19
|
+
# rely on reaching this component of data.
|
|
20
|
+
# Each string is one reacher path, whose parts are joined by a NUL (0x00) byte. The parts are:
|
|
21
|
+
# - Part 1: CURRENT or HISTORIC - whether the most recent (CURRENT) or an older (HISTORIC) backup
|
|
22
|
+
# job snapshot for the source reaches this data.
|
|
23
|
+
# - Part 2: the Protected Item source ID (for on-premises Protected Items) or Tenant ID (for hosted
|
|
24
|
+
# Office 365) that reaches this data.
|
|
25
|
+
# - Parts 3 and beyond (optional): typed item segments of the form "<EngineType>:<type>:<id>"
|
|
26
|
+
# identifying the item within the snapshot that reaches this data (e.g.
|
|
27
|
+
# "engine1/winmsofficemail:mailbox:user@example.com"). An id may itself contain colons; parse each
|
|
28
|
+
# segment as SplitN(":", 3).
|
|
29
|
+
# A pack shared by N distinct reachers appears once per reacher in this array.
|
|
30
|
+
# As a special case, a single empty string means the data is not currently referenced by any backup
|
|
31
|
+
# job snapshot and will be deleted on the next retention pass. (This measurement is never truncated,
|
|
32
|
+
# so there is no "TRUNCATED/*" value.)
|
|
33
|
+
# Reserved delimiter bytes (0x00 and 0x01) are stripped from part values during measurement.
|
|
34
|
+
# @type [Array<String>] used_by
|
|
35
|
+
attr_accessor :used_by
|
|
36
|
+
|
|
37
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
38
|
+
attr_accessor :unknown_json_fields
|
|
39
|
+
|
|
40
|
+
def initialize
|
|
41
|
+
clear
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def clear
|
|
45
|
+
@bytes = 0
|
|
46
|
+
@used_by = []
|
|
47
|
+
@unknown_json_fields = {}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# @param [String] json_string The complete object in JSON format
|
|
51
|
+
def from_json(json_string)
|
|
52
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
53
|
+
|
|
54
|
+
from_hash(JSON.parse(json_string))
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
58
|
+
def from_hash(obj)
|
|
59
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
60
|
+
|
|
61
|
+
obj.each do |k, v|
|
|
62
|
+
case k
|
|
63
|
+
when 'Bytes'
|
|
64
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
65
|
+
|
|
66
|
+
@bytes = v
|
|
67
|
+
when 'UsedBy'
|
|
68
|
+
if v.nil?
|
|
69
|
+
@used_by = []
|
|
70
|
+
else
|
|
71
|
+
@used_by = Array.new(v.length)
|
|
72
|
+
v.each_with_index do |v1, i1|
|
|
73
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
|
74
|
+
|
|
75
|
+
@used_by[i1] = v1
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
else
|
|
79
|
+
@unknown_json_fields[k] = v
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
85
|
+
def to_hash
|
|
86
|
+
ret = {}
|
|
87
|
+
ret['Bytes'] = @bytes
|
|
88
|
+
ret['UsedBy'] = @used_by
|
|
89
|
+
@unknown_json_fields.each do |k, v|
|
|
90
|
+
ret[k] = v
|
|
91
|
+
end
|
|
92
|
+
ret
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
96
|
+
def to_h
|
|
97
|
+
to_hash
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# @return [String] The complete object as a JSON string
|
|
101
|
+
def to_json(options = {})
|
|
102
|
+
to_hash.to_json(options)
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
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
|
|
@@ -129,9 +129,7 @@ module Comet
|
|
|
129
129
|
ret['PruneLogsAfterDays'] = @prune_logs_after_days
|
|
130
130
|
ret['RemoteStorage'] = @remote_storage
|
|
131
131
|
ret['ReplicateTo'] = @replicate_to
|
|
132
|
-
|
|
133
|
-
ret['GlobalOverrides'] = @global_overrides
|
|
134
|
-
end
|
|
132
|
+
ret['GlobalOverrides'] = @global_overrides
|
|
135
133
|
@unknown_json_fields.each do |k, v|
|
|
136
134
|
ret[k] = v
|
|
137
135
|
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
|
|
@@ -54,6 +54,13 @@ module Comet
|
|
|
54
54
|
# @type [String] tags
|
|
55
55
|
attr_accessor :tags
|
|
56
56
|
|
|
57
|
+
# Optionally restricts LimitVaultSpeedBps to a specific time of day and days of the week. When
|
|
58
|
+
# absent, or when its RestrictTimes is false, LimitVaultSpeedBps applies at all times. Has no effect
|
|
59
|
+
# unless LimitVaultSpeedBps is set.
|
|
60
|
+
# This field is available in Comet 26.8.5 and later.
|
|
61
|
+
# @type [Comet::SpeedLimitTimeWindow] limit_vault_speed_time_window
|
|
62
|
+
attr_accessor :limit_vault_speed_time_window
|
|
63
|
+
|
|
57
64
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
58
65
|
attr_accessor :unknown_json_fields
|
|
59
66
|
|
|
@@ -68,6 +75,7 @@ module Comet
|
|
|
68
75
|
@concurrency_count = 0
|
|
69
76
|
@log_level = ''
|
|
70
77
|
@tags = ''
|
|
78
|
+
@limit_vault_speed_time_window = Comet::SpeedLimitTimeWindow.new
|
|
71
79
|
@unknown_json_fields = {}
|
|
72
80
|
end
|
|
73
81
|
|
|
@@ -116,6 +124,9 @@ module Comet
|
|
|
116
124
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
117
125
|
|
|
118
126
|
@tags = v
|
|
127
|
+
when 'LimitVaultSpeedTimeWindow'
|
|
128
|
+
@limit_vault_speed_time_window = Comet::SpeedLimitTimeWindow.new
|
|
129
|
+
@limit_vault_speed_time_window.from_hash(v)
|
|
119
130
|
else
|
|
120
131
|
@unknown_json_fields[k] = v
|
|
121
132
|
end
|
|
@@ -135,6 +146,9 @@ module Comet
|
|
|
135
146
|
ret['ConcurrencyCount'] = @concurrency_count
|
|
136
147
|
ret['LogLevel'] = @log_level
|
|
137
148
|
ret['Tags'] = @tags
|
|
149
|
+
unless @limit_vault_speed_time_window.nil?
|
|
150
|
+
ret['LimitVaultSpeedTimeWindow'] = @limit_vault_speed_time_window
|
|
151
|
+
end
|
|
138
152
|
@unknown_json_fields.each do |k, v|
|
|
139
153
|
ret[k] = v
|
|
140
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
|
|
@@ -75,10 +75,14 @@ module Comet
|
|
|
75
75
|
# @type [Number] download_size
|
|
76
76
|
attr_accessor :download_size
|
|
77
77
|
|
|
78
|
-
# For Hyper-V and
|
|
78
|
+
# For Hyper-V, VMware and Proxmox backup jobs, the total number of virtual machines.
|
|
79
79
|
# @type [Number] total_vm_count
|
|
80
80
|
attr_accessor :total_vm_count
|
|
81
81
|
|
|
82
|
+
# For Proxmox backup jobs, the total number of LXC containers.
|
|
83
|
+
# @type [Number] total_lxc_count
|
|
84
|
+
attr_accessor :total_lxc_count
|
|
85
|
+
|
|
82
86
|
# For Office 365 backup jobs, the total number of mailboxes.
|
|
83
87
|
# @type [Number] total_mails_count
|
|
84
88
|
attr_accessor :total_mails_count
|
|
@@ -154,6 +158,7 @@ module Comet
|
|
|
154
158
|
@upload_size = 0
|
|
155
159
|
@download_size = 0
|
|
156
160
|
@total_vm_count = 0
|
|
161
|
+
@total_lxc_count = 0
|
|
157
162
|
@total_mails_count = 0
|
|
158
163
|
@total_sites_count = 0
|
|
159
164
|
@total_accounts_count = 0
|
|
@@ -261,6 +266,10 @@ module Comet
|
|
|
261
266
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
262
267
|
|
|
263
268
|
@total_vm_count = v
|
|
269
|
+
when 'TotalLxcCount'
|
|
270
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
271
|
+
|
|
272
|
+
@total_lxc_count = v
|
|
264
273
|
when 'TotalMailsCount'
|
|
265
274
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
266
275
|
|
|
@@ -337,6 +346,9 @@ module Comet
|
|
|
337
346
|
unless @total_vm_count.nil?
|
|
338
347
|
ret['TotalVmCount'] = @total_vm_count
|
|
339
348
|
end
|
|
349
|
+
unless @total_lxc_count.nil?
|
|
350
|
+
ret['TotalLxcCount'] = @total_lxc_count
|
|
351
|
+
end
|
|
340
352
|
unless @total_mails_count.nil?
|
|
341
353
|
ret['TotalMailsCount'] = @total_mails_count
|
|
342
354
|
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
|
|
@@ -84,6 +84,25 @@ module Comet
|
|
|
84
84
|
# @type [String] tags
|
|
85
85
|
attr_accessor :tags
|
|
86
86
|
|
|
87
|
+
# Optionally restricts LimitVaultSpeedBps to a specific time of day and days of the week. When
|
|
88
|
+
# absent, or when its RestrictTimes is false, LimitVaultSpeedBps applies at all times. Has no effect
|
|
89
|
+
# unless LimitVaultSpeedBps is set.
|
|
90
|
+
# This field is available in Comet 26.8.5 and later.
|
|
91
|
+
# @type [Comet::SpeedLimitTimeWindow] limit_vault_speed_time_window
|
|
92
|
+
attr_accessor :limit_vault_speed_time_window
|
|
93
|
+
|
|
94
|
+
# If set, the ID of the Policy default backup rule this rule was generated from.
|
|
95
|
+
# Used to keep a "latest vault" schedule on its assigned Storage Vault across policy re-enforcement.
|
|
96
|
+
# This field is available in Comet 26.5.2 and later.
|
|
97
|
+
# @type [String] policy_backup_rule_id
|
|
98
|
+
attr_accessor :policy_backup_rule_id
|
|
99
|
+
|
|
100
|
+
# If set, the originating Policy default backup rule's destination selector, snapshotted
|
|
101
|
+
# before it was resolved to a concrete Storage Vault. Identifies "latest vault" schedules.
|
|
102
|
+
# This field is available in Comet 26.5.2 and later.
|
|
103
|
+
# @type [String] policy_backup_rule_selector
|
|
104
|
+
attr_accessor :policy_backup_rule_selector
|
|
105
|
+
|
|
87
106
|
# Scheduled start times
|
|
88
107
|
# @type [Array<Comet::ScheduleConfig>] schedules
|
|
89
108
|
attr_accessor :schedules
|
|
@@ -114,6 +133,9 @@ module Comet
|
|
|
114
133
|
@concurrency_count = 0
|
|
115
134
|
@log_level = ''
|
|
116
135
|
@tags = ''
|
|
136
|
+
@limit_vault_speed_time_window = Comet::SpeedLimitTimeWindow.new
|
|
137
|
+
@policy_backup_rule_id = ''
|
|
138
|
+
@policy_backup_rule_selector = ''
|
|
117
139
|
@schedules = []
|
|
118
140
|
@event_triggers = Comet::BackupRuleEventTriggers.new
|
|
119
141
|
@unknown_json_fields = {}
|
|
@@ -217,6 +239,17 @@ module Comet
|
|
|
217
239
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
218
240
|
|
|
219
241
|
@tags = v
|
|
242
|
+
when 'LimitVaultSpeedTimeWindow'
|
|
243
|
+
@limit_vault_speed_time_window = Comet::SpeedLimitTimeWindow.new
|
|
244
|
+
@limit_vault_speed_time_window.from_hash(v)
|
|
245
|
+
when 'PolicyBackupRuleID'
|
|
246
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
247
|
+
|
|
248
|
+
@policy_backup_rule_id = v
|
|
249
|
+
when 'PolicyBackupRuleSelector'
|
|
250
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
251
|
+
|
|
252
|
+
@policy_backup_rule_selector = v
|
|
220
253
|
when 'Schedules'
|
|
221
254
|
if v.nil?
|
|
222
255
|
@schedules = []
|
|
@@ -257,6 +290,15 @@ module Comet
|
|
|
257
290
|
ret['ConcurrencyCount'] = @concurrency_count
|
|
258
291
|
ret['LogLevel'] = @log_level
|
|
259
292
|
ret['Tags'] = @tags
|
|
293
|
+
unless @limit_vault_speed_time_window.nil?
|
|
294
|
+
ret['LimitVaultSpeedTimeWindow'] = @limit_vault_speed_time_window
|
|
295
|
+
end
|
|
296
|
+
unless @policy_backup_rule_id.nil?
|
|
297
|
+
ret['PolicyBackupRuleID'] = @policy_backup_rule_id
|
|
298
|
+
end
|
|
299
|
+
unless @policy_backup_rule_selector.nil?
|
|
300
|
+
ret['PolicyBackupRuleSelector'] = @policy_backup_rule_selector
|
|
301
|
+
end
|
|
260
302
|
ret['Schedules'] = @schedules
|
|
261
303
|
ret['EventTriggers'] = @event_triggers
|
|
262
304
|
@unknown_json_fields.each do |k, v|
|